iobroker.admin 6.2.16 → 6.2.17

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 +1 @@
1
- {"version":3,"sources":["../node_modules/@iobroker/adapter-react-v5/Components/CustomModal.jsx","../node_modules/@iobroker/adapter-react-v5/Components/Image.js","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ChipInput.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigAlive.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigAutocomplete.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigAutocompleteSendTo.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigCRON.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigCertificateSelect.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigCheckbox.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigChip.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigColor.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigCoordinates.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigCustom.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigDatePicker.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigFile.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigFileSelector.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigFunc.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigIP.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigImageUpload.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigInstanceSelect.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigJsonEditor.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigLanguage.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigNumber.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigObjectId.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigPanel.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigPassword.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigPattern.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigRoom.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigSelect.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigSelectSendTo.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigSendto.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigSetState.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigSlider.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigStaticDivider.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigStaticHeader.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigStaticImage.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigStaticText.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigTable.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigTabs.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigText.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigTextSendTo.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigTimePicker.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigTopic.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigUser.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/index.jsx","../node_modules/@iobroker/adapter-react-v5/Components/Logo.js","../node_modules/@iobroker/adapter-react-v5/Components/MDUtils.js","../node_modules/@iobroker/adapter-react-v5/Components/ToggleThemeMenu.js","../node_modules/@iobroker/adapter-react-v5/Components/TreeTable.js","../node_modules/@iobroker/adapter-react-v5/Connection.js","../node_modules/@iobroker/adapter-react-v5/Dialogs/ComplexCron.js","../node_modules/@iobroker/adapter-react-v5/Dialogs/SimpleCron.js","../node_modules/@iobroker/adapter-react-v5/Prompt.js","../node_modules/@iobroker/adapter-react-v5/icons/IconFx.js","../node_modules/@mui/icons-material/Colorize.js","../node_modules/@mui/icons-material/VerticalAlignBottom.js","../node_modules/@mui/icons-material/VerticalAlignTop.js","../node_modules/@mui/material/Skeleton/Skeleton.js","../node_modules/@mui/material/Skeleton/skeletonClasses.js","../node_modules/@mui/material/internal/svg-icons/ArrowDownward.js","../node_modules/@mui/material/TableSortLabel/TableSortLabel.js","../node_modules/@mui/material/TableSortLabel/tableSortLabelClasses.js","../node_modules/@mui/x-date-pickers/CalendarPickerSkeleton/calendarPickerSkeletonClasses.js","../node_modules/@mui/x-date-pickers/CalendarPickerSkeleton/CalendarPickerSkeleton.js","../node_modules/@mui/x-date-pickers/DateTimePicker/shared.js","../node_modules/@mui/x-date-pickers/DateTimePicker/DateTimePickerTabs.js","../node_modules/@mui/x-date-pickers/DateTimePicker/DateTimePickerToolbar.js","../node_modules/@mui/x-date-pickers/internals/hooks/validation/useDateTimeValidation.js","../node_modules/@mui/x-date-pickers/DesktopDateTimePicker/DesktopDateTimePicker.js","../node_modules/@mui/x-date-pickers/MobileDateTimePicker/MobileDateTimePicker.js","../node_modules/@mui/x-date-pickers/DateTimePicker/DateTimePicker.js","../node_modules/@mui/x-date-pickers/internals/components/PickerStaticWrapper/pickerStaticWrapperClasses.js","../node_modules/@mui/x-date-pickers/internals/components/PickerStaticWrapper/PickerStaticWrapper.js","../node_modules/@mui/x-date-pickers/StaticDatePicker/StaticDatePicker.js","../node_modules/@mui/x-date-pickers/StaticDateTimePicker/StaticDateTimePicker.js","../node_modules/@mui/x-date-pickers/StaticTimePicker/StaticTimePicker.js","../node_modules/@mui/x-date-pickers/locales/nlNL.js","../node_modules/@mui/x-date-pickers/locales/ptBR.js","../node_modules/@mui/x-date-pickers/locales/trTR.js","../node_modules/@mui/x-date-pickers/locales/deDE.js","../node_modules/@mui/x-date-pickers/locales/esES.js","../node_modules/@mui/x-date-pickers/locales/frFR.js","../node_modules/@mui/x-date-pickers/locales/nbNO.js","../node_modules/@mui/x-date-pickers/locales/svSE.js","../node_modules/@mui/x-date-pickers/locales/itIT.js","../node_modules/@mui/x-date-pickers/locales/zhCN.js","../node_modules/@mui/x-date-pickers/index.js","../node_modules/react-colorful/src/hooks/useEventCallback.ts","../node_modules/react-colorful/src/utils/clamp.ts","../node_modules/react-colorful/src/components/common/Interactive.tsx","../node_modules/react-colorful/src/utils/format.ts","../node_modules/react-colorful/src/components/common/Pointer.tsx","../node_modules/react-colorful/src/utils/round.ts","../node_modules/react-colorful/src/utils/convert.ts","../node_modules/react-colorful/src/components/common/Hue.tsx","../node_modules/react-colorful/src/components/common/Saturation.tsx","../node_modules/react-colorful/src/utils/compare.ts","../node_modules/react-colorful/src/hooks/useColorManipulation.ts","../node_modules/react-colorful/src/utils/nonce.ts","../node_modules/react-colorful/src/hooks/useIsomorphicLayoutEffect.ts","../node_modules/react-colorful/src/hooks/useStyleSheet.ts","../node_modules/react-colorful/src/components/common/ColorPicker.tsx","../node_modules/react-colorful/src/components/HexColorPicker.tsx","../node_modules/react-colorful/src/components/common/Alpha.tsx","../node_modules/react-colorful/src/components/common/AlphaColorPicker.tsx","../node_modules/react-colorful/src/components/HexAlphaColorPicker.tsx","../node_modules/react-colorful/src/components/HslaColorPicker.tsx","../node_modules/react-colorful/src/components/HslaStringColorPicker.tsx","../node_modules/react-colorful/src/components/HslColorPicker.tsx","../node_modules/react-colorful/src/components/HslStringColorPicker.tsx","../node_modules/react-colorful/src/components/HsvaColorPicker.tsx","../node_modules/react-colorful/src/components/HsvaStringColorPicker.tsx","../node_modules/react-colorful/src/components/HsvColorPicker.tsx","../node_modules/react-colorful/src/components/HsvStringColorPicker.tsx","../node_modules/react-colorful/src/components/RgbaColorPicker.tsx","../node_modules/react-colorful/src/components/RgbaStringColorPicker.tsx","../node_modules/react-colorful/src/components/RgbColorPicker.tsx","../node_modules/react-colorful/src/components/RgbStringColorPicker.tsx","../node_modules/react-colorful/src/utils/validate.ts","../node_modules/react-colorful/src/components/common/ColorInput.tsx","../node_modules/react-colorful/src/components/HexColorInput.tsx","../node_modules/@babel/runtime/helpers/get.js","../node_modules/@babel/runtime/helpers/superPropBase.js","../node_modules/@babel/runtime/helpers/toArray.js"],"names":["styles","theme","modalDialog","minWidth","maxWidth","overflowHidden","display","overflow","titleIcon","marginRight","content","fontSize","languageButton","position","right","spacing","top","languageButtonActive","color","palette","primary","main","CustomModal","toggleTranslation","noTranslation","title","fullWidth","help","progress","icon","applyDisabled","applyButton","classes","open","onClose","children","titleButtonApply","titleButtonClose","onApply","textInput","defaultValue","useState","value","setValue","useEffect","Icon","paper","I18n","getLanguage","Utils","clsx","t","paddingTop","e","target","defaultProps","propTypes","PropTypes","object","bool","func","any","string","withStyles","getElementFromSource","src","svgContainer","document","createElement","innerHTML","svg","firstElementChild","remove","removeChild","serializeAttrs","map","ret","prop","i","length","key","name","startsWith","replace","g","toUpperCase","Image","props","state","created","imgError","showError","getSvgFromData","len","substring","atob","inner","svgProps","attributes","className","__html","setTimeout","setState","imagePrefix","newState","changed","React","Component","isRequired","variantComponent","standard","Input","filled","FilledInput","outlined","OutlinedInput","light","type","bottomLineColor","root","inputRoot","flexWrap","flex","marginTop","boxSizing","input","textOverflow","whiteSpace","appearance","WebkitTapHighlightColor","chipContainer","flexFlow","cursor","marginBottom","minHeight","height","paddingBottom","labeled","label","labelShrink","helperText","focused","disabled","underline","borderBottom","left","bottom","transform","transition","transitions","create","duration","shorter","easing","easeOut","pointerEvents","borderBottomColor","error","text","borderBottomStyle","backgroundColor","chip","margin","marginDense","keyCodes","BACKSPACE","DELETE","LEFT_ARROW","RIGHT_ARROW","ChipInput","chips","errorText","undefined","focusedChip","inputValue","isClean","isFocused","chipsUpdated","prevPropsValue","actualInput","focus","event","onBlur","addChipOptions","blurBehavior","clearInputOnFail","delayBeforeAdd","numChipsBefore","inputBlurTimeout","numChipsAfter","handleAddChip","clearInput","onFocus","_keyPressed","_preventChipCreation","onKeyDown","isDefaultPrevented","newChipKeyCodes","includes","keyCode","newChipKeys","result","preventDefault","handleDeleteChip","indexOf","updateInput","onKeyUp","onKeyPress","onUpdateInput","ref","inputRef","labelRef","createRef","variant","labelNode","ReactDOM","findDOMNode","current","forceUpdate","clearTimeout","blur","options","onBeforeAdd","dataSourceConfig","allowDuplicates","some","c","onAdd","updateChips","trim","onDelete","slice","splice","additionalUpdates","onChange","alwaysShowPlaceholder","chipRenderer","defaultChipRenderer","clearInputValueOnChange","dataSource","disableUnderline","filter","FormHelperTextProps","fullWidthInput","id","InputProps","InputLabelProps","placeholder","readOnly","required","rootRef","other","actualInputValue","hasInput","shrinkFloatingLabel","shrink","chipComponents","isDisabled","isReadOnly","handleClick","handleDelete","InputMore","notched","labelWidth","offsetWidth","startAdornment","InputComponent","handleUpdateInput","handleKeyDown","handleKeyPress","handleKeyUp","handleInputFocus","handleInputBlur","setActualInputRef","oneOf","array","shape","node","arrayOf","number","blue","width","notAlive","ConfigAlive","instance","getInstance","socket","getState","then","alive","val","schema","adapterName","getPattern","textAlive","textNotAlive","ConfigGeneric","data","ConfigAutocomplete","getValue","attr","selectOptions","item","JSON","parse","stringify","Array","isArray","unshift","DIFFERENT_LABEL","DIFFERENT_VALUE","isIndeterminate","find","it","forEach","push","toString","indeterminate","freeSolo","_","option","params","getText","renderHelp","helpLink","themeType","themeName","style","onError","ConfigAutocompleteSendTo","askInstance","jsonData","console","sendTo","command","list","context","getContext","alsoDependsOn","maxLength","max","button","marginLeft","ConfigCRON","showDialog","simple","complex","dateFormat","isFloatComma","ConfigCertificateSelect","getCertificates","el","toLowerCase","NONE_LABEL","NONE_VALUE","opacity","ConfigCheckbox","stopPropagation","checked","validatorErrorText","ConfigLanguage","delimiter","parts","split","a","newValue","prevValue","join","index","ConfigColor","showColorDialog","colorDialogValue","ColorPicker","getColor","textColor","isUseBright","renderColorDialog","endAdornment","onPaste","ConfigCoordinates","autoInit","getCoordinates","getSystemConfig","obj","common","longitude","latitude","window","alert","divider","navigator","geolocation","getCurrentPosition","coords","getSystemCoordinates","getOrLoadRemote","remote","shareScope","remoteFallbackUrl","Promise","resolve","reject","existingRemote","querySelector","onload","__initialized","init","__webpack_share_scopes__","onerror","d","script","setAttribute","async","getElementsByTagName","appendChild","loadComponent","sharedScope","module","url","container","get","factory","Module","ConfigCustom","location","protocol","host","i18n","pos","lastIndexOf","i18nURL","lang","file","fetch","json","extendTranslations","log","uniqueName","fileToLoad","componentName","component","keys","Object","xs","lg","md","sm","assign","textAlign","darkStyle","newLine","flexBasis","ConfigDatePicker","systemConfig","Date","fullWidthOneButton","fullWidthIcon","selectedImage","IMAGE_EXT","AUDIO_EXT","VIDEO_EXT","DOC_EXT","JS_EXT","ConfigFile","adapter","path","readFile","loadFile","AudioContext","buf","ConfigFileSelector","base64ToArrayBuffer","decodeAudioData","buffer","source","createBufferSource","connect","destination","start","err","extension","pop","backgroundImage","backgroundSize","backgroundRepeat","play","showFileBrowser","selectOnlyFolders","allowUpload","allowDownload","allowCreateFolder","allowView","showToolbar","limitPath","getIcon","disableEdit","renderFileBrowser","fullWidthTwoButtons","fullWidthThreeButtons","dropZone","dropZoneEmpty","image","objectFit","uploadDiv","uploadDivDragging","background","uploadCenterDiv","border","borderRadius","uploadCenterIcon","uploadCenterText","uploadCenterTextAndIcon","flexDirection","alignItems","justifyContent","disabledOpacity","deleteButton","dropzoneRef","objectID","upload","endsWith","updateFiles","readFiles","pattern","files","folderName","readDir","dirFiles","f","isDir","readFolder","ok","regExp","RegExp","test","size","stats","formatBytes","folder","acceptedFiles","reader","FileReader","maxSize","onabort","ext","Math","round","base64","btoa","Uint8Array","reduce","byte","String","fromCharCode","writeFile64","readAsArrayBuffer","deleteFile","isOk","folders","withFolder","noSize","noNone","buttons","refresh","element","accept","last","uploadFile","errors","message","onDrop","getRootProps","getInputProps","uploadError","renderDeleteDialog","binaryString","bytes","charCodeAt","ConfigFunc","getEnums","enums","ConfigIP","getHostByIp","ips","listenOnAllPorts","address","onlyIp4","family","onlyIp6","ConfigImageUpload","imageRef","now","fileExists","exist","_getUrl","update","port","hostname","crop","ConfigInstanceSelect","match","_id","findIndex","getHistory","sort","b","getAdapterInstances","instances","all","subscribeObject","onInstancesUpdate","unsubscribeObject","wrapper","ConfigJsonEditor","initialized","showSelectId","LANGUAGES","languages","system","changeGuiLanguage","setLanguage","changeLanguage","language","control","textWithArrows","arrows","arrowUp","userSelect","arrowDown","ConfigNumber","_value","arr","parseFloat","min","isNumber","step","isFinite","isNaN","ConfigObjectId","components","autocomplete","autocompleteSendTo","certificate","checkbox","ConfigChip","coordinates","cron","custom","datePicker","ConfigStaticDivider","fileSelector","header","ConfigStaticHeader","ip","jsonEditor","objectId","password","ConfigPassword","ConfigPattern","room","ConfigRoom","select","ConfigSelect","selectSendTo","ConfigSelectSendTo","ConfigSendto","ConfigSetState","slider","ConfigSlider","staticImage","ConfigStaticImage","staticLink","ConfigStaticText","staticText","table","ConfigTable","ConfigText","textSendTo","ConfigTextSendTo","timePicker","ConfigTimePicker","topic","ConfigTopic","user","ConfigUser","overflowY","padding","heading","mode","secondary","ConfigPanel","collapsable","expanded","_localStorage","localStorage","getItem","items","multiEdit","noMultiEdit","ItemComponent","customs","ConfigPanelStyled","arrayIndex","globalData","onCommandRunning","commandRunning","panel","originalData","registerOnForceUpdate","customObj","instanceObj","calculate","hidden","hideOnlyControl","themaType","renderItems","setItem","isParentTab","tooltip","halfWidth1","halfWidth2","PASSWORD_PLACEHOLDER","_repeat","_visible","_notEqual","repeatPassword","repeat","onChangePassword","autoComplete","form","visible","passwordRepeat","copyToClipboard","copy","initialValue","executeCustom","execute","menuPaper","maxHeight","multiple","_getValue","gap","v","_item","showAllValues","manual","ip2int","ipInt","octet","parseInt","findNetworkAddressOfHost","localIp","networkInterfaces","hardware","hostIp","inter","internal","netmask","openUrl","getCurrentInstance","adminInstance","getObject","hostObj","warn","_error","_message","_origin","pathname","response","args","arg","saveConfig","confirmDialog","confirm","confirmData","cancel","_onClick","renderErrorDialog","renderMessageDialog","ack","okText","unit","marks","borderStyle","contrastText","marginBlockEnd","marginBlockStart","href","headerText","visuallyHidden","clip","addIcon","highlight","dark","rootTool","paddingLeft","paddingRight","silver","filteredOut","buttonEmpty","buttonCell","objectToArray","nameOfFirstAttr","nameOfSecondAttr","arrayToObject","row","property","orderCheck","order","orderBy","isAsc","newOrder","stableSort","iteration","applyFilter","comparator","getComparator","stabilizedThis","visibleValue","onChangeWrapper","updateVisible","typingTimer","objKeyName","objValue","objValueName","handleRequestSort","newItem","accumulator","currentValue","defaultFunc","clear","filterRefs","valueInputRef","idx","filterOn","attrItem","schemaForAttribute","schemaItem","valueChange","newObj","buttonsWidth","headCell","noDelete","doAnyFilterSet","isAnyFilterSet","allowAddByFilter","enhancedTableHead","itemTable","onMoveUp","onMoveDown","descendingComparator","tabs","ConfigTabs","tab","dialogName","tempValue","ts","updateTimeout","convertID2Topic","prefix","namespace","getUsers","users","_users","getObjectNameFromObj","getInvertedColor","JsonConfigComponent","cb","onValueChange","_data","forceUpdateHandlers","updateData","buildDependencies","readData","readSettings","getCompactSystemConfig","subscribeState","onAlive","_list","flatten","attrs","dep","confirmDependsOn","depObj","onChangeDependsOn","hiddenDependsOn","labelDependsOn","helpDependsOn","forceAttrUpdate","renderItem","exists","fileName","logo","Logo","evt","r","contents","onLoad","readAsText","news","titleLang","desc","generateFile","addEventListener","handleFileSelect","click","readme","win","download","filename","encodeURIComponent","body","_export","MDUtils","m","extractHeader","lines","_header","line","doc","ToggleThemeMenu","toggleTheme","getAttr","lookup","shift","setAttr","tableContainer","cell","rowMainWithChildren","rowMainWithoutChildren","rowNoEdit","cellExpand","cellButton","cellHeader","fontWeight","wordBreak","width_name_nicknames","width_ioType","width_type","width_displayTraits","width_roomHint","rowSecondary","fontStyle","cellSecondary","fieldEditWithButton","fieldEdit","lineHeight","verticalAlign","fieldButton","colorDialog","subText","glow","animation","_a","_b","TreeTable","opened","editMode","deleteMode","editData","columns","field","useTable","showSelectColor","glowOnChange","col","renderCellEditSelect","editComponent","renderCellEditCustom","renderCellEditBoolean","renderCellEditColor","renderCellEditObjectID","renderCellEditString","EditComponent","newVal","selectCallback","selectIdValue","_val","newColor","selected","level","editable","cellStyle","renderCellEdit","renderCellNonEdit","sub","subField","subLookup","mainText","subStyle","levelShift","parentId","renderCellWithSubField","ii","renderCell","onUpdate","newData","renderLine","headerStyle","noSort","noAdd","renderHead","renderSelectIdDialog","renderSelectColorDialog","count","oldLine","loading","PROGRESS","CONNECTING","CONNECTED","OBJECTS_LOADED","READY","PERMISSION_ERROR","NOT_CONNECTED","TIMEOUT_FOR_ADMIN4","ERRORS","fixAdminUI","adminUI","noConfig","config","jsonConfig","materialize","jsonCustom","supportCustoms","materializeTab","adminTab","debug","Connection","autoSubscribes","autoSubscribeLog","isWeb","ioTimeout","cmdTimeout","doNotLoadAllObjects","doNotLoadACL","states","objects","acl","firstConnect","waitForRestart","systemLang","connected","_waitForFirstConnection","_waitForFirstConnectionResolve","statesSubscribes","objectsSubscribes","onProgress","loaded","loadTimer","loadCounter","admin5only","onConnectionHandlers","onLogHandlers","_promises","info","silly","startSocket","io","registerSocketOnLoad","scriptLoadCounter","_socket","socketUrl","query","timeout","on","noTimeout","getVersion","version","major","minor","patch","_authTimer","onPreConnect","emit","isSecure","reload","_subscribe","subscribed","authenticate","onLog","_err","operation","objectChange","stateChange","onCmdStdoutHandler","onCmdStderrHandler","exitCode","onCmdExitHandler","onConnect","_getUserPermissions","vendorPrefix","userLanguage","onLanguage","onReady","getObjects","search","hash","binary","cbs","reg","getBinaryState","oldObj","_rev","onObjectChange","task","hasOwnProperty","disableProgressUpdate","res","STATES_LOADED","isEnable","isEnabled","maintenance","from","getObjectView","adapters","objs","oldId","newId","setObject","delObject","_renameGroups","newName","getGroups","groups","groupsToRename","group","handler","_enum","startkey","endkey","_res","rows","end","cert","certs","certificates","_cert","linesNumber","oldName","hosts","timeoutMs","repo","installed","cmd","cmdId","feature","features","checkFeatureSupported","typeOfDiag","values","stepIgnore","sessionId","ipOrHostName","IPs4","IPs6","eth","num","encryptedText","serverName","webName","entries","category","notifications","isStrict","controller","AbortController","abort","signal","ratings","currentInstance","compactAdapters","compactInstances","installedCompact","systemConfigCommon","repoCompact","hostsCompact","uuid","headerID","radio","dialogPaper","DialogComplexCron","onOk","clearButton","handleClear","handleOk","handleCancel","DialogSimpleCron","printPrompt","prompt","IconFx","onClick","oneOfType","_interopRequireDefault","exports","_createSvgIcon","_jsxRuntime","_default","_excluded","_t","_t2","_t3","_t4","useUtilityClasses","ownerState","hasChildren","slots","pulseKeyframe","waveKeyframe","SkeletonRoot","radiusUnit","radiusValue","Skeleton","inProps","getSkeletonUtilityClass","slot","skeletonClasses","createSvgIcon","direction","active","capitalize","composeClasses","TableSortLabelRoot","styled","ButtonBase","tableSortLabelClasses","TableSortLabelIcon","useThemeProps","hideSortIcon","IconComponent","ArrowDownward","getTableSortLabelUtilityClass","getCalendarPickerSkeletonUtilityClass","calendarPickerSkeletonClasses","CalendarPickerSkeletonRoot","CalendarPickerSkeletonWeek","CalendarPickerSkeletonDay","monthMap","CalendarPickerSkeleton","_useThemeProps","week","day","index2","useDateTimePickerDefaultizedProps","_themeProps$ampm","_ref","_themeProps$minDateTi","_ref2","_themeProps$maxDateTi","_themeProps$minDateTi2","_themeProps$maxDateTi2","themeProps","utils","useUtils","defaultDates","ampm","dateTimePickerValueManager","viewToTab","openView","tabToView","DateTimePickerTabsRoot","Tabs","tabsClasses","DateTimePickerTabs","dateRangeIcon","timeIcon","view","localeText","wrapperVariant","WrapperVariantContext","handleChange","Tab","dateTimePickerToolbarClasses","DateTimePickerToolbarRoot","PickersToolbar","DateTimePickerToolbarDateContainer","DateTimePickerToolbarTimeContainer","DateTimePickerToolbarSeparator","PickersToolbarText","DateTimePickerToolbar","parsedValue","hideTabs","isMobileKeyboardViewOpen","setOpenView","toggleMobileKeyboardView","toolbarFormat","toolbarPlaceholder","toolbarTitle","views","showTabs","formatHours","time","dateText","PickersToolbarButton","validateDateTime","minDate","maxDate","disableFuture","shouldDisableDate","disablePast","timeValidationProps","dateValidationResult","isSameDateTimeError","useDateTimeValidation","useValidation","DesktopDateTimePicker","validationError","pickerProps","inputProps","wrapperProps","usePickerState","PaperProps","PopperProps","ToolbarComponent","TransitionComponent","componentsProps","AllDateInputProps","DesktopWrapper","KeyboardDateInput","CalendarOrClockPicker","MobileDateTimePicker","DateInputProps","MobileWrapper","PureDateInput","DateTimePicker","desktopModeMediaQuery","DialogProps","useMediaQuery","getStaticWrapperUtilityClass","pickerStaticWrapperClasses","PickerStaticWrapperRoot","PickerStaticWrapperContent","PickerStaticWrapper","_components$ActionBar","displayStaticWrapperAs","onAccept","onClear","onCancel","onSetToday","ActionBar","PickersActionBar","StaticDatePicker","DatePickerToolbar","useDateValidation","StaticDateTimePicker","StaticTimePicker","TimePickerToolbar","useTimeValidation","nlNLPickers","hours","minutes","seconds","rawValue","nlNL","getPickersLocalization","ptBRPickers","ptBR","trTRPickers","trTR","deDEPickers","_views$view","deDE","esESPickers","esES","frFRPickers","frFR","nbNOPickers","nbNO","svSEPickers","svSE","itITPickers","itIT","zhCNPickers","zhCN","useEventCallback","callbackRef","useRef","fn","clamp","isTouch","getParentWindow","ownerDocument","defaultView","self","getRelativePosition","touchId","rect","getBoundingClientRect","pointer","touches","identifier","pageX","pageXOffset","pageY","pageYOffset","preventDefaultMove","Interactive","memo","onMove","onKey","rest","onMoveCallback","onKeyCallback","hasTouch","useMemo","handleMove","toggleDocumentEvents","handleMoveEnd","touch","parentWindow","toggleEvent","removeEventListener","nativeEvent","changedTouches","which","handleMoveStart","onTouchStart","onMouseDown","tabIndex","role","formatClassName","names","Boolean","Pointer","nodeClassName","digits","base","pow","angleUnits","grad","turn","rad","PI","hexToHsva","hex","rgbaToHsva","hexToRgba","parseHue","Number","hslaStringToHsva","hslString","exec","hslaToHsva","h","s","l","hslStringToHsva","hsvaToHex","hsva","rgbaToHex","hsvaToRgba","hsvaToHsla","hh","hsvaToHslString","hsvaToHslaString","floor","hsvaStringToHsva","hsvString","roundHsva","hsvStringToHsva","rgbaStringToHsva","rgbaString","rgbStringToHsva","format","alphaHex","delta","Hue","hue","interaction","offset","aria-label","aria-valuenow","aria-valuemax","aria-valuemin","Saturation","containerStyle","aria-valuetext","equalColorObjects","first","second","equalColorString","equalHex","useColorManipulation","colorModel","onChangeCallback","toHsva","updateHsva","cache","equal","newHsva","fromHsva","useCallback","nonce","useIsomorphicLayoutEffect","useLayoutEffect","getNonce","__webpack_nonce__","styleElementMap","Map","useStyleSheet","nodeRef","parentDocument","has","styleElement","set","head","defaultColor","Alpha","gradientStyle","ariaValue","AlphaColorPicker","matcher","ColorInput","escape","validate","process","onBlurCallback","handleBlur","spellCheck","prefixed","alpha","superPropBase","_get","receiver","getPrototypeOf","_superPropBase","arrayWithHoles","iterableToArray","unsupportedIterableToArray","nonIterableRest","_toArray"],"mappings":"sNAAA,aACA,cACA,cAEA,cACA,WACA,WAEA,cACA,cACA,cAEA,cACA,c,0jBAEA,IAAMA,EAAS,SAAAC,EAAK,OAAK,CACrBC,YAAa,CACTC,SAAU,IACVC,SAAU,GAFD,EAIbC,eAAgB,CACZC,QAAS,OACTC,SAAU,QAFE,EAIhBC,UAAW,CACPC,YAAa,CADN,EAGXC,QAAS,CACLC,SAAU,EADL,EAGTC,eAAgB,CACZC,SAAU,WACVC,MAAOb,EAAMc,QAAQ,CAAd,EACPC,IAAKf,EAAMc,QAAQ,CAAd,CAHO,EAKhBE,qBAAsB,CAClBC,MAAOjB,EAAMkB,QAAQC,QAAQC,IADX,CApBD,CAAL,EAyBdC,EAAc,SAAC,EAA+O,KAA7OC,EAA6O,EAA7OA,kBAAmBC,EAA0N,EAA1NA,cAAeC,EAA2M,EAA3MA,MAAOC,EAAoM,EAApMA,UAAWC,EAAyL,EAAzLA,KAAMvB,EAAmL,EAAnLA,SAAUwB,EAAyK,EAAzKA,SAAUC,EAA+J,EAA/JA,KAAMC,EAAyJ,EAAzJA,cAAeC,EAA0I,EAA1IA,YAAaC,EAA6H,EAA7HA,QAASC,EAAoH,EAApHA,KAAMC,EAA8G,EAA9GA,QAASC,EAAqG,EAArGA,SAAUC,EAA2F,EAA3FA,iBAAkBC,EAAyE,EAAzEA,iBAAkBC,EAAuD,EAAvDA,QAASC,EAA8C,EAA9CA,UAAWC,EAAmC,EAAnCA,aAAcnC,EAAqB,EAArBA,eAC3O,G,EAA0BoC,YAASD,CAAT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AkB,EAAQ,KAAsB,EAEpD,SAASC,EAASl4B,EAAK,CACrB,OAAO83B,EAAe93B,CAAG,GAAK+3B,EAAgB/3B,CAAG,GAAKg4B,EAA2Bh4B,CAAG,GAAKi4B,EAAgB,CAC3G,CAEAvlC,GAAO,QAAUwlC,EAAUxlC,GAAO,QAAQ,WAAa,GAAMA,GAAO,QAAQ,QAAaA,GAAO,O","file":"static/js/7228.c101e843.chunk.js","sourcesContent":["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 './Utils';\nimport I18n from '../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 React from 'react';\nimport PropTypes from 'prop-types';\n\nimport IconNoIcon from '../icons/IconNoIcon';\n\nfunction getElementFromSource(src) {\n const svgContainer = document.createElement('div');\n svgContainer.innerHTML = src;\n const svg = svgContainer.firstElementChild;\n if (svg.remove) {\n svg.remove();\n } else {\n svgContainer.removeChild(svg);\n }\n\n svgContainer.remove();\n return svg;\n}\n\nfunction serializeAttrs(map) {\n const ret = {};\n for (let prop, i = 0; i < map.length; i++) {\n const key = map[i].name;\n if (key === 'class') {\n prop = 'className';\n }\n else if (!key.startsWith('data-')) {\n prop = key.replace(/[-|:]([a-z])/g, g => g[1].toUpperCase());\n } else {\n prop = key;\n }\n\n ret[prop] = map[i].value;\n }\n return ret;\n}\n\n/**\n * @typedef {object} ImageProps\n * @property {string} [color] The color.\n * @property {string} [src] The source of the image.\n * @property {string} [imagePrefix] The image prefix (default: './files/')\n * @property {string} [className] The CSS class name.\n * @property {boolean} [showError] Show image errors (or just show no image)?\n *\n * @extends {React.Component<ImageProps>}\n */\nclass Image extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n svg: !!(this.props.src && this.props.src.startsWith('data:')),\n created: true,\n color: this.props.color || '',\n src: this.props.src || '',\n imgError: false,\n showError: this.props.showError,\n };\n\n this.svg = this.state.svg ? this.getSvgFromData(this.state.src) : null;\n }\n\n static getDerivedStateFromProps(props, state) {\n const newState = {};\n let changed = false;\n\n if (props && state && props.src !== state.src) {\n newState.src = props.src;\n newState.svg = props.src && props.src.startsWith('data:');\n newState.created = false;\n changed = true;\n }\n\n if (props && state && props.color !== state.color) {\n newState.color = props.color;\n newState.created = false;\n changed = true;\n }\n\n if (props && state && props.showError !== state.showError) {\n newState.showError = props.showError;\n changed = true;\n }\n\n return changed ? newState : null;\n }\n\n getSvgFromData(src) {\n const len = 'data:image/svg+xml;base64,';\n if (!src.startsWith(len)) {\n return null;\n }\n src = src.substring(len.length);\n try {\n src = atob(src);\n const svg = getElementFromSource(src);\n const inner = svg.innerHTML;\n const svgProps = serializeAttrs(svg.attributes || []);\n\n svg.remove();\n\n return <svg\n className={this.props.className}\n style={this.state.color ? {color: this.state.color} : {}}\n {...svgProps}\n dangerouslySetInnerHTML={{ __html: inner }}\n />;\n } catch (e) {\n\n }\n return null;\n }\n\n render() {\n if (this.state.svg) {\n if (!this.state.created) {\n setTimeout(() => {\n this.svg = this.getSvgFromData(this.state.src);\n this.setState({created: true});\n }, 50);\n }\n\n return this.svg;\n } else if (this.state.src) {\n if (this.state.imgError || !this.state.src) {\n return <IconNoIcon className={this.props.className} />;\n } else {\n return <img\n className={this.props.className}\n src={(this.props.imagePrefix || '') + this.state.src}\n alt=\"\"\n onError={() => this.props.showError ? this.setState({imgError: true}) : this.setState({src: ''})}\n />;\n }\n } else {\n return null;\n }\n }\n}\n\nImage.propTypes = {\n color: PropTypes.string,\n src: PropTypes.string.isRequired,\n className: PropTypes.string,\n imagePrefix: PropTypes.string,\n};\n\nexport default Image;","/**\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 ConfigGeneric from './ConfigGeneric';\n\nimport I18n from '../../i18n';\nimport Utils from '../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 '../../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 '../../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 '../..//Dialogs/Cron';\nimport I18n from '../../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 '../../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 '../../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);","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 '../Utils';\nimport ColorPicker from '../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 '../../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 '../../i18n';\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';\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 '../../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';\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 '../../Components/Utils';\nimport I18n from '../../i18n';\nimport ConfirmDialog from '../../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 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 '../TextWithIcon';\nimport I18n from '../../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 '../../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 '../UploadImage';\nimport I18n from '../../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 '../../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 '../../i18n';\nimport CustomModal from '../CustomModal';\n\n// import AceEditor from 'react-ace';\n// import 'ace-builds/webpack-resolver';\n// import 'ace-builds/src-noconflict/mode-json';\n// import 'ace-builds/src-noconflict/theme-clouds_midnight';\n// import 'ace-builds/src-noconflict/theme-chrome';\n// import '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>NOT SUPPORTED</div>\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 '../../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 '../../i18n';\nimport Utils from '../Utils';\n\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 '../../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';\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 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 '../../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 '../copy-to-clipboard';\nimport CopyIcon from '../../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 '../TextWithIcon';\nimport I18n from '../../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 '../../i18n';\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 '../../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 '../../i18n';\nimport Icon from '../Icon';\nimport DialogError from '../../Dialogs/Error';\nimport DialogMessage from '../../Dialogs/Message';\nimport ConfirmDialog from '../../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\nfunction ip2int(ip) {\n return ip.split('.').reduce((ipInt, octet) => (ipInt << 8) + parseInt(octet, 10), 0) >>> 0;\n}\n\n// copied from iobroker.admin/src-rx/src/Utils.js\nfunction 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 (ip2int(localIp) & ip2int(ip.netmask)) === (ip2int(ip.address) & ip2int(ip.netmask))) {\n hostIp = ip.address;\n } else {\n hostIp = ip.address;\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\nclass ConfigSendto extends ConfigGeneric {\n async componentDidMount() {\n super.componentDidMount();\n\n let hostname = window.location.hostname;\n if (this.props.schema.openUrl) {\n // read admin host\n const adminInstance = await this.props.socket.getCurrentInstance();\n const instanceObj = await this.props.socket.getObject(`system.adapter.${adminInstance}`);\n const hostObj = await this.props.socket.getObject(`system.host.${instanceObj.common.host}`);\n\n const ip = findNetworkAddressOfHost(hostObj, window.location.hostname);\n if (ip) {\n hostname = ip + ':' + window.location.port;\n } else {\n console.warn(`Cannot find suitable IP in host ${instanceObj.common.host} for ${instanceObj._id}`);\n return null;\n }\n }\n this.setState( { _error: '', _message: '', hostname });\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 const _origin = `${window.location.protocol}//${this.state.hostname}${window.location.pathname.replace(/\\/index\\.html$/, '')}`\n\n let data = this.props.schema.data;\n if (data === undefined && this.props.schema.jsonData) {\n data = this.getPattern(this.props.schema.jsonData, {}, {\n _origin,\n ...this.props.data\n });\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 if (this.props.schema.openUrl && !data) {\n data = { _origin: `${window.location.protocol}//${this.state.hostname}${window.location.pathname.replace(/\\/index\\.html$/, '')}` };\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?.openUrl && this.props.schema.openUrl) {\n window.open(response.openUrl, response.window || this.props.schema.window || '_blank');\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 if (response?.saveConfig) {\n this.props.onChange(null, null, null, true);\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 '../../i18n';\nimport Icon from '../Icon';\nimport ConfirmDialog from '../../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 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 '../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 '../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 '../../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 Tabs from '@mui/material/Tabs';\nimport Tab from '@mui/material/Tab';\n\nimport ConfigGeneric from './ConfigGeneric';\nimport ConfigPanel from './ConfigPanel';\n\nconst styles = theme => ({\n tabs: {\n height: '100%',\n width: '100%',\n },\n panel: {\n height: 'calc(100% - 48px)',\n width: '100%',\n display: 'block'\n }\n});\n\nclass ConfigTabs extends ConfigGeneric {\n constructor(props) {\n super(props);\n\n let tab = (window._localStorage || window.localStorage).getItem((this.props.dialogName || 'App') + '.' + this.props.adapterName) || Object.keys(this.props.schema.items)[0];\n if (!Object.keys(this.props.schema.items).includes(tab)) {\n tab = Object.keys(this.props.schema.items)[0];\n }\n this.state = {\n tab,\n };\n }\n\n render() {\n const items = this.props.schema.items;\n\n return <div className={this.props.classes.tabs}>\n <Tabs\n value={this.state.tab}\n onChange={(e, tab) => {\n (window._localStorage || window.localStorage).setItem((this.props.dialogName || 'App') + '.' + this.props.adapterName, tab);\n this.setState({tab});\n }}>\n {Object.keys(items).map(name => {\n let disabled;\n if (this.props.custom) {\n const hidden = this.executeCustom(items[name].hidden, this.props.data, this.props.customObj, this.props.instanceObj);\n if (hidden) {\n return null;\n }\n disabled = this.executeCustom(items[name].disabled, this.props.data, this.props.customObj, this.props.instanceObj);\n } else {\n const hidden = this.execute(items[name].hidden, false);\n if (hidden) {\n return null;\n }\n disabled = this.execute(items[name].disabled, false);\n }\n return <Tab wrapped disabled={disabled} key={name} value={name} label={this.getText(items[name].label)} />\n })}\n </Tabs>\n {<ConfigPanel\n isParentTab={true}\n key={this.state.tab}\n index={1001}\n arrayIndex={this.props.arrayIndex}\n globalData={this.props.globalData}\n onCommandRunning={this.props.onCommandRunning}\n commandRunning={this.props.commandRunning}\n className={this.props.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[this.state.tab]}\n />}\n </div>;\n }\n}\n\nConfigTabs.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 onError: PropTypes.func,\n onChange: PropTypes.func,\n customs: 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 imagePrefix: PropTypes.string,\n\n customObj: PropTypes.object,\n instanceObj: PropTypes.object,\n custom: PropTypes.bool,\n\n registerOnForceUpdate: PropTypes.func.isRequired,\n forceUpdate: PropTypes.func.isRequired,\n changeLanguage: PropTypes.func,\n systemConfig: PropTypes.object,\n alive: PropTypes.bool,\n common: PropTypes.object,\n};\n\nexport default withStyles(styles)(ConfigTabs);","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 '../../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, tempValue: { value, ts: Date.now() } });\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.tempValue || '').toString().trim()) {\n return { tempValue: { value, ts: Date.now() } };\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 (this.state.tempValue.value !== this.state.value) {\n this.updateTimeout && clearTimeout(this.updateTimeout);\n this.updateTimeout = setTimeout(() => {\n this.updateTimeout = null;\n this.setState({ value: this.state.tempValue.value });\n }, 30)\n } else if (this.updateTimeout) {\n clearTimeout(this.updateTimeout);\n this.updateTimeout = null;\n }\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 '../copy-to-clipboard';\nimport CopyIcon from '../../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 '../Icon';\nimport I18n from '../../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, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport LinearProgress from '@mui/material/LinearProgress';\n\nimport I18n from '../../i18n';\n\nimport ConfigTabs from './ConfigTabs';\nimport ConfigPanel from './ConfigPanel';\n\nconst styles = theme => ({\n root: {\n width: '100%',\n height: '100%'\n }\n});\n\nclass JsonConfigComponent extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n originalData: JSON.stringify(this.props.data),\n changed: false,\n errors: {\n\n },\n updateData: this.props.updateData,\n systemConfig: null,\n alive: false,\n commandRunning: false,\n schema: JSON.parse(JSON.stringify(this.props.schema))\n };\n\n this.forceUpdateHandlers = {};\n\n this.buildDependencies(this.state.schema);\n\n this.readData();\n }\n\n static getDerivedStateFromProps(props, state) {\n if (props.updateData !== state.updateData) {\n return {\n updateData: props.updateData,\n originalData: JSON.stringify(props.data),\n schema: JSON.parse(JSON.stringify(props.schema)),\n };\n } else {\n return null;\n }\n }\n\n static loadI18n(socket, i18n, adapterName) {\n if (i18n === true || (i18n && typeof i18n === 'string')) {\n const lang = I18n.getLanguage();\n const path = typeof i18n === 'string' ? i18n : 'i18n';\n return socket.fileExists(adapterName + '.admin', `${path}/${lang}.json`)\n .then(exists => {\n if (exists) {\n return `${path}/${lang}.json`;\n } else {\n return socket.fileExists(adapterName + '.admin', `${path}/${lang}/translations.json`)\n .then(exists =>\n exists ? `${path}/${lang}/translations.json` : '')\n }\n })\n .then(fileName => {\n if (fileName) {\n return socket.readFile(adapterName + '.admin', fileName)\n .then(json => {\n if (json.file !== undefined) {\n json = json.file;\n }\n try {\n json = JSON.parse(json);\n // apply file to I18n\n I18n.extendTranslations(json, lang);\n } catch (e) {\n console.error(`Cannot parse language file \"${adapterName}.admin/${fileName}: ${e}`);\n }\n })\n } else {\n console.warn(`Cannot find i18n for ${adapterName} / ${fileName}`);\n return Promise.resolve();\n }\n });\n } else if (i18n && typeof i18n === 'object') {\n I18n.extendTranslations(i18n);\n return Promise.resolve();\n } else {\n return Promise.resolve();\n }\n }\n\n onCommandRunning = commandRunning => this.setState( {commandRunning});\n\n readSettings() {\n if ((this.props.custom || this.props.common) && this.props.data) {\n return Promise.resolve();\n } else {\n return this.props.socket.getObject(`system.adapter.${this.props.adapterName}.${this.props.instance}`)\n .then(obj => this.setState({common: obj.common, data: this.props.data || obj.native}));\n }\n }\n\n readData() {\n this.readSettings()\n .then(() => this.props.socket.getCompactSystemConfig())\n .then(systemConfig =>\n this.props.socket.getState(`system.adapter.${this.props.adapterName}.${this.props.instance}.alive`)\n .then(state => {\n if (this.props.custom) {\n this.setState({systemConfig: systemConfig.common, alive: !!(state && state.val)});\n } else {\n this.setState({systemConfig: systemConfig.common, alive: !!(state && state.val)}, () =>\n this.props.socket.subscribeState(`system.adapter.${this.props.adapterName}.${this.props.instance}.alive`, this.onAlive));\n }\n }));\n }\n\n onAlive = (id, state) => {\n if ((state?.val || false) !== this.state.alive) {\n this.setState({alive: state?.val || false});\n }\n }\n\n onChange = (data, value, cb, saveConfig) => {\n if (this.props.onValueChange) {\n this.props.onValueChange(data, value, saveConfig);\n cb && cb();\n } else {\n if (data) {\n const state = { data };\n\n const _data = {};\n // remove all attributes starting with \"_\"\n Object.keys(data).forEach(attr => !attr.startsWith('_') && (_data[attr] = data[attr]));\n\n state.changed = JSON.stringify(_data) !== this.state.originalData;\n\n this.setState({ state }, () => {\n this.props.onChange(_data, state.changed, saveConfig);\n cb && cb();\n });\n } else if (saveConfig) {\n this.props.onChange(null, null, saveConfig);\n }\n }\n }\n\n onError = (attr, error) => {\n const errors = JSON.parse(JSON.stringify(this.state.errors));\n if (error) {\n errors[attr] = error;\n } else {\n delete errors[attr];\n }\n\n if (JSON.stringify(errors) !== JSON.parse(JSON.stringify(this.state.errors))) {\n this.setState({errors}, () =>\n this.props.onError(!!Object.keys(this.state.errors).length));\n }\n }\n\n flatten(schema, _list) {\n _list = _list || {};\n if (schema.items) {\n Object.keys(schema.items).forEach(attr => {\n _list[attr] = schema.items[attr];\n this.flatten(schema.items[attr], _list);\n });\n }\n\n return _list;\n }\n\n buildDependencies(schema) {\n const attrs = this.flatten(schema);\n Object.keys(attrs).forEach(attr => {\n if (attrs[attr].confirm?.alsoDependsOn) {\n attrs[attr].confirm?.alsoDependsOn.forEach(dep => {\n if (!attrs[dep]) {\n console.error(`[JsonConfigComponent] Attribute ${dep} does not exist!`);\n if (dep.startsWith('data.')) {\n console.warn(`[JsonConfigComponent] please use \"${dep.replace(/^data\\./, '')}\" instead of \"${dep}\"`);\n }\n } else {\n attrs[dep].confirmDependsOn = attrs[dep].confirmDependsOn || [];\n\n const depObj = {...attrs[attr], attr};\n if (depObj.confirm) {\n depObj.confirm.cancel = 'Undo';\n }\n\n attrs[dep].confirmDependsOn.push(depObj);\n }\n });\n }\n\n if (attrs[attr].onChange?.alsoDependsOn) {\n attrs[attr].onChange?.alsoDependsOn.forEach(dep => {\n if (!attrs[dep]) {\n console.error(`[JsonConfigComponent] Attribute ${dep} does not exist!`);\n if (dep.startsWith('data.')) {\n console.warn(`[JsonConfigComponent] please use \"${dep.replace(/^data\\./, '')}\" instead of \"${dep}\"`);\n }\n } else {\n attrs[dep].onChangeDependsOn = attrs[dep].onChangeDependsOn || [];\n\n const depObj = {...attrs[attr], attr};\n\n attrs[dep].onChangeDependsOn.push(depObj);\n }\n });\n }\n\n if (attrs[attr].hidden?.alsoDependsOn) {\n attrs[attr].hidden?.alsoDependsOn.forEach(dep => {\n if (!attrs[dep]) {\n console.error(`[JsonConfigComponent] Attribute ${dep} does not exist!`);\n if (dep.startsWith('data.')) {\n console.warn(`[JsonConfigComponent] please use \"${dep.replace(/^data\\./, '')}\" instead of \"${dep}\"`);\n }\n } else {\n attrs[dep].hiddenDependsOn = attrs[dep].hiddenDependsOn || [];\n\n const depObj = {...attrs[attr], attr};\n\n attrs[dep].hiddenDependsOn.push(depObj);\n }\n });\n }\n\n if (attrs[attr].label?.alsoDependsOn) {\n attrs[attr].label?.alsoDependsOn.forEach(dep => {\n if (!attrs[dep]) {\n console.error(`[JsonConfigComponent] Attribute ${dep} does not exist!`);\n if (dep.startsWith('data.')) {\n console.warn(`[JsonConfigComponent] please use \"${dep.replace(/^data\\./, '')}\" instead of \"${dep}\"`);\n }\n } else {\n attrs[dep].labelDependsOn = attrs[dep].labelDependsOn || [];\n\n const depObj = {...attrs[attr], attr};\n\n attrs[dep].labelDependsOn.push(depObj);\n }\n });\n }\n\n if (attrs[attr].help?.alsoDependsOn) {\n attrs[attr].help?.alsoDependsOn.forEach(dep => {\n if (!attrs[dep]) {\n console.error(`[JsonConfigComponent] Attribute ${dep} does not exist!`);\n if (dep.startsWith('data.')) {\n console.warn(`[JsonConfigComponent] please use \"${dep.replace(/^data\\./, '')}\" instead of \"${dep}\"`);\n }\n } else {\n attrs[dep].helpDependsOn = attrs[dep].helpDependsOn || [];\n\n const depObj = {...attrs[attr], attr};\n\n attrs[dep].helpDependsOn.push(depObj);\n }\n });\n }\n });\n }\n\n renderItem(item) {\n if (item.type === 'tabs') {\n return <ConfigTabs\n onCommandRunning={this.onCommandRunning}\n commandRunning={this.state.commandRunning}\n socket={this.props.socket}\n adapterName={this.props.adapterName}\n instance={this.props.instance}\n common={this.props.common}\n alive={this.state.alive}\n themeType={this.props.themeType}\n themeName={this.props.themeName}\n data={this.props.data}\n originalData={JSON.parse(this.state.originalData)}\n schema={item}\n systemConfig={this.state.systemConfig}\n customs={this.props.customs}\n dateFormat={this.props.dateFormat}\n isFloatComma={this.props.isFloatComma}\n multiEdit={this.props.multiEdit}\n imagePrefix={this.props.imagePrefix}\n\n custom={this.props.custom}\n customObj={this.props.customObj}\n instanceObj={this.props.instanceObj}\n\n changeLanguage={this.changeLanguage}\n forceUpdate={this.forceAttrUpdate}\n registerOnForceUpdate={this.registerOnForceUpdate}\n\n onChange={this.onChange}\n onError={(attr, error) => this.onError(attr, error)}\n />;\n } else if (item.type === 'panel' || !item.type) {\n return <ConfigPanel\n index={1000}\n isParentTab={true}\n onCommandRunning={this.onCommandRunning}\n commandRunning={this.state.commandRunning}\n socket={this.props.socket}\n adapterName={this.props.adapterName}\n instance={this.props.instance}\n common={this.props.common}\n alive={this.state.alive}\n themeType={this.props.themeType}\n themeName={this.props.themeName}\n data={this.props.data}\n originalData={JSON.parse(this.state.originalData)}\n schema={item}\n systemConfig={this.state.systemConfig}\n customs={this.props.customs}\n dateFormat={this.props.dateFormat}\n isFloatComma={this.props.isFloatComma}\n multiEdit={this.props.multiEdit}\n imagePrefix={this.props.imagePrefix}\n\n custom={this.props.custom}\n customObj={this.props.customObj}\n instanceObj={this.props.instanceObj}\n\n changeLanguage={this.changeLanguage}\n forceUpdate={this.forceAttrUpdate}\n registerOnForceUpdate={this.registerOnForceUpdate}\n\n onChange={this.onChange}\n onError={(attr, error) => this.onError(attr, error)}\n />;\n }\n }\n\n changeLanguage = () => {\n this.forceUpdate();\n }\n\n forceAttrUpdate = (attr, data) => {\n if (Array.isArray(attr)) {\n attr.forEach(a =>\n this.forceUpdateHandlers[a] && this.forceUpdateHandlers[a](data));\n } else {\n if (this.forceUpdateHandlers[attr]) {\n this.forceUpdateHandlers[attr](data);\n }\n }\n }\n\n registerOnForceUpdate = (attr, cb) => {\n if (cb) {\n this.forceUpdateHandlers[attr] = cb;\n } else if (this.forceUpdateHandlers[attr]) {\n delete this.forceUpdateHandlers[attr];\n }\n }\n\n render() {\n if (!this.state.systemConfig) {\n return <LinearProgress />;\n }\n\n return <div className={this.props.classes.root}>\n {this.renderItem(this.state.schema)}\n </div>;\n }\n}\n\nJsonConfigComponent.propTypes = {\n socket: PropTypes.object.isRequired,\n\n adapterName: PropTypes.string,\n instance: PropTypes.number,\n common: PropTypes.object,\n customs: PropTypes.object, // custom components\n\n custom: PropTypes.bool, // is the customs settings must be shown\n customObj: PropTypes.object,\n multiEdit: PropTypes.bool, // set if user edits more than one object simultaneously\n instanceObj: PropTypes.object,\n dateFormat: PropTypes.string,\n isFloatComma: PropTypes.bool,\n imagePrefix: PropTypes.string,\n\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n updateData: PropTypes.number,\n schema: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n onValueChange: PropTypes.func,\n};\n\nexport default withStyles(styles)(JsonConfigComponent);","// please do not delete React, as without it other projects could not be compiled: ReferenceError: React is not defined\nimport React from 'react';\nimport withStyles from '@mui/styles/withStyles';\nimport Fab from '@mui/material/Fab';\nimport PropTypes from 'prop-types';\n\nimport I18n from '../i18n';\n\nimport IconHelp from '@mui/icons-material/Help'\nimport IconUpload from '@mui/icons-material/VerticalAlignTop'\nimport IconDownload from '@mui/icons-material/VerticalAlignBottom'\n\nconst styles = theme => ({\n buttons: {\n marginRight: 5,\n marginTop: 5,\n float: 'right'\n },\n logo: {\n padding: 8,\n width: 64\n }\n});\n\n/**\n * @typedef {object} LogoProps\n * @property {any} common Adapter common configuration from io-package.json\n * @property {any} native Adapter native data from io-package.json\n * @property {number} instance Adapter instance number.\n * @property {(contents: any) => void} [onLoad]\n * @property {(error: string) => void} [onError]\n * @property {{ buttons: string, logo: string }} classes The styling class names.\n *\n * @extends {React.Component<LogoProps>}\n */\nclass Logo extends React.Component {\n\n static generateFile(filename, obj) {\n const el = window.document.createElement('a');\n el.setAttribute('href', 'data:application/json;charset=utf-8,' + encodeURIComponent(JSON.stringify(obj, null, 2)));\n el.setAttribute('download', filename);\n\n el.style.display = 'none';\n window.document.body.appendChild(el);\n\n el.click();\n\n window.document.body.removeChild(el);\n }\n\n handleFileSelect(evt) {\n const f = evt.target.files[0];\n if (f) {\n const r = new window.FileReader();\n r.onload = e => {\n const contents = e.target.result;\n try {\n const json = JSON.parse(contents);\n if (json.native && json.common) {\n if (json.common.name !== this.props.common.name) {\n this.props.onError && this.props.onError(I18n.t('ra_otherConfig', json.common.name));\n } else {\n this.props.onLoad && this.props.onLoad(json.native);\n }\n } else {\n this.props.onError && this.props.onError(I18n.t('ra_invalidConfig'));\n }\n } catch (e) {\n this.props.onError && this.props.onError(e.toString());\n }\n };\n r.readAsText(f);\n } else {\n alert('Failed to open JSON File');\n }\n }\n\n download() {\n const result = {\n _id: `system.adapter.${this.props.common.name}.${this.props.instance}`,\n common: JSON.parse(JSON.stringify(this.props.common)),\n native: this.props.native\n };\n // remove unimportant information\n if (result.common.news) {\n delete result.common.news;\n }\n if (result.common.titleLang) {\n delete result.common.titleLang;\n }\n if (result.common.desc) {\n delete result.common.desc;\n }\n\n //window.open('data:application/iobroker; content-disposition=attachment; filename=' + result._id + '.json,' + JSON.stringify(result, null, 2));\n Logo.generateFile(result._id + '.json', result);\n }\n\n upload() {\n const input = window.document.createElement('input');\n input.setAttribute('type', 'file');\n input.setAttribute('id', 'files');\n input.setAttribute('opacity', 0);\n input.addEventListener('change', e => this.handleFileSelect(e, () => {}), false);\n (input.click)();\n }\n\n render() {\n return <div className={this.props.className} style={this.props.style}>\n {this.props.common.icon ?\n <img src={this.props.common.icon} className={this.props.classes.logo} alt=\"logo\"/> : null}\n {this.props.common.readme ?\n <Fab\n size=\"small\"\n color=\"primary\"\n aria-label=\"Help\"\n className={this.props.classes.buttons}\n onClick={() => {\n const win = window.open(this.props.common.readme, '_blank');\n win.focus();\n }}\n ><IconHelp /></Fab> : null}\n <Fab size=\"small\" color=\"primary\" aria-label=\"Load config\" className={this.props.classes.buttons}\n title={I18n.t('ra_Load configuration from file')} onClick={() => this.upload()}><IconUpload /></Fab>\n <Fab size=\"small\" color=\"primary\" aria-label=\"Save config\" className={this.props.classes.buttons}\n title={I18n.t('ra_Save configuration to file')} onClick={() => this.download()}><IconDownload/></Fab>\n </div>;\n }\n}\n\nLogo.propTypes = {\n common: PropTypes.object.isRequired,\n className: PropTypes.string,\n style: PropTypes.object,\n native: PropTypes.object.isRequired,\n instance: PropTypes.number.isRequired,\n onError: PropTypes.func.isRequired,\n onLoad: PropTypes.func.isRequired,\n};\n\n/** @type {typeof Logo} */\nconst _export = withStyles(styles)(Logo);\nexport default _export;","/**\n * Copyright 2018-2022 bluefox <dogafox@gmail.com>\n *\n * MIT License\n *\n **/\nimport React from 'react';\nimport copy from './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 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\nexport default MDUtils;","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}","import React from 'react';\n\nimport PropTypes from 'prop-types';\nimport withStyles from '@mui/styles/withStyles';\nimport { HexColorPicker as ColorPicker } from 'react-colorful';\n\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 TableHead from '@mui/material/TableHead';\nimport TableRow from '@mui/material/TableRow';\nimport TableSortLabel from '@mui/material/TableSortLabel';\nimport IconButton from '@mui/material/IconButton';\nimport Select from '@mui/material/Select';\nimport MenuItem from '@mui/material/MenuItem';\nimport TextField from '@mui/material/TextField';\nimport Checkbox from '@mui/material/Checkbox';\nimport Dialog from '@mui/material/Dialog';\n\nimport IconEdit from '@mui/icons-material/Edit';\nimport IconDelete from '@mui/icons-material/Delete';\nimport IconExpand from '@mui/icons-material/NavigateNext';\nimport IconCollapse from '@mui/icons-material/ExpandMore';\nimport IconCheck from '@mui/icons-material/Check';\nimport IconClose from '@mui/icons-material/Close';\nimport IconAdd from '@mui/icons-material/Add';\nimport IconList from '@mui/icons-material/ViewHeadline';\nimport IconColor from '@mui/icons-material/Colorize';\n\nimport DialogSelectID from '../Dialogs/SelectID';\nimport Utils from './Utils';\n\nfunction getAttr(obj, attr, lookup) {\n if (typeof attr === 'string') {\n attr = attr.split('.');\n }\n\n if (!obj) {\n return null;\n }\n\n if (attr.length === 1) {\n if (lookup && lookup[obj[attr[0]]]) {\n return lookup[obj[attr[0]]];\n } else {\n return obj[attr[0]];\n }\n } else {\n const name = attr.shift();\n return getAttr(obj[name], attr);\n }\n}\n\nfunction setAttr(obj, attr, value) {\n if (typeof attr === 'string') {\n attr = attr.split('.');\n }\n\n if (attr.length === 1) {\n return obj[attr[0]] = value;\n } else {\n const name = attr.shift();\n if (obj[name] === null || obj[name] === undefined) {\n obj[name] = {};\n }\n return setAttr(obj[name], attr, value);\n }\n}\n\nconst styles = theme => ({\n tableContainer: {\n width: '100%',\n height: '100%',\n overflow: 'auto'\n },\n table: {\n width: '100%',\n minWidth: 800,\n maxWidth: 1920,\n },\n cell: {\n paddingTop: 0,\n paddingBottom: 0,\n paddingLeft: 4,\n paddingRight: 4,\n },\n rowMainWithChildren: {\n\n },\n rowMainWithoutChildren: {\n\n },\n rowNoEdit: {\n opacity: 0.3\n },\n cellExpand: {\n width: 30,\n },\n cellButton: {\n width: 30,\n },\n cellHeader: {\n fontWeight: 'bold',\n background: theme.palette.mode === 'dark' ? '#888' : '#888',\n color: theme.palette.mode === 'dark' ? '#EEE' : '#111',\n height: 48,\n wordBreak: 'break-word',\n whiteSpace: 'pre',\n },\n width_name_nicknames: {\n maxWidth: 150,\n },\n width_ioType: {\n maxWidth: 100,\n },\n width_type: {\n maxWidth: 100,\n },\n width_displayTraits: {\n maxWidth: 100,\n },\n width_roomHint: {\n maxWidth: 100,\n },\n rowSecondary: {\n fontStyle: 'italic',\n },\n cellSecondary: {\n fontSize: 10,\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 fieldEditWithButton: {\n width: `calc(100% - 33px)`,\n display: 'inline-block',\n },\n fieldEdit: {\n width: `100%`,\n display: 'inline-block',\n lineHeight: '50px',\n verticalAlign: 'middle',\n },\n fieldButton: {\n width: 30,\n display: 'inline-block',\n },\n colorDialog: {\n overflow: 'hidden',\n padding: 15,\n },\n subText: {\n fontSize: 10,\n fontStyle: 'italic',\n },\n glow: {\n animation: 'glow 0.2s 2 alternate'\n }\n});\n\nfunction descendingComparator(a, b, orderBy, lookup) {\n const _a = getAttr(a, orderBy, lookup) || '';\n const _b = getAttr(b, orderBy, lookup) || '';\n\n if (_b < _a) {\n return -1;\n } else\n if (_b > _a) {\n return 1;\n } else {\n return 0;\n }\n}\n\nfunction getComparator(order, orderBy, lookup) {\n return order === 'desc'\n ? (a, b) => descendingComparator(a, b, orderBy, lookup)\n : (a, b) => -descendingComparator(a, b, orderBy, lookup);\n}\n\nfunction stableSort(array, comparator) {\n const stabilizedThis = array.map((el, index) => [el, index]);\n\n stabilizedThis.sort((a, b) => {\n const order = comparator(a[0], b[0]);\n if (order) {\n return order;\n } else {\n return a[1] - b[1];\n }\n });\n\n return stabilizedThis.map(el => el[0]);\n}\n\nclass TreeTable extends React.Component {\n constructor(props) {\n super(props);\n\n let opened = (window._localStorage || window.localStorage).getItem(this.props.name || 'iob-table') || '[]';\n try {\n opened = JSON.parse(opened) || [];\n } catch (e) {\n opened = [];\n }\n if (!Array.isArray(opened)) {\n opened = [];\n }\n\n this.state = {\n opened,\n editMode: false,\n deleteMode: false,\n editData: null,\n order: 'asc',\n update: null,\n orderBy: this.props.columns[0].field,\n useTable: false,\n showSelectColor: false,\n glowOnChange: props.glowOnChange,\n };\n }\n\n static getDerivedStateFromProps(props, state) {\n if (props.glowOnChange) {\n const update = [];\n let count = 0;\n if (props.data && state.data) {\n props.data.forEach(line => {\n count++;\n const oldLine = state.data.find(it => it.id === line.id);\n if (oldLine) {\n if (JSON.stringify(oldLine) !== JSON.stringify(line)) {\n update.push(line.id);\n }\n } else {\n update.push(line.id);\n }\n });\n }\n\n if (update.length && update.length !== count) {\n return {data: props.data, update};\n } else {\n return {data: props.data};\n }\n } else {\n return {data: props.data};\n }\n }\n\n renderCellEdit(item, col) {\n let val = getAttr(item, col.field);\n if (Array.isArray(val)) {\n val = val[0];\n }\n\n if (col.lookup) {\n return this.renderCellEditSelect(item, col, val);\n } if (col.editComponent) {\n return this.renderCellEditCustom(item, col, val);\n } else {\n if (col.type === 'boolean' || (!col.type && typeof val === 'boolean')) {\n return this.renderCellEditBoolean(item, col, val);\n } else if (col.type === 'color') {\n return this.renderCellEditColor(item, col, val);\n } else if (col.type === 'oid') {\n return this.renderCellEditObjectID(item, col, val);\n } else {\n return this.renderCellEditString(item, col, val);\n }\n }\n }\n\n renderCellEditSelect(item, col, val) {\n return <Select\n variant=\"standard\"\n onChange={e => {\n const editData = this.state.editData ? {...this.state.editData} : {};\n if (e.target.value === val) {\n delete editData[col.field];\n } else {\n editData[col.field] = e.target.value;\n }\n this.setState({editData});\n }}\n value={(this.state.editData && this.state.editData[col.field]) || val}\n >\n {Object.keys(col.lookup).map(v => <MenuItem value={v}>{col.lookup[v]}</MenuItem>)}\n </Select>;\n }\n\n renderCellEditString(item, col, val) {\n return <TextField\n variant=\"standard\"\n className={this.props.classes.fieldEdit}\n fullWidth\n value={this.state.editData && this.state.editData[col.field] !== undefined ? this.state.editData[col.field] : val}\n onChange={e => {\n const editData = this.state.editData ? {...this.state.editData} : {};\n if (e.target.value === val) {\n delete editData[col.field];\n } else {\n editData[col.field] = e.target.value;\n }\n this.setState({editData});\n }}\n />;\n }\n\n renderCellEditCustom(item, col, val) {\n const EditComponent = col.editComponent;\n\n // use new value if exists\n if (this.state.editData && this.state.editData[col.field] !== undefined) {\n val = this.state.editData[col.field];\n item = JSON.parse(JSON.stringify(item));\n item[col.field] = val;\n }\n\n return <EditComponent\n value={val}\n rowData={item}\n onChange={newVal => {\n const editData = this.state.editData ? {...this.state.editData} : {};\n if (newVal === val) {\n delete editData[col.field];\n } else {\n editData[col.field] = newVal;\n }\n this.setState({editData});\n }}\n />;\n }\n\n renderCellEditBoolean(item, col, val) {\n return <Checkbox\n checked={this.state.editData && this.state.editData[col.field] !== undefined ? !!this.state.editData[col.field] : !!val}\n onChange={e => {\n const editData = this.state.editData ? {...this.state.editData} : {};\n if (e.target.checked === !!val) {\n delete editData[col.field];\n } else {\n editData[col.field] = e.target.checked;\n }\n this.setState({editData});\n }}\n inputProps={{ 'aria-label': 'checkbox' }}\n />;\n }\n\n renderSelectColorDialog() {\n return <Dialog\n classes={{root: this.props.classes.colorDialog, paper: this.props.classes.colorDialog}}\n onClose={() => {\n this.selectCallback = null;\n this.setState({showSelectColor: false});\n }}\n open={this.state.showSelectColor}>\n <ColorPicker\n color={this.state.selectIdValue}\n onChange={color => {\n this.setState({selectIdValue: color}, () =>\n this.selectCallback && this.selectCallback(color));\n }}\n />\n </Dialog>;\n }\n\n renderCellEditColor(item, col, val) {\n const _val = this.state.editData && this.state.editData[col.field] !== undefined ? this.state.editData[col.field] : val;\n return <div className={this.props.classes.fieldEdit}>\n <TextField\n variant=\"standard\"\n fullWidth\n className={this.props.classes.fieldEditWithButton}\n value={_val}\n inputProps={{style: {backgroundColor: _val, color: Utils.isUseBright(_val, null) ? '#FFF' : '#000'}}}\n onChange={e => {\n const editData = this.state.editData ? {...this.state.editData} : {};\n if (e.target.value === val) {\n delete editData[col.field];\n } else {\n editData[col.field] = e.target.value;\n }\n this.setState({editData});\n }}\n />\n\n <IconButton\n className={this.props.classes.fieldButton}\n contained\n onClick={() => {\n this.selectCallback = newColor => {\n const editData = this.state.editData ? {...this.state.editData} : {};\n if (newColor === val) {\n delete editData[col.field];\n } else {\n editData[col.field] = newColor;\n }\n this.setState({editData});\n };\n\n this.setState({showSelectColor: true, selectIdValue: val});\n }}\n size=\"large\"><IconColor/></IconButton>\n </div>;\n }\n\n renderSelectIdDialog() {\n if (this.state.showSelectId) {\n return <DialogSelectID\n key=\"tableSelect\"\n imagePrefix=\"../..\"\n dialogName={this.props.adapterName}\n themeType={this.props.themeType}\n socket={this.props.socket}\n statesOnly={true}\n selected={this.state.selectIdValue}\n onClose={() => this.setState({showSelectId: false})}\n onOk={(selected, name) => {\n this.setState({showSelectId: false, selectIdValue: null});\n this.selectCallback && this.selectCallback(selected);\n this.selectCallback = null;\n }}\n />;\n } else {\n return null;\n }\n }\n\n renderCellEditObjectID(item, col, val) {\n return <div className={this.props.classes.fieldEdit}>\n <TextField\n variant=\"standard\"\n fullWidth\n className={this.props.classes.fieldEditWithButton}\n value={this.state.editData && this.state.editData[col.field] !== undefined ? this.state.editData[col.field] : val}\n onChange={e => {\n const editData = this.state.editData ? {...this.state.editData} : {};\n if (e.target.value === val) {\n delete editData[col.field];\n } else {\n editData[col.field] = e.target.value;\n }\n this.setState({editData});\n }}\n />\n\n <IconButton\n className={this.props.classes.fieldButton}\n contained\n onClick={() => {\n this.selectCallback = selected => {\n const editData = this.state.editData ? {...this.state.editData} : {};\n if (selected === val) {\n delete editData[col.field];\n } else {\n editData[col.field] = selected;\n }\n this.setState({editData});\n };\n\n this.setState({showSelectId: true, selectIdValue: val});\n }}\n size=\"large\"\n ><IconList/></IconButton>\n </div>;\n }\n\n renderCellNonEdit(item, col) {\n let val = getAttr(item, col.field, col.lookup);\n if (Array.isArray(val)) {\n val = val[0];\n }\n\n if (col.type === 'boolean') {\n return <Checkbox\n checked={!!val}\n disabled={true}\n inputProps={{ 'aria-label': 'checkbox' }}\n />\n } else {\n return val;\n }\n }\n\n renderCell(item, col, level, i) {\n if (this.state.editMode === i && col.editable !== 'never' && col.editable !== false) {\n return <TableCell\n key={col.field}\n className={Utils.clsx(this.props.classes.cell, level && this.props.classes.cellSecondary)}\n style={col.cellStyle}\n component=\"th\"\n >\n {this.renderCellEdit(item, col)}\n </TableCell>;\n } else {\n return <TableCell\n key={col.field}\n className={Utils.clsx(this.props.classes.cell, level && this.props.classes.cellSecondary)}\n style={col.cellStyle}\n component=\"th\" >\n {this.renderCellNonEdit(item, col)}\n </TableCell>;\n }\n }\n\n renderCellWithSubField(item, col) {\n const main = getAttr(item, col.field, col.lookup);\n const sub = getAttr(item, col.subField, col.subLookup);\n return <div>\n <div className={this.props.classes.mainText}>{main}</div>\n <div className={this.props.classes.subText} style={col.subStyle || {}}>{sub}</div>\n </div>;\n }\n\n renderLine(item, level) {\n const levelShift = this.props.levelShift === undefined ? 24 : this.props.levelShift;\n\n level = level || 0;\n const i = this.props.data.indexOf(item);\n if (!item) {\n return null;\n }\n if (!level && item.parentId) {\n return null;\n } else if (level && !item.parentId) {\n return null; // should never happen\n } else {\n // try to find children\n const opened = this.state.opened.includes(item.id);\n const children = this.props.data.filter(it => it.parentId === item.id);\n\n return [\n <TableRow\n key={item.id}\n className={Utils.clsx(\n 'table-row-' + (item.id || '').toString().replace(/[.$]/g, '_'),\n this.state.update && this.state.update.includes(item.id) && this.props.classes.glow,\n this.props.classes.row,\n level && this.props.classes.rowSecondary,\n !level && children.length && this.props.classes.rowMainWithChildren,\n !level && !children.length && this.props.classes.rowMainWithoutChildren,\n this.state.editMode !== false && this.state.editMode !== i && this.props.classes.rowNoEdit,\n this.state.deleteMode !== false && this.state.deleteMode !== i && this.props.classes.rowNoEdit,\n )}\n >\n <TableCell className={Utils.clsx(this.props.classes.cell, this.props.classes.cellExpand, level && this.props.classes.cellSecondary)}>\n {children.length ? <IconButton\n onClick={() => {\n const opened = [...this.state.opened];\n const pos = opened.indexOf(item.id);\n if (pos === -1) {\n opened.push(item.id);\n opened.sort();\n } else {\n opened.splice(pos, 1);\n }\n\n (window._localStorage || window.localStorage).setItem(this.props.name || 'iob-table', JSON.stringify(opened));\n\n this.setState({opened});\n }}\n size=\"small\">\n {opened ? <IconCollapse/> : <IconExpand/>}\n </IconButton> : null}\n </TableCell>\n <TableCell\n scope=\"row\"\n className={Utils.clsx(this.props.classes.cell, level && this.props.classes.cellSecondary)}\n style={Object.assign({}, this.props.columns[0].cellStyle, {paddingLeft: levelShift * level})}\n >\n {this.props.columns[0].subField ?\n this.renderCellWithSubField(item, this.props.columns[0])\n :\n getAttr(item, this.props.columns[0].field, this.props.columns[0].lookup)\n }\n </TableCell>\n\n {this.props.columns.map((col, ii) =>\n !ii && !col.hidden ? null : this.renderCell(item, col, level, i))}\n\n {this.props.onUpdate ? <TableCell className={Utils.clsx(this.props.classes.cell, this.props.classes.cellButton)}>\n {this.state.editMode === i || this.state.deleteMode === i ?\n <IconButton\n disabled={this.state.editMode !== false && (!this.state.editData || !Object.keys(this.state.editData).length)}\n onClick={() => {\n if (this.state.editMode !== false) {\n const newData = JSON.parse(JSON.stringify(item));\n Object.keys(this.state.editData).forEach(attr => setAttr(newData, attr, this.state.editData[attr]));\n this.setState({editMode: false}, () => this.props.onUpdate(newData, item))\n } else {\n this.setState({deleteMode: false}, () => this.props.onDelete(item))\n }\n }}\n size=\"large\">\n <IconCheck/>\n </IconButton>\n :\n <IconButton\n disabled={this.state.editMode !== false}\n onClick={() => this.setState({editMode: i, editData: null})}\n size=\"large\">\n <IconEdit/>\n </IconButton>}\n </TableCell> : null}\n {this.props.onUpdate || this.props.onDelete ? <TableCell className={Utils.clsx(this.props.classes.cell, this.props.classes.cellButton)}>\n {this.state.editMode === i || this.state.deleteMode === i ?\n <IconButton\n onClick={() => this.setState({editMode: false, deleteMode: false})}\n size=\"large\">\n <IconClose/>\n </IconButton>\n :\n (this.props.onDelete ? <IconButton\n disabled={this.state.deleteMode !== false}\n onClick={() => this.setState({deleteMode: i})}\n size=\"large\">\n <IconDelete/>\n </IconButton> : null)\n }\n </TableCell> : null}\n </TableRow>,\n !level && opened ? children.map(item => this.renderLine(item, level + 1)) : null,\n ];\n }\n }\n\n handleRequestSort(property) {\n const isAsc = this.state.orderBy === property && this.state.order === 'asc';\n this.setState({order: isAsc ? 'desc' : 'asc', orderBy: property});\n }\n\n renderHead() {\n return <TableHead>\n <TableRow key=\"headerRow\">\n <TableCell\n component=\"th\"\n className={Utils.clsx(this.props.classes.cell, this.props.classes.cellHeader, this.props.classes.cellExpand)}\n />\n <TableCell\n component=\"th\"\n className={Utils.clsx(this.props.classes.cell, this.props.classes.cellHeader, this.props.classes['width_' + this.props.columns[0].field.replace(/\\./g, '_')])}\n style={this.props.columns[0].headerStyle || this.props.columns[0].cellStyle}\n sortDirection={this.props.noSort ? false : (this.state.orderBy === this.props.columns[0].field ? this.state.order : false)}\n >\n {this.props.noSort ? null : <TableSortLabel\n active={this.state.orderBy === this.props.columns[0].field}\n direction={this.state.orderBy === this.props.columns[0].field ? this.state.order : 'asc'}\n onClick={() => this.handleRequestSort(this.props.columns[0].field)}\n >\n {this.props.columns[0].title || this.props.columns[0].field}\n {this.state.orderBy === this.props.columns[0].field ?\n <span className={this.props.classes.visuallyHidden}>\n {this.state.order === 'desc' ? 'sorted descending' : 'sorted ascending'}\n </span> : null}\n </TableSortLabel>}\n </TableCell>\n {this.props.columns.map((col, i) =>\n !i && !col.hidden ? null : <TableCell\n key={col.field}\n className={Utils.clsx(this.props.classes.cell, this.props.classes.cellHeader, this.props.classes['width_' + col.field.replace(/\\./g, '_')])}\n style={col.headerStyle || col.cellStyle}\n component=\"th\"\n >\n {this.props.noSort ? null : <TableSortLabel\n active={this.state.orderBy === col.field}\n direction={this.state.orderBy === col.field ? this.state.order : 'asc'}\n onClick={() => this.handleRequestSort(col.field)}\n >\n {col.title || col.field}\n {this.state.orderBy === col.field ?\n <span className={this.props.classes.visuallyHidden}>\n {this.state.order === 'desc' ? 'sorted descending' : 'sorted ascending'}\n </span> : null}\n </TableSortLabel> }\n </TableCell>)}\n {this.props.onUpdate ? <TableCell component=\"th\" className={Utils.clsx(this.props.classes.cell, this.props.classes.cellHeader, this.props.classes.cellButton)}>\n {!this.props.noAdd ? <Fab\n color=\"primary\"\n size=\"small\"\n disabled={this.state.editMode !== false}\n onClick={() => this.props.onUpdate(true)}>\n <IconAdd/>\n </Fab>: null }\n </TableCell> : null}\n {this.props.onDelete || this.props.onUpdate ? <TableCell component=\"th\" className={Utils.clsx(this.props.classes.cell, this.props.classes.cellHeader, this.props.classes.cellButton)}/> : null}\n </TableRow>\n </TableHead>;\n }\n\n render() {\n const lookup = this.props.columns.find(col => col.field === this.state.orderBy).lookup;\n const table = stableSort(this.props.data, getComparator(this.state.order, this.state.orderBy, lookup));\n\n if (this.state.update && this.state.update.length) {\n this.updateTimeout && clearTimeout(this.updateTimeout);\n this.updateTimeout = setTimeout(() => {\n this.updateTimeout = null;\n this.setState({update: null});\n }, 500);\n }\n\n return <div className={Utils.clsx(this.props.classes.tableContainer, this.props.className)}>\n <Table className={this.props.classes.table} aria-label=\"simple table\" size=\"small\" stickyHeader={true}>\n {this.renderHead()}\n <TableBody>\n {table.map(item => this.renderLine(item))}\n </TableBody>\n </Table>\n {this.renderSelectIdDialog()}\n {this.renderSelectColorDialog()}\n </div>;\n }\n}\n/*\nconst columns = [\n {\n title: 'Name of field', // required, else it will be \"field\"\n field: 'fieldIdInData', // required\n editable: false, // or true [default - true]\n cellStyle: { // CSS style - // optional\n maxWidth: '12rem',\n overflow: 'hidden',\n wordBreak: 'break-word'\n },\n lookup: { // optional => edit will be automatically \"SELECT\"\n 'value1': 'text1',\n 'value2': 'text2',\n }\n },\n {\n title: 'Type', // required, else it will be \"field\"\n field: 'myType', // required\n editable: true, // or true [default - true]\n lookup: { // optional => edit will be automatically \"SELECT\"\n 'number': 'Number',\n 'string': 'String',\n 'boolean': 'Boolean',\n },\n type: 'number/string/color/oid/icon/boolean', // oid=ObjectID,icon=base64-icon\n editComponent: props =>\n <div>Prefix&#123; <br/>\n <textarea\n rows={4}\n style={{width: '100%', resize: 'vertical'}}\n value={props.value}\n onChange={e => props.onChange(e.target.value)}\n />\n Suffix\n </div>,\n },\n];\n*/\n/* const data = [\n {\n id: 'UniqueID1' // required\n fieldIdInData: 'Name1',\n myType: 'number',\n },\n {\n id: 'UniqueID2' // required\n fieldIdInData: 'Name12',\n myType: 'string',\n },\n];\n */\n\n/*\n// STYLES\nconst styles = theme => ({\n tableDiv: {\n width: '100%',\n overflow: 'hidden',\n height: 'calc(100% - 48px)',\n },\n});\n// renderTable\nrenderTable() {\n return <div className={this.props.classes.tableDiv}>\n <TreeTable\n columns={this.columns}\n data={lines}\n onUpdate={(newData, oldData) => console.log('Update: ' + JSON.stringify(newData))}\n onDelete={oldData => console.log('Delete: ' + JSON.stringify(oldData))}\n />\n </div>;\n}\n */\n\nTreeTable.propTypes = {\n data: PropTypes.array.isRequired,\n className: PropTypes.string,\n loading: PropTypes.bool,\n name: PropTypes.string, // name of table to save settings in localStorage\n columns: PropTypes.arrayOf(\n PropTypes.shape({\n cellStyle: PropTypes.object,\n editComponent: PropTypes.func,\n field: PropTypes.string,\n headerStyle: PropTypes.object,\n hidden: PropTypes.bool,\n lookup: PropTypes.object,\n editable: PropTypes.bool,\n title: PropTypes.string,\n type: PropTypes.oneOf([\n 'string',\n 'boolean',\n 'numeric',\n 'icon', // todo: not yet implemented\n 'oid',\n 'color',\n ]),\n })\n ).isRequired,\n noSort: PropTypes.bool,\n onUpdate: PropTypes.func,\n onDelete: PropTypes.func,\n noAdd: PropTypes.bool, // hide add button\n themeType: PropTypes.string,\n glowOnChange: PropTypes.bool,\n socket: PropTypes.object, // only if oid type is used\n levelShift: PropTypes.number, // Shift in pixels for every level\n};\n\nexport default withStyles(styles)(TreeTable);","/**\n * Copyright 2020-2022, bluefox <dogafox@gmail.com>\n *\n * MIT License\n *\n **/\nimport PropTypes from 'prop-types';\n\n/** Possible progress states. */\nexport const PROGRESS = {\n /** The socket is connecting. */\n CONNECTING: 0,\n /** The socket is successfully connected. */\n CONNECTED: 1,\n /** All objects are loaded. */\n OBJECTS_LOADED: 2,\n /** The socket is ready for use. */\n READY: 3\n};\n\nconst PERMISSION_ERROR = 'permissionError';\nconst NOT_CONNECTED = 'notConnectedError';\nconst TIMEOUT_FOR_ADMIN4 = 1300;\n\nexport const ERRORS = {\n PERMISSION_ERROR,\n NOT_CONNECTED\n};\n\nfunction 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.debug(`Please add to \"${obj._id.replace(/\\.\\d+$/, '')}\" common.adminUI=${JSON.stringify(obj.common.adminUI)}`);\n }\n return obj;\n}\n\nclass Connection {\n /**\n * @param {import('./types').ConnectionProps} props\n */\n constructor(props) {\n props = props || { protocol: window.location.protocol, host: window.location.hostname };\n this.props = props;\n\n this.autoSubscribes = this.props.autoSubscribes || [];\n this.autoSubscribeLog = this.props.autoSubscribeLog;\n\n this.props.protocol = this.props.protocol || window.location.protocol;\n this.props.host = this.props.host || window.location.hostname;\n this.props.port = this.props.port || (window.location.port === '3000' ? (Connection.isWeb() ? 8082 : 8081) : window.location.port);\n this.props.ioTimeout = Math.max(this.props.ioTimeout || 20000, 20000);\n this.props.cmdTimeout = Math.max(this.props.cmdTimeout || 5000, 5000);\n\n // breaking change. Do not load all objects by default is true\n this.doNotLoadAllObjects = this.props.doNotLoadAllObjects === undefined ? true : this.props.doNotLoadAllObjects;\n this.doNotLoadACL = this.props.doNotLoadACL === undefined ? true : this.props.doNotLoadACL;\n\n /** @type {Record<string, ioBroker.State>} */\n this.states = {};\n this.objects = null;\n this.acl = null;\n this.firstConnect = true;\n this.waitForRestart = false;\n /** @type {ioBroker.Languages} */\n this.systemLang = 'en';\n this.connected = false;\n this._waitForFirstConnection = new Promise(resolve => { this._waitForFirstConnectionResolve = resolve });\n\n /** @type {Record<string, { reg: RegExp; cbs: ioBroker.StateChangeHandler[]}>} */\n this.statesSubscribes = {}; // subscribe for states\n\n /** @type {Record<string, { reg: RegExp; cbs: import('./types').ObjectChangeHandler[]}>} */\n this.objectsSubscribes = {}; // subscribe for objects\n this.onProgress = this.props.onProgress || function () { };\n this.onError = this.props.onError || function (err) { console.error(err); };\n this.loaded = false;\n this.loadTimer = null;\n this.loadCounter = 0;\n this.admin5only = this.props.admin5only || false;\n\n /** @type {((connected: boolean) => void)[]} */\n this.onConnectionHandlers = [];\n /** @type {((message: string) => void)[]} */\n this.onLogHandlers = [];\n\n /** @type {Record<string, Promise<any>>} */\n this._promises = {};\n\n this.log.error = text => this.log(text, 'error');\n this.log.warn = text => this.log(text, 'warn');\n this.log.info = text => this.log(text, 'info');\n this.log.debug = text => this.log(text, 'debug');\n this.log.silly = text => this.log(text, 'silly');\n\n this.startSocket();\n }\n\n /**\n * Checks if this connection is running in a web adapter and not in an admin.\n * @returns {boolean} True if running in a web adapter or in a socketio adapter.\n */\n static isWeb() {\n return window.adapterName === 'material' ||\n window.adapterName === 'vis' ||\n window.adapterName === 'echarts-show' ||\n window.socketUrl !== undefined;\n }\n\n /**\n * Starts the socket.io connection.\n * @returns {void}\n */\n startSocket() {\n // if socket io is not yet loaded\n if (typeof window.io === 'undefined') {\n // if in index.html the onLoad function not defined\n if (typeof window.registerSocketOnLoad !== 'function') {\n // poll if loaded\n this.scriptLoadCounter = this.scriptLoadCounter || 0;\n this.scriptLoadCounter++;\n\n if (this.scriptLoadCounter < 30) {\n // wait till the script loaded\n setTimeout(() => this.startSocket(), 100);\n return;\n } else {\n window.alert('Cannot load socket.io.js!');\n }\n } else {\n // register on load\n window.registerSocketOnLoad(() => this.startSocket());\n }\n return;\n } else {\n // socket was initialized, do not repeat\n if (this._socket) {\n return;\n }\n }\n\n let host = this.props.host;\n let port = this.props.port;\n let protocol = this.props.protocol.replace(':', '');\n let path = window.location.pathname;\n\n if (\n window.location.hostname === 'iobroker.net' ||\n window.location.hostname === 'iobroker.pro'\n ) {\n path = '';\n } else {\n // if web adapter, socket io could be on other port or even host\n if (window.socketUrl) {\n let parts = window.socketUrl.split(':');\n host = parts[0] || host;\n port = parts[1] || port;\n if (host.includes('://')) {\n parts = host.split('://');\n protocol = parts[0];\n host = parts[1];\n }\n }\n // get current path\n const pos = path.lastIndexOf('/');\n if (pos !== -1) {\n path = path.substring(0, pos + 1);\n }\n\n if (Connection.isWeb()) {\n // remove one level, like echarts, vis, .... We have here: '/echarts/'\n const parts = path.split('/');\n if (parts.length > 2) {\n parts.pop();\n parts.pop();\n path = parts.join('/');\n if (!path.endsWith('/')) {\n path += '/';\n }\n }\n }\n }\n\n const url = port ? `${protocol}://${host}:${port}${path}` : `${protocol}://${host}${path}`;\n\n this._socket = window.io.connect(\n url,\n {\n path: path.endsWith('/') ? path + 'socket.io' : path + '/socket.io',\n query: 'ws=true',\n name: this.props.name,\n timeout: this.props.ioTimeout\n }\n );\n\n this._socket.on('connect', noTimeout => {\n // If the user is not admin it takes some time to install the handlers, because all rights must be checked\n if (noTimeout !== true) {\n setTimeout(() =>\n this.getVersion()\n .then(info => {\n const [major, minor, patch] = info.version.split('.');\n const v = parseInt(major, 10) * 10000 + parseInt(minor, 10) * 100 + parseInt(patch, 10);\n if (v < 40102) {\n this._authTimer = null;\n // possible this is old version of admin\n this.onPreConnect(false, false);\n } else {\n this._socket.emit('authenticate', (isOk, isSecure) => this.onPreConnect(isOk, isSecure));\n }\n }), 500);\n } else {\n // iobroker websocket waits, till all handlers are installed\n this._socket.emit('authenticate', (isOk, isSecure) => this.onPreConnect(isOk, isSecure));\n }\n });\n\n this._socket.on('reconnect', () => {\n this.onProgress(PROGRESS.READY);\n this.connected = true;\n\n if (this.waitForRestart) {\n window.location.reload(false);\n } else {\n this._subscribe(true);\n this.onConnectionHandlers.forEach(cb => cb(true));\n }\n });\n\n this._socket.on('disconnect', () => {\n this.connected = false;\n this.subscribed = false;\n this.onProgress(PROGRESS.CONNECTING);\n this.onConnectionHandlers.forEach(cb => cb(false));\n });\n\n this._socket.on('reauthenticate', () =>\n this.authenticate());\n\n this._socket.on('log', message => {\n this.props.onLog && this.props.onLog(message);\n this.onLogHandlers.forEach(cb => cb(message));\n });\n\n this._socket.on('error', err => {\n let _err = err || '';\n if (typeof _err.toString !== 'function') {\n _err = JSON.stringify(_err);\n console.error(`Received strange error: ${_err}`);\n }\n _err = _err.toString();\n if (_err.includes('User not authorized')) {\n this.authenticate();\n } else {\n window.alert(`Socket Error: ${err}`);\n }\n });\n\n this._socket.on('connect_error', err =>\n console.error(`Connect error: ${err}`));\n\n this._socket.on('permissionError', err =>\n this.onError({ message: 'no permission', operation: err.operation, type: err.type, id: (err.id || '') }));\n\n this._socket.on('objectChange', (id, obj) =>\n setTimeout(() => this.objectChange(id, obj), 0));\n\n this._socket.on('stateChange', (id, state) =>\n setTimeout(() => this.stateChange(id, state), 0));\n\n this._socket.on('cmdStdout', (id, text) =>\n this.onCmdStdoutHandler && this.onCmdStdoutHandler(id, text));\n\n this._socket.on('cmdStderr', (id, text) =>\n this.onCmdStderrHandler && this.onCmdStderrHandler(id, text));\n\n this._socket.on('cmdExit', (id, exitCode) =>\n this.onCmdExitHandler && this.onCmdExitHandler(id, exitCode));\n }\n\n /**\n * Called internally.\n * @private\n * @param {boolean} isOk\n * @param {boolean} isSecure\n */\n onPreConnect(isOk, isSecure) {\n if (this._authTimer) {\n clearTimeout(this._authTimer);\n this._authTimer = null;\n }\n\n this.connected = true;\n this.isSecure = isSecure;\n\n if (this.waitForRestart) {\n window.location.reload(false);\n } else {\n if (this.firstConnect) {\n // retry strategy\n this.loadTimer = setTimeout(() => {\n this.loadTimer = null;\n this.loadCounter++;\n if (this.loadCounter < 10) {\n this.onConnect();\n }\n }, 1000);\n\n if (!this.loaded) {\n this.onConnect();\n }\n } else {\n this.onProgress(PROGRESS.READY);\n }\n\n this._subscribe(true);\n this.onConnectionHandlers.forEach(cb => cb(true));\n }\n\n if (this._waitForFirstConnectionResolve) {\n this._waitForFirstConnectionResolve();\n this._waitForFirstConnectionResolve = null;\n }\n }\n\n /**\n * Checks if the socket is connected.\n * @returns {boolean} true if connected.\n */\n isConnected() {\n return this.connected;\n }\n\n /**\n * Checks if the socket is connected.\n * @returns {Promise<void>} Promise resolves if once connected.\n */\n waitForFirstConnection() {\n return this._waitForFirstConnection;\n }\n\n /**\n * Called internally.\n * @private\n */\n _getUserPermissions(cb) {\n if (this.doNotLoadACL) {\n return cb && cb();\n } else {\n this._socket.emit('getUserPermissions', cb);\n }\n }\n\n /**\n * Called internally.\n * @private\n */\n onConnect() {\n this._getUserPermissions((err, acl) => {\n if (err) {\n return this.onError('Cannot read user permissions: ' + err);\n } else\n if (!this.doNotLoadACL) {\n if (this.loaded) {\n return;\n }\n this.loaded = true;\n clearTimeout(this.loadTimer);\n this.loadTimer = null;\n\n this.onProgress(PROGRESS.CONNECTED);\n this.firstConnect = false;\n\n this.acl = acl;\n }\n\n // Read system configuration\n return (this.admin5only && !window.vendorPrefix ? this.getCompactSystemConfig() : this.getSystemConfig())\n .then(data => {\n if (this.doNotLoadACL) {\n if (this.loaded) {\n return undefined;\n }\n this.loaded = true;\n clearTimeout(this.loadTimer);\n this.loadTimer = null;\n\n this.onProgress(PROGRESS.CONNECTED);\n this.firstConnect = false;\n }\n\n this.systemConfig = data;\n if (this.systemConfig && this.systemConfig.common) {\n this.systemLang = this.systemConfig.common.language;\n } else {\n this.systemLang = window.navigator.userLanguage || window.navigator.language;\n\n if (this.systemLang !== 'en' && this.systemLang !== 'de' && this.systemLang !== 'ru') {\n this.systemConfig.common.language = 'en';\n this.systemLang = 'en';\n }\n }\n\n this.props.onLanguage && this.props.onLanguage(this.systemLang);\n\n if (!this.doNotLoadAllObjects) {\n return this.getObjects()\n .then(() => {\n this.onProgress(PROGRESS.READY);\n this.props.onReady && this.props.onReady(this.objects);\n });\n } else {\n this.objects = this.admin5only ? {} : { 'system.config': data };\n this.onProgress(PROGRESS.READY);\n this.props.onReady && this.props.onReady(this.objects);\n }\n return undefined;\n })\n .catch(e => this.onError('Cannot read system config: ' + e));\n });\n }\n\n /**\n * Called internally.\n * @private\n */\n authenticate() {\n if (window.location.search.includes('&href=')) {\n window.location = `${window.location.protocol}//${window.location.host}${window.location.pathname}${window.location.search}${window.location.hash}`;\n } else {\n window.location = `${window.location.protocol}//${window.location.host}${window.location.pathname}?login&href=${window.location.search}${window.location.hash}`;\n }\n }\n\n /**\n * Subscribe to changes of the given state.\n * @param {string} id The ioBroker state ID.\n * @param {ioBroker.StateChangeHandler} cb The callback.\n */\n /**\n * Subscribe to changes of the given state.\n * @param {string} id The ioBroker state ID.\n * @param {boolean} binary Set to true if the given state is binary and requires Base64 decoding.\n * @param {ioBroker.StateChangeHandler} cb The callback.\n */\n subscribeState(id, binary, cb) {\n if (typeof binary === 'function') {\n cb = binary;\n binary = false;\n }\n\n if (!this.statesSubscribes[id]) {\n let reg = id\n .replace(/\\./g, '\\\\.')\n .replace(/\\*/g, '.*')\n .replace(/\\(/g, '\\\\(')\n .replace(/\\)/g, '\\\\)')\n .replace(/\\+/g, '\\\\+')\n .replace(/\\[/g, '\\\\[');\n\n if (reg.indexOf('*') === -1) {\n reg += '$';\n }\n this.statesSubscribes[id] = { reg: new RegExp(reg), cbs: [] };\n this.statesSubscribes[id].cbs.push(cb);\n if (this.connected) {\n this._socket.emit('subscribe', id);\n }\n } else {\n !this.statesSubscribes[id].cbs.includes(cb) && this.statesSubscribes[id].cbs.push(cb);\n }\n if (typeof cb === 'function' && this.connected) {\n if (binary) {\n this.getBinaryState(id)\n .then(base64 => cb(id, base64))\n .catch(e => console.error(`Cannot getForeignStates \"${id}\": ${JSON.stringify(e)}`));\n } else {\n if (Connection.isWeb()) {\n this._socket.emit('getStates', id, (err, states) => {\n err && console.error(`Cannot getForeignStates \"${id}\": ${JSON.stringify(err)}`);\n states && Object.keys(states).forEach(id => cb(id, states[id]));\n });\n } else {\n this._socket.emit('getForeignStates', id, (err, states) => {\n err && console.error(`Cannot getForeignStates \"${id}\": ${JSON.stringify(err)}`);\n states && Object.keys(states).forEach(id => cb(id, states[id]));\n });\n }\n }\n }\n }\n\n /**\n * Unsubscribes all callbacks from changes of the given state.\n * @param {string} id The ioBroker state ID.\n */\n /**\n * Unsubscribes the given callback from changes of the given state.\n * @param {string} id The ioBroker state ID.\n * @param {ioBroker.StateChangeHandler} cb The callback.\n */\n unsubscribeState(id, cb) {\n if (this.statesSubscribes[id]) {\n if (cb) {\n const pos = this.statesSubscribes[id].cbs.indexOf(cb);\n pos !== -1 && this.statesSubscribes[id].cbs.splice(pos, 1);\n } else {\n this.statesSubscribes[id].cbs = [];\n }\n\n if (!this.statesSubscribes[id].cbs || !this.statesSubscribes[id].cbs.length) {\n delete this.statesSubscribes[id];\n this.connected && this._socket.emit('unsubscribe', id);\n }\n }\n }\n\n /**\n * Subscribe to changes of the given object.\n * @param {string} id The ioBroker object ID.\n * @param {import('./types').ObjectChangeHandler} cb The callback.\n * @returns {Promise<void>}\n */\n subscribeObject(id, cb) {\n if (!this.objectsSubscribes[id]) {\n let reg = id.replace(/\\./g, '\\\\.').replace(/\\*/g, '.*');\n if (!reg.includes('*')) {\n reg += '$';\n }\n this.objectsSubscribes[id] = { reg: new RegExp(reg), cbs: [] };\n this.objectsSubscribes[id].cbs.push(cb);\n this.connected && this._socket.emit('subscribeObjects', id);\n } else {\n !this.objectsSubscribes[id].cbs.includes(cb) && this.objectsSubscribes[id].cbs.push(cb);\n }\n return Promise.resolve();\n }\n\n /**\n * Unsubscribes all callbacks from changes of the given object.\n * @param {string} id The ioBroker object ID.\n * @returns {Promise<void>}\n */\n /**\n * Unsubscribes the given callback from changes of the given object.\n * @param {string} id The ioBroker object ID.\n * @param {import('./types').ObjectChangeHandler} cb The callback.\n * @returns {Promise<void>}\n */\n unsubscribeObject(id, cb) {\n if (this.objectsSubscribes[id]) {\n if (cb) {\n const pos = this.objectsSubscribes[id].cbs.indexOf(cb);\n pos !== -1 && this.objectsSubscribes[id].cbs.splice(pos, 1);\n } else {\n this.objectsSubscribes[id].cbs = [];\n }\n\n if (this.connected && (!this.objectsSubscribes[id].cbs || !this.objectsSubscribes[id].cbs.length)) {\n delete this.objectsSubscribes[id];\n this.connected && this._socket.emit('unsubscribeObjects', id);\n }\n }\n return Promise.resolve();\n }\n\n /**\n * Called internally.\n * @private\n * @param {string} id\n * @param {ioBroker.Object | null | undefined} obj\n */\n objectChange(id, obj) {\n // update main.objects cache\n if (!this.objects) {\n return;\n }\n\n /** @type {import(\"./types\").OldObject} */\n let oldObj;\n\n let changed = false;\n if (obj) {\n if (obj._rev && this.objects[id]) {\n this.objects[id]._rev = obj._rev;\n }\n\n if (this.objects[id]) {\n oldObj = { _id: id, type: this.objects[id].type };\n }\n\n if (!this.objects[id] || JSON.stringify(this.objects[id]) !== JSON.stringify(obj)) {\n this.objects[id] = obj;\n changed = true;\n }\n } else if (this.objects[id]) {\n oldObj = { _id: id, type: this.objects[id].type };\n delete this.objects[id];\n changed = true;\n }\n\n Object.keys(this.objectsSubscribes).forEach(_id => {\n if (_id === id || this.objectsSubscribes[_id].reg.test(id)) {\n //@ts-ignore\n this.objectsSubscribes[_id].cbs.forEach(cb => cb(id, obj, oldObj));\n }\n });\n\n if (changed && this.props.onObjectChange) {\n this.props.onObjectChange(id, obj);\n }\n }\n\n /**\n * Called internally.\n * @private\n * @param {string} id\n * @param {ioBroker.State | null | undefined} state\n */\n stateChange(id, state) {\n for (const task in this.statesSubscribes) {\n if (this.statesSubscribes.hasOwnProperty(task) && this.statesSubscribes[task].reg.test(id)) {\n this.statesSubscribes[task].cbs.forEach(cb => cb(id, state));\n }\n }\n }\n\n /**\n * Gets all states.\n * @param {boolean} disableProgressUpdate don't call onProgress() when done\n * @returns {Promise<Record<string, ioBroker.State>>}\n */\n getStates(disableProgressUpdate) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n return new Promise((resolve, reject) =>\n this._socket.emit('getStates', (err, res) => {\n this.states = res;\n //@ts-ignore\n !disableProgressUpdate && this.onProgress(PROGRESS.STATES_LOADED);\n return err ? reject(err) : resolve(this.states);\n }));\n }\n\n /**\n * Gets the given state.\n * @param {string} id The state ID.\n * @returns {Promise<ioBroker.State | null | undefined>}\n */\n getState(id) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n return new Promise((resolve, reject) =>\n this._socket.emit('getState', id, (err, state) => err ? reject(err) : resolve(state)));\n }\n\n /**\n * Gets the given binary state.\n * @param {string} id The state ID.\n * @returns {Promise<Buffer | undefined>}\n */\n getBinaryState(id) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n // the data will come in base64\n return new Promise((resolve, reject) =>\n this._socket.emit('getBinaryState', id, (err, state) => err ? reject(err) : resolve(state)));\n }\n\n /**\n * Sets the given binary state.\n * @param {string} id The state ID.\n * @param {string} base64 The Base64 encoded binary data.\n * @returns {Promise<void>}\n */\n setBinaryState(id, base64) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n // the data will come in base64\n return new Promise((resolve, reject) =>\n this._socket.emit('setBinaryState', id, base64, err => err ? reject(err) : resolve()));\n }\n\n /**\n * Sets the given state value.\n * @param {string} id The state ID.\n * @param {string | number | boolean | ioBroker.State | ioBroker.SettableState | null} val The state value.\n * @param {boolean | null} ack Acknowledge flag\n * @returns {Promise<void>}\n */\n setState(id, val, ack) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n if (typeof ack === 'boolean') {\n val = { val, ack };\n }\n\n return new Promise((resolve, reject) =>\n this._socket.emit('setState', id, val, err =>\n err ? reject(err) : resolve()));\n }\n\n /**\n * Gets all objects.\n * @param {(objects?: Record<string, ioBroker.Object>) => void} update Callback that is executed when all objects are retrieved.\n * @returns {void}\n */\n /**\n * Gets all objects.\n * @param {boolean} update Set to true to retrieve all objects from the server (instead of using the local cache).\n * @param {boolean} disableProgressUpdate don't call onProgress() when done\n * @returns {Promise<Record<string, ioBroker.Object>> | undefined}\n */\n getObjects(update, disableProgressUpdate) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n } else {\n return new Promise((resolve, reject) => {\n if (!update && this.objects) {\n return resolve(this.objects);\n }\n\n this._socket.emit(Connection.isWeb() ? 'getObjects' : 'getAllObjects', (err, res) => {\n this.objects = res;\n disableProgressUpdate && this.onProgress(PROGRESS.OBJECTS_LOADED);\n err ? reject(err) : resolve(this.objects);\n });\n });\n }\n }\n\n /**\n * Called internally.\n * @private\n * @param {boolean} isEnable\n */\n _subscribe(isEnable) {\n if (isEnable && !this.subscribed) {\n this.subscribed = true;\n this.autoSubscribes.forEach(id => this._socket.emit('subscribeObjects', id));\n // re subscribe objects\n Object.keys(this.objectsSubscribes).forEach(id => this._socket.emit('subscribeObjects', id));\n // re-subscribe logs\n this.autoSubscribeLog && this._socket.emit('requireLog', true);\n // re subscribe states\n Object.keys(this.statesSubscribes).forEach(id => this._socket.emit('subscribe', id));\n } else if (!isEnable && this.subscribed) {\n this.subscribed = false;\n // un-subscribe objects\n this.autoSubscribes.forEach(id => this._socket.emit('unsubscribeObjects', id));\n Object.keys(this.objectsSubscribes).forEach(id => this._socket.emit('unsubscribeObjects', id));\n // un-subscribe logs\n this.autoSubscribeLog && this._socket.emit('requireLog', false);\n\n // un-subscribe states\n Object.keys(this.statesSubscribes).forEach(id => this._socket.emit('unsubscribe', id));\n }\n }\n\n /**\n * Requests log updates.\n * @param {boolean} isEnabled Set to true to get logs.\n * @returns {Promise<void>}\n */\n requireLog(isEnabled) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise((resolve, reject) =>\n this._socket.emit('requireLog', isEnabled, err =>\n err ? reject(err) : resolve()));\n }\n\n /**\n * Deletes the given object.\n * @param {string} id The object ID.\n * @param {boolean} maintenance Force deletion of non conform IDs.\n * @returns {Promise<void>}\n */\n delObject(id, maintenance) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise((resolve, reject) =>\n this._socket.emit('delObject', id, { maintenance: !!maintenance }, err =>\n err ? reject(err) : resolve()));\n }\n\n /**\n * Deletes the given object and all its children.\n * @param {string} id The object ID.\n * @param {boolean} maintenance Force deletion of non conform IDs.\n * @returns {Promise<void>}\n */\n delObjects(id, maintenance) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise((resolve, reject) =>\n this._socket.emit('delObjects', id, {maintenance: !!maintenance}, err =>\n err ? reject(err) : resolve()));\n }\n\n /**\n * Sets the object.\n * @param {string} id The object ID.\n * @param {ioBroker.SettableObject} obj The object.\n * @returns {Promise<void>}\n */\n setObject(id, obj) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n if (!obj) {\n return Promise.reject('Null object is not allowed');\n }\n\n obj = JSON.parse(JSON.stringify(obj));\n\n if (obj.hasOwnProperty('from')) {\n delete obj.from;\n }\n if (obj.hasOwnProperty('user')) {\n delete obj.user;\n }\n if (obj.hasOwnProperty('ts')) {\n delete obj.ts;\n }\n\n return new Promise((resolve, reject) =>\n this._socket.emit('setObject', id, obj, err =>\n err ? reject(err) : resolve()));\n }\n\n /**\n * Gets the object with the given id from the server.\n * @param {string} id The object ID.\n * @returns {ioBroker.GetObjectPromise} The object.\n */\n getObject(id) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise((resolve, reject) =>\n this._socket.emit('getObject', id, (err, obj) =>\n err ? reject(err) : resolve(obj)));\n }\n\n /**\n * Get all adapter instances.\n * @param {boolean} [update] Force update.\n * @returns {Promise<ioBroker.Object[]>}\n */\n /**\n * Get all instances of the given adapter.\n * @param {string} adapter The name of the adapter.\n * @param {boolean} [update] Force update.\n * @returns {Promise<ioBroker.Object[]>}\n */\n getAdapterInstances(adapter, update) {\n if (typeof adapter === 'boolean') {\n update = adapter;\n adapter = '';\n }\n adapter = adapter || '';\n\n if (!update && this._promises['instances_' + adapter]) {\n return this._promises['instances_' + adapter];\n }\n\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n this._promises['instances_' + adapter] = new Promise((resolve, reject) => {\n let timeout = setTimeout(() => {\n timeout = null;\n this.getObjectView(\n `system.adapter.${adapter ? adapter + '.' : ''}`,\n `system.adapter.${adapter ? adapter + '.' : ''}\\u9999`,\n 'instance'\n )\n .then(items => resolve(Object.keys(items).map(id => fixAdminUI(items[id]))))\n .catch(e => reject(e));\n }, TIMEOUT_FOR_ADMIN4);\n\n this._socket.emit('getAdapterInstances', adapter, (err, instances) => {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n return err ? reject(err) : resolve(instances);\n }\n });\n });\n\n return this._promises['instances_' + adapter];\n }\n\n /**\n * Get all adapters.\n * @param {boolean} [update] Force update.\n * @returns {Promise<ioBroker.Object[]>}\n */\n /**\n * Get adapters with the given name.\n * @param {string} adapter The name of the adapter.\n * @param {boolean} [update] Force update.\n * @returns {Promise<ioBroker.Object[]>}\n */\n getAdapters(adapter, update) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n\n if (typeof adapter === 'boolean') {\n update = adapter;\n adapter = '';\n }\n\n adapter = adapter || '';\n\n if (!update && this._promises['adapter_' + adapter]) {\n return this._promises['adapter_' + adapter];\n }\n\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n this._promises['adapter_' + adapter] = new Promise((resolve, reject) => {\n let timeout = setTimeout(() => {\n timeout = null;\n this.getObjectView(\n `system.adapter.${adapter}.`,\n `system.adapter.${adapter}.\\u9999`,\n 'adapter'\n )\n .then(items => resolve(Object.keys(items).map(id => fixAdminUI(items[id]))))\n .catch(e => reject(e));\n }, TIMEOUT_FOR_ADMIN4);\n\n this._socket.emit('getAdapters', adapter, (err, adapters) => {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n return err ? reject(err) : resolve(adapters);\n }\n });\n });\n\n return this._promises['adapter_' + adapter];\n }\n\n /**\n * Called internally.\n * @private\n * @param {any[]} objs\n * @param {(err?: any) => void} cb\n */\n _renameGroups(objs, cb) {\n if (!objs || !objs.length) {\n cb && cb();\n } else {\n let obj = objs.pop();\n let oldId = obj._id;\n obj._id = obj.newId;\n delete obj.newId;\n\n this.setObject(obj._id, obj)\n .then(() => this.delObject(oldId))\n .then(() => setTimeout(() => this._renameGroups(objs, cb), 0))\n .catch(err => cb && cb(err));\n }\n }\n\n /**\n * Rename a group.\n * @param {string} id The id.\n * @param {string} newId The new id.\n * @param {string | { [lang in ioBroker.Languages]?: string; }} newName The new name.\n */\n renameGroup(id, newId, newName) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n\n return this.getGroups(true)\n .then(groups => {\n if (groups.length) {\n // find all elements\n const groupsToRename = groups\n .filter(group => group._id.startsWith(id + '.'));\n\n groupsToRename.forEach(group => group.newId = newId + group._id.substring(id.length));\n\n return new Promise((resolve, reject) =>\n this._renameGroups(groupsToRename, err => err ? reject(err) : resolve()))\n .then(() => {\n const obj = groups.find(group => group._id === id);\n\n if (obj) {\n obj._id = newId;\n if (newName !== undefined) {\n obj.common = obj.common || {};\n obj.common.name = newName;\n }\n\n return this.setObject(obj._id, obj)\n .then(() => this.delObject(id));\n }\n });\n }\n });\n }\n\n /**\n * Sends a message to a specific instance or all instances of some specific adapter.\n * @param {string} instance The instance to send this message to.\n * @param {string} [command] Command name of the target instance.\n * @param {ioBroker.MessagePayload} [data] The message data to send.\n * @returns {Promise<ioBroker.Message | undefined>}\n */\n sendTo(instance, command, data) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise(resolve =>\n this._socket.emit('sendTo', instance, command, data, result =>\n resolve(result)));\n }\n\n /**\n * Extend an object and create it if it might not exist.\n * @param {string} id The id.\n * @param {ioBroker.PartialObject} obj The object.\n */\n extendObject(id, obj) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n obj = JSON.parse(JSON.stringify(obj));\n\n if (obj.hasOwnProperty('from')) {\n delete obj.from;\n }\n if (obj.hasOwnProperty('user')) {\n delete obj.user;\n }\n if (obj.hasOwnProperty('ts')) {\n delete obj.ts;\n }\n\n return new Promise((resolve, reject) =>\n this._socket.emit('extendObject', id, obj, err => err ? reject(err) : resolve()));\n }\n\n /**\n * Register a handler for log messages.\n * @param {(message: string) => void} handler The handler.\n */\n registerLogHandler(handler) {\n !this.onLogHandlers.includes(handler) && this.onLogHandlers.push(handler);\n }\n\n /**\n * Unregister a handler for log messages.\n * @param {(message: string) => void} handler The handler.\n */\n unregisterLogHandler(handler) {\n const pos = this.onLogHandlers.indexOf(handler);\n pos !== -1 && this.onLogHandlers.splice(pos, 1);\n }\n\n /**\n * Register a handler for the connection state.\n * @param {(connected: boolean) => void} handler The handler.\n */\n registerConnectionHandler(handler) {\n !this.onConnectionHandlers.includes(handler) && this.onConnectionHandlers.push(handler);\n }\n\n /**\n * Unregister a handler for the connection state.\n * @param {(connected: boolean) => void} handler The handler.\n */\n unregisterConnectionHandler(handler) {\n const pos = this.onConnectionHandlers.indexOf(handler);\n pos !== -1 && this.onConnectionHandlers.splice(pos, 1);\n }\n\n /**\n * Set the handler for standard output of a command.\n * @param {(id: string, text: string) => void} handler The handler.\n */\n registerCmdStdoutHandler(handler) {\n this.onCmdStdoutHandler = handler;\n }\n\n /**\n * Unset the handler for standard output of a command.\n * @param {(id: string, text: string) => void} handler The handler.\n */\n unregisterCmdStdoutHandler(handler) {\n this.onCmdStdoutHandler = null;\n }\n\n /**\n * Set the handler for standard error of a command.\n * @param {(id: string, text: string) => void} handler The handler.\n */\n registerCmdStderrHandler(handler) {\n this.onCmdStderrHandler = handler;\n }\n\n /**\n * Unset the handler for standard error of a command.\n * @param {(id: string, text: string) => void} handler The handler.\n */\n unregisterCmdStderrHandler(handler) {\n this.onCmdStderrHandler = null;\n }\n\n /**\n * Set the handler for exit of a command.\n * @param {(id: string, exitCode: number) => void} handler The handler.\n */\n registerCmdExitHandler(handler) {\n this.onCmdExitHandler = handler;\n }\n\n /**\n * Unset the handler for exit of a command.\n * @param {(id: string, exitCode: number) => void} handler The handler.\n */\n unregisterCmdExitHandler(handler) {\n this.onCmdExitHandler = null;\n }\n\n /**\n * Get all enums with the given name.\n * @param {string} [_enum] The name of the enum\n * @param {boolean} [update] Force update.\n * @returns {Promise<Record<string, ioBroker.Object>>}\n */\n getEnums(_enum, update) {\n if (!update && this._promises['enums_' + (_enum || 'all')]) {\n return this._promises['enums_' + (_enum || 'all')];\n }\n\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n this._promises['enums_' + (_enum || 'all')] = new Promise((resolve, reject) => {\n this._socket.emit('getObjectView', 'system', 'enum', { startkey: 'enum.' + (_enum || ''), endkey: 'enum.' + (_enum ? (_enum + '.') : '') + '\\u9999' }, (err, res) => {\n if (!err && res) {\n const _res = {};\n for (let i = 0; i < res.rows.length; i++) {\n if (_enum && res.rows[i].id === 'enum.' + _enum) {\n continue;\n }\n _res[res.rows[i].id] = res.rows[i].value;\n }\n resolve(_res);\n } else {\n reject(err);\n }\n });\n });\n\n return this._promises['enums_' + (_enum || 'all')];\n }\n\n /**\n * Query a predefined object view.\n * @param {string} start The start ID.\n * @param {string} end The end ID.\n * @param {string} type The type of object.\n * @returns {Promise<Record<string, ioBroker.Object>>}\n */\n getObjectView(start, end, type) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n start = start || '';\n end = end || '\\u9999';\n\n return new Promise((resolve, reject) => {\n this._socket.emit('getObjectView', 'system', type, { startkey: start, endkey: end }, (err, res) => {\n if (!err) {\n const _res = {};\n if (res && res.rows) {\n for (let i = 0; i < res.rows.length; i++) {\n _res[res.rows[i].id] = res.rows[i].value;\n }\n }\n resolve(_res);\n } else {\n reject(err);\n }\n });\n });\n }\n\n /**\n * Get the stored certificates.\n * @param {boolean} [update] Force update.\n * @returns {Promise<{name: string; type: 'public' | 'private' | 'chained'}[]>}\n */\n getCertificates(update) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n\n if (this._promises.cert && !update) {\n return this._promises.cert;\n }\n\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n this._promises.cert = this.getObject('system.certificates')\n .then(res => {\n const certs = [];\n if (res && res.native && res.native.certificates) {\n Object.keys(res.native.certificates).forEach(c => {\n const cert = res.native.certificates[c];\n if (!cert) {\n return;\n }\n const _cert = {\n name: c,\n type: ''\n };\n // If it is filename, it could be everything\n if (cert.length < 700 && (cert.indexOf('/') !== -1 || cert.indexOf('\\\\') !== -1)) {\n if (c.toLowerCase().includes('private')) {\n _cert.type = 'private';\n } else if (cert.toLowerCase().includes('private')) {\n _cert.type = 'private';\n } else if (c.toLowerCase().includes('public')) {\n _cert.type = 'public';\n } else if (cert.toLowerCase().includes('public')) {\n _cert.type = 'public';\n }\n certs.push(_cert);\n } else {\n _cert.type = (cert.substring(0, '-----BEGIN RSA PRIVATE KEY'.length) === '-----BEGIN RSA PRIVATE KEY' || cert.substring(0, '-----BEGIN PRIVATE KEY'.length) === '-----BEGIN PRIVATE KEY') ? 'private' : 'public';\n\n if (_cert.type === 'public') {\n const m = cert.split('-----END CERTIFICATE-----');\n if (m.filter(t => t.replace(/\\r\\n|\\r|\\n/, '').trim()).length > 1) {\n _cert.type = 'chained';\n }\n }\n\n certs.push(_cert);\n }\n });\n }\n return certs;\n });\n\n return this._promises.cert;\n }\n\n /**\n * Get the logs from a host (only for admin connection).\n * @param {string} host\n * @param {number} [linesNumber]\n * @returns {Promise<string[]>}\n */\n getLogs(host, linesNumber) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n return new Promise(resolve =>\n this._socket.emit('sendToHost', host, 'getLogs', linesNumber || 200, lines =>\n resolve(lines)));\n }\n\n /**\n * Get the log files (only for admin connection).\n * @returns {Promise<string[]>}\n */\n getLogsFiles(host) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise((resolve, reject) =>\n this._socket.emit('readLogs', host, (err, files) =>\n err ? reject(err) : resolve(files)));\n }\n\n /**\n * Delete the logs from a host (only for admin connection).\n * @param {string} host\n * @returns {Promise<void>}\n */\n delLogs(host) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise((resolve, reject) =>\n this._socket.emit('sendToHost', host, 'delLogs', null, error =>\n error ? reject(error) : resolve()));\n }\n\n /**\n * Read the meta items.\n * @returns {Promise<ioBroker.Object[]>}\n */\n readMetaItems() {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise((resolve, reject) =>\n this._socket.emit('getObjectView', 'system', 'meta', { startkey: '', endkey: '\\u9999' }, (err, objs) =>\n err ? reject(err) : resolve(objs.rows && objs.rows.map(obj => obj.value))));\n }\n\n /**\n * Read the directory of an adapter.\n * @param {string} adapter The adapter name.\n * @param {string} fileName The directory name.\n * @returns {Promise<ioBroker.ReadDirResult[]>}\n */\n readDir(adapter, fileName) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise((resolve, reject) =>\n this._socket.emit('readDir', adapter, fileName, (err, files) =>\n err ? reject(err) : resolve(files)));\n }\n\n /**\n * Read a file of an adapter.\n * @param {string} adapter The adapter name.\n * @param {string} fileName The file name.\n * @param {boolean} base64 If it must be a base64 format\n * @returns {Promise<string>}\n */\n readFile(adapter, fileName, base64) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise((resolve, reject) => {\n if (!base64) {\n this._socket.emit('readFile', adapter, fileName, (err, data, type) => {\n //@ts-ignore\n err ? reject(err) : resolve({data, type});\n });\n } else {\n this._socket.emit('readFile64', adapter, fileName, base64, (err, data) =>\n err ? reject(err) : resolve(data));\n }\n });\n }\n\n /**\n * Write a file of an adapter.\n * @param {string} adapter The adapter name.\n * @param {string} fileName The file name.\n * @param {Buffer | string} data The data (if it's a Buffer, it will be converted to Base64).\n * @returns {Promise<void>}\n */\n writeFile64(adapter, fileName, data) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise((resolve, reject) => {\n if (typeof data === 'string') {\n this._socket.emit('writeFile', adapter, fileName, data, err =>\n err ? reject(err) : resolve());\n } else {\n const base64 = btoa(\n new Uint8Array(data)\n .reduce((data, byte) => data + String.fromCharCode(byte), '')\n );\n\n this._socket.emit('writeFile64', adapter, fileName, base64, err =>\n err ? reject(err) : resolve());\n }\n });\n }\n\n /**\n * Rename a file or folder of an adapter.\n *\n * All files in folder will be renamed too.\n * @param {string} adapter The adapter name.\n * @param {string} oldName The file name of the file to be renamed.\n * @param {string} newName The new file name.\n * @returns {Promise<void>}\n */\n rename(adapter, oldName, newName) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise((resolve, reject) =>\n this._socket.emit('rename', adapter, oldName, newName, err =>\n err ? reject(err) : resolve()));\n }\n\n /**\n * Delete a file of an adapter.\n * @param {string} adapter The adapter name.\n * @param {string} fileName The file name.\n * @returns {Promise<void>}\n */\n deleteFile(adapter, fileName) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise((resolve, reject) =>\n this._socket.emit('unlink', adapter, fileName, err =>\n err ? reject(err) : resolve()));\n }\n\n /**\n * Delete a folder of an adapter.\n * All files in folder will be deleted.\n * @param {string} adapter The adapter name.\n * @param {string} folderName The folder name.\n * @returns {Promise<void>}\n */\n deleteFolder(adapter, folderName) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise((resolve, reject) =>\n this._socket.emit('deleteFolder', adapter, folderName, err =>\n err ? reject(err) : resolve()));\n }\n\n /**\n * Get the list of all hosts.\n * @param {boolean} [update] Force update.\n * @returns {Promise<ioBroker.Object[]>}\n */\n getHosts(update) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n if (!update && this._promises.hosts) {\n return this._promises.hosts;\n }\n\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n this._promises.hosts = new Promise((resolve, reject) =>\n this._socket.emit(\n 'getObjectView',\n 'system',\n 'host',\n {startkey: 'system.host.', endkey: 'system.host.\\u9999'},\n (err, doc) => {\n if (err) {\n reject(err);\n } else {\n resolve(doc.rows.map(item => item.value));\n }\n }));\n\n return this._promises.hosts;\n }\n\n /**\n * Get the list of all users.\n * @param {boolean} [update] Force update.\n * @returns {Promise<ioBroker.Object[]>}\n */\n getUsers(update) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n if (!update && this._promises.users) {\n return this._promises.users;\n }\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n this._promises.users = new Promise((resolve, reject) =>\n this._socket.emit(\n 'getObjectView',\n 'system',\n 'user',\n {startkey: 'system.user.', endkey: 'system.user.\\u9999'},\n (err, doc) => {\n if (err) {\n reject(err);\n } else {\n resolve(doc.rows.map(item => item.value));\n }\n }));\n\n return this._promises.users;\n }\n\n /**\n * Get the list of all groups.\n * @param {boolean} [update] Force update.\n * @returns {Promise<ioBroker.Object[]>}\n */\n getGroups(update) {\n if (!update && this._promises.groups) {\n return this._promises.groups;\n }\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n this._promises.groups = new Promise((resolve, reject) =>\n this._socket.emit(\n 'getObjectView',\n 'system',\n 'group',\n {startkey: 'system.group.', endkey: 'system.group.\\u9999'},\n (err, doc) => {\n if (err) {\n reject(err);\n } else {\n resolve(doc.rows.map(item => item.value));\n }\n }));\n\n return this._promises.groups;\n }\n\n /**\n * Get the host information.\n * @param {string} host\n * @param {boolean} [update] Force update.\n * @param {number} [timeoutMs] optional read timeout.\n * @returns {Promise<any>}\n */\n getHostInfo(host, update, timeoutMs) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n if (!host.startsWith('system.host.')) {\n host += 'system.host.' + host;\n }\n\n if (!update && this._promises['hostInfo' + host]) {\n return this._promises['hostInfo' + host];\n }\n\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n this._promises['hostInfo' + host] = new Promise((resolve, reject) => {\n let timeout = setTimeout(() => {\n if (timeout) {\n timeout = null;\n reject('getHostInfo timeout');\n }\n }, timeoutMs || this.props.cmdTimeout);\n\n this._socket.emit('sendToHost', host, 'getHostInfo', null, data => {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n if (data === PERMISSION_ERROR) {\n reject('May not read \"getHostInfo\"');\n } else if (!data) {\n reject('Cannot read \"getHostInfo\"');\n } else {\n resolve(data);\n }\n }\n });\n });\n\n return this._promises['hostInfo' + host];\n }\n\n /**\n * Get the host information (short version).\n * @param {string} host\n * @param {boolean} [update] Force update.\n * @param {number} [timeoutMs] optional read timeout.\n * @returns {Promise<any>}\n */\n getHostInfoShort(host, update, timeoutMs) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n if (!host.startsWith('system.host.')) {\n host += 'system.host.' + host;\n }\n\n if (!update && this._promises['hostInfoShort' + host]) {\n return this._promises['hostInfoShort' + host];\n }\n\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n this._promises['hostInfoShort' + host] = new Promise((resolve, reject) => {\n let timeout = setTimeout(() => {\n if (timeout) {\n timeout = null;\n reject('hostInfoShort timeout');\n }\n }, timeoutMs || this.props.cmdTimeout);\n\n this._socket.emit('sendToHost', host, 'getHostInfoShort', null, data => {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n if (data === PERMISSION_ERROR) {\n reject('May not read \"getHostInfoShort\"');\n } else if (!data) {\n reject('Cannot read \"getHostInfoShort\"');\n } else {\n resolve(data);\n }\n }\n });\n });\n\n return this._promises['hostInfoShort' + host];\n }\n\n /**\n * Get the repository.\n * @param {string} host\n * @param {any} [args]\n * @param {boolean} [update] Force update.\n * @param {number} [timeoutMs] timeout in ms.\n * @returns {Promise<any>}\n */\n getRepository(host, args, update, timeoutMs) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n if (!update && this._promises.repo) {\n return this._promises.repo;\n }\n\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n if (!host.startsWith('system.host.')) {\n host += 'system.host.' + host;\n }\n\n this._promises.repo = new Promise((resolve, reject) => {\n let timeout = setTimeout(() => {\n if (timeout) {\n timeout = null;\n reject('getRepository timeout');\n }\n }, timeoutMs || this.props.cmdTimeout);\n\n this._socket.emit('sendToHost', host, 'getRepository', args, data => {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n if (data === PERMISSION_ERROR) {\n reject('May not read \"getRepository\"');\n } else if (!data) {\n reject('Cannot read \"getRepository\"');\n } else {\n resolve(data);\n }\n }\n });\n });\n\n return this._promises.repo;\n }\n\n /**\n * Get the installed.\n * @param {string} host\n * @param {boolean} [update] Force update.\n * @param {number} [cmdTimeout] timeout in ms (optional)\n * @returns {Promise<any>}\n */\n getInstalled(host, update, cmdTimeout) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n\n this._promises.installed = this._promises.installed || {};\n\n if (!update && this._promises.installed[host]) {\n return this._promises.installed[host];\n }\n\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n if (!host.startsWith('system.host.')) {\n host += 'system.host.' + host;\n }\n\n this._promises.installed[host] = new Promise((resolve, reject) => {\n let timeout = setTimeout(() => {\n if (timeout) {\n timeout = null;\n reject('getInstalled timeout');\n }\n }, cmdTimeout || this.props.cmdTimeout);\n\n this._socket.emit('sendToHost', host, 'getInstalled', null, data => {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n if (data === PERMISSION_ERROR) {\n reject('May not read \"getInstalled\"');\n } else if (!data) {\n reject('Cannot read \"getInstalled\"');\n } else {\n resolve(data);\n }\n }\n });\n });\n\n return this._promises.installed[host];\n }\n\n /**\n * Execute a command on a host.\n * @param {string} host The host name.\n * @param {string} cmd The command.\n * @param {string} cmdId The command ID.\n * @param {number} cmdTimeout Timeout of command in ms\n * @returns {Promise<void>}\n */\n cmdExec(host, cmd, cmdId, cmdTimeout) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n if (!host.startsWith(host)) {\n host += 'system.host.' + host;\n }\n\n return new Promise((resolve, reject) => {\n let timeout = cmdTimeout && setTimeout(() => {\n if (timeout) {\n timeout = null;\n reject('cmdExec timeout');\n }\n }, cmdTimeout);\n\n this._socket.emit('cmdExec', host, cmdId, cmd, null, err => {\n if (!cmdTimeout || timeout) {\n timeout && clearTimeout(timeout);\n timeout = null;\n if (err) {\n reject(err);\n } else {\n resolve();\n }\n }\n });\n });\n }\n\n /**\n * Checks if a given feature is supported.\n * @param {string} feature The feature to check.\n * @param {boolean} [update] Force update.\n * @returns {Promise<any>}\n */\n checkFeatureSupported(feature, update) {\n if (!update && this._promises['supportedFeatures_' + feature]) {\n return this._promises['supportedFeatures_' + feature];\n }\n\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n this._promises['supportedFeatures_' + feature] = new Promise((resolve, reject) =>\n this._socket.emit('checkFeatureSupported', feature, (err, features) => {\n err ? reject(err) : resolve(features)\n }));\n\n return this._promises['supportedFeatures_' + feature];\n }\n\n /**\n * Read the base settings of a given host.\n * @param {string} host\n * @returns {Promise<any>}\n */\n readBaseSettings(host) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n return this.checkFeatureSupported('CONTROLLER_READWRITE_BASE_SETTINGS')\n .then(result => {\n if (result) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise((resolve, reject) => {\n let timeout = setTimeout(() => {\n if (timeout) {\n timeout = null;\n reject('readBaseSettings timeout');\n }\n }, this.props.cmdTimeout);\n\n if (host.startsWith('system.host.')) {\n host = host.replace(/^system\\.host\\./, '');\n }\n\n this._socket.emit('sendToHost', host, 'readBaseSettings', null, data => {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n\n if (data === PERMISSION_ERROR) {\n reject('May not read \"BaseSettings\"');\n } else if (!data) {\n reject('Cannot read \"BaseSettings\"');\n } else {\n resolve(data);\n }\n }\n });\n });\n } else {\n return Promise.reject('Not supported');\n }\n });\n }\n\n /**\n * Write the base settings of a given host.\n * @param {string} host\n * @param {any} config\n * @returns {Promise<any>}\n */\n writeBaseSettings(host, config) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n return this.checkFeatureSupported('CONTROLLER_READWRITE_BASE_SETTINGS')\n .then(result => {\n if (result) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise((resolve, reject) => {\n let timeout = setTimeout(() => {\n if (timeout) {\n timeout = null;\n reject('writeBaseSettings timeout');\n }\n }, this.props.cmdTimeout);\n\n this._socket.emit('sendToHost', host, 'writeBaseSettings', config, data => {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n\n if (data === PERMISSION_ERROR) {\n reject('May not write \"BaseSettings\"');\n } else if (!data) {\n reject('Cannot write \"BaseSettings\"');\n } else {\n resolve(data);\n }\n }\n });\n });\n } else {\n return Promise.reject('Not supported');\n }\n })\n }\n\n /**\n * Send command to restart the iobroker on host\n * @param {string} host\n * @returns {Promise<any>}\n */\n restartController(host) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n return new Promise((resolve, reject) => {\n this._socket.emit('sendToHost', host, 'restartController', null, error => {\n error ? reject(error) : resolve(true);\n });\n });\n }\n\n /**\n * Read statistics information from host\n * @param {string} host\n * @param {string} typeOfDiag one of none, normal, no-city, extended\n * @returns {Promise<any>}\n */\n getDiagData(host, typeOfDiag) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n return new Promise(resolve => {\n this._socket.emit('sendToHost', host, 'getDiagData', typeOfDiag, result =>\n resolve(result));\n });\n }\n\n /**\n * Read all states (which might not belong to this adapter) which match the given pattern.\n * @param {string} pattern\n * @returns {ioBroker.GetStatesPromise}\n */\n getForeignStates(pattern) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n if (Connection.isWeb()) {\n return new Promise((resolve, reject) =>\n this._socket.emit('getStates', pattern || '*', (err, states) =>\n err ? reject(err) : resolve(states)));\n } else {\n return new Promise((resolve, reject) =>\n this._socket.emit('getForeignStates', pattern || '*', (err, states) =>\n err ? reject(err) : resolve(states)));\n }\n }\n\n /**\n * Get foreign objects by pattern, by specific type and resolve their enums.\n * @param {string} pattern\n * @param {string} [type]\n * @returns {ioBroker.GetObjectsPromise}\n */\n getForeignObjects(pattern, type) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise((resolve, reject) =>\n this._socket.emit('getForeignObjects', pattern || '*', type, (err, states) =>\n err ? reject(err) : resolve(states)));\n }\n\n /**\n * Gets the system configuration.\n * @param {boolean} [update] Force update.\n * @returns {Promise<ioBroker.OtherObject>}\n */\n getSystemConfig(update) {\n if (!update && this._promises.systemConfig) {\n return this._promises.systemConfig;\n }\n\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n this._promises.systemConfig = this.getObject('system.config')\n .then(systemConfig => {\n //@ts-ignore\n systemConfig = systemConfig || {};\n //@ts-ignore\n systemConfig.common = systemConfig.common || {};\n //@ts-ignore\n systemConfig.native = systemConfig.native || {};\n return systemConfig;\n });\n\n return this._promises.systemConfig;\n }\n\n /**\n * Sets the system configuration.\n * @param {ioBroker.SettableObjectWorker<ioBroker.OtherObject>} obj\n * @returns {Promise<ioBroker.SettableObjectWorker<ioBroker.OtherObject>>}\n */\n setSystemConfig(obj) {\n return this.setObject('system.config', obj)\n .then(() => this._promises.systemConfig = Promise.resolve(obj));\n }\n\n /**\n * Get the raw socket.io socket.\n * @returns {any}\n */\n getRawSocket() {\n return this._socket;\n }\n\n /**\n * Get the history of a given state.\n * @param {string} id\n * @param {ioBroker.GetHistoryOptions} options\n * @returns {Promise<ioBroker.GetHistoryResult>}\n */\n getHistory(id, options) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n return new Promise((resolve, reject) =>\n this._socket.emit('getHistory', id, options, (err, values) =>\n err ? reject(err) : resolve(values)));\n }\n\n /**\n * Get the history of a given state.\n * @param {string} id\n * @param {ioBroker.GetHistoryOptions} options\n * @returns {Promise<{values: ioBroker.GetHistoryResult; sesionId: string; stepIgnore: number}>}\n */\n getHistoryEx(id, options) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n return new Promise((resolve, reject) =>\n this._socket.emit('getHistory', id, options, (err, values, stepIgnore, sessionId) =>\n err ? reject(err) : resolve({ values, sessionId, stepIgnore })));\n }\n\n /**\n * Change the password of the given user.\n * @param {string} user\n * @param {string} password\n * @returns {Promise<void>}\n */\n changePassword(user, password) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n return new Promise((resolve, reject) =>\n this._socket.emit('changePassword', user, password, err =>\n err ? reject(err) : resolve()));\n }\n\n /**\n * Get the IP addresses of the given host.\n * @param {string} host\n * @param {boolean} [update] Force update.\n * @returns {Promise<string[]>}\n */\n getIpAddresses(host, update) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n if (!host.startsWith('system.host.')) {\n host = 'system.host.' + host;\n }\n\n if (!update && this._promises['IPs_' + host]) {\n return this._promises['IPs_' + host];\n }\n this._promises['IPs_' + host] = this.getObject(host)\n .then(obj => obj && obj.common ? obj.common.address || [] : []);\n\n return this._promises['IPs_' + host];\n }\n\n /**\n * Get the IP addresses with interface names of the given host or find host by IP.\n * @param {string} ipOrHostName\n * @param {boolean} [update] Force update.\n * @returns {Promise<any[<name, address, family>]>}\n */\n getHostByIp(ipOrHostName, update) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n if (ipOrHostName.startsWith('system.host.')) {\n ipOrHostName = ipOrHostName.replace(/^system\\.host\\./, '');\n }\n\n if (!update && this._promises['rIPs_' + ipOrHostName]) {\n return this._promises['rIPs_' + ipOrHostName];\n }\n this._promises['rIPs_' + ipOrHostName] = new Promise(resolve =>\n this._socket.emit('getHostByIp', ipOrHostName, (ip, host) => {\n const IPs4 = [{name: '[IPv4] 0.0.0.0 - Listen on all IPs', address: '0.0.0.0', family: 'ipv4'}];\n const IPs6 = [{name: '[IPv6] :: - Listen on all IPs', address: '::', family: 'ipv6'}];\n if (host?.native?.hardware?.networkInterfaces) {\n for (const eth in host.native.hardware.networkInterfaces) {\n if (!host.native.hardware.networkInterfaces.hasOwnProperty(eth)) {\n continue;\n }\n for (let num = 0; num < host.native.hardware.networkInterfaces[eth].length; num++) {\n if (host.native.hardware.networkInterfaces[eth][num].family !== 'IPv6') {\n IPs4.push({name: `[${host.native.hardware.networkInterfaces[eth][num].family}] ${host.native.hardware.networkInterfaces[eth][num].address} - ${eth}`, address: host.native.hardware.networkInterfaces[eth][num].address, family: 'ipv4'});\n } else {\n IPs6.push({name: `[${host.native.hardware.networkInterfaces[eth][num].family}] ${host.native.hardware.networkInterfaces[eth][num].address} - ${eth}`, address: host.native.hardware.networkInterfaces[eth][num].address, family: 'ipv6'});\n }\n }\n }\n }\n for (let i = 0; i < IPs6.length; i++) {\n IPs4.push(IPs6[i]);\n }\n resolve(IPs4);\n }));\n\n return this._promises['rIPs_' + ipOrHostName];\n }\n\n /**\n * Encrypt a text\n * @param {string} text\n * @returns {Promise<string>}\n */\n encrypt(text) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n return new Promise((resolve, reject) =>\n this._socket.emit('encrypt', text, (err, text) =>\n err ? reject(err) : resolve(text)));\n }\n\n /**\n * Decrypt a text\n * @param {string} encryptedText\n * @returns {Promise<string>}\n */\n decrypt(encryptedText) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n return new Promise((resolve, reject) =>\n this._socket.emit('decrypt', encryptedText, (err, text) =>\n err ? reject(err) : resolve(text)));\n }\n\n /**\n * Gets the version.\n * @returns {Promise<{version: string; serverName: string}>}\n */\n getVersion(update) {\n if (update && this._promises.version) {\n this._promises.version = null;\n }\n\n this._promises.version = this._promises.version || new Promise((resolve, reject) =>\n this._socket.emit('getVersion', (err, version, serverName) => {\n // support of old socket.io\n if (err && !version && typeof err === 'string' && err.match(/\\d+\\.\\d+\\.\\d+/)) {\n resolve({ version: err, serverName: 'socketio' });\n } else {\n return err ? reject(err) : resolve({ version, serverName });\n }\n }));\n\n return this._promises.version;\n }\n\n /**\n * Gets the web server name.\n * @returns {Promise<string>}\n */\n getWebServerName() {\n this._promises.webName = this._promises.webName || new Promise((resolve, reject) =>\n this._socket.emit('getAdapterName', (err, name) =>\n err ? reject(err) : resolve(name)));\n\n return this._promises.webName;\n }\n\n /**\n * Gets the admin version.\n * @deprecated use getVersion()\n * @returns {Promise<{version: string; serverName: string}>}\n */\n getAdminVersion() {\n console.log('Deprecated: use getVersion');\n return this.getVersion();\n }\n\n /**\n * Change access rights for file\n * @param {string} [adapter] adapter name\n * @param {string} [filename] file name with full path. it could be like vis.0/*\n * @param {object} [options] like {mode: 0x644}\n * @returns {Promise<{entries: array}>}\n */\n chmodFile(adapter, filename, options) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n return new Promise((resolve, reject) =>\n this._socket.emit('chmodFile', adapter, filename, options, (err, entries, id) =>\n err ? reject(err) : resolve({entries, id})));\n }\n\n /**\n * Change owner or/and owner group for file\n * @param {string} [adapter] adapter name\n * @param {string} [filename] file name with full path. it could be like vis.0/*\n * @param {object} [options] like {owner: 'newOwner', ownerGroup: 'newGroup'}\n * @returns {Promise<{entries: array}>}\n */\n chownFile(adapter, filename, options) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n return new Promise((resolve, reject) =>\n this._socket.emit('chownFile', adapter, filename, options, (err, entries, id) =>\n err ? reject(err) : resolve({entries, id})));\n }\n\n /**\n * Check if the file exists\n * @param {string} [adapter] adapter name\n * @param {string} [filename] file name with full path. it could be like vis.0/*\n * @returns {Promise<boolean>}\n */\n fileExists(adapter, filename) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n return new Promise((resolve, reject) =>\n this._socket.emit('fileExists', adapter, filename, (err, exists) =>\n err ? reject(err) : resolve(exists)));\n }\n\n /**\n * Get the alarm notifications from a host (only for admin connection).\n * @param {string} host\n * @param {string} [category] - optional\n * @returns {Promise<any>}\n */\n getNotifications(host, category) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise(resolve =>\n this._socket.emit('sendToHost', host, 'getNotifications', {category}, notifications =>\n resolve(notifications)));\n }\n\n /**\n * Clear the alarm notifications on a host (only for admin connection).\n * @param {string} host\n * @param {string} [category] - optional\n * @returns {Promise<any>}\n */\n clearNotifications(host, category) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise(resolve =>\n this._socket.emit('sendToHost', host, 'clearNotifications', {category}, notifications =>\n resolve(notifications)));\n }\n\n /**\n * Read if only easy mode is allowed (only for admin connection).\n * @returns {Promise<boolean>}\n */\n getIsEasyModeStrict() {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise((resolve, reject) =>\n this._socket.emit('getIsEasyModeStrict', (error, isStrict) =>\n error ? reject(error) : resolve(isStrict)));\n }\n\n /**\n * Read easy mode configuration (only for admin connection).\n * @returns {Promise<any>}\n */\n getEasyMode() {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise((resolve, reject) =>\n this._socket.emit('getEasyMode', (error, config) =>\n error ? reject(error) : resolve(config)));\n }\n\n /**\n * Read current user\n * @returns {Promise<string>}\n */\n getCurrentUser() {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n return new Promise(resolve =>\n this._socket.emit('authEnabled', (isSecure, user) =>\n resolve(user)));\n }\n\n getCurrentSession(cmdTimeout) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n return new Promise((resolve, reject) => {\n const controller = new AbortController();\n\n let timeout = setTimeout(() => {\n if (timeout) {\n timeout = null;\n controller.abort();\n reject('getCurrentSession timeout');\n }\n }, cmdTimeout || 5000);\n\n return fetch('./session', { signal: controller.signal })\n .then(res => res.json())\n .then(json => {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n resolve(json);\n }\n })\n .catch(e =>\n reject('getCurrentSession: ' + e));\n });\n }\n\n /**\n * Read adapter ratings\n * @returns {Promise<any>}\n */\n getRatings(update) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise((resolve, reject) =>\n this._socket.emit('getRatings', update, (err, ratings) =>\n err ? reject(err) : resolve(ratings)));\n }\n\n /**\n * Read current web, socketio or admin namespace, like admin.0\n * @returns {Promise<string>}\n */\n getCurrentInstance() {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n this._promises.currentInstance = this._promises.currentInstance ||\n new Promise((resolve, reject) =>\n this._socket.emit('getCurrentInstance', (err, namespace) =>\n err ? reject(err) : resolve(namespace)));\n\n return this._promises.currentInstance;\n }\n\n // returns very optimized information for adapters to minimize connection load\n getCompactAdapters(update) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n if (!update && this._promises.compactAdapters) {\n return this._promises.compactAdapters;\n }\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n this._promises.compactAdapters = new Promise((resolve, reject) =>\n this._socket.emit('getCompactAdapters', (err, adapters) =>\n err ? reject(err) : resolve(adapters)));\n\n return this._promises.compactAdapters;\n }\n\n // returns very optimized information for adapters to minimize connection load\n getCompactInstances(update) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n if (!update && this._promises.compactInstances) {\n return this._promises.compactInstances;\n }\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n this._promises.compactInstances = new Promise((resolve, reject) =>\n this._socket.emit('getCompactInstances', (err, instances) =>\n err ? reject(err) : resolve(instances)));\n\n return this._promises.compactInstances;\n }\n\n // returns very optimized information for adapters to minimize connection load\n // reads only version of installed adapter\n getCompactInstalled(host, update, cmdTimeout) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n\n this._promises.installedCompact = this._promises.installedCompact || {};\n\n if (!update && this._promises.installedCompact[host]) {\n return this._promises.installedCompact[host];\n }\n\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n if (!host.startsWith('system.host.')) {\n host += 'system.host.' + host;\n }\n\n this._promises.installedCompact[host] = new Promise((resolve, reject) => {\n let timeout = setTimeout(() => {\n if (timeout) {\n timeout = null;\n reject('getCompactInstalled timeout');\n }\n }, cmdTimeout || this.props.cmdTimeout);\n\n this._socket.emit('getCompactInstalled', host, data => {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n if (data === PERMISSION_ERROR) {\n reject('May not read \"getCompactInstalled\"');\n } else if (!data) {\n reject('Cannot read \"getCompactInstalled\"');\n } else {\n resolve(data);\n }\n }\n });\n });\n\n return this._promises.installedCompact[host];\n }\n\n // returns very optimized information for adapters to minimize connection load\n getCompactSystemConfig(update) {\n if (!update && this._promises.systemConfigCommon) {\n return this._promises.systemConfigCommon;\n }\n\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n this._promises.systemConfigCommon = new Promise((resolve, reject) =>\n this._socket.emit('getCompactSystemConfig', (err, systemConfig) =>\n err ? reject(err) : resolve(systemConfig)));\n\n return this._promises.systemConfigCommon;\n }\n\n /**\n * Get the repository in compact form (only version and icon).\n * @param {string} host\n * @param {boolean} [update] Force update.\n * @param {number} [timeoutMs] timeout in ms.\n * @returns {Promise<any>}\n */\n getCompactRepository(host, update, timeoutMs) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n if (!update && this._promises.repoCompact) {\n return this._promises.repoCompact;\n }\n\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n if (!host.startsWith('system.host.')) {\n host += 'system.host.' + host;\n }\n\n this._promises.repoCompact = new Promise((resolve, reject) => {\n let timeout = setTimeout(() => {\n if (timeout) {\n timeout = null;\n reject('getCompactRepository timeout');\n }\n }, timeoutMs || this.props.cmdTimeout);\n\n this._socket.emit('getCompactRepository', host, data => {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n if (data === PERMISSION_ERROR) {\n reject('May not read \"getCompactRepository\"');\n } else if (!data) {\n reject('Cannot read \"getCompactRepository\"');\n } else {\n resolve(data);\n }\n }\n });\n });\n\n return this._promises.repoCompact;\n }\n\n /**\n * Get the list of all hosts in compact form (only _id, common.name, common.icon, common.color, native.hardware.networkInterfaces)\n * @param {boolean} [update] Force update.\n * @returns {Promise<ioBroker.Object[]>}\n */\n getCompactHosts(update) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n if (!update && this._promises.hostsCompact) {\n return this._promises.hostsCompact;\n }\n\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n this._promises.hostsCompact = new Promise((resolve, reject) =>\n this._socket.emit('getCompactHosts', (err, hosts) =>\n err ? reject(err) : resolve(hosts)));\n\n return this._promises.hostsCompact;\n }\n\n /**\n * Get uuid\n * @returns {Promise<ioBroker.Object[]>}\n */\n getUuid() {\n if (this._promises.uuid) {\n return this._promises.uuid;\n }\n\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n this._promises.uuid = this.getObject('system.meta.uuid')\n //@ts-ignore\n .then(obj => obj?.native?.uuid);\n\n return this._promises.uuid;\n }\n\n /**\n * Send log to ioBroker log\n * @param {string} [text] Log text\n * @param {string} [level] `info`, `debug`, `warn`, `error` or `silly`\n * @returns {void}\n */\n log(text, level) {\n text && this._socket.emit('log', text, level || 'debug');\n }\n\n /**\n * Logout current user\n * @returns {Promise<null>}\n */\n logout() {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n return new Promise((resolve, reject) =>\n this._socket.emit('logout', err =>\n err ? reject(err) : resolve(null)));\n }\n}\n\nConnection.Connection = {\n onLog: PropTypes.func,\n onReady: PropTypes.func,\n onProgress: PropTypes.func,\n};\n\nexport default Connection;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport withStyles from '@mui/styles/withStyles';\n\nimport Button from '@mui/material/Button';\nimport DialogTitle from '@mui/material/DialogTitle';\nimport DialogContent from '@mui/material/DialogContent';\nimport DialogActions from '@mui/material/DialogActions';\nimport Dialog from '@mui/material/Dialog';\n\nimport IconOk from '@mui/icons-material/Check';\nimport IconCancel from '@mui/icons-material/Cancel';\nimport IconClear from '@mui/icons-material/Delete';\n\nimport ComplexCron from '../Components/ComplexCron';\n\nimport I18n from '../i18n';\n\n// Generate cron expression\nconst styles = theme => ({\n headerID: {\n fontWeight: 'bold',\n fontStyle: 'italic'\n },\n radio: {\n display: 'inline-block'\n },\n dialogPaper: {\n height: 'calc(100% - 96px)'\n }\n});\n\nclass DialogComplexCron extends React.Component {\n constructor(props) {\n super(props);\n let cron;\n if (this.props.cron && typeof this.props.cron === 'string' && this.props.cron.replace(/^[\"']/, '')[0] !== '{') {\n cron = this.props.cron.replace(/['\"]/g, '').trim();\n } else {\n cron = this.props.cron || '{}';\n if (typeof cron === 'string') {\n cron = cron.replace(/^[\"']/, '').replace(/[\"']\\n?$/, '');\n }\n }\n\n this.state = {\n cron,\n };\n }\n\n handleCancel() {\n this.props.onClose();\n }\n\n handleOk() {\n this.props.onOk(this.state.cron);\n this.props.onClose();\n }\n\n handleClear() {\n this.props.onOk(false);\n this.props.onClose();\n }\n\n render() {\n return <Dialog\n onClose={() => {}}\n maxWidth=\"md\"\n fullWidth={true}\n classes={{paper: this.props.classes.dialogPaper}}\n open={true}\n aria-labelledby=\"cron-dialog-title\"\n >\n <DialogTitle id=\"cron-dialog-title\">{this.props.title || I18n.t('ra_Define schedule...')}</DialogTitle>\n <DialogContent style={{height: '100%', overflow: 'hidden'}}>\n <ComplexCron\n cronExpression={this.state.cron}\n onChange={cron => this.setState({cron})}\n language={I18n.getLanguage()}\n />\n </DialogContent>\n <DialogActions>\n {!!this.props.clearButton && <Button color=\"grey\" variant=\"contained\" onClick={() => this.handleClear()} startIcon={<IconClear />}>{this.props.clear || I18n.t('ra_Clear')}</Button>}\n <Button variant=\"contained\" onClick={() => this.handleOk()} color=\"primary\" startIcon={<IconOk />}>{this.props.ok || I18n.t('ra_Ok')}</Button>\n <Button color=\"grey\" variant=\"contained\" onClick={() => this.handleCancel()} startIcon={<IconCancel />}>{this.props.cancel || I18n.t('ra_Cancel')}</Button>\n </DialogActions>\n </Dialog>;\n }\n}\n\nDialogComplexCron.propTypes = {\n classes: PropTypes.object,\n onClose: PropTypes.func.isRequired,\n onOk: PropTypes.func.isRequired,\n title: PropTypes.string,\n cron: PropTypes.string,\n cancel: PropTypes.string,\n ok: PropTypes.string,\n simple: PropTypes.bool,\n language: PropTypes.string,\n clearButton: PropTypes.bool,\n};\n\nexport default withStyles(styles)(DialogComplexCron);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport withStyles from '@mui/styles/withStyles';\nimport Button from '@mui/material/Button';\nimport DialogTitle from '@mui/material/DialogTitle';\nimport DialogContent from '@mui/material/DialogContent';\nimport DialogActions from '@mui/material/DialogActions';\nimport Dialog from '@mui/material/Dialog';\n\nimport IconOk from '@mui/icons-material/Check';\nimport IconCancel from '@mui/icons-material/Cancel';\n\nimport SimpleCron from '../Components/SimpleCron';\n\nimport I18n from '../i18n';\n\n// Generate cron expression\n\nconst styles = theme => ({\n headerID: {\n fontWeight: 'bold',\n fontStyle: 'italic'\n },\n radio: {\n display: 'inline-block'\n },\n dialogPaper: {\n height: 'calc(100% - 96px)'\n },\n});\n\nclass DialogSimpleCron extends React.Component {\n constructor(props) {\n super(props);\n\n let cron;\n if (this.props.cron && typeof this.props.cron === 'string' && this.props.cron.replace(/^[\"']/, '')[0] !== '{') {\n cron = this.props.cron.replace(/['\"]/g, '').trim();\n } else {\n cron = this.props.cron || '{}';\n if (typeof cron === 'string') {\n cron = cron.replace(/^[\"']/, '').replace(/[\"']\\n?$/, '');\n }\n }\n\n this.state = {\n cron,\n };\n }\n\n handleCancel() {\n this.props.onClose();\n }\n\n handleOk() {\n this.props.onOk(this.state.cron);\n this.props.onClose();\n }\n\n render() {\n return <Dialog\n onClose={() => {}}\n maxWidth=\"md\"\n fullWidth={true}\n classes={{paper: this.props.classes.dialogPaper}}\n open={true}\n aria-labelledby=\"cron-dialog-title\"\n >\n <DialogTitle id=\"cron-dialog-title\">{this.props.title || I18n.t('ra_Define CRON...')}</DialogTitle>\n <DialogContent style={{height: '100%', overflow: 'hidden'}}>\n <SimpleCron\n cronExpression={this.state.cron}\n onChange={cron => this.setState({cron})}\n language={I18n.getLanguage()}\n />\n </DialogContent>\n <DialogActions>\n <Button variant=\"contained\" onClick={() => this.handleOk()} color=\"primary\" startIcon={<IconOk />}>{this.props.ok || I18n.t('ra_Ok')}</Button>\n <Button variant=\"contained\" onClick={() => this.handleCancel()} color=\"grey\" startIcon={<IconCancel />}>{this.props.cancel || I18n.t('ra_Cancel')}</Button>\n </DialogActions>\n </Dialog>;\n }\n}\n\nDialogSimpleCron.propTypes = {\n classes: PropTypes.object,\n onClose: PropTypes.func.isRequired,\n onOk: PropTypes.func.isRequired,\n title: PropTypes.string,\n cron: PropTypes.string,\n cancel: PropTypes.string,\n ok: PropTypes.string,\n simple: PropTypes.bool,\n language: PropTypes.string\n\n};\n\nexport default withStyles(styles)(DialogSimpleCron);\n","\n/**\n * Print the ioBroker welcome screen to the developer console.\n */\nfunction printPrompt() {\n const prompt = `\n██╗ ██████╗ ██████╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗ \n██║██╔═══██╗██╔══██╗██╔══██╗██╔═══██╗██║ ██╔╝██╔════╝██╔══██╗\n██║██║ ██║██████╔╝██████╔╝██║ ██║█████╔╝ █████╗ ██████╔╝\n██║██║ ██║██╔══██╗██╔══██╗██║ ██║██╔═██╗ ██╔══╝ ██╔══██╗\n██║╚██████╔╝██████╔╝██║ ██║╚██████╔╝██║ ██╗███████╗██║ ██║\n╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝\n`;\n\n console.log(prompt);\n console.log('Nice to see you here! :) Join our dev community here https://github.com/ioBroker/ioBroker or here https://github.com/iobroker-community-adapters');\n console.log('Help us to create open source project with reactJS!');\n console.log('See you :)');\n}\n\nexport default printPrompt;","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst IconFx = props => {\n return <svg onClick={e => props.onClick && props.onClick(e)} style={props.style || {}} viewBox=\"0 0 95 95\" width={props.width || 20} height={props.height || props.width || 20} xmlns=\"http://www.w3.org/2000/svg\" className={ props.className }>\n <path fill=\"currentColor\" d=\"M93.779,63.676c-0.981-1.082-2.24-1.653-3.639-1.653c-1.145,0-3.953,0.396-5.318,4.062\n\t\tc-0.344,0.922-0.443,1.413-0.907,1.363c-0.786-0.078-3.845-3.346-4.845-8.145l-2.482-11.6c1.961-3.177,3.977-5.629,5.988-7.292\n\t\tc1.08-0.882,2.314-1.349,3.808-1.43c3.815-0.26,5.203-0.74,6.14-1.399c1.547-1.115,2.397-2.728,2.397-4.542\n\t\tc0-1.596-0.604-3.019-1.75-4.115c-1.106-1.059-2.581-1.618-4.26-1.618c-2.468,0-5.239,1.142-8.474,3.49\n\t\tc-1.91,1.388-3.935,3.406-6.121,6.111c-0.711-2.653-1.319-3.889-1.771-4.628c-1.396-2.303-3.664-2.303-4.41-2.303l-0.813,0.013\n\t\tl-23.045,0.544l1.297-5.506c0.828-3.593,1.915-6.436,3.226-8.45c0.638-0.98,1.614-2.148,2.638-2.148\n\t\tc0.387,0,1.152,0.063,2.582,0.36c3.978,0.86,5.465,0.959,6.239,0.959c1.708,0,3.21-0.571,4.347-1.651\n\t\tc1.176-1.119,1.797-2.583,1.797-4.233c0-1.29-0.424-3.156-2.445-4.722c-1.396-1.081-3.311-1.629-5.691-1.629\n\t\tc-3.568,0-7.349,1.141-11.241,3.39c-3.862,2.232-7.038,5.317-9.438,9.171c-2.105,3.379-3.929,8.124-5.555,14.459H21.877\n\t\tl-2.238,8.831h10.186l-7.74,31.116c-1.603,6.443-2.777,8.028-3.098,8.361c-0.875,0.904-2.68,1.094-4.04,1.094\n\t\tc-1.683,0-3.477-0.121-5.349-0.361c-1.286-0.157-2.265-0.234-2.991-0.234c-1.878,0-3.423,0.488-4.59,1.448\n\t\tC0.716,81.858,0,83.403,0,85.14c0,1.357,0.44,3.309,2.539,4.895c1.434,1.08,3.389,1.628,5.813,1.628\n\t\tc6.069,0,11.725-2.411,16.813-7.165c4.947-4.624,8.571-11.413,10.773-20.195l6.119-24.935l20.87,0.354l2.244,9.64l-4.573,6.748\n\t\tc-0.824,1.209-2.051,2.701-3.658,4.441c-0.84,0.92-1.398,1.426-1.721,1.689c-1.316-1.608-2.809-2.424-4.432-2.424\n\t\tc-1.525,0-2.91,0.625-4.002,1.804c-1.036,1.116-1.583,2.514-1.583,4.038c0,1.83,0.783,3.459,2.264,4.709\n\t\tc1.357,1.146,3.034,1.728,4.981,1.728c2.414,0,4.884-0.921,7.344-2.737c2.053-1.519,4.697-4.526,8.074-9.189\n\t\tc2.17,6.24,5.248,10.252,6.714,11.927c2.313,2.644,6.049,4.22,9.993,4.22c3.348,0,5.244-1.402,6.916-2.641l0.148-0.109\n\t\tc2.926-2.164,3.54-4.545,3.54-6.166C95.174,65.965,94.691,64.679,93.779,63.676z\"/>\n </svg>;\n}\n\nIconFx.propTypes = {\n onClick: PropTypes.func,\n width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n className: PropTypes.string\n};\n\nexport default IconFx;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _jsxRuntime = require(\"react/jsx-runtime\");\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"m20.71 5.63-2.34-2.34a.9959.9959 0 0 0-1.41 0l-3.12 3.12-1.93-1.91-1.41 1.41 1.42 1.42L3 16.25V21h4.75l8.92-8.92 1.42 1.42 1.41-1.41-1.92-1.92 3.12-3.12c.4-.4.4-1.03.01-1.42zM6.92 19 5 17.08l8.06-8.06 1.92 1.92L6.92 19z\"\n}), 'Colorize');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _jsxRuntime = require(\"react/jsx-runtime\");\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M16 13h-3V3h-2v10H8l4 4 4-4zM4 19v2h16v-2H4z\"\n}), 'VerticalAlignBottom');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _jsxRuntime = require(\"react/jsx-runtime\");\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M8 11h3v10h2V11h3l-4-4-4 4zM4 3v2h16V3H4z\"\n}), 'VerticalAlignTop');\n\nexports.default = _default;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"animation\", \"className\", \"component\", \"height\", \"style\", \"variant\", \"width\"];\n\nlet _ = t => t,\n _t,\n _t2,\n _t3,\n _t4;\n\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport PropTypes from 'prop-types';\nimport { keyframes, css } from '@mui/system';\nimport { unstable_composeClasses as composeClasses } from '@mui/base';\nimport { alpha, unstable_getUnit as getUnit, unstable_toUnitless as toUnitless } from '../styles';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport { getSkeletonUtilityClass } from './skeletonClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n variant,\n animation,\n hasChildren,\n width,\n height\n } = ownerState;\n const slots = {\n root: ['root', variant, animation, hasChildren && 'withChildren', hasChildren && !width && 'fitContent', hasChildren && !height && 'heightAuto']\n };\n return composeClasses(slots, getSkeletonUtilityClass, classes);\n};\n\nconst pulseKeyframe = keyframes(_t || (_t = _`\n 0% {\n opacity: 1;\n }\n\n 50% {\n opacity: 0.4;\n }\n\n 100% {\n opacity: 1;\n }\n`));\nconst waveKeyframe = keyframes(_t2 || (_t2 = _`\n 0% {\n transform: translateX(-100%);\n }\n\n 50% {\n /* +0.5s of delay between each loop */\n transform: translateX(100%);\n }\n\n 100% {\n transform: translateX(100%);\n }\n`));\nconst SkeletonRoot = styled('span', {\n name: 'MuiSkeleton',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[ownerState.variant], ownerState.animation !== false && styles[ownerState.animation], ownerState.hasChildren && styles.withChildren, ownerState.hasChildren && !ownerState.width && styles.fitContent, ownerState.hasChildren && !ownerState.height && styles.heightAuto];\n }\n})(({\n theme,\n ownerState\n}) => {\n const radiusUnit = getUnit(theme.shape.borderRadius) || 'px';\n const radiusValue = toUnitless(theme.shape.borderRadius);\n return _extends({\n display: 'block',\n // Create a \"on paper\" color with sufficient contrast retaining the color\n backgroundColor: theme.vars ? theme.vars.palette.Skeleton.bg : alpha(theme.palette.text.primary, theme.palette.mode === 'light' ? 0.11 : 0.13),\n height: '1.2em'\n }, ownerState.variant === 'text' && {\n marginTop: 0,\n marginBottom: 0,\n height: 'auto',\n transformOrigin: '0 55%',\n transform: 'scale(1, 0.60)',\n borderRadius: `${radiusValue}${radiusUnit}/${Math.round(radiusValue / 0.6 * 10) / 10}${radiusUnit}`,\n '&:empty:before': {\n content: '\"\\\\00a0\"'\n }\n }, ownerState.variant === 'circular' && {\n borderRadius: '50%'\n }, ownerState.variant === 'rounded' && {\n borderRadius: (theme.vars || theme).shape.borderRadius\n }, ownerState.hasChildren && {\n '& > *': {\n visibility: 'hidden'\n }\n }, ownerState.hasChildren && !ownerState.width && {\n maxWidth: 'fit-content'\n }, ownerState.hasChildren && !ownerState.height && {\n height: 'auto'\n });\n}, ({\n ownerState\n}) => ownerState.animation === 'pulse' && css(_t3 || (_t3 = _`\n animation: ${0} 1.5s ease-in-out 0.5s infinite;\n `), pulseKeyframe), ({\n ownerState,\n theme\n}) => ownerState.animation === 'wave' && css(_t4 || (_t4 = _`\n position: relative;\n overflow: hidden;\n\n /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */\n -webkit-mask-image: -webkit-radial-gradient(white, black);\n\n &::after {\n animation: ${0} 1.6s linear 0.5s infinite;\n background: linear-gradient(\n 90deg,\n transparent,\n ${0},\n transparent\n );\n content: '';\n position: absolute;\n transform: translateX(-100%); /* Avoid flash during server-side hydration */\n bottom: 0;\n left: 0;\n right: 0;\n top: 0;\n }\n `), waveKeyframe, (theme.vars || theme).palette.action.hover));\nconst Skeleton = /*#__PURE__*/React.forwardRef(function Skeleton(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiSkeleton'\n });\n\n const {\n animation = 'pulse',\n className,\n component = 'span',\n height,\n style,\n variant = 'text',\n width\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n animation,\n component,\n variant,\n hasChildren: Boolean(other.children)\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(SkeletonRoot, _extends({\n as: component,\n ref: ref,\n className: clsx(classes.root, className),\n ownerState: ownerState\n }, other, {\n style: _extends({\n width,\n height\n }, style)\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Skeleton.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The animation.\n * If `false` the animation effect is disabled.\n * @default 'pulse'\n */\n animation: PropTypes.oneOf(['pulse', 'wave', false]),\n\n /**\n * Optional children to infer width and height from.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n\n /**\n * Height of the skeleton.\n * Useful when you don't want to adapt the skeleton to a text element but for instance a card.\n */\n height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * @ignore\n */\n style: PropTypes.object,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n\n /**\n * The type of content that will be rendered.\n * @default 'text'\n */\n variant: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['circular', 'rectangular', 'rounded', 'text']), PropTypes.string]),\n\n /**\n * Width of the skeleton.\n * Useful when the skeleton is inside an inline element with no width of its own.\n */\n width: PropTypes.oneOfType([PropTypes.number, PropTypes.string])\n} : void 0;\nexport default Skeleton;","import { generateUtilityClass, generateUtilityClasses } from '@mui/base';\nexport function getSkeletonUtilityClass(slot) {\n return generateUtilityClass('MuiSkeleton', slot);\n}\nconst skeletonClasses = generateUtilityClasses('MuiSkeleton', ['root', 'text', 'rectangular', 'rounded', 'circular', 'pulse', 'wave', 'withChildren', 'fitContent', 'heightAuto']);\nexport default skeletonClasses;","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z\"\n}), 'ArrowDownward');","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"active\", \"children\", \"className\", \"direction\", \"hideSortIcon\", \"IconComponent\"];\nimport { unstable_composeClasses as composeClasses } from '@mui/base';\nimport clsx from 'clsx';\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\nimport ButtonBase from '../ButtonBase';\nimport ArrowDownwardIcon from '../internal/svg-icons/ArrowDownward';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport capitalize from '../utils/capitalize';\nimport tableSortLabelClasses, { getTableSortLabelUtilityClass } from './tableSortLabelClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n direction,\n active\n } = ownerState;\n const slots = {\n root: ['root', active && 'active'],\n icon: ['icon', `iconDirection${capitalize(direction)}`]\n };\n return composeClasses(slots, getTableSortLabelUtilityClass, classes);\n};\n\nconst TableSortLabelRoot = styled(ButtonBase, {\n name: 'MuiTableSortLabel',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.active && styles.active];\n }\n})(({\n theme\n}) => ({\n cursor: 'pointer',\n display: 'inline-flex',\n justifyContent: 'flex-start',\n flexDirection: 'inherit',\n alignItems: 'center',\n '&:focus': {\n color: (theme.vars || theme).palette.text.secondary\n },\n '&:hover': {\n color: (theme.vars || theme).palette.text.secondary,\n [`& .${tableSortLabelClasses.icon}`]: {\n opacity: 0.5\n }\n },\n [`&.${tableSortLabelClasses.active}`]: {\n color: (theme.vars || theme).palette.text.primary,\n [`& .${tableSortLabelClasses.icon}`]: {\n opacity: 1,\n color: (theme.vars || theme).palette.text.secondary\n }\n }\n}));\nconst TableSortLabelIcon = styled('span', {\n name: 'MuiTableSortLabel',\n slot: 'Icon',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.icon, styles[`iconDirection${capitalize(ownerState.direction)}`]];\n }\n})(({\n theme,\n ownerState\n}) => _extends({\n fontSize: 18,\n marginRight: 4,\n marginLeft: 4,\n opacity: 0,\n transition: theme.transitions.create(['opacity', 'transform'], {\n duration: theme.transitions.duration.shorter\n }),\n userSelect: 'none'\n}, ownerState.direction === 'desc' && {\n transform: 'rotate(0deg)'\n}, ownerState.direction === 'asc' && {\n transform: 'rotate(180deg)'\n}));\n/**\n * A button based label for placing inside `TableCell` for column sorting.\n */\n\nconst TableSortLabel = /*#__PURE__*/React.forwardRef(function TableSortLabel(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiTableSortLabel'\n });\n\n const {\n active = false,\n children,\n className,\n direction = 'asc',\n hideSortIcon = false,\n IconComponent = ArrowDownwardIcon\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n active,\n direction,\n hideSortIcon,\n IconComponent\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsxs(TableSortLabelRoot, _extends({\n className: clsx(classes.root, className),\n component: \"span\",\n disableRipple: true,\n ownerState: ownerState,\n ref: ref\n }, other, {\n children: [children, hideSortIcon && !active ? null : /*#__PURE__*/_jsx(TableSortLabelIcon, {\n as: IconComponent,\n className: clsx(classes.icon),\n ownerState: ownerState\n })]\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? TableSortLabel.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, the label will have the active styling (should be true for the sorted column).\n * @default false\n */\n active: PropTypes.bool,\n\n /**\n * Label contents, the arrow will be appended automatically.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The current sort direction.\n * @default 'asc'\n */\n direction: PropTypes.oneOf(['asc', 'desc']),\n\n /**\n * Hide sort icon when active is false.\n * @default false\n */\n hideSortIcon: PropTypes.bool,\n\n /**\n * Sort icon to use.\n * @default ArrowDownwardIcon\n */\n IconComponent: PropTypes.elementType,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default TableSortLabel;","import { generateUtilityClass, generateUtilityClasses } from '@mui/base';\nexport function getTableSortLabelUtilityClass(slot) {\n return generateUtilityClass('MuiTableSortLabel', slot);\n}\nconst tableSortLabelClasses = generateUtilityClasses('MuiTableSortLabel', ['root', 'active', 'icon', 'iconDirectionDesc', 'iconDirectionAsc']);\nexport default tableSortLabelClasses;","import { generateUtilityClass, generateUtilityClasses } from '@mui/material';\nexport const getCalendarPickerSkeletonUtilityClass = slot => generateUtilityClass('MuiCalendarPickerSkeleton', slot);\nexport const calendarPickerSkeletonClasses = generateUtilityClasses('MuiCalendarPickerSkeleton', ['root', 'week', 'daySkeleton']);","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"className\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport Skeleton from '@mui/material/Skeleton';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport { unstable_composeClasses as composeClasses } from '@mui/material';\nimport { DAY_SIZE, DAY_MARGIN } from '../internals/constants/dimensions';\nimport { getCalendarPickerSkeletonUtilityClass } from './calendarPickerSkeletonClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n week: ['week'],\n daySkeleton: ['daySkeleton']\n };\n return composeClasses(slots, getCalendarPickerSkeletonUtilityClass, classes);\n};\n\nconst CalendarPickerSkeletonRoot = styled('div', {\n name: 'MuiCalendarPickerSkeleton',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({\n alignSelf: 'start'\n});\nconst CalendarPickerSkeletonWeek = styled('div', {\n name: 'MuiCalendarPickerSkeleton',\n slot: 'Week',\n overridesResolver: (props, styles) => styles.week\n})({\n margin: `${DAY_MARGIN}px 0`,\n display: 'flex',\n justifyContent: 'center'\n});\nconst CalendarPickerSkeletonDay = styled(Skeleton, {\n name: 'MuiCalendarPickerSkeleton',\n slot: 'Day',\n overridesResolver: (props, styles) => styles.daySkeleton\n})(({\n ownerState\n}) => _extends({\n margin: `0 ${DAY_MARGIN}px`\n}, ownerState.day === 0 && {\n visibility: 'hidden'\n}));\nCalendarPickerSkeletonDay.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n ownerState: PropTypes.shape({\n day: PropTypes.number.isRequired\n }).isRequired\n};\nconst monthMap = [[0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0, 0]];\n/**\n *\n * Demos:\n *\n * - [Date Picker](https://mui.com/x/react-date-pickers/date-picker/)\n *\n * API:\n *\n * - [CalendarPickerSkeleton API](https://mui.com/x/api/date-pickers/calendar-picker-skeleton/)\n */\n\nfunction CalendarPickerSkeleton(props) {\n const _useThemeProps = useThemeProps({\n props,\n name: 'MuiCalendarPickerSkeleton'\n }),\n {\n className\n } = _useThemeProps,\n other = _objectWithoutPropertiesLoose(_useThemeProps, _excluded);\n\n const classes = useUtilityClasses(props);\n return /*#__PURE__*/_jsx(CalendarPickerSkeletonRoot, _extends({\n className: clsx(classes.root, className)\n }, other, {\n children: monthMap.map((week, index) => /*#__PURE__*/_jsx(CalendarPickerSkeletonWeek, {\n className: classes.week,\n children: week.map((day, index2) => /*#__PURE__*/_jsx(CalendarPickerSkeletonDay, {\n variant: \"circular\",\n width: DAY_SIZE,\n height: DAY_SIZE,\n className: classes.daySkeleton,\n ownerState: {\n day\n }\n }, index2))\n }, index))\n }));\n}\n\nprocess.env.NODE_ENV !== \"production\" ? CalendarPickerSkeleton.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport { CalendarPickerSkeleton };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { useThemeProps } from '@mui/material/styles';\nimport { useDefaultDates, useUtils } from '../internals/hooks/useUtils';\nimport { parsePickerInputValue } from '../internals/utils/date-utils';\nexport function useDateTimePickerDefaultizedProps(props, name) {\n var _themeProps$ampm, _ref, _themeProps$minDateTi, _ref2, _themeProps$maxDateTi, _themeProps$minDateTi2, _themeProps$maxDateTi2;\n\n // This is technically unsound if the type parameters appear in optional props.\n // Optional props can be filled by `useThemeProps` with types that don't match the type parameters.\n const themeProps = useThemeProps({\n props,\n name\n });\n const utils = useUtils();\n const defaultDates = useDefaultDates();\n const ampm = (_themeProps$ampm = themeProps.ampm) != null ? _themeProps$ampm : utils.is12HourCycleInCurrentLocale();\n\n if (themeProps.orientation != null && themeProps.orientation !== 'portrait') {\n throw new Error('We are not supporting custom orientation for DateTimePicker yet :(');\n }\n\n return _extends({\n ampm,\n orientation: 'portrait',\n openTo: 'day',\n views: ['year', 'day', 'hours', 'minutes'],\n ampmInClock: true,\n acceptRegex: ampm ? /[\\dap]/gi : /\\d/gi,\n disableMaskedInput: false,\n inputFormat: ampm ? utils.formats.keyboardDateTime12h : utils.formats.keyboardDateTime24h,\n disableIgnoringDatePartForTimeValidation: Boolean(themeProps.minDateTime || themeProps.maxDateTime)\n }, themeProps, {\n minDate: (_ref = (_themeProps$minDateTi = themeProps.minDateTime) != null ? _themeProps$minDateTi : themeProps.minDate) != null ? _ref : defaultDates.minDate,\n maxDate: (_ref2 = (_themeProps$maxDateTi = themeProps.maxDateTime) != null ? _themeProps$maxDateTi : themeProps.maxDate) != null ? _ref2 : defaultDates.maxDate,\n minTime: (_themeProps$minDateTi2 = themeProps.minDateTime) != null ? _themeProps$minDateTi2 : themeProps.minTime,\n maxTime: (_themeProps$maxDateTi2 = themeProps.maxDateTime) != null ? _themeProps$maxDateTi2 : themeProps.maxTime\n });\n}\nexport const dateTimePickerValueManager = {\n emptyValue: null,\n getTodayValue: utils => utils.date(),\n parseInput: parsePickerInputValue,\n areValuesEqual: (utils, a, b) => utils.isEqual(a, b)\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport Tab from '@mui/material/Tab';\nimport Tabs, { tabsClasses } from '@mui/material/Tabs';\nimport { styled } from '@mui/material/styles';\nimport { Time, DateRange } from '../internals/components/icons';\nimport { WrapperVariantContext } from '../internals/components/wrappers/WrapperVariantContext';\nimport { useLocaleText } from '../internals/hooks/useUtils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n\nconst viewToTab = openView => {\n if (['day', 'month', 'year'].includes(openView)) {\n return 'date';\n }\n\n return 'time';\n};\n\nconst tabToView = tab => {\n if (tab === 'date') {\n return 'day';\n }\n\n return 'hours';\n};\n\nconst DateTimePickerTabsRoot = styled(Tabs)(({\n ownerState,\n theme\n}) => _extends({\n boxShadow: `0 -1px 0 0 inset ${theme.palette.divider}`\n}, ownerState.wrapperVariant === 'desktop' && {\n order: 1,\n boxShadow: `0 1px 0 0 inset ${theme.palette.divider}`,\n [`& .${tabsClasses.indicator}`]: {\n bottom: 'auto',\n top: 0\n }\n}));\n/**\n * @ignore - internal component.\n */\n\nexport const DateTimePickerTabs = props => {\n const {\n dateRangeIcon = /*#__PURE__*/_jsx(DateRange, {}),\n onChange,\n timeIcon = /*#__PURE__*/_jsx(Time, {}),\n view\n } = props;\n const localeText = useLocaleText();\n const wrapperVariant = React.useContext(WrapperVariantContext);\n\n const ownerState = _extends({}, props, {\n wrapperVariant\n });\n\n const handleChange = (event, value) => {\n onChange(tabToView(value));\n };\n\n return /*#__PURE__*/_jsxs(DateTimePickerTabsRoot, {\n ownerState: ownerState,\n variant: \"fullWidth\",\n value: viewToTab(view),\n onChange: handleChange,\n children: [/*#__PURE__*/_jsx(Tab, {\n value: \"date\",\n \"aria-label\": localeText.dateTableLabel,\n icon: /*#__PURE__*/_jsx(React.Fragment, {\n children: dateRangeIcon\n })\n }), /*#__PURE__*/_jsx(Tab, {\n value: \"time\",\n \"aria-label\": localeText.timeTableLabel,\n icon: /*#__PURE__*/_jsx(React.Fragment, {\n children: timeIcon\n })\n })]\n });\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"ampm\", \"parsedValue\", \"dateRangeIcon\", \"hideTabs\", \"isMobileKeyboardViewOpen\", \"onChange\", \"openView\", \"setOpenView\", \"timeIcon\", \"toggleMobileKeyboardView\", \"toolbarFormat\", \"toolbarPlaceholder\", \"toolbarTitle\", \"views\"];\nimport * as React from 'react';\nimport { styled } from '@mui/material/styles';\nimport { generateUtilityClasses } from '@mui/material';\nimport { PickersToolbarText } from '../internals/components/PickersToolbarText';\nimport { PickersToolbar, pickersToolbarClasses } from '../internals/components/PickersToolbar';\nimport { PickersToolbarButton } from '../internals/components/PickersToolbarButton';\nimport { DateTimePickerTabs } from './DateTimePickerTabs';\nimport { useUtils } from '../internals/hooks/useUtils';\nimport { WrapperVariantContext } from '../internals/components/wrappers/WrapperVariantContext';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const dateTimePickerToolbarClasses = generateUtilityClasses('MuiDateTimePickerToolbar', ['root', 'dateContainer', 'timeContainer', 'separator']);\nconst DateTimePickerToolbarRoot = styled(PickersToolbar, {\n name: 'MuiDateTimePickerToolbar',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({\n paddingLeft: 16,\n paddingRight: 16,\n justifyContent: 'space-around',\n [`& .${pickersToolbarClasses.penIconButton}`]: {\n position: 'absolute',\n top: 8,\n right: 8\n }\n});\nconst DateTimePickerToolbarDateContainer = styled('div', {\n name: 'MuiDateTimePickerToolbar',\n slot: 'DateContainer',\n overridesResolver: (props, styles) => styles.dateContainer\n})({\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'flex-start'\n});\nconst DateTimePickerToolbarTimeContainer = styled('div', {\n name: 'MuiDateTimePickerToolbar',\n slot: 'TimeContainer',\n overridesResolver: (props, styles) => styles.timeContainer\n})({\n display: 'flex'\n});\nconst DateTimePickerToolbarSeparator = styled(PickersToolbarText, {\n name: 'MuiDateTimePickerToolbar',\n slot: 'Separator',\n overridesResolver: (props, styles) => styles.separator\n})({\n margin: '0 4px 0 2px',\n cursor: 'default'\n});\n/**\n * @ignore - internal component.\n */\n\nexport const DateTimePickerToolbar = props => {\n const {\n ampm,\n parsedValue,\n dateRangeIcon,\n hideTabs,\n isMobileKeyboardViewOpen,\n openView,\n setOpenView,\n timeIcon,\n toggleMobileKeyboardView,\n toolbarFormat,\n toolbarPlaceholder = '––',\n toolbarTitle = 'Select date & time',\n views\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const utils = useUtils();\n const wrapperVariant = React.useContext(WrapperVariantContext);\n const showTabs = wrapperVariant === 'desktop' ? true : !hideTabs && typeof window !== 'undefined' && window.innerHeight > 667;\n\n const formatHours = time => ampm ? utils.format(time, 'hours12h') : utils.format(time, 'hours24h');\n\n const dateText = React.useMemo(() => {\n if (!parsedValue) {\n return toolbarPlaceholder;\n }\n\n if (toolbarFormat) {\n return utils.formatByString(parsedValue, toolbarFormat);\n }\n\n return utils.format(parsedValue, 'shortDate');\n }, [parsedValue, toolbarFormat, toolbarPlaceholder, utils]);\n const ownerState = props;\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [wrapperVariant !== 'desktop' && /*#__PURE__*/_jsxs(DateTimePickerToolbarRoot, _extends({\n toolbarTitle: toolbarTitle,\n isMobileKeyboardViewOpen: isMobileKeyboardViewOpen,\n toggleMobileKeyboardView: toggleMobileKeyboardView,\n className: dateTimePickerToolbarClasses.root\n }, other, {\n isLandscape: false,\n ownerState: ownerState,\n children: [/*#__PURE__*/_jsxs(DateTimePickerToolbarDateContainer, {\n className: dateTimePickerToolbarClasses.dateContainer,\n ownerState: ownerState,\n children: [views.includes('year') && /*#__PURE__*/_jsx(PickersToolbarButton, {\n tabIndex: -1,\n variant: \"subtitle1\",\n onClick: () => setOpenView('year'),\n selected: openView === 'year',\n value: parsedValue ? utils.format(parsedValue, 'year') : '–'\n }), views.includes('day') && /*#__PURE__*/_jsx(PickersToolbarButton, {\n tabIndex: -1,\n variant: \"h4\",\n onClick: () => setOpenView('day'),\n selected: openView === 'day',\n value: dateText\n })]\n }), /*#__PURE__*/_jsxs(DateTimePickerToolbarTimeContainer, {\n className: dateTimePickerToolbarClasses.timeContainer,\n ownerState: ownerState,\n children: [views.includes('hours') && /*#__PURE__*/_jsx(PickersToolbarButton, {\n variant: \"h3\",\n onClick: () => setOpenView('hours'),\n selected: openView === 'hours',\n value: parsedValue ? formatHours(parsedValue) : '--'\n }), views.includes('minutes') && /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(DateTimePickerToolbarSeparator, {\n variant: \"h3\",\n value: \":\",\n className: dateTimePickerToolbarClasses.separator,\n ownerState: ownerState\n }), /*#__PURE__*/_jsx(PickersToolbarButton, {\n variant: \"h3\",\n onClick: () => setOpenView('minutes'),\n selected: openView === 'minutes',\n value: parsedValue ? utils.format(parsedValue, 'minutes') : '--'\n })]\n }), views.includes('seconds') && /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(DateTimePickerToolbarSeparator, {\n variant: \"h3\",\n value: \":\",\n className: dateTimePickerToolbarClasses.separator,\n ownerState: ownerState\n }), /*#__PURE__*/_jsx(PickersToolbarButton, {\n variant: \"h3\",\n onClick: () => setOpenView('seconds'),\n selected: openView === 'seconds',\n value: parsedValue ? utils.format(parsedValue, 'seconds') : '--'\n })]\n })]\n })]\n })), showTabs && /*#__PURE__*/_jsx(DateTimePickerTabs, {\n dateRangeIcon: dateRangeIcon,\n timeIcon: timeIcon,\n view: openView,\n onChange: setOpenView\n })]\n });\n};","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"minDate\", \"maxDate\", \"disableFuture\", \"shouldDisableDate\", \"disablePast\"];\nimport { useValidation } from './useValidation';\nimport { validateDate } from './useDateValidation';\nimport { validateTime } from './useTimeValidation';\nexport const validateDateTime = ({\n props,\n value,\n adapter\n}) => {\n const {\n minDate,\n maxDate,\n disableFuture,\n shouldDisableDate,\n disablePast\n } = props,\n timeValidationProps = _objectWithoutPropertiesLoose(props, _excluded);\n\n const dateValidationResult = validateDate({\n adapter,\n value,\n props: {\n minDate,\n maxDate,\n disableFuture,\n shouldDisableDate,\n disablePast\n }\n });\n\n if (dateValidationResult !== null) {\n return dateValidationResult;\n }\n\n return validateTime({\n adapter,\n value,\n props: timeValidationProps\n });\n};\n\nconst isSameDateTimeError = (a, b) => a === b;\n\nexport function useDateTimeValidation(props) {\n return useValidation(props, validateDateTime, isSameDateTimeError);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"onChange\", \"PaperProps\", \"PopperProps\", \"ToolbarComponent\", \"TransitionComponent\", \"value\", \"components\", \"componentsProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { useDateTimePickerDefaultizedProps, dateTimePickerValueManager } from '../DateTimePicker/shared';\nimport { DateTimePickerToolbar } from '../DateTimePicker/DateTimePickerToolbar';\nimport { DesktopWrapper } from '../internals/components/wrappers/DesktopWrapper';\nimport { CalendarOrClockPicker } from '../internals/components/CalendarOrClockPicker';\nimport { useDateTimeValidation } from '../internals/hooks/validation/useDateTimeValidation';\nimport { KeyboardDateInput } from '../internals/components/KeyboardDateInput';\nimport { usePickerState } from '../internals/hooks/usePickerState';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\n/**\n *\n * Demos:\n *\n * - [Date Time Picker](https://mui.com/x/react-date-pickers/date-time-picker/)\n *\n * API:\n *\n * - [DesktopDateTimePicker API](https://mui.com/x/api/date-pickers/desktop-date-time-picker/)\n */\nexport const DesktopDateTimePicker = /*#__PURE__*/React.forwardRef(function DesktopDateTimePicker(inProps, ref) {\n const props = useDateTimePickerDefaultizedProps(inProps, 'MuiDesktopDateTimePicker');\n const validationError = useDateTimeValidation(props) !== null;\n const {\n pickerProps,\n inputProps,\n wrapperProps\n } = usePickerState(props, dateTimePickerValueManager);\n\n const {\n PaperProps,\n PopperProps,\n ToolbarComponent = DateTimePickerToolbar,\n TransitionComponent,\n components,\n componentsProps\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const AllDateInputProps = _extends({}, inputProps, other, {\n components,\n componentsProps,\n ref,\n validationError\n });\n\n return /*#__PURE__*/_jsx(DesktopWrapper, _extends({}, wrapperProps, {\n DateInputProps: AllDateInputProps,\n KeyboardDateInputComponent: KeyboardDateInput,\n PopperProps: PopperProps,\n PaperProps: PaperProps,\n TransitionComponent: TransitionComponent,\n components: components,\n componentsProps: componentsProps,\n children: /*#__PURE__*/_jsx(CalendarOrClockPicker, _extends({}, pickerProps, {\n autoFocus: true,\n toolbarTitle: props.label || props.toolbarTitle,\n ToolbarComponent: ToolbarComponent,\n DateInputProps: AllDateInputProps,\n components: components,\n componentsProps: componentsProps\n }, other))\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? DesktopDateTimePicker.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Regular expression to detect \"accepted\" symbols.\n * @default /\\dap/gi\n */\n acceptRegex: PropTypes.instanceOf(RegExp),\n\n /**\n * 12h/24h view for hour selection clock.\n * @default `utils.is12HourCycleInCurrentLocale()`\n */\n ampm: PropTypes.bool,\n\n /**\n * Display ampm controls under the clock (instead of in the toolbar).\n * @default false\n */\n ampmInClock: PropTypes.bool,\n autoFocus: PropTypes.bool,\n children: PropTypes.node,\n\n /**\n * className applied to the root component.\n */\n className: PropTypes.string,\n\n /**\n * If `true` the popup or dialog will immediately close after submitting full date.\n * @default `true` for Desktop, `false` for Mobile (based on the chosen wrapper and `desktopModeMediaQuery` prop).\n */\n closeOnSelect: PropTypes.bool,\n\n /**\n * Overrideable components.\n * @default {}\n */\n components: PropTypes.object,\n\n /**\n * The props used for each component slot.\n * @default {}\n */\n componentsProps: PropTypes.object,\n\n /**\n * Date tab icon.\n */\n dateRangeIcon: PropTypes.node,\n\n /**\n * Formats the day of week displayed in the calendar header.\n * @param {string} day The day of week provided by the adapter's method `getWeekdays`.\n * @returns {string} The name to display.\n * @default (day) => day.charAt(0).toUpperCase()\n */\n dayOfWeekFormatter: PropTypes.func,\n\n /**\n * Default calendar month displayed when `value={null}`.\n */\n defaultCalendarMonth: PropTypes.any,\n\n /**\n * If `true`, the picker and text field are disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true` future days are disabled.\n * @default false\n */\n disableFuture: PropTypes.bool,\n\n /**\n * If `true`, today's date is rendering without highlighting with circle.\n * @default false\n */\n disableHighlightToday: PropTypes.bool,\n\n /**\n * Do not ignore date part when validating min/max time.\n * @default false\n */\n disableIgnoringDatePartForTimeValidation: PropTypes.bool,\n\n /**\n * Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.\n * @default false\n */\n disableMaskedInput: PropTypes.bool,\n\n /**\n * Do not render open picker button (renders only text field with validation).\n * @default false\n */\n disableOpenPicker: PropTypes.bool,\n\n /**\n * If `true` past days are disabled.\n * @default false\n */\n disablePast: PropTypes.bool,\n\n /**\n * Accessible text that helps user to understand which time and view is selected.\n * @template TDate\n * @param {ClockPickerView} view The current view rendered.\n * @param {TDate | null} time The current time.\n * @param {MuiPickersAdapter<TDate>} adapter The current date adapter.\n * @returns {string} The clock label.\n * @deprecated Use the `localeText` prop of `LocalizationProvider` instead, see https://mui.com/x/react-date-pickers/localization\n * @default <TDate extends any>(\n * view: ClockView,\n * time: TDate | null,\n * adapter: MuiPickersAdapter<TDate>,\n * ) =>\n * `Select ${view}. ${\n * time === null ? 'No time selected' : `Selected time is ${adapter.format(time, 'fullTime')}`\n * }`\n */\n getClockLabelText: PropTypes.func,\n\n /**\n * Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType\n * @template TInputDate, TDate\n * @param {TInputDate} date The date from which we want to add an aria-text.\n * @param {MuiPickersAdapter<TDate>} utils The utils to manipulate the date.\n * @returns {string} The aria-text to render inside the dialog.\n * @default (date, utils) => `Choose date, selected date is ${utils.format(utils.date(date), 'fullDate')}`\n */\n getOpenDialogAriaText: PropTypes.func,\n\n /**\n * Get aria-label text for switching between views button.\n * @param {CalendarPickerView} currentView The view from which we want to get the button text.\n * @returns {string} The label of the view.\n * @deprecated Use the `localeText` prop of `LocalizationProvider` instead, see https://mui.com/x/react-date-pickers/localization\n */\n getViewSwitchingButtonText: PropTypes.func,\n\n /**\n * To show tabs.\n */\n hideTabs: PropTypes.bool,\n ignoreInvalidInputs: PropTypes.bool,\n\n /**\n * Props to pass to keyboard input adornment.\n */\n InputAdornmentProps: PropTypes.object,\n\n /**\n * Format string.\n */\n inputFormat: PropTypes.string,\n InputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.object\n })]),\n label: PropTypes.node,\n\n /**\n * Left arrow icon aria-label text.\n * @deprecated\n */\n leftArrowButtonText: PropTypes.string,\n\n /**\n * If `true` renders `LoadingComponent` in calendar instead of calendar view.\n * Can be used to preload information and show it in calendar.\n * @default false\n */\n loading: PropTypes.bool,\n\n /**\n * Custom mask. Can be used to override generate from format. (e.g. `__/__/____ __:__` or `__/__/____ __:__ _M`).\n */\n mask: PropTypes.string,\n\n /**\n * Maximal selectable date. @DateIOType\n */\n maxDate: PropTypes.any,\n\n /**\n * Maximal selectable moment of time with binding to date, to set max time in each day use `maxTime`.\n */\n maxDateTime: PropTypes.any,\n\n /**\n * Max time acceptable time.\n * For input validation date part of passed object will be ignored if `disableIgnoringDatePartForTimeValidation` not specified.\n */\n maxTime: PropTypes.any,\n\n /**\n * Minimal selectable date. @DateIOType\n */\n minDate: PropTypes.any,\n\n /**\n * Minimal selectable moment of time with binding to date, to set min time in each day use `minTime`.\n */\n minDateTime: PropTypes.any,\n\n /**\n * Min time acceptable time.\n * For input validation date part of passed object will be ignored if `disableIgnoringDatePartForTimeValidation` not specified.\n */\n minTime: PropTypes.any,\n\n /**\n * Step over minutes.\n * @default 1\n */\n minutesStep: PropTypes.number,\n\n /**\n * Callback fired when date is accepted @DateIOType.\n * @template TValue\n * @param {TValue} value The value that was just accepted.\n */\n onAccept: PropTypes.func,\n\n /**\n * Callback fired when the value (the selected date) changes @DateIOType.\n * @template TValue\n * @param {TValue} value The new parsed value.\n * @param {string} keyboardInputValue The current value of the keyboard input.\n */\n onChange: PropTypes.func.isRequired,\n\n /**\n * Callback fired when the popup requests to be closed.\n * Use in controlled mode (see open).\n */\n onClose: PropTypes.func,\n\n /**\n * Callback that fired when input value or new `value` prop validation returns **new** validation error (or value is valid after error).\n * In case of validation error detected `reason` prop return non-null value and `TextField` must be displayed in `error` state.\n * This can be used to render appropriate form error.\n *\n * [Read the guide](https://next.material-ui-pickers.dev/guides/forms) about form integration and error displaying.\n * @DateIOType\n *\n * @template TError, TInputValue\n * @param {TError} reason The reason why the current value is not valid.\n * @param {TInputValue} value The invalid value.\n */\n onError: PropTypes.func,\n\n /**\n * Callback firing on month change @DateIOType.\n * @template TDate\n * @param {TDate} month The new month.\n * @returns {void|Promise} -\n */\n onMonthChange: PropTypes.func,\n\n /**\n * Callback fired when the popup requests to be opened.\n * Use in controlled mode (see open).\n */\n onOpen: PropTypes.func,\n\n /**\n * Callback fired on view change.\n * @param {CalendarOrClockPickerView} view The new view.\n */\n onViewChange: PropTypes.func,\n\n /**\n * Callback firing on year change @DateIOType.\n * @template TDate\n * @param {TDate} year The new year.\n */\n onYearChange: PropTypes.func,\n\n /**\n * Control the popup or dialog open state.\n */\n open: PropTypes.bool,\n\n /**\n * Props to pass to keyboard adornment button.\n */\n OpenPickerButtonProps: PropTypes.object,\n\n /**\n * First view to show.\n */\n openTo: PropTypes.oneOf(['day', 'hours', 'minutes', 'month', 'seconds', 'year']),\n\n /**\n * Force rendering in particular orientation.\n */\n orientation: PropTypes.oneOf(['landscape', 'portrait']),\n\n /**\n * Paper props passed down to [Paper](https://mui.com/material-ui/api/paper/) component.\n */\n PaperProps: PropTypes.object,\n\n /**\n * Popper props passed down to [Popper](https://mui.com/material-ui/api/popper/) component.\n */\n PopperProps: PropTypes.object,\n\n /**\n * Make picker read only.\n * @default false\n */\n readOnly: PropTypes.bool,\n\n /**\n * Disable heavy animations.\n * @default typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)\n */\n reduceAnimations: PropTypes.bool,\n\n /**\n * Custom renderer for day. Check the [PickersDay](https://mui.com/x/api/date-pickers/pickers-day/) component.\n * @template TDate\n * @param {TDate} day The day to render.\n * @param {Array<TDate | null>} selectedDays The days currently selected.\n * @param {PickersDayProps<TDate>} pickersDayProps The props of the day to render.\n * @returns {JSX.Element} The element representing the day.\n */\n renderDay: PropTypes.func,\n\n /**\n * The `renderInput` prop allows you to customize the rendered input.\n * The `props` argument of this render prop contains props of [TextField](https://mui.com/material-ui/api/text-field/#props) that you need to forward.\n * Pay specific attention to the `ref` and `inputProps` keys.\n * @example ```jsx\n * renderInput={props => <TextField {...props} />}\n * ````\n * @param {MuiTextFieldPropsType} props The props of the input.\n * @returns {React.ReactNode} The node to render as the input.\n */\n renderInput: PropTypes.func.isRequired,\n\n /**\n * Component displaying when passed `loading` true.\n * @returns {React.ReactNode} The node to render when loading.\n * @default () => <span data-mui-test=\"loading-progress\">...</span>\n */\n renderLoading: PropTypes.func,\n\n /**\n * Custom formatter to be passed into Rifm component.\n * @param {string} str The un-formatted string.\n * @returns {string} The formatted string.\n */\n rifmFormatter: PropTypes.func,\n\n /**\n * Right arrow icon aria-label text.\n * @deprecated\n */\n rightArrowButtonText: PropTypes.string,\n\n /**\n * Disable specific date. @DateIOType\n * @template TDate\n * @param {TDate} day The date to test.\n * @returns {boolean} Returns `true` if the date should be disabled.\n */\n shouldDisableDate: PropTypes.func,\n\n /**\n * Disable specific months dynamically.\n * Works like `shouldDisableDate` but for month selection view @DateIOType.\n * @template TDate\n * @param {TDate} month The month to check.\n * @returns {boolean} If `true` the month will be disabled.\n */\n shouldDisableMonth: PropTypes.func,\n\n /**\n * Dynamically check if time is disabled or not.\n * If returns `false` appropriate time point will ot be acceptable.\n * @param {number} timeValue The value to check.\n * @param {ClockPickerView} clockType The clock type of the timeValue.\n * @returns {boolean} Returns `true` if the time should be disabled\n */\n shouldDisableTime: PropTypes.func,\n\n /**\n * Disable specific years dynamically.\n * Works like `shouldDisableDate` but for year selection view @DateIOType.\n * @template TDate\n * @param {TDate} year The year to test.\n * @returns {boolean} Returns `true` if the year should be disabled.\n */\n shouldDisableYear: PropTypes.func,\n\n /**\n * If `true`, days that have `outsideCurrentMonth={true}` are displayed.\n * @default false\n */\n showDaysOutsideCurrentMonth: PropTypes.bool,\n\n /**\n * If `true`, show the toolbar even in desktop mode.\n */\n showToolbar: PropTypes.bool,\n\n /**\n * Time tab icon.\n */\n timeIcon: PropTypes.node,\n\n /**\n * Component that will replace default toolbar renderer.\n * @default DateTimePickerToolbar\n */\n ToolbarComponent: PropTypes.elementType,\n\n /**\n * Date format, that is displaying in toolbar.\n */\n toolbarFormat: PropTypes.string,\n\n /**\n * Mobile picker date value placeholder, displaying if `value` === `null`.\n * @default '–'\n */\n toolbarPlaceholder: PropTypes.node,\n\n /**\n * Mobile picker title, displaying in the toolbar.\n * @default 'Select date & time'\n */\n toolbarTitle: PropTypes.node,\n\n /**\n * Custom component for popper [Transition](https://mui.com/material-ui/transitions/#transitioncomponent-prop).\n */\n TransitionComponent: PropTypes.elementType,\n\n /**\n * The value of the picker.\n */\n value: PropTypes.any,\n\n /**\n * Array of views to show.\n */\n views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'hours', 'minutes', 'month', 'seconds', 'year']).isRequired)\n} : void 0;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"ToolbarComponent\", \"value\", \"onChange\", \"components\", \"componentsProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { useDateTimePickerDefaultizedProps, dateTimePickerValueManager } from '../DateTimePicker/shared';\nimport { DateTimePickerToolbar } from '../DateTimePicker/DateTimePickerToolbar';\nimport { MobileWrapper } from '../internals/components/wrappers/MobileWrapper';\nimport { CalendarOrClockPicker } from '../internals/components/CalendarOrClockPicker';\nimport { useDateTimeValidation } from '../internals/hooks/validation/useDateTimeValidation';\nimport { PureDateInput } from '../internals/components/PureDateInput';\nimport { usePickerState } from '../internals/hooks/usePickerState';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\n/**\n *\n * Demos:\n *\n * - [Date Time Picker](https://mui.com/x/react-date-pickers/date-time-picker/)\n *\n * API:\n *\n * - [MobileDateTimePicker API](https://mui.com/x/api/date-pickers/mobile-date-time-picker/)\n */\nexport const MobileDateTimePicker = /*#__PURE__*/React.forwardRef(function MobileDateTimePicker(inProps, ref) {\n const props = useDateTimePickerDefaultizedProps(inProps, 'MuiMobileDateTimePicker');\n const validationError = useDateTimeValidation(props) !== null;\n const {\n pickerProps,\n inputProps,\n wrapperProps\n } = usePickerState(props, dateTimePickerValueManager); // Note that we are passing down all the value without spread.\n // It saves us >1kb gzip and make any prop available automatically on any level down.\n\n const {\n ToolbarComponent = DateTimePickerToolbar,\n components,\n componentsProps\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const DateInputProps = _extends({}, inputProps, other, {\n components,\n componentsProps,\n ref,\n validationError\n });\n\n return /*#__PURE__*/_jsx(MobileWrapper, _extends({}, other, wrapperProps, {\n DateInputProps: DateInputProps,\n PureDateInputComponent: PureDateInput,\n components: components,\n componentsProps: componentsProps,\n children: /*#__PURE__*/_jsx(CalendarOrClockPicker, _extends({}, pickerProps, {\n autoFocus: true,\n toolbarTitle: props.label || props.toolbarTitle,\n ToolbarComponent: ToolbarComponent,\n DateInputProps: DateInputProps,\n components: components,\n componentsProps: componentsProps\n }, other))\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? MobileDateTimePicker.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Regular expression to detect \"accepted\" symbols.\n * @default /\\dap/gi\n */\n acceptRegex: PropTypes.instanceOf(RegExp),\n\n /**\n * 12h/24h view for hour selection clock.\n * @default `utils.is12HourCycleInCurrentLocale()`\n */\n ampm: PropTypes.bool,\n\n /**\n * Display ampm controls under the clock (instead of in the toolbar).\n * @default false\n */\n ampmInClock: PropTypes.bool,\n autoFocus: PropTypes.bool,\n children: PropTypes.node,\n\n /**\n * className applied to the root component.\n */\n className: PropTypes.string,\n\n /**\n * If `true` the popup or dialog will immediately close after submitting full date.\n * @default `true` for Desktop, `false` for Mobile (based on the chosen wrapper and `desktopModeMediaQuery` prop).\n */\n closeOnSelect: PropTypes.bool,\n\n /**\n * Overrideable components.\n * @default {}\n */\n components: PropTypes.object,\n\n /**\n * The props used for each component slot.\n * @default {}\n */\n componentsProps: PropTypes.object,\n\n /**\n * Date tab icon.\n */\n dateRangeIcon: PropTypes.node,\n\n /**\n * Formats the day of week displayed in the calendar header.\n * @param {string} day The day of week provided by the adapter's method `getWeekdays`.\n * @returns {string} The name to display.\n * @default (day) => day.charAt(0).toUpperCase()\n */\n dayOfWeekFormatter: PropTypes.func,\n\n /**\n * Default calendar month displayed when `value={null}`.\n */\n defaultCalendarMonth: PropTypes.any,\n\n /**\n * Props applied to the [`Dialog`](https://mui.com/material-ui/api/dialog/) element.\n */\n DialogProps: PropTypes.object,\n\n /**\n * If `true`, the picker and text field are disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true` future days are disabled.\n * @default false\n */\n disableFuture: PropTypes.bool,\n\n /**\n * If `true`, today's date is rendering without highlighting with circle.\n * @default false\n */\n disableHighlightToday: PropTypes.bool,\n\n /**\n * Do not ignore date part when validating min/max time.\n * @default false\n */\n disableIgnoringDatePartForTimeValidation: PropTypes.bool,\n\n /**\n * Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.\n * @default false\n */\n disableMaskedInput: PropTypes.bool,\n\n /**\n * Do not render open picker button (renders only text field with validation).\n * @default false\n */\n disableOpenPicker: PropTypes.bool,\n\n /**\n * If `true` past days are disabled.\n * @default false\n */\n disablePast: PropTypes.bool,\n\n /**\n * Accessible text that helps user to understand which time and view is selected.\n * @template TDate\n * @param {ClockPickerView} view The current view rendered.\n * @param {TDate | null} time The current time.\n * @param {MuiPickersAdapter<TDate>} adapter The current date adapter.\n * @returns {string} The clock label.\n * @deprecated Use the `localeText` prop of `LocalizationProvider` instead, see https://mui.com/x/react-date-pickers/localization\n * @default <TDate extends any>(\n * view: ClockView,\n * time: TDate | null,\n * adapter: MuiPickersAdapter<TDate>,\n * ) =>\n * `Select ${view}. ${\n * time === null ? 'No time selected' : `Selected time is ${adapter.format(time, 'fullTime')}`\n * }`\n */\n getClockLabelText: PropTypes.func,\n\n /**\n * Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType\n * @template TInputDate, TDate\n * @param {TInputDate} date The date from which we want to add an aria-text.\n * @param {MuiPickersAdapter<TDate>} utils The utils to manipulate the date.\n * @returns {string} The aria-text to render inside the dialog.\n * @default (date, utils) => `Choose date, selected date is ${utils.format(utils.date(date), 'fullDate')}`\n */\n getOpenDialogAriaText: PropTypes.func,\n\n /**\n * Get aria-label text for switching between views button.\n * @param {CalendarPickerView} currentView The view from which we want to get the button text.\n * @returns {string} The label of the view.\n * @deprecated Use the `localeText` prop of `LocalizationProvider` instead, see https://mui.com/x/react-date-pickers/localization\n */\n getViewSwitchingButtonText: PropTypes.func,\n\n /**\n * To show tabs.\n */\n hideTabs: PropTypes.bool,\n ignoreInvalidInputs: PropTypes.bool,\n\n /**\n * Props to pass to keyboard input adornment.\n */\n InputAdornmentProps: PropTypes.object,\n\n /**\n * Format string.\n */\n inputFormat: PropTypes.string,\n InputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.object\n })]),\n label: PropTypes.node,\n\n /**\n * Left arrow icon aria-label text.\n * @deprecated\n */\n leftArrowButtonText: PropTypes.string,\n\n /**\n * If `true` renders `LoadingComponent` in calendar instead of calendar view.\n * Can be used to preload information and show it in calendar.\n * @default false\n */\n loading: PropTypes.bool,\n\n /**\n * Custom mask. Can be used to override generate from format. (e.g. `__/__/____ __:__` or `__/__/____ __:__ _M`).\n */\n mask: PropTypes.string,\n\n /**\n * Maximal selectable date. @DateIOType\n */\n maxDate: PropTypes.any,\n\n /**\n * Maximal selectable moment of time with binding to date, to set max time in each day use `maxTime`.\n */\n maxDateTime: PropTypes.any,\n\n /**\n * Max time acceptable time.\n * For input validation date part of passed object will be ignored if `disableIgnoringDatePartForTimeValidation` not specified.\n */\n maxTime: PropTypes.any,\n\n /**\n * Minimal selectable date. @DateIOType\n */\n minDate: PropTypes.any,\n\n /**\n * Minimal selectable moment of time with binding to date, to set min time in each day use `minTime`.\n */\n minDateTime: PropTypes.any,\n\n /**\n * Min time acceptable time.\n * For input validation date part of passed object will be ignored if `disableIgnoringDatePartForTimeValidation` not specified.\n */\n minTime: PropTypes.any,\n\n /**\n * Step over minutes.\n * @default 1\n */\n minutesStep: PropTypes.number,\n\n /**\n * Callback fired when date is accepted @DateIOType.\n * @template TValue\n * @param {TValue} value The value that was just accepted.\n */\n onAccept: PropTypes.func,\n\n /**\n * Callback fired when the value (the selected date) changes @DateIOType.\n * @template TValue\n * @param {TValue} value The new parsed value.\n * @param {string} keyboardInputValue The current value of the keyboard input.\n */\n onChange: PropTypes.func.isRequired,\n\n /**\n * Callback fired when the popup requests to be closed.\n * Use in controlled mode (see open).\n */\n onClose: PropTypes.func,\n\n /**\n * Callback that fired when input value or new `value` prop validation returns **new** validation error (or value is valid after error).\n * In case of validation error detected `reason` prop return non-null value and `TextField` must be displayed in `error` state.\n * This can be used to render appropriate form error.\n *\n * [Read the guide](https://next.material-ui-pickers.dev/guides/forms) about form integration and error displaying.\n * @DateIOType\n *\n * @template TError, TInputValue\n * @param {TError} reason The reason why the current value is not valid.\n * @param {TInputValue} value The invalid value.\n */\n onError: PropTypes.func,\n\n /**\n * Callback firing on month change @DateIOType.\n * @template TDate\n * @param {TDate} month The new month.\n * @returns {void|Promise} -\n */\n onMonthChange: PropTypes.func,\n\n /**\n * Callback fired when the popup requests to be opened.\n * Use in controlled mode (see open).\n */\n onOpen: PropTypes.func,\n\n /**\n * Callback fired on view change.\n * @param {CalendarOrClockPickerView} view The new view.\n */\n onViewChange: PropTypes.func,\n\n /**\n * Callback firing on year change @DateIOType.\n * @template TDate\n * @param {TDate} year The new year.\n */\n onYearChange: PropTypes.func,\n\n /**\n * Control the popup or dialog open state.\n */\n open: PropTypes.bool,\n\n /**\n * Props to pass to keyboard adornment button.\n */\n OpenPickerButtonProps: PropTypes.object,\n\n /**\n * First view to show.\n */\n openTo: PropTypes.oneOf(['day', 'hours', 'minutes', 'month', 'seconds', 'year']),\n\n /**\n * Force rendering in particular orientation.\n */\n orientation: PropTypes.oneOf(['landscape', 'portrait']),\n\n /**\n * Make picker read only.\n * @default false\n */\n readOnly: PropTypes.bool,\n\n /**\n * Disable heavy animations.\n * @default typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)\n */\n reduceAnimations: PropTypes.bool,\n\n /**\n * Custom renderer for day. Check the [PickersDay](https://mui.com/x/api/date-pickers/pickers-day/) component.\n * @template TDate\n * @param {TDate} day The day to render.\n * @param {Array<TDate | null>} selectedDays The days currently selected.\n * @param {PickersDayProps<TDate>} pickersDayProps The props of the day to render.\n * @returns {JSX.Element} The element representing the day.\n */\n renderDay: PropTypes.func,\n\n /**\n * The `renderInput` prop allows you to customize the rendered input.\n * The `props` argument of this render prop contains props of [TextField](https://mui.com/material-ui/api/text-field/#props) that you need to forward.\n * Pay specific attention to the `ref` and `inputProps` keys.\n * @example ```jsx\n * renderInput={props => <TextField {...props} />}\n * ````\n * @param {MuiTextFieldPropsType} props The props of the input.\n * @returns {React.ReactNode} The node to render as the input.\n */\n renderInput: PropTypes.func.isRequired,\n\n /**\n * Component displaying when passed `loading` true.\n * @returns {React.ReactNode} The node to render when loading.\n * @default () => <span data-mui-test=\"loading-progress\">...</span>\n */\n renderLoading: PropTypes.func,\n\n /**\n * Custom formatter to be passed into Rifm component.\n * @param {string} str The un-formatted string.\n * @returns {string} The formatted string.\n */\n rifmFormatter: PropTypes.func,\n\n /**\n * Right arrow icon aria-label text.\n * @deprecated\n */\n rightArrowButtonText: PropTypes.string,\n\n /**\n * Disable specific date. @DateIOType\n * @template TDate\n * @param {TDate} day The date to test.\n * @returns {boolean} Returns `true` if the date should be disabled.\n */\n shouldDisableDate: PropTypes.func,\n\n /**\n * Disable specific months dynamically.\n * Works like `shouldDisableDate` but for month selection view @DateIOType.\n * @template TDate\n * @param {TDate} month The month to check.\n * @returns {boolean} If `true` the month will be disabled.\n */\n shouldDisableMonth: PropTypes.func,\n\n /**\n * Dynamically check if time is disabled or not.\n * If returns `false` appropriate time point will ot be acceptable.\n * @param {number} timeValue The value to check.\n * @param {ClockPickerView} clockType The clock type of the timeValue.\n * @returns {boolean} Returns `true` if the time should be disabled\n */\n shouldDisableTime: PropTypes.func,\n\n /**\n * Disable specific years dynamically.\n * Works like `shouldDisableDate` but for year selection view @DateIOType.\n * @template TDate\n * @param {TDate} year The year to test.\n * @returns {boolean} Returns `true` if the year should be disabled.\n */\n shouldDisableYear: PropTypes.func,\n\n /**\n * If `true`, days that have `outsideCurrentMonth={true}` are displayed.\n * @default false\n */\n showDaysOutsideCurrentMonth: PropTypes.bool,\n\n /**\n * If `true`, show the toolbar even in desktop mode.\n */\n showToolbar: PropTypes.bool,\n\n /**\n * Time tab icon.\n */\n timeIcon: PropTypes.node,\n\n /**\n * Component that will replace default toolbar renderer.\n * @default DateTimePickerToolbar\n */\n ToolbarComponent: PropTypes.elementType,\n\n /**\n * Date format, that is displaying in toolbar.\n */\n toolbarFormat: PropTypes.string,\n\n /**\n * Mobile picker date value placeholder, displaying if `value` === `null`.\n * @default '–'\n */\n toolbarPlaceholder: PropTypes.node,\n\n /**\n * Mobile picker title, displaying in the toolbar.\n * @default 'Select date & time'\n */\n toolbarTitle: PropTypes.node,\n\n /**\n * The value of the picker.\n */\n value: PropTypes.any,\n\n /**\n * Array of views to show.\n */\n views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'hours', 'minutes', 'month', 'seconds', 'year']).isRequired)\n} : void 0;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"desktopModeMediaQuery\", \"DialogProps\", \"PopperProps\", \"TransitionComponent\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { useThemeProps } from '@mui/material/styles';\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport { DesktopDateTimePicker } from '../DesktopDateTimePicker';\nimport { MobileDateTimePicker } from '../MobileDateTimePicker';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\n/**\n *\n * Demos:\n *\n * - [Date Time Picker](https://mui.com/x/react-date-pickers/date-time-picker/)\n * - [Pickers](https://mui.com/x/react-date-pickers/)\n *\n * API:\n *\n * - [DateTimePicker API](https://mui.com/x/api/date-pickers/date-time-picker/)\n */\nconst DateTimePicker = /*#__PURE__*/React.forwardRef(function DateTimePicker(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiDateTimePicker'\n });\n\n const {\n desktopModeMediaQuery = '@media (pointer: fine)',\n DialogProps,\n PopperProps,\n TransitionComponent\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded); // defaults to `true` in environments where `window.matchMedia` would not be available (i.e. test/jsdom)\n\n\n const isDesktop = useMediaQuery(desktopModeMediaQuery, {\n defaultMatches: true\n });\n\n if (isDesktop) {\n return /*#__PURE__*/_jsx(DesktopDateTimePicker, _extends({\n ref: ref,\n PopperProps: PopperProps,\n TransitionComponent: TransitionComponent\n }, other));\n }\n\n return /*#__PURE__*/_jsx(MobileDateTimePicker, _extends({\n ref: ref,\n DialogProps: DialogProps\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? DateTimePicker.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Regular expression to detect \"accepted\" symbols.\n * @default /\\dap/gi\n */\n acceptRegex: PropTypes.instanceOf(RegExp),\n\n /**\n * 12h/24h view for hour selection clock.\n * @default `utils.is12HourCycleInCurrentLocale()`\n */\n ampm: PropTypes.bool,\n\n /**\n * Display ampm controls under the clock (instead of in the toolbar).\n * @default false\n */\n ampmInClock: PropTypes.bool,\n autoFocus: PropTypes.bool,\n children: PropTypes.node,\n\n /**\n * className applied to the root component.\n */\n className: PropTypes.string,\n\n /**\n * If `true` the popup or dialog will immediately close after submitting full date.\n * @default `true` for Desktop, `false` for Mobile (based on the chosen wrapper and `desktopModeMediaQuery` prop).\n */\n closeOnSelect: PropTypes.bool,\n\n /**\n * Overrideable components.\n * @default {}\n */\n components: PropTypes.object,\n\n /**\n * The props used for each component slot.\n * @default {}\n */\n componentsProps: PropTypes.object,\n\n /**\n * Date tab icon.\n */\n dateRangeIcon: PropTypes.node,\n\n /**\n * Formats the day of week displayed in the calendar header.\n * @param {string} day The day of week provided by the adapter's method `getWeekdays`.\n * @returns {string} The name to display.\n * @default (day) => day.charAt(0).toUpperCase()\n */\n dayOfWeekFormatter: PropTypes.func,\n\n /**\n * Default calendar month displayed when `value={null}`.\n */\n defaultCalendarMonth: PropTypes.any,\n\n /**\n * CSS media query when `Mobile` mode will be changed to `Desktop`.\n * @default '@media (pointer: fine)'\n * @example '@media (min-width: 720px)' or theme.breakpoints.up(\"sm\")\n */\n desktopModeMediaQuery: PropTypes.string,\n\n /**\n * Props applied to the [`Dialog`](https://mui.com/material-ui/api/dialog/) element.\n */\n DialogProps: PropTypes.object,\n\n /**\n * If `true`, the picker and text field are disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true` future days are disabled.\n * @default false\n */\n disableFuture: PropTypes.bool,\n\n /**\n * If `true`, today's date is rendering without highlighting with circle.\n * @default false\n */\n disableHighlightToday: PropTypes.bool,\n\n /**\n * Do not ignore date part when validating min/max time.\n * @default false\n */\n disableIgnoringDatePartForTimeValidation: PropTypes.bool,\n\n /**\n * Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.\n * @default false\n */\n disableMaskedInput: PropTypes.bool,\n\n /**\n * Do not render open picker button (renders only text field with validation).\n * @default false\n */\n disableOpenPicker: PropTypes.bool,\n\n /**\n * If `true` past days are disabled.\n * @default false\n */\n disablePast: PropTypes.bool,\n\n /**\n * Accessible text that helps user to understand which time and view is selected.\n * @template TDate\n * @param {ClockPickerView} view The current view rendered.\n * @param {TDate | null} time The current time.\n * @param {MuiPickersAdapter<TDate>} adapter The current date adapter.\n * @returns {string} The clock label.\n * @deprecated Use the `localeText` prop of `LocalizationProvider` instead, see https://mui.com/x/react-date-pickers/localization\n * @default <TDate extends any>(\n * view: ClockView,\n * time: TDate | null,\n * adapter: MuiPickersAdapter<TDate>,\n * ) =>\n * `Select ${view}. ${\n * time === null ? 'No time selected' : `Selected time is ${adapter.format(time, 'fullTime')}`\n * }`\n */\n getClockLabelText: PropTypes.func,\n\n /**\n * Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType\n * @template TInputDate, TDate\n * @param {TInputDate} date The date from which we want to add an aria-text.\n * @param {MuiPickersAdapter<TDate>} utils The utils to manipulate the date.\n * @returns {string} The aria-text to render inside the dialog.\n * @default (date, utils) => `Choose date, selected date is ${utils.format(utils.date(date), 'fullDate')}`\n */\n getOpenDialogAriaText: PropTypes.func,\n\n /**\n * Get aria-label text for switching between views button.\n * @param {CalendarPickerView} currentView The view from which we want to get the button text.\n * @returns {string} The label of the view.\n * @deprecated Use the `localeText` prop of `LocalizationProvider` instead, see https://mui.com/x/react-date-pickers/localization\n */\n getViewSwitchingButtonText: PropTypes.func,\n\n /**\n * To show tabs.\n */\n hideTabs: PropTypes.bool,\n ignoreInvalidInputs: PropTypes.bool,\n\n /**\n * Props to pass to keyboard input adornment.\n */\n InputAdornmentProps: PropTypes.object,\n\n /**\n * Format string.\n */\n inputFormat: PropTypes.string,\n InputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.object\n })]),\n label: PropTypes.node,\n\n /**\n * Left arrow icon aria-label text.\n * @deprecated\n */\n leftArrowButtonText: PropTypes.string,\n\n /**\n * If `true` renders `LoadingComponent` in calendar instead of calendar view.\n * Can be used to preload information and show it in calendar.\n * @default false\n */\n loading: PropTypes.bool,\n\n /**\n * Custom mask. Can be used to override generate from format. (e.g. `__/__/____ __:__` or `__/__/____ __:__ _M`).\n */\n mask: PropTypes.string,\n\n /**\n * Maximal selectable date. @DateIOType\n */\n maxDate: PropTypes.any,\n\n /**\n * Maximal selectable moment of time with binding to date, to set max time in each day use `maxTime`.\n */\n maxDateTime: PropTypes.any,\n\n /**\n * Max time acceptable time.\n * For input validation date part of passed object will be ignored if `disableIgnoringDatePartForTimeValidation` not specified.\n */\n maxTime: PropTypes.any,\n\n /**\n * Minimal selectable date. @DateIOType\n */\n minDate: PropTypes.any,\n\n /**\n * Minimal selectable moment of time with binding to date, to set min time in each day use `minTime`.\n */\n minDateTime: PropTypes.any,\n\n /**\n * Min time acceptable time.\n * For input validation date part of passed object will be ignored if `disableIgnoringDatePartForTimeValidation` not specified.\n */\n minTime: PropTypes.any,\n\n /**\n * Step over minutes.\n * @default 1\n */\n minutesStep: PropTypes.number,\n\n /**\n * Callback fired when date is accepted @DateIOType.\n * @template TValue\n * @param {TValue} value The value that was just accepted.\n */\n onAccept: PropTypes.func,\n\n /**\n * Callback fired when the value (the selected date) changes @DateIOType.\n * @template TValue\n * @param {TValue} value The new parsed value.\n * @param {string} keyboardInputValue The current value of the keyboard input.\n */\n onChange: PropTypes.func.isRequired,\n\n /**\n * Callback fired when the popup requests to be closed.\n * Use in controlled mode (see open).\n */\n onClose: PropTypes.func,\n\n /**\n * Callback that fired when input value or new `value` prop validation returns **new** validation error (or value is valid after error).\n * In case of validation error detected `reason` prop return non-null value and `TextField` must be displayed in `error` state.\n * This can be used to render appropriate form error.\n *\n * [Read the guide](https://next.material-ui-pickers.dev/guides/forms) about form integration and error displaying.\n * @DateIOType\n *\n * @template TError, TInputValue\n * @param {TError} reason The reason why the current value is not valid.\n * @param {TInputValue} value The invalid value.\n */\n onError: PropTypes.func,\n\n /**\n * Callback firing on month change @DateIOType.\n * @template TDate\n * @param {TDate} month The new month.\n * @returns {void|Promise} -\n */\n onMonthChange: PropTypes.func,\n\n /**\n * Callback fired when the popup requests to be opened.\n * Use in controlled mode (see open).\n */\n onOpen: PropTypes.func,\n\n /**\n * Callback fired on view change.\n * @param {CalendarOrClockPickerView} view The new view.\n */\n onViewChange: PropTypes.func,\n\n /**\n * Callback firing on year change @DateIOType.\n * @template TDate\n * @param {TDate} year The new year.\n */\n onYearChange: PropTypes.func,\n\n /**\n * Control the popup or dialog open state.\n */\n open: PropTypes.bool,\n\n /**\n * Props to pass to keyboard adornment button.\n */\n OpenPickerButtonProps: PropTypes.object,\n\n /**\n * First view to show.\n */\n openTo: PropTypes.oneOf(['day', 'hours', 'minutes', 'month', 'seconds', 'year']),\n\n /**\n * Force rendering in particular orientation.\n */\n orientation: PropTypes.oneOf(['landscape', 'portrait']),\n\n /**\n * Paper props passed down to [Paper](https://mui.com/material-ui/api/paper/) component.\n */\n PaperProps: PropTypes.object,\n\n /**\n * Popper props passed down to [Popper](https://mui.com/material-ui/api/popper/) component.\n */\n PopperProps: PropTypes.object,\n\n /**\n * Make picker read only.\n * @default false\n */\n readOnly: PropTypes.bool,\n\n /**\n * Disable heavy animations.\n * @default typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)\n */\n reduceAnimations: PropTypes.bool,\n\n /**\n * Custom renderer for day. Check the [PickersDay](https://mui.com/x/api/date-pickers/pickers-day/) component.\n * @template TDate\n * @param {TDate} day The day to render.\n * @param {Array<TDate | null>} selectedDays The days currently selected.\n * @param {PickersDayProps<TDate>} pickersDayProps The props of the day to render.\n * @returns {JSX.Element} The element representing the day.\n */\n renderDay: PropTypes.func,\n\n /**\n * The `renderInput` prop allows you to customize the rendered input.\n * The `props` argument of this render prop contains props of [TextField](https://mui.com/material-ui/api/text-field/#props) that you need to forward.\n * Pay specific attention to the `ref` and `inputProps` keys.\n * @example ```jsx\n * renderInput={props => <TextField {...props} />}\n * ````\n * @param {MuiTextFieldPropsType} props The props of the input.\n * @returns {React.ReactNode} The node to render as the input.\n */\n renderInput: PropTypes.func.isRequired,\n\n /**\n * Component displaying when passed `loading` true.\n * @returns {React.ReactNode} The node to render when loading.\n * @default () => <span data-mui-test=\"loading-progress\">...</span>\n */\n renderLoading: PropTypes.func,\n\n /**\n * Custom formatter to be passed into Rifm component.\n * @param {string} str The un-formatted string.\n * @returns {string} The formatted string.\n */\n rifmFormatter: PropTypes.func,\n\n /**\n * Right arrow icon aria-label text.\n * @deprecated\n */\n rightArrowButtonText: PropTypes.string,\n\n /**\n * Disable specific date. @DateIOType\n * @template TDate\n * @param {TDate} day The date to test.\n * @returns {boolean} Returns `true` if the date should be disabled.\n */\n shouldDisableDate: PropTypes.func,\n\n /**\n * Disable specific months dynamically.\n * Works like `shouldDisableDate` but for month selection view @DateIOType.\n * @template TDate\n * @param {TDate} month The month to check.\n * @returns {boolean} If `true` the month will be disabled.\n */\n shouldDisableMonth: PropTypes.func,\n\n /**\n * Dynamically check if time is disabled or not.\n * If returns `false` appropriate time point will ot be acceptable.\n * @param {number} timeValue The value to check.\n * @param {ClockPickerView} clockType The clock type of the timeValue.\n * @returns {boolean} Returns `true` if the time should be disabled\n */\n shouldDisableTime: PropTypes.func,\n\n /**\n * Disable specific years dynamically.\n * Works like `shouldDisableDate` but for year selection view @DateIOType.\n * @template TDate\n * @param {TDate} year The year to test.\n * @returns {boolean} Returns `true` if the year should be disabled.\n */\n shouldDisableYear: PropTypes.func,\n\n /**\n * If `true`, days that have `outsideCurrentMonth={true}` are displayed.\n * @default false\n */\n showDaysOutsideCurrentMonth: PropTypes.bool,\n\n /**\n * If `true`, show the toolbar even in desktop mode.\n */\n showToolbar: PropTypes.bool,\n\n /**\n * Time tab icon.\n */\n timeIcon: PropTypes.node,\n\n /**\n * Component that will replace default toolbar renderer.\n * @default DateTimePickerToolbar\n */\n ToolbarComponent: PropTypes.elementType,\n\n /**\n * Date format, that is displaying in toolbar.\n */\n toolbarFormat: PropTypes.string,\n\n /**\n * Mobile picker date value placeholder, displaying if `value` === `null`.\n * @default '–'\n */\n toolbarPlaceholder: PropTypes.node,\n\n /**\n * Mobile picker title, displaying in the toolbar.\n * @default 'Select date & time'\n */\n toolbarTitle: PropTypes.node,\n\n /**\n * Custom component for popper [Transition](https://mui.com/material-ui/transitions/#transitioncomponent-prop).\n */\n TransitionComponent: PropTypes.elementType,\n\n /**\n * The value of the picker.\n */\n value: PropTypes.any,\n\n /**\n * Array of views to show.\n */\n views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'hours', 'minutes', 'month', 'seconds', 'year']).isRequired)\n} : void 0;\nexport { DateTimePicker };","import { generateUtilityClass, generateUtilityClasses } from '@mui/material';\nexport function getStaticWrapperUtilityClass(slot) {\n return generateUtilityClass('MuiPickerStaticWrapper', slot);\n}\nexport const pickerStaticWrapperClasses = generateUtilityClasses('MuiPickerStaticWrapper', ['root', 'content']);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"displayStaticWrapperAs\", \"onAccept\", \"onClear\", \"onCancel\", \"onDismiss\", \"onSetToday\", \"open\", \"children\", \"components\", \"componentsProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport { unstable_composeClasses as composeClasses } from '@mui/material';\nimport { DIALOG_WIDTH } from '../../constants/dimensions';\nimport { WrapperVariantContext } from '../wrappers/WrapperVariantContext';\nimport { getStaticWrapperUtilityClass } from './pickerStaticWrapperClasses';\nimport { PickersActionBar } from '../../../PickersActionBar';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n content: ['content']\n };\n return composeClasses(slots, getStaticWrapperUtilityClass, classes);\n};\n\nconst PickerStaticWrapperRoot = styled('div', {\n name: 'MuiPickerStaticWrapper',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({\n display: 'flex',\n flexDirection: 'column'\n});\nconst PickerStaticWrapperContent = styled('div', {\n name: 'MuiPickerStaticWrapper',\n slot: 'Content',\n overridesResolver: (props, styles) => styles.content\n})(({\n theme\n}) => ({\n overflow: 'hidden',\n minWidth: DIALOG_WIDTH,\n display: 'flex',\n flexDirection: 'column',\n backgroundColor: theme.palette.background.paper\n}));\n\nfunction PickerStaticWrapper(inProps) {\n var _components$ActionBar;\n\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPickerStaticWrapper'\n });\n\n const {\n displayStaticWrapperAs,\n onAccept,\n onClear,\n onCancel,\n onSetToday,\n children,\n components,\n componentsProps\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const classes = useUtilityClasses(props);\n const ActionBar = (_components$ActionBar = components == null ? void 0 : components.ActionBar) != null ? _components$ActionBar : PickersActionBar;\n return /*#__PURE__*/_jsx(WrapperVariantContext.Provider, {\n value: displayStaticWrapperAs,\n children: /*#__PURE__*/_jsxs(PickerStaticWrapperRoot, _extends({\n className: classes.root\n }, other, {\n children: [/*#__PURE__*/_jsx(PickerStaticWrapperContent, {\n className: classes.content,\n children: children\n }), /*#__PURE__*/_jsx(ActionBar, _extends({\n onAccept: onAccept,\n onClear: onClear,\n onCancel: onCancel,\n onSetToday: onSetToday,\n actions: displayStaticWrapperAs === 'desktop' ? [] : ['cancel', 'accept']\n }, componentsProps == null ? void 0 : componentsProps.actionBar))]\n }))\n });\n}\n\nprocess.env.NODE_ENV !== \"production\" ? PickerStaticWrapper.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * Overrideable components.\n * @default {}\n */\n components: PropTypes.object,\n\n /**\n * The props used for each component slot.\n * @default {}\n */\n componentsProps: PropTypes.object,\n\n /**\n * Force static wrapper inner components to be rendered in mobile or desktop mode.\n */\n displayStaticWrapperAs: PropTypes.oneOf(['desktop', 'mobile']).isRequired,\n onAccept: PropTypes.func.isRequired,\n onCancel: PropTypes.func.isRequired,\n onClear: PropTypes.func.isRequired,\n onDismiss: PropTypes.func.isRequired,\n onSetToday: PropTypes.func.isRequired,\n open: PropTypes.bool.isRequired\n} : void 0;\nexport { PickerStaticWrapper };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"ToolbarComponent\", \"value\", \"onChange\", \"displayStaticWrapperAs\", \"components\", \"componentsProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { useDatePickerDefaultizedProps, datePickerValueManager } from '../DatePicker/shared';\nimport { DatePickerToolbar } from '../DatePicker/DatePickerToolbar';\nimport { PickerStaticWrapper } from '../internals/components/PickerStaticWrapper/PickerStaticWrapper';\nimport { CalendarOrClockPicker } from '../internals/components/CalendarOrClockPicker';\nimport { useDateValidation } from '../internals/hooks/validation/useDateValidation';\nimport { usePickerState } from '../internals/hooks/usePickerState';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\n/**\n *\n * Demos:\n *\n * - [Date Picker](https://mui.com/x/react-date-pickers/date-picker/)\n *\n * API:\n *\n * - [StaticDatePicker API](https://mui.com/x/api/date-pickers/static-date-picker/)\n */\nexport const StaticDatePicker = /*#__PURE__*/React.forwardRef(function StaticDatePicker(inProps, ref) {\n const props = useDatePickerDefaultizedProps(inProps, 'MuiStaticDatePicker'); // Note that we are passing down all the value without spread.\n // It saves us >1kb gzip and make any prop available automatically on any level down.\n\n const {\n ToolbarComponent = DatePickerToolbar,\n displayStaticWrapperAs = 'mobile',\n components,\n componentsProps\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const {\n pickerProps,\n inputProps,\n wrapperProps\n } = usePickerState(props, datePickerValueManager);\n const validationError = useDateValidation(props) !== null;\n\n const DateInputProps = _extends({}, inputProps, other, {\n ref,\n validationError,\n components\n });\n\n return /*#__PURE__*/_jsx(PickerStaticWrapper, _extends({\n displayStaticWrapperAs: displayStaticWrapperAs,\n components: components,\n componentsProps: componentsProps\n }, wrapperProps, {\n children: /*#__PURE__*/_jsx(CalendarOrClockPicker, _extends({}, pickerProps, {\n toolbarTitle: props.label || props.toolbarTitle,\n ToolbarComponent: ToolbarComponent,\n DateInputProps: DateInputProps,\n components: components,\n componentsProps: componentsProps\n }, other))\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? StaticDatePicker.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Regular expression to detect \"accepted\" symbols.\n * @default /\\dap/gi\n */\n acceptRegex: PropTypes.instanceOf(RegExp),\n autoFocus: PropTypes.bool,\n\n /**\n * className applied to the root component.\n */\n className: PropTypes.string,\n\n /**\n * If `true` the popup or dialog will immediately close after submitting full date.\n * @default `true` for Desktop, `false` for Mobile (based on the chosen wrapper and `desktopModeMediaQuery` prop).\n */\n closeOnSelect: PropTypes.bool,\n\n /**\n * Overrideable components.\n * @default {}\n */\n components: PropTypes.object,\n\n /**\n * The props used for each component slot.\n * @default {}\n */\n componentsProps: PropTypes.object,\n\n /**\n * Formats the day of week displayed in the calendar header.\n * @param {string} day The day of week provided by the adapter's method `getWeekdays`.\n * @returns {string} The name to display.\n * @default (day) => day.charAt(0).toUpperCase()\n */\n dayOfWeekFormatter: PropTypes.func,\n\n /**\n * Default calendar month displayed when `value={null}`.\n */\n defaultCalendarMonth: PropTypes.any,\n\n /**\n * If `true`, the picker and text field are disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true` future days are disabled.\n * @default false\n */\n disableFuture: PropTypes.bool,\n\n /**\n * If `true`, today's date is rendering without highlighting with circle.\n * @default false\n */\n disableHighlightToday: PropTypes.bool,\n\n /**\n * Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.\n * @default false\n */\n disableMaskedInput: PropTypes.bool,\n\n /**\n * Do not render open picker button (renders only text field with validation).\n * @default false\n */\n disableOpenPicker: PropTypes.bool,\n\n /**\n * If `true` past days are disabled.\n * @default false\n */\n disablePast: PropTypes.bool,\n\n /**\n * Force static wrapper inner components to be rendered in mobile or desktop mode.\n * @default 'mobile'\n */\n displayStaticWrapperAs: PropTypes.oneOf(['desktop', 'mobile']),\n\n /**\n * Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType\n * @template TInputDate, TDate\n * @param {TInputDate} date The date from which we want to add an aria-text.\n * @param {MuiPickersAdapter<TDate>} utils The utils to manipulate the date.\n * @returns {string} The aria-text to render inside the dialog.\n * @default (date, utils) => `Choose date, selected date is ${utils.format(utils.date(date), 'fullDate')}`\n */\n getOpenDialogAriaText: PropTypes.func,\n\n /**\n * Get aria-label text for switching between views button.\n * @param {CalendarPickerView} currentView The view from which we want to get the button text.\n * @returns {string} The label of the view.\n * @deprecated Use the `localeText` prop of `LocalizationProvider` instead, see https://mui.com/x/react-date-pickers/localization\n */\n getViewSwitchingButtonText: PropTypes.func,\n ignoreInvalidInputs: PropTypes.bool,\n\n /**\n * Props to pass to keyboard input adornment.\n */\n InputAdornmentProps: PropTypes.object,\n\n /**\n * Format string.\n */\n inputFormat: PropTypes.string,\n InputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.object\n })]),\n label: PropTypes.node,\n\n /**\n * Left arrow icon aria-label text.\n * @deprecated\n */\n leftArrowButtonText: PropTypes.string,\n\n /**\n * If `true` renders `LoadingComponent` in calendar instead of calendar view.\n * Can be used to preload information and show it in calendar.\n * @default false\n */\n loading: PropTypes.bool,\n\n /**\n * Custom mask. Can be used to override generate from format. (e.g. `__/__/____ __:__` or `__/__/____ __:__ _M`).\n */\n mask: PropTypes.string,\n\n /**\n * Maximal selectable date. @DateIOType\n */\n maxDate: PropTypes.any,\n\n /**\n * Minimal selectable date. @DateIOType\n */\n minDate: PropTypes.any,\n\n /**\n * Callback fired when date is accepted @DateIOType.\n * @template TValue\n * @param {TValue} value The value that was just accepted.\n */\n onAccept: PropTypes.func,\n\n /**\n * Callback fired when the value (the selected date) changes @DateIOType.\n * @template TValue\n * @param {TValue} value The new parsed value.\n * @param {string} keyboardInputValue The current value of the keyboard input.\n */\n onChange: PropTypes.func.isRequired,\n\n /**\n * Callback that fired when input value or new `value` prop validation returns **new** validation error (or value is valid after error).\n * In case of validation error detected `reason` prop return non-null value and `TextField` must be displayed in `error` state.\n * This can be used to render appropriate form error.\n *\n * [Read the guide](https://next.material-ui-pickers.dev/guides/forms) about form integration and error displaying.\n * @DateIOType\n *\n * @template TError, TInputValue\n * @param {TError} reason The reason why the current value is not valid.\n * @param {TInputValue} value The invalid value.\n */\n onError: PropTypes.func,\n\n /**\n * Callback firing on month change @DateIOType.\n * @template TDate\n * @param {TDate} month The new month.\n * @returns {void|Promise} -\n */\n onMonthChange: PropTypes.func,\n\n /**\n * Callback fired on view change.\n * @param {CalendarPickerView} view The new view.\n */\n onViewChange: PropTypes.func,\n\n /**\n * Callback firing on year change @DateIOType.\n * @template TDate\n * @param {TDate} year The new year.\n */\n onYearChange: PropTypes.func,\n\n /**\n * Props to pass to keyboard adornment button.\n */\n OpenPickerButtonProps: PropTypes.object,\n\n /**\n * First view to show.\n */\n openTo: PropTypes.oneOf(['day', 'month', 'year']),\n\n /**\n * Force rendering in particular orientation.\n */\n orientation: PropTypes.oneOf(['landscape', 'portrait']),\n\n /**\n * Make picker read only.\n * @default false\n */\n readOnly: PropTypes.bool,\n\n /**\n * Disable heavy animations.\n * @default typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)\n */\n reduceAnimations: PropTypes.bool,\n\n /**\n * Custom renderer for day. Check the [PickersDay](https://mui.com/x/api/date-pickers/pickers-day/) component.\n * @template TDate\n * @param {TDate} day The day to render.\n * @param {Array<TDate | null>} selectedDays The days currently selected.\n * @param {PickersDayProps<TDate>} pickersDayProps The props of the day to render.\n * @returns {JSX.Element} The element representing the day.\n */\n renderDay: PropTypes.func,\n\n /**\n * The `renderInput` prop allows you to customize the rendered input.\n * The `props` argument of this render prop contains props of [TextField](https://mui.com/material-ui/api/text-field/#props) that you need to forward.\n * Pay specific attention to the `ref` and `inputProps` keys.\n * @example ```jsx\n * renderInput={props => <TextField {...props} />}\n * ````\n * @param {MuiTextFieldPropsType} props The props of the input.\n * @returns {React.ReactNode} The node to render as the input.\n */\n renderInput: PropTypes.func.isRequired,\n\n /**\n * Component displaying when passed `loading` true.\n * @returns {React.ReactNode} The node to render when loading.\n * @default () => <span data-mui-test=\"loading-progress\">...</span>\n */\n renderLoading: PropTypes.func,\n\n /**\n * Custom formatter to be passed into Rifm component.\n * @param {string} str The un-formatted string.\n * @returns {string} The formatted string.\n */\n rifmFormatter: PropTypes.func,\n\n /**\n * Right arrow icon aria-label text.\n * @deprecated\n */\n rightArrowButtonText: PropTypes.string,\n\n /**\n * Disable specific date. @DateIOType\n * @template TDate\n * @param {TDate} day The date to test.\n * @returns {boolean} Returns `true` if the date should be disabled.\n */\n shouldDisableDate: PropTypes.func,\n\n /**\n * Disable specific months dynamically.\n * Works like `shouldDisableDate` but for month selection view @DateIOType.\n * @template TDate\n * @param {TDate} month The month to check.\n * @returns {boolean} If `true` the month will be disabled.\n */\n shouldDisableMonth: PropTypes.func,\n\n /**\n * Disable specific years dynamically.\n * Works like `shouldDisableDate` but for year selection view @DateIOType.\n * @template TDate\n * @param {TDate} year The year to test.\n * @returns {boolean} Returns `true` if the year should be disabled.\n */\n shouldDisableYear: PropTypes.func,\n\n /**\n * If `true`, days that have `outsideCurrentMonth={true}` are displayed.\n * @default false\n */\n showDaysOutsideCurrentMonth: PropTypes.bool,\n\n /**\n * If `true`, show the toolbar even in desktop mode.\n */\n showToolbar: PropTypes.bool,\n\n /**\n * Component that will replace default toolbar renderer.\n * @default DatePickerToolbar\n */\n ToolbarComponent: PropTypes.elementType,\n\n /**\n * Date format, that is displaying in toolbar.\n */\n toolbarFormat: PropTypes.string,\n\n /**\n * Mobile picker date value placeholder, displaying if `value` === `null`.\n * @default '–'\n */\n toolbarPlaceholder: PropTypes.node,\n\n /**\n * Mobile picker title, displaying in the toolbar.\n * @default 'Select date'\n */\n toolbarTitle: PropTypes.node,\n\n /**\n * The value of the picker.\n */\n value: PropTypes.any,\n\n /**\n * Array of views to show.\n */\n views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'month', 'year']).isRequired)\n} : void 0;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"displayStaticWrapperAs\", \"onChange\", \"ToolbarComponent\", \"value\", \"components\", \"componentsProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { useDateTimePickerDefaultizedProps, dateTimePickerValueManager } from '../DateTimePicker/shared';\nimport { DateTimePickerToolbar } from '../DateTimePicker/DateTimePickerToolbar';\nimport { PickerStaticWrapper } from '../internals/components/PickerStaticWrapper/PickerStaticWrapper';\nimport { CalendarOrClockPicker } from '../internals/components/CalendarOrClockPicker';\nimport { useDateTimeValidation } from '../internals/hooks/validation/useDateTimeValidation';\nimport { usePickerState } from '../internals/hooks/usePickerState';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\n/**\n *\n * Demos:\n *\n * - [Date Time Picker](https://mui.com/x/react-date-pickers/date-time-picker/)\n *\n * API:\n *\n * - [StaticDateTimePicker API](https://mui.com/x/api/date-pickers/static-date-time-picker/)\n */\nexport const StaticDateTimePicker = /*#__PURE__*/React.forwardRef(function StaticDateTimePicker(inProps, ref) {\n const props = useDateTimePickerDefaultizedProps(inProps, 'MuiStaticDateTimePicker'); // Note that we are passing down all the value without spread.\n // It saves us >1kb gzip and make any prop available automatically on any level down.\n\n const {\n displayStaticWrapperAs = 'mobile',\n ToolbarComponent = DateTimePickerToolbar,\n components,\n componentsProps\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const {\n pickerProps,\n inputProps,\n wrapperProps\n } = usePickerState(props, dateTimePickerValueManager);\n const validationError = useDateTimeValidation(props) !== null;\n\n const DateInputProps = _extends({}, inputProps, other, {\n ref,\n validationError,\n components,\n componentsProps\n });\n\n return /*#__PURE__*/_jsx(PickerStaticWrapper, _extends({\n displayStaticWrapperAs: displayStaticWrapperAs,\n components: components,\n componentsProps: componentsProps\n }, wrapperProps, {\n children: /*#__PURE__*/_jsx(CalendarOrClockPicker, _extends({}, pickerProps, {\n toolbarTitle: props.label || props.toolbarTitle,\n ToolbarComponent: ToolbarComponent,\n DateInputProps: DateInputProps,\n components: components,\n componentsProps: componentsProps\n }, other))\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? StaticDateTimePicker.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Regular expression to detect \"accepted\" symbols.\n * @default /\\dap/gi\n */\n acceptRegex: PropTypes.instanceOf(RegExp),\n\n /**\n * 12h/24h view for hour selection clock.\n * @default `utils.is12HourCycleInCurrentLocale()`\n */\n ampm: PropTypes.bool,\n\n /**\n * Display ampm controls under the clock (instead of in the toolbar).\n * @default false\n */\n ampmInClock: PropTypes.bool,\n autoFocus: PropTypes.bool,\n\n /**\n * className applied to the root component.\n */\n className: PropTypes.string,\n\n /**\n * If `true` the popup or dialog will immediately close after submitting full date.\n * @default `true` for Desktop, `false` for Mobile (based on the chosen wrapper and `desktopModeMediaQuery` prop).\n */\n closeOnSelect: PropTypes.bool,\n\n /**\n * Overrideable components.\n * @default {}\n */\n components: PropTypes.object,\n\n /**\n * The props used for each component slot.\n * @default {}\n */\n componentsProps: PropTypes.object,\n\n /**\n * Date tab icon.\n */\n dateRangeIcon: PropTypes.node,\n\n /**\n * Formats the day of week displayed in the calendar header.\n * @param {string} day The day of week provided by the adapter's method `getWeekdays`.\n * @returns {string} The name to display.\n * @default (day) => day.charAt(0).toUpperCase()\n */\n dayOfWeekFormatter: PropTypes.func,\n\n /**\n * Default calendar month displayed when `value={null}`.\n */\n defaultCalendarMonth: PropTypes.any,\n\n /**\n * If `true`, the picker and text field are disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true` future days are disabled.\n * @default false\n */\n disableFuture: PropTypes.bool,\n\n /**\n * If `true`, today's date is rendering without highlighting with circle.\n * @default false\n */\n disableHighlightToday: PropTypes.bool,\n\n /**\n * Do not ignore date part when validating min/max time.\n * @default false\n */\n disableIgnoringDatePartForTimeValidation: PropTypes.bool,\n\n /**\n * Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.\n * @default false\n */\n disableMaskedInput: PropTypes.bool,\n\n /**\n * Do not render open picker button (renders only text field with validation).\n * @default false\n */\n disableOpenPicker: PropTypes.bool,\n\n /**\n * If `true` past days are disabled.\n * @default false\n */\n disablePast: PropTypes.bool,\n\n /**\n * Force static wrapper inner components to be rendered in mobile or desktop mode.\n * @default 'mobile'\n */\n displayStaticWrapperAs: PropTypes.oneOf(['desktop', 'mobile']),\n\n /**\n * Accessible text that helps user to understand which time and view is selected.\n * @template TDate\n * @param {ClockPickerView} view The current view rendered.\n * @param {TDate | null} time The current time.\n * @param {MuiPickersAdapter<TDate>} adapter The current date adapter.\n * @returns {string} The clock label.\n * @deprecated Use the `localeText` prop of `LocalizationProvider` instead, see https://mui.com/x/react-date-pickers/localization\n * @default <TDate extends any>(\n * view: ClockView,\n * time: TDate | null,\n * adapter: MuiPickersAdapter<TDate>,\n * ) =>\n * `Select ${view}. ${\n * time === null ? 'No time selected' : `Selected time is ${adapter.format(time, 'fullTime')}`\n * }`\n */\n getClockLabelText: PropTypes.func,\n\n /**\n * Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType\n * @template TInputDate, TDate\n * @param {TInputDate} date The date from which we want to add an aria-text.\n * @param {MuiPickersAdapter<TDate>} utils The utils to manipulate the date.\n * @returns {string} The aria-text to render inside the dialog.\n * @default (date, utils) => `Choose date, selected date is ${utils.format(utils.date(date), 'fullDate')}`\n */\n getOpenDialogAriaText: PropTypes.func,\n\n /**\n * Get aria-label text for switching between views button.\n * @param {CalendarPickerView} currentView The view from which we want to get the button text.\n * @returns {string} The label of the view.\n * @deprecated Use the `localeText` prop of `LocalizationProvider` instead, see https://mui.com/x/react-date-pickers/localization\n */\n getViewSwitchingButtonText: PropTypes.func,\n\n /**\n * To show tabs.\n */\n hideTabs: PropTypes.bool,\n ignoreInvalidInputs: PropTypes.bool,\n\n /**\n * Props to pass to keyboard input adornment.\n */\n InputAdornmentProps: PropTypes.object,\n\n /**\n * Format string.\n */\n inputFormat: PropTypes.string,\n InputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.object\n })]),\n label: PropTypes.node,\n\n /**\n * Left arrow icon aria-label text.\n * @deprecated\n */\n leftArrowButtonText: PropTypes.string,\n\n /**\n * If `true` renders `LoadingComponent` in calendar instead of calendar view.\n * Can be used to preload information and show it in calendar.\n * @default false\n */\n loading: PropTypes.bool,\n\n /**\n * Custom mask. Can be used to override generate from format. (e.g. `__/__/____ __:__` or `__/__/____ __:__ _M`).\n */\n mask: PropTypes.string,\n\n /**\n * Maximal selectable date. @DateIOType\n */\n maxDate: PropTypes.any,\n\n /**\n * Maximal selectable moment of time with binding to date, to set max time in each day use `maxTime`.\n */\n maxDateTime: PropTypes.any,\n\n /**\n * Max time acceptable time.\n * For input validation date part of passed object will be ignored if `disableIgnoringDatePartForTimeValidation` not specified.\n */\n maxTime: PropTypes.any,\n\n /**\n * Minimal selectable date. @DateIOType\n */\n minDate: PropTypes.any,\n\n /**\n * Minimal selectable moment of time with binding to date, to set min time in each day use `minTime`.\n */\n minDateTime: PropTypes.any,\n\n /**\n * Min time acceptable time.\n * For input validation date part of passed object will be ignored if `disableIgnoringDatePartForTimeValidation` not specified.\n */\n minTime: PropTypes.any,\n\n /**\n * Step over minutes.\n * @default 1\n */\n minutesStep: PropTypes.number,\n\n /**\n * Callback fired when date is accepted @DateIOType.\n * @template TValue\n * @param {TValue} value The value that was just accepted.\n */\n onAccept: PropTypes.func,\n\n /**\n * Callback fired when the value (the selected date) changes @DateIOType.\n * @template TValue\n * @param {TValue} value The new parsed value.\n * @param {string} keyboardInputValue The current value of the keyboard input.\n */\n onChange: PropTypes.func.isRequired,\n\n /**\n * Callback that fired when input value or new `value` prop validation returns **new** validation error (or value is valid after error).\n * In case of validation error detected `reason` prop return non-null value and `TextField` must be displayed in `error` state.\n * This can be used to render appropriate form error.\n *\n * [Read the guide](https://next.material-ui-pickers.dev/guides/forms) about form integration and error displaying.\n * @DateIOType\n *\n * @template TError, TInputValue\n * @param {TError} reason The reason why the current value is not valid.\n * @param {TInputValue} value The invalid value.\n */\n onError: PropTypes.func,\n\n /**\n * Callback firing on month change @DateIOType.\n * @template TDate\n * @param {TDate} month The new month.\n * @returns {void|Promise} -\n */\n onMonthChange: PropTypes.func,\n\n /**\n * Callback fired on view change.\n * @param {CalendarOrClockPickerView} view The new view.\n */\n onViewChange: PropTypes.func,\n\n /**\n * Callback firing on year change @DateIOType.\n * @template TDate\n * @param {TDate} year The new year.\n */\n onYearChange: PropTypes.func,\n\n /**\n * Props to pass to keyboard adornment button.\n */\n OpenPickerButtonProps: PropTypes.object,\n\n /**\n * First view to show.\n */\n openTo: PropTypes.oneOf(['day', 'hours', 'minutes', 'month', 'seconds', 'year']),\n\n /**\n * Force rendering in particular orientation.\n */\n orientation: PropTypes.oneOf(['landscape', 'portrait']),\n\n /**\n * Make picker read only.\n * @default false\n */\n readOnly: PropTypes.bool,\n\n /**\n * Disable heavy animations.\n * @default typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)\n */\n reduceAnimations: PropTypes.bool,\n\n /**\n * Custom renderer for day. Check the [PickersDay](https://mui.com/x/api/date-pickers/pickers-day/) component.\n * @template TDate\n * @param {TDate} day The day to render.\n * @param {Array<TDate | null>} selectedDays The days currently selected.\n * @param {PickersDayProps<TDate>} pickersDayProps The props of the day to render.\n * @returns {JSX.Element} The element representing the day.\n */\n renderDay: PropTypes.func,\n\n /**\n * The `renderInput` prop allows you to customize the rendered input.\n * The `props` argument of this render prop contains props of [TextField](https://mui.com/material-ui/api/text-field/#props) that you need to forward.\n * Pay specific attention to the `ref` and `inputProps` keys.\n * @example ```jsx\n * renderInput={props => <TextField {...props} />}\n * ````\n * @param {MuiTextFieldPropsType} props The props of the input.\n * @returns {React.ReactNode} The node to render as the input.\n */\n renderInput: PropTypes.func.isRequired,\n\n /**\n * Component displaying when passed `loading` true.\n * @returns {React.ReactNode} The node to render when loading.\n * @default () => <span data-mui-test=\"loading-progress\">...</span>\n */\n renderLoading: PropTypes.func,\n\n /**\n * Custom formatter to be passed into Rifm component.\n * @param {string} str The un-formatted string.\n * @returns {string} The formatted string.\n */\n rifmFormatter: PropTypes.func,\n\n /**\n * Right arrow icon aria-label text.\n * @deprecated\n */\n rightArrowButtonText: PropTypes.string,\n\n /**\n * Disable specific date. @DateIOType\n * @template TDate\n * @param {TDate} day The date to test.\n * @returns {boolean} Returns `true` if the date should be disabled.\n */\n shouldDisableDate: PropTypes.func,\n\n /**\n * Disable specific months dynamically.\n * Works like `shouldDisableDate` but for month selection view @DateIOType.\n * @template TDate\n * @param {TDate} month The month to check.\n * @returns {boolean} If `true` the month will be disabled.\n */\n shouldDisableMonth: PropTypes.func,\n\n /**\n * Dynamically check if time is disabled or not.\n * If returns `false` appropriate time point will ot be acceptable.\n * @param {number} timeValue The value to check.\n * @param {ClockPickerView} clockType The clock type of the timeValue.\n * @returns {boolean} Returns `true` if the time should be disabled\n */\n shouldDisableTime: PropTypes.func,\n\n /**\n * Disable specific years dynamically.\n * Works like `shouldDisableDate` but for year selection view @DateIOType.\n * @template TDate\n * @param {TDate} year The year to test.\n * @returns {boolean} Returns `true` if the year should be disabled.\n */\n shouldDisableYear: PropTypes.func,\n\n /**\n * If `true`, days that have `outsideCurrentMonth={true}` are displayed.\n * @default false\n */\n showDaysOutsideCurrentMonth: PropTypes.bool,\n\n /**\n * If `true`, show the toolbar even in desktop mode.\n */\n showToolbar: PropTypes.bool,\n\n /**\n * Time tab icon.\n */\n timeIcon: PropTypes.node,\n\n /**\n * Component that will replace default toolbar renderer.\n * @default DateTimePickerToolbar\n */\n ToolbarComponent: PropTypes.elementType,\n\n /**\n * Date format, that is displaying in toolbar.\n */\n toolbarFormat: PropTypes.string,\n\n /**\n * Mobile picker date value placeholder, displaying if `value` === `null`.\n * @default '–'\n */\n toolbarPlaceholder: PropTypes.node,\n\n /**\n * Mobile picker title, displaying in the toolbar.\n * @default 'Select date & time'\n */\n toolbarTitle: PropTypes.node,\n\n /**\n * The value of the picker.\n */\n value: PropTypes.any,\n\n /**\n * Array of views to show.\n */\n views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'hours', 'minutes', 'month', 'seconds', 'year']).isRequired)\n} : void 0;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"displayStaticWrapperAs\", \"onChange\", \"ToolbarComponent\", \"value\", \"components\", \"componentsProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { useTimePickerDefaultizedProps, timePickerValueManager } from '../TimePicker/shared';\nimport { TimePickerToolbar } from '../TimePicker/TimePickerToolbar';\nimport { PickerStaticWrapper } from '../internals/components/PickerStaticWrapper/PickerStaticWrapper';\nimport { CalendarOrClockPicker } from '../internals/components/CalendarOrClockPicker';\nimport { useTimeValidation } from '../internals/hooks/validation/useTimeValidation';\nimport { usePickerState } from '../internals/hooks/usePickerState';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\n/**\n *\n * Demos:\n *\n * - [Time Picker](https://mui.com/x/react-date-pickers/time-picker/)\n *\n * API:\n *\n * - [StaticTimePicker API](https://mui.com/x/api/date-pickers/static-time-picker/)\n */\nexport const StaticTimePicker = /*#__PURE__*/React.forwardRef(function StaticTimePicker(inProps, ref) {\n const props = useTimePickerDefaultizedProps(inProps, 'MuiStaticTimePicker');\n\n const {\n displayStaticWrapperAs = 'mobile',\n ToolbarComponent = TimePickerToolbar,\n components,\n componentsProps\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const validationError = useTimeValidation(props) !== null;\n const {\n pickerProps,\n inputProps,\n wrapperProps\n } = usePickerState(props, timePickerValueManager);\n\n const DateInputProps = _extends({}, inputProps, other, {\n ref,\n validationError,\n components,\n componentsProps\n });\n\n return /*#__PURE__*/_jsx(PickerStaticWrapper, _extends({\n displayStaticWrapperAs: displayStaticWrapperAs,\n components: components,\n componentsProps: componentsProps\n }, wrapperProps, {\n children: /*#__PURE__*/_jsx(CalendarOrClockPicker, _extends({}, pickerProps, {\n toolbarTitle: props.label || props.toolbarTitle,\n ToolbarComponent: ToolbarComponent,\n DateInputProps: DateInputProps,\n components: components,\n componentsProps: componentsProps\n }, other))\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? StaticTimePicker.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Regular expression to detect \"accepted\" symbols.\n * @default /\\dap/gi\n */\n acceptRegex: PropTypes.instanceOf(RegExp),\n\n /**\n * 12h/24h view for hour selection clock.\n * @default `utils.is12HourCycleInCurrentLocale()`\n */\n ampm: PropTypes.bool,\n\n /**\n * Display ampm controls under the clock (instead of in the toolbar).\n * @default false\n */\n ampmInClock: PropTypes.bool,\n\n /**\n * className applied to the root component.\n */\n className: PropTypes.string,\n\n /**\n * If `true` the popup or dialog will immediately close after submitting full date.\n * @default `true` for Desktop, `false` for Mobile (based on the chosen wrapper and `desktopModeMediaQuery` prop).\n */\n closeOnSelect: PropTypes.bool,\n\n /**\n * Overrideable components.\n */\n components: PropTypes.any,\n\n /**\n * The props used for each component slot.\n * @default {}\n */\n componentsProps: PropTypes.object,\n\n /**\n * If `true`, the picker and text field are disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n\n /**\n * Do not ignore date part when validating min/max time.\n * @default false\n */\n disableIgnoringDatePartForTimeValidation: PropTypes.bool,\n\n /**\n * Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.\n * @default false\n */\n disableMaskedInput: PropTypes.bool,\n\n /**\n * Do not render open picker button (renders only text field with validation).\n * @default false\n */\n disableOpenPicker: PropTypes.bool,\n\n /**\n * Force static wrapper inner components to be rendered in mobile or desktop mode.\n * @default 'mobile'\n */\n displayStaticWrapperAs: PropTypes.oneOf(['desktop', 'mobile']),\n\n /**\n * Accessible text that helps user to understand which time and view is selected.\n * @template TDate\n * @param {ClockPickerView} view The current view rendered.\n * @param {TDate | null} time The current time.\n * @param {MuiPickersAdapter<TDate>} adapter The current date adapter.\n * @returns {string} The clock label.\n * @deprecated Use the `localeText` prop of `LocalizationProvider` instead, see https://mui.com/x/react-date-pickers/localization\n * @default <TDate extends any>(\n * view: ClockView,\n * time: TDate | null,\n * adapter: MuiPickersAdapter<TDate>,\n * ) =>\n * `Select ${view}. ${\n * time === null ? 'No time selected' : `Selected time is ${adapter.format(time, 'fullTime')}`\n * }`\n */\n getClockLabelText: PropTypes.func,\n\n /**\n * Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType\n * @template TInputDate, TDate\n * @param {TInputDate} date The date from which we want to add an aria-text.\n * @param {MuiPickersAdapter<TDate>} utils The utils to manipulate the date.\n * @returns {string} The aria-text to render inside the dialog.\n * @default (date, utils) => `Choose date, selected date is ${utils.format(utils.date(date), 'fullDate')}`\n */\n getOpenDialogAriaText: PropTypes.func,\n ignoreInvalidInputs: PropTypes.bool,\n\n /**\n * Props to pass to keyboard input adornment.\n */\n InputAdornmentProps: PropTypes.object,\n\n /**\n * Format string.\n */\n inputFormat: PropTypes.string,\n InputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.object\n })]),\n label: PropTypes.node,\n\n /**\n * Custom mask. Can be used to override generate from format. (e.g. `__/__/____ __:__` or `__/__/____ __:__ _M`).\n */\n mask: PropTypes.string,\n\n /**\n * Max time acceptable time.\n * For input validation date part of passed object will be ignored if `disableIgnoringDatePartForTimeValidation` not specified.\n */\n maxTime: PropTypes.any,\n\n /**\n * Min time acceptable time.\n * For input validation date part of passed object will be ignored if `disableIgnoringDatePartForTimeValidation` not specified.\n */\n minTime: PropTypes.any,\n\n /**\n * Step over minutes.\n * @default 1\n */\n minutesStep: PropTypes.number,\n\n /**\n * Callback fired when date is accepted @DateIOType.\n * @template TValue\n * @param {TValue} value The value that was just accepted.\n */\n onAccept: PropTypes.func,\n\n /**\n * Callback fired when the value (the selected date) changes @DateIOType.\n * @template TValue\n * @param {TValue} value The new parsed value.\n * @param {string} keyboardInputValue The current value of the keyboard input.\n */\n onChange: PropTypes.func.isRequired,\n\n /**\n * Callback that fired when input value or new `value` prop validation returns **new** validation error (or value is valid after error).\n * In case of validation error detected `reason` prop return non-null value and `TextField` must be displayed in `error` state.\n * This can be used to render appropriate form error.\n *\n * [Read the guide](https://next.material-ui-pickers.dev/guides/forms) about form integration and error displaying.\n * @DateIOType\n *\n * @template TError, TInputValue\n * @param {TError} reason The reason why the current value is not valid.\n * @param {TInputValue} value The invalid value.\n */\n onError: PropTypes.func,\n\n /**\n * Callback fired on view change.\n * @param {ClockPickerView} view The new view.\n */\n onViewChange: PropTypes.func,\n\n /**\n * Props to pass to keyboard adornment button.\n */\n OpenPickerButtonProps: PropTypes.object,\n\n /**\n * First view to show.\n */\n openTo: PropTypes.oneOf(['hours', 'minutes', 'seconds']),\n\n /**\n * Force rendering in particular orientation.\n */\n orientation: PropTypes.oneOf(['landscape', 'portrait']),\n\n /**\n * Make picker read only.\n * @default false\n */\n readOnly: PropTypes.bool,\n\n /**\n * The `renderInput` prop allows you to customize the rendered input.\n * The `props` argument of this render prop contains props of [TextField](https://mui.com/material-ui/api/text-field/#props) that you need to forward.\n * Pay specific attention to the `ref` and `inputProps` keys.\n * @example ```jsx\n * renderInput={props => <TextField {...props} />}\n * ````\n * @param {MuiTextFieldPropsType} props The props of the input.\n * @returns {React.ReactNode} The node to render as the input.\n */\n renderInput: PropTypes.func.isRequired,\n\n /**\n * Custom formatter to be passed into Rifm component.\n * @param {string} str The un-formatted string.\n * @returns {string} The formatted string.\n */\n rifmFormatter: PropTypes.func,\n\n /**\n * Dynamically check if time is disabled or not.\n * If returns `false` appropriate time point will ot be acceptable.\n * @param {number} timeValue The value to check.\n * @param {ClockPickerView} clockType The clock type of the timeValue.\n * @returns {boolean} Returns `true` if the time should be disabled\n */\n shouldDisableTime: PropTypes.func,\n\n /**\n * If `true`, show the toolbar even in desktop mode.\n */\n showToolbar: PropTypes.bool,\n\n /**\n * Component that will replace default toolbar renderer.\n * @default TimePickerToolbar\n */\n ToolbarComponent: PropTypes.elementType,\n\n /**\n * Mobile picker title, displaying in the toolbar.\n * @default 'Select time'\n */\n toolbarTitle: PropTypes.node,\n\n /**\n * The value of the picker.\n */\n value: PropTypes.any,\n\n /**\n * Array of views to show.\n */\n views: PropTypes.arrayOf(PropTypes.oneOf(['hours', 'minutes', 'seconds']).isRequired)\n} : void 0;","import { getPickersLocalization } from './utils/getPickersLocalization';\nconst nlNLPickers = {\n // Calendar navigation\n previousMonth: 'Vorige maand',\n nextMonth: 'Volgende maand',\n // View navigation\n openPreviousView: 'open vorige view',\n openNextView: 'open volgende view',\n calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'jaarweergave is geopend, schakel over naar kalenderweergave' : 'kalenderweergave is geopend, switch naar jaarweergave',\n // DateRange placeholders\n start: 'Start',\n end: 'Einde',\n // Action bar\n cancelButtonLabel: 'Annuleren',\n clearButtonLabel: 'Resetten',\n okButtonLabel: 'OK',\n todayButtonLabel: 'Vandaag',\n // Clock labels\n clockLabelText: (view, time, adapter) => `Selecteer ${view}. ${time === null ? 'Geen tijd geselecteerd' : `Geselecteerde tijd is ${adapter.format(time, 'fullTime')}`}`,\n hoursClockNumberText: hours => `${hours} uren`,\n minutesClockNumberText: minutes => `${minutes} minuten`,\n secondsClockNumberText: seconds => `${seconds} seconden`,\n // Open picker labels\n openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Kies datum, geselecteerde datum is ${utils.format(utils.date(rawValue), 'fullDate')}` : 'Kies datum',\n openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Kies tijd, geselecteerde tijd is ${utils.format(utils.date(rawValue), 'fullTime')}` : 'Kies tijd',\n // Table labels\n timeTableLabel: 'kies tijd',\n dateTableLabel: 'kies datum'\n};\nexport const nlNL = getPickersLocalization(nlNLPickers);","import { getPickersLocalization } from './utils/getPickersLocalization';\nconst ptBRPickers = {\n // Calendar navigation\n previousMonth: 'Mês anterior',\n nextMonth: 'Próximo mês',\n // View navigation\n openPreviousView: 'Abrir próxima seleção',\n openNextView: 'Abrir seleção anterior',\n calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'Seleção de ano está aberta, alternando para seleção de calendário' : 'Seleção de calendários está aberta, alternando para seleção de ano',\n // DateRange placeholders\n start: 'Início',\n end: 'Fim',\n // Action bar\n cancelButtonLabel: 'Cancelar',\n clearButtonLabel: 'Limpar',\n okButtonLabel: 'OK',\n todayButtonLabel: 'Hoje',\n // Clock labels\n clockLabelText: (view, time, adapter) => `Selecione ${view}. ${time === null ? 'Hora não selecionada' : `Selecionado a hora ${adapter.format(time, 'fullTime')}`}`,\n hoursClockNumberText: hours => `${hours} horas`,\n minutesClockNumberText: minutes => `${minutes} minutos`,\n secondsClockNumberText: seconds => `${seconds} segundos`,\n // Open picker labels\n openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Escolha uma data, data selecionada ${utils.format(utils.date(rawValue), 'fullDate')}` : 'Escolha uma data',\n openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Escolha uma hora, hora selecionada ${utils.format(utils.date(rawValue), 'fullTime')}` : 'Escolha uma hora',\n // Table labels\n timeTableLabel: 'escolha uma hora',\n dateTableLabel: 'escolha uma data'\n};\nexport const ptBR = getPickersLocalization(ptBRPickers);","import { getPickersLocalization } from './utils/getPickersLocalization'; // import { CalendarPickerView } from '../internals/models';\n// This object is not Partial<PickersLocaleText> because it is the default values\n\nconst trTRPickers = {\n // Calendar navigation\n previousMonth: 'Önceki ay',\n nextMonth: 'Sonraki ay',\n // View navigation\n openPreviousView: 'sonraki görünüm',\n openNextView: 'önceki görünüm',\n // calendarViewSwitchingButtonAriaLabel: (view: CalendarPickerView) => view === 'year' ? 'year view is open, switch to calendar view' : 'calendar view is open, switch to year view',\n // DateRange placeholders\n start: 'Başlangıç',\n end: 'Bitiş',\n // Action bar\n cancelButtonLabel: 'iptal',\n clearButtonLabel: 'Temizle',\n okButtonLabel: 'Tamam',\n todayButtonLabel: 'Bugün' // Clock labels\n // clockLabelText: (view, time, adapter) => `Select ${view}. ${time === null ? 'No time selected' : `Selected time is ${adapter.format(time, 'fullTime')}`}`,\n // hoursClockNumberText: hours => `${hours} hours`,\n // minutesClockNumberText: minutes => `${minutes} minutes`,\n // secondsClockNumberText: seconds => `${seconds} seconds`,\n // Open picker labels\n // openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Choose date, selected date is ${utils.format(utils.date(rawValue)!, 'fullDate')}` : 'Choose date',\n // openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Choose time, selected time is ${utils.format(utils.date(rawValue)!, 'fullTime')}` : 'Choose time',\n // Table labels\n // timeTableLabel: 'pick time',\n // dateTableLabel: 'pick date',\n\n};\nexport const trTR = getPickersLocalization(trTRPickers);","import { getPickersLocalization } from './utils/getPickersLocalization';\n// maps ClockPickerView to its translation\nconst views = {\n hours: 'Stunden',\n minutes: 'Minuten',\n seconds: 'Sekunden'\n};\nconst deDEPickers = {\n // Calendar navigation\n previousMonth: 'Letzter Monat',\n nextMonth: 'Nächster Monat',\n // View navigation\n openPreviousView: 'Letzte Ansicht öffnen',\n openNextView: 'Nächste Ansicht öffnen',\n calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'Jahresansicht ist geöffnet, zur Kalenderansicht wechseln' : 'Kalenderansicht ist geöffnet, zur Jahresansicht wechseln',\n // DateRange placeholders\n start: 'Beginn',\n end: 'Ende',\n // Action bar\n cancelButtonLabel: 'Abbrechen',\n clearButtonLabel: 'Löschen',\n okButtonLabel: 'OK',\n todayButtonLabel: 'Heute',\n // Clock labels\n clockLabelText: (view, time, adapter) => {\n var _views$view;\n\n return `${(_views$view = views[view]) != null ? _views$view : view} auswählen. ${time === null ? 'Keine Uhrzeit ausgewählt' : `Gewählte Uhrzeit ist ${adapter.format(time, 'fullTime')}`}`;\n },\n hoursClockNumberText: hours => `${hours} ${views.hours}`,\n minutesClockNumberText: minutes => `${minutes} ${views.minutes}`,\n secondsClockNumberText: seconds => `${seconds} ${views.seconds}`,\n // Open picker labels\n openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Datum auswählen, gewähltes Datum ist ${utils.format(utils.date(rawValue), 'fullDate')}` : 'Datum auswählen',\n openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Uhrzeit auswählen, gewählte Uhrzeit ist ${utils.format(utils.date(rawValue), 'fullTime')}` : 'Uhrzeit auswählen',\n // Table labels\n timeTableLabel: 'Uhrzeit auswählen',\n dateTableLabel: 'Datum auswählen'\n};\nexport const deDE = getPickersLocalization(deDEPickers);","import { getPickersLocalization } from './utils/getPickersLocalization';\nconst views = {\n hours: 'las horas',\n minutes: 'los minutos',\n seconds: 'los segundos'\n}; // This object is not Partial<PickersLocaleText> because it is the default values\n\nconst esESPickers = {\n // Calendar navigation\n previousMonth: 'Último mes',\n nextMonth: 'Próximo mes',\n // View navigation\n openPreviousView: 'abrir la última vista',\n openNextView: 'abrir la siguiente vista',\n calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'la vista del año está abierta, cambie a la vista de calendario' : 'la vista de calendario está abierta, cambie a la vista del año',\n // DateRange placeholders\n start: 'Empezar',\n end: 'Terminar',\n // Action bar\n cancelButtonLabel: 'Cancelar',\n clearButtonLabel: 'Limpia',\n okButtonLabel: 'OK',\n todayButtonLabel: 'Hoy',\n // Clock labels\n clockLabelText: (view, time, adapter) => `Seleccione ${views[view]}. ${time === null ? 'Sin tiempo seleccionado' : `El tiempo seleccionado es ${adapter.format(time, 'fullTime')}`}`,\n hoursClockNumberText: hours => `${hours} horas`,\n minutesClockNumberText: minutes => `${minutes} minutos`,\n secondsClockNumberText: seconds => `${seconds} segundos`,\n // Open picker labels\n openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Elige la fecha, la fecha elegida es ${utils.format(utils.date(rawValue), 'fullDate')}` : 'Elige la fecha',\n openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Elige la hora, la hora elegido es ${utils.format(utils.date(rawValue), 'fullTime')}` : 'Elige la hora',\n // Table labels\n timeTableLabel: 'elige la fecha',\n dateTableLabel: 'elige la hora'\n};\nexport const esES = getPickersLocalization(esESPickers);","import { getPickersLocalization } from './utils/getPickersLocalization';\nconst views = {\n hours: 'heures',\n minutes: 'minutes',\n seconds: 'secondes'\n};\nconst frFRPickers = {\n // Calendar navigation\n previousMonth: 'Mois précédent',\n nextMonth: 'Mois suivant',\n // View navigation\n openPreviousView: 'Ouvrir la vue précédente',\n openNextView: 'Ouvrir la vue suivante',\n calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'La vue année est ouverte, ouvrir la vue calendrier' : 'La vue calendrier est ouverte, ouvrir la vue année',\n // DateRange placeholders\n start: 'Début',\n end: 'Fin',\n // Action bar\n cancelButtonLabel: 'Annuler',\n clearButtonLabel: 'Vider',\n okButtonLabel: 'OK',\n todayButtonLabel: \"Aujourd'hui\",\n // Clock labels\n clockLabelText: (view, time, adapter) => `Choix des ${views[view]}. ${time === null ? 'Aucune heure choisie' : `L'heure choisie est ${adapter.format(time, 'fullTime')}`}`,\n hoursClockNumberText: hours => `${hours} heures`,\n minutesClockNumberText: minutes => `${minutes} minutes`,\n secondsClockNumberText: seconds => `${seconds} secondes`,\n // Open picker labels\n openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Choisir la date, la date sélectionnée est ${utils.format(utils.date(rawValue), 'fullDate')}` : 'Choisir la date',\n openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Choisir l'heure, l'heure sélectionnée est ${utils.format(utils.date(rawValue), 'fullTime')}` : \"Choisir l'heure\",\n // Table labels\n timeTableLabel: \"choix de l'heure\",\n dateTableLabel: 'choix de la date'\n};\nexport const frFR = getPickersLocalization(frFRPickers);","import { getPickersLocalization } from './utils/getPickersLocalization';\nconst nbNOPickers = {\n // Calendar navigation\n previousMonth: 'Forrige måned',\n nextMonth: 'Neste måned',\n // View navigation\n openPreviousView: 'åpne forrige visning',\n openNextView: 'åpne neste visning',\n calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'årsvisning er åpen, bytt til kalendervisning' : 'kalendervisning er åpen, bytt til årsvisning',\n // DateRange placeholders\n start: 'Start',\n end: 'Slutt',\n // Action bar\n cancelButtonLabel: 'Avbryt',\n clearButtonLabel: 'Fjern',\n okButtonLabel: 'OK',\n todayButtonLabel: 'I dag',\n // Clock labels\n clockLabelText: (view, time, adapter) => `Velg ${view}. ${time === null ? 'Ingen tid valgt' : `Valgt tid er ${adapter.format(time, 'fullTime')}`}`,\n hoursClockNumberText: hours => `${hours} timer`,\n minutesClockNumberText: minutes => `${minutes} minutter`,\n secondsClockNumberText: seconds => `${seconds} sekunder`,\n // Open picker labels\n openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Velg dato, valgt dato er ${utils.format(utils.date(rawValue), 'fullDate')}` : 'Velg dato',\n openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Velg tid, valgt tid er ${utils.format(utils.date(rawValue), 'fullTime')}` : 'Velg tid',\n // Table labels\n timeTableLabel: 'velg tid',\n dateTableLabel: 'velg dato'\n};\nexport const nbNO = getPickersLocalization(nbNOPickers);","import { getPickersLocalization } from './utils/getPickersLocalization';\nconst svSEPickers = {\n // Calendar navigation\n previousMonth: 'Föregående månad',\n nextMonth: 'Nästa månad',\n // View navigation\n openPreviousView: 'öppna föregående vy',\n openNextView: 'öppna nästa vy',\n calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'årsvyn är öppen, byt till kalendervy' : 'kalendervyn är öppen, byt till årsvy',\n // DateRange placeholders\n start: 'Start',\n end: 'Slut',\n // Action bar\n cancelButtonLabel: 'Avbryt',\n clearButtonLabel: 'Rensa',\n okButtonLabel: 'OK',\n todayButtonLabel: 'Idag',\n // Clock labels\n clockLabelText: (view, time, adapter) => `Select ${view}. ${time === null ? 'Ingen tid vald' : `Vald tid är ${adapter.format(time, 'fullTime')}`}`,\n hoursClockNumberText: hours => `${hours} timmar`,\n minutesClockNumberText: minutes => `${minutes} minuter`,\n secondsClockNumberText: seconds => `${seconds} sekunder`,\n // Open picker labels\n openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Välj datum, valt datum är ${utils.format(utils.date(rawValue), 'fullDate')}` : 'Välj datum',\n openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Välj tid, vald tid är ${utils.format(utils.date(rawValue), 'fullTime')}` : 'Välj tid',\n // Table labels\n timeTableLabel: 'välj tid',\n dateTableLabel: 'välj datum'\n};\nexport const svSE = getPickersLocalization(svSEPickers);","import { getPickersLocalization } from './utils/getPickersLocalization';\nconst views = {\n hours: 'le ore',\n minutes: 'i minuti',\n seconds: 'i secondi'\n}; // This object is not Partial<PickersLocaleText> because it is the default values\n\nconst itITPickers = {\n // Calendar navigation\n previousMonth: 'Mese precedente',\n nextMonth: 'Mese successivo',\n // View navigation\n openPreviousView: 'apri la vista precedente',\n openNextView: 'apri la vista successiva',\n calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? \"la vista dell'anno è aperta, passare alla vista del calendario\" : \"la vista dell'calendario è aperta, passare alla vista dell'anno\",\n // DateRange placeholders\n start: 'Inizio',\n end: 'Fine',\n // Action bar\n cancelButtonLabel: 'Cancellare',\n clearButtonLabel: 'Sgomberare',\n okButtonLabel: 'OK',\n todayButtonLabel: 'Oggi',\n // Clock labels\n clockLabelText: (view, time, adapter) => `Seleziona ${views[view]}. ${time === null ? 'Nessun orario selezionato' : `L'ora selezionata è ${adapter.format(time, 'fullTime')}`}`,\n hoursClockNumberText: hours => `${hours} ore`,\n minutesClockNumberText: minutes => `${minutes} minuti`,\n secondsClockNumberText: seconds => `${seconds} secondi`,\n // Open picker labels\n openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Scegli la data, la data selezionata è ${utils.format(utils.date(rawValue), 'fullDate')}` : 'Scegli la data',\n openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Scegli l'ora, l'ora selezionata è ${utils.format(utils.date(rawValue), 'fullTime')}` : \"Scegli l'ora\",\n // Table labels\n timeTableLabel: 'scegli un ora',\n dateTableLabel: 'scegli una data'\n};\nexport const itIT = getPickersLocalization(itITPickers);","import { getPickersLocalization } from './utils/getPickersLocalization';\nconst views = {\n hours: '小时',\n minutes: '分钟',\n seconds: '秒'\n}; // This object is not Partial<PickersLocaleText> because it is the default values\n\nconst zhCNPickers = {\n // Calendar navigation\n previousMonth: '上个月',\n nextMonth: '下个月',\n // View navigation\n openPreviousView: '前一个视图',\n openNextView: '下一个视图',\n calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? '年视图已打开,切换为日历视图' : '日历视图已打开,切换为年视图',\n // DateRange placeholders\n start: '开始',\n end: '结束',\n // Action bar\n cancelButtonLabel: '取消',\n clearButtonLabel: '清除',\n okButtonLabel: '确认',\n todayButtonLabel: '今天',\n // Clock labels\n clockLabelText: (view, time, adapter) => `Select ${views[view]}. ${time === null ? '未选择时间' : `已选择${adapter.format(time, 'fullTime')}`}`,\n hoursClockNumberText: hours => `${hours}小时`,\n minutesClockNumberText: minutes => `${minutes}分钟`,\n secondsClockNumberText: seconds => `${seconds}秒`,\n // Open picker labels\n openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `选择日期,已选择${utils.format(utils.date(rawValue), 'fullDate')}` : '选择日期',\n openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `选择时间,已选择${utils.format(utils.date(rawValue), 'fullTime')}` : '选择时间',\n // Table labels\n timeTableLabel: '选择时间',\n dateTableLabel: '选择日期'\n};\nexport const zhCN = getPickersLocalization(zhCNPickers);","/** @license MUI v5.0.0-beta.5\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nexport * from './CalendarPicker';\nexport * from './CalendarPickerSkeleton';\nexport * from './ClockPicker';\nexport * from './DatePicker';\nexport * from './DateTimePicker';\nexport * from './DesktopDatePicker';\nexport * from './DesktopDateTimePicker';\nexport * from './DesktopTimePicker';\nexport * from './LocalizationProvider';\nexport * from './MobileDatePicker';\nexport * from './MobileDateTimePicker';\nexport * from './MobileTimePicker';\nexport * from './MonthPicker';\nexport * from './PickersDay';\nexport * from './StaticDatePicker';\nexport * from './StaticDateTimePicker';\nexport * from './StaticTimePicker';\nexport * from './TimePicker';\nexport * from './YearPicker';\nexport * from './locales';\nexport { PickerStaticWrapper } from './internals/components/PickerStaticWrapper';","import { useRef } from \"react\";\n\n// Saves incoming handler to the ref in order to avoid \"useCallback hell\"\nexport function useEventCallback<T>(handler?: (value: T) => void): (value: T) => void {\n const callbackRef = useRef(handler);\n const fn = useRef((value: T) => {\n callbackRef.current && callbackRef.current(value);\n });\n callbackRef.current = handler;\n\n return fn.current;\n}\n","// Clamps a value between an upper and lower bound.\n// We use ternary operators because it makes the minified code\n// 2 times shorter then `Math.min(Math.max(a,b),c)`\nexport const clamp = (number: number, min = 0, max = 1): number => {\n return number > max ? max : number < min ? min : number;\n};\n","import React, { useRef, useMemo, useEffect } from \"react\";\n\nimport { useEventCallback } from \"../../hooks/useEventCallback\";\nimport { clamp } from \"../../utils/clamp\";\n\nexport interface Interaction {\n left: number;\n top: number;\n}\n\n// Check if an event was triggered by touch\nconst isTouch = (event: MouseEvent | TouchEvent): event is TouchEvent => \"touches\" in event;\n\n// Finds a proper touch point by its identifier\nconst getTouchPoint = (touches: TouchList, touchId: null | number): Touch => {\n for (let i = 0; i < touches.length; i++) {\n if (touches[i].identifier === touchId) return touches[i];\n }\n return touches[0];\n};\n\n// Finds the proper window object to fix iframe embedding issues\nconst getParentWindow = (node?: HTMLDivElement | null): Window => {\n return (node && node.ownerDocument.defaultView) || self;\n};\n\n// Returns a relative position of the pointer inside the node's bounding box\nconst getRelativePosition = (\n node: HTMLDivElement,\n event: MouseEvent | TouchEvent,\n touchId: null | number\n): Interaction => {\n const rect = node.getBoundingClientRect();\n\n // Get user's pointer position from `touches` array if it's a `TouchEvent`\n const pointer = isTouch(event) ? getTouchPoint(event.touches, touchId) : (event as MouseEvent);\n\n return {\n left: clamp((pointer.pageX - (rect.left + getParentWindow(node).pageXOffset)) / rect.width),\n top: clamp((pointer.pageY - (rect.top + getParentWindow(node).pageYOffset)) / rect.height),\n };\n};\n\n// Browsers introduced an intervention, making touch events passive by default.\n// This workaround removes `preventDefault` call from the touch handlers.\n// https://github.com/facebook/react/issues/19651\nconst preventDefaultMove = (event: MouseEvent | TouchEvent): void => {\n !isTouch(event) && event.preventDefault();\n};\n\n// Prevent mobile browsers from handling mouse events (conflicting with touch ones).\n// If we detected a touch interaction before, we prefer reacting to touch events only.\nconst isInvalid = (event: MouseEvent | TouchEvent, hasTouch: boolean): boolean => {\n return hasTouch && !isTouch(event);\n};\n\ninterface Props {\n onMove: (interaction: Interaction) => void;\n onKey: (offset: Interaction) => void;\n children: React.ReactNode;\n}\n\nconst InteractiveBase = ({ onMove, onKey, ...rest }: Props) => {\n const container = useRef<HTMLDivElement>(null);\n const onMoveCallback = useEventCallback<Interaction>(onMove);\n const onKeyCallback = useEventCallback<Interaction>(onKey);\n const touchId = useRef<null | number>(null);\n const hasTouch = useRef(false);\n\n const [handleMoveStart, handleKeyDown, toggleDocumentEvents] = useMemo(() => {\n const handleMoveStart = ({ nativeEvent }: React.MouseEvent | React.TouchEvent) => {\n const el = container.current;\n if (!el) return;\n\n // Prevent text selection\n preventDefaultMove(nativeEvent);\n\n if (isInvalid(nativeEvent, hasTouch.current) || !el) return;\n\n if (isTouch(nativeEvent)) {\n hasTouch.current = true;\n const changedTouches = nativeEvent.changedTouches || [];\n if (changedTouches.length) touchId.current = changedTouches[0].identifier;\n }\n\n el.focus();\n onMoveCallback(getRelativePosition(el, nativeEvent, touchId.current));\n toggleDocumentEvents(true);\n };\n\n const handleMove = (event: MouseEvent | TouchEvent) => {\n // Prevent text selection\n preventDefaultMove(event);\n\n // If user moves the pointer outside of the window or iframe bounds and release it there,\n // `mouseup`/`touchend` won't be fired. In order to stop the picker from following the cursor\n // after the user has moved the mouse/finger back to the document, we check `event.buttons`\n // and `event.touches`. It allows us to detect that the user is just moving his pointer\n // without pressing it down\n const isDown = isTouch(event) ? event.touches.length > 0 : event.buttons > 0;\n\n if (isDown && container.current) {\n onMoveCallback(getRelativePosition(container.current, event, touchId.current));\n } else {\n toggleDocumentEvents(false);\n }\n };\n\n const handleMoveEnd = () => toggleDocumentEvents(false);\n\n const handleKeyDown = (event: React.KeyboardEvent) => {\n const keyCode = event.which || event.keyCode;\n\n // Ignore all keys except arrow ones\n if (keyCode < 37 || keyCode > 40) return;\n // Do not scroll page by arrow keys when document is focused on the element\n event.preventDefault();\n // Send relative offset to the parent component.\n // We use codes (37←, 38↑, 39→, 40↓) instead of keys ('ArrowRight', 'ArrowDown', etc)\n // to reduce the size of the library\n onKeyCallback({\n left: keyCode === 39 ? 0.05 : keyCode === 37 ? -0.05 : 0,\n top: keyCode === 40 ? 0.05 : keyCode === 38 ? -0.05 : 0,\n });\n };\n\n function toggleDocumentEvents(state?: boolean) {\n const touch = hasTouch.current;\n const el = container.current;\n const parentWindow = getParentWindow(el);\n\n // Add or remove additional pointer event listeners\n const toggleEvent = state ? parentWindow.addEventListener : parentWindow.removeEventListener;\n toggleEvent(touch ? \"touchmove\" : \"mousemove\", handleMove);\n toggleEvent(touch ? \"touchend\" : \"mouseup\", handleMoveEnd);\n }\n\n return [handleMoveStart, handleKeyDown, toggleDocumentEvents];\n }, [onKeyCallback, onMoveCallback]);\n\n // Remove window event listeners before unmounting\n useEffect(() => toggleDocumentEvents, [toggleDocumentEvents]);\n\n return (\n <div\n {...rest}\n onTouchStart={handleMoveStart}\n onMouseDown={handleMoveStart}\n className=\"react-colorful__interactive\"\n ref={container}\n onKeyDown={handleKeyDown}\n tabIndex={0}\n role=\"slider\"\n />\n );\n};\n\nexport const Interactive = React.memo(InteractiveBase);\n","export const formatClassName = (names: unknown[]): string => names.filter(Boolean).join(\" \");\n","import React from \"react\";\nimport { formatClassName } from \"../../utils/format\";\n\ninterface Props {\n className?: string;\n top?: number;\n left: number;\n color: string;\n}\n\nexport const Pointer = ({ className, color, left, top = 0.5 }: Props): JSX.Element => {\n const nodeClassName = formatClassName([\"react-colorful__pointer\", className]);\n\n const style = {\n top: `${top * 100}%`,\n left: `${left * 100}%`,\n };\n\n return (\n <div className={nodeClassName} style={style}>\n <div className=\"react-colorful__pointer-fill\" style={{ backgroundColor: color }} />\n </div>\n );\n};\n","export const round = (number: number, digits = 0, base = Math.pow(10, digits)): number => {\n return Math.round(base * number) / base;\n};\n","import { round } from \"./round\";\nimport { RgbaColor, RgbColor, HslaColor, HslColor, HsvaColor, HsvColor } from \"../types\";\n\n/**\n * Valid CSS <angle> units.\n * https://developer.mozilla.org/en-US/docs/Web/CSS/angle\n */\nconst angleUnits: Record<string, number> = {\n grad: 360 / 400,\n turn: 360,\n rad: 360 / (Math.PI * 2),\n};\n\nexport const hexToHsva = (hex: string): HsvaColor => rgbaToHsva(hexToRgba(hex));\n\nexport const hexToRgba = (hex: string): RgbaColor => {\n if (hex[0] === \"#\") hex = hex.substring(1);\n\n if (hex.length < 6) {\n return {\n r: parseInt(hex[0] + hex[0], 16),\n g: parseInt(hex[1] + hex[1], 16),\n b: parseInt(hex[2] + hex[2], 16),\n a: hex.length === 4 ? round(parseInt(hex[3] + hex[3], 16) / 255, 2) : 1,\n };\n }\n\n return {\n r: parseInt(hex.substring(0, 2), 16),\n g: parseInt(hex.substring(2, 4), 16),\n b: parseInt(hex.substring(4, 6), 16),\n a: hex.length === 8 ? round(parseInt(hex.substring(6, 8), 16) / 255, 2) : 1,\n };\n};\n\nexport const parseHue = (value: string, unit = \"deg\"): number => {\n return Number(value) * (angleUnits[unit] || 1);\n};\n\nexport const hslaStringToHsva = (hslString: string): HsvaColor => {\n const matcher = /hsla?\\(?\\s*(-?\\d*\\.?\\d+)(deg|rad|grad|turn)?[,\\s]+(-?\\d*\\.?\\d+)%?[,\\s]+(-?\\d*\\.?\\d+)%?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i;\n const match = matcher.exec(hslString);\n\n if (!match) return { h: 0, s: 0, v: 0, a: 1 };\n\n return hslaToHsva({\n h: parseHue(match[1], match[2]),\n s: Number(match[3]),\n l: Number(match[4]),\n a: match[5] === undefined ? 1 : Number(match[5]) / (match[6] ? 100 : 1),\n });\n};\n\nexport const hslStringToHsva = hslaStringToHsva;\n\nexport const hslaToHsva = ({ h, s, l, a }: HslaColor): HsvaColor => {\n s *= (l < 50 ? l : 100 - l) / 100;\n\n return {\n h: h,\n s: s > 0 ? ((2 * s) / (l + s)) * 100 : 0,\n v: l + s,\n a,\n };\n};\n\nexport const hsvaToHex = (hsva: HsvaColor): string => rgbaToHex(hsvaToRgba(hsva));\n\nexport const hsvaToHsla = ({ h, s, v, a }: HsvaColor): HslaColor => {\n const hh = ((200 - s) * v) / 100;\n\n return {\n h: round(h),\n s: round(hh > 0 && hh < 200 ? ((s * v) / 100 / (hh <= 100 ? hh : 200 - hh)) * 100 : 0),\n l: round(hh / 2),\n a: round(a, 2),\n };\n};\n\nexport const hsvaToHslString = (hsva: HsvaColor): string => {\n const { h, s, l } = hsvaToHsla(hsva);\n return `hsl(${h}, ${s}%, ${l}%)`;\n};\n\nexport const hsvaToHsvString = (hsva: HsvaColor): string => {\n const { h, s, v } = roundHsva(hsva);\n return `hsv(${h}, ${s}%, ${v}%)`;\n};\n\nexport const hsvaToHsvaString = (hsva: HsvaColor): string => {\n const { h, s, v, a } = roundHsva(hsva);\n return `hsva(${h}, ${s}%, ${v}%, ${a})`;\n};\n\nexport const hsvaToHslaString = (hsva: HsvaColor): string => {\n const { h, s, l, a } = hsvaToHsla(hsva);\n return `hsla(${h}, ${s}%, ${l}%, ${a})`;\n};\n\nexport const hsvaToRgba = ({ h, s, v, a }: HsvaColor): RgbaColor => {\n h = (h / 360) * 6;\n s = s / 100;\n v = v / 100;\n\n const hh = Math.floor(h),\n b = v * (1 - s),\n c = v * (1 - (h - hh) * s),\n d = v * (1 - (1 - h + hh) * s),\n module = hh % 6;\n\n return {\n r: round([v, c, b, b, d, v][module] * 255),\n g: round([d, v, v, c, b, b][module] * 255),\n b: round([b, b, d, v, v, c][module] * 255),\n a: round(a, 2),\n };\n};\n\nexport const hsvaToRgbString = (hsva: HsvaColor): string => {\n const { r, g, b } = hsvaToRgba(hsva);\n return `rgb(${r}, ${g}, ${b})`;\n};\n\nexport const hsvaToRgbaString = (hsva: HsvaColor): string => {\n const { r, g, b, a } = hsvaToRgba(hsva);\n return `rgba(${r}, ${g}, ${b}, ${a})`;\n};\n\nexport const hsvaStringToHsva = (hsvString: string): HsvaColor => {\n const matcher = /hsva?\\(?\\s*(-?\\d*\\.?\\d+)(deg|rad|grad|turn)?[,\\s]+(-?\\d*\\.?\\d+)%?[,\\s]+(-?\\d*\\.?\\d+)%?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i;\n const match = matcher.exec(hsvString);\n\n if (!match) return { h: 0, s: 0, v: 0, a: 1 };\n\n return roundHsva({\n h: parseHue(match[1], match[2]),\n s: Number(match[3]),\n v: Number(match[4]),\n a: match[5] === undefined ? 1 : Number(match[5]) / (match[6] ? 100 : 1),\n });\n};\n\nexport const hsvStringToHsva = hsvaStringToHsva;\n\nexport const rgbaStringToHsva = (rgbaString: string): HsvaColor => {\n const matcher = /rgba?\\(?\\s*(-?\\d*\\.?\\d+)(%)?[,\\s]+(-?\\d*\\.?\\d+)(%)?[,\\s]+(-?\\d*\\.?\\d+)(%)?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i;\n const match = matcher.exec(rgbaString);\n\n if (!match) return { h: 0, s: 0, v: 0, a: 1 };\n\n return rgbaToHsva({\n r: Number(match[1]) / (match[2] ? 100 / 255 : 1),\n g: Number(match[3]) / (match[4] ? 100 / 255 : 1),\n b: Number(match[5]) / (match[6] ? 100 / 255 : 1),\n a: match[7] === undefined ? 1 : Number(match[7]) / (match[8] ? 100 : 1),\n });\n};\n\nexport const rgbStringToHsva = rgbaStringToHsva;\n\nconst format = (number: number) => {\n const hex = number.toString(16);\n return hex.length < 2 ? \"0\" + hex : hex;\n};\n\nexport const rgbaToHex = ({ r, g, b, a }: RgbaColor): string => {\n const alphaHex = a < 1 ? format(round(a * 255)) : \"\";\n return \"#\" + format(r) + format(g) + format(b) + alphaHex;\n};\n\nexport const rgbaToHsva = ({ r, g, b, a }: RgbaColor): HsvaColor => {\n const max = Math.max(r, g, b);\n const delta = max - Math.min(r, g, b);\n\n // prettier-ignore\n const hh = delta\n ? max === r\n ? (g - b) / delta\n : max === g\n ? 2 + (b - r) / delta\n : 4 + (r - g) / delta\n : 0;\n\n return {\n h: round(60 * (hh < 0 ? hh + 6 : hh)),\n s: round(max ? (delta / max) * 100 : 0),\n v: round((max / 255) * 100),\n a,\n };\n};\n\nexport const roundHsva = (hsva: HsvaColor): HsvaColor => ({\n h: round(hsva.h),\n s: round(hsva.s),\n v: round(hsva.v),\n a: round(hsva.a, 2),\n});\n\nexport const rgbaToRgb = ({ r, g, b }: RgbaColor): RgbColor => ({ r, g, b });\n\nexport const hslaToHsl = ({ h, s, l }: HslaColor): HslColor => ({ h, s, l });\n\nexport const hsvaToHsv = (hsva: HsvaColor): HsvColor => {\n const { h, s, v } = roundHsva(hsva);\n return { h, s, v };\n};\n","import React from \"react\";\n\nimport { Interactive, Interaction } from \"./Interactive\";\nimport { Pointer } from \"./Pointer\";\n\nimport { hsvaToHslString } from \"../../utils/convert\";\nimport { formatClassName } from \"../../utils/format\";\nimport { clamp } from \"../../utils/clamp\";\nimport { round } from \"../../utils/round\";\n\ninterface Props {\n className?: string;\n hue: number;\n onChange: (newHue: { h: number }) => void;\n}\n\nconst HueBase = ({ className, hue, onChange }: Props) => {\n const handleMove = (interaction: Interaction) => {\n onChange({ h: 360 * interaction.left });\n };\n\n const handleKey = (offset: Interaction) => {\n // Hue measured in degrees of the color circle ranging from 0 to 360\n onChange({\n h: clamp(hue + offset.left * 360, 0, 360),\n });\n };\n\n const nodeClassName = formatClassName([\"react-colorful__hue\", className]);\n\n return (\n <div className={nodeClassName}>\n <Interactive\n onMove={handleMove}\n onKey={handleKey}\n aria-label=\"Hue\"\n aria-valuenow={round(hue)}\n aria-valuemax=\"360\"\n aria-valuemin=\"0\"\n >\n <Pointer\n className=\"react-colorful__hue-pointer\"\n left={hue / 360}\n color={hsvaToHslString({ h: hue, s: 100, v: 100, a: 1 })}\n />\n </Interactive>\n </div>\n );\n};\n\nexport const Hue = React.memo(HueBase);\n","import React from \"react\";\nimport { Interactive, Interaction } from \"./Interactive\";\nimport { Pointer } from \"./Pointer\";\nimport { HsvaColor } from \"../../types\";\nimport { hsvaToHslString } from \"../../utils/convert\";\nimport { clamp } from \"../../utils/clamp\";\nimport { round } from \"../../utils/round\";\n\ninterface Props {\n hsva: HsvaColor;\n onChange: (newColor: { s: number; v: number }) => void;\n}\n\nconst SaturationBase = ({ hsva, onChange }: Props) => {\n const handleMove = (interaction: Interaction) => {\n onChange({\n s: interaction.left * 100,\n v: 100 - interaction.top * 100,\n });\n };\n\n const handleKey = (offset: Interaction) => {\n // Saturation and brightness always fit into [0, 100] range\n onChange({\n s: clamp(hsva.s + offset.left * 100, 0, 100),\n v: clamp(hsva.v - offset.top * 100, 0, 100),\n });\n };\n\n const containerStyle = {\n backgroundColor: hsvaToHslString({ h: hsva.h, s: 100, v: 100, a: 1 }),\n };\n\n return (\n <div className=\"react-colorful__saturation\" style={containerStyle}>\n <Interactive\n onMove={handleMove}\n onKey={handleKey}\n aria-label=\"Color\"\n aria-valuetext={`Saturation ${round(hsva.s)}%, Brightness ${round(hsva.v)}%`}\n >\n <Pointer\n className=\"react-colorful__saturation-pointer\"\n top={1 - hsva.v / 100}\n left={hsva.s / 100}\n color={hsvaToHslString(hsva)}\n />\n </Interactive>\n </div>\n );\n};\n\nexport const Saturation = React.memo(SaturationBase);\n","import { hexToRgba } from \"./convert\";\nimport { ObjectColor } from \"../types\";\n\nexport const equalColorObjects = (first: ObjectColor, second: ObjectColor): boolean => {\n if (first === second) return true;\n\n for (const prop in first) {\n // The following allows for a type-safe calling of this function (first & second have to be HSL, HSV, or RGB)\n // with type-unsafe iterating over object keys. TS does not allow this without an index (`[key: string]: number`)\n // on an object to define how iteration is normally done. To ensure extra keys are not allowed on our types,\n // we must cast our object to unknown (as RGB demands `r` be a key, while `Record<string, x>` does not care if\n // there is or not), and then as a type TS can iterate over.\n if (\n ((first as unknown) as Record<string, number>)[prop] !==\n ((second as unknown) as Record<string, number>)[prop]\n )\n return false;\n }\n\n return true;\n};\n\nexport const equalColorString = (first: string, second: string): boolean => {\n return first.replace(/\\s/g, \"\") === second.replace(/\\s/g, \"\");\n};\n\nexport const equalHex = (first: string, second: string): boolean => {\n if (first.toLowerCase() === second.toLowerCase()) return true;\n\n // To compare colors like `#FFF` and `ffffff` we convert them into RGB objects\n return equalColorObjects(hexToRgba(first), hexToRgba(second));\n};\n","import { useState, useEffect, useCallback, useRef } from \"react\";\nimport { ColorModel, AnyColor, HsvaColor } from \"../types\";\nimport { equalColorObjects } from \"../utils/compare\";\nimport { useEventCallback } from \"./useEventCallback\";\n\nexport function useColorManipulation<T extends AnyColor>(\n colorModel: ColorModel<T>,\n color: T,\n onChange?: (color: T) => void\n): [HsvaColor, (color: Partial<HsvaColor>) => void] {\n // Save onChange callback in the ref for avoiding \"useCallback hell\"\n const onChangeCallback = useEventCallback<T>(onChange);\n\n // No matter which color model is used (HEX, RGB(A) or HSL(A)),\n // all internal calculations are based on HSVA model\n const [hsva, updateHsva] = useState<HsvaColor>(() => colorModel.toHsva(color));\n\n // By using this ref we're able to prevent extra updates\n // and the effects recursion during the color conversion\n const cache = useRef({ color, hsva });\n\n // Update local HSVA-value if `color` property value is changed,\n // but only if that's not the same color that we just sent to the parent\n useEffect(() => {\n if (!colorModel.equal(color, cache.current.color)) {\n const newHsva = colorModel.toHsva(color);\n cache.current = { hsva: newHsva, color };\n updateHsva(newHsva);\n }\n }, [color, colorModel]);\n\n // Trigger `onChange` callback only if an updated color is different from cached one;\n // save the new color to the ref to prevent unnecessary updates\n useEffect(() => {\n let newColor;\n if (\n !equalColorObjects(hsva, cache.current.hsva) &&\n !colorModel.equal((newColor = colorModel.fromHsva(hsva)), cache.current.color)\n ) {\n cache.current = { hsva, color: newColor };\n onChangeCallback(newColor);\n }\n }, [hsva, colorModel, onChangeCallback]);\n\n // Merge the current HSVA color object with updated params.\n // For example, when a child component sends `h` or `s` only\n const handleChange = useCallback((params: Partial<HsvaColor>) => {\n updateHsva((current) => Object.assign({}, current, params));\n }, []);\n\n return [hsva, handleChange];\n}\n","declare const __webpack_nonce__: string | undefined;\nlet nonce: string | undefined;\n\n/**\n * Returns a nonce hash included by Webpack or the one defined manually by developer.\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/nonce\n * https://webpack.js.org/guides/csp/\n */\nexport const getNonce = (): string | undefined => {\n if (nonce) return nonce;\n if (typeof __webpack_nonce__ !== \"undefined\") return __webpack_nonce__;\n return undefined;\n};\n\n/**\n * Signs the style tag with a base64-encoded string (nonce) to conforms to Content Security Policies.\n * This function has to be invoked before any picker is rendered if you aren't using Webpack for CSP.\n */\nexport const setNonce = (hash: string): void => {\n nonce = hash;\n};\n","import { useLayoutEffect, useEffect } from \"react\";\n\n// React currently throws a warning when using useLayoutEffect on the server.\n// To get around it, we can conditionally useEffect on the server (no-op) and\n// useLayoutEffect in the browser.\nexport const useIsomorphicLayoutEffect =\n typeof window !== \"undefined\" ? useLayoutEffect : useEffect;\n","import { RefObject } from \"react\";\n\nimport { useIsomorphicLayoutEffect } from \"./useIsomorphicLayoutEffect\";\nimport { getNonce } from \"../utils/nonce\";\n\n// Bundler is configured to load this as a processed minified CSS-string\nimport styles from \"../css/styles.css\";\n\nconst styleElementMap: Map<Document, HTMLStyleElement> = new Map();\n\n/**\n * Injects CSS code into the document's <head>\n */\nexport const useStyleSheet = (nodeRef: RefObject<HTMLDivElement>): void => {\n useIsomorphicLayoutEffect(() => {\n const parentDocument = nodeRef.current ? nodeRef.current.ownerDocument : document;\n\n if (typeof parentDocument !== \"undefined\" && !styleElementMap.has(parentDocument)) {\n const styleElement = parentDocument.createElement(\"style\");\n styleElement.innerHTML = styles;\n styleElementMap.set(parentDocument, styleElement);\n\n // Conform to CSP rules by setting `nonce` attribute to the inline styles\n const nonce = getNonce();\n if (nonce) styleElement.setAttribute(\"nonce\", nonce);\n\n parentDocument.head.appendChild(styleElement);\n }\n }, []);\n};\n","import React, { useRef } from \"react\";\n\nimport { Hue } from \"./Hue\";\nimport { Saturation } from \"./Saturation\";\n\nimport { ColorModel, ColorPickerBaseProps, AnyColor } from \"../../types\";\nimport { useColorManipulation } from \"../../hooks/useColorManipulation\";\nimport { useStyleSheet } from \"../../hooks/useStyleSheet\";\nimport { formatClassName } from \"../../utils/format\";\n\ninterface Props<T extends AnyColor> extends Partial<ColorPickerBaseProps<T>> {\n colorModel: ColorModel<T>;\n}\n\nexport const ColorPicker = <T extends AnyColor>({\n className,\n colorModel,\n color = colorModel.defaultColor,\n onChange,\n ...rest\n}: Props<T>): JSX.Element => {\n const nodeRef = useRef<HTMLDivElement>(null);\n useStyleSheet(nodeRef);\n\n const [hsva, updateHsva] = useColorManipulation<T>(colorModel, color, onChange);\n\n const nodeClassName = formatClassName([\"react-colorful\", className]);\n\n return (\n <div {...rest} ref={nodeRef} className={nodeClassName}>\n <Saturation hsva={hsva} onChange={updateHsva} />\n <Hue hue={hsva.h} onChange={updateHsva} className=\"react-colorful__last-control\" />\n </div>\n );\n};\n","import React from \"react\";\n\nimport { ColorPicker } from \"./common/ColorPicker\";\nimport { ColorModel, ColorPickerBaseProps } from \"../types\";\nimport { equalHex } from \"../utils/compare\";\nimport { hexToHsva, hsvaToHex } from \"../utils/convert\";\n\nconst colorModel: ColorModel<string> = {\n defaultColor: \"000\",\n toHsva: hexToHsva,\n fromHsva: ({ h, s, v }) => hsvaToHex({ h, s, v, a: 1 }),\n equal: equalHex,\n};\n\nexport const HexColorPicker = (props: Partial<ColorPickerBaseProps<string>>): JSX.Element => (\n <ColorPicker {...props} colorModel={colorModel} />\n);\n","import React from \"react\";\n\nimport { Interactive, Interaction } from \"./Interactive\";\nimport { Pointer } from \"./Pointer\";\n\nimport { hsvaToHslaString } from \"../../utils/convert\";\nimport { formatClassName } from \"../../utils/format\";\nimport { clamp } from \"../../utils/clamp\";\nimport { round } from \"../../utils/round\";\nimport { HsvaColor } from \"../../types\";\n\ninterface Props {\n className?: string;\n hsva: HsvaColor;\n onChange: (newAlpha: { a: number }) => void;\n}\n\nexport const Alpha = ({ className, hsva, onChange }: Props): JSX.Element => {\n const handleMove = (interaction: Interaction) => {\n onChange({ a: interaction.left });\n };\n\n const handleKey = (offset: Interaction) => {\n // Alpha always fit into [0, 1] range\n onChange({ a: clamp(hsva.a + offset.left) });\n };\n\n // We use `Object.assign` instead of the spread operator\n // to prevent adding the polyfill (about 150 bytes gzipped)\n const colorFrom = hsvaToHslaString(Object.assign({}, hsva, { a: 0 }));\n const colorTo = hsvaToHslaString(Object.assign({}, hsva, { a: 1 }));\n\n const gradientStyle = {\n backgroundImage: `linear-gradient(90deg, ${colorFrom}, ${colorTo})`,\n };\n\n const nodeClassName = formatClassName([\"react-colorful__alpha\", className]);\n const ariaValue = round(hsva.a * 100);\n\n return (\n <div className={nodeClassName}>\n <div className=\"react-colorful__alpha-gradient\" style={gradientStyle} />\n <Interactive\n onMove={handleMove}\n onKey={handleKey}\n aria-label=\"Alpha\"\n aria-valuetext={`${ariaValue}%`}\n aria-valuenow={ariaValue}\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n >\n <Pointer\n className=\"react-colorful__alpha-pointer\"\n left={hsva.a}\n color={hsvaToHslaString(hsva)}\n />\n </Interactive>\n </div>\n );\n};\n","import React, { useRef } from \"react\";\n\nimport { Hue } from \"./Hue\";\nimport { Saturation } from \"./Saturation\";\nimport { Alpha } from \"./Alpha\";\n\nimport { ColorModel, ColorPickerBaseProps, AnyColor } from \"../../types\";\nimport { useColorManipulation } from \"../../hooks/useColorManipulation\";\nimport { useStyleSheet } from \"../../hooks/useStyleSheet\";\nimport { formatClassName } from \"../../utils/format\";\n\ninterface Props<T extends AnyColor> extends Partial<ColorPickerBaseProps<T>> {\n colorModel: ColorModel<T>;\n}\n\nexport const AlphaColorPicker = <T extends AnyColor>({\n className,\n colorModel,\n color = colorModel.defaultColor,\n onChange,\n ...rest\n}: Props<T>): JSX.Element => {\n const nodeRef = useRef<HTMLDivElement>(null);\n useStyleSheet(nodeRef);\n\n const [hsva, updateHsva] = useColorManipulation<T>(colorModel, color, onChange);\n\n const nodeClassName = formatClassName([\"react-colorful\", className]);\n\n return (\n <div {...rest} ref={nodeRef} className={nodeClassName}>\n <Saturation hsva={hsva} onChange={updateHsva} />\n <Hue hue={hsva.h} onChange={updateHsva} />\n <Alpha hsva={hsva} onChange={updateHsva} className=\"react-colorful__last-control\" />\n </div>\n );\n};\n","import React from \"react\";\n\nimport { AlphaColorPicker } from \"./common/AlphaColorPicker\";\nimport { ColorModel, ColorPickerBaseProps } from \"../types\";\nimport { equalHex } from \"../utils/compare\";\nimport { hexToHsva, hsvaToHex } from \"../utils/convert\";\n\nconst colorModel: ColorModel<string> = {\n defaultColor: \"0001\",\n toHsva: hexToHsva,\n fromHsva: hsvaToHex,\n equal: equalHex,\n};\n\nexport const HexAlphaColorPicker = (props: Partial<ColorPickerBaseProps<string>>): JSX.Element => (\n <AlphaColorPicker {...props} colorModel={colorModel} />\n);\n","import React from \"react\";\n\nimport { AlphaColorPicker } from \"./common/AlphaColorPicker\";\nimport { ColorModel, ColorPickerBaseProps, HslaColor } from \"../types\";\nimport { equalColorObjects } from \"../utils/compare\";\nimport { hslaToHsva, hsvaToHsla } from \"../utils/convert\";\n\nconst colorModel: ColorModel<HslaColor> = {\n defaultColor: { h: 0, s: 0, l: 0, a: 1 },\n toHsva: hslaToHsva,\n fromHsva: hsvaToHsla,\n equal: equalColorObjects,\n};\n\nexport const HslaColorPicker = (props: Partial<ColorPickerBaseProps<HslaColor>>): JSX.Element => (\n <AlphaColorPicker {...props} colorModel={colorModel} />\n);\n","import React from \"react\";\n\nimport { AlphaColorPicker } from \"./common/AlphaColorPicker\";\nimport { ColorModel, ColorPickerBaseProps } from \"../types\";\nimport { equalColorString } from \"../utils/compare\";\nimport { hslaStringToHsva, hsvaToHslaString } from \"../utils/convert\";\n\nconst colorModel: ColorModel<string> = {\n defaultColor: \"hsla(0, 0%, 0%, 1)\",\n toHsva: hslaStringToHsva,\n fromHsva: hsvaToHslaString,\n equal: equalColorString,\n};\n\nexport const HslaStringColorPicker = (\n props: Partial<ColorPickerBaseProps<string>>\n): JSX.Element => <AlphaColorPicker {...props} colorModel={colorModel} />;\n","import React from \"react\";\n\nimport { ColorPicker } from \"./common/ColorPicker\";\nimport { ColorModel, ColorPickerBaseProps, HslColor } from \"../types\";\nimport { equalColorObjects } from \"../utils/compare\";\nimport { hslaToHsva, hsvaToHsla, hslaToHsl } from \"../utils/convert\";\n\nconst colorModel: ColorModel<HslColor> = {\n defaultColor: { h: 0, s: 0, l: 0 },\n toHsva: ({ h, s, l }) => hslaToHsva({ h, s, l, a: 1 }),\n fromHsva: (hsva) => hslaToHsl(hsvaToHsla(hsva)),\n equal: equalColorObjects,\n};\n\nexport const HslColorPicker = (props: Partial<ColorPickerBaseProps<HslColor>>): JSX.Element => (\n <ColorPicker {...props} colorModel={colorModel} />\n);\n","import React from \"react\";\n\nimport { ColorPicker } from \"./common/ColorPicker\";\nimport { ColorModel, ColorPickerBaseProps } from \"../types\";\nimport { equalColorString } from \"../utils/compare\";\nimport { hslStringToHsva, hsvaToHslString } from \"../utils/convert\";\n\nconst colorModel: ColorModel<string> = {\n defaultColor: \"hsl(0, 0%, 0%)\",\n toHsva: hslStringToHsva,\n fromHsva: hsvaToHslString,\n equal: equalColorString,\n};\n\nexport const HslStringColorPicker = (props: Partial<ColorPickerBaseProps<string>>): JSX.Element => (\n <ColorPicker {...props} colorModel={colorModel} />\n);\n","import React from \"react\";\n\nimport { AlphaColorPicker } from \"./common/AlphaColorPicker\";\nimport { ColorModel, ColorPickerBaseProps, HsvaColor } from \"../types\";\nimport { equalColorObjects } from \"../utils/compare\";\nimport { roundHsva } from \"../utils/convert\";\n\nconst colorModel: ColorModel<HsvaColor> = {\n defaultColor: { h: 0, s: 0, v: 0, a: 1 },\n toHsva: (hsva) => hsva,\n fromHsva: roundHsva,\n equal: equalColorObjects,\n};\n\nexport const HsvaColorPicker = (props: Partial<ColorPickerBaseProps<HsvaColor>>): JSX.Element => (\n <AlphaColorPicker {...props} colorModel={colorModel} />\n);\n","import React from \"react\";\n\nimport { AlphaColorPicker } from \"./common/AlphaColorPicker\";\nimport { ColorModel, ColorPickerBaseProps } from \"../types\";\nimport { equalColorString } from \"../utils/compare\";\nimport { hsvaStringToHsva, hsvaToHsvaString } from \"../utils/convert\";\n\nconst colorModel: ColorModel<string> = {\n defaultColor: \"hsva(0, 0%, 0%, 1)\",\n toHsva: hsvaStringToHsva,\n fromHsva: hsvaToHsvaString,\n equal: equalColorString,\n};\n\nexport const HsvaStringColorPicker = (\n props: Partial<ColorPickerBaseProps<string>>\n): JSX.Element => <AlphaColorPicker {...props} colorModel={colorModel} />;\n","import React from \"react\";\n\nimport { ColorPicker } from \"./common/ColorPicker\";\nimport { ColorModel, ColorPickerBaseProps, HsvColor } from \"../types\";\nimport { equalColorObjects } from \"../utils/compare\";\nimport { hsvaToHsv } from \"../utils/convert\";\n\nconst colorModel: ColorModel<HsvColor> = {\n defaultColor: { h: 0, s: 0, v: 0 },\n toHsva: ({ h, s, v }) => ({ h, s, v, a: 1 }),\n fromHsva: hsvaToHsv,\n equal: equalColorObjects,\n};\n\nexport const HsvColorPicker = (props: Partial<ColorPickerBaseProps<HsvColor>>): JSX.Element => (\n <ColorPicker {...props} colorModel={colorModel} />\n);\n","import React from \"react\";\n\nimport { ColorPicker } from \"./common/ColorPicker\";\nimport { ColorModel, ColorPickerBaseProps } from \"../types\";\nimport { equalColorString } from \"../utils/compare\";\nimport { hsvStringToHsva, hsvaToHsvString } from \"../utils/convert\";\n\nconst colorModel: ColorModel<string> = {\n defaultColor: \"hsv(0, 0%, 0%)\",\n toHsva: hsvStringToHsva,\n fromHsva: hsvaToHsvString,\n equal: equalColorString,\n};\n\nexport const HsvStringColorPicker = (props: Partial<ColorPickerBaseProps<string>>): JSX.Element => (\n <ColorPicker {...props} colorModel={colorModel} />\n);\n","import React from \"react\";\n\nimport { AlphaColorPicker } from \"./common/AlphaColorPicker\";\nimport { ColorModel, ColorPickerBaseProps, RgbaColor } from \"../types\";\nimport { equalColorObjects } from \"../utils/compare\";\nimport { rgbaToHsva, hsvaToRgba } from \"../utils/convert\";\n\nconst colorModel: ColorModel<RgbaColor> = {\n defaultColor: { r: 0, g: 0, b: 0, a: 1 },\n toHsva: rgbaToHsva,\n fromHsva: hsvaToRgba,\n equal: equalColorObjects,\n};\n\nexport const RgbaColorPicker = (props: Partial<ColorPickerBaseProps<RgbaColor>>): JSX.Element => (\n <AlphaColorPicker {...props} colorModel={colorModel} />\n);\n","import React from \"react\";\n\nimport { AlphaColorPicker } from \"./common/AlphaColorPicker\";\nimport { ColorModel, ColorPickerBaseProps } from \"../types\";\nimport { equalColorString } from \"../utils/compare\";\nimport { rgbaStringToHsva, hsvaToRgbaString } from \"../utils/convert\";\n\nconst colorModel: ColorModel<string> = {\n defaultColor: \"rgba(0, 0, 0, 1)\",\n toHsva: rgbaStringToHsva,\n fromHsva: hsvaToRgbaString,\n equal: equalColorString,\n};\n\nexport const RgbaStringColorPicker = (\n props: Partial<ColorPickerBaseProps<string>>\n): JSX.Element => <AlphaColorPicker {...props} colorModel={colorModel} />;\n","import React from \"react\";\n\nimport { ColorPicker } from \"./common/ColorPicker\";\nimport { ColorModel, ColorPickerBaseProps, RgbColor } from \"../types\";\nimport { equalColorObjects } from \"../utils/compare\";\nimport { rgbaToHsva, hsvaToRgba, rgbaToRgb } from \"../utils/convert\";\n\nconst colorModel: ColorModel<RgbColor> = {\n defaultColor: { r: 0, g: 0, b: 0 },\n toHsva: ({ r, g, b }) => rgbaToHsva({ r, g, b, a: 1 }),\n fromHsva: (hsva) => rgbaToRgb(hsvaToRgba(hsva)),\n equal: equalColorObjects,\n};\n\nexport const RgbColorPicker = (props: Partial<ColorPickerBaseProps<RgbColor>>): JSX.Element => (\n <ColorPicker {...props} colorModel={colorModel} />\n);\n","import React from \"react\";\n\nimport { ColorPicker } from \"./common/ColorPicker\";\nimport { ColorModel, ColorPickerBaseProps } from \"../types\";\nimport { equalColorString } from \"../utils/compare\";\nimport { rgbStringToHsva, hsvaToRgbString } from \"../utils/convert\";\n\nconst colorModel: ColorModel<string> = {\n defaultColor: \"rgb(0, 0, 0)\",\n toHsva: rgbStringToHsva,\n fromHsva: hsvaToRgbString,\n equal: equalColorString,\n};\n\nexport const RgbStringColorPicker = (props: Partial<ColorPickerBaseProps<string>>): JSX.Element => (\n <ColorPicker {...props} colorModel={colorModel} />\n);\n","const matcher = /^#?([0-9A-F]{3,8})$/i;\n\nexport const validHex = (value: string, alpha?: boolean): boolean => {\n const match = matcher.exec(value);\n const length = match ? match[1].length : 0;\n\n return (\n length === 3 || // '#rgb' format\n length === 6 || // '#rrggbb' format\n (!!alpha && length === 4) || // '#rgba' format\n (!!alpha && length === 8) // '#rrggbbaa' format\n );\n};\n","import React, { useState, useEffect, useCallback } from \"react\";\n\nimport { useEventCallback } from \"../../hooks/useEventCallback\";\nimport { ColorInputBaseProps } from \"../../types\";\n\ninterface Props extends ColorInputBaseProps {\n /** Blocks typing invalid characters and limits string length */\n escape: (value: string) => string;\n /** Checks that value is valid color string */\n validate: (value: string) => boolean;\n /** Processes value before displaying it in the input */\n format?: (value: string) => string;\n /** Processes value before sending it in `onChange` */\n process?: (value: string) => string;\n}\n\nexport const ColorInput = (props: Props): JSX.Element => {\n const { color = \"\", onChange, onBlur, escape, validate, format, process, ...rest } = props;\n const [value, setValue] = useState(() => escape(color));\n const onChangeCallback = useEventCallback<string>(onChange);\n const onBlurCallback = useEventCallback<React.FocusEvent<HTMLInputElement>>(onBlur);\n\n // Trigger `onChange` handler only if the input value is a valid color\n const handleChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n const inputValue = escape(e.target.value);\n setValue(inputValue);\n if (validate(inputValue)) onChangeCallback(process ? process(inputValue) : inputValue);\n },\n [escape, process, validate, onChangeCallback]\n );\n\n // Take the color from props if the last typed color (in local state) is not valid\n const handleBlur = useCallback(\n (e: React.FocusEvent<HTMLInputElement>) => {\n if (!validate(e.target.value)) setValue(escape(color));\n onBlurCallback(e);\n },\n [color, escape, validate, onBlurCallback]\n );\n\n // Update the local state when `color` property value is changed\n useEffect(() => {\n setValue(escape(color));\n }, [color, escape]);\n\n return (\n <input\n {...rest}\n value={format ? format(value) : value}\n spellCheck=\"false\" // the element should not be checked for spelling errors\n onChange={handleChange}\n onBlur={handleBlur}\n />\n );\n};\n","import React, { useCallback } from \"react\";\nimport { ColorInputBaseProps } from \"../types\";\n\nimport { validHex } from \"../utils/validate\";\nimport { ColorInput } from \"./common/ColorInput\";\n\ninterface HexColorInputProps extends ColorInputBaseProps {\n /** Enables `#` prefix displaying */\n prefixed?: boolean;\n /** Allows `#rgba` and `#rrggbbaa` color formats */\n alpha?: boolean;\n}\n\n/** Adds \"#\" symbol to the beginning of the string */\nconst prefix = (value: string) => \"#\" + value;\n\nexport const HexColorInput = (props: HexColorInputProps): JSX.Element => {\n const { prefixed, alpha, ...rest } = props;\n\n /** Escapes all non-hexadecimal characters including \"#\" */\n const escape = useCallback(\n (value: string) => value.replace(/([^0-9A-F]+)/gi, \"\").substring(0, alpha ? 8 : 6),\n [alpha]\n );\n\n /** Validates hexadecimal strings */\n const validate = useCallback((value: string) => validHex(value, alpha), [alpha]);\n\n return (\n <ColorInput\n {...rest}\n escape={escape}\n format={prefixed ? prefix : undefined}\n process={prefix}\n validate={validate}\n />\n );\n};\n","var superPropBase = require(\"./superPropBase.js\");\n\nfunction _get() {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n module.exports = _get = Reflect.get.bind(), module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n } else {\n module.exports = _get = function _get(target, property, receiver) {\n var base = superPropBase(target, property);\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(arguments.length < 3 ? target : receiver);\n }\n\n return desc.value;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n }\n\n return _get.apply(this, arguments);\n}\n\nmodule.exports = _get, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var getPrototypeOf = require(\"./getPrototypeOf.js\");\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nmodule.exports = _superPropBase, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayWithHoles = require(\"./arrayWithHoles.js\");\n\nvar iterableToArray = require(\"./iterableToArray.js\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\n\nvar nonIterableRest = require(\"./nonIterableRest.js\");\n\nfunction _toArray(arr) {\n return arrayWithHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableRest();\n}\n\nmodule.exports = _toArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;"],"sourceRoot":""}
1
+ {"version":3,"sources":["../node_modules/@iobroker/adapter-react-v5/Components/CustomModal.jsx","../node_modules/@iobroker/adapter-react-v5/Components/Image.js","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ChipInput.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigAlive.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigAutocomplete.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigAutocompleteSendTo.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigCRON.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigCertificateSelect.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigCheckbox.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigChip.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigColor.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigCoordinates.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigCustom.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigDatePicker.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigFile.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigFileSelector.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigFunc.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigIP.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigImageUpload.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigInstanceSelect.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigJsonEditor.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigLanguage.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigNumber.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigObjectId.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigPanel.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigPassword.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigPattern.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigRoom.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigSelect.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigSelectSendTo.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigSendto.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigSetState.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigSlider.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigStaticDivider.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigStaticHeader.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigStaticImage.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigStaticText.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigTable.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigTabs.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigText.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigTextSendTo.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigTimePicker.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigTopic.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/ConfigUser.jsx","../node_modules/@iobroker/adapter-react-v5/Components/JsonConfigComponent/JsonConfigComponent/index.jsx","../node_modules/@iobroker/adapter-react-v5/Components/Logo.js","../node_modules/@iobroker/adapter-react-v5/Components/MDUtils.js","../node_modules/@iobroker/adapter-react-v5/Components/ToggleThemeMenu.js","../node_modules/@iobroker/adapter-react-v5/Components/TreeTable.js","../node_modules/@iobroker/adapter-react-v5/Connection.js","../node_modules/@iobroker/adapter-react-v5/Dialogs/ComplexCron.js","../node_modules/@iobroker/adapter-react-v5/Dialogs/SimpleCron.js","../node_modules/@iobroker/adapter-react-v5/Prompt.js","../node_modules/@iobroker/adapter-react-v5/icons/IconFx.js","../node_modules/@mui/icons-material/Colorize.js","../node_modules/@mui/icons-material/VerticalAlignBottom.js","../node_modules/@mui/icons-material/VerticalAlignTop.js","../node_modules/@mui/material/Skeleton/Skeleton.js","../node_modules/@mui/material/Skeleton/skeletonClasses.js","../node_modules/@mui/material/internal/svg-icons/ArrowDownward.js","../node_modules/@mui/material/TableSortLabel/TableSortLabel.js","../node_modules/@mui/material/TableSortLabel/tableSortLabelClasses.js","../node_modules/@mui/x-date-pickers/CalendarPickerSkeleton/calendarPickerSkeletonClasses.js","../node_modules/@mui/x-date-pickers/CalendarPickerSkeleton/CalendarPickerSkeleton.js","../node_modules/@mui/x-date-pickers/DateTimePicker/shared.js","../node_modules/@mui/x-date-pickers/DateTimePicker/DateTimePickerTabs.js","../node_modules/@mui/x-date-pickers/DateTimePicker/DateTimePickerToolbar.js","../node_modules/@mui/x-date-pickers/internals/hooks/validation/useDateTimeValidation.js","../node_modules/@mui/x-date-pickers/DesktopDateTimePicker/DesktopDateTimePicker.js","../node_modules/@mui/x-date-pickers/MobileDateTimePicker/MobileDateTimePicker.js","../node_modules/@mui/x-date-pickers/DateTimePicker/DateTimePicker.js","../node_modules/@mui/x-date-pickers/internals/components/PickerStaticWrapper/pickerStaticWrapperClasses.js","../node_modules/@mui/x-date-pickers/internals/components/PickerStaticWrapper/PickerStaticWrapper.js","../node_modules/@mui/x-date-pickers/StaticDatePicker/StaticDatePicker.js","../node_modules/@mui/x-date-pickers/StaticDateTimePicker/StaticDateTimePicker.js","../node_modules/@mui/x-date-pickers/StaticTimePicker/StaticTimePicker.js","../node_modules/@mui/x-date-pickers/locales/nlNL.js","../node_modules/@mui/x-date-pickers/locales/ptBR.js","../node_modules/@mui/x-date-pickers/locales/trTR.js","../node_modules/@mui/x-date-pickers/locales/deDE.js","../node_modules/@mui/x-date-pickers/locales/esES.js","../node_modules/@mui/x-date-pickers/locales/frFR.js","../node_modules/@mui/x-date-pickers/locales/nbNO.js","../node_modules/@mui/x-date-pickers/locales/svSE.js","../node_modules/@mui/x-date-pickers/locales/itIT.js","../node_modules/@mui/x-date-pickers/locales/zhCN.js","../node_modules/@mui/x-date-pickers/index.js","../node_modules/react-colorful/src/hooks/useEventCallback.ts","../node_modules/react-colorful/src/utils/clamp.ts","../node_modules/react-colorful/src/components/common/Interactive.tsx","../node_modules/react-colorful/src/utils/format.ts","../node_modules/react-colorful/src/components/common/Pointer.tsx","../node_modules/react-colorful/src/utils/round.ts","../node_modules/react-colorful/src/utils/convert.ts","../node_modules/react-colorful/src/components/common/Hue.tsx","../node_modules/react-colorful/src/components/common/Saturation.tsx","../node_modules/react-colorful/src/utils/compare.ts","../node_modules/react-colorful/src/hooks/useColorManipulation.ts","../node_modules/react-colorful/src/utils/nonce.ts","../node_modules/react-colorful/src/hooks/useIsomorphicLayoutEffect.ts","../node_modules/react-colorful/src/hooks/useStyleSheet.ts","../node_modules/react-colorful/src/components/common/ColorPicker.tsx","../node_modules/react-colorful/src/components/HexColorPicker.tsx","../node_modules/react-colorful/src/components/common/Alpha.tsx","../node_modules/react-colorful/src/components/common/AlphaColorPicker.tsx","../node_modules/react-colorful/src/components/HexAlphaColorPicker.tsx","../node_modules/react-colorful/src/components/HslaColorPicker.tsx","../node_modules/react-colorful/src/components/HslaStringColorPicker.tsx","../node_modules/react-colorful/src/components/HslColorPicker.tsx","../node_modules/react-colorful/src/components/HslStringColorPicker.tsx","../node_modules/react-colorful/src/components/HsvaColorPicker.tsx","../node_modules/react-colorful/src/components/HsvaStringColorPicker.tsx","../node_modules/react-colorful/src/components/HsvColorPicker.tsx","../node_modules/react-colorful/src/components/HsvStringColorPicker.tsx","../node_modules/react-colorful/src/components/RgbaColorPicker.tsx","../node_modules/react-colorful/src/components/RgbaStringColorPicker.tsx","../node_modules/react-colorful/src/components/RgbColorPicker.tsx","../node_modules/react-colorful/src/components/RgbStringColorPicker.tsx","../node_modules/react-colorful/src/utils/validate.ts","../node_modules/react-colorful/src/components/common/ColorInput.tsx","../node_modules/react-colorful/src/components/HexColorInput.tsx","../node_modules/@babel/runtime/helpers/get.js","../node_modules/@babel/runtime/helpers/superPropBase.js","../node_modules/@babel/runtime/helpers/toArray.js"],"names":["styles","theme","modalDialog","minWidth","maxWidth","overflowHidden","display","overflow","titleIcon","marginRight","content","fontSize","languageButton","position","right","spacing","top","languageButtonActive","color","palette","primary","main","CustomModal","toggleTranslation","noTranslation","title","fullWidth","help","progress","icon","applyDisabled","applyButton","classes","open","onClose","children","titleButtonApply","titleButtonClose","onApply","textInput","defaultValue","useState","value","setValue","useEffect","Icon","paper","I18n","getLanguage","Utils","clsx","t","paddingTop","e","target","defaultProps","propTypes","PropTypes","object","bool","func","any","string","withStyles","getElementFromSource","src","svgContainer","document","createElement","innerHTML","svg","firstElementChild","remove","removeChild","serializeAttrs","map","ret","prop","i","length","key","name","startsWith","replace","g","toUpperCase","Image","props","state","created","imgError","showError","getSvgFromData","len","substring","atob","inner","svgProps","attributes","className","__html","setTimeout","setState","imagePrefix","newState","changed","React","Component","isRequired","variantComponent","standard","Input","filled","FilledInput","outlined","OutlinedInput","light","type","bottomLineColor","root","inputRoot","flexWrap","flex","marginTop","boxSizing","input","textOverflow","whiteSpace","appearance","WebkitTapHighlightColor","chipContainer","flexFlow","cursor","marginBottom","minHeight","height","paddingBottom","labeled","label","labelShrink","helperText","focused","disabled","underline","borderBottom","left","bottom","transform","transition","transitions","create","duration","shorter","easing","easeOut","pointerEvents","borderBottomColor","error","text","borderBottomStyle","backgroundColor","chip","margin","marginDense","keyCodes","BACKSPACE","DELETE","LEFT_ARROW","RIGHT_ARROW","ChipInput","chips","errorText","undefined","focusedChip","inputValue","isClean","isFocused","chipsUpdated","prevPropsValue","actualInput","focus","event","onBlur","addChipOptions","blurBehavior","clearInputOnFail","delayBeforeAdd","numChipsBefore","inputBlurTimeout","numChipsAfter","handleAddChip","clearInput","onFocus","_keyPressed","_preventChipCreation","onKeyDown","isDefaultPrevented","newChipKeyCodes","includes","keyCode","newChipKeys","result","preventDefault","handleDeleteChip","indexOf","updateInput","onKeyUp","onKeyPress","onUpdateInput","ref","inputRef","labelRef","createRef","variant","labelNode","ReactDOM","findDOMNode","current","forceUpdate","clearTimeout","blur","options","onBeforeAdd","dataSourceConfig","allowDuplicates","some","c","onAdd","updateChips","trim","onDelete","slice","splice","additionalUpdates","onChange","alwaysShowPlaceholder","chipRenderer","defaultChipRenderer","clearInputValueOnChange","dataSource","disableUnderline","filter","FormHelperTextProps","fullWidthInput","id","InputProps","InputLabelProps","placeholder","readOnly","required","rootRef","other","actualInputValue","hasInput","shrinkFloatingLabel","shrink","chipComponents","isDisabled","isReadOnly","handleClick","handleDelete","InputMore","notched","labelWidth","offsetWidth","startAdornment","InputComponent","handleUpdateInput","handleKeyDown","handleKeyPress","handleKeyUp","handleInputFocus","handleInputBlur","setActualInputRef","oneOf","array","shape","node","arrayOf","number","blue","width","notAlive","ConfigAlive","instance","getInstance","socket","getState","then","alive","val","schema","adapterName","getPattern","textAlive","textNotAlive","ConfigGeneric","data","ConfigAutocomplete","getValue","attr","selectOptions","item","JSON","parse","stringify","Array","isArray","unshift","DIFFERENT_LABEL","DIFFERENT_VALUE","isIndeterminate","find","it","forEach","push","toString","indeterminate","freeSolo","_","option","params","getText","renderHelp","helpLink","themeType","themeName","style","onError","ConfigAutocompleteSendTo","askInstance","jsonData","console","sendTo","command","list","context","getContext","alsoDependsOn","maxLength","max","button","marginLeft","ConfigCRON","showDialog","simple","complex","dateFormat","isFloatComma","ConfigCertificateSelect","getCertificates","el","toLowerCase","NONE_LABEL","NONE_VALUE","opacity","ConfigCheckbox","stopPropagation","checked","validatorErrorText","ConfigLanguage","delimiter","parts","split","a","newValue","prevValue","join","index","ConfigColor","showColorDialog","colorDialogValue","ColorPicker","getColor","textColor","isUseBright","renderColorDialog","endAdornment","onPaste","ConfigCoordinates","autoInit","getCoordinates","getSystemConfig","obj","common","longitude","latitude","window","alert","divider","navigator","geolocation","getCurrentPosition","coords","getSystemCoordinates","getOrLoadRemote","remote","shareScope","remoteFallbackUrl","Promise","resolve","reject","existingRemote","querySelector","onload","__initialized","init","__webpack_share_scopes__","onerror","d","script","setAttribute","async","getElementsByTagName","appendChild","loadComponent","sharedScope","module","url","container","get","factory","Module","ConfigCustom","location","protocol","host","i18n","pos","lastIndexOf","i18nURL","lang","file","fetch","json","extendTranslations","log","uniqueName","fileToLoad","componentName","component","keys","Object","xs","lg","md","sm","assign","textAlign","darkStyle","newLine","flexBasis","ConfigDatePicker","systemConfig","Date","fullWidthOneButton","fullWidthIcon","selectedImage","IMAGE_EXT","AUDIO_EXT","VIDEO_EXT","DOC_EXT","JS_EXT","ConfigFile","adapter","path","readFile","loadFile","AudioContext","buf","ConfigFileSelector","base64ToArrayBuffer","decodeAudioData","buffer","source","createBufferSource","connect","destination","start","err","extension","pop","backgroundImage","backgroundSize","backgroundRepeat","play","showFileBrowser","selectOnlyFolders","allowUpload","allowDownload","allowCreateFolder","allowView","showToolbar","limitPath","getIcon","disableEdit","renderFileBrowser","fullWidthTwoButtons","fullWidthThreeButtons","dropZone","dropZoneEmpty","image","objectFit","uploadDiv","uploadDivDragging","background","uploadCenterDiv","border","borderRadius","uploadCenterIcon","uploadCenterText","uploadCenterTextAndIcon","flexDirection","alignItems","justifyContent","disabledOpacity","deleteButton","dropzoneRef","objectID","upload","endsWith","updateFiles","readFiles","pattern","files","folderName","readDir","dirFiles","f","isDir","readFolder","ok","regExp","RegExp","test","size","stats","formatBytes","folder","acceptedFiles","reader","FileReader","maxSize","onabort","ext","Math","round","base64","btoa","Uint8Array","reduce","byte","String","fromCharCode","writeFile64","readAsArrayBuffer","deleteFile","isOk","folders","withFolder","noSize","noNone","buttons","refresh","element","accept","last","uploadFile","errors","message","onDrop","getRootProps","getInputProps","uploadError","renderDeleteDialog","binaryString","bytes","charCodeAt","ConfigFunc","getEnums","enums","ConfigIP","getHostByIp","ips","listenOnAllPorts","address","onlyIp4","family","onlyIp6","ConfigImageUpload","imageRef","now","fileExists","exist","_getUrl","update","port","hostname","crop","ConfigInstanceSelect","match","_id","findIndex","getHistory","sort","b","getAdapterInstances","instances","all","subscribeObject","onInstancesUpdate","unsubscribeObject","wrapper","ConfigJsonEditor","initialized","showSelectId","LANGUAGES","languages","system","changeGuiLanguage","setLanguage","changeLanguage","language","control","textWithArrows","arrows","arrowUp","userSelect","arrowDown","ConfigNumber","_value","arr","parseFloat","min","isNumber","step","isFinite","isNaN","ConfigObjectId","components","autocomplete","autocompleteSendTo","certificate","checkbox","ConfigChip","coordinates","cron","custom","datePicker","ConfigStaticDivider","fileSelector","header","ConfigStaticHeader","ip","jsonEditor","objectId","password","ConfigPassword","ConfigPattern","room","ConfigRoom","select","ConfigSelect","selectSendTo","ConfigSelectSendTo","ConfigSendto","ConfigSetState","slider","ConfigSlider","staticImage","ConfigStaticImage","staticLink","ConfigStaticText","staticText","table","ConfigTable","ConfigText","textSendTo","ConfigTextSendTo","timePicker","ConfigTimePicker","topic","ConfigTopic","user","ConfigUser","overflowY","padding","heading","mode","secondary","ConfigPanel","collapsable","expanded","_localStorage","localStorage","getItem","items","multiEdit","noMultiEdit","ItemComponent","customs","ConfigPanelStyled","arrayIndex","globalData","onCommandRunning","commandRunning","panel","originalData","registerOnForceUpdate","customObj","instanceObj","calculate","hidden","hideOnlyControl","themaType","renderItems","setItem","isParentTab","tooltip","halfWidth1","halfWidth2","PASSWORD_PLACEHOLDER","_repeat","_visible","_notEqual","repeatPassword","repeat","onChangePassword","autoComplete","form","visible","passwordRepeat","copyToClipboard","copy","initialValue","executeCustom","execute","menuPaper","maxHeight","multiple","_getValue","gap","v","_item","showAllValues","manual","ip2int","ipInt","octet","parseInt","findNetworkAddressOfHost","localIp","networkInterfaces","hardware","hostIp","inter","internal","netmask","openUrl","getCurrentInstance","adminInstance","getObject","hostObj","warn","_error","_message","_origin","pathname","response","args","arg","saveConfig","confirmDialog","confirm","confirmData","cancel","_onClick","renderErrorDialog","renderMessageDialog","ack","okText","unit","marks","borderStyle","contrastText","marginBlockEnd","marginBlockStart","href","headerText","visuallyHidden","clip","addIcon","highlight","dark","rootTool","paddingLeft","paddingRight","silver","filteredOut","buttonEmpty","buttonCell","objectToArray","nameOfFirstAttr","nameOfSecondAttr","arrayToObject","row","property","orderCheck","order","orderBy","isAsc","newOrder","stableSort","iteration","applyFilter","comparator","getComparator","stabilizedThis","visibleValue","onChangeWrapper","updateVisible","typingTimer","objKeyName","objValue","objValueName","handleRequestSort","newItem","accumulator","currentValue","defaultFunc","clear","filterRefs","valueInputRef","idx","filterOn","attrItem","schemaForAttribute","schemaItem","valueChange","newObj","buttonsWidth","headCell","noDelete","doAnyFilterSet","isAnyFilterSet","allowAddByFilter","enhancedTableHead","itemTable","onMoveUp","onMoveDown","descendingComparator","tabs","ConfigTabs","tab","dialogName","tempValue","ts","updateTimeout","convertID2Topic","prefix","namespace","getUsers","users","_users","getObjectNameFromObj","getInvertedColor","JsonConfigComponent","cb","onValueChange","_data","forceUpdateHandlers","updateData","buildDependencies","readData","readSettings","getCompactSystemConfig","subscribeState","onAlive","_list","flatten","attrs","dep","confirmDependsOn","depObj","onChangeDependsOn","hiddenDependsOn","labelDependsOn","helpDependsOn","forceAttrUpdate","renderItem","exists","fileName","logo","Logo","evt","r","contents","onLoad","readAsText","news","titleLang","desc","generateFile","addEventListener","handleFileSelect","click","readme","win","download","filename","encodeURIComponent","body","_export","MDUtils","m","extractHeader","lines","_header","line","doc","ToggleThemeMenu","toggleTheme","getAttr","lookup","shift","setAttr","tableContainer","cell","rowMainWithChildren","rowMainWithoutChildren","rowNoEdit","cellExpand","cellButton","cellHeader","fontWeight","wordBreak","width_name_nicknames","width_ioType","width_type","width_displayTraits","width_roomHint","rowSecondary","fontStyle","cellSecondary","fieldEditWithButton","fieldEdit","lineHeight","verticalAlign","fieldButton","colorDialog","subText","glow","animation","_a","_b","TreeTable","opened","editMode","deleteMode","editData","columns","field","useTable","showSelectColor","glowOnChange","col","renderCellEditSelect","editComponent","renderCellEditCustom","renderCellEditBoolean","renderCellEditColor","renderCellEditObjectID","renderCellEditString","EditComponent","newVal","selectCallback","selectIdValue","_val","newColor","selected","level","editable","cellStyle","renderCellEdit","renderCellNonEdit","sub","subField","subLookup","mainText","subStyle","levelShift","parentId","renderCellWithSubField","ii","renderCell","onUpdate","newData","renderLine","headerStyle","noSort","noAdd","renderHead","renderSelectIdDialog","renderSelectColorDialog","count","oldLine","loading","PROGRESS","CONNECTING","CONNECTED","OBJECTS_LOADED","READY","PERMISSION_ERROR","NOT_CONNECTED","TIMEOUT_FOR_ADMIN4","ERRORS","fixAdminUI","adminUI","noConfig","config","jsonConfig","materialize","jsonCustom","supportCustoms","materializeTab","adminTab","debug","Connection","autoSubscribes","autoSubscribeLog","isWeb","ioTimeout","cmdTimeout","doNotLoadAllObjects","doNotLoadACL","states","objects","acl","firstConnect","waitForRestart","systemLang","connected","_waitForFirstConnection","_waitForFirstConnectionResolve","statesSubscribes","objectsSubscribes","onProgress","loaded","loadTimer","loadCounter","admin5only","onConnectionHandlers","onLogHandlers","_promises","info","silly","startSocket","io","registerSocketOnLoad","scriptLoadCounter","_socket","socketUrl","query","timeout","on","noTimeout","getVersion","version","major","minor","patch","_authTimer","onPreConnect","emit","isSecure","reload","_subscribe","subscribed","authenticate","onLog","_err","operation","objectChange","stateChange","onCmdStdoutHandler","onCmdStderrHandler","exitCode","onCmdExitHandler","onConnect","_getUserPermissions","vendorPrefix","userLanguage","onLanguage","onReady","getObjects","search","hash","binary","cbs","reg","getBinaryState","oldObj","_rev","onObjectChange","task","hasOwnProperty","disableProgressUpdate","res","STATES_LOADED","isEnable","isEnabled","maintenance","from","getObjectView","adapters","objs","oldId","newId","setObject","delObject","_renameGroups","newName","getGroups","groups","groupsToRename","group","handler","_enum","startkey","endkey","_res","rows","end","cert","certs","certificates","_cert","linesNumber","oldName","hosts","timeoutMs","repo","installed","cmd","cmdId","feature","features","checkFeatureSupported","typeOfDiag","values","stepIgnore","sessionId","ipOrHostName","IPs4","IPs6","eth","num","encryptedText","serverName","webName","entries","category","notifications","isStrict","controller","AbortController","abort","signal","ratings","currentInstance","compactAdapters","compactInstances","installedCompact","systemConfigCommon","repoCompact","hostsCompact","uuid","headerID","radio","dialogPaper","DialogComplexCron","onOk","clearButton","handleClear","handleOk","handleCancel","DialogSimpleCron","printPrompt","prompt","IconFx","onClick","oneOfType","_interopRequireDefault","exports","_createSvgIcon","_jsxRuntime","_default","_excluded","_t","_t2","_t3","_t4","useUtilityClasses","ownerState","hasChildren","slots","pulseKeyframe","waveKeyframe","SkeletonRoot","radiusUnit","radiusValue","Skeleton","inProps","getSkeletonUtilityClass","slot","skeletonClasses","createSvgIcon","direction","active","capitalize","composeClasses","TableSortLabelRoot","styled","ButtonBase","tableSortLabelClasses","TableSortLabelIcon","useThemeProps","hideSortIcon","IconComponent","ArrowDownward","getTableSortLabelUtilityClass","getCalendarPickerSkeletonUtilityClass","calendarPickerSkeletonClasses","CalendarPickerSkeletonRoot","CalendarPickerSkeletonWeek","CalendarPickerSkeletonDay","monthMap","CalendarPickerSkeleton","_useThemeProps","week","day","index2","useDateTimePickerDefaultizedProps","_themeProps$ampm","_ref","_themeProps$minDateTi","_ref2","_themeProps$maxDateTi","_themeProps$minDateTi2","_themeProps$maxDateTi2","themeProps","utils","useUtils","defaultDates","ampm","dateTimePickerValueManager","viewToTab","openView","tabToView","DateTimePickerTabsRoot","Tabs","tabsClasses","DateTimePickerTabs","dateRangeIcon","timeIcon","view","localeText","wrapperVariant","WrapperVariantContext","handleChange","Tab","dateTimePickerToolbarClasses","DateTimePickerToolbarRoot","PickersToolbar","DateTimePickerToolbarDateContainer","DateTimePickerToolbarTimeContainer","DateTimePickerToolbarSeparator","PickersToolbarText","DateTimePickerToolbar","parsedValue","hideTabs","isMobileKeyboardViewOpen","setOpenView","toggleMobileKeyboardView","toolbarFormat","toolbarPlaceholder","toolbarTitle","views","showTabs","formatHours","time","dateText","PickersToolbarButton","validateDateTime","minDate","maxDate","disableFuture","shouldDisableDate","disablePast","timeValidationProps","dateValidationResult","isSameDateTimeError","useDateTimeValidation","useValidation","DesktopDateTimePicker","validationError","pickerProps","inputProps","wrapperProps","usePickerState","PaperProps","PopperProps","ToolbarComponent","TransitionComponent","componentsProps","AllDateInputProps","DesktopWrapper","KeyboardDateInput","CalendarOrClockPicker","MobileDateTimePicker","DateInputProps","MobileWrapper","PureDateInput","DateTimePicker","desktopModeMediaQuery","DialogProps","useMediaQuery","getStaticWrapperUtilityClass","pickerStaticWrapperClasses","PickerStaticWrapperRoot","PickerStaticWrapperContent","PickerStaticWrapper","_components$ActionBar","displayStaticWrapperAs","onAccept","onClear","onCancel","onSetToday","ActionBar","PickersActionBar","StaticDatePicker","DatePickerToolbar","useDateValidation","StaticDateTimePicker","StaticTimePicker","TimePickerToolbar","useTimeValidation","nlNLPickers","hours","minutes","seconds","rawValue","nlNL","getPickersLocalization","ptBRPickers","ptBR","trTRPickers","trTR","deDEPickers","_views$view","deDE","esESPickers","esES","frFRPickers","frFR","nbNOPickers","nbNO","svSEPickers","svSE","itITPickers","itIT","zhCNPickers","zhCN","useEventCallback","callbackRef","useRef","fn","clamp","isTouch","getParentWindow","ownerDocument","defaultView","self","getRelativePosition","touchId","rect","getBoundingClientRect","pointer","touches","identifier","pageX","pageXOffset","pageY","pageYOffset","preventDefaultMove","Interactive","memo","onMove","onKey","rest","onMoveCallback","onKeyCallback","hasTouch","useMemo","handleMove","toggleDocumentEvents","handleMoveEnd","touch","parentWindow","toggleEvent","removeEventListener","nativeEvent","changedTouches","which","handleMoveStart","onTouchStart","onMouseDown","tabIndex","role","formatClassName","names","Boolean","Pointer","nodeClassName","digits","base","pow","angleUnits","grad","turn","rad","PI","hexToHsva","hex","rgbaToHsva","hexToRgba","parseHue","Number","hslaStringToHsva","hslString","exec","hslaToHsva","h","s","l","hslStringToHsva","hsvaToHex","hsva","rgbaToHex","hsvaToRgba","hsvaToHsla","hh","hsvaToHslString","hsvaToHslaString","floor","hsvaStringToHsva","hsvString","roundHsva","hsvStringToHsva","rgbaStringToHsva","rgbaString","rgbStringToHsva","format","alphaHex","delta","Hue","hue","interaction","offset","aria-label","aria-valuenow","aria-valuemax","aria-valuemin","Saturation","containerStyle","aria-valuetext","equalColorObjects","first","second","equalColorString","equalHex","useColorManipulation","colorModel","onChangeCallback","toHsva","updateHsva","cache","equal","newHsva","fromHsva","useCallback","nonce","useIsomorphicLayoutEffect","useLayoutEffect","getNonce","__webpack_nonce__","styleElementMap","Map","useStyleSheet","nodeRef","parentDocument","has","styleElement","set","head","defaultColor","Alpha","gradientStyle","ariaValue","AlphaColorPicker","matcher","ColorInput","escape","validate","process","onBlurCallback","handleBlur","spellCheck","prefixed","alpha","superPropBase","_get","receiver","getPrototypeOf","_superPropBase","arrayWithHoles","iterableToArray","unsupportedIterableToArray","nonIterableRest","_toArray"],"mappings":"sNAAA,aACA,cACA,cAEA,cACA,WACA,WAEA,cACA,cACA,cAEA,cACA,c,0jBAEA,IAAMA,EAAS,SAAAC,EAAK,OAAK,CACrBC,YAAa,CACTC,SAAU,IACVC,SAAU,GAFD,EAIbC,eAAgB,CACZC,QAAS,OACTC,SAAU,QAFE,EAIhBC,UAAW,CACPC,YAAa,CADN,EAGXC,QAAS,CACLC,SAAU,EADL,EAGTC,eAAgB,CACZC,SAAU,WACVC,MAAOb,EAAMc,QAAQ,CAAd,EACPC,IAAKf,EAAMc,QAAQ,CAAd,CAHO,EAKhBE,qBAAsB,CAClBC,MAAOjB,EAAMkB,QAAQC,QAAQC,IADX,CApBD,CAAL,EAyBdC,EAAc,SAAC,EAA+O,KAA7OC,EAA6O,EAA7OA,kBAAmBC,EAA0N,EAA1NA,cAAeC,EAA2M,EAA3MA,MAAOC,EAAoM,EAApMA,UAAWC,EAAyL,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Q,KAAqB,EAElD,SAASC,EAAe17C,EAAQ4uB,EAAU,CACxC,KAAO,CAAC,OAAO,UAAU,eAAe,KAAK5uB,EAAQ4uB,CAAQ,IAC3D5uB,EAASy7C,EAAez7C,CAAM,EAC1BA,IAAW,OAAf,CAGF,OAAOA,CACT,CAEAuW,GAAO,QAAUmlC,EAAgBnlC,GAAO,QAAQ,WAAa,GAAMA,GAAO,QAAQ,QAAaA,GAAO,O,yBCXtG,IAAIolC,EAAiB,EAAQ,KAAqB,EAE9CC,EAAkB,EAAQ,KAAsB,EAEhDC,EAA6B,EAAQ,KAAiC,EAEtEC,EAAkB,EAAQ,KAAsB,EAEpD,SAASC,EAASl4B,EAAK,CACrB,OAAO83B,EAAe93B,CAAG,GAAK+3B,EAAgB/3B,CAAG,GAAKg4B,EAA2Bh4B,CAAG,GAAKi4B,EAAgB,CAC3G,CAEAvlC,GAAO,QAAUwlC,EAAUxlC,GAAO,QAAQ,WAAa,GAAMA,GAAO,QAAQ,QAAaA,GAAO,O","file":"static/js/7228.59a1073c.chunk.js","sourcesContent":["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 './Utils';\nimport I18n from '../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 React from 'react';\nimport PropTypes from 'prop-types';\n\nimport IconNoIcon from '../icons/IconNoIcon';\n\nfunction getElementFromSource(src) {\n const svgContainer = document.createElement('div');\n svgContainer.innerHTML = src;\n const svg = svgContainer.firstElementChild;\n if (svg.remove) {\n svg.remove();\n } else {\n svgContainer.removeChild(svg);\n }\n\n svgContainer.remove();\n return svg;\n}\n\nfunction serializeAttrs(map) {\n const ret = {};\n for (let prop, i = 0; i < map.length; i++) {\n const key = map[i].name;\n if (key === 'class') {\n prop = 'className';\n }\n else if (!key.startsWith('data-')) {\n prop = key.replace(/[-|:]([a-z])/g, g => g[1].toUpperCase());\n } else {\n prop = key;\n }\n\n ret[prop] = map[i].value;\n }\n return ret;\n}\n\n/**\n * @typedef {object} ImageProps\n * @property {string} [color] The color.\n * @property {string} [src] The source of the image.\n * @property {string} [imagePrefix] The image prefix (default: './files/')\n * @property {string} [className] The CSS class name.\n * @property {boolean} [showError] Show image errors (or just show no image)?\n *\n * @extends {React.Component<ImageProps>}\n */\nclass Image extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n svg: !!(this.props.src && this.props.src.startsWith('data:')),\n created: true,\n color: this.props.color || '',\n src: this.props.src || '',\n imgError: false,\n showError: this.props.showError,\n };\n\n this.svg = this.state.svg ? this.getSvgFromData(this.state.src) : null;\n }\n\n static getDerivedStateFromProps(props, state) {\n const newState = {};\n let changed = false;\n\n if (props && state && props.src !== state.src) {\n newState.src = props.src;\n newState.svg = props.src && props.src.startsWith('data:');\n newState.created = false;\n changed = true;\n }\n\n if (props && state && props.color !== state.color) {\n newState.color = props.color;\n newState.created = false;\n changed = true;\n }\n\n if (props && state && props.showError !== state.showError) {\n newState.showError = props.showError;\n changed = true;\n }\n\n return changed ? newState : null;\n }\n\n getSvgFromData(src) {\n const len = 'data:image/svg+xml;base64,';\n if (!src.startsWith(len)) {\n return null;\n }\n src = src.substring(len.length);\n try {\n src = atob(src);\n const svg = getElementFromSource(src);\n const inner = svg.innerHTML;\n const svgProps = serializeAttrs(svg.attributes || []);\n\n svg.remove();\n\n return <svg\n className={this.props.className}\n style={this.state.color ? {color: this.state.color} : {}}\n {...svgProps}\n dangerouslySetInnerHTML={{ __html: inner }}\n />;\n } catch (e) {\n\n }\n return null;\n }\n\n render() {\n if (this.state.svg) {\n if (!this.state.created) {\n setTimeout(() => {\n this.svg = this.getSvgFromData(this.state.src);\n this.setState({created: true});\n }, 50);\n }\n\n return this.svg;\n } else if (this.state.src) {\n if (this.state.imgError || !this.state.src) {\n return <IconNoIcon className={this.props.className} />;\n } else {\n return <img\n className={this.props.className}\n src={(this.props.imagePrefix || '') + this.state.src}\n alt=\"\"\n onError={() => this.props.showError ? this.setState({imgError: true}) : this.setState({src: ''})}\n />;\n }\n } else {\n return null;\n }\n }\n}\n\nImage.propTypes = {\n color: PropTypes.string,\n src: PropTypes.string.isRequired,\n className: PropTypes.string,\n imagePrefix: PropTypes.string,\n};\n\nexport default Image;","/**\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 ConfigGeneric from './ConfigGeneric';\n\nimport I18n from '../../i18n';\nimport Utils from '../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 '../../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 '../../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 '../..//Dialogs/Cron';\nimport I18n from '../../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 '../../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 '../../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);","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 '../Utils';\nimport ColorPicker from '../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 '../../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 '../../i18n';\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';\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 '../../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';\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 '../../Components/Utils';\nimport I18n from '../../i18n';\nimport ConfirmDialog from '../../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 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 '../TextWithIcon';\nimport I18n from '../../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 '../../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 '../UploadImage';\nimport I18n from '../../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 '../../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 '../../i18n';\nimport CustomModal from '../CustomModal';\n\n// import AceEditor from 'react-ace';\n// import 'ace-builds/webpack-resolver';\n// import 'ace-builds/src-noconflict/mode-json';\n// import 'ace-builds/src-noconflict/theme-clouds_midnight';\n// import 'ace-builds/src-noconflict/theme-chrome';\n// import '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>NOT SUPPORTED</div>\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 '../../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 '../../i18n';\nimport Utils from '../Utils';\n\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 '../../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';\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 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 '../../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 '../copy-to-clipboard';\nimport CopyIcon from '../../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 '../TextWithIcon';\nimport I18n from '../../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 '../../i18n';\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 '../../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 '../../i18n';\nimport Icon from '../Icon';\nimport DialogError from '../../Dialogs/Error';\nimport DialogMessage from '../../Dialogs/Message';\nimport ConfirmDialog from '../../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\nfunction ip2int(ip) {\n return ip.split('.').reduce((ipInt, octet) => (ipInt << 8) + parseInt(octet, 10), 0) >>> 0;\n}\n\n// copied from iobroker.admin/src-rx/src/Utils.js\nfunction 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 (ip2int(localIp) & ip2int(ip.netmask)) === (ip2int(ip.address) & ip2int(ip.netmask))) {\n hostIp = ip.address;\n } else {\n hostIp = ip.address;\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\nclass ConfigSendto extends ConfigGeneric {\n async componentDidMount() {\n super.componentDidMount();\n\n let hostname = window.location.hostname;\n if (this.props.schema.openUrl) {\n // read admin host\n const adminInstance = await this.props.socket.getCurrentInstance();\n const instanceObj = await this.props.socket.getObject(`system.adapter.${adminInstance}`);\n const hostObj = await this.props.socket.getObject(`system.host.${instanceObj.common.host}`);\n\n const ip = findNetworkAddressOfHost(hostObj, window.location.hostname);\n if (ip) {\n hostname = ip + ':' + window.location.port;\n } else {\n console.warn(`Cannot find suitable IP in host ${instanceObj.common.host} for ${instanceObj._id}`);\n return null;\n }\n }\n this.setState( { _error: '', _message: '', hostname });\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 const _origin = `${window.location.protocol}//${this.state.hostname}${window.location.pathname.replace(/\\/index\\.html$/, '')}`\n\n let data = this.props.schema.data;\n if (data === undefined && this.props.schema.jsonData) {\n data = this.getPattern(this.props.schema.jsonData, {}, {\n _origin,\n ...this.props.data\n });\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 if (this.props.schema.openUrl && !data) {\n data = { _origin: `${window.location.protocol}//${this.state.hostname}${window.location.pathname.replace(/\\/index\\.html$/, '')}` };\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?.openUrl && this.props.schema.openUrl) {\n window.open(response.openUrl, response.window || this.props.schema.window || '_blank');\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 if (response?.saveConfig) {\n this.props.onChange(null, null, null, true);\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 '../../i18n';\nimport Icon from '../Icon';\nimport ConfirmDialog from '../../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 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 '../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 '../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 '../../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 Tabs from '@mui/material/Tabs';\nimport Tab from '@mui/material/Tab';\n\nimport ConfigGeneric from './ConfigGeneric';\nimport ConfigPanel from './ConfigPanel';\n\nconst styles = theme => ({\n tabs: {\n height: '100%',\n width: '100%',\n },\n panel: {\n height: 'calc(100% - 48px)',\n width: '100%',\n display: 'block'\n }\n});\n\nclass ConfigTabs extends ConfigGeneric {\n constructor(props) {\n super(props);\n\n let tab = (window._localStorage || window.localStorage).getItem((this.props.dialogName || 'App') + '.' + this.props.adapterName) || Object.keys(this.props.schema.items)[0];\n if (!Object.keys(this.props.schema.items).includes(tab)) {\n tab = Object.keys(this.props.schema.items)[0];\n }\n this.state = {\n tab,\n };\n }\n\n render() {\n const items = this.props.schema.items;\n\n return <div className={this.props.classes.tabs}>\n <Tabs\n value={this.state.tab}\n onChange={(e, tab) => {\n (window._localStorage || window.localStorage).setItem((this.props.dialogName || 'App') + '.' + this.props.adapterName, tab);\n this.setState({tab});\n }}>\n {Object.keys(items).map(name => {\n let disabled;\n if (this.props.custom) {\n const hidden = this.executeCustom(items[name].hidden, this.props.data, this.props.customObj, this.props.instanceObj);\n if (hidden) {\n return null;\n }\n disabled = this.executeCustom(items[name].disabled, this.props.data, this.props.customObj, this.props.instanceObj);\n } else {\n const hidden = this.execute(items[name].hidden, false);\n if (hidden) {\n return null;\n }\n disabled = this.execute(items[name].disabled, false);\n }\n return <Tab wrapped disabled={disabled} key={name} value={name} label={this.getText(items[name].label)} />\n })}\n </Tabs>\n {<ConfigPanel\n isParentTab={true}\n key={this.state.tab}\n index={1001}\n arrayIndex={this.props.arrayIndex}\n globalData={this.props.globalData}\n onCommandRunning={this.props.onCommandRunning}\n commandRunning={this.props.commandRunning}\n className={this.props.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[this.state.tab]}\n />}\n </div>;\n }\n}\n\nConfigTabs.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 onError: PropTypes.func,\n onChange: PropTypes.func,\n customs: 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 imagePrefix: PropTypes.string,\n\n customObj: PropTypes.object,\n instanceObj: PropTypes.object,\n custom: PropTypes.bool,\n\n registerOnForceUpdate: PropTypes.func.isRequired,\n forceUpdate: PropTypes.func.isRequired,\n changeLanguage: PropTypes.func,\n systemConfig: PropTypes.object,\n alive: PropTypes.bool,\n common: PropTypes.object,\n};\n\nexport default withStyles(styles)(ConfigTabs);","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 '../../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, tempValue: { value, ts: Date.now() } });\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.tempValue || '').toString().trim()) {\n return { tempValue: { value, ts: Date.now() } };\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 (this.state.tempValue.value !== this.state.value) {\n this.updateTimeout && clearTimeout(this.updateTimeout);\n this.updateTimeout = setTimeout(() => {\n this.updateTimeout = null;\n this.setState({ value: this.state.tempValue.value });\n }, 30)\n } else if (this.updateTimeout) {\n clearTimeout(this.updateTimeout);\n this.updateTimeout = null;\n }\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 '../copy-to-clipboard';\nimport CopyIcon from '../../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 '../Icon';\nimport I18n from '../../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, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport LinearProgress from '@mui/material/LinearProgress';\n\nimport I18n from '../../i18n';\n\nimport ConfigTabs from './ConfigTabs';\nimport ConfigPanel from './ConfigPanel';\n\nconst styles = theme => ({\n root: {\n width: '100%',\n height: '100%'\n }\n});\n\nclass JsonConfigComponent extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n originalData: JSON.stringify(this.props.data),\n changed: false,\n errors: {\n\n },\n updateData: this.props.updateData,\n systemConfig: null,\n alive: false,\n commandRunning: false,\n schema: JSON.parse(JSON.stringify(this.props.schema))\n };\n\n this.forceUpdateHandlers = {};\n\n this.buildDependencies(this.state.schema);\n\n this.readData();\n }\n\n static getDerivedStateFromProps(props, state) {\n if (props.updateData !== state.updateData) {\n return {\n updateData: props.updateData,\n originalData: JSON.stringify(props.data),\n schema: JSON.parse(JSON.stringify(props.schema)),\n };\n } else {\n return null;\n }\n }\n\n static loadI18n(socket, i18n, adapterName) {\n if (i18n === true || (i18n && typeof i18n === 'string')) {\n const lang = I18n.getLanguage();\n const path = typeof i18n === 'string' ? i18n : 'i18n';\n return socket.fileExists(adapterName + '.admin', `${path}/${lang}.json`)\n .then(exists => {\n if (exists) {\n return `${path}/${lang}.json`;\n } else {\n return socket.fileExists(adapterName + '.admin', `${path}/${lang}/translations.json`)\n .then(exists =>\n exists ? `${path}/${lang}/translations.json` : '')\n }\n })\n .then(fileName => {\n if (fileName) {\n return socket.readFile(adapterName + '.admin', fileName)\n .then(json => {\n if (json.file !== undefined) {\n json = json.file;\n }\n try {\n json = JSON.parse(json);\n // apply file to I18n\n I18n.extendTranslations(json, lang);\n } catch (e) {\n console.error(`Cannot parse language file \"${adapterName}.admin/${fileName}: ${e}`);\n }\n })\n } else {\n console.warn(`Cannot find i18n for ${adapterName} / ${fileName}`);\n return Promise.resolve();\n }\n });\n } else if (i18n && typeof i18n === 'object') {\n I18n.extendTranslations(i18n);\n return Promise.resolve();\n } else {\n return Promise.resolve();\n }\n }\n\n onCommandRunning = commandRunning => this.setState( {commandRunning});\n\n readSettings() {\n if ((this.props.custom || this.props.common) && this.props.data) {\n return Promise.resolve();\n } else {\n return this.props.socket.getObject(`system.adapter.${this.props.adapterName}.${this.props.instance}`)\n .then(obj => this.setState({common: obj.common, data: this.props.data || obj.native}));\n }\n }\n\n readData() {\n this.readSettings()\n .then(() => this.props.socket.getCompactSystemConfig())\n .then(systemConfig =>\n this.props.socket.getState(`system.adapter.${this.props.adapterName}.${this.props.instance}.alive`)\n .then(state => {\n if (this.props.custom) {\n this.setState({systemConfig: systemConfig.common, alive: !!(state && state.val)});\n } else {\n this.setState({systemConfig: systemConfig.common, alive: !!(state && state.val)}, () =>\n this.props.socket.subscribeState(`system.adapter.${this.props.adapterName}.${this.props.instance}.alive`, this.onAlive));\n }\n }));\n }\n\n onAlive = (id, state) => {\n if ((state?.val || false) !== this.state.alive) {\n this.setState({alive: state?.val || false});\n }\n }\n\n onChange = (data, value, cb, saveConfig) => {\n if (this.props.onValueChange) {\n this.props.onValueChange(data, value, saveConfig);\n cb && cb();\n } else {\n if (data) {\n const state = { data };\n\n const _data = {};\n // remove all attributes starting with \"_\"\n Object.keys(data).forEach(attr => !attr.startsWith('_') && (_data[attr] = data[attr]));\n\n state.changed = JSON.stringify(_data) !== this.state.originalData;\n\n this.setState({ state }, () => {\n this.props.onChange(_data, state.changed, saveConfig);\n cb && cb();\n });\n } else if (saveConfig) {\n this.props.onChange(null, null, saveConfig);\n }\n }\n }\n\n onError = (attr, error) => {\n const errors = JSON.parse(JSON.stringify(this.state.errors));\n if (error) {\n errors[attr] = error;\n } else {\n delete errors[attr];\n }\n\n if (JSON.stringify(errors) !== JSON.parse(JSON.stringify(this.state.errors))) {\n this.setState({errors}, () =>\n this.props.onError(!!Object.keys(this.state.errors).length));\n }\n }\n\n flatten(schema, _list) {\n _list = _list || {};\n if (schema.items) {\n Object.keys(schema.items).forEach(attr => {\n _list[attr] = schema.items[attr];\n this.flatten(schema.items[attr], _list);\n });\n }\n\n return _list;\n }\n\n buildDependencies(schema) {\n const attrs = this.flatten(schema);\n Object.keys(attrs).forEach(attr => {\n if (attrs[attr].confirm?.alsoDependsOn) {\n attrs[attr].confirm?.alsoDependsOn.forEach(dep => {\n if (!attrs[dep]) {\n console.error(`[JsonConfigComponent] Attribute ${dep} does not exist!`);\n if (dep.startsWith('data.')) {\n console.warn(`[JsonConfigComponent] please use \"${dep.replace(/^data\\./, '')}\" instead of \"${dep}\"`);\n }\n } else {\n attrs[dep].confirmDependsOn = attrs[dep].confirmDependsOn || [];\n\n const depObj = {...attrs[attr], attr};\n if (depObj.confirm) {\n depObj.confirm.cancel = 'Undo';\n }\n\n attrs[dep].confirmDependsOn.push(depObj);\n }\n });\n }\n\n if (attrs[attr].onChange?.alsoDependsOn) {\n attrs[attr].onChange?.alsoDependsOn.forEach(dep => {\n if (!attrs[dep]) {\n console.error(`[JsonConfigComponent] Attribute ${dep} does not exist!`);\n if (dep.startsWith('data.')) {\n console.warn(`[JsonConfigComponent] please use \"${dep.replace(/^data\\./, '')}\" instead of \"${dep}\"`);\n }\n } else {\n attrs[dep].onChangeDependsOn = attrs[dep].onChangeDependsOn || [];\n\n const depObj = {...attrs[attr], attr};\n\n attrs[dep].onChangeDependsOn.push(depObj);\n }\n });\n }\n\n if (attrs[attr].hidden?.alsoDependsOn) {\n attrs[attr].hidden?.alsoDependsOn.forEach(dep => {\n if (!attrs[dep]) {\n console.error(`[JsonConfigComponent] Attribute ${dep} does not exist!`);\n if (dep.startsWith('data.')) {\n console.warn(`[JsonConfigComponent] please use \"${dep.replace(/^data\\./, '')}\" instead of \"${dep}\"`);\n }\n } else {\n attrs[dep].hiddenDependsOn = attrs[dep].hiddenDependsOn || [];\n\n const depObj = {...attrs[attr], attr};\n\n attrs[dep].hiddenDependsOn.push(depObj);\n }\n });\n }\n\n if (attrs[attr].label?.alsoDependsOn) {\n attrs[attr].label?.alsoDependsOn.forEach(dep => {\n if (!attrs[dep]) {\n console.error(`[JsonConfigComponent] Attribute ${dep} does not exist!`);\n if (dep.startsWith('data.')) {\n console.warn(`[JsonConfigComponent] please use \"${dep.replace(/^data\\./, '')}\" instead of \"${dep}\"`);\n }\n } else {\n attrs[dep].labelDependsOn = attrs[dep].labelDependsOn || [];\n\n const depObj = {...attrs[attr], attr};\n\n attrs[dep].labelDependsOn.push(depObj);\n }\n });\n }\n\n if (attrs[attr].help?.alsoDependsOn) {\n attrs[attr].help?.alsoDependsOn.forEach(dep => {\n if (!attrs[dep]) {\n console.error(`[JsonConfigComponent] Attribute ${dep} does not exist!`);\n if (dep.startsWith('data.')) {\n console.warn(`[JsonConfigComponent] please use \"${dep.replace(/^data\\./, '')}\" instead of \"${dep}\"`);\n }\n } else {\n attrs[dep].helpDependsOn = attrs[dep].helpDependsOn || [];\n\n const depObj = {...attrs[attr], attr};\n\n attrs[dep].helpDependsOn.push(depObj);\n }\n });\n }\n });\n }\n\n renderItem(item) {\n if (item.type === 'tabs') {\n return <ConfigTabs\n onCommandRunning={this.onCommandRunning}\n commandRunning={this.state.commandRunning}\n socket={this.props.socket}\n adapterName={this.props.adapterName}\n instance={this.props.instance}\n common={this.props.common}\n alive={this.state.alive}\n themeType={this.props.themeType}\n themeName={this.props.themeName}\n data={this.props.data}\n originalData={JSON.parse(this.state.originalData)}\n schema={item}\n systemConfig={this.state.systemConfig}\n customs={this.props.customs}\n dateFormat={this.props.dateFormat}\n isFloatComma={this.props.isFloatComma}\n multiEdit={this.props.multiEdit}\n imagePrefix={this.props.imagePrefix}\n\n custom={this.props.custom}\n customObj={this.props.customObj}\n instanceObj={this.props.instanceObj}\n\n changeLanguage={this.changeLanguage}\n forceUpdate={this.forceAttrUpdate}\n registerOnForceUpdate={this.registerOnForceUpdate}\n\n onChange={this.onChange}\n onError={(attr, error) => this.onError(attr, error)}\n />;\n } else if (item.type === 'panel' || !item.type) {\n return <ConfigPanel\n index={1000}\n isParentTab={true}\n onCommandRunning={this.onCommandRunning}\n commandRunning={this.state.commandRunning}\n socket={this.props.socket}\n adapterName={this.props.adapterName}\n instance={this.props.instance}\n common={this.props.common}\n alive={this.state.alive}\n themeType={this.props.themeType}\n themeName={this.props.themeName}\n data={this.props.data}\n originalData={JSON.parse(this.state.originalData)}\n schema={item}\n systemConfig={this.state.systemConfig}\n customs={this.props.customs}\n dateFormat={this.props.dateFormat}\n isFloatComma={this.props.isFloatComma}\n multiEdit={this.props.multiEdit}\n imagePrefix={this.props.imagePrefix}\n\n custom={this.props.custom}\n customObj={this.props.customObj}\n instanceObj={this.props.instanceObj}\n\n changeLanguage={this.changeLanguage}\n forceUpdate={this.forceAttrUpdate}\n registerOnForceUpdate={this.registerOnForceUpdate}\n\n onChange={this.onChange}\n onError={(attr, error) => this.onError(attr, error)}\n />;\n }\n }\n\n changeLanguage = () => {\n this.forceUpdate();\n }\n\n forceAttrUpdate = (attr, data) => {\n if (Array.isArray(attr)) {\n attr.forEach(a =>\n this.forceUpdateHandlers[a] && this.forceUpdateHandlers[a](data));\n } else {\n if (this.forceUpdateHandlers[attr]) {\n this.forceUpdateHandlers[attr](data);\n }\n }\n }\n\n registerOnForceUpdate = (attr, cb) => {\n if (cb) {\n this.forceUpdateHandlers[attr] = cb;\n } else if (this.forceUpdateHandlers[attr]) {\n delete this.forceUpdateHandlers[attr];\n }\n }\n\n render() {\n if (!this.state.systemConfig) {\n return <LinearProgress />;\n }\n\n return <div className={this.props.classes.root}>\n {this.renderItem(this.state.schema)}\n </div>;\n }\n}\n\nJsonConfigComponent.propTypes = {\n socket: PropTypes.object.isRequired,\n\n adapterName: PropTypes.string,\n instance: PropTypes.number,\n common: PropTypes.object,\n customs: PropTypes.object, // custom components\n\n custom: PropTypes.bool, // is the customs settings must be shown\n customObj: PropTypes.object,\n multiEdit: PropTypes.bool, // set if user edits more than one object simultaneously\n instanceObj: PropTypes.object,\n dateFormat: PropTypes.string,\n isFloatComma: PropTypes.bool,\n imagePrefix: PropTypes.string,\n\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n updateData: PropTypes.number,\n schema: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n onValueChange: PropTypes.func,\n};\n\nexport default withStyles(styles)(JsonConfigComponent);","// please do not delete React, as without it other projects could not be compiled: ReferenceError: React is not defined\nimport React from 'react';\nimport withStyles from '@mui/styles/withStyles';\nimport Fab from '@mui/material/Fab';\nimport PropTypes from 'prop-types';\n\nimport I18n from '../i18n';\n\nimport IconHelp from '@mui/icons-material/Help'\nimport IconUpload from '@mui/icons-material/VerticalAlignTop'\nimport IconDownload from '@mui/icons-material/VerticalAlignBottom'\n\nconst styles = theme => ({\n buttons: {\n marginRight: 5,\n marginTop: 5,\n float: 'right'\n },\n logo: {\n padding: 8,\n width: 64\n }\n});\n\n/**\n * @typedef {object} LogoProps\n * @property {any} common Adapter common configuration from io-package.json\n * @property {any} native Adapter native data from io-package.json\n * @property {number} instance Adapter instance number.\n * @property {(contents: any) => void} [onLoad]\n * @property {(error: string) => void} [onError]\n * @property {{ buttons: string, logo: string }} classes The styling class names.\n *\n * @extends {React.Component<LogoProps>}\n */\nclass Logo extends React.Component {\n\n static generateFile(filename, obj) {\n const el = window.document.createElement('a');\n el.setAttribute('href', 'data:application/json;charset=utf-8,' + encodeURIComponent(JSON.stringify(obj, null, 2)));\n el.setAttribute('download', filename);\n\n el.style.display = 'none';\n window.document.body.appendChild(el);\n\n el.click();\n\n window.document.body.removeChild(el);\n }\n\n handleFileSelect(evt) {\n const f = evt.target.files[0];\n if (f) {\n const r = new window.FileReader();\n r.onload = e => {\n const contents = e.target.result;\n try {\n const json = JSON.parse(contents);\n if (json.native && json.common) {\n if (json.common.name !== this.props.common.name) {\n this.props.onError && this.props.onError(I18n.t('ra_otherConfig', json.common.name));\n } else {\n this.props.onLoad && this.props.onLoad(json.native);\n }\n } else {\n this.props.onError && this.props.onError(I18n.t('ra_invalidConfig'));\n }\n } catch (e) {\n this.props.onError && this.props.onError(e.toString());\n }\n };\n r.readAsText(f);\n } else {\n alert('Failed to open JSON File');\n }\n }\n\n download() {\n const result = {\n _id: `system.adapter.${this.props.common.name}.${this.props.instance}`,\n common: JSON.parse(JSON.stringify(this.props.common)),\n native: this.props.native\n };\n // remove unimportant information\n if (result.common.news) {\n delete result.common.news;\n }\n if (result.common.titleLang) {\n delete result.common.titleLang;\n }\n if (result.common.desc) {\n delete result.common.desc;\n }\n\n //window.open('data:application/iobroker; content-disposition=attachment; filename=' + result._id + '.json,' + JSON.stringify(result, null, 2));\n Logo.generateFile(result._id + '.json', result);\n }\n\n upload() {\n const input = window.document.createElement('input');\n input.setAttribute('type', 'file');\n input.setAttribute('id', 'files');\n input.setAttribute('opacity', 0);\n input.addEventListener('change', e => this.handleFileSelect(e, () => {}), false);\n (input.click)();\n }\n\n render() {\n return <div className={this.props.className} style={this.props.style}>\n {this.props.common.icon ?\n <img src={this.props.common.icon} className={this.props.classes.logo} alt=\"logo\"/> : null}\n {this.props.common.readme ?\n <Fab\n size=\"small\"\n color=\"primary\"\n aria-label=\"Help\"\n className={this.props.classes.buttons}\n onClick={() => {\n const win = window.open(this.props.common.readme, '_blank');\n win.focus();\n }}\n ><IconHelp /></Fab> : null}\n <Fab size=\"small\" color=\"primary\" aria-label=\"Load config\" className={this.props.classes.buttons}\n title={I18n.t('ra_Load configuration from file')} onClick={() => this.upload()}><IconUpload /></Fab>\n <Fab size=\"small\" color=\"primary\" aria-label=\"Save config\" className={this.props.classes.buttons}\n title={I18n.t('ra_Save configuration to file')} onClick={() => this.download()}><IconDownload/></Fab>\n </div>;\n }\n}\n\nLogo.propTypes = {\n common: PropTypes.object.isRequired,\n className: PropTypes.string,\n style: PropTypes.object,\n native: PropTypes.object.isRequired,\n instance: PropTypes.number.isRequired,\n onError: PropTypes.func.isRequired,\n onLoad: PropTypes.func.isRequired,\n};\n\n/** @type {typeof Logo} */\nconst _export = withStyles(styles)(Logo);\nexport default _export;","/**\n * Copyright 2018-2022 bluefox <dogafox@gmail.com>\n *\n * MIT License\n *\n **/\nimport React from 'react';\nimport copy from './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 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\nexport default MDUtils;","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}","import React from 'react';\n\nimport PropTypes from 'prop-types';\nimport withStyles from '@mui/styles/withStyles';\nimport { HexColorPicker as ColorPicker } from 'react-colorful';\n\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 TableHead from '@mui/material/TableHead';\nimport TableRow from '@mui/material/TableRow';\nimport TableSortLabel from '@mui/material/TableSortLabel';\nimport IconButton from '@mui/material/IconButton';\nimport Select from '@mui/material/Select';\nimport MenuItem from '@mui/material/MenuItem';\nimport TextField from '@mui/material/TextField';\nimport Checkbox from '@mui/material/Checkbox';\nimport Dialog from '@mui/material/Dialog';\n\nimport IconEdit from '@mui/icons-material/Edit';\nimport IconDelete from '@mui/icons-material/Delete';\nimport IconExpand from '@mui/icons-material/NavigateNext';\nimport IconCollapse from '@mui/icons-material/ExpandMore';\nimport IconCheck from '@mui/icons-material/Check';\nimport IconClose from '@mui/icons-material/Close';\nimport IconAdd from '@mui/icons-material/Add';\nimport IconList from '@mui/icons-material/ViewHeadline';\nimport IconColor from '@mui/icons-material/Colorize';\n\nimport DialogSelectID from '../Dialogs/SelectID';\nimport Utils from './Utils';\n\nfunction getAttr(obj, attr, lookup) {\n if (typeof attr === 'string') {\n attr = attr.split('.');\n }\n\n if (!obj) {\n return null;\n }\n\n if (attr.length === 1) {\n if (lookup && lookup[obj[attr[0]]]) {\n return lookup[obj[attr[0]]];\n } else {\n return obj[attr[0]];\n }\n } else {\n const name = attr.shift();\n return getAttr(obj[name], attr);\n }\n}\n\nfunction setAttr(obj, attr, value) {\n if (typeof attr === 'string') {\n attr = attr.split('.');\n }\n\n if (attr.length === 1) {\n return obj[attr[0]] = value;\n } else {\n const name = attr.shift();\n if (obj[name] === null || obj[name] === undefined) {\n obj[name] = {};\n }\n return setAttr(obj[name], attr, value);\n }\n}\n\nconst styles = theme => ({\n tableContainer: {\n width: '100%',\n height: '100%',\n overflow: 'auto'\n },\n table: {\n width: '100%',\n minWidth: 800,\n maxWidth: 1920,\n },\n cell: {\n paddingTop: 0,\n paddingBottom: 0,\n paddingLeft: 4,\n paddingRight: 4,\n },\n rowMainWithChildren: {\n\n },\n rowMainWithoutChildren: {\n\n },\n rowNoEdit: {\n opacity: 0.3\n },\n cellExpand: {\n width: 30,\n },\n cellButton: {\n width: 30,\n },\n cellHeader: {\n fontWeight: 'bold',\n background: theme.palette.mode === 'dark' ? '#888' : '#888',\n color: theme.palette.mode === 'dark' ? '#EEE' : '#111',\n height: 48,\n wordBreak: 'break-word',\n whiteSpace: 'pre',\n },\n width_name_nicknames: {\n maxWidth: 150,\n },\n width_ioType: {\n maxWidth: 100,\n },\n width_type: {\n maxWidth: 100,\n },\n width_displayTraits: {\n maxWidth: 100,\n },\n width_roomHint: {\n maxWidth: 100,\n },\n rowSecondary: {\n fontStyle: 'italic',\n },\n cellSecondary: {\n fontSize: 10,\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 fieldEditWithButton: {\n width: `calc(100% - 33px)`,\n display: 'inline-block',\n },\n fieldEdit: {\n width: `100%`,\n display: 'inline-block',\n lineHeight: '50px',\n verticalAlign: 'middle',\n },\n fieldButton: {\n width: 30,\n display: 'inline-block',\n },\n colorDialog: {\n overflow: 'hidden',\n padding: 15,\n },\n subText: {\n fontSize: 10,\n fontStyle: 'italic',\n },\n glow: {\n animation: 'glow 0.2s 2 alternate'\n }\n});\n\nfunction descendingComparator(a, b, orderBy, lookup) {\n const _a = getAttr(a, orderBy, lookup) || '';\n const _b = getAttr(b, orderBy, lookup) || '';\n\n if (_b < _a) {\n return -1;\n } else\n if (_b > _a) {\n return 1;\n } else {\n return 0;\n }\n}\n\nfunction getComparator(order, orderBy, lookup) {\n return order === 'desc'\n ? (a, b) => descendingComparator(a, b, orderBy, lookup)\n : (a, b) => -descendingComparator(a, b, orderBy, lookup);\n}\n\nfunction stableSort(array, comparator) {\n const stabilizedThis = array.map((el, index) => [el, index]);\n\n stabilizedThis.sort((a, b) => {\n const order = comparator(a[0], b[0]);\n if (order) {\n return order;\n } else {\n return a[1] - b[1];\n }\n });\n\n return stabilizedThis.map(el => el[0]);\n}\n\nclass TreeTable extends React.Component {\n constructor(props) {\n super(props);\n\n let opened = (window._localStorage || window.localStorage).getItem(this.props.name || 'iob-table') || '[]';\n try {\n opened = JSON.parse(opened) || [];\n } catch (e) {\n opened = [];\n }\n if (!Array.isArray(opened)) {\n opened = [];\n }\n\n this.state = {\n opened,\n editMode: false,\n deleteMode: false,\n editData: null,\n order: 'asc',\n update: null,\n orderBy: this.props.columns[0].field,\n useTable: false,\n showSelectColor: false,\n glowOnChange: props.glowOnChange,\n };\n }\n\n static getDerivedStateFromProps(props, state) {\n if (props.glowOnChange) {\n const update = [];\n let count = 0;\n if (props.data && state.data) {\n props.data.forEach(line => {\n count++;\n const oldLine = state.data.find(it => it.id === line.id);\n if (oldLine) {\n if (JSON.stringify(oldLine) !== JSON.stringify(line)) {\n update.push(line.id);\n }\n } else {\n update.push(line.id);\n }\n });\n }\n\n if (update.length && update.length !== count) {\n return {data: props.data, update};\n } else {\n return {data: props.data};\n }\n } else {\n return {data: props.data};\n }\n }\n\n renderCellEdit(item, col) {\n let val = getAttr(item, col.field);\n if (Array.isArray(val)) {\n val = val[0];\n }\n\n if (col.lookup) {\n return this.renderCellEditSelect(item, col, val);\n } if (col.editComponent) {\n return this.renderCellEditCustom(item, col, val);\n } else {\n if (col.type === 'boolean' || (!col.type && typeof val === 'boolean')) {\n return this.renderCellEditBoolean(item, col, val);\n } else if (col.type === 'color') {\n return this.renderCellEditColor(item, col, val);\n } else if (col.type === 'oid') {\n return this.renderCellEditObjectID(item, col, val);\n } else {\n return this.renderCellEditString(item, col, val);\n }\n }\n }\n\n renderCellEditSelect(item, col, val) {\n return <Select\n variant=\"standard\"\n onChange={e => {\n const editData = this.state.editData ? {...this.state.editData} : {};\n if (e.target.value === val) {\n delete editData[col.field];\n } else {\n editData[col.field] = e.target.value;\n }\n this.setState({editData});\n }}\n value={(this.state.editData && this.state.editData[col.field]) || val}\n >\n {Object.keys(col.lookup).map(v => <MenuItem value={v}>{col.lookup[v]}</MenuItem>)}\n </Select>;\n }\n\n renderCellEditString(item, col, val) {\n return <TextField\n variant=\"standard\"\n className={this.props.classes.fieldEdit}\n fullWidth\n value={this.state.editData && this.state.editData[col.field] !== undefined ? this.state.editData[col.field] : val}\n onChange={e => {\n const editData = this.state.editData ? {...this.state.editData} : {};\n if (e.target.value === val) {\n delete editData[col.field];\n } else {\n editData[col.field] = e.target.value;\n }\n this.setState({editData});\n }}\n />;\n }\n\n renderCellEditCustom(item, col, val) {\n const EditComponent = col.editComponent;\n\n // use new value if exists\n if (this.state.editData && this.state.editData[col.field] !== undefined) {\n val = this.state.editData[col.field];\n item = JSON.parse(JSON.stringify(item));\n item[col.field] = val;\n }\n\n return <EditComponent\n value={val}\n rowData={item}\n onChange={newVal => {\n const editData = this.state.editData ? {...this.state.editData} : {};\n if (newVal === val) {\n delete editData[col.field];\n } else {\n editData[col.field] = newVal;\n }\n this.setState({editData});\n }}\n />;\n }\n\n renderCellEditBoolean(item, col, val) {\n return <Checkbox\n checked={this.state.editData && this.state.editData[col.field] !== undefined ? !!this.state.editData[col.field] : !!val}\n onChange={e => {\n const editData = this.state.editData ? {...this.state.editData} : {};\n if (e.target.checked === !!val) {\n delete editData[col.field];\n } else {\n editData[col.field] = e.target.checked;\n }\n this.setState({editData});\n }}\n inputProps={{ 'aria-label': 'checkbox' }}\n />;\n }\n\n renderSelectColorDialog() {\n return <Dialog\n classes={{root: this.props.classes.colorDialog, paper: this.props.classes.colorDialog}}\n onClose={() => {\n this.selectCallback = null;\n this.setState({showSelectColor: false});\n }}\n open={this.state.showSelectColor}>\n <ColorPicker\n color={this.state.selectIdValue}\n onChange={color => {\n this.setState({selectIdValue: color}, () =>\n this.selectCallback && this.selectCallback(color));\n }}\n />\n </Dialog>;\n }\n\n renderCellEditColor(item, col, val) {\n const _val = this.state.editData && this.state.editData[col.field] !== undefined ? this.state.editData[col.field] : val;\n return <div className={this.props.classes.fieldEdit}>\n <TextField\n variant=\"standard\"\n fullWidth\n className={this.props.classes.fieldEditWithButton}\n value={_val}\n inputProps={{style: {backgroundColor: _val, color: Utils.isUseBright(_val, null) ? '#FFF' : '#000'}}}\n onChange={e => {\n const editData = this.state.editData ? {...this.state.editData} : {};\n if (e.target.value === val) {\n delete editData[col.field];\n } else {\n editData[col.field] = e.target.value;\n }\n this.setState({editData});\n }}\n />\n\n <IconButton\n className={this.props.classes.fieldButton}\n contained\n onClick={() => {\n this.selectCallback = newColor => {\n const editData = this.state.editData ? {...this.state.editData} : {};\n if (newColor === val) {\n delete editData[col.field];\n } else {\n editData[col.field] = newColor;\n }\n this.setState({editData});\n };\n\n this.setState({showSelectColor: true, selectIdValue: val});\n }}\n size=\"large\"><IconColor/></IconButton>\n </div>;\n }\n\n renderSelectIdDialog() {\n if (this.state.showSelectId) {\n return <DialogSelectID\n key=\"tableSelect\"\n imagePrefix=\"../..\"\n dialogName={this.props.adapterName}\n themeType={this.props.themeType}\n socket={this.props.socket}\n statesOnly={true}\n selected={this.state.selectIdValue}\n onClose={() => this.setState({showSelectId: false})}\n onOk={(selected, name) => {\n this.setState({showSelectId: false, selectIdValue: null});\n this.selectCallback && this.selectCallback(selected);\n this.selectCallback = null;\n }}\n />;\n } else {\n return null;\n }\n }\n\n renderCellEditObjectID(item, col, val) {\n return <div className={this.props.classes.fieldEdit}>\n <TextField\n variant=\"standard\"\n fullWidth\n className={this.props.classes.fieldEditWithButton}\n value={this.state.editData && this.state.editData[col.field] !== undefined ? this.state.editData[col.field] : val}\n onChange={e => {\n const editData = this.state.editData ? {...this.state.editData} : {};\n if (e.target.value === val) {\n delete editData[col.field];\n } else {\n editData[col.field] = e.target.value;\n }\n this.setState({editData});\n }}\n />\n\n <IconButton\n className={this.props.classes.fieldButton}\n contained\n onClick={() => {\n this.selectCallback = selected => {\n const editData = this.state.editData ? {...this.state.editData} : {};\n if (selected === val) {\n delete editData[col.field];\n } else {\n editData[col.field] = selected;\n }\n this.setState({editData});\n };\n\n this.setState({showSelectId: true, selectIdValue: val});\n }}\n size=\"large\"\n ><IconList/></IconButton>\n </div>;\n }\n\n renderCellNonEdit(item, col) {\n let val = getAttr(item, col.field, col.lookup);\n if (Array.isArray(val)) {\n val = val[0];\n }\n\n if (col.type === 'boolean') {\n return <Checkbox\n checked={!!val}\n disabled={true}\n inputProps={{ 'aria-label': 'checkbox' }}\n />\n } else {\n return val;\n }\n }\n\n renderCell(item, col, level, i) {\n if (this.state.editMode === i && col.editable !== 'never' && col.editable !== false) {\n return <TableCell\n key={col.field}\n className={Utils.clsx(this.props.classes.cell, level && this.props.classes.cellSecondary)}\n style={col.cellStyle}\n component=\"th\"\n >\n {this.renderCellEdit(item, col)}\n </TableCell>;\n } else {\n return <TableCell\n key={col.field}\n className={Utils.clsx(this.props.classes.cell, level && this.props.classes.cellSecondary)}\n style={col.cellStyle}\n component=\"th\" >\n {this.renderCellNonEdit(item, col)}\n </TableCell>;\n }\n }\n\n renderCellWithSubField(item, col) {\n const main = getAttr(item, col.field, col.lookup);\n const sub = getAttr(item, col.subField, col.subLookup);\n return <div>\n <div className={this.props.classes.mainText}>{main}</div>\n <div className={this.props.classes.subText} style={col.subStyle || {}}>{sub}</div>\n </div>;\n }\n\n renderLine(item, level) {\n const levelShift = this.props.levelShift === undefined ? 24 : this.props.levelShift;\n\n level = level || 0;\n const i = this.props.data.indexOf(item);\n if (!item) {\n return null;\n }\n if (!level && item.parentId) {\n return null;\n } else if (level && !item.parentId) {\n return null; // should never happen\n } else {\n // try to find children\n const opened = this.state.opened.includes(item.id);\n const children = this.props.data.filter(it => it.parentId === item.id);\n\n return [\n <TableRow\n key={item.id}\n className={Utils.clsx(\n 'table-row-' + (item.id || '').toString().replace(/[.$]/g, '_'),\n this.state.update && this.state.update.includes(item.id) && this.props.classes.glow,\n this.props.classes.row,\n level && this.props.classes.rowSecondary,\n !level && children.length && this.props.classes.rowMainWithChildren,\n !level && !children.length && this.props.classes.rowMainWithoutChildren,\n this.state.editMode !== false && this.state.editMode !== i && this.props.classes.rowNoEdit,\n this.state.deleteMode !== false && this.state.deleteMode !== i && this.props.classes.rowNoEdit,\n )}\n >\n <TableCell className={Utils.clsx(this.props.classes.cell, this.props.classes.cellExpand, level && this.props.classes.cellSecondary)}>\n {children.length ? <IconButton\n onClick={() => {\n const opened = [...this.state.opened];\n const pos = opened.indexOf(item.id);\n if (pos === -1) {\n opened.push(item.id);\n opened.sort();\n } else {\n opened.splice(pos, 1);\n }\n\n (window._localStorage || window.localStorage).setItem(this.props.name || 'iob-table', JSON.stringify(opened));\n\n this.setState({opened});\n }}\n size=\"small\">\n {opened ? <IconCollapse/> : <IconExpand/>}\n </IconButton> : null}\n </TableCell>\n <TableCell\n scope=\"row\"\n className={Utils.clsx(this.props.classes.cell, level && this.props.classes.cellSecondary)}\n style={Object.assign({}, this.props.columns[0].cellStyle, {paddingLeft: levelShift * level})}\n >\n {this.props.columns[0].subField ?\n this.renderCellWithSubField(item, this.props.columns[0])\n :\n getAttr(item, this.props.columns[0].field, this.props.columns[0].lookup)\n }\n </TableCell>\n\n {this.props.columns.map((col, ii) =>\n !ii && !col.hidden ? null : this.renderCell(item, col, level, i))}\n\n {this.props.onUpdate ? <TableCell className={Utils.clsx(this.props.classes.cell, this.props.classes.cellButton)}>\n {this.state.editMode === i || this.state.deleteMode === i ?\n <IconButton\n disabled={this.state.editMode !== false && (!this.state.editData || !Object.keys(this.state.editData).length)}\n onClick={() => {\n if (this.state.editMode !== false) {\n const newData = JSON.parse(JSON.stringify(item));\n Object.keys(this.state.editData).forEach(attr => setAttr(newData, attr, this.state.editData[attr]));\n this.setState({editMode: false}, () => this.props.onUpdate(newData, item))\n } else {\n this.setState({deleteMode: false}, () => this.props.onDelete(item))\n }\n }}\n size=\"large\">\n <IconCheck/>\n </IconButton>\n :\n <IconButton\n disabled={this.state.editMode !== false}\n onClick={() => this.setState({editMode: i, editData: null})}\n size=\"large\">\n <IconEdit/>\n </IconButton>}\n </TableCell> : null}\n {this.props.onUpdate || this.props.onDelete ? <TableCell className={Utils.clsx(this.props.classes.cell, this.props.classes.cellButton)}>\n {this.state.editMode === i || this.state.deleteMode === i ?\n <IconButton\n onClick={() => this.setState({editMode: false, deleteMode: false})}\n size=\"large\">\n <IconClose/>\n </IconButton>\n :\n (this.props.onDelete ? <IconButton\n disabled={this.state.deleteMode !== false}\n onClick={() => this.setState({deleteMode: i})}\n size=\"large\">\n <IconDelete/>\n </IconButton> : null)\n }\n </TableCell> : null}\n </TableRow>,\n !level && opened ? children.map(item => this.renderLine(item, level + 1)) : null,\n ];\n }\n }\n\n handleRequestSort(property) {\n const isAsc = this.state.orderBy === property && this.state.order === 'asc';\n this.setState({order: isAsc ? 'desc' : 'asc', orderBy: property});\n }\n\n renderHead() {\n return <TableHead>\n <TableRow key=\"headerRow\">\n <TableCell\n component=\"th\"\n className={Utils.clsx(this.props.classes.cell, this.props.classes.cellHeader, this.props.classes.cellExpand)}\n />\n <TableCell\n component=\"th\"\n className={Utils.clsx(this.props.classes.cell, this.props.classes.cellHeader, this.props.classes['width_' + this.props.columns[0].field.replace(/\\./g, '_')])}\n style={this.props.columns[0].headerStyle || this.props.columns[0].cellStyle}\n sortDirection={this.props.noSort ? false : (this.state.orderBy === this.props.columns[0].field ? this.state.order : false)}\n >\n {this.props.noSort ? null : <TableSortLabel\n active={this.state.orderBy === this.props.columns[0].field}\n direction={this.state.orderBy === this.props.columns[0].field ? this.state.order : 'asc'}\n onClick={() => this.handleRequestSort(this.props.columns[0].field)}\n >\n {this.props.columns[0].title || this.props.columns[0].field}\n {this.state.orderBy === this.props.columns[0].field ?\n <span className={this.props.classes.visuallyHidden}>\n {this.state.order === 'desc' ? 'sorted descending' : 'sorted ascending'}\n </span> : null}\n </TableSortLabel>}\n </TableCell>\n {this.props.columns.map((col, i) =>\n !i && !col.hidden ? null : <TableCell\n key={col.field}\n className={Utils.clsx(this.props.classes.cell, this.props.classes.cellHeader, this.props.classes['width_' + col.field.replace(/\\./g, '_')])}\n style={col.headerStyle || col.cellStyle}\n component=\"th\"\n >\n {this.props.noSort ? null : <TableSortLabel\n active={this.state.orderBy === col.field}\n direction={this.state.orderBy === col.field ? this.state.order : 'asc'}\n onClick={() => this.handleRequestSort(col.field)}\n >\n {col.title || col.field}\n {this.state.orderBy === col.field ?\n <span className={this.props.classes.visuallyHidden}>\n {this.state.order === 'desc' ? 'sorted descending' : 'sorted ascending'}\n </span> : null}\n </TableSortLabel> }\n </TableCell>)}\n {this.props.onUpdate ? <TableCell component=\"th\" className={Utils.clsx(this.props.classes.cell, this.props.classes.cellHeader, this.props.classes.cellButton)}>\n {!this.props.noAdd ? <Fab\n color=\"primary\"\n size=\"small\"\n disabled={this.state.editMode !== false}\n onClick={() => this.props.onUpdate(true)}>\n <IconAdd/>\n </Fab>: null }\n </TableCell> : null}\n {this.props.onDelete || this.props.onUpdate ? <TableCell component=\"th\" className={Utils.clsx(this.props.classes.cell, this.props.classes.cellHeader, this.props.classes.cellButton)}/> : null}\n </TableRow>\n </TableHead>;\n }\n\n render() {\n const lookup = this.props.columns.find(col => col.field === this.state.orderBy).lookup;\n const table = stableSort(this.props.data, getComparator(this.state.order, this.state.orderBy, lookup));\n\n if (this.state.update && this.state.update.length) {\n this.updateTimeout && clearTimeout(this.updateTimeout);\n this.updateTimeout = setTimeout(() => {\n this.updateTimeout = null;\n this.setState({update: null});\n }, 500);\n }\n\n return <div className={Utils.clsx(this.props.classes.tableContainer, this.props.className)}>\n <Table className={this.props.classes.table} aria-label=\"simple table\" size=\"small\" stickyHeader={true}>\n {this.renderHead()}\n <TableBody>\n {table.map(item => this.renderLine(item))}\n </TableBody>\n </Table>\n {this.renderSelectIdDialog()}\n {this.renderSelectColorDialog()}\n </div>;\n }\n}\n/*\nconst columns = [\n {\n title: 'Name of field', // required, else it will be \"field\"\n field: 'fieldIdInData', // required\n editable: false, // or true [default - true]\n cellStyle: { // CSS style - // optional\n maxWidth: '12rem',\n overflow: 'hidden',\n wordBreak: 'break-word'\n },\n lookup: { // optional => edit will be automatically \"SELECT\"\n 'value1': 'text1',\n 'value2': 'text2',\n }\n },\n {\n title: 'Type', // required, else it will be \"field\"\n field: 'myType', // required\n editable: true, // or true [default - true]\n lookup: { // optional => edit will be automatically \"SELECT\"\n 'number': 'Number',\n 'string': 'String',\n 'boolean': 'Boolean',\n },\n type: 'number/string/color/oid/icon/boolean', // oid=ObjectID,icon=base64-icon\n editComponent: props =>\n <div>Prefix&#123; <br/>\n <textarea\n rows={4}\n style={{width: '100%', resize: 'vertical'}}\n value={props.value}\n onChange={e => props.onChange(e.target.value)}\n />\n Suffix\n </div>,\n },\n];\n*/\n/* const data = [\n {\n id: 'UniqueID1' // required\n fieldIdInData: 'Name1',\n myType: 'number',\n },\n {\n id: 'UniqueID2' // required\n fieldIdInData: 'Name12',\n myType: 'string',\n },\n];\n */\n\n/*\n// STYLES\nconst styles = theme => ({\n tableDiv: {\n width: '100%',\n overflow: 'hidden',\n height: 'calc(100% - 48px)',\n },\n});\n// renderTable\nrenderTable() {\n return <div className={this.props.classes.tableDiv}>\n <TreeTable\n columns={this.columns}\n data={lines}\n onUpdate={(newData, oldData) => console.log('Update: ' + JSON.stringify(newData))}\n onDelete={oldData => console.log('Delete: ' + JSON.stringify(oldData))}\n />\n </div>;\n}\n */\n\nTreeTable.propTypes = {\n data: PropTypes.array.isRequired,\n className: PropTypes.string,\n loading: PropTypes.bool,\n name: PropTypes.string, // name of table to save settings in localStorage\n columns: PropTypes.arrayOf(\n PropTypes.shape({\n cellStyle: PropTypes.object,\n editComponent: PropTypes.func,\n field: PropTypes.string,\n headerStyle: PropTypes.object,\n hidden: PropTypes.bool,\n lookup: PropTypes.object,\n editable: PropTypes.bool,\n title: PropTypes.string,\n type: PropTypes.oneOf([\n 'string',\n 'boolean',\n 'numeric',\n 'icon', // todo: not yet implemented\n 'oid',\n 'color',\n ]),\n })\n ).isRequired,\n noSort: PropTypes.bool,\n onUpdate: PropTypes.func,\n onDelete: PropTypes.func,\n noAdd: PropTypes.bool, // hide add button\n themeType: PropTypes.string,\n glowOnChange: PropTypes.bool,\n socket: PropTypes.object, // only if oid type is used\n levelShift: PropTypes.number, // Shift in pixels for every level\n};\n\nexport default withStyles(styles)(TreeTable);","/**\n * Copyright 2020-2022, bluefox <dogafox@gmail.com>\n *\n * MIT License\n *\n **/\nimport PropTypes from 'prop-types';\n\n/** Possible progress states. */\nexport const PROGRESS = {\n /** The socket is connecting. */\n CONNECTING: 0,\n /** The socket is successfully connected. */\n CONNECTED: 1,\n /** All objects are loaded. */\n OBJECTS_LOADED: 2,\n /** The socket is ready for use. */\n READY: 3\n};\n\nconst PERMISSION_ERROR = 'permissionError';\nconst NOT_CONNECTED = 'notConnectedError';\nconst TIMEOUT_FOR_ADMIN4 = 1300;\n\nexport const ERRORS = {\n PERMISSION_ERROR,\n NOT_CONNECTED\n};\n\nfunction 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.debug(`Please add to \"${obj._id.replace(/\\.\\d+$/, '')}\" common.adminUI=${JSON.stringify(obj.common.adminUI)}`);\n }\n return obj;\n}\n\nclass Connection {\n /**\n * @param {import('./types').ConnectionProps} props\n */\n constructor(props) {\n props = props || { protocol: window.location.protocol, host: window.location.hostname };\n this.props = props;\n\n this.autoSubscribes = this.props.autoSubscribes || [];\n this.autoSubscribeLog = this.props.autoSubscribeLog;\n\n this.props.protocol = this.props.protocol || window.location.protocol;\n this.props.host = this.props.host || window.location.hostname;\n this.props.port = this.props.port || (window.location.port === '3000' ? (Connection.isWeb() ? 8082 : 8081) : window.location.port);\n this.props.ioTimeout = Math.max(this.props.ioTimeout || 20000, 20000);\n this.props.cmdTimeout = Math.max(this.props.cmdTimeout || 5000, 5000);\n\n // breaking change. Do not load all objects by default is true\n this.doNotLoadAllObjects = this.props.doNotLoadAllObjects === undefined ? true : this.props.doNotLoadAllObjects;\n this.doNotLoadACL = this.props.doNotLoadACL === undefined ? true : this.props.doNotLoadACL;\n\n /** @type {Record<string, ioBroker.State>} */\n this.states = {};\n this.objects = null;\n this.acl = null;\n this.firstConnect = true;\n this.waitForRestart = false;\n /** @type {ioBroker.Languages} */\n this.systemLang = 'en';\n this.connected = false;\n this._waitForFirstConnection = new Promise(resolve => { this._waitForFirstConnectionResolve = resolve });\n\n /** @type {Record<string, { reg: RegExp; cbs: ioBroker.StateChangeHandler[]}>} */\n this.statesSubscribes = {}; // subscribe for states\n\n /** @type {Record<string, { reg: RegExp; cbs: import('./types').ObjectChangeHandler[]}>} */\n this.objectsSubscribes = {}; // subscribe for objects\n this.onProgress = this.props.onProgress || function () { };\n this.onError = this.props.onError || function (err) { console.error(err); };\n this.loaded = false;\n this.loadTimer = null;\n this.loadCounter = 0;\n this.admin5only = this.props.admin5only || false;\n\n /** @type {((connected: boolean) => void)[]} */\n this.onConnectionHandlers = [];\n /** @type {((message: string) => void)[]} */\n this.onLogHandlers = [];\n\n /** @type {Record<string, Promise<any>>} */\n this._promises = {};\n\n this.log.error = text => this.log(text, 'error');\n this.log.warn = text => this.log(text, 'warn');\n this.log.info = text => this.log(text, 'info');\n this.log.debug = text => this.log(text, 'debug');\n this.log.silly = text => this.log(text, 'silly');\n\n this.startSocket();\n }\n\n /**\n * Checks if this connection is running in a web adapter and not in an admin.\n * @returns {boolean} True if running in a web adapter or in a socketio adapter.\n */\n static isWeb() {\n return window.adapterName === 'material' ||\n window.adapterName === 'vis' ||\n window.adapterName === 'echarts-show' ||\n window.socketUrl !== undefined;\n }\n\n /**\n * Starts the socket.io connection.\n * @returns {void}\n */\n startSocket() {\n // if socket io is not yet loaded\n if (typeof window.io === 'undefined') {\n // if in index.html the onLoad function not defined\n if (typeof window.registerSocketOnLoad !== 'function') {\n // poll if loaded\n this.scriptLoadCounter = this.scriptLoadCounter || 0;\n this.scriptLoadCounter++;\n\n if (this.scriptLoadCounter < 30) {\n // wait till the script loaded\n setTimeout(() => this.startSocket(), 100);\n return;\n } else {\n window.alert('Cannot load socket.io.js!');\n }\n } else {\n // register on load\n window.registerSocketOnLoad(() => this.startSocket());\n }\n return;\n } else {\n // socket was initialized, do not repeat\n if (this._socket) {\n return;\n }\n }\n\n let host = this.props.host;\n let port = this.props.port;\n let protocol = this.props.protocol.replace(':', '');\n let path = window.location.pathname;\n\n if (\n window.location.hostname === 'iobroker.net' ||\n window.location.hostname === 'iobroker.pro'\n ) {\n path = '';\n } else {\n // if web adapter, socket io could be on other port or even host\n if (window.socketUrl) {\n let parts = window.socketUrl.split(':');\n host = parts[0] || host;\n port = parts[1] || port;\n if (host.includes('://')) {\n parts = host.split('://');\n protocol = parts[0];\n host = parts[1];\n }\n }\n // get current path\n const pos = path.lastIndexOf('/');\n if (pos !== -1) {\n path = path.substring(0, pos + 1);\n }\n\n if (Connection.isWeb()) {\n // remove one level, like echarts, vis, .... We have here: '/echarts/'\n const parts = path.split('/');\n if (parts.length > 2) {\n parts.pop();\n parts.pop();\n path = parts.join('/');\n if (!path.endsWith('/')) {\n path += '/';\n }\n }\n }\n }\n\n const url = port ? `${protocol}://${host}:${port}${path}` : `${protocol}://${host}${path}`;\n\n this._socket = window.io.connect(\n url,\n {\n path: path.endsWith('/') ? path + 'socket.io' : path + '/socket.io',\n query: 'ws=true',\n name: this.props.name,\n timeout: this.props.ioTimeout\n }\n );\n\n this._socket.on('connect', noTimeout => {\n // If the user is not admin it takes some time to install the handlers, because all rights must be checked\n if (noTimeout !== true) {\n setTimeout(() =>\n this.getVersion()\n .then(info => {\n const [major, minor, patch] = info.version.split('.');\n const v = parseInt(major, 10) * 10000 + parseInt(minor, 10) * 100 + parseInt(patch, 10);\n if (v < 40102) {\n this._authTimer = null;\n // possible this is old version of admin\n this.onPreConnect(false, false);\n } else {\n this._socket.emit('authenticate', (isOk, isSecure) => this.onPreConnect(isOk, isSecure));\n }\n }), 500);\n } else {\n // iobroker websocket waits, till all handlers are installed\n this._socket.emit('authenticate', (isOk, isSecure) => this.onPreConnect(isOk, isSecure));\n }\n });\n\n this._socket.on('reconnect', () => {\n this.onProgress(PROGRESS.READY);\n this.connected = true;\n\n if (this.waitForRestart) {\n window.location.reload(false);\n } else {\n this._subscribe(true);\n this.onConnectionHandlers.forEach(cb => cb(true));\n }\n });\n\n this._socket.on('disconnect', () => {\n this.connected = false;\n this.subscribed = false;\n this.onProgress(PROGRESS.CONNECTING);\n this.onConnectionHandlers.forEach(cb => cb(false));\n });\n\n this._socket.on('reauthenticate', () =>\n this.authenticate());\n\n this._socket.on('log', message => {\n this.props.onLog && this.props.onLog(message);\n this.onLogHandlers.forEach(cb => cb(message));\n });\n\n this._socket.on('error', err => {\n let _err = err || '';\n if (typeof _err.toString !== 'function') {\n _err = JSON.stringify(_err);\n console.error(`Received strange error: ${_err}`);\n }\n _err = _err.toString();\n if (_err.includes('User not authorized')) {\n this.authenticate();\n } else {\n window.alert(`Socket Error: ${err}`);\n }\n });\n\n this._socket.on('connect_error', err =>\n console.error(`Connect error: ${err}`));\n\n this._socket.on('permissionError', err =>\n this.onError({ message: 'no permission', operation: err.operation, type: err.type, id: (err.id || '') }));\n\n this._socket.on('objectChange', (id, obj) =>\n setTimeout(() => this.objectChange(id, obj), 0));\n\n this._socket.on('stateChange', (id, state) =>\n setTimeout(() => this.stateChange(id, state), 0));\n\n this._socket.on('cmdStdout', (id, text) =>\n this.onCmdStdoutHandler && this.onCmdStdoutHandler(id, text));\n\n this._socket.on('cmdStderr', (id, text) =>\n this.onCmdStderrHandler && this.onCmdStderrHandler(id, text));\n\n this._socket.on('cmdExit', (id, exitCode) =>\n this.onCmdExitHandler && this.onCmdExitHandler(id, exitCode));\n }\n\n /**\n * Called internally.\n * @private\n * @param {boolean} isOk\n * @param {boolean} isSecure\n */\n onPreConnect(isOk, isSecure) {\n if (this._authTimer) {\n clearTimeout(this._authTimer);\n this._authTimer = null;\n }\n\n this.connected = true;\n this.isSecure = isSecure;\n\n if (this.waitForRestart) {\n window.location.reload(false);\n } else {\n if (this.firstConnect) {\n // retry strategy\n this.loadTimer = setTimeout(() => {\n this.loadTimer = null;\n this.loadCounter++;\n if (this.loadCounter < 10) {\n this.onConnect();\n }\n }, 1000);\n\n if (!this.loaded) {\n this.onConnect();\n }\n } else {\n this.onProgress(PROGRESS.READY);\n }\n\n this._subscribe(true);\n this.onConnectionHandlers.forEach(cb => cb(true));\n }\n\n if (this._waitForFirstConnectionResolve) {\n this._waitForFirstConnectionResolve();\n this._waitForFirstConnectionResolve = null;\n }\n }\n\n /**\n * Checks if the socket is connected.\n * @returns {boolean} true if connected.\n */\n isConnected() {\n return this.connected;\n }\n\n /**\n * Checks if the socket is connected.\n * @returns {Promise<void>} Promise resolves if once connected.\n */\n waitForFirstConnection() {\n return this._waitForFirstConnection;\n }\n\n /**\n * Called internally.\n * @private\n */\n _getUserPermissions(cb) {\n if (this.doNotLoadACL) {\n return cb && cb();\n } else {\n this._socket.emit('getUserPermissions', cb);\n }\n }\n\n /**\n * Called internally.\n * @private\n */\n onConnect() {\n this._getUserPermissions((err, acl) => {\n if (err) {\n return this.onError('Cannot read user permissions: ' + err);\n } else\n if (!this.doNotLoadACL) {\n if (this.loaded) {\n return;\n }\n this.loaded = true;\n clearTimeout(this.loadTimer);\n this.loadTimer = null;\n\n this.onProgress(PROGRESS.CONNECTED);\n this.firstConnect = false;\n\n this.acl = acl;\n }\n\n // Read system configuration\n return (this.admin5only && !window.vendorPrefix ? this.getCompactSystemConfig() : this.getSystemConfig())\n .then(data => {\n if (this.doNotLoadACL) {\n if (this.loaded) {\n return undefined;\n }\n this.loaded = true;\n clearTimeout(this.loadTimer);\n this.loadTimer = null;\n\n this.onProgress(PROGRESS.CONNECTED);\n this.firstConnect = false;\n }\n\n this.systemConfig = data;\n if (this.systemConfig && this.systemConfig.common) {\n this.systemLang = this.systemConfig.common.language;\n } else {\n this.systemLang = window.navigator.userLanguage || window.navigator.language;\n\n if (this.systemLang !== 'en' && this.systemLang !== 'de' && this.systemLang !== 'ru') {\n this.systemConfig.common.language = 'en';\n this.systemLang = 'en';\n }\n }\n\n this.props.onLanguage && this.props.onLanguage(this.systemLang);\n\n if (!this.doNotLoadAllObjects) {\n return this.getObjects()\n .then(() => {\n this.onProgress(PROGRESS.READY);\n this.props.onReady && this.props.onReady(this.objects);\n });\n } else {\n this.objects = this.admin5only ? {} : { 'system.config': data };\n this.onProgress(PROGRESS.READY);\n this.props.onReady && this.props.onReady(this.objects);\n }\n return undefined;\n })\n .catch(e => this.onError('Cannot read system config: ' + e));\n });\n }\n\n /**\n * Called internally.\n * @private\n */\n authenticate() {\n if (window.location.search.includes('&href=')) {\n window.location = `${window.location.protocol}//${window.location.host}${window.location.pathname}${window.location.search}${window.location.hash}`;\n } else {\n window.location = `${window.location.protocol}//${window.location.host}${window.location.pathname}?login&href=${window.location.search}${window.location.hash}`;\n }\n }\n\n /**\n * Subscribe to changes of the given state.\n * @param {string} id The ioBroker state ID.\n * @param {ioBroker.StateChangeHandler} cb The callback.\n */\n /**\n * Subscribe to changes of the given state.\n * @param {string} id The ioBroker state ID.\n * @param {boolean} binary Set to true if the given state is binary and requires Base64 decoding.\n * @param {ioBroker.StateChangeHandler} cb The callback.\n */\n subscribeState(id, binary, cb) {\n if (typeof binary === 'function') {\n cb = binary;\n binary = false;\n }\n\n if (!this.statesSubscribes[id]) {\n let reg = id\n .replace(/\\./g, '\\\\.')\n .replace(/\\*/g, '.*')\n .replace(/\\(/g, '\\\\(')\n .replace(/\\)/g, '\\\\)')\n .replace(/\\+/g, '\\\\+')\n .replace(/\\[/g, '\\\\[');\n\n if (reg.indexOf('*') === -1) {\n reg += '$';\n }\n this.statesSubscribes[id] = { reg: new RegExp(reg), cbs: [] };\n this.statesSubscribes[id].cbs.push(cb);\n if (this.connected) {\n this._socket.emit('subscribe', id);\n }\n } else {\n !this.statesSubscribes[id].cbs.includes(cb) && this.statesSubscribes[id].cbs.push(cb);\n }\n if (typeof cb === 'function' && this.connected) {\n if (binary) {\n this.getBinaryState(id)\n .then(base64 => cb(id, base64))\n .catch(e => console.error(`Cannot getForeignStates \"${id}\": ${JSON.stringify(e)}`));\n } else {\n if (Connection.isWeb()) {\n this._socket.emit('getStates', id, (err, states) => {\n err && console.error(`Cannot getForeignStates \"${id}\": ${JSON.stringify(err)}`);\n states && Object.keys(states).forEach(id => cb(id, states[id]));\n });\n } else {\n this._socket.emit('getForeignStates', id, (err, states) => {\n err && console.error(`Cannot getForeignStates \"${id}\": ${JSON.stringify(err)}`);\n states && Object.keys(states).forEach(id => cb(id, states[id]));\n });\n }\n }\n }\n }\n\n /**\n * Unsubscribes all callbacks from changes of the given state.\n * @param {string} id The ioBroker state ID.\n */\n /**\n * Unsubscribes the given callback from changes of the given state.\n * @param {string} id The ioBroker state ID.\n * @param {ioBroker.StateChangeHandler} cb The callback.\n */\n unsubscribeState(id, cb) {\n if (this.statesSubscribes[id]) {\n if (cb) {\n const pos = this.statesSubscribes[id].cbs.indexOf(cb);\n pos !== -1 && this.statesSubscribes[id].cbs.splice(pos, 1);\n } else {\n this.statesSubscribes[id].cbs = [];\n }\n\n if (!this.statesSubscribes[id].cbs || !this.statesSubscribes[id].cbs.length) {\n delete this.statesSubscribes[id];\n this.connected && this._socket.emit('unsubscribe', id);\n }\n }\n }\n\n /**\n * Subscribe to changes of the given object.\n * @param {string} id The ioBroker object ID.\n * @param {import('./types').ObjectChangeHandler} cb The callback.\n * @returns {Promise<void>}\n */\n subscribeObject(id, cb) {\n if (!this.objectsSubscribes[id]) {\n let reg = id.replace(/\\./g, '\\\\.').replace(/\\*/g, '.*');\n if (!reg.includes('*')) {\n reg += '$';\n }\n this.objectsSubscribes[id] = { reg: new RegExp(reg), cbs: [] };\n this.objectsSubscribes[id].cbs.push(cb);\n this.connected && this._socket.emit('subscribeObjects', id);\n } else {\n !this.objectsSubscribes[id].cbs.includes(cb) && this.objectsSubscribes[id].cbs.push(cb);\n }\n return Promise.resolve();\n }\n\n /**\n * Unsubscribes all callbacks from changes of the given object.\n * @param {string} id The ioBroker object ID.\n * @returns {Promise<void>}\n */\n /**\n * Unsubscribes the given callback from changes of the given object.\n * @param {string} id The ioBroker object ID.\n * @param {import('./types').ObjectChangeHandler} cb The callback.\n * @returns {Promise<void>}\n */\n unsubscribeObject(id, cb) {\n if (this.objectsSubscribes[id]) {\n if (cb) {\n const pos = this.objectsSubscribes[id].cbs.indexOf(cb);\n pos !== -1 && this.objectsSubscribes[id].cbs.splice(pos, 1);\n } else {\n this.objectsSubscribes[id].cbs = [];\n }\n\n if (this.connected && (!this.objectsSubscribes[id].cbs || !this.objectsSubscribes[id].cbs.length)) {\n delete this.objectsSubscribes[id];\n this.connected && this._socket.emit('unsubscribeObjects', id);\n }\n }\n return Promise.resolve();\n }\n\n /**\n * Called internally.\n * @private\n * @param {string} id\n * @param {ioBroker.Object | null | undefined} obj\n */\n objectChange(id, obj) {\n // update main.objects cache\n if (!this.objects) {\n return;\n }\n\n /** @type {import(\"./types\").OldObject} */\n let oldObj;\n\n let changed = false;\n if (obj) {\n if (obj._rev && this.objects[id]) {\n this.objects[id]._rev = obj._rev;\n }\n\n if (this.objects[id]) {\n oldObj = { _id: id, type: this.objects[id].type };\n }\n\n if (!this.objects[id] || JSON.stringify(this.objects[id]) !== JSON.stringify(obj)) {\n this.objects[id] = obj;\n changed = true;\n }\n } else if (this.objects[id]) {\n oldObj = { _id: id, type: this.objects[id].type };\n delete this.objects[id];\n changed = true;\n }\n\n Object.keys(this.objectsSubscribes).forEach(_id => {\n if (_id === id || this.objectsSubscribes[_id].reg.test(id)) {\n //@ts-ignore\n this.objectsSubscribes[_id].cbs.forEach(cb => cb(id, obj, oldObj));\n }\n });\n\n if (changed && this.props.onObjectChange) {\n this.props.onObjectChange(id, obj);\n }\n }\n\n /**\n * Called internally.\n * @private\n * @param {string} id\n * @param {ioBroker.State | null | undefined} state\n */\n stateChange(id, state) {\n for (const task in this.statesSubscribes) {\n if (this.statesSubscribes.hasOwnProperty(task) && this.statesSubscribes[task].reg.test(id)) {\n this.statesSubscribes[task].cbs.forEach(cb => cb(id, state));\n }\n }\n }\n\n /**\n * Gets all states.\n * @param {boolean} disableProgressUpdate don't call onProgress() when done\n * @returns {Promise<Record<string, ioBroker.State>>}\n */\n getStates(disableProgressUpdate) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n return new Promise((resolve, reject) =>\n this._socket.emit('getStates', (err, res) => {\n this.states = res;\n //@ts-ignore\n !disableProgressUpdate && this.onProgress(PROGRESS.STATES_LOADED);\n return err ? reject(err) : resolve(this.states);\n }));\n }\n\n /**\n * Gets the given state.\n * @param {string} id The state ID.\n * @returns {Promise<ioBroker.State | null | undefined>}\n */\n getState(id) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n return new Promise((resolve, reject) =>\n this._socket.emit('getState', id, (err, state) => err ? reject(err) : resolve(state)));\n }\n\n /**\n * Gets the given binary state.\n * @param {string} id The state ID.\n * @returns {Promise<Buffer | undefined>}\n */\n getBinaryState(id) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n // the data will come in base64\n return new Promise((resolve, reject) =>\n this._socket.emit('getBinaryState', id, (err, state) => err ? reject(err) : resolve(state)));\n }\n\n /**\n * Sets the given binary state.\n * @param {string} id The state ID.\n * @param {string} base64 The Base64 encoded binary data.\n * @returns {Promise<void>}\n */\n setBinaryState(id, base64) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n // the data will come in base64\n return new Promise((resolve, reject) =>\n this._socket.emit('setBinaryState', id, base64, err => err ? reject(err) : resolve()));\n }\n\n /**\n * Sets the given state value.\n * @param {string} id The state ID.\n * @param {string | number | boolean | ioBroker.State | ioBroker.SettableState | null} val The state value.\n * @param {boolean | null} ack Acknowledge flag\n * @returns {Promise<void>}\n */\n setState(id, val, ack) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n if (typeof ack === 'boolean') {\n val = { val, ack };\n }\n\n return new Promise((resolve, reject) =>\n this._socket.emit('setState', id, val, err =>\n err ? reject(err) : resolve()));\n }\n\n /**\n * Gets all objects.\n * @param {(objects?: Record<string, ioBroker.Object>) => void} update Callback that is executed when all objects are retrieved.\n * @returns {void}\n */\n /**\n * Gets all objects.\n * @param {boolean} update Set to true to retrieve all objects from the server (instead of using the local cache).\n * @param {boolean} disableProgressUpdate don't call onProgress() when done\n * @returns {Promise<Record<string, ioBroker.Object>> | undefined}\n */\n getObjects(update, disableProgressUpdate) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n } else {\n return new Promise((resolve, reject) => {\n if (!update && this.objects) {\n return resolve(this.objects);\n }\n\n this._socket.emit(Connection.isWeb() ? 'getObjects' : 'getAllObjects', (err, res) => {\n this.objects = res;\n disableProgressUpdate && this.onProgress(PROGRESS.OBJECTS_LOADED);\n err ? reject(err) : resolve(this.objects);\n });\n });\n }\n }\n\n /**\n * Called internally.\n * @private\n * @param {boolean} isEnable\n */\n _subscribe(isEnable) {\n if (isEnable && !this.subscribed) {\n this.subscribed = true;\n this.autoSubscribes.forEach(id => this._socket.emit('subscribeObjects', id));\n // re subscribe objects\n Object.keys(this.objectsSubscribes).forEach(id => this._socket.emit('subscribeObjects', id));\n // re-subscribe logs\n this.autoSubscribeLog && this._socket.emit('requireLog', true);\n // re subscribe states\n Object.keys(this.statesSubscribes).forEach(id => this._socket.emit('subscribe', id));\n } else if (!isEnable && this.subscribed) {\n this.subscribed = false;\n // un-subscribe objects\n this.autoSubscribes.forEach(id => this._socket.emit('unsubscribeObjects', id));\n Object.keys(this.objectsSubscribes).forEach(id => this._socket.emit('unsubscribeObjects', id));\n // un-subscribe logs\n this.autoSubscribeLog && this._socket.emit('requireLog', false);\n\n // un-subscribe states\n Object.keys(this.statesSubscribes).forEach(id => this._socket.emit('unsubscribe', id));\n }\n }\n\n /**\n * Requests log updates.\n * @param {boolean} isEnabled Set to true to get logs.\n * @returns {Promise<void>}\n */\n requireLog(isEnabled) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise((resolve, reject) =>\n this._socket.emit('requireLog', isEnabled, err =>\n err ? reject(err) : resolve()));\n }\n\n /**\n * Deletes the given object.\n * @param {string} id The object ID.\n * @param {boolean} maintenance Force deletion of non conform IDs.\n * @returns {Promise<void>}\n */\n delObject(id, maintenance) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise((resolve, reject) =>\n this._socket.emit('delObject', id, { maintenance: !!maintenance }, err =>\n err ? reject(err) : resolve()));\n }\n\n /**\n * Deletes the given object and all its children.\n * @param {string} id The object ID.\n * @param {boolean} maintenance Force deletion of non conform IDs.\n * @returns {Promise<void>}\n */\n delObjects(id, maintenance) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise((resolve, reject) =>\n this._socket.emit('delObjects', id, {maintenance: !!maintenance}, err =>\n err ? reject(err) : resolve()));\n }\n\n /**\n * Sets the object.\n * @param {string} id The object ID.\n * @param {ioBroker.SettableObject} obj The object.\n * @returns {Promise<void>}\n */\n setObject(id, obj) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n if (!obj) {\n return Promise.reject('Null object is not allowed');\n }\n\n obj = JSON.parse(JSON.stringify(obj));\n\n if (obj.hasOwnProperty('from')) {\n delete obj.from;\n }\n if (obj.hasOwnProperty('user')) {\n delete obj.user;\n }\n if (obj.hasOwnProperty('ts')) {\n delete obj.ts;\n }\n\n return new Promise((resolve, reject) =>\n this._socket.emit('setObject', id, obj, err =>\n err ? reject(err) : resolve()));\n }\n\n /**\n * Gets the object with the given id from the server.\n * @param {string} id The object ID.\n * @returns {ioBroker.GetObjectPromise} The object.\n */\n getObject(id) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise((resolve, reject) =>\n this._socket.emit('getObject', id, (err, obj) =>\n err ? reject(err) : resolve(obj)));\n }\n\n /**\n * Get all adapter instances.\n * @param {boolean} [update] Force update.\n * @returns {Promise<ioBroker.Object[]>}\n */\n /**\n * Get all instances of the given adapter.\n * @param {string} adapter The name of the adapter.\n * @param {boolean} [update] Force update.\n * @returns {Promise<ioBroker.Object[]>}\n */\n getAdapterInstances(adapter, update) {\n if (typeof adapter === 'boolean') {\n update = adapter;\n adapter = '';\n }\n adapter = adapter || '';\n\n if (!update && this._promises['instances_' + adapter]) {\n return this._promises['instances_' + adapter];\n }\n\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n this._promises['instances_' + adapter] = new Promise((resolve, reject) => {\n let timeout = setTimeout(() => {\n timeout = null;\n this.getObjectView(\n `system.adapter.${adapter ? adapter + '.' : ''}`,\n `system.adapter.${adapter ? adapter + '.' : ''}\\u9999`,\n 'instance'\n )\n .then(items => resolve(Object.keys(items).map(id => fixAdminUI(items[id]))))\n .catch(e => reject(e));\n }, TIMEOUT_FOR_ADMIN4);\n\n this._socket.emit('getAdapterInstances', adapter, (err, instances) => {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n return err ? reject(err) : resolve(instances);\n }\n });\n });\n\n return this._promises['instances_' + adapter];\n }\n\n /**\n * Get all adapters.\n * @param {boolean} [update] Force update.\n * @returns {Promise<ioBroker.Object[]>}\n */\n /**\n * Get adapters with the given name.\n * @param {string} adapter The name of the adapter.\n * @param {boolean} [update] Force update.\n * @returns {Promise<ioBroker.Object[]>}\n */\n getAdapters(adapter, update) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n\n if (typeof adapter === 'boolean') {\n update = adapter;\n adapter = '';\n }\n\n adapter = adapter || '';\n\n if (!update && this._promises['adapter_' + adapter]) {\n return this._promises['adapter_' + adapter];\n }\n\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n this._promises['adapter_' + adapter] = new Promise((resolve, reject) => {\n let timeout = setTimeout(() => {\n timeout = null;\n this.getObjectView(\n `system.adapter.${adapter}.`,\n `system.adapter.${adapter}.\\u9999`,\n 'adapter'\n )\n .then(items => resolve(Object.keys(items).map(id => fixAdminUI(items[id]))))\n .catch(e => reject(e));\n }, TIMEOUT_FOR_ADMIN4);\n\n this._socket.emit('getAdapters', adapter, (err, adapters) => {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n return err ? reject(err) : resolve(adapters);\n }\n });\n });\n\n return this._promises['adapter_' + adapter];\n }\n\n /**\n * Called internally.\n * @private\n * @param {any[]} objs\n * @param {(err?: any) => void} cb\n */\n _renameGroups(objs, cb) {\n if (!objs || !objs.length) {\n cb && cb();\n } else {\n let obj = objs.pop();\n let oldId = obj._id;\n obj._id = obj.newId;\n delete obj.newId;\n\n this.setObject(obj._id, obj)\n .then(() => this.delObject(oldId))\n .then(() => setTimeout(() => this._renameGroups(objs, cb), 0))\n .catch(err => cb && cb(err));\n }\n }\n\n /**\n * Rename a group.\n * @param {string} id The id.\n * @param {string} newId The new id.\n * @param {string | { [lang in ioBroker.Languages]?: string; }} newName The new name.\n */\n renameGroup(id, newId, newName) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n\n return this.getGroups(true)\n .then(groups => {\n if (groups.length) {\n // find all elements\n const groupsToRename = groups\n .filter(group => group._id.startsWith(id + '.'));\n\n groupsToRename.forEach(group => group.newId = newId + group._id.substring(id.length));\n\n return new Promise((resolve, reject) =>\n this._renameGroups(groupsToRename, err => err ? reject(err) : resolve()))\n .then(() => {\n const obj = groups.find(group => group._id === id);\n\n if (obj) {\n obj._id = newId;\n if (newName !== undefined) {\n obj.common = obj.common || {};\n obj.common.name = newName;\n }\n\n return this.setObject(obj._id, obj)\n .then(() => this.delObject(id));\n }\n });\n }\n });\n }\n\n /**\n * Sends a message to a specific instance or all instances of some specific adapter.\n * @param {string} instance The instance to send this message to.\n * @param {string} [command] Command name of the target instance.\n * @param {ioBroker.MessagePayload} [data] The message data to send.\n * @returns {Promise<ioBroker.Message | undefined>}\n */\n sendTo(instance, command, data) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise(resolve =>\n this._socket.emit('sendTo', instance, command, data, result =>\n resolve(result)));\n }\n\n /**\n * Extend an object and create it if it might not exist.\n * @param {string} id The id.\n * @param {ioBroker.PartialObject} obj The object.\n */\n extendObject(id, obj) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n obj = JSON.parse(JSON.stringify(obj));\n\n if (obj.hasOwnProperty('from')) {\n delete obj.from;\n }\n if (obj.hasOwnProperty('user')) {\n delete obj.user;\n }\n if (obj.hasOwnProperty('ts')) {\n delete obj.ts;\n }\n\n return new Promise((resolve, reject) =>\n this._socket.emit('extendObject', id, obj, err => err ? reject(err) : resolve()));\n }\n\n /**\n * Register a handler for log messages.\n * @param {(message: string) => void} handler The handler.\n */\n registerLogHandler(handler) {\n !this.onLogHandlers.includes(handler) && this.onLogHandlers.push(handler);\n }\n\n /**\n * Unregister a handler for log messages.\n * @param {(message: string) => void} handler The handler.\n */\n unregisterLogHandler(handler) {\n const pos = this.onLogHandlers.indexOf(handler);\n pos !== -1 && this.onLogHandlers.splice(pos, 1);\n }\n\n /**\n * Register a handler for the connection state.\n * @param {(connected: boolean) => void} handler The handler.\n */\n registerConnectionHandler(handler) {\n !this.onConnectionHandlers.includes(handler) && this.onConnectionHandlers.push(handler);\n }\n\n /**\n * Unregister a handler for the connection state.\n * @param {(connected: boolean) => void} handler The handler.\n */\n unregisterConnectionHandler(handler) {\n const pos = this.onConnectionHandlers.indexOf(handler);\n pos !== -1 && this.onConnectionHandlers.splice(pos, 1);\n }\n\n /**\n * Set the handler for standard output of a command.\n * @param {(id: string, text: string) => void} handler The handler.\n */\n registerCmdStdoutHandler(handler) {\n this.onCmdStdoutHandler = handler;\n }\n\n /**\n * Unset the handler for standard output of a command.\n * @param {(id: string, text: string) => void} handler The handler.\n */\n unregisterCmdStdoutHandler(handler) {\n this.onCmdStdoutHandler = null;\n }\n\n /**\n * Set the handler for standard error of a command.\n * @param {(id: string, text: string) => void} handler The handler.\n */\n registerCmdStderrHandler(handler) {\n this.onCmdStderrHandler = handler;\n }\n\n /**\n * Unset the handler for standard error of a command.\n * @param {(id: string, text: string) => void} handler The handler.\n */\n unregisterCmdStderrHandler(handler) {\n this.onCmdStderrHandler = null;\n }\n\n /**\n * Set the handler for exit of a command.\n * @param {(id: string, exitCode: number) => void} handler The handler.\n */\n registerCmdExitHandler(handler) {\n this.onCmdExitHandler = handler;\n }\n\n /**\n * Unset the handler for exit of a command.\n * @param {(id: string, exitCode: number) => void} handler The handler.\n */\n unregisterCmdExitHandler(handler) {\n this.onCmdExitHandler = null;\n }\n\n /**\n * Get all enums with the given name.\n * @param {string} [_enum] The name of the enum\n * @param {boolean} [update] Force update.\n * @returns {Promise<Record<string, ioBroker.Object>>}\n */\n getEnums(_enum, update) {\n if (!update && this._promises['enums_' + (_enum || 'all')]) {\n return this._promises['enums_' + (_enum || 'all')];\n }\n\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n this._promises['enums_' + (_enum || 'all')] = new Promise((resolve, reject) => {\n this._socket.emit('getObjectView', 'system', 'enum', { startkey: 'enum.' + (_enum || ''), endkey: 'enum.' + (_enum ? (_enum + '.') : '') + '\\u9999' }, (err, res) => {\n if (!err && res) {\n const _res = {};\n for (let i = 0; i < res.rows.length; i++) {\n if (_enum && res.rows[i].id === 'enum.' + _enum) {\n continue;\n }\n _res[res.rows[i].id] = res.rows[i].value;\n }\n resolve(_res);\n } else {\n reject(err);\n }\n });\n });\n\n return this._promises['enums_' + (_enum || 'all')];\n }\n\n /**\n * Query a predefined object view.\n * @param {string} start The start ID.\n * @param {string} end The end ID.\n * @param {string} type The type of object.\n * @returns {Promise<Record<string, ioBroker.Object>>}\n */\n getObjectView(start, end, type) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n start = start || '';\n end = end || '\\u9999';\n\n return new Promise((resolve, reject) => {\n this._socket.emit('getObjectView', 'system', type, { startkey: start, endkey: end }, (err, res) => {\n if (!err) {\n const _res = {};\n if (res && res.rows) {\n for (let i = 0; i < res.rows.length; i++) {\n _res[res.rows[i].id] = res.rows[i].value;\n }\n }\n resolve(_res);\n } else {\n reject(err);\n }\n });\n });\n }\n\n /**\n * Get the stored certificates.\n * @param {boolean} [update] Force update.\n * @returns {Promise<{name: string; type: 'public' | 'private' | 'chained'}[]>}\n */\n getCertificates(update) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n\n if (this._promises.cert && !update) {\n return this._promises.cert;\n }\n\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n this._promises.cert = this.getObject('system.certificates')\n .then(res => {\n const certs = [];\n if (res && res.native && res.native.certificates) {\n Object.keys(res.native.certificates).forEach(c => {\n const cert = res.native.certificates[c];\n if (!cert) {\n return;\n }\n const _cert = {\n name: c,\n type: ''\n };\n // If it is filename, it could be everything\n if (cert.length < 700 && (cert.indexOf('/') !== -1 || cert.indexOf('\\\\') !== -1)) {\n if (c.toLowerCase().includes('private')) {\n _cert.type = 'private';\n } else if (cert.toLowerCase().includes('private')) {\n _cert.type = 'private';\n } else if (c.toLowerCase().includes('public')) {\n _cert.type = 'public';\n } else if (cert.toLowerCase().includes('public')) {\n _cert.type = 'public';\n }\n certs.push(_cert);\n } else {\n _cert.type = (cert.substring(0, '-----BEGIN RSA PRIVATE KEY'.length) === '-----BEGIN RSA PRIVATE KEY' || cert.substring(0, '-----BEGIN PRIVATE KEY'.length) === '-----BEGIN PRIVATE KEY') ? 'private' : 'public';\n\n if (_cert.type === 'public') {\n const m = cert.split('-----END CERTIFICATE-----');\n if (m.filter(t => t.replace(/\\r\\n|\\r|\\n/, '').trim()).length > 1) {\n _cert.type = 'chained';\n }\n }\n\n certs.push(_cert);\n }\n });\n }\n return certs;\n });\n\n return this._promises.cert;\n }\n\n /**\n * Get the logs from a host (only for admin connection).\n * @param {string} host\n * @param {number} [linesNumber]\n * @returns {Promise<string[]>}\n */\n getLogs(host, linesNumber) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n return new Promise(resolve =>\n this._socket.emit('sendToHost', host, 'getLogs', linesNumber || 200, lines =>\n resolve(lines)));\n }\n\n /**\n * Get the log files (only for admin connection).\n * @returns {Promise<string[]>}\n */\n getLogsFiles(host) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise((resolve, reject) =>\n this._socket.emit('readLogs', host, (err, files) =>\n err ? reject(err) : resolve(files)));\n }\n\n /**\n * Delete the logs from a host (only for admin connection).\n * @param {string} host\n * @returns {Promise<void>}\n */\n delLogs(host) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise((resolve, reject) =>\n this._socket.emit('sendToHost', host, 'delLogs', null, error =>\n error ? reject(error) : resolve()));\n }\n\n /**\n * Read the meta items.\n * @returns {Promise<ioBroker.Object[]>}\n */\n readMetaItems() {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise((resolve, reject) =>\n this._socket.emit('getObjectView', 'system', 'meta', { startkey: '', endkey: '\\u9999' }, (err, objs) =>\n err ? reject(err) : resolve(objs.rows && objs.rows.map(obj => obj.value))));\n }\n\n /**\n * Read the directory of an adapter.\n * @param {string} adapter The adapter name.\n * @param {string} fileName The directory name.\n * @returns {Promise<ioBroker.ReadDirResult[]>}\n */\n readDir(adapter, fileName) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise((resolve, reject) =>\n this._socket.emit('readDir', adapter, fileName, (err, files) =>\n err ? reject(err) : resolve(files)));\n }\n\n /**\n * Read a file of an adapter.\n * @param {string} adapter The adapter name.\n * @param {string} fileName The file name.\n * @param {boolean} base64 If it must be a base64 format\n * @returns {Promise<string>}\n */\n readFile(adapter, fileName, base64) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise((resolve, reject) => {\n if (!base64) {\n this._socket.emit('readFile', adapter, fileName, (err, data, type) => {\n //@ts-ignore\n err ? reject(err) : resolve({data, type});\n });\n } else {\n this._socket.emit('readFile64', adapter, fileName, base64, (err, data) =>\n err ? reject(err) : resolve(data));\n }\n });\n }\n\n /**\n * Write a file of an adapter.\n * @param {string} adapter The adapter name.\n * @param {string} fileName The file name.\n * @param {Buffer | string} data The data (if it's a Buffer, it will be converted to Base64).\n * @returns {Promise<void>}\n */\n writeFile64(adapter, fileName, data) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise((resolve, reject) => {\n if (typeof data === 'string') {\n this._socket.emit('writeFile', adapter, fileName, data, err =>\n err ? reject(err) : resolve());\n } else {\n const base64 = btoa(\n new Uint8Array(data)\n .reduce((data, byte) => data + String.fromCharCode(byte), '')\n );\n\n this._socket.emit('writeFile64', adapter, fileName, base64, err =>\n err ? reject(err) : resolve());\n }\n });\n }\n\n /**\n * Rename a file or folder of an adapter.\n *\n * All files in folder will be renamed too.\n * @param {string} adapter The adapter name.\n * @param {string} oldName The file name of the file to be renamed.\n * @param {string} newName The new file name.\n * @returns {Promise<void>}\n */\n rename(adapter, oldName, newName) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise((resolve, reject) =>\n this._socket.emit('rename', adapter, oldName, newName, err =>\n err ? reject(err) : resolve()));\n }\n\n /**\n * Delete a file of an adapter.\n * @param {string} adapter The adapter name.\n * @param {string} fileName The file name.\n * @returns {Promise<void>}\n */\n deleteFile(adapter, fileName) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise((resolve, reject) =>\n this._socket.emit('unlink', adapter, fileName, err =>\n err ? reject(err) : resolve()));\n }\n\n /**\n * Delete a folder of an adapter.\n * All files in folder will be deleted.\n * @param {string} adapter The adapter name.\n * @param {string} folderName The folder name.\n * @returns {Promise<void>}\n */\n deleteFolder(adapter, folderName) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise((resolve, reject) =>\n this._socket.emit('deleteFolder', adapter, folderName, err =>\n err ? reject(err) : resolve()));\n }\n\n /**\n * Get the list of all hosts.\n * @param {boolean} [update] Force update.\n * @returns {Promise<ioBroker.Object[]>}\n */\n getHosts(update) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n if (!update && this._promises.hosts) {\n return this._promises.hosts;\n }\n\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n this._promises.hosts = new Promise((resolve, reject) =>\n this._socket.emit(\n 'getObjectView',\n 'system',\n 'host',\n {startkey: 'system.host.', endkey: 'system.host.\\u9999'},\n (err, doc) => {\n if (err) {\n reject(err);\n } else {\n resolve(doc.rows.map(item => item.value));\n }\n }));\n\n return this._promises.hosts;\n }\n\n /**\n * Get the list of all users.\n * @param {boolean} [update] Force update.\n * @returns {Promise<ioBroker.Object[]>}\n */\n getUsers(update) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n if (!update && this._promises.users) {\n return this._promises.users;\n }\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n this._promises.users = new Promise((resolve, reject) =>\n this._socket.emit(\n 'getObjectView',\n 'system',\n 'user',\n {startkey: 'system.user.', endkey: 'system.user.\\u9999'},\n (err, doc) => {\n if (err) {\n reject(err);\n } else {\n resolve(doc.rows.map(item => item.value));\n }\n }));\n\n return this._promises.users;\n }\n\n /**\n * Get the list of all groups.\n * @param {boolean} [update] Force update.\n * @returns {Promise<ioBroker.Object[]>}\n */\n getGroups(update) {\n if (!update && this._promises.groups) {\n return this._promises.groups;\n }\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n this._promises.groups = new Promise((resolve, reject) =>\n this._socket.emit(\n 'getObjectView',\n 'system',\n 'group',\n {startkey: 'system.group.', endkey: 'system.group.\\u9999'},\n (err, doc) => {\n if (err) {\n reject(err);\n } else {\n resolve(doc.rows.map(item => item.value));\n }\n }));\n\n return this._promises.groups;\n }\n\n /**\n * Get the host information.\n * @param {string} host\n * @param {boolean} [update] Force update.\n * @param {number} [timeoutMs] optional read timeout.\n * @returns {Promise<any>}\n */\n getHostInfo(host, update, timeoutMs) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n if (!host.startsWith('system.host.')) {\n host += 'system.host.' + host;\n }\n\n if (!update && this._promises['hostInfo' + host]) {\n return this._promises['hostInfo' + host];\n }\n\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n this._promises['hostInfo' + host] = new Promise((resolve, reject) => {\n let timeout = setTimeout(() => {\n if (timeout) {\n timeout = null;\n reject('getHostInfo timeout');\n }\n }, timeoutMs || this.props.cmdTimeout);\n\n this._socket.emit('sendToHost', host, 'getHostInfo', null, data => {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n if (data === PERMISSION_ERROR) {\n reject('May not read \"getHostInfo\"');\n } else if (!data) {\n reject('Cannot read \"getHostInfo\"');\n } else {\n resolve(data);\n }\n }\n });\n });\n\n return this._promises['hostInfo' + host];\n }\n\n /**\n * Get the host information (short version).\n * @param {string} host\n * @param {boolean} [update] Force update.\n * @param {number} [timeoutMs] optional read timeout.\n * @returns {Promise<any>}\n */\n getHostInfoShort(host, update, timeoutMs) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n if (!host.startsWith('system.host.')) {\n host += 'system.host.' + host;\n }\n\n if (!update && this._promises['hostInfoShort' + host]) {\n return this._promises['hostInfoShort' + host];\n }\n\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n this._promises['hostInfoShort' + host] = new Promise((resolve, reject) => {\n let timeout = setTimeout(() => {\n if (timeout) {\n timeout = null;\n reject('hostInfoShort timeout');\n }\n }, timeoutMs || this.props.cmdTimeout);\n\n this._socket.emit('sendToHost', host, 'getHostInfoShort', null, data => {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n if (data === PERMISSION_ERROR) {\n reject('May not read \"getHostInfoShort\"');\n } else if (!data) {\n reject('Cannot read \"getHostInfoShort\"');\n } else {\n resolve(data);\n }\n }\n });\n });\n\n return this._promises['hostInfoShort' + host];\n }\n\n /**\n * Get the repository.\n * @param {string} host\n * @param {any} [args]\n * @param {boolean} [update] Force update.\n * @param {number} [timeoutMs] timeout in ms.\n * @returns {Promise<any>}\n */\n getRepository(host, args, update, timeoutMs) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n if (!update && this._promises.repo) {\n return this._promises.repo;\n }\n\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n if (!host.startsWith('system.host.')) {\n host += 'system.host.' + host;\n }\n\n this._promises.repo = new Promise((resolve, reject) => {\n let timeout = setTimeout(() => {\n if (timeout) {\n timeout = null;\n reject('getRepository timeout');\n }\n }, timeoutMs || this.props.cmdTimeout);\n\n this._socket.emit('sendToHost', host, 'getRepository', args, data => {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n if (data === PERMISSION_ERROR) {\n reject('May not read \"getRepository\"');\n } else if (!data) {\n reject('Cannot read \"getRepository\"');\n } else {\n resolve(data);\n }\n }\n });\n });\n\n return this._promises.repo;\n }\n\n /**\n * Get the installed.\n * @param {string} host\n * @param {boolean} [update] Force update.\n * @param {number} [cmdTimeout] timeout in ms (optional)\n * @returns {Promise<any>}\n */\n getInstalled(host, update, cmdTimeout) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n\n this._promises.installed = this._promises.installed || {};\n\n if (!update && this._promises.installed[host]) {\n return this._promises.installed[host];\n }\n\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n if (!host.startsWith('system.host.')) {\n host += 'system.host.' + host;\n }\n\n this._promises.installed[host] = new Promise((resolve, reject) => {\n let timeout = setTimeout(() => {\n if (timeout) {\n timeout = null;\n reject('getInstalled timeout');\n }\n }, cmdTimeout || this.props.cmdTimeout);\n\n this._socket.emit('sendToHost', host, 'getInstalled', null, data => {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n if (data === PERMISSION_ERROR) {\n reject('May not read \"getInstalled\"');\n } else if (!data) {\n reject('Cannot read \"getInstalled\"');\n } else {\n resolve(data);\n }\n }\n });\n });\n\n return this._promises.installed[host];\n }\n\n /**\n * Execute a command on a host.\n * @param {string} host The host name.\n * @param {string} cmd The command.\n * @param {string} cmdId The command ID.\n * @param {number} cmdTimeout Timeout of command in ms\n * @returns {Promise<void>}\n */\n cmdExec(host, cmd, cmdId, cmdTimeout) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n if (!host.startsWith(host)) {\n host += 'system.host.' + host;\n }\n\n return new Promise((resolve, reject) => {\n let timeout = cmdTimeout && setTimeout(() => {\n if (timeout) {\n timeout = null;\n reject('cmdExec timeout');\n }\n }, cmdTimeout);\n\n this._socket.emit('cmdExec', host, cmdId, cmd, null, err => {\n if (!cmdTimeout || timeout) {\n timeout && clearTimeout(timeout);\n timeout = null;\n if (err) {\n reject(err);\n } else {\n resolve();\n }\n }\n });\n });\n }\n\n /**\n * Checks if a given feature is supported.\n * @param {string} feature The feature to check.\n * @param {boolean} [update] Force update.\n * @returns {Promise<any>}\n */\n checkFeatureSupported(feature, update) {\n if (!update && this._promises['supportedFeatures_' + feature]) {\n return this._promises['supportedFeatures_' + feature];\n }\n\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n this._promises['supportedFeatures_' + feature] = new Promise((resolve, reject) =>\n this._socket.emit('checkFeatureSupported', feature, (err, features) => {\n err ? reject(err) : resolve(features)\n }));\n\n return this._promises['supportedFeatures_' + feature];\n }\n\n /**\n * Read the base settings of a given host.\n * @param {string} host\n * @returns {Promise<any>}\n */\n readBaseSettings(host) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n return this.checkFeatureSupported('CONTROLLER_READWRITE_BASE_SETTINGS')\n .then(result => {\n if (result) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise((resolve, reject) => {\n let timeout = setTimeout(() => {\n if (timeout) {\n timeout = null;\n reject('readBaseSettings timeout');\n }\n }, this.props.cmdTimeout);\n\n if (host.startsWith('system.host.')) {\n host = host.replace(/^system\\.host\\./, '');\n }\n\n this._socket.emit('sendToHost', host, 'readBaseSettings', null, data => {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n\n if (data === PERMISSION_ERROR) {\n reject('May not read \"BaseSettings\"');\n } else if (!data) {\n reject('Cannot read \"BaseSettings\"');\n } else {\n resolve(data);\n }\n }\n });\n });\n } else {\n return Promise.reject('Not supported');\n }\n });\n }\n\n /**\n * Write the base settings of a given host.\n * @param {string} host\n * @param {any} config\n * @returns {Promise<any>}\n */\n writeBaseSettings(host, config) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n return this.checkFeatureSupported('CONTROLLER_READWRITE_BASE_SETTINGS')\n .then(result => {\n if (result) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise((resolve, reject) => {\n let timeout = setTimeout(() => {\n if (timeout) {\n timeout = null;\n reject('writeBaseSettings timeout');\n }\n }, this.props.cmdTimeout);\n\n this._socket.emit('sendToHost', host, 'writeBaseSettings', config, data => {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n\n if (data === PERMISSION_ERROR) {\n reject('May not write \"BaseSettings\"');\n } else if (!data) {\n reject('Cannot write \"BaseSettings\"');\n } else {\n resolve(data);\n }\n }\n });\n });\n } else {\n return Promise.reject('Not supported');\n }\n })\n }\n\n /**\n * Send command to restart the iobroker on host\n * @param {string} host\n * @returns {Promise<any>}\n */\n restartController(host) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n return new Promise((resolve, reject) => {\n this._socket.emit('sendToHost', host, 'restartController', null, error => {\n error ? reject(error) : resolve(true);\n });\n });\n }\n\n /**\n * Read statistics information from host\n * @param {string} host\n * @param {string} typeOfDiag one of none, normal, no-city, extended\n * @returns {Promise<any>}\n */\n getDiagData(host, typeOfDiag) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n return new Promise(resolve => {\n this._socket.emit('sendToHost', host, 'getDiagData', typeOfDiag, result =>\n resolve(result));\n });\n }\n\n /**\n * Read all states (which might not belong to this adapter) which match the given pattern.\n * @param {string} pattern\n * @returns {ioBroker.GetStatesPromise}\n */\n getForeignStates(pattern) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n if (Connection.isWeb()) {\n return new Promise((resolve, reject) =>\n this._socket.emit('getStates', pattern || '*', (err, states) =>\n err ? reject(err) : resolve(states)));\n } else {\n return new Promise((resolve, reject) =>\n this._socket.emit('getForeignStates', pattern || '*', (err, states) =>\n err ? reject(err) : resolve(states)));\n }\n }\n\n /**\n * Get foreign objects by pattern, by specific type and resolve their enums.\n * @param {string} pattern\n * @param {string} [type]\n * @returns {ioBroker.GetObjectsPromise}\n */\n getForeignObjects(pattern, type) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise((resolve, reject) =>\n this._socket.emit('getForeignObjects', pattern || '*', type, (err, states) =>\n err ? reject(err) : resolve(states)));\n }\n\n /**\n * Gets the system configuration.\n * @param {boolean} [update] Force update.\n * @returns {Promise<ioBroker.OtherObject>}\n */\n getSystemConfig(update) {\n if (!update && this._promises.systemConfig) {\n return this._promises.systemConfig;\n }\n\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n this._promises.systemConfig = this.getObject('system.config')\n .then(systemConfig => {\n //@ts-ignore\n systemConfig = systemConfig || {};\n //@ts-ignore\n systemConfig.common = systemConfig.common || {};\n //@ts-ignore\n systemConfig.native = systemConfig.native || {};\n return systemConfig;\n });\n\n return this._promises.systemConfig;\n }\n\n /**\n * Sets the system configuration.\n * @param {ioBroker.SettableObjectWorker<ioBroker.OtherObject>} obj\n * @returns {Promise<ioBroker.SettableObjectWorker<ioBroker.OtherObject>>}\n */\n setSystemConfig(obj) {\n return this.setObject('system.config', obj)\n .then(() => this._promises.systemConfig = Promise.resolve(obj));\n }\n\n /**\n * Get the raw socket.io socket.\n * @returns {any}\n */\n getRawSocket() {\n return this._socket;\n }\n\n /**\n * Get the history of a given state.\n * @param {string} id\n * @param {ioBroker.GetHistoryOptions} options\n * @returns {Promise<ioBroker.GetHistoryResult>}\n */\n getHistory(id, options) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n return new Promise((resolve, reject) =>\n this._socket.emit('getHistory', id, options, (err, values) =>\n err ? reject(err) : resolve(values)));\n }\n\n /**\n * Get the history of a given state.\n * @param {string} id\n * @param {ioBroker.GetHistoryOptions} options\n * @returns {Promise<{values: ioBroker.GetHistoryResult; sesionId: string; stepIgnore: number}>}\n */\n getHistoryEx(id, options) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n return new Promise((resolve, reject) =>\n this._socket.emit('getHistory', id, options, (err, values, stepIgnore, sessionId) =>\n err ? reject(err) : resolve({ values, sessionId, stepIgnore })));\n }\n\n /**\n * Change the password of the given user.\n * @param {string} user\n * @param {string} password\n * @returns {Promise<void>}\n */\n changePassword(user, password) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n return new Promise((resolve, reject) =>\n this._socket.emit('changePassword', user, password, err =>\n err ? reject(err) : resolve()));\n }\n\n /**\n * Get the IP addresses of the given host.\n * @param {string} host\n * @param {boolean} [update] Force update.\n * @returns {Promise<string[]>}\n */\n getIpAddresses(host, update) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n if (!host.startsWith('system.host.')) {\n host = 'system.host.' + host;\n }\n\n if (!update && this._promises['IPs_' + host]) {\n return this._promises['IPs_' + host];\n }\n this._promises['IPs_' + host] = this.getObject(host)\n .then(obj => obj && obj.common ? obj.common.address || [] : []);\n\n return this._promises['IPs_' + host];\n }\n\n /**\n * Get the IP addresses with interface names of the given host or find host by IP.\n * @param {string} ipOrHostName\n * @param {boolean} [update] Force update.\n * @returns {Promise<any[<name, address, family>]>}\n */\n getHostByIp(ipOrHostName, update) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n if (ipOrHostName.startsWith('system.host.')) {\n ipOrHostName = ipOrHostName.replace(/^system\\.host\\./, '');\n }\n\n if (!update && this._promises['rIPs_' + ipOrHostName]) {\n return this._promises['rIPs_' + ipOrHostName];\n }\n this._promises['rIPs_' + ipOrHostName] = new Promise(resolve =>\n this._socket.emit('getHostByIp', ipOrHostName, (ip, host) => {\n const IPs4 = [{name: '[IPv4] 0.0.0.0 - Listen on all IPs', address: '0.0.0.0', family: 'ipv4'}];\n const IPs6 = [{name: '[IPv6] :: - Listen on all IPs', address: '::', family: 'ipv6'}];\n if (host?.native?.hardware?.networkInterfaces) {\n for (const eth in host.native.hardware.networkInterfaces) {\n if (!host.native.hardware.networkInterfaces.hasOwnProperty(eth)) {\n continue;\n }\n for (let num = 0; num < host.native.hardware.networkInterfaces[eth].length; num++) {\n if (host.native.hardware.networkInterfaces[eth][num].family !== 'IPv6') {\n IPs4.push({name: `[${host.native.hardware.networkInterfaces[eth][num].family}] ${host.native.hardware.networkInterfaces[eth][num].address} - ${eth}`, address: host.native.hardware.networkInterfaces[eth][num].address, family: 'ipv4'});\n } else {\n IPs6.push({name: `[${host.native.hardware.networkInterfaces[eth][num].family}] ${host.native.hardware.networkInterfaces[eth][num].address} - ${eth}`, address: host.native.hardware.networkInterfaces[eth][num].address, family: 'ipv6'});\n }\n }\n }\n }\n for (let i = 0; i < IPs6.length; i++) {\n IPs4.push(IPs6[i]);\n }\n resolve(IPs4);\n }));\n\n return this._promises['rIPs_' + ipOrHostName];\n }\n\n /**\n * Encrypt a text\n * @param {string} text\n * @returns {Promise<string>}\n */\n encrypt(text) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n return new Promise((resolve, reject) =>\n this._socket.emit('encrypt', text, (err, text) =>\n err ? reject(err) : resolve(text)));\n }\n\n /**\n * Decrypt a text\n * @param {string} encryptedText\n * @returns {Promise<string>}\n */\n decrypt(encryptedText) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n return new Promise((resolve, reject) =>\n this._socket.emit('decrypt', encryptedText, (err, text) =>\n err ? reject(err) : resolve(text)));\n }\n\n /**\n * Gets the version.\n * @returns {Promise<{version: string; serverName: string}>}\n */\n getVersion(update) {\n if (update && this._promises.version) {\n this._promises.version = null;\n }\n\n this._promises.version = this._promises.version || new Promise((resolve, reject) =>\n this._socket.emit('getVersion', (err, version, serverName) => {\n // support of old socket.io\n if (err && !version && typeof err === 'string' && err.match(/\\d+\\.\\d+\\.\\d+/)) {\n resolve({ version: err, serverName: 'socketio' });\n } else {\n return err ? reject(err) : resolve({ version, serverName });\n }\n }));\n\n return this._promises.version;\n }\n\n /**\n * Gets the web server name.\n * @returns {Promise<string>}\n */\n getWebServerName() {\n this._promises.webName = this._promises.webName || new Promise((resolve, reject) =>\n this._socket.emit('getAdapterName', (err, name) =>\n err ? reject(err) : resolve(name)));\n\n return this._promises.webName;\n }\n\n /**\n * Gets the admin version.\n * @deprecated use getVersion()\n * @returns {Promise<{version: string; serverName: string}>}\n */\n getAdminVersion() {\n console.log('Deprecated: use getVersion');\n return this.getVersion();\n }\n\n /**\n * Change access rights for file\n * @param {string} [adapter] adapter name\n * @param {string} [filename] file name with full path. it could be like vis.0/*\n * @param {object} [options] like {mode: 0x644}\n * @returns {Promise<{entries: array}>}\n */\n chmodFile(adapter, filename, options) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n return new Promise((resolve, reject) =>\n this._socket.emit('chmodFile', adapter, filename, options, (err, entries, id) =>\n err ? reject(err) : resolve({entries, id})));\n }\n\n /**\n * Change owner or/and owner group for file\n * @param {string} [adapter] adapter name\n * @param {string} [filename] file name with full path. it could be like vis.0/*\n * @param {object} [options] like {owner: 'newOwner', ownerGroup: 'newGroup'}\n * @returns {Promise<{entries: array}>}\n */\n chownFile(adapter, filename, options) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n return new Promise((resolve, reject) =>\n this._socket.emit('chownFile', adapter, filename, options, (err, entries, id) =>\n err ? reject(err) : resolve({entries, id})));\n }\n\n /**\n * Check if the file exists\n * @param {string} [adapter] adapter name\n * @param {string} [filename] file name with full path. it could be like vis.0/*\n * @returns {Promise<boolean>}\n */\n fileExists(adapter, filename) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n return new Promise((resolve, reject) =>\n this._socket.emit('fileExists', adapter, filename, (err, exists) =>\n err ? reject(err) : resolve(exists)));\n }\n\n /**\n * Get the alarm notifications from a host (only for admin connection).\n * @param {string} host\n * @param {string} [category] - optional\n * @returns {Promise<any>}\n */\n getNotifications(host, category) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise(resolve =>\n this._socket.emit('sendToHost', host, 'getNotifications', {category}, notifications =>\n resolve(notifications)));\n }\n\n /**\n * Clear the alarm notifications on a host (only for admin connection).\n * @param {string} host\n * @param {string} [category] - optional\n * @returns {Promise<any>}\n */\n clearNotifications(host, category) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise(resolve =>\n this._socket.emit('sendToHost', host, 'clearNotifications', {category}, notifications =>\n resolve(notifications)));\n }\n\n /**\n * Read if only easy mode is allowed (only for admin connection).\n * @returns {Promise<boolean>}\n */\n getIsEasyModeStrict() {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise((resolve, reject) =>\n this._socket.emit('getIsEasyModeStrict', (error, isStrict) =>\n error ? reject(error) : resolve(isStrict)));\n }\n\n /**\n * Read easy mode configuration (only for admin connection).\n * @returns {Promise<any>}\n */\n getEasyMode() {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise((resolve, reject) =>\n this._socket.emit('getEasyMode', (error, config) =>\n error ? reject(error) : resolve(config)));\n }\n\n /**\n * Read current user\n * @returns {Promise<string>}\n */\n getCurrentUser() {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n return new Promise(resolve =>\n this._socket.emit('authEnabled', (isSecure, user) =>\n resolve(user)));\n }\n\n getCurrentSession(cmdTimeout) {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n return new Promise((resolve, reject) => {\n const controller = new AbortController();\n\n let timeout = setTimeout(() => {\n if (timeout) {\n timeout = null;\n controller.abort();\n reject('getCurrentSession timeout');\n }\n }, cmdTimeout || 5000);\n\n return fetch('./session', { signal: controller.signal })\n .then(res => res.json())\n .then(json => {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n resolve(json);\n }\n })\n .catch(e =>\n reject('getCurrentSession: ' + e));\n });\n }\n\n /**\n * Read adapter ratings\n * @returns {Promise<any>}\n */\n getRatings(update) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n return new Promise((resolve, reject) =>\n this._socket.emit('getRatings', update, (err, ratings) =>\n err ? reject(err) : resolve(ratings)));\n }\n\n /**\n * Read current web, socketio or admin namespace, like admin.0\n * @returns {Promise<string>}\n */\n getCurrentInstance() {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n this._promises.currentInstance = this._promises.currentInstance ||\n new Promise((resolve, reject) =>\n this._socket.emit('getCurrentInstance', (err, namespace) =>\n err ? reject(err) : resolve(namespace)));\n\n return this._promises.currentInstance;\n }\n\n // returns very optimized information for adapters to minimize connection load\n getCompactAdapters(update) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n if (!update && this._promises.compactAdapters) {\n return this._promises.compactAdapters;\n }\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n this._promises.compactAdapters = new Promise((resolve, reject) =>\n this._socket.emit('getCompactAdapters', (err, adapters) =>\n err ? reject(err) : resolve(adapters)));\n\n return this._promises.compactAdapters;\n }\n\n // returns very optimized information for adapters to minimize connection load\n getCompactInstances(update) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n if (!update && this._promises.compactInstances) {\n return this._promises.compactInstances;\n }\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n this._promises.compactInstances = new Promise((resolve, reject) =>\n this._socket.emit('getCompactInstances', (err, instances) =>\n err ? reject(err) : resolve(instances)));\n\n return this._promises.compactInstances;\n }\n\n // returns very optimized information for adapters to minimize connection load\n // reads only version of installed adapter\n getCompactInstalled(host, update, cmdTimeout) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n\n this._promises.installedCompact = this._promises.installedCompact || {};\n\n if (!update && this._promises.installedCompact[host]) {\n return this._promises.installedCompact[host];\n }\n\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n if (!host.startsWith('system.host.')) {\n host += 'system.host.' + host;\n }\n\n this._promises.installedCompact[host] = new Promise((resolve, reject) => {\n let timeout = setTimeout(() => {\n if (timeout) {\n timeout = null;\n reject('getCompactInstalled timeout');\n }\n }, cmdTimeout || this.props.cmdTimeout);\n\n this._socket.emit('getCompactInstalled', host, data => {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n if (data === PERMISSION_ERROR) {\n reject('May not read \"getCompactInstalled\"');\n } else if (!data) {\n reject('Cannot read \"getCompactInstalled\"');\n } else {\n resolve(data);\n }\n }\n });\n });\n\n return this._promises.installedCompact[host];\n }\n\n // returns very optimized information for adapters to minimize connection load\n getCompactSystemConfig(update) {\n if (!update && this._promises.systemConfigCommon) {\n return this._promises.systemConfigCommon;\n }\n\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n this._promises.systemConfigCommon = new Promise((resolve, reject) =>\n this._socket.emit('getCompactSystemConfig', (err, systemConfig) =>\n err ? reject(err) : resolve(systemConfig)));\n\n return this._promises.systemConfigCommon;\n }\n\n /**\n * Get the repository in compact form (only version and icon).\n * @param {string} host\n * @param {boolean} [update] Force update.\n * @param {number} [timeoutMs] timeout in ms.\n * @returns {Promise<any>}\n */\n getCompactRepository(host, update, timeoutMs) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n if (!update && this._promises.repoCompact) {\n return this._promises.repoCompact;\n }\n\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n if (!host.startsWith('system.host.')) {\n host += 'system.host.' + host;\n }\n\n this._promises.repoCompact = new Promise((resolve, reject) => {\n let timeout = setTimeout(() => {\n if (timeout) {\n timeout = null;\n reject('getCompactRepository timeout');\n }\n }, timeoutMs || this.props.cmdTimeout);\n\n this._socket.emit('getCompactRepository', host, data => {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n if (data === PERMISSION_ERROR) {\n reject('May not read \"getCompactRepository\"');\n } else if (!data) {\n reject('Cannot read \"getCompactRepository\"');\n } else {\n resolve(data);\n }\n }\n });\n });\n\n return this._promises.repoCompact;\n }\n\n /**\n * Get the list of all hosts in compact form (only _id, common.name, common.icon, common.color, native.hardware.networkInterfaces)\n * @param {boolean} [update] Force update.\n * @returns {Promise<ioBroker.Object[]>}\n */\n getCompactHosts(update) {\n if (Connection.isWeb()) {\n return Promise.reject('Allowed only in admin');\n }\n if (!update && this._promises.hostsCompact) {\n return this._promises.hostsCompact;\n }\n\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n this._promises.hostsCompact = new Promise((resolve, reject) =>\n this._socket.emit('getCompactHosts', (err, hosts) =>\n err ? reject(err) : resolve(hosts)));\n\n return this._promises.hostsCompact;\n }\n\n /**\n * Get uuid\n * @returns {Promise<ioBroker.Object[]>}\n */\n getUuid() {\n if (this._promises.uuid) {\n return this._promises.uuid;\n }\n\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n this._promises.uuid = this.getObject('system.meta.uuid')\n //@ts-ignore\n .then(obj => obj?.native?.uuid);\n\n return this._promises.uuid;\n }\n\n /**\n * Send log to ioBroker log\n * @param {string} [text] Log text\n * @param {string} [level] `info`, `debug`, `warn`, `error` or `silly`\n * @returns {void}\n */\n log(text, level) {\n text && this._socket.emit('log', text, level || 'debug');\n }\n\n /**\n * Logout current user\n * @returns {Promise<null>}\n */\n logout() {\n if (!this.connected) {\n return Promise.reject(NOT_CONNECTED);\n }\n\n return new Promise((resolve, reject) =>\n this._socket.emit('logout', err =>\n err ? reject(err) : resolve(null)));\n }\n}\n\nConnection.Connection = {\n onLog: PropTypes.func,\n onReady: PropTypes.func,\n onProgress: PropTypes.func,\n};\n\nexport default Connection;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport withStyles from '@mui/styles/withStyles';\n\nimport Button from '@mui/material/Button';\nimport DialogTitle from '@mui/material/DialogTitle';\nimport DialogContent from '@mui/material/DialogContent';\nimport DialogActions from '@mui/material/DialogActions';\nimport Dialog from '@mui/material/Dialog';\n\nimport IconOk from '@mui/icons-material/Check';\nimport IconCancel from '@mui/icons-material/Cancel';\nimport IconClear from '@mui/icons-material/Delete';\n\nimport ComplexCron from '../Components/ComplexCron';\n\nimport I18n from '../i18n';\n\n// Generate cron expression\nconst styles = theme => ({\n headerID: {\n fontWeight: 'bold',\n fontStyle: 'italic'\n },\n radio: {\n display: 'inline-block'\n },\n dialogPaper: {\n height: 'calc(100% - 96px)'\n }\n});\n\nclass DialogComplexCron extends React.Component {\n constructor(props) {\n super(props);\n let cron;\n if (this.props.cron && typeof this.props.cron === 'string' && this.props.cron.replace(/^[\"']/, '')[0] !== '{') {\n cron = this.props.cron.replace(/['\"]/g, '').trim();\n } else {\n cron = this.props.cron || '{}';\n if (typeof cron === 'string') {\n cron = cron.replace(/^[\"']/, '').replace(/[\"']\\n?$/, '');\n }\n }\n\n this.state = {\n cron,\n };\n }\n\n handleCancel() {\n this.props.onClose();\n }\n\n handleOk() {\n this.props.onOk(this.state.cron);\n this.props.onClose();\n }\n\n handleClear() {\n this.props.onOk(false);\n this.props.onClose();\n }\n\n render() {\n return <Dialog\n onClose={() => {}}\n maxWidth=\"md\"\n fullWidth={true}\n classes={{paper: this.props.classes.dialogPaper}}\n open={true}\n aria-labelledby=\"cron-dialog-title\"\n >\n <DialogTitle id=\"cron-dialog-title\">{this.props.title || I18n.t('ra_Define schedule...')}</DialogTitle>\n <DialogContent style={{height: '100%', overflow: 'hidden'}}>\n <ComplexCron\n cronExpression={this.state.cron}\n onChange={cron => this.setState({cron})}\n language={I18n.getLanguage()}\n />\n </DialogContent>\n <DialogActions>\n {!!this.props.clearButton && <Button color=\"grey\" variant=\"contained\" onClick={() => this.handleClear()} startIcon={<IconClear />}>{this.props.clear || I18n.t('ra_Clear')}</Button>}\n <Button variant=\"contained\" onClick={() => this.handleOk()} color=\"primary\" startIcon={<IconOk />}>{this.props.ok || I18n.t('ra_Ok')}</Button>\n <Button color=\"grey\" variant=\"contained\" onClick={() => this.handleCancel()} startIcon={<IconCancel />}>{this.props.cancel || I18n.t('ra_Cancel')}</Button>\n </DialogActions>\n </Dialog>;\n }\n}\n\nDialogComplexCron.propTypes = {\n classes: PropTypes.object,\n onClose: PropTypes.func.isRequired,\n onOk: PropTypes.func.isRequired,\n title: PropTypes.string,\n cron: PropTypes.string,\n cancel: PropTypes.string,\n ok: PropTypes.string,\n simple: PropTypes.bool,\n language: PropTypes.string,\n clearButton: PropTypes.bool,\n};\n\nexport default withStyles(styles)(DialogComplexCron);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport withStyles from '@mui/styles/withStyles';\nimport Button from '@mui/material/Button';\nimport DialogTitle from '@mui/material/DialogTitle';\nimport DialogContent from '@mui/material/DialogContent';\nimport DialogActions from '@mui/material/DialogActions';\nimport Dialog from '@mui/material/Dialog';\n\nimport IconOk from '@mui/icons-material/Check';\nimport IconCancel from '@mui/icons-material/Cancel';\n\nimport SimpleCron from '../Components/SimpleCron';\n\nimport I18n from '../i18n';\n\n// Generate cron expression\n\nconst styles = theme => ({\n headerID: {\n fontWeight: 'bold',\n fontStyle: 'italic'\n },\n radio: {\n display: 'inline-block'\n },\n dialogPaper: {\n height: 'calc(100% - 96px)'\n },\n});\n\nclass DialogSimpleCron extends React.Component {\n constructor(props) {\n super(props);\n\n let cron;\n if (this.props.cron && typeof this.props.cron === 'string' && this.props.cron.replace(/^[\"']/, '')[0] !== '{') {\n cron = this.props.cron.replace(/['\"]/g, '').trim();\n } else {\n cron = this.props.cron || '{}';\n if (typeof cron === 'string') {\n cron = cron.replace(/^[\"']/, '').replace(/[\"']\\n?$/, '');\n }\n }\n\n this.state = {\n cron,\n };\n }\n\n handleCancel() {\n this.props.onClose();\n }\n\n handleOk() {\n this.props.onOk(this.state.cron);\n this.props.onClose();\n }\n\n render() {\n return <Dialog\n onClose={() => {}}\n maxWidth=\"md\"\n fullWidth={true}\n classes={{paper: this.props.classes.dialogPaper}}\n open={true}\n aria-labelledby=\"cron-dialog-title\"\n >\n <DialogTitle id=\"cron-dialog-title\">{this.props.title || I18n.t('ra_Define CRON...')}</DialogTitle>\n <DialogContent style={{height: '100%', overflow: 'hidden'}}>\n <SimpleCron\n cronExpression={this.state.cron}\n onChange={cron => this.setState({cron})}\n language={I18n.getLanguage()}\n />\n </DialogContent>\n <DialogActions>\n <Button variant=\"contained\" onClick={() => this.handleOk()} color=\"primary\" startIcon={<IconOk />}>{this.props.ok || I18n.t('ra_Ok')}</Button>\n <Button variant=\"contained\" onClick={() => this.handleCancel()} color=\"grey\" startIcon={<IconCancel />}>{this.props.cancel || I18n.t('ra_Cancel')}</Button>\n </DialogActions>\n </Dialog>;\n }\n}\n\nDialogSimpleCron.propTypes = {\n classes: PropTypes.object,\n onClose: PropTypes.func.isRequired,\n onOk: PropTypes.func.isRequired,\n title: PropTypes.string,\n cron: PropTypes.string,\n cancel: PropTypes.string,\n ok: PropTypes.string,\n simple: PropTypes.bool,\n language: PropTypes.string\n\n};\n\nexport default withStyles(styles)(DialogSimpleCron);\n","\n/**\n * Print the ioBroker welcome screen to the developer console.\n */\nfunction printPrompt() {\n const prompt = `\n██╗ ██████╗ ██████╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗ \n██║██╔═══██╗██╔══██╗██╔══██╗██╔═══██╗██║ ██╔╝██╔════╝██╔══██╗\n██║██║ ██║██████╔╝██████╔╝██║ ██║█████╔╝ █████╗ ██████╔╝\n██║██║ ██║██╔══██╗██╔══██╗██║ ██║██╔═██╗ ██╔══╝ ██╔══██╗\n██║╚██████╔╝██████╔╝██║ ██║╚██████╔╝██║ ██╗███████╗██║ ██║\n╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝\n`;\n\n console.log(prompt);\n console.log('Nice to see you here! :) Join our dev community here https://github.com/ioBroker/ioBroker or here https://github.com/iobroker-community-adapters');\n console.log('Help us to create open source project with reactJS!');\n console.log('See you :)');\n}\n\nexport default printPrompt;","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst IconFx = props => {\n return <svg onClick={e => props.onClick && props.onClick(e)} style={props.style || {}} viewBox=\"0 0 95 95\" width={props.width || 20} height={props.height || props.width || 20} xmlns=\"http://www.w3.org/2000/svg\" className={ props.className }>\n <path fill=\"currentColor\" d=\"M93.779,63.676c-0.981-1.082-2.24-1.653-3.639-1.653c-1.145,0-3.953,0.396-5.318,4.062\n\t\tc-0.344,0.922-0.443,1.413-0.907,1.363c-0.786-0.078-3.845-3.346-4.845-8.145l-2.482-11.6c1.961-3.177,3.977-5.629,5.988-7.292\n\t\tc1.08-0.882,2.314-1.349,3.808-1.43c3.815-0.26,5.203-0.74,6.14-1.399c1.547-1.115,2.397-2.728,2.397-4.542\n\t\tc0-1.596-0.604-3.019-1.75-4.115c-1.106-1.059-2.581-1.618-4.26-1.618c-2.468,0-5.239,1.142-8.474,3.49\n\t\tc-1.91,1.388-3.935,3.406-6.121,6.111c-0.711-2.653-1.319-3.889-1.771-4.628c-1.396-2.303-3.664-2.303-4.41-2.303l-0.813,0.013\n\t\tl-23.045,0.544l1.297-5.506c0.828-3.593,1.915-6.436,3.226-8.45c0.638-0.98,1.614-2.148,2.638-2.148\n\t\tc0.387,0,1.152,0.063,2.582,0.36c3.978,0.86,5.465,0.959,6.239,0.959c1.708,0,3.21-0.571,4.347-1.651\n\t\tc1.176-1.119,1.797-2.583,1.797-4.233c0-1.29-0.424-3.156-2.445-4.722c-1.396-1.081-3.311-1.629-5.691-1.629\n\t\tc-3.568,0-7.349,1.141-11.241,3.39c-3.862,2.232-7.038,5.317-9.438,9.171c-2.105,3.379-3.929,8.124-5.555,14.459H21.877\n\t\tl-2.238,8.831h10.186l-7.74,31.116c-1.603,6.443-2.777,8.028-3.098,8.361c-0.875,0.904-2.68,1.094-4.04,1.094\n\t\tc-1.683,0-3.477-0.121-5.349-0.361c-1.286-0.157-2.265-0.234-2.991-0.234c-1.878,0-3.423,0.488-4.59,1.448\n\t\tC0.716,81.858,0,83.403,0,85.14c0,1.357,0.44,3.309,2.539,4.895c1.434,1.08,3.389,1.628,5.813,1.628\n\t\tc6.069,0,11.725-2.411,16.813-7.165c4.947-4.624,8.571-11.413,10.773-20.195l6.119-24.935l20.87,0.354l2.244,9.64l-4.573,6.748\n\t\tc-0.824,1.209-2.051,2.701-3.658,4.441c-0.84,0.92-1.398,1.426-1.721,1.689c-1.316-1.608-2.809-2.424-4.432-2.424\n\t\tc-1.525,0-2.91,0.625-4.002,1.804c-1.036,1.116-1.583,2.514-1.583,4.038c0,1.83,0.783,3.459,2.264,4.709\n\t\tc1.357,1.146,3.034,1.728,4.981,1.728c2.414,0,4.884-0.921,7.344-2.737c2.053-1.519,4.697-4.526,8.074-9.189\n\t\tc2.17,6.24,5.248,10.252,6.714,11.927c2.313,2.644,6.049,4.22,9.993,4.22c3.348,0,5.244-1.402,6.916-2.641l0.148-0.109\n\t\tc2.926-2.164,3.54-4.545,3.54-6.166C95.174,65.965,94.691,64.679,93.779,63.676z\"/>\n </svg>;\n}\n\nIconFx.propTypes = {\n onClick: PropTypes.func,\n width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n className: PropTypes.string\n};\n\nexport default IconFx;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _jsxRuntime = require(\"react/jsx-runtime\");\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"m20.71 5.63-2.34-2.34a.9959.9959 0 0 0-1.41 0l-3.12 3.12-1.93-1.91-1.41 1.41 1.42 1.42L3 16.25V21h4.75l8.92-8.92 1.42 1.42 1.41-1.41-1.92-1.92 3.12-3.12c.4-.4.4-1.03.01-1.42zM6.92 19 5 17.08l8.06-8.06 1.92 1.92L6.92 19z\"\n}), 'Colorize');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _jsxRuntime = require(\"react/jsx-runtime\");\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M16 13h-3V3h-2v10H8l4 4 4-4zM4 19v2h16v-2H4z\"\n}), 'VerticalAlignBottom');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _jsxRuntime = require(\"react/jsx-runtime\");\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M8 11h3v10h2V11h3l-4-4-4 4zM4 3v2h16V3H4z\"\n}), 'VerticalAlignTop');\n\nexports.default = _default;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"animation\", \"className\", \"component\", \"height\", \"style\", \"variant\", \"width\"];\n\nlet _ = t => t,\n _t,\n _t2,\n _t3,\n _t4;\n\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport PropTypes from 'prop-types';\nimport { keyframes, css } from '@mui/system';\nimport { unstable_composeClasses as composeClasses } from '@mui/base';\nimport { alpha, unstable_getUnit as getUnit, unstable_toUnitless as toUnitless } from '../styles';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport { getSkeletonUtilityClass } from './skeletonClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n variant,\n animation,\n hasChildren,\n width,\n height\n } = ownerState;\n const slots = {\n root: ['root', variant, animation, hasChildren && 'withChildren', hasChildren && !width && 'fitContent', hasChildren && !height && 'heightAuto']\n };\n return composeClasses(slots, getSkeletonUtilityClass, classes);\n};\n\nconst pulseKeyframe = keyframes(_t || (_t = _`\n 0% {\n opacity: 1;\n }\n\n 50% {\n opacity: 0.4;\n }\n\n 100% {\n opacity: 1;\n }\n`));\nconst waveKeyframe = keyframes(_t2 || (_t2 = _`\n 0% {\n transform: translateX(-100%);\n }\n\n 50% {\n /* +0.5s of delay between each loop */\n transform: translateX(100%);\n }\n\n 100% {\n transform: translateX(100%);\n }\n`));\nconst SkeletonRoot = styled('span', {\n name: 'MuiSkeleton',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[ownerState.variant], ownerState.animation !== false && styles[ownerState.animation], ownerState.hasChildren && styles.withChildren, ownerState.hasChildren && !ownerState.width && styles.fitContent, ownerState.hasChildren && !ownerState.height && styles.heightAuto];\n }\n})(({\n theme,\n ownerState\n}) => {\n const radiusUnit = getUnit(theme.shape.borderRadius) || 'px';\n const radiusValue = toUnitless(theme.shape.borderRadius);\n return _extends({\n display: 'block',\n // Create a \"on paper\" color with sufficient contrast retaining the color\n backgroundColor: theme.vars ? theme.vars.palette.Skeleton.bg : alpha(theme.palette.text.primary, theme.palette.mode === 'light' ? 0.11 : 0.13),\n height: '1.2em'\n }, ownerState.variant === 'text' && {\n marginTop: 0,\n marginBottom: 0,\n height: 'auto',\n transformOrigin: '0 55%',\n transform: 'scale(1, 0.60)',\n borderRadius: `${radiusValue}${radiusUnit}/${Math.round(radiusValue / 0.6 * 10) / 10}${radiusUnit}`,\n '&:empty:before': {\n content: '\"\\\\00a0\"'\n }\n }, ownerState.variant === 'circular' && {\n borderRadius: '50%'\n }, ownerState.variant === 'rounded' && {\n borderRadius: (theme.vars || theme).shape.borderRadius\n }, ownerState.hasChildren && {\n '& > *': {\n visibility: 'hidden'\n }\n }, ownerState.hasChildren && !ownerState.width && {\n maxWidth: 'fit-content'\n }, ownerState.hasChildren && !ownerState.height && {\n height: 'auto'\n });\n}, ({\n ownerState\n}) => ownerState.animation === 'pulse' && css(_t3 || (_t3 = _`\n animation: ${0} 1.5s ease-in-out 0.5s infinite;\n `), pulseKeyframe), ({\n ownerState,\n theme\n}) => ownerState.animation === 'wave' && css(_t4 || (_t4 = _`\n position: relative;\n overflow: hidden;\n\n /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */\n -webkit-mask-image: -webkit-radial-gradient(white, black);\n\n &::after {\n animation: ${0} 1.6s linear 0.5s infinite;\n background: linear-gradient(\n 90deg,\n transparent,\n ${0},\n transparent\n );\n content: '';\n position: absolute;\n transform: translateX(-100%); /* Avoid flash during server-side hydration */\n bottom: 0;\n left: 0;\n right: 0;\n top: 0;\n }\n `), waveKeyframe, (theme.vars || theme).palette.action.hover));\nconst Skeleton = /*#__PURE__*/React.forwardRef(function Skeleton(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiSkeleton'\n });\n\n const {\n animation = 'pulse',\n className,\n component = 'span',\n height,\n style,\n variant = 'text',\n width\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n animation,\n component,\n variant,\n hasChildren: Boolean(other.children)\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(SkeletonRoot, _extends({\n as: component,\n ref: ref,\n className: clsx(classes.root, className),\n ownerState: ownerState\n }, other, {\n style: _extends({\n width,\n height\n }, style)\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Skeleton.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The animation.\n * If `false` the animation effect is disabled.\n * @default 'pulse'\n */\n animation: PropTypes.oneOf(['pulse', 'wave', false]),\n\n /**\n * Optional children to infer width and height from.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n\n /**\n * Height of the skeleton.\n * Useful when you don't want to adapt the skeleton to a text element but for instance a card.\n */\n height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * @ignore\n */\n style: PropTypes.object,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n\n /**\n * The type of content that will be rendered.\n * @default 'text'\n */\n variant: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['circular', 'rectangular', 'rounded', 'text']), PropTypes.string]),\n\n /**\n * Width of the skeleton.\n * Useful when the skeleton is inside an inline element with no width of its own.\n */\n width: PropTypes.oneOfType([PropTypes.number, PropTypes.string])\n} : void 0;\nexport default Skeleton;","import { generateUtilityClass, generateUtilityClasses } from '@mui/base';\nexport function getSkeletonUtilityClass(slot) {\n return generateUtilityClass('MuiSkeleton', slot);\n}\nconst skeletonClasses = generateUtilityClasses('MuiSkeleton', ['root', 'text', 'rectangular', 'rounded', 'circular', 'pulse', 'wave', 'withChildren', 'fitContent', 'heightAuto']);\nexport default skeletonClasses;","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z\"\n}), 'ArrowDownward');","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"active\", \"children\", \"className\", \"direction\", \"hideSortIcon\", \"IconComponent\"];\nimport { unstable_composeClasses as composeClasses } from '@mui/base';\nimport clsx from 'clsx';\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\nimport ButtonBase from '../ButtonBase';\nimport ArrowDownwardIcon from '../internal/svg-icons/ArrowDownward';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport capitalize from '../utils/capitalize';\nimport tableSortLabelClasses, { getTableSortLabelUtilityClass } from './tableSortLabelClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n direction,\n active\n } = ownerState;\n const slots = {\n root: ['root', active && 'active'],\n icon: ['icon', `iconDirection${capitalize(direction)}`]\n };\n return composeClasses(slots, getTableSortLabelUtilityClass, classes);\n};\n\nconst TableSortLabelRoot = styled(ButtonBase, {\n name: 'MuiTableSortLabel',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.active && styles.active];\n }\n})(({\n theme\n}) => ({\n cursor: 'pointer',\n display: 'inline-flex',\n justifyContent: 'flex-start',\n flexDirection: 'inherit',\n alignItems: 'center',\n '&:focus': {\n color: (theme.vars || theme).palette.text.secondary\n },\n '&:hover': {\n color: (theme.vars || theme).palette.text.secondary,\n [`& .${tableSortLabelClasses.icon}`]: {\n opacity: 0.5\n }\n },\n [`&.${tableSortLabelClasses.active}`]: {\n color: (theme.vars || theme).palette.text.primary,\n [`& .${tableSortLabelClasses.icon}`]: {\n opacity: 1,\n color: (theme.vars || theme).palette.text.secondary\n }\n }\n}));\nconst TableSortLabelIcon = styled('span', {\n name: 'MuiTableSortLabel',\n slot: 'Icon',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.icon, styles[`iconDirection${capitalize(ownerState.direction)}`]];\n }\n})(({\n theme,\n ownerState\n}) => _extends({\n fontSize: 18,\n marginRight: 4,\n marginLeft: 4,\n opacity: 0,\n transition: theme.transitions.create(['opacity', 'transform'], {\n duration: theme.transitions.duration.shorter\n }),\n userSelect: 'none'\n}, ownerState.direction === 'desc' && {\n transform: 'rotate(0deg)'\n}, ownerState.direction === 'asc' && {\n transform: 'rotate(180deg)'\n}));\n/**\n * A button based label for placing inside `TableCell` for column sorting.\n */\n\nconst TableSortLabel = /*#__PURE__*/React.forwardRef(function TableSortLabel(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiTableSortLabel'\n });\n\n const {\n active = false,\n children,\n className,\n direction = 'asc',\n hideSortIcon = false,\n IconComponent = ArrowDownwardIcon\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n active,\n direction,\n hideSortIcon,\n IconComponent\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsxs(TableSortLabelRoot, _extends({\n className: clsx(classes.root, className),\n component: \"span\",\n disableRipple: true,\n ownerState: ownerState,\n ref: ref\n }, other, {\n children: [children, hideSortIcon && !active ? null : /*#__PURE__*/_jsx(TableSortLabelIcon, {\n as: IconComponent,\n className: clsx(classes.icon),\n ownerState: ownerState\n })]\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? TableSortLabel.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, the label will have the active styling (should be true for the sorted column).\n * @default false\n */\n active: PropTypes.bool,\n\n /**\n * Label contents, the arrow will be appended automatically.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The current sort direction.\n * @default 'asc'\n */\n direction: PropTypes.oneOf(['asc', 'desc']),\n\n /**\n * Hide sort icon when active is false.\n * @default false\n */\n hideSortIcon: PropTypes.bool,\n\n /**\n * Sort icon to use.\n * @default ArrowDownwardIcon\n */\n IconComponent: PropTypes.elementType,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default TableSortLabel;","import { generateUtilityClass, generateUtilityClasses } from '@mui/base';\nexport function getTableSortLabelUtilityClass(slot) {\n return generateUtilityClass('MuiTableSortLabel', slot);\n}\nconst tableSortLabelClasses = generateUtilityClasses('MuiTableSortLabel', ['root', 'active', 'icon', 'iconDirectionDesc', 'iconDirectionAsc']);\nexport default tableSortLabelClasses;","import { generateUtilityClass, generateUtilityClasses } from '@mui/material';\nexport const getCalendarPickerSkeletonUtilityClass = slot => generateUtilityClass('MuiCalendarPickerSkeleton', slot);\nexport const calendarPickerSkeletonClasses = generateUtilityClasses('MuiCalendarPickerSkeleton', ['root', 'week', 'daySkeleton']);","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"className\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport Skeleton from '@mui/material/Skeleton';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport { unstable_composeClasses as composeClasses } from '@mui/material';\nimport { DAY_SIZE, DAY_MARGIN } from '../internals/constants/dimensions';\nimport { getCalendarPickerSkeletonUtilityClass } from './calendarPickerSkeletonClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n week: ['week'],\n daySkeleton: ['daySkeleton']\n };\n return composeClasses(slots, getCalendarPickerSkeletonUtilityClass, classes);\n};\n\nconst CalendarPickerSkeletonRoot = styled('div', {\n name: 'MuiCalendarPickerSkeleton',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({\n alignSelf: 'start'\n});\nconst CalendarPickerSkeletonWeek = styled('div', {\n name: 'MuiCalendarPickerSkeleton',\n slot: 'Week',\n overridesResolver: (props, styles) => styles.week\n})({\n margin: `${DAY_MARGIN}px 0`,\n display: 'flex',\n justifyContent: 'center'\n});\nconst CalendarPickerSkeletonDay = styled(Skeleton, {\n name: 'MuiCalendarPickerSkeleton',\n slot: 'Day',\n overridesResolver: (props, styles) => styles.daySkeleton\n})(({\n ownerState\n}) => _extends({\n margin: `0 ${DAY_MARGIN}px`\n}, ownerState.day === 0 && {\n visibility: 'hidden'\n}));\nCalendarPickerSkeletonDay.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n ownerState: PropTypes.shape({\n day: PropTypes.number.isRequired\n }).isRequired\n};\nconst monthMap = [[0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0, 0]];\n/**\n *\n * Demos:\n *\n * - [Date Picker](https://mui.com/x/react-date-pickers/date-picker/)\n *\n * API:\n *\n * - [CalendarPickerSkeleton API](https://mui.com/x/api/date-pickers/calendar-picker-skeleton/)\n */\n\nfunction CalendarPickerSkeleton(props) {\n const _useThemeProps = useThemeProps({\n props,\n name: 'MuiCalendarPickerSkeleton'\n }),\n {\n className\n } = _useThemeProps,\n other = _objectWithoutPropertiesLoose(_useThemeProps, _excluded);\n\n const classes = useUtilityClasses(props);\n return /*#__PURE__*/_jsx(CalendarPickerSkeletonRoot, _extends({\n className: clsx(classes.root, className)\n }, other, {\n children: monthMap.map((week, index) => /*#__PURE__*/_jsx(CalendarPickerSkeletonWeek, {\n className: classes.week,\n children: week.map((day, index2) => /*#__PURE__*/_jsx(CalendarPickerSkeletonDay, {\n variant: \"circular\",\n width: DAY_SIZE,\n height: DAY_SIZE,\n className: classes.daySkeleton,\n ownerState: {\n day\n }\n }, index2))\n }, index))\n }));\n}\n\nprocess.env.NODE_ENV !== \"production\" ? CalendarPickerSkeleton.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport { CalendarPickerSkeleton };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { useThemeProps } from '@mui/material/styles';\nimport { useDefaultDates, useUtils } from '../internals/hooks/useUtils';\nimport { parsePickerInputValue } from '../internals/utils/date-utils';\nexport function useDateTimePickerDefaultizedProps(props, name) {\n var _themeProps$ampm, _ref, _themeProps$minDateTi, _ref2, _themeProps$maxDateTi, _themeProps$minDateTi2, _themeProps$maxDateTi2;\n\n // This is technically unsound if the type parameters appear in optional props.\n // Optional props can be filled by `useThemeProps` with types that don't match the type parameters.\n const themeProps = useThemeProps({\n props,\n name\n });\n const utils = useUtils();\n const defaultDates = useDefaultDates();\n const ampm = (_themeProps$ampm = themeProps.ampm) != null ? _themeProps$ampm : utils.is12HourCycleInCurrentLocale();\n\n if (themeProps.orientation != null && themeProps.orientation !== 'portrait') {\n throw new Error('We are not supporting custom orientation for DateTimePicker yet :(');\n }\n\n return _extends({\n ampm,\n orientation: 'portrait',\n openTo: 'day',\n views: ['year', 'day', 'hours', 'minutes'],\n ampmInClock: true,\n acceptRegex: ampm ? /[\\dap]/gi : /\\d/gi,\n disableMaskedInput: false,\n inputFormat: ampm ? utils.formats.keyboardDateTime12h : utils.formats.keyboardDateTime24h,\n disableIgnoringDatePartForTimeValidation: Boolean(themeProps.minDateTime || themeProps.maxDateTime)\n }, themeProps, {\n minDate: (_ref = (_themeProps$minDateTi = themeProps.minDateTime) != null ? _themeProps$minDateTi : themeProps.minDate) != null ? _ref : defaultDates.minDate,\n maxDate: (_ref2 = (_themeProps$maxDateTi = themeProps.maxDateTime) != null ? _themeProps$maxDateTi : themeProps.maxDate) != null ? _ref2 : defaultDates.maxDate,\n minTime: (_themeProps$minDateTi2 = themeProps.minDateTime) != null ? _themeProps$minDateTi2 : themeProps.minTime,\n maxTime: (_themeProps$maxDateTi2 = themeProps.maxDateTime) != null ? _themeProps$maxDateTi2 : themeProps.maxTime\n });\n}\nexport const dateTimePickerValueManager = {\n emptyValue: null,\n getTodayValue: utils => utils.date(),\n parseInput: parsePickerInputValue,\n areValuesEqual: (utils, a, b) => utils.isEqual(a, b)\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport Tab from '@mui/material/Tab';\nimport Tabs, { tabsClasses } from '@mui/material/Tabs';\nimport { styled } from '@mui/material/styles';\nimport { Time, DateRange } from '../internals/components/icons';\nimport { WrapperVariantContext } from '../internals/components/wrappers/WrapperVariantContext';\nimport { useLocaleText } from '../internals/hooks/useUtils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n\nconst viewToTab = openView => {\n if (['day', 'month', 'year'].includes(openView)) {\n return 'date';\n }\n\n return 'time';\n};\n\nconst tabToView = tab => {\n if (tab === 'date') {\n return 'day';\n }\n\n return 'hours';\n};\n\nconst DateTimePickerTabsRoot = styled(Tabs)(({\n ownerState,\n theme\n}) => _extends({\n boxShadow: `0 -1px 0 0 inset ${theme.palette.divider}`\n}, ownerState.wrapperVariant === 'desktop' && {\n order: 1,\n boxShadow: `0 1px 0 0 inset ${theme.palette.divider}`,\n [`& .${tabsClasses.indicator}`]: {\n bottom: 'auto',\n top: 0\n }\n}));\n/**\n * @ignore - internal component.\n */\n\nexport const DateTimePickerTabs = props => {\n const {\n dateRangeIcon = /*#__PURE__*/_jsx(DateRange, {}),\n onChange,\n timeIcon = /*#__PURE__*/_jsx(Time, {}),\n view\n } = props;\n const localeText = useLocaleText();\n const wrapperVariant = React.useContext(WrapperVariantContext);\n\n const ownerState = _extends({}, props, {\n wrapperVariant\n });\n\n const handleChange = (event, value) => {\n onChange(tabToView(value));\n };\n\n return /*#__PURE__*/_jsxs(DateTimePickerTabsRoot, {\n ownerState: ownerState,\n variant: \"fullWidth\",\n value: viewToTab(view),\n onChange: handleChange,\n children: [/*#__PURE__*/_jsx(Tab, {\n value: \"date\",\n \"aria-label\": localeText.dateTableLabel,\n icon: /*#__PURE__*/_jsx(React.Fragment, {\n children: dateRangeIcon\n })\n }), /*#__PURE__*/_jsx(Tab, {\n value: \"time\",\n \"aria-label\": localeText.timeTableLabel,\n icon: /*#__PURE__*/_jsx(React.Fragment, {\n children: timeIcon\n })\n })]\n });\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"ampm\", \"parsedValue\", \"dateRangeIcon\", \"hideTabs\", \"isMobileKeyboardViewOpen\", \"onChange\", \"openView\", \"setOpenView\", \"timeIcon\", \"toggleMobileKeyboardView\", \"toolbarFormat\", \"toolbarPlaceholder\", \"toolbarTitle\", \"views\"];\nimport * as React from 'react';\nimport { styled } from '@mui/material/styles';\nimport { generateUtilityClasses } from '@mui/material';\nimport { PickersToolbarText } from '../internals/components/PickersToolbarText';\nimport { PickersToolbar, pickersToolbarClasses } from '../internals/components/PickersToolbar';\nimport { PickersToolbarButton } from '../internals/components/PickersToolbarButton';\nimport { DateTimePickerTabs } from './DateTimePickerTabs';\nimport { useUtils } from '../internals/hooks/useUtils';\nimport { WrapperVariantContext } from '../internals/components/wrappers/WrapperVariantContext';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const dateTimePickerToolbarClasses = generateUtilityClasses('MuiDateTimePickerToolbar', ['root', 'dateContainer', 'timeContainer', 'separator']);\nconst DateTimePickerToolbarRoot = styled(PickersToolbar, {\n name: 'MuiDateTimePickerToolbar',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({\n paddingLeft: 16,\n paddingRight: 16,\n justifyContent: 'space-around',\n [`& .${pickersToolbarClasses.penIconButton}`]: {\n position: 'absolute',\n top: 8,\n right: 8\n }\n});\nconst DateTimePickerToolbarDateContainer = styled('div', {\n name: 'MuiDateTimePickerToolbar',\n slot: 'DateContainer',\n overridesResolver: (props, styles) => styles.dateContainer\n})({\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'flex-start'\n});\nconst DateTimePickerToolbarTimeContainer = styled('div', {\n name: 'MuiDateTimePickerToolbar',\n slot: 'TimeContainer',\n overridesResolver: (props, styles) => styles.timeContainer\n})({\n display: 'flex'\n});\nconst DateTimePickerToolbarSeparator = styled(PickersToolbarText, {\n name: 'MuiDateTimePickerToolbar',\n slot: 'Separator',\n overridesResolver: (props, styles) => styles.separator\n})({\n margin: '0 4px 0 2px',\n cursor: 'default'\n});\n/**\n * @ignore - internal component.\n */\n\nexport const DateTimePickerToolbar = props => {\n const {\n ampm,\n parsedValue,\n dateRangeIcon,\n hideTabs,\n isMobileKeyboardViewOpen,\n openView,\n setOpenView,\n timeIcon,\n toggleMobileKeyboardView,\n toolbarFormat,\n toolbarPlaceholder = '––',\n toolbarTitle = 'Select date & time',\n views\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const utils = useUtils();\n const wrapperVariant = React.useContext(WrapperVariantContext);\n const showTabs = wrapperVariant === 'desktop' ? true : !hideTabs && typeof window !== 'undefined' && window.innerHeight > 667;\n\n const formatHours = time => ampm ? utils.format(time, 'hours12h') : utils.format(time, 'hours24h');\n\n const dateText = React.useMemo(() => {\n if (!parsedValue) {\n return toolbarPlaceholder;\n }\n\n if (toolbarFormat) {\n return utils.formatByString(parsedValue, toolbarFormat);\n }\n\n return utils.format(parsedValue, 'shortDate');\n }, [parsedValue, toolbarFormat, toolbarPlaceholder, utils]);\n const ownerState = props;\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [wrapperVariant !== 'desktop' && /*#__PURE__*/_jsxs(DateTimePickerToolbarRoot, _extends({\n toolbarTitle: toolbarTitle,\n isMobileKeyboardViewOpen: isMobileKeyboardViewOpen,\n toggleMobileKeyboardView: toggleMobileKeyboardView,\n className: dateTimePickerToolbarClasses.root\n }, other, {\n isLandscape: false,\n ownerState: ownerState,\n children: [/*#__PURE__*/_jsxs(DateTimePickerToolbarDateContainer, {\n className: dateTimePickerToolbarClasses.dateContainer,\n ownerState: ownerState,\n children: [views.includes('year') && /*#__PURE__*/_jsx(PickersToolbarButton, {\n tabIndex: -1,\n variant: \"subtitle1\",\n onClick: () => setOpenView('year'),\n selected: openView === 'year',\n value: parsedValue ? utils.format(parsedValue, 'year') : '–'\n }), views.includes('day') && /*#__PURE__*/_jsx(PickersToolbarButton, {\n tabIndex: -1,\n variant: \"h4\",\n onClick: () => setOpenView('day'),\n selected: openView === 'day',\n value: dateText\n })]\n }), /*#__PURE__*/_jsxs(DateTimePickerToolbarTimeContainer, {\n className: dateTimePickerToolbarClasses.timeContainer,\n ownerState: ownerState,\n children: [views.includes('hours') && /*#__PURE__*/_jsx(PickersToolbarButton, {\n variant: \"h3\",\n onClick: () => setOpenView('hours'),\n selected: openView === 'hours',\n value: parsedValue ? formatHours(parsedValue) : '--'\n }), views.includes('minutes') && /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(DateTimePickerToolbarSeparator, {\n variant: \"h3\",\n value: \":\",\n className: dateTimePickerToolbarClasses.separator,\n ownerState: ownerState\n }), /*#__PURE__*/_jsx(PickersToolbarButton, {\n variant: \"h3\",\n onClick: () => setOpenView('minutes'),\n selected: openView === 'minutes',\n value: parsedValue ? utils.format(parsedValue, 'minutes') : '--'\n })]\n }), views.includes('seconds') && /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(DateTimePickerToolbarSeparator, {\n variant: \"h3\",\n value: \":\",\n className: dateTimePickerToolbarClasses.separator,\n ownerState: ownerState\n }), /*#__PURE__*/_jsx(PickersToolbarButton, {\n variant: \"h3\",\n onClick: () => setOpenView('seconds'),\n selected: openView === 'seconds',\n value: parsedValue ? utils.format(parsedValue, 'seconds') : '--'\n })]\n })]\n })]\n })), showTabs && /*#__PURE__*/_jsx(DateTimePickerTabs, {\n dateRangeIcon: dateRangeIcon,\n timeIcon: timeIcon,\n view: openView,\n onChange: setOpenView\n })]\n });\n};","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"minDate\", \"maxDate\", \"disableFuture\", \"shouldDisableDate\", \"disablePast\"];\nimport { useValidation } from './useValidation';\nimport { validateDate } from './useDateValidation';\nimport { validateTime } from './useTimeValidation';\nexport const validateDateTime = ({\n props,\n value,\n adapter\n}) => {\n const {\n minDate,\n maxDate,\n disableFuture,\n shouldDisableDate,\n disablePast\n } = props,\n timeValidationProps = _objectWithoutPropertiesLoose(props, _excluded);\n\n const dateValidationResult = validateDate({\n adapter,\n value,\n props: {\n minDate,\n maxDate,\n disableFuture,\n shouldDisableDate,\n disablePast\n }\n });\n\n if (dateValidationResult !== null) {\n return dateValidationResult;\n }\n\n return validateTime({\n adapter,\n value,\n props: timeValidationProps\n });\n};\n\nconst isSameDateTimeError = (a, b) => a === b;\n\nexport function useDateTimeValidation(props) {\n return useValidation(props, validateDateTime, isSameDateTimeError);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"onChange\", \"PaperProps\", \"PopperProps\", \"ToolbarComponent\", \"TransitionComponent\", \"value\", \"components\", \"componentsProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { useDateTimePickerDefaultizedProps, dateTimePickerValueManager } from '../DateTimePicker/shared';\nimport { DateTimePickerToolbar } from '../DateTimePicker/DateTimePickerToolbar';\nimport { DesktopWrapper } from '../internals/components/wrappers/DesktopWrapper';\nimport { CalendarOrClockPicker } from '../internals/components/CalendarOrClockPicker';\nimport { useDateTimeValidation } from '../internals/hooks/validation/useDateTimeValidation';\nimport { KeyboardDateInput } from '../internals/components/KeyboardDateInput';\nimport { usePickerState } from '../internals/hooks/usePickerState';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\n/**\n *\n * Demos:\n *\n * - [Date Time Picker](https://mui.com/x/react-date-pickers/date-time-picker/)\n *\n * API:\n *\n * - [DesktopDateTimePicker API](https://mui.com/x/api/date-pickers/desktop-date-time-picker/)\n */\nexport const DesktopDateTimePicker = /*#__PURE__*/React.forwardRef(function DesktopDateTimePicker(inProps, ref) {\n const props = useDateTimePickerDefaultizedProps(inProps, 'MuiDesktopDateTimePicker');\n const validationError = useDateTimeValidation(props) !== null;\n const {\n pickerProps,\n inputProps,\n wrapperProps\n } = usePickerState(props, dateTimePickerValueManager);\n\n const {\n PaperProps,\n PopperProps,\n ToolbarComponent = DateTimePickerToolbar,\n TransitionComponent,\n components,\n componentsProps\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const AllDateInputProps = _extends({}, inputProps, other, {\n components,\n componentsProps,\n ref,\n validationError\n });\n\n return /*#__PURE__*/_jsx(DesktopWrapper, _extends({}, wrapperProps, {\n DateInputProps: AllDateInputProps,\n KeyboardDateInputComponent: KeyboardDateInput,\n PopperProps: PopperProps,\n PaperProps: PaperProps,\n TransitionComponent: TransitionComponent,\n components: components,\n componentsProps: componentsProps,\n children: /*#__PURE__*/_jsx(CalendarOrClockPicker, _extends({}, pickerProps, {\n autoFocus: true,\n toolbarTitle: props.label || props.toolbarTitle,\n ToolbarComponent: ToolbarComponent,\n DateInputProps: AllDateInputProps,\n components: components,\n componentsProps: componentsProps\n }, other))\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? DesktopDateTimePicker.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Regular expression to detect \"accepted\" symbols.\n * @default /\\dap/gi\n */\n acceptRegex: PropTypes.instanceOf(RegExp),\n\n /**\n * 12h/24h view for hour selection clock.\n * @default `utils.is12HourCycleInCurrentLocale()`\n */\n ampm: PropTypes.bool,\n\n /**\n * Display ampm controls under the clock (instead of in the toolbar).\n * @default false\n */\n ampmInClock: PropTypes.bool,\n autoFocus: PropTypes.bool,\n children: PropTypes.node,\n\n /**\n * className applied to the root component.\n */\n className: PropTypes.string,\n\n /**\n * If `true` the popup or dialog will immediately close after submitting full date.\n * @default `true` for Desktop, `false` for Mobile (based on the chosen wrapper and `desktopModeMediaQuery` prop).\n */\n closeOnSelect: PropTypes.bool,\n\n /**\n * Overrideable components.\n * @default {}\n */\n components: PropTypes.object,\n\n /**\n * The props used for each component slot.\n * @default {}\n */\n componentsProps: PropTypes.object,\n\n /**\n * Date tab icon.\n */\n dateRangeIcon: PropTypes.node,\n\n /**\n * Formats the day of week displayed in the calendar header.\n * @param {string} day The day of week provided by the adapter's method `getWeekdays`.\n * @returns {string} The name to display.\n * @default (day) => day.charAt(0).toUpperCase()\n */\n dayOfWeekFormatter: PropTypes.func,\n\n /**\n * Default calendar month displayed when `value={null}`.\n */\n defaultCalendarMonth: PropTypes.any,\n\n /**\n * If `true`, the picker and text field are disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true` future days are disabled.\n * @default false\n */\n disableFuture: PropTypes.bool,\n\n /**\n * If `true`, today's date is rendering without highlighting with circle.\n * @default false\n */\n disableHighlightToday: PropTypes.bool,\n\n /**\n * Do not ignore date part when validating min/max time.\n * @default false\n */\n disableIgnoringDatePartForTimeValidation: PropTypes.bool,\n\n /**\n * Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.\n * @default false\n */\n disableMaskedInput: PropTypes.bool,\n\n /**\n * Do not render open picker button (renders only text field with validation).\n * @default false\n */\n disableOpenPicker: PropTypes.bool,\n\n /**\n * If `true` past days are disabled.\n * @default false\n */\n disablePast: PropTypes.bool,\n\n /**\n * Accessible text that helps user to understand which time and view is selected.\n * @template TDate\n * @param {ClockPickerView} view The current view rendered.\n * @param {TDate | null} time The current time.\n * @param {MuiPickersAdapter<TDate>} adapter The current date adapter.\n * @returns {string} The clock label.\n * @deprecated Use the `localeText` prop of `LocalizationProvider` instead, see https://mui.com/x/react-date-pickers/localization\n * @default <TDate extends any>(\n * view: ClockView,\n * time: TDate | null,\n * adapter: MuiPickersAdapter<TDate>,\n * ) =>\n * `Select ${view}. ${\n * time === null ? 'No time selected' : `Selected time is ${adapter.format(time, 'fullTime')}`\n * }`\n */\n getClockLabelText: PropTypes.func,\n\n /**\n * Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType\n * @template TInputDate, TDate\n * @param {TInputDate} date The date from which we want to add an aria-text.\n * @param {MuiPickersAdapter<TDate>} utils The utils to manipulate the date.\n * @returns {string} The aria-text to render inside the dialog.\n * @default (date, utils) => `Choose date, selected date is ${utils.format(utils.date(date), 'fullDate')}`\n */\n getOpenDialogAriaText: PropTypes.func,\n\n /**\n * Get aria-label text for switching between views button.\n * @param {CalendarPickerView} currentView The view from which we want to get the button text.\n * @returns {string} The label of the view.\n * @deprecated Use the `localeText` prop of `LocalizationProvider` instead, see https://mui.com/x/react-date-pickers/localization\n */\n getViewSwitchingButtonText: PropTypes.func,\n\n /**\n * To show tabs.\n */\n hideTabs: PropTypes.bool,\n ignoreInvalidInputs: PropTypes.bool,\n\n /**\n * Props to pass to keyboard input adornment.\n */\n InputAdornmentProps: PropTypes.object,\n\n /**\n * Format string.\n */\n inputFormat: PropTypes.string,\n InputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.object\n })]),\n label: PropTypes.node,\n\n /**\n * Left arrow icon aria-label text.\n * @deprecated\n */\n leftArrowButtonText: PropTypes.string,\n\n /**\n * If `true` renders `LoadingComponent` in calendar instead of calendar view.\n * Can be used to preload information and show it in calendar.\n * @default false\n */\n loading: PropTypes.bool,\n\n /**\n * Custom mask. Can be used to override generate from format. (e.g. `__/__/____ __:__` or `__/__/____ __:__ _M`).\n */\n mask: PropTypes.string,\n\n /**\n * Maximal selectable date. @DateIOType\n */\n maxDate: PropTypes.any,\n\n /**\n * Maximal selectable moment of time with binding to date, to set max time in each day use `maxTime`.\n */\n maxDateTime: PropTypes.any,\n\n /**\n * Max time acceptable time.\n * For input validation date part of passed object will be ignored if `disableIgnoringDatePartForTimeValidation` not specified.\n */\n maxTime: PropTypes.any,\n\n /**\n * Minimal selectable date. @DateIOType\n */\n minDate: PropTypes.any,\n\n /**\n * Minimal selectable moment of time with binding to date, to set min time in each day use `minTime`.\n */\n minDateTime: PropTypes.any,\n\n /**\n * Min time acceptable time.\n * For input validation date part of passed object will be ignored if `disableIgnoringDatePartForTimeValidation` not specified.\n */\n minTime: PropTypes.any,\n\n /**\n * Step over minutes.\n * @default 1\n */\n minutesStep: PropTypes.number,\n\n /**\n * Callback fired when date is accepted @DateIOType.\n * @template TValue\n * @param {TValue} value The value that was just accepted.\n */\n onAccept: PropTypes.func,\n\n /**\n * Callback fired when the value (the selected date) changes @DateIOType.\n * @template TValue\n * @param {TValue} value The new parsed value.\n * @param {string} keyboardInputValue The current value of the keyboard input.\n */\n onChange: PropTypes.func.isRequired,\n\n /**\n * Callback fired when the popup requests to be closed.\n * Use in controlled mode (see open).\n */\n onClose: PropTypes.func,\n\n /**\n * Callback that fired when input value or new `value` prop validation returns **new** validation error (or value is valid after error).\n * In case of validation error detected `reason` prop return non-null value and `TextField` must be displayed in `error` state.\n * This can be used to render appropriate form error.\n *\n * [Read the guide](https://next.material-ui-pickers.dev/guides/forms) about form integration and error displaying.\n * @DateIOType\n *\n * @template TError, TInputValue\n * @param {TError} reason The reason why the current value is not valid.\n * @param {TInputValue} value The invalid value.\n */\n onError: PropTypes.func,\n\n /**\n * Callback firing on month change @DateIOType.\n * @template TDate\n * @param {TDate} month The new month.\n * @returns {void|Promise} -\n */\n onMonthChange: PropTypes.func,\n\n /**\n * Callback fired when the popup requests to be opened.\n * Use in controlled mode (see open).\n */\n onOpen: PropTypes.func,\n\n /**\n * Callback fired on view change.\n * @param {CalendarOrClockPickerView} view The new view.\n */\n onViewChange: PropTypes.func,\n\n /**\n * Callback firing on year change @DateIOType.\n * @template TDate\n * @param {TDate} year The new year.\n */\n onYearChange: PropTypes.func,\n\n /**\n * Control the popup or dialog open state.\n */\n open: PropTypes.bool,\n\n /**\n * Props to pass to keyboard adornment button.\n */\n OpenPickerButtonProps: PropTypes.object,\n\n /**\n * First view to show.\n */\n openTo: PropTypes.oneOf(['day', 'hours', 'minutes', 'month', 'seconds', 'year']),\n\n /**\n * Force rendering in particular orientation.\n */\n orientation: PropTypes.oneOf(['landscape', 'portrait']),\n\n /**\n * Paper props passed down to [Paper](https://mui.com/material-ui/api/paper/) component.\n */\n PaperProps: PropTypes.object,\n\n /**\n * Popper props passed down to [Popper](https://mui.com/material-ui/api/popper/) component.\n */\n PopperProps: PropTypes.object,\n\n /**\n * Make picker read only.\n * @default false\n */\n readOnly: PropTypes.bool,\n\n /**\n * Disable heavy animations.\n * @default typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)\n */\n reduceAnimations: PropTypes.bool,\n\n /**\n * Custom renderer for day. Check the [PickersDay](https://mui.com/x/api/date-pickers/pickers-day/) component.\n * @template TDate\n * @param {TDate} day The day to render.\n * @param {Array<TDate | null>} selectedDays The days currently selected.\n * @param {PickersDayProps<TDate>} pickersDayProps The props of the day to render.\n * @returns {JSX.Element} The element representing the day.\n */\n renderDay: PropTypes.func,\n\n /**\n * The `renderInput` prop allows you to customize the rendered input.\n * The `props` argument of this render prop contains props of [TextField](https://mui.com/material-ui/api/text-field/#props) that you need to forward.\n * Pay specific attention to the `ref` and `inputProps` keys.\n * @example ```jsx\n * renderInput={props => <TextField {...props} />}\n * ````\n * @param {MuiTextFieldPropsType} props The props of the input.\n * @returns {React.ReactNode} The node to render as the input.\n */\n renderInput: PropTypes.func.isRequired,\n\n /**\n * Component displaying when passed `loading` true.\n * @returns {React.ReactNode} The node to render when loading.\n * @default () => <span data-mui-test=\"loading-progress\">...</span>\n */\n renderLoading: PropTypes.func,\n\n /**\n * Custom formatter to be passed into Rifm component.\n * @param {string} str The un-formatted string.\n * @returns {string} The formatted string.\n */\n rifmFormatter: PropTypes.func,\n\n /**\n * Right arrow icon aria-label text.\n * @deprecated\n */\n rightArrowButtonText: PropTypes.string,\n\n /**\n * Disable specific date. @DateIOType\n * @template TDate\n * @param {TDate} day The date to test.\n * @returns {boolean} Returns `true` if the date should be disabled.\n */\n shouldDisableDate: PropTypes.func,\n\n /**\n * Disable specific months dynamically.\n * Works like `shouldDisableDate` but for month selection view @DateIOType.\n * @template TDate\n * @param {TDate} month The month to check.\n * @returns {boolean} If `true` the month will be disabled.\n */\n shouldDisableMonth: PropTypes.func,\n\n /**\n * Dynamically check if time is disabled or not.\n * If returns `false` appropriate time point will ot be acceptable.\n * @param {number} timeValue The value to check.\n * @param {ClockPickerView} clockType The clock type of the timeValue.\n * @returns {boolean} Returns `true` if the time should be disabled\n */\n shouldDisableTime: PropTypes.func,\n\n /**\n * Disable specific years dynamically.\n * Works like `shouldDisableDate` but for year selection view @DateIOType.\n * @template TDate\n * @param {TDate} year The year to test.\n * @returns {boolean} Returns `true` if the year should be disabled.\n */\n shouldDisableYear: PropTypes.func,\n\n /**\n * If `true`, days that have `outsideCurrentMonth={true}` are displayed.\n * @default false\n */\n showDaysOutsideCurrentMonth: PropTypes.bool,\n\n /**\n * If `true`, show the toolbar even in desktop mode.\n */\n showToolbar: PropTypes.bool,\n\n /**\n * Time tab icon.\n */\n timeIcon: PropTypes.node,\n\n /**\n * Component that will replace default toolbar renderer.\n * @default DateTimePickerToolbar\n */\n ToolbarComponent: PropTypes.elementType,\n\n /**\n * Date format, that is displaying in toolbar.\n */\n toolbarFormat: PropTypes.string,\n\n /**\n * Mobile picker date value placeholder, displaying if `value` === `null`.\n * @default '–'\n */\n toolbarPlaceholder: PropTypes.node,\n\n /**\n * Mobile picker title, displaying in the toolbar.\n * @default 'Select date & time'\n */\n toolbarTitle: PropTypes.node,\n\n /**\n * Custom component for popper [Transition](https://mui.com/material-ui/transitions/#transitioncomponent-prop).\n */\n TransitionComponent: PropTypes.elementType,\n\n /**\n * The value of the picker.\n */\n value: PropTypes.any,\n\n /**\n * Array of views to show.\n */\n views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'hours', 'minutes', 'month', 'seconds', 'year']).isRequired)\n} : void 0;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"ToolbarComponent\", \"value\", \"onChange\", \"components\", \"componentsProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { useDateTimePickerDefaultizedProps, dateTimePickerValueManager } from '../DateTimePicker/shared';\nimport { DateTimePickerToolbar } from '../DateTimePicker/DateTimePickerToolbar';\nimport { MobileWrapper } from '../internals/components/wrappers/MobileWrapper';\nimport { CalendarOrClockPicker } from '../internals/components/CalendarOrClockPicker';\nimport { useDateTimeValidation } from '../internals/hooks/validation/useDateTimeValidation';\nimport { PureDateInput } from '../internals/components/PureDateInput';\nimport { usePickerState } from '../internals/hooks/usePickerState';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\n/**\n *\n * Demos:\n *\n * - [Date Time Picker](https://mui.com/x/react-date-pickers/date-time-picker/)\n *\n * API:\n *\n * - [MobileDateTimePicker API](https://mui.com/x/api/date-pickers/mobile-date-time-picker/)\n */\nexport const MobileDateTimePicker = /*#__PURE__*/React.forwardRef(function MobileDateTimePicker(inProps, ref) {\n const props = useDateTimePickerDefaultizedProps(inProps, 'MuiMobileDateTimePicker');\n const validationError = useDateTimeValidation(props) !== null;\n const {\n pickerProps,\n inputProps,\n wrapperProps\n } = usePickerState(props, dateTimePickerValueManager); // Note that we are passing down all the value without spread.\n // It saves us >1kb gzip and make any prop available automatically on any level down.\n\n const {\n ToolbarComponent = DateTimePickerToolbar,\n components,\n componentsProps\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const DateInputProps = _extends({}, inputProps, other, {\n components,\n componentsProps,\n ref,\n validationError\n });\n\n return /*#__PURE__*/_jsx(MobileWrapper, _extends({}, other, wrapperProps, {\n DateInputProps: DateInputProps,\n PureDateInputComponent: PureDateInput,\n components: components,\n componentsProps: componentsProps,\n children: /*#__PURE__*/_jsx(CalendarOrClockPicker, _extends({}, pickerProps, {\n autoFocus: true,\n toolbarTitle: props.label || props.toolbarTitle,\n ToolbarComponent: ToolbarComponent,\n DateInputProps: DateInputProps,\n components: components,\n componentsProps: componentsProps\n }, other))\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? MobileDateTimePicker.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Regular expression to detect \"accepted\" symbols.\n * @default /\\dap/gi\n */\n acceptRegex: PropTypes.instanceOf(RegExp),\n\n /**\n * 12h/24h view for hour selection clock.\n * @default `utils.is12HourCycleInCurrentLocale()`\n */\n ampm: PropTypes.bool,\n\n /**\n * Display ampm controls under the clock (instead of in the toolbar).\n * @default false\n */\n ampmInClock: PropTypes.bool,\n autoFocus: PropTypes.bool,\n children: PropTypes.node,\n\n /**\n * className applied to the root component.\n */\n className: PropTypes.string,\n\n /**\n * If `true` the popup or dialog will immediately close after submitting full date.\n * @default `true` for Desktop, `false` for Mobile (based on the chosen wrapper and `desktopModeMediaQuery` prop).\n */\n closeOnSelect: PropTypes.bool,\n\n /**\n * Overrideable components.\n * @default {}\n */\n components: PropTypes.object,\n\n /**\n * The props used for each component slot.\n * @default {}\n */\n componentsProps: PropTypes.object,\n\n /**\n * Date tab icon.\n */\n dateRangeIcon: PropTypes.node,\n\n /**\n * Formats the day of week displayed in the calendar header.\n * @param {string} day The day of week provided by the adapter's method `getWeekdays`.\n * @returns {string} The name to display.\n * @default (day) => day.charAt(0).toUpperCase()\n */\n dayOfWeekFormatter: PropTypes.func,\n\n /**\n * Default calendar month displayed when `value={null}`.\n */\n defaultCalendarMonth: PropTypes.any,\n\n /**\n * Props applied to the [`Dialog`](https://mui.com/material-ui/api/dialog/) element.\n */\n DialogProps: PropTypes.object,\n\n /**\n * If `true`, the picker and text field are disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true` future days are disabled.\n * @default false\n */\n disableFuture: PropTypes.bool,\n\n /**\n * If `true`, today's date is rendering without highlighting with circle.\n * @default false\n */\n disableHighlightToday: PropTypes.bool,\n\n /**\n * Do not ignore date part when validating min/max time.\n * @default false\n */\n disableIgnoringDatePartForTimeValidation: PropTypes.bool,\n\n /**\n * Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.\n * @default false\n */\n disableMaskedInput: PropTypes.bool,\n\n /**\n * Do not render open picker button (renders only text field with validation).\n * @default false\n */\n disableOpenPicker: PropTypes.bool,\n\n /**\n * If `true` past days are disabled.\n * @default false\n */\n disablePast: PropTypes.bool,\n\n /**\n * Accessible text that helps user to understand which time and view is selected.\n * @template TDate\n * @param {ClockPickerView} view The current view rendered.\n * @param {TDate | null} time The current time.\n * @param {MuiPickersAdapter<TDate>} adapter The current date adapter.\n * @returns {string} The clock label.\n * @deprecated Use the `localeText` prop of `LocalizationProvider` instead, see https://mui.com/x/react-date-pickers/localization\n * @default <TDate extends any>(\n * view: ClockView,\n * time: TDate | null,\n * adapter: MuiPickersAdapter<TDate>,\n * ) =>\n * `Select ${view}. ${\n * time === null ? 'No time selected' : `Selected time is ${adapter.format(time, 'fullTime')}`\n * }`\n */\n getClockLabelText: PropTypes.func,\n\n /**\n * Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType\n * @template TInputDate, TDate\n * @param {TInputDate} date The date from which we want to add an aria-text.\n * @param {MuiPickersAdapter<TDate>} utils The utils to manipulate the date.\n * @returns {string} The aria-text to render inside the dialog.\n * @default (date, utils) => `Choose date, selected date is ${utils.format(utils.date(date), 'fullDate')}`\n */\n getOpenDialogAriaText: PropTypes.func,\n\n /**\n * Get aria-label text for switching between views button.\n * @param {CalendarPickerView} currentView The view from which we want to get the button text.\n * @returns {string} The label of the view.\n * @deprecated Use the `localeText` prop of `LocalizationProvider` instead, see https://mui.com/x/react-date-pickers/localization\n */\n getViewSwitchingButtonText: PropTypes.func,\n\n /**\n * To show tabs.\n */\n hideTabs: PropTypes.bool,\n ignoreInvalidInputs: PropTypes.bool,\n\n /**\n * Props to pass to keyboard input adornment.\n */\n InputAdornmentProps: PropTypes.object,\n\n /**\n * Format string.\n */\n inputFormat: PropTypes.string,\n InputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.object\n })]),\n label: PropTypes.node,\n\n /**\n * Left arrow icon aria-label text.\n * @deprecated\n */\n leftArrowButtonText: PropTypes.string,\n\n /**\n * If `true` renders `LoadingComponent` in calendar instead of calendar view.\n * Can be used to preload information and show it in calendar.\n * @default false\n */\n loading: PropTypes.bool,\n\n /**\n * Custom mask. Can be used to override generate from format. (e.g. `__/__/____ __:__` or `__/__/____ __:__ _M`).\n */\n mask: PropTypes.string,\n\n /**\n * Maximal selectable date. @DateIOType\n */\n maxDate: PropTypes.any,\n\n /**\n * Maximal selectable moment of time with binding to date, to set max time in each day use `maxTime`.\n */\n maxDateTime: PropTypes.any,\n\n /**\n * Max time acceptable time.\n * For input validation date part of passed object will be ignored if `disableIgnoringDatePartForTimeValidation` not specified.\n */\n maxTime: PropTypes.any,\n\n /**\n * Minimal selectable date. @DateIOType\n */\n minDate: PropTypes.any,\n\n /**\n * Minimal selectable moment of time with binding to date, to set min time in each day use `minTime`.\n */\n minDateTime: PropTypes.any,\n\n /**\n * Min time acceptable time.\n * For input validation date part of passed object will be ignored if `disableIgnoringDatePartForTimeValidation` not specified.\n */\n minTime: PropTypes.any,\n\n /**\n * Step over minutes.\n * @default 1\n */\n minutesStep: PropTypes.number,\n\n /**\n * Callback fired when date is accepted @DateIOType.\n * @template TValue\n * @param {TValue} value The value that was just accepted.\n */\n onAccept: PropTypes.func,\n\n /**\n * Callback fired when the value (the selected date) changes @DateIOType.\n * @template TValue\n * @param {TValue} value The new parsed value.\n * @param {string} keyboardInputValue The current value of the keyboard input.\n */\n onChange: PropTypes.func.isRequired,\n\n /**\n * Callback fired when the popup requests to be closed.\n * Use in controlled mode (see open).\n */\n onClose: PropTypes.func,\n\n /**\n * Callback that fired when input value or new `value` prop validation returns **new** validation error (or value is valid after error).\n * In case of validation error detected `reason` prop return non-null value and `TextField` must be displayed in `error` state.\n * This can be used to render appropriate form error.\n *\n * [Read the guide](https://next.material-ui-pickers.dev/guides/forms) about form integration and error displaying.\n * @DateIOType\n *\n * @template TError, TInputValue\n * @param {TError} reason The reason why the current value is not valid.\n * @param {TInputValue} value The invalid value.\n */\n onError: PropTypes.func,\n\n /**\n * Callback firing on month change @DateIOType.\n * @template TDate\n * @param {TDate} month The new month.\n * @returns {void|Promise} -\n */\n onMonthChange: PropTypes.func,\n\n /**\n * Callback fired when the popup requests to be opened.\n * Use in controlled mode (see open).\n */\n onOpen: PropTypes.func,\n\n /**\n * Callback fired on view change.\n * @param {CalendarOrClockPickerView} view The new view.\n */\n onViewChange: PropTypes.func,\n\n /**\n * Callback firing on year change @DateIOType.\n * @template TDate\n * @param {TDate} year The new year.\n */\n onYearChange: PropTypes.func,\n\n /**\n * Control the popup or dialog open state.\n */\n open: PropTypes.bool,\n\n /**\n * Props to pass to keyboard adornment button.\n */\n OpenPickerButtonProps: PropTypes.object,\n\n /**\n * First view to show.\n */\n openTo: PropTypes.oneOf(['day', 'hours', 'minutes', 'month', 'seconds', 'year']),\n\n /**\n * Force rendering in particular orientation.\n */\n orientation: PropTypes.oneOf(['landscape', 'portrait']),\n\n /**\n * Make picker read only.\n * @default false\n */\n readOnly: PropTypes.bool,\n\n /**\n * Disable heavy animations.\n * @default typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)\n */\n reduceAnimations: PropTypes.bool,\n\n /**\n * Custom renderer for day. Check the [PickersDay](https://mui.com/x/api/date-pickers/pickers-day/) component.\n * @template TDate\n * @param {TDate} day The day to render.\n * @param {Array<TDate | null>} selectedDays The days currently selected.\n * @param {PickersDayProps<TDate>} pickersDayProps The props of the day to render.\n * @returns {JSX.Element} The element representing the day.\n */\n renderDay: PropTypes.func,\n\n /**\n * The `renderInput` prop allows you to customize the rendered input.\n * The `props` argument of this render prop contains props of [TextField](https://mui.com/material-ui/api/text-field/#props) that you need to forward.\n * Pay specific attention to the `ref` and `inputProps` keys.\n * @example ```jsx\n * renderInput={props => <TextField {...props} />}\n * ````\n * @param {MuiTextFieldPropsType} props The props of the input.\n * @returns {React.ReactNode} The node to render as the input.\n */\n renderInput: PropTypes.func.isRequired,\n\n /**\n * Component displaying when passed `loading` true.\n * @returns {React.ReactNode} The node to render when loading.\n * @default () => <span data-mui-test=\"loading-progress\">...</span>\n */\n renderLoading: PropTypes.func,\n\n /**\n * Custom formatter to be passed into Rifm component.\n * @param {string} str The un-formatted string.\n * @returns {string} The formatted string.\n */\n rifmFormatter: PropTypes.func,\n\n /**\n * Right arrow icon aria-label text.\n * @deprecated\n */\n rightArrowButtonText: PropTypes.string,\n\n /**\n * Disable specific date. @DateIOType\n * @template TDate\n * @param {TDate} day The date to test.\n * @returns {boolean} Returns `true` if the date should be disabled.\n */\n shouldDisableDate: PropTypes.func,\n\n /**\n * Disable specific months dynamically.\n * Works like `shouldDisableDate` but for month selection view @DateIOType.\n * @template TDate\n * @param {TDate} month The month to check.\n * @returns {boolean} If `true` the month will be disabled.\n */\n shouldDisableMonth: PropTypes.func,\n\n /**\n * Dynamically check if time is disabled or not.\n * If returns `false` appropriate time point will ot be acceptable.\n * @param {number} timeValue The value to check.\n * @param {ClockPickerView} clockType The clock type of the timeValue.\n * @returns {boolean} Returns `true` if the time should be disabled\n */\n shouldDisableTime: PropTypes.func,\n\n /**\n * Disable specific years dynamically.\n * Works like `shouldDisableDate` but for year selection view @DateIOType.\n * @template TDate\n * @param {TDate} year The year to test.\n * @returns {boolean} Returns `true` if the year should be disabled.\n */\n shouldDisableYear: PropTypes.func,\n\n /**\n * If `true`, days that have `outsideCurrentMonth={true}` are displayed.\n * @default false\n */\n showDaysOutsideCurrentMonth: PropTypes.bool,\n\n /**\n * If `true`, show the toolbar even in desktop mode.\n */\n showToolbar: PropTypes.bool,\n\n /**\n * Time tab icon.\n */\n timeIcon: PropTypes.node,\n\n /**\n * Component that will replace default toolbar renderer.\n * @default DateTimePickerToolbar\n */\n ToolbarComponent: PropTypes.elementType,\n\n /**\n * Date format, that is displaying in toolbar.\n */\n toolbarFormat: PropTypes.string,\n\n /**\n * Mobile picker date value placeholder, displaying if `value` === `null`.\n * @default '–'\n */\n toolbarPlaceholder: PropTypes.node,\n\n /**\n * Mobile picker title, displaying in the toolbar.\n * @default 'Select date & time'\n */\n toolbarTitle: PropTypes.node,\n\n /**\n * The value of the picker.\n */\n value: PropTypes.any,\n\n /**\n * Array of views to show.\n */\n views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'hours', 'minutes', 'month', 'seconds', 'year']).isRequired)\n} : void 0;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"desktopModeMediaQuery\", \"DialogProps\", \"PopperProps\", \"TransitionComponent\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { useThemeProps } from '@mui/material/styles';\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport { DesktopDateTimePicker } from '../DesktopDateTimePicker';\nimport { MobileDateTimePicker } from '../MobileDateTimePicker';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\n/**\n *\n * Demos:\n *\n * - [Date Time Picker](https://mui.com/x/react-date-pickers/date-time-picker/)\n * - [Pickers](https://mui.com/x/react-date-pickers/)\n *\n * API:\n *\n * - [DateTimePicker API](https://mui.com/x/api/date-pickers/date-time-picker/)\n */\nconst DateTimePicker = /*#__PURE__*/React.forwardRef(function DateTimePicker(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiDateTimePicker'\n });\n\n const {\n desktopModeMediaQuery = '@media (pointer: fine)',\n DialogProps,\n PopperProps,\n TransitionComponent\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded); // defaults to `true` in environments where `window.matchMedia` would not be available (i.e. test/jsdom)\n\n\n const isDesktop = useMediaQuery(desktopModeMediaQuery, {\n defaultMatches: true\n });\n\n if (isDesktop) {\n return /*#__PURE__*/_jsx(DesktopDateTimePicker, _extends({\n ref: ref,\n PopperProps: PopperProps,\n TransitionComponent: TransitionComponent\n }, other));\n }\n\n return /*#__PURE__*/_jsx(MobileDateTimePicker, _extends({\n ref: ref,\n DialogProps: DialogProps\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? DateTimePicker.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Regular expression to detect \"accepted\" symbols.\n * @default /\\dap/gi\n */\n acceptRegex: PropTypes.instanceOf(RegExp),\n\n /**\n * 12h/24h view for hour selection clock.\n * @default `utils.is12HourCycleInCurrentLocale()`\n */\n ampm: PropTypes.bool,\n\n /**\n * Display ampm controls under the clock (instead of in the toolbar).\n * @default false\n */\n ampmInClock: PropTypes.bool,\n autoFocus: PropTypes.bool,\n children: PropTypes.node,\n\n /**\n * className applied to the root component.\n */\n className: PropTypes.string,\n\n /**\n * If `true` the popup or dialog will immediately close after submitting full date.\n * @default `true` for Desktop, `false` for Mobile (based on the chosen wrapper and `desktopModeMediaQuery` prop).\n */\n closeOnSelect: PropTypes.bool,\n\n /**\n * Overrideable components.\n * @default {}\n */\n components: PropTypes.object,\n\n /**\n * The props used for each component slot.\n * @default {}\n */\n componentsProps: PropTypes.object,\n\n /**\n * Date tab icon.\n */\n dateRangeIcon: PropTypes.node,\n\n /**\n * Formats the day of week displayed in the calendar header.\n * @param {string} day The day of week provided by the adapter's method `getWeekdays`.\n * @returns {string} The name to display.\n * @default (day) => day.charAt(0).toUpperCase()\n */\n dayOfWeekFormatter: PropTypes.func,\n\n /**\n * Default calendar month displayed when `value={null}`.\n */\n defaultCalendarMonth: PropTypes.any,\n\n /**\n * CSS media query when `Mobile` mode will be changed to `Desktop`.\n * @default '@media (pointer: fine)'\n * @example '@media (min-width: 720px)' or theme.breakpoints.up(\"sm\")\n */\n desktopModeMediaQuery: PropTypes.string,\n\n /**\n * Props applied to the [`Dialog`](https://mui.com/material-ui/api/dialog/) element.\n */\n DialogProps: PropTypes.object,\n\n /**\n * If `true`, the picker and text field are disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true` future days are disabled.\n * @default false\n */\n disableFuture: PropTypes.bool,\n\n /**\n * If `true`, today's date is rendering without highlighting with circle.\n * @default false\n */\n disableHighlightToday: PropTypes.bool,\n\n /**\n * Do not ignore date part when validating min/max time.\n * @default false\n */\n disableIgnoringDatePartForTimeValidation: PropTypes.bool,\n\n /**\n * Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.\n * @default false\n */\n disableMaskedInput: PropTypes.bool,\n\n /**\n * Do not render open picker button (renders only text field with validation).\n * @default false\n */\n disableOpenPicker: PropTypes.bool,\n\n /**\n * If `true` past days are disabled.\n * @default false\n */\n disablePast: PropTypes.bool,\n\n /**\n * Accessible text that helps user to understand which time and view is selected.\n * @template TDate\n * @param {ClockPickerView} view The current view rendered.\n * @param {TDate | null} time The current time.\n * @param {MuiPickersAdapter<TDate>} adapter The current date adapter.\n * @returns {string} The clock label.\n * @deprecated Use the `localeText` prop of `LocalizationProvider` instead, see https://mui.com/x/react-date-pickers/localization\n * @default <TDate extends any>(\n * view: ClockView,\n * time: TDate | null,\n * adapter: MuiPickersAdapter<TDate>,\n * ) =>\n * `Select ${view}. ${\n * time === null ? 'No time selected' : `Selected time is ${adapter.format(time, 'fullTime')}`\n * }`\n */\n getClockLabelText: PropTypes.func,\n\n /**\n * Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType\n * @template TInputDate, TDate\n * @param {TInputDate} date The date from which we want to add an aria-text.\n * @param {MuiPickersAdapter<TDate>} utils The utils to manipulate the date.\n * @returns {string} The aria-text to render inside the dialog.\n * @default (date, utils) => `Choose date, selected date is ${utils.format(utils.date(date), 'fullDate')}`\n */\n getOpenDialogAriaText: PropTypes.func,\n\n /**\n * Get aria-label text for switching between views button.\n * @param {CalendarPickerView} currentView The view from which we want to get the button text.\n * @returns {string} The label of the view.\n * @deprecated Use the `localeText` prop of `LocalizationProvider` instead, see https://mui.com/x/react-date-pickers/localization\n */\n getViewSwitchingButtonText: PropTypes.func,\n\n /**\n * To show tabs.\n */\n hideTabs: PropTypes.bool,\n ignoreInvalidInputs: PropTypes.bool,\n\n /**\n * Props to pass to keyboard input adornment.\n */\n InputAdornmentProps: PropTypes.object,\n\n /**\n * Format string.\n */\n inputFormat: PropTypes.string,\n InputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.object\n })]),\n label: PropTypes.node,\n\n /**\n * Left arrow icon aria-label text.\n * @deprecated\n */\n leftArrowButtonText: PropTypes.string,\n\n /**\n * If `true` renders `LoadingComponent` in calendar instead of calendar view.\n * Can be used to preload information and show it in calendar.\n * @default false\n */\n loading: PropTypes.bool,\n\n /**\n * Custom mask. Can be used to override generate from format. (e.g. `__/__/____ __:__` or `__/__/____ __:__ _M`).\n */\n mask: PropTypes.string,\n\n /**\n * Maximal selectable date. @DateIOType\n */\n maxDate: PropTypes.any,\n\n /**\n * Maximal selectable moment of time with binding to date, to set max time in each day use `maxTime`.\n */\n maxDateTime: PropTypes.any,\n\n /**\n * Max time acceptable time.\n * For input validation date part of passed object will be ignored if `disableIgnoringDatePartForTimeValidation` not specified.\n */\n maxTime: PropTypes.any,\n\n /**\n * Minimal selectable date. @DateIOType\n */\n minDate: PropTypes.any,\n\n /**\n * Minimal selectable moment of time with binding to date, to set min time in each day use `minTime`.\n */\n minDateTime: PropTypes.any,\n\n /**\n * Min time acceptable time.\n * For input validation date part of passed object will be ignored if `disableIgnoringDatePartForTimeValidation` not specified.\n */\n minTime: PropTypes.any,\n\n /**\n * Step over minutes.\n * @default 1\n */\n minutesStep: PropTypes.number,\n\n /**\n * Callback fired when date is accepted @DateIOType.\n * @template TValue\n * @param {TValue} value The value that was just accepted.\n */\n onAccept: PropTypes.func,\n\n /**\n * Callback fired when the value (the selected date) changes @DateIOType.\n * @template TValue\n * @param {TValue} value The new parsed value.\n * @param {string} keyboardInputValue The current value of the keyboard input.\n */\n onChange: PropTypes.func.isRequired,\n\n /**\n * Callback fired when the popup requests to be closed.\n * Use in controlled mode (see open).\n */\n onClose: PropTypes.func,\n\n /**\n * Callback that fired when input value or new `value` prop validation returns **new** validation error (or value is valid after error).\n * In case of validation error detected `reason` prop return non-null value and `TextField` must be displayed in `error` state.\n * This can be used to render appropriate form error.\n *\n * [Read the guide](https://next.material-ui-pickers.dev/guides/forms) about form integration and error displaying.\n * @DateIOType\n *\n * @template TError, TInputValue\n * @param {TError} reason The reason why the current value is not valid.\n * @param {TInputValue} value The invalid value.\n */\n onError: PropTypes.func,\n\n /**\n * Callback firing on month change @DateIOType.\n * @template TDate\n * @param {TDate} month The new month.\n * @returns {void|Promise} -\n */\n onMonthChange: PropTypes.func,\n\n /**\n * Callback fired when the popup requests to be opened.\n * Use in controlled mode (see open).\n */\n onOpen: PropTypes.func,\n\n /**\n * Callback fired on view change.\n * @param {CalendarOrClockPickerView} view The new view.\n */\n onViewChange: PropTypes.func,\n\n /**\n * Callback firing on year change @DateIOType.\n * @template TDate\n * @param {TDate} year The new year.\n */\n onYearChange: PropTypes.func,\n\n /**\n * Control the popup or dialog open state.\n */\n open: PropTypes.bool,\n\n /**\n * Props to pass to keyboard adornment button.\n */\n OpenPickerButtonProps: PropTypes.object,\n\n /**\n * First view to show.\n */\n openTo: PropTypes.oneOf(['day', 'hours', 'minutes', 'month', 'seconds', 'year']),\n\n /**\n * Force rendering in particular orientation.\n */\n orientation: PropTypes.oneOf(['landscape', 'portrait']),\n\n /**\n * Paper props passed down to [Paper](https://mui.com/material-ui/api/paper/) component.\n */\n PaperProps: PropTypes.object,\n\n /**\n * Popper props passed down to [Popper](https://mui.com/material-ui/api/popper/) component.\n */\n PopperProps: PropTypes.object,\n\n /**\n * Make picker read only.\n * @default false\n */\n readOnly: PropTypes.bool,\n\n /**\n * Disable heavy animations.\n * @default typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)\n */\n reduceAnimations: PropTypes.bool,\n\n /**\n * Custom renderer for day. Check the [PickersDay](https://mui.com/x/api/date-pickers/pickers-day/) component.\n * @template TDate\n * @param {TDate} day The day to render.\n * @param {Array<TDate | null>} selectedDays The days currently selected.\n * @param {PickersDayProps<TDate>} pickersDayProps The props of the day to render.\n * @returns {JSX.Element} The element representing the day.\n */\n renderDay: PropTypes.func,\n\n /**\n * The `renderInput` prop allows you to customize the rendered input.\n * The `props` argument of this render prop contains props of [TextField](https://mui.com/material-ui/api/text-field/#props) that you need to forward.\n * Pay specific attention to the `ref` and `inputProps` keys.\n * @example ```jsx\n * renderInput={props => <TextField {...props} />}\n * ````\n * @param {MuiTextFieldPropsType} props The props of the input.\n * @returns {React.ReactNode} The node to render as the input.\n */\n renderInput: PropTypes.func.isRequired,\n\n /**\n * Component displaying when passed `loading` true.\n * @returns {React.ReactNode} The node to render when loading.\n * @default () => <span data-mui-test=\"loading-progress\">...</span>\n */\n renderLoading: PropTypes.func,\n\n /**\n * Custom formatter to be passed into Rifm component.\n * @param {string} str The un-formatted string.\n * @returns {string} The formatted string.\n */\n rifmFormatter: PropTypes.func,\n\n /**\n * Right arrow icon aria-label text.\n * @deprecated\n */\n rightArrowButtonText: PropTypes.string,\n\n /**\n * Disable specific date. @DateIOType\n * @template TDate\n * @param {TDate} day The date to test.\n * @returns {boolean} Returns `true` if the date should be disabled.\n */\n shouldDisableDate: PropTypes.func,\n\n /**\n * Disable specific months dynamically.\n * Works like `shouldDisableDate` but for month selection view @DateIOType.\n * @template TDate\n * @param {TDate} month The month to check.\n * @returns {boolean} If `true` the month will be disabled.\n */\n shouldDisableMonth: PropTypes.func,\n\n /**\n * Dynamically check if time is disabled or not.\n * If returns `false` appropriate time point will ot be acceptable.\n * @param {number} timeValue The value to check.\n * @param {ClockPickerView} clockType The clock type of the timeValue.\n * @returns {boolean} Returns `true` if the time should be disabled\n */\n shouldDisableTime: PropTypes.func,\n\n /**\n * Disable specific years dynamically.\n * Works like `shouldDisableDate` but for year selection view @DateIOType.\n * @template TDate\n * @param {TDate} year The year to test.\n * @returns {boolean} Returns `true` if the year should be disabled.\n */\n shouldDisableYear: PropTypes.func,\n\n /**\n * If `true`, days that have `outsideCurrentMonth={true}` are displayed.\n * @default false\n */\n showDaysOutsideCurrentMonth: PropTypes.bool,\n\n /**\n * If `true`, show the toolbar even in desktop mode.\n */\n showToolbar: PropTypes.bool,\n\n /**\n * Time tab icon.\n */\n timeIcon: PropTypes.node,\n\n /**\n * Component that will replace default toolbar renderer.\n * @default DateTimePickerToolbar\n */\n ToolbarComponent: PropTypes.elementType,\n\n /**\n * Date format, that is displaying in toolbar.\n */\n toolbarFormat: PropTypes.string,\n\n /**\n * Mobile picker date value placeholder, displaying if `value` === `null`.\n * @default '–'\n */\n toolbarPlaceholder: PropTypes.node,\n\n /**\n * Mobile picker title, displaying in the toolbar.\n * @default 'Select date & time'\n */\n toolbarTitle: PropTypes.node,\n\n /**\n * Custom component for popper [Transition](https://mui.com/material-ui/transitions/#transitioncomponent-prop).\n */\n TransitionComponent: PropTypes.elementType,\n\n /**\n * The value of the picker.\n */\n value: PropTypes.any,\n\n /**\n * Array of views to show.\n */\n views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'hours', 'minutes', 'month', 'seconds', 'year']).isRequired)\n} : void 0;\nexport { DateTimePicker };","import { generateUtilityClass, generateUtilityClasses } from '@mui/material';\nexport function getStaticWrapperUtilityClass(slot) {\n return generateUtilityClass('MuiPickerStaticWrapper', slot);\n}\nexport const pickerStaticWrapperClasses = generateUtilityClasses('MuiPickerStaticWrapper', ['root', 'content']);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"displayStaticWrapperAs\", \"onAccept\", \"onClear\", \"onCancel\", \"onDismiss\", \"onSetToday\", \"open\", \"children\", \"components\", \"componentsProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport { unstable_composeClasses as composeClasses } from '@mui/material';\nimport { DIALOG_WIDTH } from '../../constants/dimensions';\nimport { WrapperVariantContext } from '../wrappers/WrapperVariantContext';\nimport { getStaticWrapperUtilityClass } from './pickerStaticWrapperClasses';\nimport { PickersActionBar } from '../../../PickersActionBar';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n content: ['content']\n };\n return composeClasses(slots, getStaticWrapperUtilityClass, classes);\n};\n\nconst PickerStaticWrapperRoot = styled('div', {\n name: 'MuiPickerStaticWrapper',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({\n display: 'flex',\n flexDirection: 'column'\n});\nconst PickerStaticWrapperContent = styled('div', {\n name: 'MuiPickerStaticWrapper',\n slot: 'Content',\n overridesResolver: (props, styles) => styles.content\n})(({\n theme\n}) => ({\n overflow: 'hidden',\n minWidth: DIALOG_WIDTH,\n display: 'flex',\n flexDirection: 'column',\n backgroundColor: theme.palette.background.paper\n}));\n\nfunction PickerStaticWrapper(inProps) {\n var _components$ActionBar;\n\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPickerStaticWrapper'\n });\n\n const {\n displayStaticWrapperAs,\n onAccept,\n onClear,\n onCancel,\n onSetToday,\n children,\n components,\n componentsProps\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const classes = useUtilityClasses(props);\n const ActionBar = (_components$ActionBar = components == null ? void 0 : components.ActionBar) != null ? _components$ActionBar : PickersActionBar;\n return /*#__PURE__*/_jsx(WrapperVariantContext.Provider, {\n value: displayStaticWrapperAs,\n children: /*#__PURE__*/_jsxs(PickerStaticWrapperRoot, _extends({\n className: classes.root\n }, other, {\n children: [/*#__PURE__*/_jsx(PickerStaticWrapperContent, {\n className: classes.content,\n children: children\n }), /*#__PURE__*/_jsx(ActionBar, _extends({\n onAccept: onAccept,\n onClear: onClear,\n onCancel: onCancel,\n onSetToday: onSetToday,\n actions: displayStaticWrapperAs === 'desktop' ? [] : ['cancel', 'accept']\n }, componentsProps == null ? void 0 : componentsProps.actionBar))]\n }))\n });\n}\n\nprocess.env.NODE_ENV !== \"production\" ? PickerStaticWrapper.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * Overrideable components.\n * @default {}\n */\n components: PropTypes.object,\n\n /**\n * The props used for each component slot.\n * @default {}\n */\n componentsProps: PropTypes.object,\n\n /**\n * Force static wrapper inner components to be rendered in mobile or desktop mode.\n */\n displayStaticWrapperAs: PropTypes.oneOf(['desktop', 'mobile']).isRequired,\n onAccept: PropTypes.func.isRequired,\n onCancel: PropTypes.func.isRequired,\n onClear: PropTypes.func.isRequired,\n onDismiss: PropTypes.func.isRequired,\n onSetToday: PropTypes.func.isRequired,\n open: PropTypes.bool.isRequired\n} : void 0;\nexport { PickerStaticWrapper };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"ToolbarComponent\", \"value\", \"onChange\", \"displayStaticWrapperAs\", \"components\", \"componentsProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { useDatePickerDefaultizedProps, datePickerValueManager } from '../DatePicker/shared';\nimport { DatePickerToolbar } from '../DatePicker/DatePickerToolbar';\nimport { PickerStaticWrapper } from '../internals/components/PickerStaticWrapper/PickerStaticWrapper';\nimport { CalendarOrClockPicker } from '../internals/components/CalendarOrClockPicker';\nimport { useDateValidation } from '../internals/hooks/validation/useDateValidation';\nimport { usePickerState } from '../internals/hooks/usePickerState';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\n/**\n *\n * Demos:\n *\n * - [Date Picker](https://mui.com/x/react-date-pickers/date-picker/)\n *\n * API:\n *\n * - [StaticDatePicker API](https://mui.com/x/api/date-pickers/static-date-picker/)\n */\nexport const StaticDatePicker = /*#__PURE__*/React.forwardRef(function StaticDatePicker(inProps, ref) {\n const props = useDatePickerDefaultizedProps(inProps, 'MuiStaticDatePicker'); // Note that we are passing down all the value without spread.\n // It saves us >1kb gzip and make any prop available automatically on any level down.\n\n const {\n ToolbarComponent = DatePickerToolbar,\n displayStaticWrapperAs = 'mobile',\n components,\n componentsProps\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const {\n pickerProps,\n inputProps,\n wrapperProps\n } = usePickerState(props, datePickerValueManager);\n const validationError = useDateValidation(props) !== null;\n\n const DateInputProps = _extends({}, inputProps, other, {\n ref,\n validationError,\n components\n });\n\n return /*#__PURE__*/_jsx(PickerStaticWrapper, _extends({\n displayStaticWrapperAs: displayStaticWrapperAs,\n components: components,\n componentsProps: componentsProps\n }, wrapperProps, {\n children: /*#__PURE__*/_jsx(CalendarOrClockPicker, _extends({}, pickerProps, {\n toolbarTitle: props.label || props.toolbarTitle,\n ToolbarComponent: ToolbarComponent,\n DateInputProps: DateInputProps,\n components: components,\n componentsProps: componentsProps\n }, other))\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? StaticDatePicker.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Regular expression to detect \"accepted\" symbols.\n * @default /\\dap/gi\n */\n acceptRegex: PropTypes.instanceOf(RegExp),\n autoFocus: PropTypes.bool,\n\n /**\n * className applied to the root component.\n */\n className: PropTypes.string,\n\n /**\n * If `true` the popup or dialog will immediately close after submitting full date.\n * @default `true` for Desktop, `false` for Mobile (based on the chosen wrapper and `desktopModeMediaQuery` prop).\n */\n closeOnSelect: PropTypes.bool,\n\n /**\n * Overrideable components.\n * @default {}\n */\n components: PropTypes.object,\n\n /**\n * The props used for each component slot.\n * @default {}\n */\n componentsProps: PropTypes.object,\n\n /**\n * Formats the day of week displayed in the calendar header.\n * @param {string} day The day of week provided by the adapter's method `getWeekdays`.\n * @returns {string} The name to display.\n * @default (day) => day.charAt(0).toUpperCase()\n */\n dayOfWeekFormatter: PropTypes.func,\n\n /**\n * Default calendar month displayed when `value={null}`.\n */\n defaultCalendarMonth: PropTypes.any,\n\n /**\n * If `true`, the picker and text field are disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true` future days are disabled.\n * @default false\n */\n disableFuture: PropTypes.bool,\n\n /**\n * If `true`, today's date is rendering without highlighting with circle.\n * @default false\n */\n disableHighlightToday: PropTypes.bool,\n\n /**\n * Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.\n * @default false\n */\n disableMaskedInput: PropTypes.bool,\n\n /**\n * Do not render open picker button (renders only text field with validation).\n * @default false\n */\n disableOpenPicker: PropTypes.bool,\n\n /**\n * If `true` past days are disabled.\n * @default false\n */\n disablePast: PropTypes.bool,\n\n /**\n * Force static wrapper inner components to be rendered in mobile or desktop mode.\n * @default 'mobile'\n */\n displayStaticWrapperAs: PropTypes.oneOf(['desktop', 'mobile']),\n\n /**\n * Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType\n * @template TInputDate, TDate\n * @param {TInputDate} date The date from which we want to add an aria-text.\n * @param {MuiPickersAdapter<TDate>} utils The utils to manipulate the date.\n * @returns {string} The aria-text to render inside the dialog.\n * @default (date, utils) => `Choose date, selected date is ${utils.format(utils.date(date), 'fullDate')}`\n */\n getOpenDialogAriaText: PropTypes.func,\n\n /**\n * Get aria-label text for switching between views button.\n * @param {CalendarPickerView} currentView The view from which we want to get the button text.\n * @returns {string} The label of the view.\n * @deprecated Use the `localeText` prop of `LocalizationProvider` instead, see https://mui.com/x/react-date-pickers/localization\n */\n getViewSwitchingButtonText: PropTypes.func,\n ignoreInvalidInputs: PropTypes.bool,\n\n /**\n * Props to pass to keyboard input adornment.\n */\n InputAdornmentProps: PropTypes.object,\n\n /**\n * Format string.\n */\n inputFormat: PropTypes.string,\n InputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.object\n })]),\n label: PropTypes.node,\n\n /**\n * Left arrow icon aria-label text.\n * @deprecated\n */\n leftArrowButtonText: PropTypes.string,\n\n /**\n * If `true` renders `LoadingComponent` in calendar instead of calendar view.\n * Can be used to preload information and show it in calendar.\n * @default false\n */\n loading: PropTypes.bool,\n\n /**\n * Custom mask. Can be used to override generate from format. (e.g. `__/__/____ __:__` or `__/__/____ __:__ _M`).\n */\n mask: PropTypes.string,\n\n /**\n * Maximal selectable date. @DateIOType\n */\n maxDate: PropTypes.any,\n\n /**\n * Minimal selectable date. @DateIOType\n */\n minDate: PropTypes.any,\n\n /**\n * Callback fired when date is accepted @DateIOType.\n * @template TValue\n * @param {TValue} value The value that was just accepted.\n */\n onAccept: PropTypes.func,\n\n /**\n * Callback fired when the value (the selected date) changes @DateIOType.\n * @template TValue\n * @param {TValue} value The new parsed value.\n * @param {string} keyboardInputValue The current value of the keyboard input.\n */\n onChange: PropTypes.func.isRequired,\n\n /**\n * Callback that fired when input value or new `value` prop validation returns **new** validation error (or value is valid after error).\n * In case of validation error detected `reason` prop return non-null value and `TextField` must be displayed in `error` state.\n * This can be used to render appropriate form error.\n *\n * [Read the guide](https://next.material-ui-pickers.dev/guides/forms) about form integration and error displaying.\n * @DateIOType\n *\n * @template TError, TInputValue\n * @param {TError} reason The reason why the current value is not valid.\n * @param {TInputValue} value The invalid value.\n */\n onError: PropTypes.func,\n\n /**\n * Callback firing on month change @DateIOType.\n * @template TDate\n * @param {TDate} month The new month.\n * @returns {void|Promise} -\n */\n onMonthChange: PropTypes.func,\n\n /**\n * Callback fired on view change.\n * @param {CalendarPickerView} view The new view.\n */\n onViewChange: PropTypes.func,\n\n /**\n * Callback firing on year change @DateIOType.\n * @template TDate\n * @param {TDate} year The new year.\n */\n onYearChange: PropTypes.func,\n\n /**\n * Props to pass to keyboard adornment button.\n */\n OpenPickerButtonProps: PropTypes.object,\n\n /**\n * First view to show.\n */\n openTo: PropTypes.oneOf(['day', 'month', 'year']),\n\n /**\n * Force rendering in particular orientation.\n */\n orientation: PropTypes.oneOf(['landscape', 'portrait']),\n\n /**\n * Make picker read only.\n * @default false\n */\n readOnly: PropTypes.bool,\n\n /**\n * Disable heavy animations.\n * @default typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)\n */\n reduceAnimations: PropTypes.bool,\n\n /**\n * Custom renderer for day. Check the [PickersDay](https://mui.com/x/api/date-pickers/pickers-day/) component.\n * @template TDate\n * @param {TDate} day The day to render.\n * @param {Array<TDate | null>} selectedDays The days currently selected.\n * @param {PickersDayProps<TDate>} pickersDayProps The props of the day to render.\n * @returns {JSX.Element} The element representing the day.\n */\n renderDay: PropTypes.func,\n\n /**\n * The `renderInput` prop allows you to customize the rendered input.\n * The `props` argument of this render prop contains props of [TextField](https://mui.com/material-ui/api/text-field/#props) that you need to forward.\n * Pay specific attention to the `ref` and `inputProps` keys.\n * @example ```jsx\n * renderInput={props => <TextField {...props} />}\n * ````\n * @param {MuiTextFieldPropsType} props The props of the input.\n * @returns {React.ReactNode} The node to render as the input.\n */\n renderInput: PropTypes.func.isRequired,\n\n /**\n * Component displaying when passed `loading` true.\n * @returns {React.ReactNode} The node to render when loading.\n * @default () => <span data-mui-test=\"loading-progress\">...</span>\n */\n renderLoading: PropTypes.func,\n\n /**\n * Custom formatter to be passed into Rifm component.\n * @param {string} str The un-formatted string.\n * @returns {string} The formatted string.\n */\n rifmFormatter: PropTypes.func,\n\n /**\n * Right arrow icon aria-label text.\n * @deprecated\n */\n rightArrowButtonText: PropTypes.string,\n\n /**\n * Disable specific date. @DateIOType\n * @template TDate\n * @param {TDate} day The date to test.\n * @returns {boolean} Returns `true` if the date should be disabled.\n */\n shouldDisableDate: PropTypes.func,\n\n /**\n * Disable specific months dynamically.\n * Works like `shouldDisableDate` but for month selection view @DateIOType.\n * @template TDate\n * @param {TDate} month The month to check.\n * @returns {boolean} If `true` the month will be disabled.\n */\n shouldDisableMonth: PropTypes.func,\n\n /**\n * Disable specific years dynamically.\n * Works like `shouldDisableDate` but for year selection view @DateIOType.\n * @template TDate\n * @param {TDate} year The year to test.\n * @returns {boolean} Returns `true` if the year should be disabled.\n */\n shouldDisableYear: PropTypes.func,\n\n /**\n * If `true`, days that have `outsideCurrentMonth={true}` are displayed.\n * @default false\n */\n showDaysOutsideCurrentMonth: PropTypes.bool,\n\n /**\n * If `true`, show the toolbar even in desktop mode.\n */\n showToolbar: PropTypes.bool,\n\n /**\n * Component that will replace default toolbar renderer.\n * @default DatePickerToolbar\n */\n ToolbarComponent: PropTypes.elementType,\n\n /**\n * Date format, that is displaying in toolbar.\n */\n toolbarFormat: PropTypes.string,\n\n /**\n * Mobile picker date value placeholder, displaying if `value` === `null`.\n * @default '–'\n */\n toolbarPlaceholder: PropTypes.node,\n\n /**\n * Mobile picker title, displaying in the toolbar.\n * @default 'Select date'\n */\n toolbarTitle: PropTypes.node,\n\n /**\n * The value of the picker.\n */\n value: PropTypes.any,\n\n /**\n * Array of views to show.\n */\n views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'month', 'year']).isRequired)\n} : void 0;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"displayStaticWrapperAs\", \"onChange\", \"ToolbarComponent\", \"value\", \"components\", \"componentsProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { useDateTimePickerDefaultizedProps, dateTimePickerValueManager } from '../DateTimePicker/shared';\nimport { DateTimePickerToolbar } from '../DateTimePicker/DateTimePickerToolbar';\nimport { PickerStaticWrapper } from '../internals/components/PickerStaticWrapper/PickerStaticWrapper';\nimport { CalendarOrClockPicker } from '../internals/components/CalendarOrClockPicker';\nimport { useDateTimeValidation } from '../internals/hooks/validation/useDateTimeValidation';\nimport { usePickerState } from '../internals/hooks/usePickerState';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\n/**\n *\n * Demos:\n *\n * - [Date Time Picker](https://mui.com/x/react-date-pickers/date-time-picker/)\n *\n * API:\n *\n * - [StaticDateTimePicker API](https://mui.com/x/api/date-pickers/static-date-time-picker/)\n */\nexport const StaticDateTimePicker = /*#__PURE__*/React.forwardRef(function StaticDateTimePicker(inProps, ref) {\n const props = useDateTimePickerDefaultizedProps(inProps, 'MuiStaticDateTimePicker'); // Note that we are passing down all the value without spread.\n // It saves us >1kb gzip and make any prop available automatically on any level down.\n\n const {\n displayStaticWrapperAs = 'mobile',\n ToolbarComponent = DateTimePickerToolbar,\n components,\n componentsProps\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const {\n pickerProps,\n inputProps,\n wrapperProps\n } = usePickerState(props, dateTimePickerValueManager);\n const validationError = useDateTimeValidation(props) !== null;\n\n const DateInputProps = _extends({}, inputProps, other, {\n ref,\n validationError,\n components,\n componentsProps\n });\n\n return /*#__PURE__*/_jsx(PickerStaticWrapper, _extends({\n displayStaticWrapperAs: displayStaticWrapperAs,\n components: components,\n componentsProps: componentsProps\n }, wrapperProps, {\n children: /*#__PURE__*/_jsx(CalendarOrClockPicker, _extends({}, pickerProps, {\n toolbarTitle: props.label || props.toolbarTitle,\n ToolbarComponent: ToolbarComponent,\n DateInputProps: DateInputProps,\n components: components,\n componentsProps: componentsProps\n }, other))\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? StaticDateTimePicker.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Regular expression to detect \"accepted\" symbols.\n * @default /\\dap/gi\n */\n acceptRegex: PropTypes.instanceOf(RegExp),\n\n /**\n * 12h/24h view for hour selection clock.\n * @default `utils.is12HourCycleInCurrentLocale()`\n */\n ampm: PropTypes.bool,\n\n /**\n * Display ampm controls under the clock (instead of in the toolbar).\n * @default false\n */\n ampmInClock: PropTypes.bool,\n autoFocus: PropTypes.bool,\n\n /**\n * className applied to the root component.\n */\n className: PropTypes.string,\n\n /**\n * If `true` the popup or dialog will immediately close after submitting full date.\n * @default `true` for Desktop, `false` for Mobile (based on the chosen wrapper and `desktopModeMediaQuery` prop).\n */\n closeOnSelect: PropTypes.bool,\n\n /**\n * Overrideable components.\n * @default {}\n */\n components: PropTypes.object,\n\n /**\n * The props used for each component slot.\n * @default {}\n */\n componentsProps: PropTypes.object,\n\n /**\n * Date tab icon.\n */\n dateRangeIcon: PropTypes.node,\n\n /**\n * Formats the day of week displayed in the calendar header.\n * @param {string} day The day of week provided by the adapter's method `getWeekdays`.\n * @returns {string} The name to display.\n * @default (day) => day.charAt(0).toUpperCase()\n */\n dayOfWeekFormatter: PropTypes.func,\n\n /**\n * Default calendar month displayed when `value={null}`.\n */\n defaultCalendarMonth: PropTypes.any,\n\n /**\n * If `true`, the picker and text field are disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true` future days are disabled.\n * @default false\n */\n disableFuture: PropTypes.bool,\n\n /**\n * If `true`, today's date is rendering without highlighting with circle.\n * @default false\n */\n disableHighlightToday: PropTypes.bool,\n\n /**\n * Do not ignore date part when validating min/max time.\n * @default false\n */\n disableIgnoringDatePartForTimeValidation: PropTypes.bool,\n\n /**\n * Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.\n * @default false\n */\n disableMaskedInput: PropTypes.bool,\n\n /**\n * Do not render open picker button (renders only text field with validation).\n * @default false\n */\n disableOpenPicker: PropTypes.bool,\n\n /**\n * If `true` past days are disabled.\n * @default false\n */\n disablePast: PropTypes.bool,\n\n /**\n * Force static wrapper inner components to be rendered in mobile or desktop mode.\n * @default 'mobile'\n */\n displayStaticWrapperAs: PropTypes.oneOf(['desktop', 'mobile']),\n\n /**\n * Accessible text that helps user to understand which time and view is selected.\n * @template TDate\n * @param {ClockPickerView} view The current view rendered.\n * @param {TDate | null} time The current time.\n * @param {MuiPickersAdapter<TDate>} adapter The current date adapter.\n * @returns {string} The clock label.\n * @deprecated Use the `localeText` prop of `LocalizationProvider` instead, see https://mui.com/x/react-date-pickers/localization\n * @default <TDate extends any>(\n * view: ClockView,\n * time: TDate | null,\n * adapter: MuiPickersAdapter<TDate>,\n * ) =>\n * `Select ${view}. ${\n * time === null ? 'No time selected' : `Selected time is ${adapter.format(time, 'fullTime')}`\n * }`\n */\n getClockLabelText: PropTypes.func,\n\n /**\n * Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType\n * @template TInputDate, TDate\n * @param {TInputDate} date The date from which we want to add an aria-text.\n * @param {MuiPickersAdapter<TDate>} utils The utils to manipulate the date.\n * @returns {string} The aria-text to render inside the dialog.\n * @default (date, utils) => `Choose date, selected date is ${utils.format(utils.date(date), 'fullDate')}`\n */\n getOpenDialogAriaText: PropTypes.func,\n\n /**\n * Get aria-label text for switching between views button.\n * @param {CalendarPickerView} currentView The view from which we want to get the button text.\n * @returns {string} The label of the view.\n * @deprecated Use the `localeText` prop of `LocalizationProvider` instead, see https://mui.com/x/react-date-pickers/localization\n */\n getViewSwitchingButtonText: PropTypes.func,\n\n /**\n * To show tabs.\n */\n hideTabs: PropTypes.bool,\n ignoreInvalidInputs: PropTypes.bool,\n\n /**\n * Props to pass to keyboard input adornment.\n */\n InputAdornmentProps: PropTypes.object,\n\n /**\n * Format string.\n */\n inputFormat: PropTypes.string,\n InputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.object\n })]),\n label: PropTypes.node,\n\n /**\n * Left arrow icon aria-label text.\n * @deprecated\n */\n leftArrowButtonText: PropTypes.string,\n\n /**\n * If `true` renders `LoadingComponent` in calendar instead of calendar view.\n * Can be used to preload information and show it in calendar.\n * @default false\n */\n loading: PropTypes.bool,\n\n /**\n * Custom mask. Can be used to override generate from format. (e.g. `__/__/____ __:__` or `__/__/____ __:__ _M`).\n */\n mask: PropTypes.string,\n\n /**\n * Maximal selectable date. @DateIOType\n */\n maxDate: PropTypes.any,\n\n /**\n * Maximal selectable moment of time with binding to date, to set max time in each day use `maxTime`.\n */\n maxDateTime: PropTypes.any,\n\n /**\n * Max time acceptable time.\n * For input validation date part of passed object will be ignored if `disableIgnoringDatePartForTimeValidation` not specified.\n */\n maxTime: PropTypes.any,\n\n /**\n * Minimal selectable date. @DateIOType\n */\n minDate: PropTypes.any,\n\n /**\n * Minimal selectable moment of time with binding to date, to set min time in each day use `minTime`.\n */\n minDateTime: PropTypes.any,\n\n /**\n * Min time acceptable time.\n * For input validation date part of passed object will be ignored if `disableIgnoringDatePartForTimeValidation` not specified.\n */\n minTime: PropTypes.any,\n\n /**\n * Step over minutes.\n * @default 1\n */\n minutesStep: PropTypes.number,\n\n /**\n * Callback fired when date is accepted @DateIOType.\n * @template TValue\n * @param {TValue} value The value that was just accepted.\n */\n onAccept: PropTypes.func,\n\n /**\n * Callback fired when the value (the selected date) changes @DateIOType.\n * @template TValue\n * @param {TValue} value The new parsed value.\n * @param {string} keyboardInputValue The current value of the keyboard input.\n */\n onChange: PropTypes.func.isRequired,\n\n /**\n * Callback that fired when input value or new `value` prop validation returns **new** validation error (or value is valid after error).\n * In case of validation error detected `reason` prop return non-null value and `TextField` must be displayed in `error` state.\n * This can be used to render appropriate form error.\n *\n * [Read the guide](https://next.material-ui-pickers.dev/guides/forms) about form integration and error displaying.\n * @DateIOType\n *\n * @template TError, TInputValue\n * @param {TError} reason The reason why the current value is not valid.\n * @param {TInputValue} value The invalid value.\n */\n onError: PropTypes.func,\n\n /**\n * Callback firing on month change @DateIOType.\n * @template TDate\n * @param {TDate} month The new month.\n * @returns {void|Promise} -\n */\n onMonthChange: PropTypes.func,\n\n /**\n * Callback fired on view change.\n * @param {CalendarOrClockPickerView} view The new view.\n */\n onViewChange: PropTypes.func,\n\n /**\n * Callback firing on year change @DateIOType.\n * @template TDate\n * @param {TDate} year The new year.\n */\n onYearChange: PropTypes.func,\n\n /**\n * Props to pass to keyboard adornment button.\n */\n OpenPickerButtonProps: PropTypes.object,\n\n /**\n * First view to show.\n */\n openTo: PropTypes.oneOf(['day', 'hours', 'minutes', 'month', 'seconds', 'year']),\n\n /**\n * Force rendering in particular orientation.\n */\n orientation: PropTypes.oneOf(['landscape', 'portrait']),\n\n /**\n * Make picker read only.\n * @default false\n */\n readOnly: PropTypes.bool,\n\n /**\n * Disable heavy animations.\n * @default typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)\n */\n reduceAnimations: PropTypes.bool,\n\n /**\n * Custom renderer for day. Check the [PickersDay](https://mui.com/x/api/date-pickers/pickers-day/) component.\n * @template TDate\n * @param {TDate} day The day to render.\n * @param {Array<TDate | null>} selectedDays The days currently selected.\n * @param {PickersDayProps<TDate>} pickersDayProps The props of the day to render.\n * @returns {JSX.Element} The element representing the day.\n */\n renderDay: PropTypes.func,\n\n /**\n * The `renderInput` prop allows you to customize the rendered input.\n * The `props` argument of this render prop contains props of [TextField](https://mui.com/material-ui/api/text-field/#props) that you need to forward.\n * Pay specific attention to the `ref` and `inputProps` keys.\n * @example ```jsx\n * renderInput={props => <TextField {...props} />}\n * ````\n * @param {MuiTextFieldPropsType} props The props of the input.\n * @returns {React.ReactNode} The node to render as the input.\n */\n renderInput: PropTypes.func.isRequired,\n\n /**\n * Component displaying when passed `loading` true.\n * @returns {React.ReactNode} The node to render when loading.\n * @default () => <span data-mui-test=\"loading-progress\">...</span>\n */\n renderLoading: PropTypes.func,\n\n /**\n * Custom formatter to be passed into Rifm component.\n * @param {string} str The un-formatted string.\n * @returns {string} The formatted string.\n */\n rifmFormatter: PropTypes.func,\n\n /**\n * Right arrow icon aria-label text.\n * @deprecated\n */\n rightArrowButtonText: PropTypes.string,\n\n /**\n * Disable specific date. @DateIOType\n * @template TDate\n * @param {TDate} day The date to test.\n * @returns {boolean} Returns `true` if the date should be disabled.\n */\n shouldDisableDate: PropTypes.func,\n\n /**\n * Disable specific months dynamically.\n * Works like `shouldDisableDate` but for month selection view @DateIOType.\n * @template TDate\n * @param {TDate} month The month to check.\n * @returns {boolean} If `true` the month will be disabled.\n */\n shouldDisableMonth: PropTypes.func,\n\n /**\n * Dynamically check if time is disabled or not.\n * If returns `false` appropriate time point will ot be acceptable.\n * @param {number} timeValue The value to check.\n * @param {ClockPickerView} clockType The clock type of the timeValue.\n * @returns {boolean} Returns `true` if the time should be disabled\n */\n shouldDisableTime: PropTypes.func,\n\n /**\n * Disable specific years dynamically.\n * Works like `shouldDisableDate` but for year selection view @DateIOType.\n * @template TDate\n * @param {TDate} year The year to test.\n * @returns {boolean} Returns `true` if the year should be disabled.\n */\n shouldDisableYear: PropTypes.func,\n\n /**\n * If `true`, days that have `outsideCurrentMonth={true}` are displayed.\n * @default false\n */\n showDaysOutsideCurrentMonth: PropTypes.bool,\n\n /**\n * If `true`, show the toolbar even in desktop mode.\n */\n showToolbar: PropTypes.bool,\n\n /**\n * Time tab icon.\n */\n timeIcon: PropTypes.node,\n\n /**\n * Component that will replace default toolbar renderer.\n * @default DateTimePickerToolbar\n */\n ToolbarComponent: PropTypes.elementType,\n\n /**\n * Date format, that is displaying in toolbar.\n */\n toolbarFormat: PropTypes.string,\n\n /**\n * Mobile picker date value placeholder, displaying if `value` === `null`.\n * @default '–'\n */\n toolbarPlaceholder: PropTypes.node,\n\n /**\n * Mobile picker title, displaying in the toolbar.\n * @default 'Select date & time'\n */\n toolbarTitle: PropTypes.node,\n\n /**\n * The value of the picker.\n */\n value: PropTypes.any,\n\n /**\n * Array of views to show.\n */\n views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'hours', 'minutes', 'month', 'seconds', 'year']).isRequired)\n} : void 0;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"displayStaticWrapperAs\", \"onChange\", \"ToolbarComponent\", \"value\", \"components\", \"componentsProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { useTimePickerDefaultizedProps, timePickerValueManager } from '../TimePicker/shared';\nimport { TimePickerToolbar } from '../TimePicker/TimePickerToolbar';\nimport { PickerStaticWrapper } from '../internals/components/PickerStaticWrapper/PickerStaticWrapper';\nimport { CalendarOrClockPicker } from '../internals/components/CalendarOrClockPicker';\nimport { useTimeValidation } from '../internals/hooks/validation/useTimeValidation';\nimport { usePickerState } from '../internals/hooks/usePickerState';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\n/**\n *\n * Demos:\n *\n * - [Time Picker](https://mui.com/x/react-date-pickers/time-picker/)\n *\n * API:\n *\n * - [StaticTimePicker API](https://mui.com/x/api/date-pickers/static-time-picker/)\n */\nexport const StaticTimePicker = /*#__PURE__*/React.forwardRef(function StaticTimePicker(inProps, ref) {\n const props = useTimePickerDefaultizedProps(inProps, 'MuiStaticTimePicker');\n\n const {\n displayStaticWrapperAs = 'mobile',\n ToolbarComponent = TimePickerToolbar,\n components,\n componentsProps\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const validationError = useTimeValidation(props) !== null;\n const {\n pickerProps,\n inputProps,\n wrapperProps\n } = usePickerState(props, timePickerValueManager);\n\n const DateInputProps = _extends({}, inputProps, other, {\n ref,\n validationError,\n components,\n componentsProps\n });\n\n return /*#__PURE__*/_jsx(PickerStaticWrapper, _extends({\n displayStaticWrapperAs: displayStaticWrapperAs,\n components: components,\n componentsProps: componentsProps\n }, wrapperProps, {\n children: /*#__PURE__*/_jsx(CalendarOrClockPicker, _extends({}, pickerProps, {\n toolbarTitle: props.label || props.toolbarTitle,\n ToolbarComponent: ToolbarComponent,\n DateInputProps: DateInputProps,\n components: components,\n componentsProps: componentsProps\n }, other))\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? StaticTimePicker.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Regular expression to detect \"accepted\" symbols.\n * @default /\\dap/gi\n */\n acceptRegex: PropTypes.instanceOf(RegExp),\n\n /**\n * 12h/24h view for hour selection clock.\n * @default `utils.is12HourCycleInCurrentLocale()`\n */\n ampm: PropTypes.bool,\n\n /**\n * Display ampm controls under the clock (instead of in the toolbar).\n * @default false\n */\n ampmInClock: PropTypes.bool,\n\n /**\n * className applied to the root component.\n */\n className: PropTypes.string,\n\n /**\n * If `true` the popup or dialog will immediately close after submitting full date.\n * @default `true` for Desktop, `false` for Mobile (based on the chosen wrapper and `desktopModeMediaQuery` prop).\n */\n closeOnSelect: PropTypes.bool,\n\n /**\n * Overrideable components.\n */\n components: PropTypes.any,\n\n /**\n * The props used for each component slot.\n * @default {}\n */\n componentsProps: PropTypes.object,\n\n /**\n * If `true`, the picker and text field are disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n\n /**\n * Do not ignore date part when validating min/max time.\n * @default false\n */\n disableIgnoringDatePartForTimeValidation: PropTypes.bool,\n\n /**\n * Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.\n * @default false\n */\n disableMaskedInput: PropTypes.bool,\n\n /**\n * Do not render open picker button (renders only text field with validation).\n * @default false\n */\n disableOpenPicker: PropTypes.bool,\n\n /**\n * Force static wrapper inner components to be rendered in mobile or desktop mode.\n * @default 'mobile'\n */\n displayStaticWrapperAs: PropTypes.oneOf(['desktop', 'mobile']),\n\n /**\n * Accessible text that helps user to understand which time and view is selected.\n * @template TDate\n * @param {ClockPickerView} view The current view rendered.\n * @param {TDate | null} time The current time.\n * @param {MuiPickersAdapter<TDate>} adapter The current date adapter.\n * @returns {string} The clock label.\n * @deprecated Use the `localeText` prop of `LocalizationProvider` instead, see https://mui.com/x/react-date-pickers/localization\n * @default <TDate extends any>(\n * view: ClockView,\n * time: TDate | null,\n * adapter: MuiPickersAdapter<TDate>,\n * ) =>\n * `Select ${view}. ${\n * time === null ? 'No time selected' : `Selected time is ${adapter.format(time, 'fullTime')}`\n * }`\n */\n getClockLabelText: PropTypes.func,\n\n /**\n * Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType\n * @template TInputDate, TDate\n * @param {TInputDate} date The date from which we want to add an aria-text.\n * @param {MuiPickersAdapter<TDate>} utils The utils to manipulate the date.\n * @returns {string} The aria-text to render inside the dialog.\n * @default (date, utils) => `Choose date, selected date is ${utils.format(utils.date(date), 'fullDate')}`\n */\n getOpenDialogAriaText: PropTypes.func,\n ignoreInvalidInputs: PropTypes.bool,\n\n /**\n * Props to pass to keyboard input adornment.\n */\n InputAdornmentProps: PropTypes.object,\n\n /**\n * Format string.\n */\n inputFormat: PropTypes.string,\n InputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.object\n })]),\n label: PropTypes.node,\n\n /**\n * Custom mask. Can be used to override generate from format. (e.g. `__/__/____ __:__` or `__/__/____ __:__ _M`).\n */\n mask: PropTypes.string,\n\n /**\n * Max time acceptable time.\n * For input validation date part of passed object will be ignored if `disableIgnoringDatePartForTimeValidation` not specified.\n */\n maxTime: PropTypes.any,\n\n /**\n * Min time acceptable time.\n * For input validation date part of passed object will be ignored if `disableIgnoringDatePartForTimeValidation` not specified.\n */\n minTime: PropTypes.any,\n\n /**\n * Step over minutes.\n * @default 1\n */\n minutesStep: PropTypes.number,\n\n /**\n * Callback fired when date is accepted @DateIOType.\n * @template TValue\n * @param {TValue} value The value that was just accepted.\n */\n onAccept: PropTypes.func,\n\n /**\n * Callback fired when the value (the selected date) changes @DateIOType.\n * @template TValue\n * @param {TValue} value The new parsed value.\n * @param {string} keyboardInputValue The current value of the keyboard input.\n */\n onChange: PropTypes.func.isRequired,\n\n /**\n * Callback that fired when input value or new `value` prop validation returns **new** validation error (or value is valid after error).\n * In case of validation error detected `reason` prop return non-null value and `TextField` must be displayed in `error` state.\n * This can be used to render appropriate form error.\n *\n * [Read the guide](https://next.material-ui-pickers.dev/guides/forms) about form integration and error displaying.\n * @DateIOType\n *\n * @template TError, TInputValue\n * @param {TError} reason The reason why the current value is not valid.\n * @param {TInputValue} value The invalid value.\n */\n onError: PropTypes.func,\n\n /**\n * Callback fired on view change.\n * @param {ClockPickerView} view The new view.\n */\n onViewChange: PropTypes.func,\n\n /**\n * Props to pass to keyboard adornment button.\n */\n OpenPickerButtonProps: PropTypes.object,\n\n /**\n * First view to show.\n */\n openTo: PropTypes.oneOf(['hours', 'minutes', 'seconds']),\n\n /**\n * Force rendering in particular orientation.\n */\n orientation: PropTypes.oneOf(['landscape', 'portrait']),\n\n /**\n * Make picker read only.\n * @default false\n */\n readOnly: PropTypes.bool,\n\n /**\n * The `renderInput` prop allows you to customize the rendered input.\n * The `props` argument of this render prop contains props of [TextField](https://mui.com/material-ui/api/text-field/#props) that you need to forward.\n * Pay specific attention to the `ref` and `inputProps` keys.\n * @example ```jsx\n * renderInput={props => <TextField {...props} />}\n * ````\n * @param {MuiTextFieldPropsType} props The props of the input.\n * @returns {React.ReactNode} The node to render as the input.\n */\n renderInput: PropTypes.func.isRequired,\n\n /**\n * Custom formatter to be passed into Rifm component.\n * @param {string} str The un-formatted string.\n * @returns {string} The formatted string.\n */\n rifmFormatter: PropTypes.func,\n\n /**\n * Dynamically check if time is disabled or not.\n * If returns `false` appropriate time point will ot be acceptable.\n * @param {number} timeValue The value to check.\n * @param {ClockPickerView} clockType The clock type of the timeValue.\n * @returns {boolean} Returns `true` if the time should be disabled\n */\n shouldDisableTime: PropTypes.func,\n\n /**\n * If `true`, show the toolbar even in desktop mode.\n */\n showToolbar: PropTypes.bool,\n\n /**\n * Component that will replace default toolbar renderer.\n * @default TimePickerToolbar\n */\n ToolbarComponent: PropTypes.elementType,\n\n /**\n * Mobile picker title, displaying in the toolbar.\n * @default 'Select time'\n */\n toolbarTitle: PropTypes.node,\n\n /**\n * The value of the picker.\n */\n value: PropTypes.any,\n\n /**\n * Array of views to show.\n */\n views: PropTypes.arrayOf(PropTypes.oneOf(['hours', 'minutes', 'seconds']).isRequired)\n} : void 0;","import { getPickersLocalization } from './utils/getPickersLocalization';\nconst nlNLPickers = {\n // Calendar navigation\n previousMonth: 'Vorige maand',\n nextMonth: 'Volgende maand',\n // View navigation\n openPreviousView: 'open vorige view',\n openNextView: 'open volgende view',\n calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'jaarweergave is geopend, schakel over naar kalenderweergave' : 'kalenderweergave is geopend, switch naar jaarweergave',\n // DateRange placeholders\n start: 'Start',\n end: 'Einde',\n // Action bar\n cancelButtonLabel: 'Annuleren',\n clearButtonLabel: 'Resetten',\n okButtonLabel: 'OK',\n todayButtonLabel: 'Vandaag',\n // Clock labels\n clockLabelText: (view, time, adapter) => `Selecteer ${view}. ${time === null ? 'Geen tijd geselecteerd' : `Geselecteerde tijd is ${adapter.format(time, 'fullTime')}`}`,\n hoursClockNumberText: hours => `${hours} uren`,\n minutesClockNumberText: minutes => `${minutes} minuten`,\n secondsClockNumberText: seconds => `${seconds} seconden`,\n // Open picker labels\n openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Kies datum, geselecteerde datum is ${utils.format(utils.date(rawValue), 'fullDate')}` : 'Kies datum',\n openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Kies tijd, geselecteerde tijd is ${utils.format(utils.date(rawValue), 'fullTime')}` : 'Kies tijd',\n // Table labels\n timeTableLabel: 'kies tijd',\n dateTableLabel: 'kies datum'\n};\nexport const nlNL = getPickersLocalization(nlNLPickers);","import { getPickersLocalization } from './utils/getPickersLocalization';\nconst ptBRPickers = {\n // Calendar navigation\n previousMonth: 'Mês anterior',\n nextMonth: 'Próximo mês',\n // View navigation\n openPreviousView: 'Abrir próxima seleção',\n openNextView: 'Abrir seleção anterior',\n calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'Seleção de ano está aberta, alternando para seleção de calendário' : 'Seleção de calendários está aberta, alternando para seleção de ano',\n // DateRange placeholders\n start: 'Início',\n end: 'Fim',\n // Action bar\n cancelButtonLabel: 'Cancelar',\n clearButtonLabel: 'Limpar',\n okButtonLabel: 'OK',\n todayButtonLabel: 'Hoje',\n // Clock labels\n clockLabelText: (view, time, adapter) => `Selecione ${view}. ${time === null ? 'Hora não selecionada' : `Selecionado a hora ${adapter.format(time, 'fullTime')}`}`,\n hoursClockNumberText: hours => `${hours} horas`,\n minutesClockNumberText: minutes => `${minutes} minutos`,\n secondsClockNumberText: seconds => `${seconds} segundos`,\n // Open picker labels\n openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Escolha uma data, data selecionada ${utils.format(utils.date(rawValue), 'fullDate')}` : 'Escolha uma data',\n openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Escolha uma hora, hora selecionada ${utils.format(utils.date(rawValue), 'fullTime')}` : 'Escolha uma hora',\n // Table labels\n timeTableLabel: 'escolha uma hora',\n dateTableLabel: 'escolha uma data'\n};\nexport const ptBR = getPickersLocalization(ptBRPickers);","import { getPickersLocalization } from './utils/getPickersLocalization'; // import { CalendarPickerView } from '../internals/models';\n// This object is not Partial<PickersLocaleText> because it is the default values\n\nconst trTRPickers = {\n // Calendar navigation\n previousMonth: 'Önceki ay',\n nextMonth: 'Sonraki ay',\n // View navigation\n openPreviousView: 'sonraki görünüm',\n openNextView: 'önceki görünüm',\n // calendarViewSwitchingButtonAriaLabel: (view: CalendarPickerView) => view === 'year' ? 'year view is open, switch to calendar view' : 'calendar view is open, switch to year view',\n // DateRange placeholders\n start: 'Başlangıç',\n end: 'Bitiş',\n // Action bar\n cancelButtonLabel: 'iptal',\n clearButtonLabel: 'Temizle',\n okButtonLabel: 'Tamam',\n todayButtonLabel: 'Bugün' // Clock labels\n // clockLabelText: (view, time, adapter) => `Select ${view}. ${time === null ? 'No time selected' : `Selected time is ${adapter.format(time, 'fullTime')}`}`,\n // hoursClockNumberText: hours => `${hours} hours`,\n // minutesClockNumberText: minutes => `${minutes} minutes`,\n // secondsClockNumberText: seconds => `${seconds} seconds`,\n // Open picker labels\n // openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Choose date, selected date is ${utils.format(utils.date(rawValue)!, 'fullDate')}` : 'Choose date',\n // openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Choose time, selected time is ${utils.format(utils.date(rawValue)!, 'fullTime')}` : 'Choose time',\n // Table labels\n // timeTableLabel: 'pick time',\n // dateTableLabel: 'pick date',\n\n};\nexport const trTR = getPickersLocalization(trTRPickers);","import { getPickersLocalization } from './utils/getPickersLocalization';\n// maps ClockPickerView to its translation\nconst views = {\n hours: 'Stunden',\n minutes: 'Minuten',\n seconds: 'Sekunden'\n};\nconst deDEPickers = {\n // Calendar navigation\n previousMonth: 'Letzter Monat',\n nextMonth: 'Nächster Monat',\n // View navigation\n openPreviousView: 'Letzte Ansicht öffnen',\n openNextView: 'Nächste Ansicht öffnen',\n calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'Jahresansicht ist geöffnet, zur Kalenderansicht wechseln' : 'Kalenderansicht ist geöffnet, zur Jahresansicht wechseln',\n // DateRange placeholders\n start: 'Beginn',\n end: 'Ende',\n // Action bar\n cancelButtonLabel: 'Abbrechen',\n clearButtonLabel: 'Löschen',\n okButtonLabel: 'OK',\n todayButtonLabel: 'Heute',\n // Clock labels\n clockLabelText: (view, time, adapter) => {\n var _views$view;\n\n return `${(_views$view = views[view]) != null ? _views$view : view} auswählen. ${time === null ? 'Keine Uhrzeit ausgewählt' : `Gewählte Uhrzeit ist ${adapter.format(time, 'fullTime')}`}`;\n },\n hoursClockNumberText: hours => `${hours} ${views.hours}`,\n minutesClockNumberText: minutes => `${minutes} ${views.minutes}`,\n secondsClockNumberText: seconds => `${seconds} ${views.seconds}`,\n // Open picker labels\n openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Datum auswählen, gewähltes Datum ist ${utils.format(utils.date(rawValue), 'fullDate')}` : 'Datum auswählen',\n openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Uhrzeit auswählen, gewählte Uhrzeit ist ${utils.format(utils.date(rawValue), 'fullTime')}` : 'Uhrzeit auswählen',\n // Table labels\n timeTableLabel: 'Uhrzeit auswählen',\n dateTableLabel: 'Datum auswählen'\n};\nexport const deDE = getPickersLocalization(deDEPickers);","import { getPickersLocalization } from './utils/getPickersLocalization';\nconst views = {\n hours: 'las horas',\n minutes: 'los minutos',\n seconds: 'los segundos'\n}; // This object is not Partial<PickersLocaleText> because it is the default values\n\nconst esESPickers = {\n // Calendar navigation\n previousMonth: 'Último mes',\n nextMonth: 'Próximo mes',\n // View navigation\n openPreviousView: 'abrir la última vista',\n openNextView: 'abrir la siguiente vista',\n calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'la vista del año está abierta, cambie a la vista de calendario' : 'la vista de calendario está abierta, cambie a la vista del año',\n // DateRange placeholders\n start: 'Empezar',\n end: 'Terminar',\n // Action bar\n cancelButtonLabel: 'Cancelar',\n clearButtonLabel: 'Limpia',\n okButtonLabel: 'OK',\n todayButtonLabel: 'Hoy',\n // Clock labels\n clockLabelText: (view, time, adapter) => `Seleccione ${views[view]}. ${time === null ? 'Sin tiempo seleccionado' : `El tiempo seleccionado es ${adapter.format(time, 'fullTime')}`}`,\n hoursClockNumberText: hours => `${hours} horas`,\n minutesClockNumberText: minutes => `${minutes} minutos`,\n secondsClockNumberText: seconds => `${seconds} segundos`,\n // Open picker labels\n openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Elige la fecha, la fecha elegida es ${utils.format(utils.date(rawValue), 'fullDate')}` : 'Elige la fecha',\n openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Elige la hora, la hora elegido es ${utils.format(utils.date(rawValue), 'fullTime')}` : 'Elige la hora',\n // Table labels\n timeTableLabel: 'elige la fecha',\n dateTableLabel: 'elige la hora'\n};\nexport const esES = getPickersLocalization(esESPickers);","import { getPickersLocalization } from './utils/getPickersLocalization';\nconst views = {\n hours: 'heures',\n minutes: 'minutes',\n seconds: 'secondes'\n};\nconst frFRPickers = {\n // Calendar navigation\n previousMonth: 'Mois précédent',\n nextMonth: 'Mois suivant',\n // View navigation\n openPreviousView: 'Ouvrir la vue précédente',\n openNextView: 'Ouvrir la vue suivante',\n calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'La vue année est ouverte, ouvrir la vue calendrier' : 'La vue calendrier est ouverte, ouvrir la vue année',\n // DateRange placeholders\n start: 'Début',\n end: 'Fin',\n // Action bar\n cancelButtonLabel: 'Annuler',\n clearButtonLabel: 'Vider',\n okButtonLabel: 'OK',\n todayButtonLabel: \"Aujourd'hui\",\n // Clock labels\n clockLabelText: (view, time, adapter) => `Choix des ${views[view]}. ${time === null ? 'Aucune heure choisie' : `L'heure choisie est ${adapter.format(time, 'fullTime')}`}`,\n hoursClockNumberText: hours => `${hours} heures`,\n minutesClockNumberText: minutes => `${minutes} minutes`,\n secondsClockNumberText: seconds => `${seconds} secondes`,\n // Open picker labels\n openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Choisir la date, la date sélectionnée est ${utils.format(utils.date(rawValue), 'fullDate')}` : 'Choisir la date',\n openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Choisir l'heure, l'heure sélectionnée est ${utils.format(utils.date(rawValue), 'fullTime')}` : \"Choisir l'heure\",\n // Table labels\n timeTableLabel: \"choix de l'heure\",\n dateTableLabel: 'choix de la date'\n};\nexport const frFR = getPickersLocalization(frFRPickers);","import { getPickersLocalization } from './utils/getPickersLocalization';\nconst nbNOPickers = {\n // Calendar navigation\n previousMonth: 'Forrige måned',\n nextMonth: 'Neste måned',\n // View navigation\n openPreviousView: 'åpne forrige visning',\n openNextView: 'åpne neste visning',\n calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'årsvisning er åpen, bytt til kalendervisning' : 'kalendervisning er åpen, bytt til årsvisning',\n // DateRange placeholders\n start: 'Start',\n end: 'Slutt',\n // Action bar\n cancelButtonLabel: 'Avbryt',\n clearButtonLabel: 'Fjern',\n okButtonLabel: 'OK',\n todayButtonLabel: 'I dag',\n // Clock labels\n clockLabelText: (view, time, adapter) => `Velg ${view}. ${time === null ? 'Ingen tid valgt' : `Valgt tid er ${adapter.format(time, 'fullTime')}`}`,\n hoursClockNumberText: hours => `${hours} timer`,\n minutesClockNumberText: minutes => `${minutes} minutter`,\n secondsClockNumberText: seconds => `${seconds} sekunder`,\n // Open picker labels\n openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Velg dato, valgt dato er ${utils.format(utils.date(rawValue), 'fullDate')}` : 'Velg dato',\n openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Velg tid, valgt tid er ${utils.format(utils.date(rawValue), 'fullTime')}` : 'Velg tid',\n // Table labels\n timeTableLabel: 'velg tid',\n dateTableLabel: 'velg dato'\n};\nexport const nbNO = getPickersLocalization(nbNOPickers);","import { getPickersLocalization } from './utils/getPickersLocalization';\nconst svSEPickers = {\n // Calendar navigation\n previousMonth: 'Föregående månad',\n nextMonth: 'Nästa månad',\n // View navigation\n openPreviousView: 'öppna föregående vy',\n openNextView: 'öppna nästa vy',\n calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'årsvyn är öppen, byt till kalendervy' : 'kalendervyn är öppen, byt till årsvy',\n // DateRange placeholders\n start: 'Start',\n end: 'Slut',\n // Action bar\n cancelButtonLabel: 'Avbryt',\n clearButtonLabel: 'Rensa',\n okButtonLabel: 'OK',\n todayButtonLabel: 'Idag',\n // Clock labels\n clockLabelText: (view, time, adapter) => `Select ${view}. ${time === null ? 'Ingen tid vald' : `Vald tid är ${adapter.format(time, 'fullTime')}`}`,\n hoursClockNumberText: hours => `${hours} timmar`,\n minutesClockNumberText: minutes => `${minutes} minuter`,\n secondsClockNumberText: seconds => `${seconds} sekunder`,\n // Open picker labels\n openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Välj datum, valt datum är ${utils.format(utils.date(rawValue), 'fullDate')}` : 'Välj datum',\n openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Välj tid, vald tid är ${utils.format(utils.date(rawValue), 'fullTime')}` : 'Välj tid',\n // Table labels\n timeTableLabel: 'välj tid',\n dateTableLabel: 'välj datum'\n};\nexport const svSE = getPickersLocalization(svSEPickers);","import { getPickersLocalization } from './utils/getPickersLocalization';\nconst views = {\n hours: 'le ore',\n minutes: 'i minuti',\n seconds: 'i secondi'\n}; // This object is not Partial<PickersLocaleText> because it is the default values\n\nconst itITPickers = {\n // Calendar navigation\n previousMonth: 'Mese precedente',\n nextMonth: 'Mese successivo',\n // View navigation\n openPreviousView: 'apri la vista precedente',\n openNextView: 'apri la vista successiva',\n calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? \"la vista dell'anno è aperta, passare alla vista del calendario\" : \"la vista dell'calendario è aperta, passare alla vista dell'anno\",\n // DateRange placeholders\n start: 'Inizio',\n end: 'Fine',\n // Action bar\n cancelButtonLabel: 'Cancellare',\n clearButtonLabel: 'Sgomberare',\n okButtonLabel: 'OK',\n todayButtonLabel: 'Oggi',\n // Clock labels\n clockLabelText: (view, time, adapter) => `Seleziona ${views[view]}. ${time === null ? 'Nessun orario selezionato' : `L'ora selezionata è ${adapter.format(time, 'fullTime')}`}`,\n hoursClockNumberText: hours => `${hours} ore`,\n minutesClockNumberText: minutes => `${minutes} minuti`,\n secondsClockNumberText: seconds => `${seconds} secondi`,\n // Open picker labels\n openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Scegli la data, la data selezionata è ${utils.format(utils.date(rawValue), 'fullDate')}` : 'Scegli la data',\n openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Scegli l'ora, l'ora selezionata è ${utils.format(utils.date(rawValue), 'fullTime')}` : \"Scegli l'ora\",\n // Table labels\n timeTableLabel: 'scegli un ora',\n dateTableLabel: 'scegli una data'\n};\nexport const itIT = getPickersLocalization(itITPickers);","import { getPickersLocalization } from './utils/getPickersLocalization';\nconst views = {\n hours: '小时',\n minutes: '分钟',\n seconds: '秒'\n}; // This object is not Partial<PickersLocaleText> because it is the default values\n\nconst zhCNPickers = {\n // Calendar navigation\n previousMonth: '上个月',\n nextMonth: '下个月',\n // View navigation\n openPreviousView: '前一个视图',\n openNextView: '下一个视图',\n calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? '年视图已打开,切换为日历视图' : '日历视图已打开,切换为年视图',\n // DateRange placeholders\n start: '开始',\n end: '结束',\n // Action bar\n cancelButtonLabel: '取消',\n clearButtonLabel: '清除',\n okButtonLabel: '确认',\n todayButtonLabel: '今天',\n // Clock labels\n clockLabelText: (view, time, adapter) => `Select ${views[view]}. ${time === null ? '未选择时间' : `已选择${adapter.format(time, 'fullTime')}`}`,\n hoursClockNumberText: hours => `${hours}小时`,\n minutesClockNumberText: minutes => `${minutes}分钟`,\n secondsClockNumberText: seconds => `${seconds}秒`,\n // Open picker labels\n openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `选择日期,已选择${utils.format(utils.date(rawValue), 'fullDate')}` : '选择日期',\n openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `选择时间,已选择${utils.format(utils.date(rawValue), 'fullTime')}` : '选择时间',\n // Table labels\n timeTableLabel: '选择时间',\n dateTableLabel: '选择日期'\n};\nexport const zhCN = getPickersLocalization(zhCNPickers);","/** @license MUI v5.0.0-beta.6\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nexport * from './CalendarPicker';\nexport * from './CalendarPickerSkeleton';\nexport * from './ClockPicker';\nexport * from './DatePicker';\nexport * from './DateTimePicker';\nexport * from './DesktopDatePicker';\nexport * from './DesktopDateTimePicker';\nexport * from './DesktopTimePicker';\nexport * from './LocalizationProvider';\nexport * from './MobileDatePicker';\nexport * from './MobileDateTimePicker';\nexport * from './MobileTimePicker';\nexport * from './MonthPicker';\nexport * from './PickersDay';\nexport * from './StaticDatePicker';\nexport * from './StaticDateTimePicker';\nexport * from './StaticTimePicker';\nexport * from './TimePicker';\nexport * from './YearPicker';\nexport * from './locales';\nexport { PickerStaticWrapper } from './internals/components/PickerStaticWrapper';","import { useRef } from \"react\";\n\n// Saves incoming handler to the ref in order to avoid \"useCallback hell\"\nexport function useEventCallback<T>(handler?: (value: T) => void): (value: T) => void {\n const callbackRef = useRef(handler);\n const fn = useRef((value: T) => {\n callbackRef.current && callbackRef.current(value);\n });\n callbackRef.current = handler;\n\n return fn.current;\n}\n","// Clamps a value between an upper and lower bound.\n// We use ternary operators because it makes the minified code\n// 2 times shorter then `Math.min(Math.max(a,b),c)`\nexport const clamp = (number: number, min = 0, max = 1): number => {\n return number > max ? max : number < min ? min : number;\n};\n","import React, { useRef, useMemo, useEffect } from \"react\";\n\nimport { useEventCallback } from \"../../hooks/useEventCallback\";\nimport { clamp } from \"../../utils/clamp\";\n\nexport interface Interaction {\n left: number;\n top: number;\n}\n\n// Check if an event was triggered by touch\nconst isTouch = (event: MouseEvent | TouchEvent): event is TouchEvent => \"touches\" in event;\n\n// Finds a proper touch point by its identifier\nconst getTouchPoint = (touches: TouchList, touchId: null | number): Touch => {\n for (let i = 0; i < touches.length; i++) {\n if (touches[i].identifier === touchId) return touches[i];\n }\n return touches[0];\n};\n\n// Finds the proper window object to fix iframe embedding issues\nconst getParentWindow = (node?: HTMLDivElement | null): Window => {\n return (node && node.ownerDocument.defaultView) || self;\n};\n\n// Returns a relative position of the pointer inside the node's bounding box\nconst getRelativePosition = (\n node: HTMLDivElement,\n event: MouseEvent | TouchEvent,\n touchId: null | number\n): Interaction => {\n const rect = node.getBoundingClientRect();\n\n // Get user's pointer position from `touches` array if it's a `TouchEvent`\n const pointer = isTouch(event) ? getTouchPoint(event.touches, touchId) : (event as MouseEvent);\n\n return {\n left: clamp((pointer.pageX - (rect.left + getParentWindow(node).pageXOffset)) / rect.width),\n top: clamp((pointer.pageY - (rect.top + getParentWindow(node).pageYOffset)) / rect.height),\n };\n};\n\n// Browsers introduced an intervention, making touch events passive by default.\n// This workaround removes `preventDefault` call from the touch handlers.\n// https://github.com/facebook/react/issues/19651\nconst preventDefaultMove = (event: MouseEvent | TouchEvent): void => {\n !isTouch(event) && event.preventDefault();\n};\n\n// Prevent mobile browsers from handling mouse events (conflicting with touch ones).\n// If we detected a touch interaction before, we prefer reacting to touch events only.\nconst isInvalid = (event: MouseEvent | TouchEvent, hasTouch: boolean): boolean => {\n return hasTouch && !isTouch(event);\n};\n\ninterface Props {\n onMove: (interaction: Interaction) => void;\n onKey: (offset: Interaction) => void;\n children: React.ReactNode;\n}\n\nconst InteractiveBase = ({ onMove, onKey, ...rest }: Props) => {\n const container = useRef<HTMLDivElement>(null);\n const onMoveCallback = useEventCallback<Interaction>(onMove);\n const onKeyCallback = useEventCallback<Interaction>(onKey);\n const touchId = useRef<null | number>(null);\n const hasTouch = useRef(false);\n\n const [handleMoveStart, handleKeyDown, toggleDocumentEvents] = useMemo(() => {\n const handleMoveStart = ({ nativeEvent }: React.MouseEvent | React.TouchEvent) => {\n const el = container.current;\n if (!el) return;\n\n // Prevent text selection\n preventDefaultMove(nativeEvent);\n\n if (isInvalid(nativeEvent, hasTouch.current) || !el) return;\n\n if (isTouch(nativeEvent)) {\n hasTouch.current = true;\n const changedTouches = nativeEvent.changedTouches || [];\n if (changedTouches.length) touchId.current = changedTouches[0].identifier;\n }\n\n el.focus();\n onMoveCallback(getRelativePosition(el, nativeEvent, touchId.current));\n toggleDocumentEvents(true);\n };\n\n const handleMove = (event: MouseEvent | TouchEvent) => {\n // Prevent text selection\n preventDefaultMove(event);\n\n // If user moves the pointer outside of the window or iframe bounds and release it there,\n // `mouseup`/`touchend` won't be fired. In order to stop the picker from following the cursor\n // after the user has moved the mouse/finger back to the document, we check `event.buttons`\n // and `event.touches`. It allows us to detect that the user is just moving his pointer\n // without pressing it down\n const isDown = isTouch(event) ? event.touches.length > 0 : event.buttons > 0;\n\n if (isDown && container.current) {\n onMoveCallback(getRelativePosition(container.current, event, touchId.current));\n } else {\n toggleDocumentEvents(false);\n }\n };\n\n const handleMoveEnd = () => toggleDocumentEvents(false);\n\n const handleKeyDown = (event: React.KeyboardEvent) => {\n const keyCode = event.which || event.keyCode;\n\n // Ignore all keys except arrow ones\n if (keyCode < 37 || keyCode > 40) return;\n // Do not scroll page by arrow keys when document is focused on the element\n event.preventDefault();\n // Send relative offset to the parent component.\n // We use codes (37←, 38↑, 39→, 40↓) instead of keys ('ArrowRight', 'ArrowDown', etc)\n // to reduce the size of the library\n onKeyCallback({\n left: keyCode === 39 ? 0.05 : keyCode === 37 ? -0.05 : 0,\n top: keyCode === 40 ? 0.05 : keyCode === 38 ? -0.05 : 0,\n });\n };\n\n function toggleDocumentEvents(state?: boolean) {\n const touch = hasTouch.current;\n const el = container.current;\n const parentWindow = getParentWindow(el);\n\n // Add or remove additional pointer event listeners\n const toggleEvent = state ? parentWindow.addEventListener : parentWindow.removeEventListener;\n toggleEvent(touch ? \"touchmove\" : \"mousemove\", handleMove);\n toggleEvent(touch ? \"touchend\" : \"mouseup\", handleMoveEnd);\n }\n\n return [handleMoveStart, handleKeyDown, toggleDocumentEvents];\n }, [onKeyCallback, onMoveCallback]);\n\n // Remove window event listeners before unmounting\n useEffect(() => toggleDocumentEvents, [toggleDocumentEvents]);\n\n return (\n <div\n {...rest}\n onTouchStart={handleMoveStart}\n onMouseDown={handleMoveStart}\n className=\"react-colorful__interactive\"\n ref={container}\n onKeyDown={handleKeyDown}\n tabIndex={0}\n role=\"slider\"\n />\n );\n};\n\nexport const Interactive = React.memo(InteractiveBase);\n","export const formatClassName = (names: unknown[]): string => names.filter(Boolean).join(\" \");\n","import React from \"react\";\nimport { formatClassName } from \"../../utils/format\";\n\ninterface Props {\n className?: string;\n top?: number;\n left: number;\n color: string;\n}\n\nexport const Pointer = ({ className, color, left, top = 0.5 }: Props): JSX.Element => {\n const nodeClassName = formatClassName([\"react-colorful__pointer\", className]);\n\n const style = {\n top: `${top * 100}%`,\n left: `${left * 100}%`,\n };\n\n return (\n <div className={nodeClassName} style={style}>\n <div className=\"react-colorful__pointer-fill\" style={{ backgroundColor: color }} />\n </div>\n );\n};\n","export const round = (number: number, digits = 0, base = Math.pow(10, digits)): number => {\n return Math.round(base * number) / base;\n};\n","import { round } from \"./round\";\nimport { RgbaColor, RgbColor, HslaColor, HslColor, HsvaColor, HsvColor } from \"../types\";\n\n/**\n * Valid CSS <angle> units.\n * https://developer.mozilla.org/en-US/docs/Web/CSS/angle\n */\nconst angleUnits: Record<string, number> = {\n grad: 360 / 400,\n turn: 360,\n rad: 360 / (Math.PI * 2),\n};\n\nexport const hexToHsva = (hex: string): HsvaColor => rgbaToHsva(hexToRgba(hex));\n\nexport const hexToRgba = (hex: string): RgbaColor => {\n if (hex[0] === \"#\") hex = hex.substring(1);\n\n if (hex.length < 6) {\n return {\n r: parseInt(hex[0] + hex[0], 16),\n g: parseInt(hex[1] + hex[1], 16),\n b: parseInt(hex[2] + hex[2], 16),\n a: hex.length === 4 ? round(parseInt(hex[3] + hex[3], 16) / 255, 2) : 1,\n };\n }\n\n return {\n r: parseInt(hex.substring(0, 2), 16),\n g: parseInt(hex.substring(2, 4), 16),\n b: parseInt(hex.substring(4, 6), 16),\n a: hex.length === 8 ? round(parseInt(hex.substring(6, 8), 16) / 255, 2) : 1,\n };\n};\n\nexport const parseHue = (value: string, unit = \"deg\"): number => {\n return Number(value) * (angleUnits[unit] || 1);\n};\n\nexport const hslaStringToHsva = (hslString: string): HsvaColor => {\n const matcher = /hsla?\\(?\\s*(-?\\d*\\.?\\d+)(deg|rad|grad|turn)?[,\\s]+(-?\\d*\\.?\\d+)%?[,\\s]+(-?\\d*\\.?\\d+)%?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i;\n const match = matcher.exec(hslString);\n\n if (!match) return { h: 0, s: 0, v: 0, a: 1 };\n\n return hslaToHsva({\n h: parseHue(match[1], match[2]),\n s: Number(match[3]),\n l: Number(match[4]),\n a: match[5] === undefined ? 1 : Number(match[5]) / (match[6] ? 100 : 1),\n });\n};\n\nexport const hslStringToHsva = hslaStringToHsva;\n\nexport const hslaToHsva = ({ h, s, l, a }: HslaColor): HsvaColor => {\n s *= (l < 50 ? l : 100 - l) / 100;\n\n return {\n h: h,\n s: s > 0 ? ((2 * s) / (l + s)) * 100 : 0,\n v: l + s,\n a,\n };\n};\n\nexport const hsvaToHex = (hsva: HsvaColor): string => rgbaToHex(hsvaToRgba(hsva));\n\nexport const hsvaToHsla = ({ h, s, v, a }: HsvaColor): HslaColor => {\n const hh = ((200 - s) * v) / 100;\n\n return {\n h: round(h),\n s: round(hh > 0 && hh < 200 ? ((s * v) / 100 / (hh <= 100 ? hh : 200 - hh)) * 100 : 0),\n l: round(hh / 2),\n a: round(a, 2),\n };\n};\n\nexport const hsvaToHslString = (hsva: HsvaColor): string => {\n const { h, s, l } = hsvaToHsla(hsva);\n return `hsl(${h}, ${s}%, ${l}%)`;\n};\n\nexport const hsvaToHsvString = (hsva: HsvaColor): string => {\n const { h, s, v } = roundHsva(hsva);\n return `hsv(${h}, ${s}%, ${v}%)`;\n};\n\nexport const hsvaToHsvaString = (hsva: HsvaColor): string => {\n const { h, s, v, a } = roundHsva(hsva);\n return `hsva(${h}, ${s}%, ${v}%, ${a})`;\n};\n\nexport const hsvaToHslaString = (hsva: HsvaColor): string => {\n const { h, s, l, a } = hsvaToHsla(hsva);\n return `hsla(${h}, ${s}%, ${l}%, ${a})`;\n};\n\nexport const hsvaToRgba = ({ h, s, v, a }: HsvaColor): RgbaColor => {\n h = (h / 360) * 6;\n s = s / 100;\n v = v / 100;\n\n const hh = Math.floor(h),\n b = v * (1 - s),\n c = v * (1 - (h - hh) * s),\n d = v * (1 - (1 - h + hh) * s),\n module = hh % 6;\n\n return {\n r: round([v, c, b, b, d, v][module] * 255),\n g: round([d, v, v, c, b, b][module] * 255),\n b: round([b, b, d, v, v, c][module] * 255),\n a: round(a, 2),\n };\n};\n\nexport const hsvaToRgbString = (hsva: HsvaColor): string => {\n const { r, g, b } = hsvaToRgba(hsva);\n return `rgb(${r}, ${g}, ${b})`;\n};\n\nexport const hsvaToRgbaString = (hsva: HsvaColor): string => {\n const { r, g, b, a } = hsvaToRgba(hsva);\n return `rgba(${r}, ${g}, ${b}, ${a})`;\n};\n\nexport const hsvaStringToHsva = (hsvString: string): HsvaColor => {\n const matcher = /hsva?\\(?\\s*(-?\\d*\\.?\\d+)(deg|rad|grad|turn)?[,\\s]+(-?\\d*\\.?\\d+)%?[,\\s]+(-?\\d*\\.?\\d+)%?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i;\n const match = matcher.exec(hsvString);\n\n if (!match) return { h: 0, s: 0, v: 0, a: 1 };\n\n return roundHsva({\n h: parseHue(match[1], match[2]),\n s: Number(match[3]),\n v: Number(match[4]),\n a: match[5] === undefined ? 1 : Number(match[5]) / (match[6] ? 100 : 1),\n });\n};\n\nexport const hsvStringToHsva = hsvaStringToHsva;\n\nexport const rgbaStringToHsva = (rgbaString: string): HsvaColor => {\n const matcher = /rgba?\\(?\\s*(-?\\d*\\.?\\d+)(%)?[,\\s]+(-?\\d*\\.?\\d+)(%)?[,\\s]+(-?\\d*\\.?\\d+)(%)?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i;\n const match = matcher.exec(rgbaString);\n\n if (!match) return { h: 0, s: 0, v: 0, a: 1 };\n\n return rgbaToHsva({\n r: Number(match[1]) / (match[2] ? 100 / 255 : 1),\n g: Number(match[3]) / (match[4] ? 100 / 255 : 1),\n b: Number(match[5]) / (match[6] ? 100 / 255 : 1),\n a: match[7] === undefined ? 1 : Number(match[7]) / (match[8] ? 100 : 1),\n });\n};\n\nexport const rgbStringToHsva = rgbaStringToHsva;\n\nconst format = (number: number) => {\n const hex = number.toString(16);\n return hex.length < 2 ? \"0\" + hex : hex;\n};\n\nexport const rgbaToHex = ({ r, g, b, a }: RgbaColor): string => {\n const alphaHex = a < 1 ? format(round(a * 255)) : \"\";\n return \"#\" + format(r) + format(g) + format(b) + alphaHex;\n};\n\nexport const rgbaToHsva = ({ r, g, b, a }: RgbaColor): HsvaColor => {\n const max = Math.max(r, g, b);\n const delta = max - Math.min(r, g, b);\n\n // prettier-ignore\n const hh = delta\n ? max === r\n ? (g - b) / delta\n : max === g\n ? 2 + (b - r) / delta\n : 4 + (r - g) / delta\n : 0;\n\n return {\n h: round(60 * (hh < 0 ? hh + 6 : hh)),\n s: round(max ? (delta / max) * 100 : 0),\n v: round((max / 255) * 100),\n a,\n };\n};\n\nexport const roundHsva = (hsva: HsvaColor): HsvaColor => ({\n h: round(hsva.h),\n s: round(hsva.s),\n v: round(hsva.v),\n a: round(hsva.a, 2),\n});\n\nexport const rgbaToRgb = ({ r, g, b }: RgbaColor): RgbColor => ({ r, g, b });\n\nexport const hslaToHsl = ({ h, s, l }: HslaColor): HslColor => ({ h, s, l });\n\nexport const hsvaToHsv = (hsva: HsvaColor): HsvColor => {\n const { h, s, v } = roundHsva(hsva);\n return { h, s, v };\n};\n","import React from \"react\";\n\nimport { Interactive, Interaction } from \"./Interactive\";\nimport { Pointer } from \"./Pointer\";\n\nimport { hsvaToHslString } from \"../../utils/convert\";\nimport { formatClassName } from \"../../utils/format\";\nimport { clamp } from \"../../utils/clamp\";\nimport { round } from \"../../utils/round\";\n\ninterface Props {\n className?: string;\n hue: number;\n onChange: (newHue: { h: number }) => void;\n}\n\nconst HueBase = ({ className, hue, onChange }: Props) => {\n const handleMove = (interaction: Interaction) => {\n onChange({ h: 360 * interaction.left });\n };\n\n const handleKey = (offset: Interaction) => {\n // Hue measured in degrees of the color circle ranging from 0 to 360\n onChange({\n h: clamp(hue + offset.left * 360, 0, 360),\n });\n };\n\n const nodeClassName = formatClassName([\"react-colorful__hue\", className]);\n\n return (\n <div className={nodeClassName}>\n <Interactive\n onMove={handleMove}\n onKey={handleKey}\n aria-label=\"Hue\"\n aria-valuenow={round(hue)}\n aria-valuemax=\"360\"\n aria-valuemin=\"0\"\n >\n <Pointer\n className=\"react-colorful__hue-pointer\"\n left={hue / 360}\n color={hsvaToHslString({ h: hue, s: 100, v: 100, a: 1 })}\n />\n </Interactive>\n </div>\n );\n};\n\nexport const Hue = React.memo(HueBase);\n","import React from \"react\";\nimport { Interactive, Interaction } from \"./Interactive\";\nimport { Pointer } from \"./Pointer\";\nimport { HsvaColor } from \"../../types\";\nimport { hsvaToHslString } from \"../../utils/convert\";\nimport { clamp } from \"../../utils/clamp\";\nimport { round } from \"../../utils/round\";\n\ninterface Props {\n hsva: HsvaColor;\n onChange: (newColor: { s: number; v: number }) => void;\n}\n\nconst SaturationBase = ({ hsva, onChange }: Props) => {\n const handleMove = (interaction: Interaction) => {\n onChange({\n s: interaction.left * 100,\n v: 100 - interaction.top * 100,\n });\n };\n\n const handleKey = (offset: Interaction) => {\n // Saturation and brightness always fit into [0, 100] range\n onChange({\n s: clamp(hsva.s + offset.left * 100, 0, 100),\n v: clamp(hsva.v - offset.top * 100, 0, 100),\n });\n };\n\n const containerStyle = {\n backgroundColor: hsvaToHslString({ h: hsva.h, s: 100, v: 100, a: 1 }),\n };\n\n return (\n <div className=\"react-colorful__saturation\" style={containerStyle}>\n <Interactive\n onMove={handleMove}\n onKey={handleKey}\n aria-label=\"Color\"\n aria-valuetext={`Saturation ${round(hsva.s)}%, Brightness ${round(hsva.v)}%`}\n >\n <Pointer\n className=\"react-colorful__saturation-pointer\"\n top={1 - hsva.v / 100}\n left={hsva.s / 100}\n color={hsvaToHslString(hsva)}\n />\n </Interactive>\n </div>\n );\n};\n\nexport const Saturation = React.memo(SaturationBase);\n","import { hexToRgba } from \"./convert\";\nimport { ObjectColor } from \"../types\";\n\nexport const equalColorObjects = (first: ObjectColor, second: ObjectColor): boolean => {\n if (first === second) return true;\n\n for (const prop in first) {\n // The following allows for a type-safe calling of this function (first & second have to be HSL, HSV, or RGB)\n // with type-unsafe iterating over object keys. TS does not allow this without an index (`[key: string]: number`)\n // on an object to define how iteration is normally done. To ensure extra keys are not allowed on our types,\n // we must cast our object to unknown (as RGB demands `r` be a key, while `Record<string, x>` does not care if\n // there is or not), and then as a type TS can iterate over.\n if (\n ((first as unknown) as Record<string, number>)[prop] !==\n ((second as unknown) as Record<string, number>)[prop]\n )\n return false;\n }\n\n return true;\n};\n\nexport const equalColorString = (first: string, second: string): boolean => {\n return first.replace(/\\s/g, \"\") === second.replace(/\\s/g, \"\");\n};\n\nexport const equalHex = (first: string, second: string): boolean => {\n if (first.toLowerCase() === second.toLowerCase()) return true;\n\n // To compare colors like `#FFF` and `ffffff` we convert them into RGB objects\n return equalColorObjects(hexToRgba(first), hexToRgba(second));\n};\n","import { useState, useEffect, useCallback, useRef } from \"react\";\nimport { ColorModel, AnyColor, HsvaColor } from \"../types\";\nimport { equalColorObjects } from \"../utils/compare\";\nimport { useEventCallback } from \"./useEventCallback\";\n\nexport function useColorManipulation<T extends AnyColor>(\n colorModel: ColorModel<T>,\n color: T,\n onChange?: (color: T) => void\n): [HsvaColor, (color: Partial<HsvaColor>) => void] {\n // Save onChange callback in the ref for avoiding \"useCallback hell\"\n const onChangeCallback = useEventCallback<T>(onChange);\n\n // No matter which color model is used (HEX, RGB(A) or HSL(A)),\n // all internal calculations are based on HSVA model\n const [hsva, updateHsva] = useState<HsvaColor>(() => colorModel.toHsva(color));\n\n // By using this ref we're able to prevent extra updates\n // and the effects recursion during the color conversion\n const cache = useRef({ color, hsva });\n\n // Update local HSVA-value if `color` property value is changed,\n // but only if that's not the same color that we just sent to the parent\n useEffect(() => {\n if (!colorModel.equal(color, cache.current.color)) {\n const newHsva = colorModel.toHsva(color);\n cache.current = { hsva: newHsva, color };\n updateHsva(newHsva);\n }\n }, [color, colorModel]);\n\n // Trigger `onChange` callback only if an updated color is different from cached one;\n // save the new color to the ref to prevent unnecessary updates\n useEffect(() => {\n let newColor;\n if (\n !equalColorObjects(hsva, cache.current.hsva) &&\n !colorModel.equal((newColor = colorModel.fromHsva(hsva)), cache.current.color)\n ) {\n cache.current = { hsva, color: newColor };\n onChangeCallback(newColor);\n }\n }, [hsva, colorModel, onChangeCallback]);\n\n // Merge the current HSVA color object with updated params.\n // For example, when a child component sends `h` or `s` only\n const handleChange = useCallback((params: Partial<HsvaColor>) => {\n updateHsva((current) => Object.assign({}, current, params));\n }, []);\n\n return [hsva, handleChange];\n}\n","declare const __webpack_nonce__: string | undefined;\nlet nonce: string | undefined;\n\n/**\n * Returns a nonce hash included by Webpack or the one defined manually by developer.\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/nonce\n * https://webpack.js.org/guides/csp/\n */\nexport const getNonce = (): string | undefined => {\n if (nonce) return nonce;\n if (typeof __webpack_nonce__ !== \"undefined\") return __webpack_nonce__;\n return undefined;\n};\n\n/**\n * Signs the style tag with a base64-encoded string (nonce) to conforms to Content Security Policies.\n * This function has to be invoked before any picker is rendered if you aren't using Webpack for CSP.\n */\nexport const setNonce = (hash: string): void => {\n nonce = hash;\n};\n","import { useLayoutEffect, useEffect } from \"react\";\n\n// React currently throws a warning when using useLayoutEffect on the server.\n// To get around it, we can conditionally useEffect on the server (no-op) and\n// useLayoutEffect in the browser.\nexport const useIsomorphicLayoutEffect =\n typeof window !== \"undefined\" ? useLayoutEffect : useEffect;\n","import { RefObject } from \"react\";\n\nimport { useIsomorphicLayoutEffect } from \"./useIsomorphicLayoutEffect\";\nimport { getNonce } from \"../utils/nonce\";\n\n// Bundler is configured to load this as a processed minified CSS-string\nimport styles from \"../css/styles.css\";\n\nconst styleElementMap: Map<Document, HTMLStyleElement> = new Map();\n\n/**\n * Injects CSS code into the document's <head>\n */\nexport const useStyleSheet = (nodeRef: RefObject<HTMLDivElement>): void => {\n useIsomorphicLayoutEffect(() => {\n const parentDocument = nodeRef.current ? nodeRef.current.ownerDocument : document;\n\n if (typeof parentDocument !== \"undefined\" && !styleElementMap.has(parentDocument)) {\n const styleElement = parentDocument.createElement(\"style\");\n styleElement.innerHTML = styles;\n styleElementMap.set(parentDocument, styleElement);\n\n // Conform to CSP rules by setting `nonce` attribute to the inline styles\n const nonce = getNonce();\n if (nonce) styleElement.setAttribute(\"nonce\", nonce);\n\n parentDocument.head.appendChild(styleElement);\n }\n }, []);\n};\n","import React, { useRef } from \"react\";\n\nimport { Hue } from \"./Hue\";\nimport { Saturation } from \"./Saturation\";\n\nimport { ColorModel, ColorPickerBaseProps, AnyColor } from \"../../types\";\nimport { useColorManipulation } from \"../../hooks/useColorManipulation\";\nimport { useStyleSheet } from \"../../hooks/useStyleSheet\";\nimport { formatClassName } from \"../../utils/format\";\n\ninterface Props<T extends AnyColor> extends Partial<ColorPickerBaseProps<T>> {\n colorModel: ColorModel<T>;\n}\n\nexport const ColorPicker = <T extends AnyColor>({\n className,\n colorModel,\n color = colorModel.defaultColor,\n onChange,\n ...rest\n}: Props<T>): JSX.Element => {\n const nodeRef = useRef<HTMLDivElement>(null);\n useStyleSheet(nodeRef);\n\n const [hsva, updateHsva] = useColorManipulation<T>(colorModel, color, onChange);\n\n const nodeClassName = formatClassName([\"react-colorful\", className]);\n\n return (\n <div {...rest} ref={nodeRef} className={nodeClassName}>\n <Saturation hsva={hsva} onChange={updateHsva} />\n <Hue hue={hsva.h} onChange={updateHsva} className=\"react-colorful__last-control\" />\n </div>\n );\n};\n","import React from \"react\";\n\nimport { ColorPicker } from \"./common/ColorPicker\";\nimport { ColorModel, ColorPickerBaseProps } from \"../types\";\nimport { equalHex } from \"../utils/compare\";\nimport { hexToHsva, hsvaToHex } from \"../utils/convert\";\n\nconst colorModel: ColorModel<string> = {\n defaultColor: \"000\",\n toHsva: hexToHsva,\n fromHsva: ({ h, s, v }) => hsvaToHex({ h, s, v, a: 1 }),\n equal: equalHex,\n};\n\nexport const HexColorPicker = (props: Partial<ColorPickerBaseProps<string>>): JSX.Element => (\n <ColorPicker {...props} colorModel={colorModel} />\n);\n","import React from \"react\";\n\nimport { Interactive, Interaction } from \"./Interactive\";\nimport { Pointer } from \"./Pointer\";\n\nimport { hsvaToHslaString } from \"../../utils/convert\";\nimport { formatClassName } from \"../../utils/format\";\nimport { clamp } from \"../../utils/clamp\";\nimport { round } from \"../../utils/round\";\nimport { HsvaColor } from \"../../types\";\n\ninterface Props {\n className?: string;\n hsva: HsvaColor;\n onChange: (newAlpha: { a: number }) => void;\n}\n\nexport const Alpha = ({ className, hsva, onChange }: Props): JSX.Element => {\n const handleMove = (interaction: Interaction) => {\n onChange({ a: interaction.left });\n };\n\n const handleKey = (offset: Interaction) => {\n // Alpha always fit into [0, 1] range\n onChange({ a: clamp(hsva.a + offset.left) });\n };\n\n // We use `Object.assign` instead of the spread operator\n // to prevent adding the polyfill (about 150 bytes gzipped)\n const colorFrom = hsvaToHslaString(Object.assign({}, hsva, { a: 0 }));\n const colorTo = hsvaToHslaString(Object.assign({}, hsva, { a: 1 }));\n\n const gradientStyle = {\n backgroundImage: `linear-gradient(90deg, ${colorFrom}, ${colorTo})`,\n };\n\n const nodeClassName = formatClassName([\"react-colorful__alpha\", className]);\n const ariaValue = round(hsva.a * 100);\n\n return (\n <div className={nodeClassName}>\n <div className=\"react-colorful__alpha-gradient\" style={gradientStyle} />\n <Interactive\n onMove={handleMove}\n onKey={handleKey}\n aria-label=\"Alpha\"\n aria-valuetext={`${ariaValue}%`}\n aria-valuenow={ariaValue}\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n >\n <Pointer\n className=\"react-colorful__alpha-pointer\"\n left={hsva.a}\n color={hsvaToHslaString(hsva)}\n />\n </Interactive>\n </div>\n );\n};\n","import React, { useRef } from \"react\";\n\nimport { Hue } from \"./Hue\";\nimport { Saturation } from \"./Saturation\";\nimport { Alpha } from \"./Alpha\";\n\nimport { ColorModel, ColorPickerBaseProps, AnyColor } from \"../../types\";\nimport { useColorManipulation } from \"../../hooks/useColorManipulation\";\nimport { useStyleSheet } from \"../../hooks/useStyleSheet\";\nimport { formatClassName } from \"../../utils/format\";\n\ninterface Props<T extends AnyColor> extends Partial<ColorPickerBaseProps<T>> {\n colorModel: ColorModel<T>;\n}\n\nexport const AlphaColorPicker = <T extends AnyColor>({\n className,\n colorModel,\n color = colorModel.defaultColor,\n onChange,\n ...rest\n}: Props<T>): JSX.Element => {\n const nodeRef = useRef<HTMLDivElement>(null);\n useStyleSheet(nodeRef);\n\n const [hsva, updateHsva] = useColorManipulation<T>(colorModel, color, onChange);\n\n const nodeClassName = formatClassName([\"react-colorful\", className]);\n\n return (\n <div {...rest} ref={nodeRef} className={nodeClassName}>\n <Saturation hsva={hsva} onChange={updateHsva} />\n <Hue hue={hsva.h} onChange={updateHsva} />\n <Alpha hsva={hsva} onChange={updateHsva} className=\"react-colorful__last-control\" />\n </div>\n );\n};\n","import React from \"react\";\n\nimport { AlphaColorPicker } from \"./common/AlphaColorPicker\";\nimport { ColorModel, ColorPickerBaseProps } from \"../types\";\nimport { equalHex } from \"../utils/compare\";\nimport { hexToHsva, hsvaToHex } from \"../utils/convert\";\n\nconst colorModel: ColorModel<string> = {\n defaultColor: \"0001\",\n toHsva: hexToHsva,\n fromHsva: hsvaToHex,\n equal: equalHex,\n};\n\nexport const HexAlphaColorPicker = (props: Partial<ColorPickerBaseProps<string>>): JSX.Element => (\n <AlphaColorPicker {...props} colorModel={colorModel} />\n);\n","import React from \"react\";\n\nimport { AlphaColorPicker } from \"./common/AlphaColorPicker\";\nimport { ColorModel, ColorPickerBaseProps, HslaColor } from \"../types\";\nimport { equalColorObjects } from \"../utils/compare\";\nimport { hslaToHsva, hsvaToHsla } from \"../utils/convert\";\n\nconst colorModel: ColorModel<HslaColor> = {\n defaultColor: { h: 0, s: 0, l: 0, a: 1 },\n toHsva: hslaToHsva,\n fromHsva: hsvaToHsla,\n equal: equalColorObjects,\n};\n\nexport const HslaColorPicker = (props: Partial<ColorPickerBaseProps<HslaColor>>): JSX.Element => (\n <AlphaColorPicker {...props} colorModel={colorModel} />\n);\n","import React from \"react\";\n\nimport { AlphaColorPicker } from \"./common/AlphaColorPicker\";\nimport { ColorModel, ColorPickerBaseProps } from \"../types\";\nimport { equalColorString } from \"../utils/compare\";\nimport { hslaStringToHsva, hsvaToHslaString } from \"../utils/convert\";\n\nconst colorModel: ColorModel<string> = {\n defaultColor: \"hsla(0, 0%, 0%, 1)\",\n toHsva: hslaStringToHsva,\n fromHsva: hsvaToHslaString,\n equal: equalColorString,\n};\n\nexport const HslaStringColorPicker = (\n props: Partial<ColorPickerBaseProps<string>>\n): JSX.Element => <AlphaColorPicker {...props} colorModel={colorModel} />;\n","import React from \"react\";\n\nimport { ColorPicker } from \"./common/ColorPicker\";\nimport { ColorModel, ColorPickerBaseProps, HslColor } from \"../types\";\nimport { equalColorObjects } from \"../utils/compare\";\nimport { hslaToHsva, hsvaToHsla, hslaToHsl } from \"../utils/convert\";\n\nconst colorModel: ColorModel<HslColor> = {\n defaultColor: { h: 0, s: 0, l: 0 },\n toHsva: ({ h, s, l }) => hslaToHsva({ h, s, l, a: 1 }),\n fromHsva: (hsva) => hslaToHsl(hsvaToHsla(hsva)),\n equal: equalColorObjects,\n};\n\nexport const HslColorPicker = (props: Partial<ColorPickerBaseProps<HslColor>>): JSX.Element => (\n <ColorPicker {...props} colorModel={colorModel} />\n);\n","import React from \"react\";\n\nimport { ColorPicker } from \"./common/ColorPicker\";\nimport { ColorModel, ColorPickerBaseProps } from \"../types\";\nimport { equalColorString } from \"../utils/compare\";\nimport { hslStringToHsva, hsvaToHslString } from \"../utils/convert\";\n\nconst colorModel: ColorModel<string> = {\n defaultColor: \"hsl(0, 0%, 0%)\",\n toHsva: hslStringToHsva,\n fromHsva: hsvaToHslString,\n equal: equalColorString,\n};\n\nexport const HslStringColorPicker = (props: Partial<ColorPickerBaseProps<string>>): JSX.Element => (\n <ColorPicker {...props} colorModel={colorModel} />\n);\n","import React from \"react\";\n\nimport { AlphaColorPicker } from \"./common/AlphaColorPicker\";\nimport { ColorModel, ColorPickerBaseProps, HsvaColor } from \"../types\";\nimport { equalColorObjects } from \"../utils/compare\";\nimport { roundHsva } from \"../utils/convert\";\n\nconst colorModel: ColorModel<HsvaColor> = {\n defaultColor: { h: 0, s: 0, v: 0, a: 1 },\n toHsva: (hsva) => hsva,\n fromHsva: roundHsva,\n equal: equalColorObjects,\n};\n\nexport const HsvaColorPicker = (props: Partial<ColorPickerBaseProps<HsvaColor>>): JSX.Element => (\n <AlphaColorPicker {...props} colorModel={colorModel} />\n);\n","import React from \"react\";\n\nimport { AlphaColorPicker } from \"./common/AlphaColorPicker\";\nimport { ColorModel, ColorPickerBaseProps } from \"../types\";\nimport { equalColorString } from \"../utils/compare\";\nimport { hsvaStringToHsva, hsvaToHsvaString } from \"../utils/convert\";\n\nconst colorModel: ColorModel<string> = {\n defaultColor: \"hsva(0, 0%, 0%, 1)\",\n toHsva: hsvaStringToHsva,\n fromHsva: hsvaToHsvaString,\n equal: equalColorString,\n};\n\nexport const HsvaStringColorPicker = (\n props: Partial<ColorPickerBaseProps<string>>\n): JSX.Element => <AlphaColorPicker {...props} colorModel={colorModel} />;\n","import React from \"react\";\n\nimport { ColorPicker } from \"./common/ColorPicker\";\nimport { ColorModel, ColorPickerBaseProps, HsvColor } from \"../types\";\nimport { equalColorObjects } from \"../utils/compare\";\nimport { hsvaToHsv } from \"../utils/convert\";\n\nconst colorModel: ColorModel<HsvColor> = {\n defaultColor: { h: 0, s: 0, v: 0 },\n toHsva: ({ h, s, v }) => ({ h, s, v, a: 1 }),\n fromHsva: hsvaToHsv,\n equal: equalColorObjects,\n};\n\nexport const HsvColorPicker = (props: Partial<ColorPickerBaseProps<HsvColor>>): JSX.Element => (\n <ColorPicker {...props} colorModel={colorModel} />\n);\n","import React from \"react\";\n\nimport { ColorPicker } from \"./common/ColorPicker\";\nimport { ColorModel, ColorPickerBaseProps } from \"../types\";\nimport { equalColorString } from \"../utils/compare\";\nimport { hsvStringToHsva, hsvaToHsvString } from \"../utils/convert\";\n\nconst colorModel: ColorModel<string> = {\n defaultColor: \"hsv(0, 0%, 0%)\",\n toHsva: hsvStringToHsva,\n fromHsva: hsvaToHsvString,\n equal: equalColorString,\n};\n\nexport const HsvStringColorPicker = (props: Partial<ColorPickerBaseProps<string>>): JSX.Element => (\n <ColorPicker {...props} colorModel={colorModel} />\n);\n","import React from \"react\";\n\nimport { AlphaColorPicker } from \"./common/AlphaColorPicker\";\nimport { ColorModel, ColorPickerBaseProps, RgbaColor } from \"../types\";\nimport { equalColorObjects } from \"../utils/compare\";\nimport { rgbaToHsva, hsvaToRgba } from \"../utils/convert\";\n\nconst colorModel: ColorModel<RgbaColor> = {\n defaultColor: { r: 0, g: 0, b: 0, a: 1 },\n toHsva: rgbaToHsva,\n fromHsva: hsvaToRgba,\n equal: equalColorObjects,\n};\n\nexport const RgbaColorPicker = (props: Partial<ColorPickerBaseProps<RgbaColor>>): JSX.Element => (\n <AlphaColorPicker {...props} colorModel={colorModel} />\n);\n","import React from \"react\";\n\nimport { AlphaColorPicker } from \"./common/AlphaColorPicker\";\nimport { ColorModel, ColorPickerBaseProps } from \"../types\";\nimport { equalColorString } from \"../utils/compare\";\nimport { rgbaStringToHsva, hsvaToRgbaString } from \"../utils/convert\";\n\nconst colorModel: ColorModel<string> = {\n defaultColor: \"rgba(0, 0, 0, 1)\",\n toHsva: rgbaStringToHsva,\n fromHsva: hsvaToRgbaString,\n equal: equalColorString,\n};\n\nexport const RgbaStringColorPicker = (\n props: Partial<ColorPickerBaseProps<string>>\n): JSX.Element => <AlphaColorPicker {...props} colorModel={colorModel} />;\n","import React from \"react\";\n\nimport { ColorPicker } from \"./common/ColorPicker\";\nimport { ColorModel, ColorPickerBaseProps, RgbColor } from \"../types\";\nimport { equalColorObjects } from \"../utils/compare\";\nimport { rgbaToHsva, hsvaToRgba, rgbaToRgb } from \"../utils/convert\";\n\nconst colorModel: ColorModel<RgbColor> = {\n defaultColor: { r: 0, g: 0, b: 0 },\n toHsva: ({ r, g, b }) => rgbaToHsva({ r, g, b, a: 1 }),\n fromHsva: (hsva) => rgbaToRgb(hsvaToRgba(hsva)),\n equal: equalColorObjects,\n};\n\nexport const RgbColorPicker = (props: Partial<ColorPickerBaseProps<RgbColor>>): JSX.Element => (\n <ColorPicker {...props} colorModel={colorModel} />\n);\n","import React from \"react\";\n\nimport { ColorPicker } from \"./common/ColorPicker\";\nimport { ColorModel, ColorPickerBaseProps } from \"../types\";\nimport { equalColorString } from \"../utils/compare\";\nimport { rgbStringToHsva, hsvaToRgbString } from \"../utils/convert\";\n\nconst colorModel: ColorModel<string> = {\n defaultColor: \"rgb(0, 0, 0)\",\n toHsva: rgbStringToHsva,\n fromHsva: hsvaToRgbString,\n equal: equalColorString,\n};\n\nexport const RgbStringColorPicker = (props: Partial<ColorPickerBaseProps<string>>): JSX.Element => (\n <ColorPicker {...props} colorModel={colorModel} />\n);\n","const matcher = /^#?([0-9A-F]{3,8})$/i;\n\nexport const validHex = (value: string, alpha?: boolean): boolean => {\n const match = matcher.exec(value);\n const length = match ? match[1].length : 0;\n\n return (\n length === 3 || // '#rgb' format\n length === 6 || // '#rrggbb' format\n (!!alpha && length === 4) || // '#rgba' format\n (!!alpha && length === 8) // '#rrggbbaa' format\n );\n};\n","import React, { useState, useEffect, useCallback } from \"react\";\n\nimport { useEventCallback } from \"../../hooks/useEventCallback\";\nimport { ColorInputBaseProps } from \"../../types\";\n\ninterface Props extends ColorInputBaseProps {\n /** Blocks typing invalid characters and limits string length */\n escape: (value: string) => string;\n /** Checks that value is valid color string */\n validate: (value: string) => boolean;\n /** Processes value before displaying it in the input */\n format?: (value: string) => string;\n /** Processes value before sending it in `onChange` */\n process?: (value: string) => string;\n}\n\nexport const ColorInput = (props: Props): JSX.Element => {\n const { color = \"\", onChange, onBlur, escape, validate, format, process, ...rest } = props;\n const [value, setValue] = useState(() => escape(color));\n const onChangeCallback = useEventCallback<string>(onChange);\n const onBlurCallback = useEventCallback<React.FocusEvent<HTMLInputElement>>(onBlur);\n\n // Trigger `onChange` handler only if the input value is a valid color\n const handleChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n const inputValue = escape(e.target.value);\n setValue(inputValue);\n if (validate(inputValue)) onChangeCallback(process ? process(inputValue) : inputValue);\n },\n [escape, process, validate, onChangeCallback]\n );\n\n // Take the color from props if the last typed color (in local state) is not valid\n const handleBlur = useCallback(\n (e: React.FocusEvent<HTMLInputElement>) => {\n if (!validate(e.target.value)) setValue(escape(color));\n onBlurCallback(e);\n },\n [color, escape, validate, onBlurCallback]\n );\n\n // Update the local state when `color` property value is changed\n useEffect(() => {\n setValue(escape(color));\n }, [color, escape]);\n\n return (\n <input\n {...rest}\n value={format ? format(value) : value}\n spellCheck=\"false\" // the element should not be checked for spelling errors\n onChange={handleChange}\n onBlur={handleBlur}\n />\n );\n};\n","import React, { useCallback } from \"react\";\nimport { ColorInputBaseProps } from \"../types\";\n\nimport { validHex } from \"../utils/validate\";\nimport { ColorInput } from \"./common/ColorInput\";\n\ninterface HexColorInputProps extends ColorInputBaseProps {\n /** Enables `#` prefix displaying */\n prefixed?: boolean;\n /** Allows `#rgba` and `#rrggbbaa` color formats */\n alpha?: boolean;\n}\n\n/** Adds \"#\" symbol to the beginning of the string */\nconst prefix = (value: string) => \"#\" + value;\n\nexport const HexColorInput = (props: HexColorInputProps): JSX.Element => {\n const { prefixed, alpha, ...rest } = props;\n\n /** Escapes all non-hexadecimal characters including \"#\" */\n const escape = useCallback(\n (value: string) => value.replace(/([^0-9A-F]+)/gi, \"\").substring(0, alpha ? 8 : 6),\n [alpha]\n );\n\n /** Validates hexadecimal strings */\n const validate = useCallback((value: string) => validHex(value, alpha), [alpha]);\n\n return (\n <ColorInput\n {...rest}\n escape={escape}\n format={prefixed ? prefix : undefined}\n process={prefix}\n validate={validate}\n />\n );\n};\n","var superPropBase = require(\"./superPropBase.js\");\n\nfunction _get() {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n module.exports = _get = Reflect.get.bind(), module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n } else {\n module.exports = _get = function _get(target, property, receiver) {\n var base = superPropBase(target, property);\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(arguments.length < 3 ? target : receiver);\n }\n\n return desc.value;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n }\n\n return _get.apply(this, arguments);\n}\n\nmodule.exports = _get, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var getPrototypeOf = require(\"./getPrototypeOf.js\");\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nmodule.exports = _superPropBase, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayWithHoles = require(\"./arrayWithHoles.js\");\n\nvar iterableToArray = require(\"./iterableToArray.js\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\n\nvar nonIterableRest = require(\"./nonIterableRest.js\");\n\nfunction _toArray(arr) {\n return arrayWithHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableRest();\n}\n\nmodule.exports = _toArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;"],"sourceRoot":""}