{"version":3,"sources":["constants/action-types.js","state/mainLayout/reducer.js","state/organization/reducer.js","state/userPresence/reducer.js","state/notifications/reducer.js","state/nursePooling/reducer.js","state/index.js","store/configureStore.js","constants/auth-constants.js","constants/global-variables.js","api/roles.js","constants/enums.js","api/users.js","infrastructure/auth.js","providers/authProvider.js","components/Loader.js","components/Grid.js","components/auth/callback.js","views/UserError.js","state/mainLayout/actions.js","components/LeftNavigation.js","infrastructure/helpers/commonHelpers.js","components/Common/Layout.js","components/Alert.js","components/Avatar.js","components/Badge.js","components/Breadcrumb.js","components/Button.js","components/CallButton.js","components/CallCorrelationInfo.js","components/CallEndReason.js","components/Checkbox.js","components/DescriptionBox.js","components/Dropdown.js","components/Form.js","components/HelloFeatureBlock.js","components/Input.js","components/ListGroup.js","components/Modal.js","components/Select.js","components/Call/ConnectionStatus.js","components/Call/ActiveConference.js","components/Call/AnotherNursePickedUp.js","components/SkeletonLoader.js","components/SmallModal.js","components/StreamPermissions.js","components/Table.js","components/Tabs.js","components/Tilt.js","components/Toggle.js","components/TopParticipant.js","components/Participant.js","io-client/SocketContext.js","components/TreeView.js","constants/socket-events.js","components/AudioOutputs.js","components/TvControls.js","api/healthSystems.js","api/organization.js","state/organization/actions.js","api/notifications.js","state/userPresence/actions.js","api/userPresence.js","state/notifications/actions.js","infrastructure/helpers/dateHelper.js","infrastructure/helpers/notificationsChannel.js","api/nursePooling.js","containers/PoolingFlow/style.js","containers/PoolingFlow/index.js","components/EditPoolingModal.js","api/user.js","components/UserSettings/UserSettingsModal.js","components/Common/Header.js","views/PoolingFlowWrapper.js","routes/privateRoute.js","components/Common/EditHealthSystemModal.js","components/Common/SectorList.js","components/Common/AssignDeviceModal.js","views/Organization/Partials/CallPatient.js","components/Common/EditSectorModal.js","api/devices.js","components/Common/CsvExport.js","components/RebootLogExport.js","components/Common/CheckBox.js","components/NursePooling/DeviceSelection.js","components/Common/VoiceCommandCallingModal.js","components/PullDeviceLogs.js","views/Organization/Partials/Hospital.js","views/Organization/Partials/Department.js","views/Organization/Partials/Floor.js","views/Organization/Partials/Room.js","views/UnassignedNurse.js","views/Organization/Organization.js","owt/p2p/Emitter.js","owt/p2p/sc.websocket.js","owt/base/event.js","owt/p2p/error.js","owt/base/utils.js","owt/base/publication.js","owt/base/stream.js","owt/base/logger.js","owt/base/sdputils.js","owt/p2p/peerconnection-channel.js","owt/base/conference.js","owt/p2p/p2pclient.js","owt/base/mediaformat.js","owt/base/mediastream-factory.js","components/CallSounds.js","api/iceServers.js","api/callStats.js","infrastructure/callStats/callStats.js","infrastructure/helpers/appInsightsTelemetry.js","owt/p2p/logger.js","owt/p2p/CallManager.js","components/Monitoring/Notes.js","components/Monitoring/LocalMicButton.js","components/Monitoring/VideoFeed.js","components/Common/CameraControls.js","views/Monitoring.js","api/calllogs.js","components/CallLogs/CallDetails.js","components/Common/Pagination.js","components/CallLogs/List/PastCallsList.js","components/CallLogs/List/OngoingCallsList.js","containers/Dashboard.js","views/CallLogs.js","components/Common/CallDuration.js","components/Common/NightVisionControl.js","components/Common/CallStats.js","containers/PeerStats.js","views/Call.js","views/PatientFeed.js","components/Common/FormElements/Input.js","components/UserManagement/InviteAdmins.js","components/Common/FormElements/MultiSelect.js","components/UserManagement/InviteNurses.js","components/UserManagement/Lists/InvitedUsersList.js","components/UserManagement/AssignDropdown.js","components/Common/FormElements/Select.js","components/UserManagement/Lists/EditUser/ManageHealthSystems.js","components/ProfilePicture.js","components/UserManagement/Lists/EditUser/UserInformation.js","components/UserManagement/Lists/EditUser/SuperUserHealthSystem.js","components/UserManagement/Lists/UsersList.js","components/UserManagement/InviteSuperUsers.js","views/Users.js","views/Login.js","views/CreateHealthSystem.js","views/LogOutUser.js","views/CompleteProfile.js","views/Help.js","views/Recover.js","views/ResetPassword.js","api/userIdleConfigurations.js","components/Configurations/UserIdleForm.js","components/Configurations/UserIdleTimeout.js","api/teamConfigurationProfiles.js","components/Configurations/DeviceConfig.js","api/activeDirectories.js","components/Configurations/ActiveDirectoryForm.js","components/Configurations/ActiveDirectory.js","api/ntpConfig.js","components/Configurations/NetworkConfig.js","views/Configurations.js","views/ConfigurationsHistory.js","routes/jwtAuthenticatedRoute.js","views/TimeError.js","routes/routes.js","components/auth/logout.js","components/auth/logoutCallback.js","components/auth/silentRenew.js","io-client/Socket.js","views/IncomingCall.js","infrastructure/helpers/userIdleChannel.js","containers/UserIdleCheck.js","components/AppInsightsTelemetryProvider.js","components/StreamPermissionsModal.js","App.js","registerServiceWorker.js","index.js"],"names":["OverviewActionTypes","UserPresenceActionTypes","NotificationsCounterActionTypes","NursePoolingActionTypes","initialState","userInfo","isLefNavigationExpanded","breadcrumb","allHealthSystems","currentHospitalId","currentHealthSystemId","currentHealthSystemName","currentRegionId","treeData","tree","preSelected","activeMonitoringFeeds","currentHelloDevice","currentSectorLocation","showAssignDeviceModalData","show","deviceId","assignCompleted","streamPermission","organization","state","action","type","payload","healthSystems","currentHealthSystem","push","icon","isNewOption","subOptions","newTreeData","slice","hospitalTree","presenceStatusTypeId","customMessage","defaultMessage","updatingUserPresence","fetchingUserPresence","notificationsCounter","fetchingNotificationCounter","combineReducers","mainLayout","userPresence","data","notifications","nursePooling","middleware","thunk","logger","promise","IDENTITY_CONFIG","authority","window","__env__","REACT_APP_IDSRV_URL","client_id","REACT_APP_IDSRV_CLIENT_ID","redirect_uri","REACT_APP_IDSRV_REDIRECT_URL","login","silent_redirect_uri","REACT_APP_SILENT_REDIRECT_URL","post_logout_redirect_uri","REACT_APP_LOGOUT_URL","public_uri","REACT_APP_PUBLIC_URL","client_secret","REACT_APP_IDSRV_CLIENT_SECRET","METADATA_OIDC","issuer","jwks_uri","authorization_endpoint","token_endpoint","userinfo_endpoint","end_session_endpoint","check_session_iframe","revocation_endpoint","introspection_endpoint","APP_CONFIG","URL","gatewayApiBasePath","REACT_APP_GATEWAY_API_BASE_URL","legacyApiBasePath","REACT_APP_LEGACY_API_BASE_URL","localApiBasePath","companyId","REACT_APP_BANYAN_COMP_ID","profilePicBaseUrl","REACT_APP_PROFILE_PIC_BASE_URL","buildNumber","REACT_APP_BUILD_NUMBER","releaseName","REACT_APP_RELEASE_NAME","useCallStats","REACT_APP_USE_CALLSTATS","sendCallStatsOnMonitoring","REACT_APP_SEND_CALLSTATS_ON_MONITORING","sendCallStatsInterval","REACT_APP_SEND_CALLSTATS_INTERVAL","versionCheckInterval","REACT_APP_VERSION_CHECK_INTERVAL","deviceAppId","REACT_APP_DEVICE_APP_ID","aiInstrumentationKey","REACT_APP_APPINSIGHTS_INSTRUMENTATIONKEY","sendCallClientLogs","REACT_APP_SEND_CALL_CLIENT_LOGS","isDevelopment","opts","baseURL","timeout","transformRequest","headers","accessToken","localStorage","getItem","JSON","stringify","legacyOpts","Object","assign","localOpts","successHandler","response","Promise","resolve","reject","errorHandler","error","a","status","signinSilent","passwordRegEx","gatewayApi","axios","create","legacyApi","localApi","interceptors","use","getRoles","userId","res","rej","url","get","then","roles","catch","e","updateRole","memberId","put","GeneralErrorCodes","OrganizationErrorCodes","CallTypes","AUDIO","VIDEO","SCREENSHARE","SECURITYCAM","LIVEBROADCAST","MONITORING","BanyanCallTypesMessage","ObjectType","MediaTypes","MediaPermissions","MediaInputs","CallStatus","message","InviteStatuses","InviteTypes","SectorTypes","PresenceStatusType","PresenceStatusTypeLabels","1","2","UserTypes","UserRoles","ADMIN","NURSE","VIRTUALSITTER","SUPERUSER","ZoomDirection","CameraTiltDirection","UP","DOWN","RIGHT","LEFT","CameraTiltAction","DeviceStatus","DeviceListLevel","HEALTHSYSTEM","REGION","HOSPITAL","DEPARTMENT","FLOOR","ROOM","ORGANIZATION","SerialTVCommands","INITIAL_TV_POWER","POWER","POWER_ON","POWER_OFF","HDMI","SWITCH_HDMI1","SWITCH_HDMI2","SWITCH_HDMI3","ParticipantState","CONNECTING","CONNECTED","BUSY","DECLINED","OFFLINE","LEFT_CALL","NOT_ANSWERING","CANT_CONNECT","DISRUPTED","RECONNECTING","DISCONNECTED","REMOVED","FAILED_TO_GET_INFO","INVITE_DENIED","ParticipantRemoveReason","UNDEFINED","PARTICIPANT_LEAVE","PARTICIPANT_FORCED_LEAVE","CLEAR_PARTICIPANT_OLD_CONFERENCES","PARTICIPANT_CLEANUP","PASSWORD_CHANGED","IDLE","CONFERENCE_TERMINATED_BY_ADMINISTRATOR","DISCONNECTED_PARTICIPANT_CLEANUP","SOMEONE_ELSE_ANSWERED","HIGHER_PRIORITY_CALL","ConferenceEndReason","PARTICIPANT_OFFLINE","PARTICIPANT_BUSY","INITIATOR_LEFT","PARTICIPANT_NOT_ANSWERING","PARTICIPANT_DECLINED","PARTICIPANT_LEFT","OWNER_LEFT","ABORTED","DROPPED","PARTICIPANT_PASSWORD_CHANGED","PARTICIPANT_IDLE","TERMINATED_BY_ADMINISTRATOR","PARTICIPANT_INVITE_DENIED","PARTICIPANT_INVITE_FAILED","FAILED_TO_GET_INITIATOR_INFO","UNAUTHORIZED","E2EE_FAILED","ANSWERED_ELSEWHERE","TRANSFERRED_TO_ANOTHER_CLIENT","HAS_ACTIVE_CONFERENCE","INITIATOR_BUSY","CLEANUP","StartConferenceFailureReason","InviteParticipantFailureReason","ChangePasswordUseCases","DeviceStatusMessages","FeedColors","StreamError","SCREEN_SHARE_CANCELED","CANT_ACCESS_MEDIA_STREAM","BROWSER_NOT_SUPPORTED","EXTENSION_NOT_INSTALLED","DEVICE_NOT_FOUND","STREAM_NOT_ALLOWED","PERMISSION_DISMISSED","NOT_READABLE_ERROR","ONLY_SCREEN_FOUND","SCREEN_SHARE_NOT_SUPPORTED","CAMERA_BLOCKED","MICROPHONE_BLOCKED","CAM_AND_MIC_BLOCKED","MICROPHONE_NOT_FOUND","CAMERA_NOT_FOUND","SocketState","DeviceCommands","ConferenceErrorType","CameraType","CameraZoomLevels","CameraEventTypes","RTCPeerConnectionEnum","NEW","FAILED","CLOSED","CHECKING","COMPLETED","JoinConferenceFailureReasonEnum","ToggleFailureReasonEnum","TeamTypes","TerminateRequestFailureReasonEnum","UNHANDLED_EXCEPTION","NULL_CONFERENCE","TERMINATE_IN_PROGRESS","NULL_TERMINATE_REQUEST","NULL_CONNECTED_USER_PARTICIPANT","NO_PERMISSION","TerminateRequestFailureReasonMessages","ClientTypes","Roles","id","value","VIRTUALCAREPROVIDER","AudioOutputDevice","ConfigHistoryTypes","TVs","TelehealthTv","label","StreamTypes","AndroidVersions","codeName","versionNum","apiLevel","NursePoolingOptions","NO_ANSWER","YES","NO","DeviceSettings","TeamConfigurationIntegrationType","KeyCodes","PERIOD","NUMPAD_PERIOD","MINUS","NUMPAD_SUBTRACT","NUMPAD_ADD","PLUS","LETTER_E","NUMPAD_MINUS","LETTER_A","LETTER_Z","ENTER","SPACE","BACK_SPACE","LEFT_ARROW","UP_ARROW","RIGHT_ARROW","DOWN_ARROW","TvBrands","TvControlsEnums","getHealthSystems","getOrgTeamChildren","teamId","children","getHealthSystemSubTree","healthSystemId","regions","forEach","region","regionIndex","name","hospitals","hospital","hospitalIndex","regionId","departments","department","departmentIndex","hospitalId","floors","floor","floorIndex","departmentId","rooms","room","roomIndex","floorId","helloDeviceId","Number","getMembers","pageSize","pageIndex","searchValue","params","getHealthSystemMembers","getInvitedMembers","getHealthSystemInvitedUsers","registerUser","values","inviteId","post","Type","OrganizationInviteData","CompanyId","InviteId","ClientType","LogInData","SignInEmail","email","SignInPassword","password","SignUpModel","FirstName","firstName","LastName","lastName","Email","Password","createInvite","emails","inviteTypeId","users","InviteTypeId","InviteInfo","Users","createNurseInvite","channels","hs","Id","Name","Channels","assignMember","companyUserId","CompanyUserId","deleteMember","delete","getInvite","checkUserAccount","result","checkIfCompanyMemberExists","exists","acceptInvite","getNurseHealthSystems","updateNurse","guidUserId","roleId","CompanyName","JobTitle","jobTitle","WorkExperienceId","NurseUserGuid","getNurseProfileInfo","Result","sendRecoveryEmail","recoveryInviteId","r","sendPasswordRecoveredEmail","code","Code","OrganizationId","getHealthSystemSubTreeBasic","getNursesList","search","Log","setLogger","console","setLevel","DEBUG","userManager","UserManager","userStore","WebStorageStateStore","store","metadata","setUser","userRole","memberExistsInCompany","userRoleId","setItem","sub","setTokens","authResult","idToken","setCurrentHealthSystem","length","currentHealthSystemInfo","navigateToApp","redirectUri","location","replace","fetchUserProfile","err","swapToken","token","Logger","info","checkMember","signinRedirectCallback","log","includes","href","logout","signoutRedirect","id_token_hint","clearStaleState","signoutRedirectCallback","removeItem","parseJwt","base64","split","parse","atob","isAuthenticated","memberExists","signinRedirect","isJWTRoute","localAzJwt","hash","pathname","jwt","substring","args","claims","preferred_username","login_hint","acr_values","isAzureAuthentication","userToken","endsWith","signinSilentCallback","createSigninRequest","getAccessToken","Error","getUserId","getUserProfile","setUserProfile","newProfile","getUserRole","getUserRoleId","setUserInfo","userProfile","role","scope","response_type","user","events","addUserLoaded","access_token","id_token","indexOf","addSilentRenewError","addAccessTokenExpired","addAccessTokenExpiring","AuthContext","React","createContext","isAzureJWT","AuthConsumer","Consumer","AuthProvider","props","authService","Provider","this","Component","Loader","className","Grid","style","display","gridTemplateRows","rows","width","gridTemplateColumns","columns","gridGap","justifyItems","horizAlign","alignItems","vertAlign","height","stretch","backgroundColor","Callback","textAlign","signOut","UserError","src","alt","onClick","actionCreators","toggleLeftNavigation","dispatch","getState","addNewUserRole","updateUserRole","LeftNavigation","classNames","expanded","data-cy","links","map","item","index","key","NavLink","to","linkTo","exact","activeClassName","event","onItemClicked","title","getCurrentHealthSystemInfo","askForPermission","permissionFor","navigator","mediaDevices","getUserMedia","permission","checkForPermission","permissions","query","checkIfMediaDevicesPlugged","enumerateDevices","devices","pluggedDevices","microphone","camera","device","kind","getHierarchyFromBreadcrumb","hierarchy","findSectorById","arr","reduce","accumulator","roomId","findDeviceById","getHierarchyByHelloDeviceId","searchSectors","sectors","splice","toLowerCase","hidden","matchesSearch","decodeHtml","txt","Entities","require","AllHtmlEntities","decode","mapSectionsToRender","sector","toggleEditSectorModal","initDeleteOrg","selectedSector","sectorType","edit","sectorName","level","getParentSector","element","parent","isValidSector","currentSector","sameLevelSectors","filter","s","undefined","entries","some","buildTreeModel","assignMode","isMonitoring","baseurl","firstHospitalId","link","tooltip","treeLocation","hasDevice","isOnline","deviceBusy","callState","getLevelRoomsWithDevices","option","getNursePoolingStatus","sortByRoomName","array","collator","Intl","Collator","numeric","sensitivity","sort","b","compare","roomName","getPort","parts","port","parseInt","isNaN","handleOnKeyDownNumeric","allowPeriod","which","preventDefault","Layout","onLeftNavigationItemClicked","leftNavigationItems","isPoolingPage","Boolean","getLeftNavigationItems","isSecondColumnCollapsed","twoColumns","connect","bindActionCreators","Alert","alertSelector","variant","position","fixed","persist","hideCloseButton","onClose","defaultProps","Avatar","initialsColor","letter","obj","color","trim","getInitialsColor","fullName","condition","data-test-id","size","fullNameSplit","getInitialsFromFullName","toUpperCase","Badge","text","withRouter","onBreadcrumbClick","Link","buttonTypes","Button","isLoading","isDisabled","justifySelf","background","borderColor","borderRadius","marginRight","CallButton","setWrapperRef","node","wrapperRef","handleClickOutside","contains","target","isDropdownOpen","toggleDropdown","setState","isCallButtonClicked","setTimeout","document","addEventListener","removeEventListener","ref","isActive","data-tooltip","data-position","tooltipPosition","buttonSelector","iconColor","CallCorrelationInfo","copied","copyToClipboard","textArea","createElement","correlationId","body","appendChild","select","execCommand","remove","correlationIdRef","createRef","CallEndReason","reason","onPatientBusyNurse","Checkbox","checked","DescriptionBox","description","Dropdown","onDropdownItemsClick","closeDropdownOnItemClick","getDropdownItems","dropdownChildrenRef","isDropdownTitleVisible","dropdownInnerTitle","bind","dropdownRef","isPortal","current","dropdownRefProperties","getBoundingClientRect","reverse","imageUrl","ReactDOM","createPortal","zIndex","right","innerWidth","top","innerHeight","bottom","getElementById","Form","onSubmit","HelloFeatureBlock","Input","marginBottom","bottomSpace","onChange","onKeyUp","placeholder","readOnly","readonly","minLength","validationOptions","maxLength","required","pattern","disabled","autocomplete","autoComplete","ListGroups","onScroll","onScrollClick","lists","component","onItemClick","onListClick","subLists","ListGroup","Modal","handleKeyPress","onModalClose","handleOutsideClick","modalClass","modalReference","classList","closest","modalSelector","hideActionButtons","evt","closeButtonText","submitButtonText","onModalSubmit","isSubmitDisabled","Select","onSelect","items","selectedIndex","defaultValue","ConnectionStatus","peerConnectionState","ActiveConference","AnotherNursePickedUp","SkeletonLoader","padding","Array","SmallModal","StreamPermissions","platform","Table","isEditable","header","row","keys","tableEmptyText","Tabs","setActiveComponent","componentIndex","active","onTabClick","onTabChange","findIndex","tab","components","Tilt","isMouseDown","sendTiltEvent","direction","cameraType","disabledDirections","previousTiltAction","tiltHandler","onMouseDown","onMouseUp","onMouseOut","zoomUpperLimit","onBlur","onHuddleCamReboot","cameraZoomLevel","updateZoomLevel","Toggle","toggledOn","onToggle","toggleOnText","toggleOffText","TopParticipant","videoRef","videoSrcObjectHandler","prevProps","topParticipantFeed","srcObject","mediaStream","isTopParticipantVideoActive","video","autoPlay","muted","Participant","videoCamActive","participantFeed","participantAvatar","avatarName","SocketContext","subtype","OptionName","useState","tooltipStyle","setTooltipStyle","roomStatusRef","useRef","toggleTooltip","roomStatusEl","left","onMouseEnter","onMouseLeave","getDeviceBeingUsedMessage","OptionsList","options","expandedOptions","onAdd","onLinkClick","onAddDevice","selectedSectorId","setSelectedId","expandAll","onSendCheckDeviceActiveConferences","findProperId","prefix","childrenHidden","every","childrenMatchSearch","toggleExpand","selectedOptionId","isAddingSection","i","toggleOptions","handleSubOptionsListChange","optionId","subSelections","selectOption","isSelected","checkDeviceActiveConferences","activeConferences","conference","callType","isInvitedByHost","addSectorTooltip","selection","addNewOptionOnEnter","autoFocus","onMouseOver","onFocus","isCreatingSector","customActionIcon","TreeView","sectorId","contextType","SocketEvents","Client","AUTHORIZE","UPDATE_USER_PRESENCE","PING","ON_USER_ONLINE","ON_USER_OFFLINE","ON_AUTHENTICATED","ON_UNAUTHORIZED","ON_CONNECT","ON_CONNECT_FAILED","ON_RECONNECT","ON_RECONNECTING","ON_DISCONNECT","ON_DEVICE_ONLINE","ON_DEVICE_OFFLINE","ON_UPDATED_USER_PRESENCE","ON_NOTIFY_UPDATED_USER_PRESENCE","Conference","START","JOIN","LEAVE","END","TOGGLE_STREAMS","AUDIO_TRACK_TOGGLED","ERROR","SEND_OFFER","SEND_ANSWER","SEND_ICE_CANDIDATE","CLOSING_CLIENT","DECLINE","SDP","TRACK_TOGGLE","TRACKS_ADDED","TRACKS_REMOVED","UA","DATA_RECEIVED","HELLODEVICE_LEAVE","INVITE_PARTICIPANTS","REMOVE_PARTICIPANT","PARTICIPANT_RECONNECT","PARTICIAPNT_CHANGE_BITRATE","PEER_CONNECTION_STATE_CHANGED","ICE_GATHERING_STATE_CHANGED","ICE_CONNECTION_STATE_CHANGED","LOG","TERMINATE_REQUEST","TERMINATE_REQUEST_ACCEPT","TERMINATE_REQUEST_CANCEL","FORCE_TERIMATE","PARTICIPANT_FORCE_TERMINATE","ALERT_PATIENT_AT_RISK","ALERT_PATIENT_AT_RISK_RESPONSE","ON_PARTICIPANT_NOT_ANSWERING","ON_PARTICIPANT_DECLINED","ON_PARTICIPANT_LEFT","ON_PARTICIPANT_STREAMS_TOGGLED","ON_NEW_ANSWER","ON_NEW_OFFER","ON_NEW_ICE_CANDIDATE","ON_NEW_PARTICIPANT","ON_REMOVE_SCREENSHARE_PEER","ON_RINGING","ON_INCOMING","ON_PARTICIPANT_OFFLINE","ON_PARTICIPANT_BUSY","ON_INITIATOR_LEFT","ON_UPDATE_PARTICIPANTS","ON_MISSED_CALL","ON_DEVICE_CONTROLS_LOCKED","ON_ENDED","ON_ANSWERED_ELSEWHERE","ON_PARTICIPANT_REMOVED","ON_TRANSFERRED_TO_ANOTHER_CLIENT","ON_TERMINATE_REQUEST","ON_TERMINATE_REQUEST_ACCEPTED","HelloDevice","MOVE_CAMERA","ZOOM_CAMERA","SWITCH_CAMERA","COMMAND","DATA_CHANNEL_OFFER","DATA_CHANNEL_ANSWER","NEW_ICE_CANDIDATE","STOP_PEER_CONNECTION","TOGGLE_NIGHTVISION","CHECK_DEVICE_IN_CONFERENCE","ON_CALL_STATE_CHANGED","ON_TOGGLE_TV","ON_OFFLINE","ON_BUSY","ON_CAMERA_RESPONSE","ON_INITIAL_STATE","ON_UPDATE","ON_TV_RESPONSE","ON_AUDIO_OUTPUT_DEVICE","User","NOTIFICATIONS_UPDATED","ON_PASSWORD_CHANGED","AudioOutputs","socket","changeAudioOutput","participantId","conferenceId","dynamicData","audioOutputDevice","emit","command","audioOutputDeviceButtons","callButtonIcon","selectedAudioOutputDevice","TvControls","context","serialCommandsTv","commandType","volumeRange","tvPowerStatus","powerTv","callManager","volumeTimeout","clearTimeout","changeVolume","increaseVolume","onHdmiTypeChanged","hdmiType","tvCommandsResponseListener","isSuccessful","tvState","isVolume","tvStatus","prevVolumeRange","powerToolTip","hdmiTypeIcon","hdmiTypeButtons","find","hdmiIcon","prevVolInitPower","tvBrand","callManagerInstance","hdmiStatus","volumeStatus","min","max","stopPropagation","createHealthSystem","healthSystemName","healthSystemRegions","editHealthSystemName","newHealthSystemName","editRegionName","newRegionName","createNewRegion","deleteOrgUnit","reAssignDevice","getTreeData","healthSystem","uploadLogo","fileInput","x","y","formData","FormData","append","toFixed","method","Authorization","saveLogo","getLogoUrl","picture","getHopsitalDepartments","setRoomDetails","getRoomDetails","getRoomLocation","updateRoomLocation","deleteRoomLocation","getHealthSystemHospitals","toggleSwitchHealthSystemModal","toggleAssignDeviceModal","setStreamPermissionMessage","addNewRoom","createNewHospital","setCurrentSectorLocation","updateBreadcrumb","setCurrentHealthSystemInfo","setTreeData","setActiveMonitoringFeeds","setCurrentHospitalId","getAllHealthSystems","currentHs","createHospital","createDepartment","createFloor","createRoom","getHospitalTree","getUserNotifications","appType","pageNo","changeNotificationReadStatus","unreadNotifications","patch","fetchUserPresenceSucceeded","fetchUserPresence","presence","getUserPresence","userPresenceUpdateSucceeded","updateUserPresence","putUserPresence","fetchNotificationCounter","total","notificationCounter","formatDate","dateObj","month","getMonth","day","getDate","year","getFullYear","join","utcToLocalTime","date","stillUtc","moment","utc","toDate","getDateDifference","start","end","startDate","startOf","endDate","duration","diff","asDays","secondsToHHMMSS","seconds","Math","padStart","convertSecondsToHoursFormat","allSeconds","floatHours","hours","minutes","toString","channel","BroadcastChannel","deleteMemberCallAvailability","addOrUpdateMemberCallAvailability","teams","getNurseHealthSystemAvailabilities","Wrapper","styled","div","HealthSystemsListItem","TreeViewListWrapper","processTreeData","getNode","mapChildren","nodes","PoolingFlow","page","setPage","nursePoolingStatus","setNursePoolingStatus","setHealthSystems","selectedHealthSystem","setSelectedHealthSystem","setNodes","filteredText","setFilteredText","nodesFiltered","setFilteredNodes","setChecked","setExpanded","setIsLoading","initialValues","setInitialValues","alertErrorText","setAlertErrorText","useSelector","answerExists","useDispatch","_socket","useContext","useEffect","mapped","isChecked","isEdit","changePage","fetchData","nurseAvailabilities","resetData","getTree","hsList","acc","checkedTeamIds","prevState","prevHs","initialValue","val","teamIds","filterNodes","filtered","toLocaleLowerCase","setNoReceiveCalls","setCheckedBasedOnHs","itemIds","prevChecked","checkedItem","prev","flatMapArray","flat","isAvailable","submit","flattedNewParams","elem","checkedHealthSystems","foundHealthSystemIndex","hsItem","setHealthSystemsList","onCheck","onExpand","ModalWrapper","EditPoolingModal","toggleEditPoolingModal","changePassword","UserSettingsModal","componentDidMount","locations","getUserLocations","virtualRoleKey","virtualRoles","profilePicUrl","profilePicture","virtualRole","userWorkExperienceId","jobId","saveAccountSettings","selectedTab","TABS","EDIT_PROFILE","editProfile","CHANGE_PASSWORD","companyName","COMPANY_INFO","NAME","fromDate","STARTED","jobDescription","isCurrent","showCompanyOnPage","userHasRole","mainLayoutActions","idUserCompanyId","entityData","IdUserCompanies","toggleAccountSettingsModal","changeVirtualRole","validatePassword","currentPassword","newPassword","newConfirmedPassword","test","resetPasswordFields","passwordData","setPasswordErrorMessage","toggleConfirmPasswordDialog","savePasswordChanges","oldpassword","newpassword","HasSucceed","passwordInfo","passwordAlertVariant","isConfirmPasswordChangeModalOpen","msg","setInputValue","history","isAccountSettingsModalOpen","userProfileLoading","flexDirection","onCloseAlert","Header","precautions","userPresenceDropdownRef","breadcrumbIndex","organizationActions","loadUserNotifications","isPreview","postMessage","hasMoreNotifications","notificationsPageNo","formatTime","localDate","now","Date","setHours","isAfter","format","notificationsPageSize","timeAgo","dateCreated","n","el","callerName","checkIfScrolledAtBottom","ceil","scrollTop","scrollHeight","offsetHeight","onAvailabilityDropdownClick","available","isSwitchPresenceModalVisible","onUserDropdownClick","onCustomMessageChanged","onCustomMessageKeyUp","isEditPoolingModalOpen","isVCPRoleModalOpen","organizationActionCreators","mainLayoutActionCreators","PoolingFlowWrapper","PrivateRoute","rest","Route","render","canAccessRoute","match","EditHealthSystemModal","editHealthSystemActions","healthSystemActionsEnum","EDIT_HEALTH_SYSTEM","EDIT_REGION_NAME","CREATE_NEW_REGION","DELETE_HEALTH_SYSTEM","DELETE_REGION","setHealthSystemInputValue","hasPressedEnter","saveHealthSystemName","checkIfHealthSystemExists","healthSystemNameError","onHealthSystemNameChange","toggleAlert","setRegionInputValue","keyPressed","inputVal","currentRegions","regionError","regionExist","saveRegionName","regionName","isNewRegion","removeRegion","currentRegion","addNewRegion","getTime","deleteSelected","isRegionSelected","selectedRegionId","isCurrentRegion","moveToAnotherRegion","onHealthSystemDelete","toggleConfirmDeleteModal","newHealthSystemInfo","onCurrentRegionDelete","isConfirmDeleteRegionModalOpen","activeElement","HTMLElement","blur","showSuccessAlert","showErrorAlert","healthSystemData","isOpen","isEditSystemModalLoading","SectorList","hasHospitals","getSelectedSectorFromUrl","getSelectedSectorId","updateHealthSystemList","componentDidUpdate","isSwitchHealthSystemModalOpen","treeItems","getExpandedOptions","treeViewKey","treeObj","transformHealthSystemArr","transformRegionsArr","currentHealthSystemIndex","currentRegionIndex","isSwitchHealthSystemModalLoading","onNewSector","createNewSector","hasNoSectors","healthSystemIndex","firstRegion","toggleEditHealthSystemModal","isEditHealthSystemModalOpen","onTreeViewLinkClick","changeHealthSystem","changeRegion","isSwitchModal","expandAllTreeItems","sectorSearchValue","addFeed","handleHealthSystemOptions","switchHealthSystem","firstHealthSystem","updateHealthSystemName","toggleFeedsLimitModal","showFeedsLimitModal","setSearchValue","sendCheckDeviceActiveConferences","objectId","objectType","_","cloneDeep","healthSystemOptions","AssignDeviceModal","isAddDeviceModalLoading","assignDevice","CallPatient","toggleDeviceUnavailable","isDeviceUnavailableModalOpen","checkIfRoomAvailable","redirect","encodeURIComponent","open","viewPatient","micStatus","audio","talkToPatient","permissionRes","onDevicePermissionChange","camStatus","onchange","helloBlocksMessages","getCurrentRoom","margin","setError","sectorNameError","setSectorNameError","unit","bed","adtRoomLocation","setAdtRoomLocation","adtRoomLocationError","setAdtRoomLocationError","uploadLogoInputRef","getRoomDetail","sectorData","all","roomDetails","roomLocation","responseError","getLocationIdentificationInformation","detailUnit","detailRoom","detailBed","editRoomDetails","emptyUnit","emptyRoom","emptyBed","onEditSector","editSectorName","enableReinitialize","validationSchema","Yup","shape","formikProps","errors","handleChange","handleSubmit","isEditSectorModalOpen","hospitalLogo","accept","onFileInputFocus","onSelectFile","fileError","parentSectorType","parentSectorName","getDeviceList","getAllowList","solHelloId","deleteDevice","sendCommand","getLatestAppRelease","appId","short_version","version","uploaded_at","install_url","min_os","getDeviceRebootLogs","deviceCommandLogs","addDeviceSettings","settings","settingTypeId","getDeviceLogsCommand","CsvExport","asyncExportMethod","disable","fileName","csvData","setCsvData","csvInstance","click","newCsvData","filename","hasNameChanges","logs","hasChanges","currentName","exportLogsAsCsv","Info","report","Device","sn","createdDate","Reason","RebootLogExport","solHelloDeviceId","serialNumber","handleCheckBoxChange","poolDevices","allDevicesSelected","voiceCommandCalling","getCheckBoxId","getLevelDevices","CheckBox","DeviceSelection","VoiceCommandCallingModal","changedDevices","setChangedDevices","setLoading","setHasErrors","changeVoiceCommandCalling","settingValue","toggleVoiceCommandCallingModal","isVoiceCommandCallingModalOpen","newDevices","updateVoiceCommandCallingList","sectorDevices","PullDeviceLogs","hasErrors","modal","setModal","sendPullLogsCommand","Hospital","loadHospital","getCodeNameByOsVersion","osVersion","latestAppRelease","deviceList","d","displayDevices","firmwareRevision","appVersion","macAddress","ipAddress","actions","toggleRebootDeviceModal","toggleDeleteDeviceModal","selectedOrg","toggleDeleteOrgUnitModal","unAssignDevice","selectedDevice","isDeleteDeviceModalLoading","rebootDevice","rebootReason","forceUpdateDevice","latestAppVersion","toggleUpdateDeviceModal","deleteOrgUnitSubmit","toggleHospitalModal","isHospitalModalOpen","getCurrentHealthSystem","sectorParent","isDeleteDeviceModalOpen","isRebootDeviceModalOpen","isUpdateDeviceModalOpen","isDeleteOrgUnitModalOpen","setInputValues","updateTree","input","file","files","reader","FileReader","readAsDataURL","isUploadLogoModalOpen","onImageLoaded","image","imageRef","onCropChange","crop","makeClientCrop","isHospitalLogoModalLoading","imageData","logoData","originalUrl","getImageCrop","errorStateParameters","request","xScale","naturalWidth","yScale","naturalHeight","toggleHospitalLogoCrop","updateVCCList","solHelloDeviceIds","androidVersion","hospitalName","getCurrentHospital","sections","exportAsCsv","ruleOfThirds","EditSectorModal","Department","loadDepartment","sectorLocation","moveToParentSector","currentSectorId","parentSector","toggleDepartmentModal","isDepartmentModalOpen","departmentName","getCurrentDepartment","Floor","loadFloor","floorName","getCurrentFloor","onTabIconClick","toggleModal","Room","loadRoom","devicesList","allowListList","fetchUnassociatedDevices","fetchDeviceData","fetchLatestAppRelease","deviceData","unassociatedDevicesRes","showErrorMessage","uid","isRoomLoaded","unassociatedDevicesToSelect","isVoiceCommandCallingModalLoading","displayAllowlist","domainUrl","isAllowed","protocol","number","requestAllowlist","allowListReason","hasSucceeded","showSuccessMessage","isVoiceCommandCallingOpen","findSelectedDeviceById","setDeviceId","isAddDeviceModalSubmitDisabled","deviceIdInput","errorMessage","success","toggleDevicesModal","voiceCommandCallingSubmit","setting","toggleRoomModal","isRoomModalOpen","isDevicesModalOpen","toggleVoiceCommandCalling","handleCsvDropdownClick","exportDeviceDetailsRef","exportAllowlistRef","csvDropdownItems","ID","Allowed","Protocol","Response","exportAllowlistCsv","list","UnassignedNurse","Organization","hasHealthSystems","isRoomURL","pathName","path","Emitter","fn","isFunction","listeners","_fn","SignalingChannel","onMessage","wsServer","bindOn","callback","on","debug","socketId","send","_data","newData","from","candidate","sdp","sdpMid","sdpMLineIndex","streamInfo","EventDispatcher","spec","dispatcher","eventListeners","eventType","listener","clearEventListener","dispatchEvent","OwtEvent","MessageEvent","init","origin","P2P_CONN_SERVER_UNKNOWN","P2P_CONN_SERVER_UNAVAILABLE","P2P_CONN_SERVER_BUSY","P2P_CONN_SERVER_NOT_SUPPORTED","P2P_CONN_CLIENT_UNKNOWN","P2P_CONN_CLIENT_NOT_INITIALIZED","P2P_CONN_AUTH_UNKNOWN","P2P_CONN_AUTH_FAILED","P2P_MESSAGING_TARGET_UNREACHABLE","P2P_CLIENT_DENIED","P2P_CLIENT_UNKNOWN","P2P_CLIENT_UNSUPPORTED_METHOD","P2P_CLIENT_ILLEGAL_ARGUMENT","P2P_CLIENT_INVALID_STATE","P2P_CLIENT_NOT_ALLOWED","P2P_WEBRTC_UNKNOWN","P2P_WEBRTC_SDP","getErrorByCode","errorCode","2100","2101","2102","2103","2110","2111","2120","2121","2201","2400","2401","2402","2403","2404","2500","2501","P2PError","isFirefox","userAgent","isChrome","isSafari","createUuid","c","random","Publication","stop","getStats","mute","unmute","defineProperty","configurable","writable","Utils","isAllowedValue","allowedValues","ele","StreamSourceInfo","audioSourceInfo","videoSourceInfo","TypeError","Stream","stream","sourceInfo","attributes","MediaStream","getAudioTracks","getVideoTracks","LocalStream","RemoteStream","capabilities","StreamEvent","noOp","that","TRACE","INFO","WARNING","NONE","bindType","setLogLevel","trace","warning","setCodecParam","codec","param","sdpLines","fmtpLineIndex","findFmtpLine","fmtpObj","findLine","getCodecPayloadTypeFromLine","pt","writeFmtpLine","parseFmtpLine","fmtpLine","spacePos","keyValues","RegExp","pair","hasOwnProperty","getCodecPayloadType","substr","findLineInRange","startLine","endLine","realEndLine","sdpLine","audioCodecWhiteList","videoCodecWhiteList","removeCodecFramALine","reorderCodecs","codecs","concat","mLineIndex","originPayloads","payloads","appendRtxPayloads","mLine","newLine","setCodecOrder","setMaxBitrate","encodingParametersList","encodingParameters","maxBitrate","Event","DataChannelLabel","sysInfo","sdk","exec","runtime","os","continualIceGathering","unifiedPlan","streamRemovable","P2PPeerConnectionChannel","config","localId","remoteId","signaling","removeTrackById","trackId","offer","rtcPeerConnection","getRTCPeerConnection","getSenders","sender","track","removeTrack","_onNegotiationneeded","_config","_localId","_remoteId","_signaling","_pc","_publishedStreams","Map","_pendingStreams","_publishingStreams","_pendingUnpublishStreams","_myStreamInfo","_remoteStreamInfo","_remoteStreams","_remoteTrackSourceInfo","_publishPromises","_unpublishPromises","_publishingStreamTracks","_publishedStreamTracks","_isNegotiationNeeded","_remoteSideSupportsRemoveStream","_remoteSideSupportsPlanB","_remoteSideSupportsUnifiedPlan","_remoteIceCandidates","_dataChannels","_pendingMessages","_dataSeq","_sendDataPromises","_addedTrackIds","_isCaller","_infoSent","_disposed","_createPeerConnection","actioneeParticipantId","_polite","_ignoredOffer","_offering","errorType","_sendSignalingMessage","iceConnectionState","reconnectingPublish","setMyStreamInfo","senders","sendersId","tracks","getTracks","addTransceiver","tracksId","reuseAudioTransceiver","getTransceivers","t","mid","reuseVideoTransceiver","replaceTrack","addTrack","startsWith","transceiver","maxFramerate","rtcRtpSendParameters","getParameters","encodingParameterList","encodings","setParameters","wsEvent","set","has","_createDataChannel","_sendClosedMsgIfNecessary","_sendSysInfoIfNecessary","readyState","_stop","tracksStatsReports","_getStats","ErrorModule","mediaStreamTrack","reportsResult","statsReport","_SignalingMesssageHandler","sendSignalingMessage","_handleRemoteCapability","ON_TRACK_SOURCES","_trackSourcesHandler","ON_STREAM_INFO","_streamInfoHandler","_tracksAddedHandler","_tracksRemovedHandler","_sdpHandler","_chatClosedHandler","ids","mediaTrackIds","mediaStreamId","warn","targetStreamIndex","targetStream","publication","_unpublish","_onOffer","_onAnswer","_onRemoteIceCandidate","source","trackIds","signalingState","_setRtpSenderOptions","_setCodecOrder","sessionDescription","RTCSessionDescription","collision","setRemoteDescription","_createAndSendAnswer","publishConferenceError","_drainPendingMessages","_sendSdp","streams","_setStreamToRemoteStreamInfo","_checkIceConnectionStateAndFireEvent","audioTrackSource","videoTrackSource","StreamModule","streamEvent","_streamRemoved","_doNegotiate","candidateInfo","RTCIceCandidate","remoteDescription","addIceCandidate","currentTarget","_negotiating","_drainPendingStreams","_drainPendingRemoteIceCandidates","peerConnection","iceGatheringState","messageEvent","pcConfiguration","rtcConfiguration","sdpSemantics","RTCPeerConnection","connectionState","ontrack","_onRemoteTrackAdded","apply","onicecandidate","_onLocalIceCandidate","ondatachannel","_bindEventsToDataChannel","onsignalingstatechange","_onSignalingStateChange","oniceconnectionstatechange","_onIceConnectionStateChange","onicegatheringstatechange","_onIceGatheringStateChange","negotiationNeeded","shift","j","removeStream","dc","trackInfoData","streamInfoData","TRACK_SOURCES","STREAM_INFO","ua","_createAndSendOffer","audioEncoding","SdpUtils","videoEncoding","minBitrate","audioEncodings","startBitrate","_setMinBitrate","_setMaxBitrate","_setStartBitrate","newOffer","localDesc","iceRestart","createOffer","desc","_setRtpReceiverOptions","setLocalDescription","pop","finally","ignore","createAnswer","_logCurrentAndPendingLocalDescription","answerPayload","currentLocalDescription","pendingLocalDescription","mozGetUserMedia","createDataChannel","onmessage","_onDataChannelMessage","onopen","_onDataChannelOpen","onclose","_onDataChannelClose","onerror","notifyRemote","promiseError","close","clear","pcRemoteStream","getRemoteStreams","_isUnifiedPlan","mediaStreams","_getStreamByTrack","_areAllTracksEnded","_onRemoteStreamRemoved","_createStreamInfo","Offer","forScreenShare","isAudio","isVideo","isScreen","toScreenSharingSocket","ConferenceInfo","conferenceName","conversationId","fromUser","isChat","isDirectToHello","isMeetingRoom","isMultiparty","participants","inputDevices","isSecurityCam","tenantId","FromUser","objectGuidId","friendlyUrl","ConferenceParticipant","ConnectionState","P2PClientConfiguration","P2PClient","configuration","signalingChannel","onPeerConnectionCreated","setPrototypeOf","myId","self","WsEvents","getOrCreateChannel","allowedRemoteIds","errCode","disconnect","publish","sendMessageToSignaling","signalingForChannel","pcc","peerConnObj","ev","getChannel","hasPeerConnectionChannelForRemoteId","AudioSourceInfo","MIC","SCREENCAST","FILE","MIXED","VideoSourceInfo","CAMERA","AudioTrackConstraints","MediaFormatModule","v","VideoTrackConstraints","resolution","frameRate","StreamConstraints","audioConstraints","videoConstraints","isVideoConstrainsForScreenCast","constraints","MediaStreamFactory","utils","mediaConstraints","ideal","aspectRatio","facingMode","mediaSource","getDisplayMedia","getIceServers","prepareICEList","iceServers","server","urls","isDeleted","returnServer","credential","playSound","audioUrl","loop","Audio","currentTime","play","stopSound","pause","busySound","dropSound","outGoingCallSound","stopOutgoingCallSound","sendStats","retries","CallStats","addPeerConnection","pcObject","pushInterval","remoteParticipantId","startSendingStats","getStatsInterval","setInterval","removePeerConnection","stats","pushStats","clearInterval","flushInterval","outgoingMetricsBuffer","batch","prepareBatch","batchSize","timeStamp","generateTimeStamp","round","clickPluginInstance","ClickAnalyticsPlugin","reactPlugin","ReactPlugin","appInsights","ApplicationInsights","maxBatchInterval","disableFetchTracking","extensions","extensionConfig","identifier","dataTags","customDataPrefix","aiBlobAttributeTag","parentDataTag","donotTrackDataTag","captureAllMetaDataContent","useDefaultContentNameOrId","defaultRightClickBhvr","ai","initialize","instrumentationKey","browserHistory","loadAppInsights","addTelemetryInitializer","envelope","tags","consoleMethod","isInitialized","trackEvent","properties","conferenceData","printConsole","trackException","exception","CallManager","eventCallback","socketListeners","unbindTimeouts","cameraEventTimeout","addDeviceToMonitoring","inviteParticipantPayload","participant","startOutGoingCallTimerForParticipant","p2p","removeDeviceFromMonitoring","actioneeParticipant","getParticipantByParticipantId","clearMonitoringReAddInterval","reAddInterval","reAddToMonitoringIntervals","startMonitoring","startConferenceInfo","conferenceInfo","setConferenceData","setP2pClient","hasActiveConference","clearManager","ok","failureReason","endReason","deniedParticipant","callStartedOrJoined","endingCall","failedInvites","failedInvitationToParticipants","p2pClientConfiguration","bindP2pEvents","startConference","socketAuthorizationPromise","initMediaStream","setTrackIdsInConferenceInfo","closeSocket","callerParticipantId","helloDeviceName","localSrc","audioTrackId","videoTrackId","localScreenSrc","screenTrackId","joinConference","joinConferenceInfo","bindOnTrackEndedEventListener","audioStream","p2pChannel","addStreamToPendingStreams","anotherNursePickedUp","getInputStreamsStatus","validateStreamStatus","getStream","handelMediaStreamError","checkForStreamPermissions","mic","cam","audioCall","videoCall","videoStream","cameraFeedCall","localStream","monitoringSendOffer","streamSourceInfo","screenShare","togglingScreenShare","screenStream","screenTrack","toggleInfo","toggleEvent","eventResponse","handleEventFailureResponse","activeSrc","videoTracks","toggleAudio","audioTrack","enabled","streamType","toggleVideo","togglingVideo","hasCameraTrack","videoTrack","screensharingTrack","hasVideoTrack","_streamType","_isAudio","_isVideo","_isScreen","_actioneeParticipantId","requestToChangeBitrate","hasAudioTrack","peerSrc","ping","isIoConnected","pong","promiseTimeout","ms","race","checkIfConnectedToSignaling","checkIfConnected","handleReconnectingWithParticipant","p","endCall","onTrackEndedEventListener","trackDeviceNotFound","groupId","getSettings","trackType","localTrack","publishConferenceLog","sendLeaveEvent","leaveData","stopTracks","shouldCloseSocket","leaveReason","removeAllListeners","clearAndDeleteTimers","timers","outGoingCallTimer","_useCallStats","_callStats","toggleParticipantTrack","isTrackMuted","panTiltCamera","returnData","sendCameraEvent","cameraEventInProgress","serialCommand","toggleNightVision","nightVisionMode","togglePatientAtRiskAlert","isScreenshare","audioConstraintsForMic","streamConstraints","videoConstraintsForCamera","createMediaStream","startReAddFeedInterval","bindSocketEventListeners","updateParticipantStatus","clearOutGoingCallTimerForParticipant","isSwitchSuccessful","socketState","reconnectTimer","socketAuthorizationResolve","socketDisconnectReason","ON_CONNECT_ERROR","off","unbindSocketEventListeners","cb","streamInterval","connected","pccObj","REACT_APP_EXPOSE_PEERCONNECTIONS","peerConnections","_sendCallStatsInterval","onconnectionstatechange","onConnectionStateChange","reconnecting","participantObjectId","rebootHuddleCam","monitoringTrackToggled","isEnabled","hasAudio","NotesWrapper","section","isHidden","css","Notes","note","setNote","noteFontSize","setNoteFontSize","fontSize","LocalMicBtn","toggle","htmlAttributes","setIsMyMicActive","data-custom-isactive","VideoFeed","setFeedColor","onSetFeedColor","isFeedExpanded","onExpandClick","checkIsColorActive","feedColors","getTooltipElement","toolTipElementProperties","maxWidth","boxShadow","fontFamily","PortalTooltip","showMicPortal","showCamPortal","micBtnRef","camBtnRef","setVideoRefSource","disableButtons","removeReason","showFeed","showButtons","VideoFeedWrapper","feedColor","isMicPrivacyOn","isCameraPrivacyOn","onToggleNightVision","isNightVisionActive","onCloseClick","isAlarmActive","VideoFeedColorsWrapper","isAnyFeedExpanded","VideoFeedBottomOptions","data-custom-id","data-custom-conference","data-custom-room","onToggleAlarm","localAudioTrack","onToggleMyMicrophone","isPeerSpeakerActive","onTogglePeerSpeaker","getDeviceStatus","CameraControls","onRebootHuddleCamClick","isRebootCameraModalOpen","onRebootHuddleCam","shouldDisableTilt","showPTZ","onPanTiltCamera","onZoomCamera","disabledTiltDirections","onToggleCameraSwitch","isHuddleCamConnected","Monitoring","changeRoomsAndDevicesIcons","setActiveVideoFeeds","videoFeeds","mappedIds","toggleMonitoringMic","beforeUnloadEvent","returnValue","prepareStartConferenceInfo","v4","hasPermissionForMonitoring","getFailedFeed","failedParticipants","nFeed","failedFeed","f","conferenceEndReason","changeRoomAddDeviceIcon","newFeed","zoomLevel","dateAdded","roomHasDeviceAssigned","currentRoomName","initiatorInfoFailed","removeFeed","feed","endMonitoring","isFeedZoomed","handleBitrateChange","useHighBitrate","useLowBitrate","videoFeedsLength","expandedFeed","lowerBitrateFeedCountThreshold","deviceAdded","deviceIds","dep","toggleExpandFeed","previousExpandedFeed","currentFeed","deviceControlsLocked","showDeviceControlsLockedModal","togglePeerSpeaker","previousFeeds","videoFeed","previousFeed","toggleAlarm","onAlertPatientResponse","statAlarmError","toggleMyMicrophone","selectedFeed","prevFeed","setFeedAudioTrackAndDisablePrevious","newVideoFeeds","colors","foundIndex","collapseSecondColumn","onDeviceLockedEventHandler","stateToSet","doSendPanTiltCameraEvent","feeds","cameraResponseListener","shouldShowSwitchToHelloCamError","getConferenceEndedText","getVideoFeedByParticipantId","onAudioTrackToggled","onLocalAudioError","deviceStatusChanged","toggleSecondColumnButton","showAllowMicrophoneModal","previousParticipantId","statusResponse","ac","initialCallType","monitoringNurse","isNightVision","newState","bindWindowListeners","property","allFeeds","shouldShowConferenceEnded","debounce","Prompt","when","reload","getDeviceOngoingConferencesByLevel","exportCallLogs","timezone","DateTimeFormat","resolvedOptions","timeZone","getPastCallLogs","getNurseCallsForDashboard","nurseId","getKpisForDashboard","CallDetails","roomFeatureUsed","vcpFeatureUsed","selectedConference","nurse","devicesFeatures","audioUsed","isFeatureUsed","usedAudio","videoUsed","usedVideo","screenUsed","usedScreen","features","constructor","vcp","getCallDetails","Pagination","pageSizeChanged","goToNextPage","goToPrevPage","totalNumberOfPages","parseFloat","totalCount","menuPlacement","classNamePrefix","DropdownIndicator","PastCallsList","loading","selectedRegion","selectedHospital","selectedDepartment","selectedFloor","selectedRoom","currentLevel","currentTeamId","showCallQueueModal","showCallDetailsModal","showListOfRoomsModal","showStatAlarmsModal","currentCallLogQueue","selectedConferenceRoom","isExportLogsModalOpen","dateError","isExportLogsModalLoading","hasExportLogsModalErrors","allObj","startExportTask","getLogs","conferences","handleFromChange","daysDiff","handleToChange","showFromMonth","handleResetClick","openListOfRoomsModal","openStatAlarmsModal","conferenceRoom","showListOfRooms","getParticipantState","statAlarms","textDecoration","cursor","showListOfStatAlarms","statAlarm","activationTime","dateEnabled","deactivationTime","dateDisabled","durationInSeconds","healthSystemsOptions","unshift","filterByLevel","regionsOptions","onInitPastCallLogs","initiator","getMonitoredRooms","getPatientRoom","getVirtualCareProvider","getCallStatus","startedAt","endedAt","isInitiator","provider","isSuccessfulCall","getCallType","callDuration","queue","roomCount","getStatusBadge","details","openCallDetailsModal","openCallLogQueueModal","getDayPicker","showMonth","isInit","oneDayBefore","setDate","formattedStart","formattedEnd","hospitalOptions","h","departmentOptions","floorOptions","roomOptions","unavailableNurses","modifiers","getTableRows","onHealthSystemSelected","onRegionSelected","onHospitalSelected","onDepartmentSelected","onFloorSelected","onRoomSelected","parseDate","dayPickerProps","selectedDays","disabledDays","after","toMonth","numberOfMonths","onDayClick","getInput","focus","onDayChange","before","fromMonth","showListOfUnavailableNurses","OngoingCallsList","onTerminateRequestAcceptedHandler","selectedConferenceId","clearTerminateRequestTimeout","removeConferenceFromLogs","isTerminateCallModalLoading","terminateRequestSubmitButtonText","terminateRequestInProgress","terminateRequestCloseButtonText","closeParticipantTerminalCallModal","sendTerminateRequestCloseEvent","showParticipantTerminateCallModal","terminateRequestFailureReason","selectedParticipantId","closeTerminalCallModal","showTerminateCallModal","onForceTerminalCallModalSubmit","onParticipantForceTerminalCallModalSubmit","changeStatusOfParticipantLogs","onTerminalCallModalSubmit","terminateRequestTimeout","conferenceIndex","tableHeaders","terminateCall","openParticipantForceTerminateCallModal","bindSocketEvents","bindWindowEventListener","unbindSocketEvents","openForceTerminateCallModal","Dashboard","labels","datasets","chartData","setChartData","vcpCount","roomsObserved","numberOfCalls","monitoring","averageDuration","kpis","setKpis","setRegions","setHospitals","nurses","setNurses","setSelectedRegion","setSelectedHospital","selectedNurse","setSelectedNurse","setFrom","setTo","setCurrentLevel","searchedNurse","setSearchedNurse","toInput","getHealthSystemOptions","regionsList","nursesList","companyUsers","firstname","lastname","fetchNurses","getKpisTalkToPatientCallNumber","kpisResponse","callTypesCount","object","count","getKpisTalkToPatientAverageDuration","callTypesDuration","getDashboardTalkToPatientData","callTypes","kpisObj","_item","hospitalsList","chart","responsive","maintainAspectRatio","plugins","legend","elements","bar","borderWidth","scales","ticks","grid","onInputChange","CallLogs","CallDuration","getDuration","initial","add","asMilliseconds","startDurationInterval","durationInterval","callStartTime","timeDiff","abs","NightVisionControl","showButton","toggleNightvisionHandler","connectionQualityColor","PeerStats","videoBytesSent","audioBytesSent","videoBytesRec","audioBytesRec","transportType","previousStats","outbound","inbound","currentStats","videoResolution","videoOutboundResolution","audioCodec","videoCodec","videoOutboundCodec","audioOutboundCodec","RTCStatsType","OUTBOUND","INBOUND","TRACK","CODEC","REMOTE_CANDIDATE","RTCMediaType","fetchTimeInSeconds","byteToKilobit","currInboundReports","currOutboundReports","newStats","isLocalSrc","getDifference","framesEncoded","bytesSent","isMyMicOff","bytesReceived","isPeerMicPrivacyOn","getInboundFrameRate","componentWillUnmount","codecReport","codecId","remoteSource","trackReport","transportReport","transportId","candidatePair","selectedCandidatePairId","remoteCandidate","remoteCandidateId","setCurrentStats","frameHeight","frameWidth","mimeType","candidateType","outboundTrack","framesDecoded","TrackType","Call","getRoomNamePath","healthSystemPath","togglePeerCamera","isPeerVideoCamActive","isMyVideoCamActive","changeActiveSource","showTopParticipant","isMyVideoSelected","isScreenSharingSelected","onMicPermissionChange","micActive","onCamPermissionChange","toggleMyMic","toggleMyVideo","toggleMyStream","toggleMyScreenSharing","debouncedToggleStream","leading","trailing","startCloseTabTimeout","closeTabTimeout","activeSrcHandle","buildListFromStates","onMyMediaToggleClicked","onPeerMediaToggleClicked","peerMicActive","togglePTZ","shouldShowPatientCameraToggledOff","isVideoCall","setAudioSrcObject","audioRef","shouldShowStateComponents","shouldShowConnectionStatus","sendPanTiltCameraEvent","callerObjectId","renderCallStates","myAvatarUrl","getPrivacyButtonsErrorMessage","shouldShowPrivacyButtonsErrorMessage","toggleRightColumn","showRightColumn","onLocalVideoError","patientId","decodeURIComponent","avatarUrl","roomNamePath","tvHdmiPort","incoming","topParticipantAvatar","replaceAll","PatientFeed","playVideo","videoPlayPromise","checkVideoPlayingTimeout","soundPermission","fromUserInfo","toggleHandler","peerAudioMuted","setCallStartTime","handleSoundPermission","toggleNightvision","InputFeedback","field","form","touched","touch","InviteAdmins","addExtraInputField","updatedExtraFields","extraFields","displayExtraFields","table","schema","isValid","validateOnBlur","email0","email1","email2","email3","resetForm","onLoading","onSuccess","checkEmail","val1","bindSubmitForm","submitForm","loaded","MultiSelect","handleBlur","isMulti","isClearable","backspaceRemovesValue","InviteNurses","healthSystemsArr","inviteType","emailObjs","nullable","setFieldValue","setFieldTouched","getRole","InvitedUsersList","handleSearchChanges","invitedMembers","companyInvites","handleCancelInvite","statusId","inviteIndex","invite","currentInviteId","StatusId","inviteStatusId","isCancelModalOpen","handleResendInvite","isResendModalOpen","invitationInfo","emailBox","getEmailBox","invitedBy","getProfileBox","companyUser","getLocation","getStatus","getInviteType","getEditButtons","legnth","teamName","openModal","displayInvitedUsers","toggleSendInvitationsModal","selectedOptions","onSelectLocation","selectedId","AssignDropdown","wordBreak","selected","ManageHealthSystems","Assignation","currentUserSubTree","preselected","getSectorPath","unassigned","fetchingSubTree","assigningUser","healthsystems","showHealthSystemForm","loadingHealthSystems","member","assignation","deleteHealthSystem","deleteHealthSystemMember","subtree","assignedHealthSystems","usersTableHeaders","displayHealthSystems","paddingTop","ProfilePicture","charAt","UserInformation","healthSystemInputTypes","SINGLE","MULTI","roleHealthSystemTypes","currentMemberObj","profileInfo","workExperience","getBanyanRole","workExperiences","ex","showOnBC","company","getSelectedHealthSystems","healthSystemInputType","updateNurseProps","workExperienceId","userUpdated","onError","getValidationForm","validation","isMemberTitleEnabled","validateOnChange","SuperUserHealthSystem","superCompanyUserId","pastHealthSystemId","pastHealthSystem","UsersList","handleSubmitMyForm","submitMyForm","handleDeleteMember","deletingMember","currentMemberId","members","isDeleteModalOpen","onRecoverPassword","tokenId","accountRecoveryMailSent","accountRecoveryMailFailed","toggleAccountRecoveryModal","getInviter","inviter","m","userIndex","handleUpdatedMemberPresence","showAccountRecoveryModal","sendNewLink","isEditMemberModalOpen","editingMember","manageUsersSelectedTab","healthSystemAddition","presenceColor","isOwner","profileBox","dateInvited","healthsystem","pendingRecoveryInviteToken","openEditMemberModal","openDeleteMemberModal","displayUsers","isAdmin","isVirtualCarer","InviteSuperUsers","sendInvitations","isSendInvitationsModalOpen","displayInviteForm","Login","Redirect","minContent","CreateHealthSystem","newRegionNames","regionNames","deleteRegion","setHealthSystemName","getHealthSystemRegions","hsName","hasDuplicate","Set","hasRegionsValidLength","isHealthSystemCreated","handleCancelClick","LogOutUser","CompleteProfile","inviteValidation","successResponse","submitUserRegistration","queryString","cid","accountResponse","accountExists","existingUser","getAppropriateErrorMessage","passwordConfirm","matches","oneOf","Help","Recover","ResetPassword","getUserIdleConfigurations","addUserIdleConfiguration","healthSystemIds","timeoutMinutes","respnse","getUserIdleConfigurationHistory","getUserIdleConfigurationMinutes","getTeamConfigurations","addDeviceConfiguration","getDeviceConfigurationHistory","deleteTVDeviceConfiguration","getUserIdleConfigurationHealthSystems","UserIdleForm","isSuccessfulAlertOn","isErrorsAlertOn","setSubmitting","onSucceeded","onCloseModal","isSuperUser","positive","isSubmitting","isModalOpen","UserIdleTimeout","userIdleConfigurations","totalUserIdleConfigs","editConfig","transformTypes","WithValues","WithLabels","userIdleHeaders","getConfigurations","selectedRole","onRoleSelected","setSelectedRole","onPaginationChange","isSubmitted","healthSystemsWithConfigs","transformArray","isHealthSystem","propName","newArray","openEditModal","team","getButtons","onHistoryClick","transformUserIdleConfigurations","createdBy","userCreated","getTeamConfigurationProfiles","teamTypeId","addTeamConfigurationProfile","teamType","updateTeamConfigurationProfile","getTeamConfigurationProfilesHisotry","deleteTeamConfigurationProfile","DeviceConfig","initialConfigurationFormData","hdmiPorts","endCallSource","tvs","integrationTypes","selectedHealthSystemValue","selectedHospitalValue","selectedHdmiPortValue","selectedTVValue","selectedEndCallSource","selectedDepartmentValue","selectedTeamProfileValue","selectedTeamProfile","ringtoneVolumeValue","selectedIntegrationTypeValue","profileName","hsSecret","userName","healthSystemError","hospitalError","departmentError","hdmiPortError","endCallSourceError","ringtoneVolumeError","profileNameError","urlError","portError","hsSecretError","teamProfileError","tvError","isSecretChanged","newSecret","isHospitalLoading","isDepartmentLoading","showConfigurationModal","teamProfiles","isHospitalDropdownDisabled","isDepartmentDropdownDisabled","configurations","healthSystemConfigs","isFormLoading","totalConfigs","isDeleteConfigModalOpen","deleteConfig","configurationFormData","deviceConfigHeaders","healthSystemConfigHeaders","activeSubTab","HealthSystem","TV","0","3","getTeamProfiles","selectedHospitalId","selectedDepartmentId","teamConfigurationProfiles","getHospitals","getDepartments","hsId","getDeviceConfigurations","deviceConfigurations","Value","getHealthSystemConfigs","transformHealthSystemsForSelect","firstHSHospitals","onHospitalSelect","onDepartmentSelect","setSelectedDepartment","getHospitalConfigurations","onHealthSystemSelect","onFormHealthSystemSelect","hsHospitals","onFormHospitalSelect","onFormDepartmentSelect","onFormTeamProfileSelect","profile","onFormHdmiPortSelect","onEndCallSourceSelect","onFormTVSelect","tv","onFormRingtoneVolumeChange","hasError","ringtoneVolumeNumber","hdmiPort","teamConfigurationProfileId","defaultSource","ringtoneVolume","resetAddConfigurationModal","userNameError","newSecretKey","secretKeyWoSpaces","secret","btoa","integrationTypeId","transformConfigs","teamConfigurationProfile","pushFiltersToQueryString","toggleConfigurationModal","openDeleteModal","ds","isBase64","decodedSecret","userData","tabIndex","onSubTabChange","getTabsConfigurations","onFormTextChange","deleteTeamProfile","typeId","selectIntegrationType","htmlFor","step","getActiveDirectories","getActiveDirectoriesHistory","getADGroupRoles","updateActiveDirectory","activeDirectory","addActiveDirectory","addGroupRole","groupRole","group","updateGroupRole","deleteActiveDirectory","deleteGroupRole","ActiveDirectoryForm","isPasswordChanged","hospitalIds","activeTab","domain","validGroupName","adClientSecret","adClientId","username","fullPassword","getValidationSchema","onHealthSystemChange","ActiveDirectory","formHospitals","isModalHospitalsLoading","activeDirectories","totalADs","groupRoles","totalGroupRoles","isHospitalDisabled","ADs","GroupRoles","activeDirectoriesHeaders","groupRoleHeaders","adGroupRoles","shouldAppendAll","toggleConfigModal","getADButtons","getGroupRoleButtons","setFormHospitals","transformActiveDirectories","getNtpConfigurations","addNtpConfiguration","ntpUrls","deleteNtpConfiguration","getNtpConfigurationHistory","editNtpConfiguration","NetworkConfig","selectedHospitalName","selectedHealthSystemName","ntpUrl1","ntpUrl2","ntpPort1","ntpPort2","configurationId","setShowConfigurationModal","setIsHospitalDropdownDisabled","setConfigurations","setIsFormLoading","setTotalConfigs","setConfigurationFormData","setIsDeleteConfigModalOpen","setDeleteConfig","setEditConfig","orgProps","transformItemsForSelect","healthSystemsList","setHealthSystemsAndConfigs","getHospitalsByHealthSystemId","getActionButtons","getHospitalsList","useCallback","configs","teamNetworkNtpConfigurations","ntpUrl","newConfigurationFormData","setDeviceConfiguration","configId","firstUrlPort","secondUrlPort","editParams","lastIndexOf","submitDeleteConfig","onKeyDown","Configurations","queryParams","setStateFromQueryString","hasQueryChanged","currentParams","prevParams","validPageSize","onRoleChange","onHospitalChange","onDepartmentChange","tabs","USER_IDLE_TIMEOUT","DEVICE","ACTIVE_DIRECTORY","NETWORK","ConfigurationsHistory","teamProfileHeaders","ntpConfigHeaders","teamProfile","ntpConfigurations","getConfigurationHistory","userIdleConfiguration","deviceConfiguration","teamNetworkNtpConfiguration","getClassName","transformConfigurations","editedBy","userEdited","dateEdited","getHeaders","back","marginLeft","JWTAuthenticatedRoute","TimeError","Routes","Switch","Socket","signalingUrl","REACT_APP_SIGNALING_URL","io","secure","transports","initSocketListeners","myClientInfo","mySocketId","clearConferences","clientType","versionName","oldSocketId","incomingCallsDisabled","shouldDisableIncomingCalls","handleUserPresence","setStatusDevice","fetchNotificationsCounter","setDeviceCallState","newTree","userSocketsLength","notFirstConnect","sessionStorage","changeUserPresence","IncomingCall","startIncomingCallTimer","incomingCallTimer","incomingConferenceInfo","sendMissedCallNotification","hideIncomingCall","addOnUnloadEvent","onAnsweredElsewhere","onInitiatorLeft","onIncomingCall","incomingCallAudio","paused","showSelf","incomingCallNotification","sendIncomingCallNotification","addSocketListeners","removeSocketListeners","declineIncomingCall","acceptIncomingCall","openCallWindow","notification","getDeviceName","sendNotification","tag","renotify","querySelector","onClickCallback","Notification","notificationPermission","GRANTED","requestPermission","newNotification","onclick","clearIncomingCallTimer","DENIED","pulseAnimation","postUserIdleMessage","UserIdleCheck","userIdleTimeout","alertDisplayTime","postMessages","CONFIRMED","IN_CALL","unbindListeners","getUserIdleConfiguration","startTimeout","bindListeners","resetTimeout","logoutInterval","setActiveUser","isLogoutAlertOn","handler","tabsListener","resetActivity","openLogoutAlert","secondCounter","closeAlert","AppInsightsTelemetryProvider","initialized","appInsightsInstrumentationKey","AppInsightsContext","withAITracking","StreamPermissionsModal","App","startVersionTimeout","getTokensIfCall","startApplication","versionTimeout","versionTimeoutInterval","compareVersions","fetch","configText","displayContentUpdatedAlert","newSocketConnectionState","socketConnectionState","displaySocketConnectionAlert","socketStateTimeout","BrowserRouter","basename","hostname","enhancers","createStore","rootReducer","compose","applyMiddleware","configureStore","rootElement","serviceWorker","ready","registration","unregister"],"mappings":"uWAMaA,EAGmB,4BAHnBA,EAIa,6BAJbA,EAKU,yBALVA,EAMA,eANAA,EAOM,oBAPNA,EAQS,yBARTA,EAUC,gBAVDA,EAWO,sBAXPA,EAYK,oBAZLA,EAagB,gCAbhBA,EAcU,0BAdVA,EAeC,gBAfDA,EAgBc,8BAhBdA,EAiBgB,gCAjBhBA,EAkBc,8BAGdC,EACY,yBADZA,EAEiB,8BAFjBA,EAGiB,8BAHjBA,EAKY,yBALZA,EAMkB,+BANlBA,EAOkB,+BAGlBC,EACoB,iCADpBA,EAEyB,sCAFzBA,EAGyB,sCAGzBC,EACc,2BC1CrBC,EAAe,CACpBC,SAAU,KACVC,yBAAyB,GCFpBF,EAAe,CACpBG,WAAY,GACZC,iBAAkB,GAClBC,kBAAmB,KACnBC,sBAAuB,KACvBC,wBAAyB,GACzBC,gBAAiB,KACjBC,SAAU,CACTC,KAAM,GACNC,YAAa,IAEdC,sBAAuB,GACvBC,mBAAoB,KACpBC,sBAAuB,GACvBC,0BAA2B,CAC1BC,MAAM,EACNC,SAAU,KACVC,iBAAiB,GAElBC,iBAAkB,MAmFJC,EAhFM,SAACC,EAAOC,GAE5B,GADAD,EAAQA,GAASrB,EACbsB,EAAOC,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UAA/BA,EAAiBuyB,WACrC,kBAAC,GAAD,CAAwBrD,OAAQlvB,EAAkBumC,2BAA4BxlB,KAAKH,MAAM0yB,oBAAoB/M,gCAKjH,kBAAC,QAAD,KACC,kBAAC,GAAD,CAAMhlB,KAAK,OAAOC,MAAM,OAAOS,QAAQ,QAAQF,UAAU,SAASF,WAAW,UAC5E,kBAAC,GAAD,a,GAnNYb,aAyOHuJ,gBAdS,SAAArqB,GACvB,MAAO,CACND,aAAcC,EAAMD,aACpByB,cAAexB,EAAMwB,kBAII,SAAAkhB,GAC1B,MAAO,CACN0wB,oBAAqB9oB,YAAmB8qB,GAA4B1yB,GACpEwlB,yBAA0B,kBAAMxlB,EAASwlB,UAI5B7d,CAA6CgxF,ICpPxCpxF,QACU,cAA7BjoB,OAAOka,SAASmgG,UAEc,UAA7Br6G,OAAOka,SAASmgG,UAEhBr6G,OAAOka,SAASmgG,SAASzmE,MAAM,2D,8CCH3B16B,G5KNS,SAAwBvc,GAEtC,IAAM29G,EAAY,GAMlB,OAAOC,YAAYC,EAAa79G,EAAc89G,IAAO,WAAP,GAAQC,IAAe,WAAf,EAAmBh7G,IAA3B,OAA2C46G,K4KF5EK,GACRC,GAAcpvF,SAASqD,eAAe,QAE5CR,IAASqlB,OACR,kBAAC,IAAD,CAAUx6B,MAAOA,IAChB,kBAAC,GAAD,OAED0hG,ID4EI,kBAAmB14F,WACtBA,UAAU24F,cAAcC,MAAMh1G,MAAK,SAAAi1G,GAClCA,EAAaC,kB","file":"static/js/main.cc65271c.chunk.js","sourcesContent":["export const CallLogsActionTypes = {\n\tFETCHING_CALL_LOGS: 'FETCHING_CALL_LOGS',\n\tFETCHING_CALL_LOGS_SUCCESS: 'FETCHING_CALL_LOGS_SUCCESS',\n\tFETCHING_CALL_LOGS_FAILURE: 'FETCHING_CALL_LOGS_FAILURE',\n};\n\nexport const OverviewActionTypes = {\n\ttoggleUsersModal: 'TOGGLE_USERS_MODAL',\n\ttoggleDeviceModal: 'TOGGLE_DEVICE_MODAL',\n\ttoggleSwitchHealthSystemModal: 'TOGGLE_HEALTH_SYTEM_MODAL',\n\ttoggleAssignDeviceModal: 'TOGGLE_ASSIGN_DEVICE_MODAL',\n\ttoggleLeftNavigation: 'TOGGLE_LEFT_NAVIGATION',\n\taddNewRoom: 'ADD_NEW_ROOM',\n\tupdateBreadcrumb: 'UPDATE_BREADCRUMB',\n\tsetAllHealthSystems: 'SET_ALL_HEALTH_SYSTEMS',\n\tsetHealthSystem: 'SET_HEALTH_SYSTEM',\n\tsetTreeData: 'SET_TREE_DATA',\n\tcreateNewHospital: 'CREATE_NEW_HOSPITAL',\n\tsetHospitalTree: 'SET_HOSPITAL_TREE',\n\tsetCurrentHealthSystemInfo: 'SET_CURRENT_HEALTH_SYTEM_INFO',\n\tsetCurrentHospitalId: 'SET_CURRENT_HOSPITAL_ID',\n\tsetUserInfo: 'SET_USER_INFO',\n\tsetCurrentSectorLocation: 'SET_CURRENT_SECTOR_LOCATION',\n\tsetStreamPermissionMessage: 'SET_STREAM_PERMISSION_MESSAGE',\n\tsetActiveMonitoringFeeds: 'SET_ACTIVE_MONITORING_FEEDS',\n};\n\nexport const UserPresenceActionTypes = {\n\tFETCHING_USER_PRESENCE: 'FETCHING_USER_PRESENCE',\n\tFETCH_USER_PRESENCE_SUCCESS: 'FETCH_USER_PRESENCE_SUCCESS',\n\tFETCH_USER_PRESENCE_FAILURE: 'FETCH_USER_PRESENCE_FAILURE',\n\n\tUPDATING_USER_PRESENCE: 'UPDATING_USER_PRESENCE',\n\tUPDATE_USER_PRESENCE_SUCCESS: 'UPDATE_USER_PRESENCE_SUCCESS',\n\tUPDATE_USER_PRESENCE_FAILURE: 'UPDATE_USER_PRESENCE_FAILURE',\n};\n\nexport const NotificationsCounterActionTypes = {\n\tFETCHING_NOTIFICATIONS_COUNTER: 'FETCHING_NOTIFICATIONS_COUNTER',\n\tFETCH_NOTIFICATIONS_COUNTER_SUCCESS: 'FETCH_NOTIFICATIONS_COUNTER_SUCCESS',\n\tFETCH_NOTIFICATIONS_COUNTER_FAILURE: 'FETCH_NOTIFICATIONS_COUNTER_FAILURE',\n};\n\nexport const NursePoolingActionTypes = {\n\tSET_CURRENT_HEALTH_SYTEM: 'SET_CURRENT_HEALTH_SYTEM',\n};\n","import { OverviewActionTypes } from '../../constants/action-types';\n\nconst initialState = {\n\tuserInfo: null,\n\tisLefNavigationExpanded: false,\n};\n\nexport const mainLayout = (state, action) => {\n\tstate = state || initialState;\n\n\tif (action.type === OverviewActionTypes.setUserInfo) {\n\t\treturn { ...state, userInfo: action.payload };\n\t}\n\n\tif (action.type === OverviewActionTypes.toggleLeftNavigation) {\n\t\treturn { ...state, isLefNavigationExpanded: !state.isLefNavigationExpanded };\n\t}\n\n\treturn state;\n};\n","import { OverviewActionTypes } from 'constants/action-types';\n\nconst initialState = {\n\tbreadcrumb: [],\n\tallHealthSystems: [],\n\tcurrentHospitalId: null,\n\tcurrentHealthSystemId: null,\n\tcurrentHealthSystemName: '',\n\tcurrentRegionId: null,\n\ttreeData: {\n\t\ttree: [],\n\t\tpreSelected: [],\n\t},\n\tactiveMonitoringFeeds: [],\n\tcurrentHelloDevice: null,\n\tcurrentSectorLocation: [],\n\tshowAssignDeviceModalData: {\n\t\tshow: false,\n\t\tdeviceId: null,\n\t\tassignCompleted: false,\n\t},\n\tstreamPermission: null,\n};\n\nconst organization = (state, action) => {\n\tstate = state || initialState;\n\tif (action.type === OverviewActionTypes.updateBreadcrumb) {\n\t\treturn { ...state, breadcrumb: action.payload };\n\t}\n\n\tif (action.type === OverviewActionTypes.toggleAssignDeviceModal) {\n\t\treturn {\n\t\t\t...state,\n\t\t\tshowAssignDeviceModalData: {\n\t\t\t\tshow: action.payload.show,\n\t\t\t\tdeviceId: action.payload.deviceId,\n\t\t\t\tassignCompleted: action.payload.assignCompleted,\n\t\t\t},\n\t\t};\n\t}\n\n\tif (action.type === OverviewActionTypes.setAllHealthSystems) {\n\t\treturn {\n\t\t\t...state,\n\t\t\tallHealthSystems: action.payload.healthSystems,\n\t\t\tcurrentHealthSystemId: action.payload.currentHealthSystem.currentHealthSystemId,\n\t\t\tcurrentRegionId: action.payload.currentHealthSystem.currentRegionId,\n\t\t\tcurrentHealthSystemName: action.payload.currentHealthSystem.currentHealthSystemName,\n\t\t};\n\t}\n\n\tif (action.type === OverviewActionTypes.setCurrentHealthSystemInfo) {\n\t\treturn {\n\t\t\t...state,\n\t\t\tcurrentHealthSystemId: action.payload.currentHealthSystemId,\n\t\t\tcurrentRegionId: action.payload.currentRegionId,\n\t\t\tcurrentHealthSystemName: action.payload.currentHealthSystemName,\n\t\t};\n\t}\n\n\tif (action.type === OverviewActionTypes.createNewHospital) {\n\t\tstate.treeData.tree.push({\n\t\t\ticon: 'business',\n\t\t\ttype: 'hospital',\n\t\t\tisNewOption: true,\n\t\t\tsubOptions: [],\n\t\t});\n\n\t\tconst newTreeData = state.treeData.tree.slice();\n\t\treturn {\n\t\t\t...state,\n\t\t\ttreeData: {\n\t\t\t\ttree: newTreeData,\n\t\t\t},\n\t\t};\n\t}\n\n\tif (action.type === OverviewActionTypes.setStreamPermissionMessage) {\n\t\treturn { ...state, streamPermission: action.payload };\n\t}\n\n\tif (action.type === OverviewActionTypes.setActiveMonitoringFeeds) {\n\t\treturn { ...state, activeMonitoringFeeds: action.payload };\n\t}\n\n\tif (action.type === OverviewActionTypes.setCurrentHospitalId) {\n\t\treturn { ...state, currentHospitalId: action.payload };\n\t}\n\n\tif (action.type === OverviewActionTypes.setHospitalTree) {\n\t\treturn { ...state, hospitalTree: action.payload };\n\t}\n\n\tif (action.type === OverviewActionTypes.setTreeData) {\n\t\treturn { ...state, treeData: action.payload };\n\t}\n\n\tif (action.type === OverviewActionTypes.setCurrentSectorLocation) {\n\t\treturn { ...state, currentSectorLocation: action.payload };\n\t}\n\n\treturn state;\n};\n\nexport default organization;\n","import { UserPresenceActionTypes } from 'constants/action-types';\n\nconst initialState = {\n\tpresenceStatusTypeId: 0,\n\tcustomMessage: '',\n\tdefaultMessage: '',\n\n\tupdatingUserPresence: false,\n\tfetchingUserPresence: false,\n};\n\nexport const userPresence = (state, action) => {\n\tstate = state || initialState;\n\n\tswitch (action.type) {\n\t\tcase UserPresenceActionTypes.UPDATING_USER_PRESENCE:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tupdatingUserPresence: true,\n\t\t\t};\n\t\tcase UserPresenceActionTypes.UPDATE_USER_PRESENCE_FAILURE:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tupdatingUserPresence: false,\n\t\t\t};\n\t\tcase UserPresenceActionTypes.UPDATE_USER_PRESENCE_SUCCESS:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tupdatingUserPresence: false,\n\t\t\t\t...action.data,\n\t\t\t};\n\t\tcase UserPresenceActionTypes.FETCHING_USER_PRESENCE:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tfetchingUserPresence: true,\n\t\t\t};\n\t\tcase UserPresenceActionTypes.FETCH_USER_PRESENCE_FAILURE:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tfetchingUserPresence: false,\n\t\t\t};\n\t\tcase UserPresenceActionTypes.FETCH_USER_PRESENCE_SUCCESS:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tfetchingUserPresence: false,\n\t\t\t\t...action.data,\n\t\t\t};\n\t}\n\n\treturn state;\n};\n","import { NotificationsCounterActionTypes } from 'constants/action-types';\n\nconst initialState = {\n\tnotificationsCounter: 0,\n\n\tfetchingNotificationCounter: false,\n};\n\nexport const notifications = (state, action) => {\n\tstate = state || initialState;\n\n\tswitch (action.type) {\n\t\tcase NotificationsCounterActionTypes.FETCHING_NOTIFICATIONS_COUNTER:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tfetchingNotificationCounter: true,\n\t\t\t};\n\t\tcase NotificationsCounterActionTypes.FETCH_NOTIFICATIONS_COUNTER_FAILURE:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tfetchingNotificationCounter: false,\n\t\t\t};\n\t\tcase NotificationsCounterActionTypes.FETCH_NOTIFICATIONS_COUNTER_SUCCESS:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tfetchingNotificationCounter: false,\n\t\t\t\tnotificationsCounter: action.data,\n\t\t\t};\n\t}\n\n\treturn state;\n};\n","import { NursePoolingActionTypes } from 'constants/action-types';\n\nconst initialState = {\n\tcurrentHealthSystem: null,\n};\n\nexport const nursePooling = (state, action) => {\n\tstate = state || initialState;\n\n\tif (action.type === NursePoolingActionTypes.SET_CURRENT_HEALTH_SYTEM) {\n\t\treturn { ...state, currentHealthSystem: action.payload };\n\t}\n\n\treturn state;\n};\n","import { combineReducers } from 'redux';\nimport { mainLayout } from './mainLayout/reducer';\nimport organization from './organization/reducer';\nimport { userPresence } from './userPresence/reducer';\nimport { notifications } from './notifications/reducer';\nimport { nursePooling } from './nursePooling/reducer';\n\nexport default combineReducers({\n\tmainLayout,\n\torganization,\n\tuserPresence,\n\tnotifications,\n\tnursePooling,\n});\n","import { applyMiddleware, compose, createStore } from 'redux';\nimport rootReducer from '../state/index';\nimport thunk from 'redux-thunk';\nimport logger from 'redux-logger';\nimport promise from 'redux-promise-middleware';\n\nexport const middleware = [thunk, logger, promise];\n\nexport default function configureStore(initialState) {\n\t// In development, use the browser's Redux dev tools extension if installed\n\tconst enhancers = [];\n\tconst isDevelopment = process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test';\n\tif (isDevelopment && typeof window !== 'undefined' && window.devToolsExtension) {\n\t\tenhancers.push(window.devToolsExtension());\n\t}\n\n\treturn createStore(rootReducer, initialState, compose(applyMiddleware(...middleware), ...enhancers));\n}\n","export const IDENTITY_CONFIG = {};\n\nIDENTITY_CONFIG.automaticSilentRenew = true;\nIDENTITY_CONFIG.loadUserInfo = false;\nIDENTITY_CONFIG.response_type = 'code';\nIDENTITY_CONFIG.response_mode = 'query';\nIDENTITY_CONFIG.scope = 'openid profile email sol.user api.gateway API';\nif (process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test') {\n\tIDENTITY_CONFIG.authority = process.env.REACT_APP_IDSRV_URL;\n\tIDENTITY_CONFIG.client_id = process.env.REACT_APP_IDSRV_CLIENT_ID;\n\tIDENTITY_CONFIG.redirect_uri = process.env.REACT_APP_IDSRV_REDIRECT_URL;\n\tIDENTITY_CONFIG.login = process.env.REACT_APP_IDSRV_URL + '/login';\n\tIDENTITY_CONFIG.silent_redirect_uri = process.env.REACT_APP_SILENT_REDIRECT_URL;\n\tIDENTITY_CONFIG.post_logout_redirect_uri = process.env.REACT_APP_LOGOUT_URL;\n\tIDENTITY_CONFIG.public_uri = process.env.REACT_APP_PUBLIC_URL;\n\tIDENTITY_CONFIG.client_secret = process.env.REACT_APP_IDSRV_CLIENT_SECRET;\n} else {\n\tIDENTITY_CONFIG.authority = window.__env__.REACT_APP_IDSRV_URL;\n\tIDENTITY_CONFIG.client_id = window.__env__.REACT_APP_IDSRV_CLIENT_ID;\n\tIDENTITY_CONFIG.redirect_uri = window.__env__.REACT_APP_IDSRV_REDIRECT_URL;\n\tIDENTITY_CONFIG.login = window.__env__.REACT_APP_IDSRV_URL + '/login';\n\tIDENTITY_CONFIG.silent_redirect_uri = window.__env__.REACT_APP_SILENT_REDIRECT_URL;\n\tIDENTITY_CONFIG.post_logout_redirect_uri = window.__env__.REACT_APP_LOGOUT_URL;\n\tIDENTITY_CONFIG.public_uri = window.__env__.REACT_APP_PUBLIC_URL;\n\tIDENTITY_CONFIG.client_secret = window.__env__.REACT_APP_IDSRV_CLIENT_SECRET;\n}\n\nexport const METADATA_OIDC = {};\nif (process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test') {\n\tMETADATA_OIDC.issuer = process.env.REACT_APP_IDSRV_URL;\n\tMETADATA_OIDC.jwks_uri = process.env.REACT_APP_IDSRV_URL + '/.well-known/jwks';\n\tMETADATA_OIDC.authorization_endpoint = process.env.REACT_APP_IDSRV_URL + '/connect/authorize';\n\tMETADATA_OIDC.token_endpoint = process.env.REACT_APP_IDSRV_URL + '/connect/token';\n\tMETADATA_OIDC.userinfo_endpoint = process.env.REACT_APP_IDSRV_URL + '/connect/userinfo';\n\tMETADATA_OIDC.end_session_endpoint = process.env.REACT_APP_IDSRV_URL + '/connect/endsession';\n\tMETADATA_OIDC.check_session_iframe = process.env.REACT_APP_IDSRV_URL + '/connect/checksession';\n\tMETADATA_OIDC.revocation_endpoint = process.env.REACT_APP_IDSRV_URL + '/connect/revocation';\n\tMETADATA_OIDC.introspection_endpoint = process.env.REACT_APP_IDSRV_URL + '/connect/introspect';\n} else {\n\tMETADATA_OIDC.issuer = window.__env__.REACT_APP_IDSRV_URL;\n\tMETADATA_OIDC.jwks_uri = window.__env__.REACT_APP_IDSRV_URL + '/.well-known/jwks';\n\tMETADATA_OIDC.authorization_endpoint = window.__env__.REACT_APP_IDSRV_URL + '/connect/authorize';\n\tMETADATA_OIDC.token_endpoint = window.__env__.REACT_APP_IDSRV_URL + '/connect/token';\n\tMETADATA_OIDC.userinfo_endpoint = window.__env__.REACT_APP_IDSRV_URL + '/connect/userinfo';\n\tMETADATA_OIDC.end_session_endpoint = window.__env__.REACT_APP_IDSRV_URL + '/connect/endsession';\n\tMETADATA_OIDC.check_session_iframe = window.__env__.REACT_APP_IDSRV_URL + '/connect/checksession';\n\tMETADATA_OIDC.revocation_endpoint = window.__env__.REACT_APP_IDSRV_URL + '/connect/revocation';\n\tMETADATA_OIDC.introspection_endpoint = window.__env__.REACT_APP_IDSRV_URL + '/connect/introspect';\n}\n","import axios from 'axios';\nimport { signinSilent } from 'infrastructure/auth';\n\nexport const BanyanClientType = 0;\nexport const BanyanAppType = 3;\nexport const IdentityClientType = 2;\n\nexport const APP_CONFIG = { URL: {} };\nif (process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test') {\n\tAPP_CONFIG.URL.gatewayApiBasePath = process.env.REACT_APP_GATEWAY_API_BASE_URL;\n\tAPP_CONFIG.URL.legacyApiBasePath = process.env.REACT_APP_LEGACY_API_BASE_URL;\n\tAPP_CONFIG.URL.localApiBasePath = process.env.REACT_APP_SERVER_PUBLIC_URL;\n\tAPP_CONFIG.companyId = process.env.REACT_APP_BANYAN_COMP_ID;\n\tAPP_CONFIG.profilePicBaseUrl = process.env.REACT_APP_PROFILE_PIC_BASE_URL;\n\tAPP_CONFIG.buildNumber = process.env.REACT_APP_BUILD_NUMBER;\n\tAPP_CONFIG.releaseName = process.env.REACT_APP_RELEASE_NAME;\n\tAPP_CONFIG.useCallStats = process.env.REACT_APP_USE_CALLSTATS === 'true';\n\tAPP_CONFIG.sendCallStatsOnMonitoring = process.env.REACT_APP_SEND_CALLSTATS_ON_MONITORING === 'true';\n\tAPP_CONFIG.sendCallStatsInterval = process.env.REACT_APP_SEND_CALLSTATS_INTERVAL;\n\tAPP_CONFIG.versionCheckInterval = process.env.REACT_APP_VERSION_CHECK_INTERVAL;\n\tAPP_CONFIG.deviceAppId = process.env.REACT_APP_DEVICE_APP_ID;\n\tAPP_CONFIG.sendCallClientLogs = process.env.REACT_APP_SEND_CALL_CLIENT_LOGS;\n\tAPP_CONFIG.isDevelopment = true;\n} else {\n\tAPP_CONFIG.URL.gatewayApiBasePath = window.__env__.REACT_APP_GATEWAY_API_BASE_URL;\n\tAPP_CONFIG.URL.legacyApiBasePath = window.__env__.REACT_APP_LEGACY_API_BASE_URL;\n\tAPP_CONFIG.URL.localApiBasePath = window.__env__.REACT_APP_PUBLIC_URL;\n\tAPP_CONFIG.companyId = window.__env__.REACT_APP_BANYAN_COMP_ID;\n\tAPP_CONFIG.profilePicBaseUrl = window.__env__.REACT_APP_PROFILE_PIC_BASE_URL;\n\tAPP_CONFIG.buildNumber = window.__env__.REACT_APP_BUILD_NUMBER;\n\tAPP_CONFIG.releaseName = window.__env__.REACT_APP_RELEASE_NAME;\n\tAPP_CONFIG.useCallStats = window.__env__.REACT_APP_USE_CALLSTATS === 'true';\n\tAPP_CONFIG.sendCallStatsOnMonitoring = window.__env__.REACT_APP_SEND_CALLSTATS_ON_MONITORING === 'true';\n\tAPP_CONFIG.sendCallStatsInterval = window.__env__.REACT_APP_SEND_CALLSTATS_INTERVAL;\n\tAPP_CONFIG.versionCheckInterval = window.__env__.REACT_APP_VERSION_CHECK_INTERVAL;\n\tAPP_CONFIG.deviceAppId = window.__env__.REACT_APP_DEVICE_APP_ID;\n\tAPP_CONFIG.aiInstrumentationKey = window.__env__.REACT_APP_APPINSIGHTS_INSTRUMENTATIONKEY;\n\tAPP_CONFIG.sendCallClientLogs = window.__env__.REACT_APP_SEND_CALL_CLIENT_LOGS;\n\tAPP_CONFIG.isDevelopment = false;\n}\n\nconst opts = {\n\tbaseURL: APP_CONFIG.URL.gatewayApiBasePath,\n\ttimeout: 100000,\n\ttransformRequest: [\n\t\tfunction(data, headers) {\n\t\t\tconst accessToken = localStorage.getItem('access_token');\n\t\t\tif (accessToken) {\n\t\t\t\theaders['Authorization'] = `Bearer ${accessToken}`;\n\t\t\t}\n\t\t\treturn JSON.stringify(data);\n\t\t},\n\t],\n\theaders: {\n\t\t'Content-Type': 'application/json',\n\t},\n};\n\nconst legacyOpts = Object.assign({}, opts, { baseURL: APP_CONFIG.URL.legacyApiBasePath });\nconst localOpts = Object.assign({}, opts, { baseURL: APP_CONFIG.URL.localApiBasePath });\n\nconst successHandler = response => {\n\treturn new Promise((resolve, reject) => {\n\t\tresolve(response);\n\t});\n};\n\nconst errorHandler = async error => {\n\tif (error.response && error.response.status !== 401) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\treject(error);\n\t\t});\n\t}\n\n\tsigninSilent();\n\n\treturn new Promise((resolve, reject) => {\n\t\treject(error);\n\t});\n};\n\nexport const passwordRegEx = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[!@#$%^&*\\(\\)_\\+\\-\\={}<>,\\.\\|\"\"'~`:;\\\\?\\/\\[\\] ]){8,}/;\nexport const treeSectorNameMaxCharacters = 127;\nexport const defaultDocumentTitle = 'Banyan Medical Systems';\nexport const gatewayApi = axios.create(opts);\nexport const legacyApi = axios.create(legacyOpts);\nexport const localApi = axios.create(localOpts);\n\ngatewayApi.interceptors.response.use(\n\tresponse => successHandler(response),\n\terror => errorHandler(error)\n);\nlegacyApi.interceptors.response.use(\n\tresponse => successHandler(response),\n\terror => errorHandler(error)\n);\nlocalApi.interceptors.response.use(\n\tresponse => successHandler(response),\n\terror => errorHandler(error)\n);\n","import { gatewayApi, APP_CONFIG } from 'constants/global-variables';\n\nexport function getRoles(companyId, userId) {\n\treturn new Promise((res, rej) => {\n\t\tconst url = `/v1/companies/organizations/${companyId}/members/${userId}/roles`;\n\t\tgatewayApi\n\t\t\t.get(url)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data.roles);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function updateRole(memberId, data) {\n\treturn new Promise((res, rej) => {\n\t\tconst url = `/v1/companies/${APP_CONFIG.companyId}/members/${memberId}/nurse-role`;\n\t\tgatewayApi\n\t\t\t.put(url, data)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n","export const GeneralErrorCodes = {\n\tNotFound: 1000,\n\tServerError: 1001,\n\tValidationError: 1003,\n\tBadRequest: 1004,\n\tUnauthorized: 1005,\n\tForbidden: 1006,\n};\n\nexport const OrganizationErrorCodes = {\n\tUserExists: 3000,\n\tCompanyNotFound: 3001,\n\tMemberNotFound: 3002,\n\tInsufficientPermissions: 3003,\n\tTeamNotFound: 3004,\n\tChannelNotFound: 3005,\n\tActionNotPermitted: 3006,\n\tTeamMemberNotFound: 3007,\n\tInviteNotFound: 3008,\n\tUserNotFound: 3009,\n\tTeamMemberExists: 3010,\n\tInviteCancelled: 3011,\n\tInviteAlreadyAccepted: 3012,\n\tInviteExpired: 3013,\n};\n\nexport const CallTypes = {\n\tAUDIO: 1,\n\tVIDEO: 2,\n\tSCREENSHARE: 3,\n\tSECURITYCAM: 4,\n\tLIVEBROADCAST: 5,\n\tMONITORING: 6,\n};\n\nexport const BanyanCallTypesMessage = {\n\tTALK_TO_PATIENT: 'Talk To Patient',\n\tTALK_TO_NURSE: 'Talk To Nurse',\n\tVIDEO_CALL: 'Video Call',\n\tPATIENT_VIEW: 'Patient View',\n\tMONITORING: 'Monitoring',\n};\n\nexport const VirtualCareProviderRoles = {\n\tVirtualNurse: 1,\n\tVirtualCaseManager: 2,\n\tVirtualSitter: 3,\n\tVirtualIntensivist: 4,\n};\n\nexport const ObjectType = {\n\tUSER: 0,\n\tHELLO_DEVICE: 1,\n\tSIP_USER: 999,\n};\n\nexport const MediaTypes = {\n\tCAMERA: 'camera',\n\tMICROPHONE: 'microphone',\n};\n\nexport const MediaPermissions = {\n\tDENIED: 'denied',\n\tGRANTED: 'granted',\n\tPROMPT: 'prompt',\n};\n\nexport const MediaInputs = {\n\tAUDIO_INPUT: 'audioinput',\n\tVIDEO_INPUT: 'videoinput',\n};\n\nexport const CallStatus = {\n\tUNDEFINED: {\n\t\ttype: 0,\n\t\tmessage: 'Undefined',\n\t},\n\tSUCCESSFUL: {\n\t\ttype: 1,\n\t\tmessage: 'Successful',\n\t},\n\tPARTIALLYSUCCESSFUL: {\n\t\ttype: 2,\n\t\tmessage: 'PartiallySuccessful',\n\t},\n\tFAILED: {\n\t\ttype: 3,\n\t\tmessage: 'Failed',\n\t},\n\tDISRUPTED: {\n\t\ttype: 4,\n\t\tmessage: 'Disrupted',\n\t},\n\tPARTIALLYDISRUPTED: {\n\t\ttype: 5,\n\t\tmessage: 'Partially Disrupted',\n\t},\n\tMISSED: {\n\t\ttype: 6,\n\t\tmessage: 'Missed',\n\t},\n\tABORTED: {\n\t\ttype: 7,\n\t\tmessage: 'Aborted',\n\t},\n\tDROPPED: {\n\t\ttype: 8,\n\t\tmessage: 'Dropped',\n\t},\n};\n\nexport const InviteStatuses = {\n\tSENT: {\n\t\ttype: 1,\n\t\tmessage: 'Sent',\n\t},\n\tACCEPTED: {\n\t\ttype: 2,\n\t\tmessage: 'Accepted',\n\t},\n\tPENDING: {\n\t\ttype: 3,\n\t\tmessage: 'Pending',\n\t},\n\tCANCELLED: {\n\t\ttype: 4,\n\t\tmessage: 'Cancelled',\n\t},\n\tFAILED: {\n\t\ttype: 5,\n\t\tmessage: 'Failed',\n\t},\n};\n\nexport const InviteTypes = {\n\tUSER: {\n\t\ttype: 1,\n\t\tmessage: 'User',\n\t},\n\tGUEST: {\n\t\ttype: 2,\n\t\tmessage: 'Guest',\n\t},\n\tADMIN: {\n\t\ttype: 3,\n\t\tmessage: 'Admin',\n\t},\n\tVIRTUALCAREPROVIDER: {\n\t\ttype: 4,\n\t\tmessage: 'Virtual Care Provider',\n\t},\n\tVIRTUALSITTER: {\n\t\ttype: 5,\n\t\tmessage: 'Virtual Sitter',\n\t},\n\tSUPERUSER: {\n\t\ttype: 6,\n\t\tmessage: 'Super User',\n\t},\n\tADUSER: {\n\t\ttype: 7,\n\t\tmessage: 'AD User',\n\t},\n};\n\nexport const SectorTypes = {\n\tHEALTHSYSTEM: 'health system',\n\tREGION: 'region',\n\tHOSPITAL: 'hospital',\n\tDEPARTMENT: 'department',\n\tFLOOR: 'floor',\n\tROOM: 'room',\n};\n\nexport const PresenceStatusType = {\n\tAVAILABLE: 1,\n\tUNAVAILABLE: 2,\n};\n\nexport const PresenceStatusTypeLabels = {\n\t1: 'Available',\n\t2: 'Unavailable',\n};\n\nexport const CallStatuses = {\n\tACCEPTED: 0,\n\tDECLINED: 0,\n};\n\nexport const UserTypes = {\n\tOWNER: 1,\n\tADMIN: 2,\n\tVIRTUALCAREPROVIDER: 6,\n\tVIRTUALSITTER: 7,\n\tSUPERUSER: 8,\n};\n\nexport const UserRoles = {\n\tADMIN: 'Admin',\n\tNURSE: 'VirtualCareProvider',\n\tVIRTUALSITTER: 'VirtualSitter',\n\tSUPERUSER: 'SuperUser',\n};\n\nexport const ZoomDirection = {\n\tINCREASE: '+',\n\tDECREASE: '-',\n\tRESET: 0,\n};\n\nexport const CameraTiltDirection = {\n\tUP: '1',\n\tDOWN: '2',\n\tRIGHT: '3',\n\tLEFT: '4',\n};\n\nexport const CameraTiltAction = {\n\tSTART: 'start',\n\tSTOP: 'stop',\n};\n\nexport const DeviceStatus = {\n\tONLINE: 'online',\n\tOFFLINE: 'offline',\n};\n\nexport const DeviceListLevel = {\n\tHEALTHSYSTEM: 0,\n\tREGION: 1,\n\tHOSPITAL: 2,\n\tDEPARTMENT: 3,\n\tFLOOR: 4,\n\tROOM: 5,\n\tORGANIZATION: 6,\n};\n\nexport const SerialTVCommands = {\n\tINITIAL_TV_POWER: 0,\n\tPOWER: {\n\t\tPOWER_ON: 1,\n\t\tPOWER_OFF: 2,\n\t},\n\tHDMI: {\n\t\tSWITCH_HDMI1: 3,\n\t\tSWITCH_HDMI2: 4,\n\t\tSWITCH_HDMI3: 5,\n\t},\n};\n\nexport const ParticipantState = {\n\tCONNECTING: {\n\t\ttype: 0,\n\t\tmessage: 'Connecting',\n\t},\n\tCONNECTED: {\n\t\ttype: 1,\n\t\tmessage: 'Connected',\n\t},\n\tBUSY: {\n\t\ttype: 2,\n\t\tmessage: 'Busy',\n\t},\n\tDECLINED: {\n\t\ttype: 3,\n\t\tmessage: 'Declined',\n\t},\n\tOFFLINE: {\n\t\ttype: 4,\n\t\tmessage: 'Offline',\n\t},\n\tLEFT_CALL: {\n\t\ttype: 5,\n\t\tmessage: 'Left the call',\n\t},\n\tNOT_ANSWERING: {\n\t\ttype: 6,\n\t\tmessage: 'Not answering',\n\t},\n\tCANT_CONNECT: {\n\t\ttype: 7,\n\t\tmessage: 'Cant connect',\n\t},\n\tDISRUPTED: {\n\t\ttype: 8,\n\t\tmessage: 'Disrupted',\n\t},\n\tRECONNECTING: {\n\t\ttype: 9,\n\t\tmessage: 'Reconnecting',\n\t},\n\tDISCONNECTED: {\n\t\ttype: 10,\n\t\tmessage: 'Disconnected',\n\t},\n\tREMOVED: {\n\t\ttype: 11,\n\t\tmessage: 'Removed',\n\t},\n\tFAILED_TO_GET_INFO: {\n\t\ttype: 98,\n\t\tmessage: 'Failed to get info',\n\t},\n\tINVITE_DENIED: {\n\t\ttype: 99,\n\t\tmessage: 'Invite denied',\n\t},\n};\n\nexport const ParticipantRemoveReason = {\n\tUNDEFINED: 0,\n\tPARTICIPANT_LEAVE: 1,\n\tDISCONNECTED: 2,\n\tPARTICIPANT_FORCED_LEAVE: 3,\n\tCLEAR_PARTICIPANT_OLD_CONFERENCES: 4,\n\tPARTICIPANT_CLEANUP: 5,\n\tPASSWORD_CHANGED: 6,\n\tIDLE: 7,\n\tCONFERENCE_TERMINATED_BY_ADMINISTRATOR: 8,\n\tDISCONNECTED_PARTICIPANT_CLEANUP: 9,\n\tSOMEONE_ELSE_ANSWERED: 10,\n\tHIGHER_PRIORITY_CALL: 11,\n\tFAILED_TO_GET_INFO: 12,\n};\n\nexport const ConferenceEndReason = {\n\tUNDEFINED: 0,\n\tPARTICIPANT_OFFLINE: 1,\n\tPARTICIPANT_BUSY: 2,\n\tINITIATOR_LEFT: 3,\n\tPARTICIPANT_NOT_ANSWERING: 4,\n\tPARTICIPANT_DECLINED: 5,\n\tPARTICIPANT_LEFT: 6,\n\tOWNER_LEFT: 7,\n\tABORTED: 8,\n\tDROPPED: 9,\n\tPARTICIPANT_PASSWORD_CHANGED: 10,\n\tPARTICIPANT_IDLE: 11,\n\tTERMINATED_BY_ADMINISTRATOR: 12,\n\tPARTICIPANT_INVITE_DENIED: 13,\n\tPARTICIPANT_INVITE_FAILED: 14,\n\tFAILED_TO_GET_INITIATOR_INFO: 991,\n\tREMOVED: 992,\n\tUNAUTHORIZED: 993,\n\tE2EE_FAILED: 994,\n\tANSWERED_ELSEWHERE: 995,\n\tTRANSFERRED_TO_ANOTHER_CLIENT: 996,\n\tHAS_ACTIVE_CONFERENCE: 997,\n\tINITIATOR_BUSY: 998,\n\tCLEANUP: 999,\n};\n\nexport const StartConferenceFailureReason = {\n\tEXPIRED_TOKEN: 'startConferenceFailureReason.expiredToken',\n\tGET_INITIATOR_INFO_FAILED: 'startConferenceFailureReason.getInitiatorInfoFailed',\n};\n\nexport const InviteParticipantFailureReason = {\n\tINVITE_DENIED: 'inviteParticipant.denied',\n\tFAILED_TO_GET_INFO: 'inviteParticipant.failedToGetInfo',\n};\n\nexport const ChangePasswordUseCases = {\n\tpasswordInfo:\n\t\t'Passwords are case-sensitive and must be at least 8 characters. A strong password should contain a mix of capital and lower-case letters, numbers and symbols.',\n\tcurrentPassEmpty: 'Please enter your current password, cannot be left blank.',\n\tnewPassEmpty: 'Please enter a new password, it cannot be left blank.',\n\tconfirmNewPassEmpty: 'Please re-enter password, it cannot be left blank.',\n\tminLengthRequired: 'New password must contain minimum 8 characters.',\n\tnewPasswordsDoNotMatch: 'Passwords do not match, please re-enter.',\n\tnewPassSameAsCurrent: 'New password is same as the current password.',\n\tnewPassSaved: 'Your password has been changed.',\n\tnewPassSet: 'Your password has been set.',\n\tcurrentPasswordIncorrect: 'Your current password was incorrectly typed.',\n\tstrongPasswordCheck: 'Password should have at least one uppercase letter, one lowercase letter, one number and one special character:',\n};\n\nexport const DeviceStatusMessages = {\n\tdeviceOnCall: 'Device on another call.',\n\tdeviceOnCallWithNurse: 'This device is being monitored by',\n\tdeviceOffline: 'Device offline',\n\tinitiatingMonitoring: 'Initiating...',\n\tnotAnswering: \"Can't connect to this device. Please try again.\",\n\tleftCall: 'Failed to reconnect.',\n\tdisconnected: 'Patient is disconnected from the call.',\n\treconnecting: 'Please wait…attempting to reconnect to the network.',\n\tremoved: 'This session was ended by a Banyan admin.',\n\tparticipantInviteDenied: \"You don't have sufficient permissions to call this participant. Please contact your administrator.\",\n\tparticipantInviteFailed: 'Failed to get participant information. Please try again.',\n\tfailedToGetInitiatorInformation: 'Failed to get your information. Please try again.',\n};\n\nexport const FeedColors = {\n\tred: '#e84118',\n\tblue: '#00a8ff',\n\torange: '#ff9f43',\n\tyellow: '#fbc531',\n\tpink: '#f368e0',\n\tblack: '#000',\n\tcyan: '#6BDCFF',\n\tpurple: '#852FC8',\n\tdarkBlue: '#5e75aa',\n\tgray: '#d3d3d3',\n\tlightBlue: '#add8e6',\n};\n\nexport const StreamError = {\n\tSCREEN_SHARE_CANCELED: {\n\t\ttype: 0,\n\t\tmessage: 'Screen share canceled',\n\t},\n\tCANT_ACCESS_MEDIA_STREAM: {\n\t\ttype: 1,\n\t\tmessage: `Can't access media stream`,\n\t},\n\tBROWSER_NOT_SUPPORTED: {\n\t\ttype: 2,\n\t\tmessage: 'Browser not supported',\n\t},\n\tEXTENSION_NOT_INSTALLED: {\n\t\ttype: 3,\n\t\tmessage: 'Extension not installed',\n\t},\n\tDEVICE_NOT_FOUND: {\n\t\ttype: 4,\n\t\tmessage: 'Device not found',\n\t},\n\tSTREAM_NOT_ALLOWED: {\n\t\ttype: 5,\n\t\tmessage: 'Stream not allowed',\n\t},\n\tPERMISSION_DISMISSED: {\n\t\ttype: 6,\n\t\tmessage: 'Permission dismissed',\n\t},\n\tNOT_READABLE_ERROR: {\n\t\ttype: 7,\n\t\tmessage: 'Not readable error',\n\t},\n\tONLY_SCREEN_FOUND: {\n\t\ttype: 8,\n\t\tmessage: 'Only screen found',\n\t},\n\tSCREEN_SHARE_NOT_SUPPORTED: {\n\t\ttype: 9,\n\t\tmessage: 'Screen share not supported',\n\t},\n\tCAMERA_BLOCKED: {\n\t\ttype: 10,\n\t\tmessage: 'Camera permission is blocked',\n\t},\n\tMICROPHONE_BLOCKED: {\n\t\ttype: 11,\n\t\tmessage: 'Microphone permission is blocked',\n\t},\n\tCAM_AND_MIC_BLOCKED: {\n\t\ttype: 12,\n\t\tmessage: 'Camera and microphone permission is blocked',\n\t},\n\tMICROPHONE_NOT_FOUND: {\n\t\ttype: 13,\n\t\tmessage: 'Microphone not found',\n\t},\n\tCAMERA_NOT_FOUND: {\n\t\ttype: 14,\n\t\tmessage: 'Camera not found',\n\t},\n};\n\nexport const SocketState = {\n\tCONNECTED: {\n\t\ttype: 0,\n\t\tmessage: 'Connected',\n\t},\n\tRECONNECTING: {\n\t\ttype: 1,\n\t\tmessage: 'Reconnecting...',\n\t},\n\tDISCONNECTED: {\n\t\ttype: 2,\n\t\tmessage: 'Connection is lost',\n\t},\n};\n\nexport const DeviceCommands = {\n\tREBOOT: 0,\n\tSHUTDOWN: 1,\n\tENABLE_METRICS: 2,\n\tFACTORY_RESET: 3,\n\tFORCE_UPDATE: 4,\n\tPULL_LOGS: 5,\n\tREBOOT_HUDDLE_CAM: 6,\n\tSWITCH_AUDIO_OUTPUT: 7,\n\tREQUEST_ALLOWLIST_CHECK: 10,\n};\n\nexport const ConferenceErrorType = {\n\tSIGNALING_ERROR: 0, // failures or errors during the signaling procedure\n\tMEDIA_SOURCE_ERROR: 1, // failure to get access to media device (mic, camera, screen-capture)\n\tSDP_GENERATION_ERROR: 2, // SDP generation error occur either when generating an offer or answer with incorrect configuration parameters\n\tNEGOTIATION_FAILURE: 3, // negotiation errors during SDP offer/answer, they mainly occur due ti differing media and network configuration between endpoints\n\tICE_CONNECTION_FAILURE: 4, // ICE failures occur when NAT/firewall traversal fails\n\tTRANSPORT_FAILURE: 5, // call drops after the connection establishment\n};\n\nexport const CameraType = {\n\tHELLO: 'Hello',\n\tHUDDLE: 'Banyan',\n};\n\nexport const CameraZoomLevels = {\n\tHELLO_MAX: 100,\n\tHUDDLE_MAX: 400,\n};\n\nexport const CameraEventTypes = {\n\tZOOM: 'zoom',\n\tSWITCH: 'switch',\n\tTILT: 'tilt',\n\tHUDDLE_CONNECTED_STATE: 'huddleCamConnectionState',\n\tNIGHT_VISION: 'nightVision',\n\tHELLO_CAMERA_PRIVACY_STATE: 'helloCameraPrivacyState',\n\tHELLO_MIC_PRIVACY_STATE: 'helloMicPrivacyState',\n};\n\nexport const RTCPeerConnectionEnum = {\n\tCONNECTION_STATE: {\n\t\tNEW: 'new',\n\t\tCONNECTING: 'connecting',\n\t\tCONNECTED: 'connected',\n\t\tDISCONNECTED: 'disconnected',\n\t\tFAILED: 'failed',\n\t\tCLOSED: 'closed',\n\t},\n\tSIGNALING_STATE: {\n\t\tSTABLE: 'stable',\n\t\tHAVE_LOCAL_OFFER: 'have-local-offer',\n\t\tHAVE_REMOTE_OFFER: 'have-remote-offer',\n\t\tHAVE_LOCAL_PRANSWER: 'have-local-pranswer',\n\t\tHAVE_REMOTE_PRANSWER: 'have-remote-pranswer',\n\t\tCLOSED: 'closed',\n\t},\n\tICE_CONNECTION_STATE: {\n\t\tNEW: 'new',\n\t\tCHECKING: 'checking',\n\t\tCONNECTED: 'connected',\n\t\tCOMPLETED: 'completed',\n\t\tFAILED: 'failed',\n\t\tDISCONNECTED: 'disconnected',\n\t\tCLOSED: 'closed',\n\t},\n\tICE_GATHERING_STATE: {\n\t\tNEW: 'new',\n\t\tGATHERING: 'gathering',\n\t\tCOMPLETE: 'complete',\n\t},\n};\n\nexport const JoinConferenceFailureReasonEnum = {\n\tUNHANDLED_EXCEPTION: 'joinConferenceFailureReason.unhandledException',\n\tNULL_CONFERENCE: 'joinConferenceFailureReason.nullConference',\n\tWRONG_PARTICIPANT_STATE: 'joinConferenceFailureReason.wrongParticipantState',\n\tFAILED_TO_GET_PARTICIPANT_INFO: 'joinConferenceFailureReason.failedToGetParticipantInfo',\n};\n\nexport const ToggleFailureReasonEnum = {\n\tDEVICE_LOCKED: 'toggleFailureReason.deviceLocked',\n};\n\nexport const TeamTypes = {\n\tHEALTHSYSTEM: 4,\n\tREGION: 5,\n\tHOSPITAL: 6,\n\tDEPARTMENT: 7,\n\tFLOOR: 8,\n};\n\nexport const TerminateRequestFailureReasonEnum = {\n\tUNHANDLED_EXCEPTION: 'terminateRequestFailureReason.unhandledException',\n\tNULL_CONFERENCE: 'terminateRequestFailureReason.nullConference',\n\tTERMINATE_IN_PROGRESS: 'terminateRequestFailureReason.terminateInProgress',\n\tNULL_TERMINATE_REQUEST: 'terminateRequestFailureReason.nullTerminateRequest',\n\tNULL_CONNECTED_USER_PARTICIPANT: 'terminateRequestFailureReason.nullConnectedUserParticipant',\n\tNO_PERMISSION: 'terminateRequestFailureReason.noPermission',\n};\n\nexport const TerminateRequestFailureReasonMessages = {\n\t[TerminateRequestFailureReasonEnum.UNHANDLED_EXCEPTION]: 'Something went wrong. Please retry again.',\n\t[TerminateRequestFailureReasonEnum.NULL_CONFERENCE]: 'This session has already been ended.',\n\t[TerminateRequestFailureReasonEnum.TERMINATE_IN_PROGRESS]: 'Termination for this session is initiated by another administrator.',\n\t[TerminateRequestFailureReasonEnum.NULL_CONNECTED_USER_PARTICIPANT]: 'Something went wrong. Please retry again.',\n\t[TerminateRequestFailureReasonEnum.NO_PERMISSION]: 'You have no permission to terminate this session.',\n};\n\nexport const ClientTypes = {\n\tBANYAN: 2,\n};\n\nexport const Roles = {\n\tADMIN: { id: 2, value: 'Admin' },\n\tVIRTUALCAREPROVIDER: { id: 6, value: 'Virtual Care Provider' },\n\tVIRTUALSITTER: { id: 7, value: 'Virtual Sitter' },\n\tSUPERUSER: { id: 8, value: 'Super user' },\n};\n\nexport const AudioOutputDevice = {\n\tHELLO: 0,\n\tTV: 1,\n};\n\nexport const NursePoolRolePriorities = {\n\tPRIMARY: {\n\t\ttype: 1,\n\t\tmessage: 'Primary',\n\t},\n\tSECONDARY: {\n\t\ttype: 2,\n\t\tmessage: 'Secondary',\n\t},\n};\n\nexport const ConfigHistoryTypes = {\n\tUserIdle: '1',\n\tDevices: '2',\n\tADs: '3',\n\tTeamConfigurationProfiles: '4',\n\tNtpConfiguration: '5',\n};\n\nexport const TVs = {\n\tLG: 'LG (MPI)',\n\tSAMSUNG: 'Samsung (Exlink)',\n\tTELEHEALTH_CONTROLLED: 'Telehealth-Controlled',\n\tPCARE: 'pCare',\n\tCEC: 'CEC',\n};\n\nexport const TelehealthTv = {\n\tid: 3,\n\tlabel: 'Telehealth',\n\tvalue: TVs.TELEHEALTH_CONTROLLED,\n};\n\nexport const StreamTypes = {\n\tAUDIO: 1,\n\tVIDEO: 2,\n\tSCREEN_SHARE: 3,\n};\n\nexport const AndroidVersions = [\n\t{ codeName: 'No codename', versionNum: '1.0', apiLevel: [1] },\n\t{ codeName: 'No codename', versionNum: '1.1', apiLevel: [2] },\n\t{ codeName: 'Cupcake', versionNum: '1.5', apiLevel: [3] },\n\t{ codeName: 'Donut', versionNum: '1.6', apiLevel: [4] },\n\t{ codeName: 'Eclair', versionNum: '2.0 - 2.1', apiLevel: [5, 6, 7] },\n\t{ codeName: 'Froyo', versionNum: '2.2 - 2.2.3', apiLevel: [8] },\n\t{ codeName: 'Gingerbread', versionNum: '2.3 - 2.3.7', apiLevel: [9, 10] },\n\t{ codeName: 'Honeycomb', versionNum: '3.0 - 3.2.6', apiLevel: [11, 12, 13] },\n\t{ codeName: 'Ice Cream Sandwich', versionNum: '4.0 - 4.0.4', apiLevel: [14, 15] },\n\t{ codeName: 'Jelly Bean', versionNum: '4.1 - 4.3.1', apiLevel: [16, 17, 18] },\n\t{ codeName: 'KitKat', versionNum: '4.4 - 4.4.4', apiLevel: [19, 20] },\n\t{ codeName: 'Lollipop', versionNum: '5.0 - 5.1.1', apiLevel: [21, 22] },\n\t{ codeName: 'Marshmallow', versionNum: '6.0 - 6.0.1', apiLevel: [23] },\n\t{ codeName: 'Nougat', versionNum: '\t7.0', apiLevel: [24] },\n\t{ codeName: 'Nougat', versionNum: '7.1.0 - 7.1.2', apiLevel: [25] },\n\t{ codeName: 'Oreo', versionNum: '8.0', apiLevel: [26] },\n\t{ codeName: 'Oreo', versionNum: '8.1', apiLevel: [27] },\n\t{ codeName: 'Pie', versionNum: '9.0', apiLevel: [28] },\n\t{ codeName: 'Android 10', versionNum: '10.0', apiLevel: [29] },\n\t{ codeName: 'Android 11', versionNum: '11', apiLevel: [30] },\n];\n\nexport const NursePoolingOptions = {\n\tNO_ANSWER: 0,\n\tYES: 1,\n\tNO: 2,\n};\n\nexport const DeviceSettings = {\n\tVoiceCommandCalling: 14, // Currently we only care about this\n};\n\nexport const TeamConfigurationIntegrationType = {\n\tTELEHEALTH: 1,\n\tPCARE: 2,\n};\n\nexport const KeyCodes = {\n\tPERIOD: 190,\n\tNUMPAD_PERIOD: 110,\n\tMINUS: 189,\n\tNUMPAD_SUBTRACT: 109,\n\tNUMPAD_ADD: 107,\n\tPLUS: 187,\n\tLETTER_E: 69,\n\tNUMPAD_MINUS: 109,\n\tLETTER_A: 65,\n\tLETTER_Z: 90,\n\tENTER: 13,\n\tSPACE: 32,\n\tBACK_SPACE: 8,\n\tLEFT_ARROW: 37,\n\tUP_ARROW: 38,\n\tRIGHT_ARROW: 39,\n\tDOWN_ARROW: 40,\n};\n\nexport const TvBrands = {\n\tUNKNOWN: -1,\n\tSAMSUNG: 0,\n\tLG: 1,\n\tCEC_TV: 2,\n};\n\nexport const TvControlsEnums = {\n\tPOWER: 'Power',\n\tVOLUME: 'Volume',\n};\n","import { gatewayApi, APP_CONFIG, legacyApi, IdentityClientType, localApi } from 'constants/global-variables';\nimport { SectorTypes, ClientTypes } from 'constants/enums';\nimport { func } from 'prop-types';\n\nexport function getHealthSystems() {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/organizations/${APP_CONFIG.companyId}/health-systems`)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data.healthSystems);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getOrgTeamChildren(teamId) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/organizations/${APP_CONFIG.companyId}/teams/${teamId}/children`)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data.children);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getHealthSystemRegions(healthSystemId) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/organizations/${APP_CONFIG.companyId}/health-systems/${healthSystemId}`)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data.healthSystem.regions);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getHealthSystemSubTree(healthSystemId) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/organizations/${APP_CONFIG.companyId}/health-systems/${healthSystemId}/full`)\n\t\t\t.then(response => {\n\t\t\t\tconst regions = response.data.regions;\n\t\t\t\tlet treeData = [];\n\t\t\t\tregions.forEach((region, regionIndex) => {\n\t\t\t\t\ttreeData.push({\n\t\t\t\t\t\tname: region.name,\n\t\t\t\t\t\ticon: 'local_hospital',\n\t\t\t\t\t\ttype: SectorTypes.REGION,\n\t\t\t\t\t\tsubOptions: [],\n\t\t\t\t\t\tid: region.id,\n\t\t\t\t\t});\n\n\t\t\t\t\tregion.hospitals.forEach((hospital, hospitalIndex) => {\n\t\t\t\t\t\ttreeData[regionIndex].subOptions.push({\n\t\t\t\t\t\t\tname: hospital.name,\n\t\t\t\t\t\t\ticon: 'business',\n\t\t\t\t\t\t\ttype: SectorTypes.HOSPITAL,\n\t\t\t\t\t\t\tsubOptions: [],\n\t\t\t\t\t\t\tid: hospital.id,\n\t\t\t\t\t\t\tregionId: region.id,\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\thospital.departments.forEach((department, departmentIndex) => {\n\t\t\t\t\t\t\ttreeData[regionIndex].subOptions[hospitalIndex].subOptions.push({\n\t\t\t\t\t\t\t\tname: department.name,\n\t\t\t\t\t\t\t\ticon: 'account_balance',\n\t\t\t\t\t\t\t\ttype: SectorTypes.DEPARTMENT,\n\t\t\t\t\t\t\t\tsubOptions: [],\n\t\t\t\t\t\t\t\tid: department.id,\n\t\t\t\t\t\t\t\thospitalId: hospital.id,\n\t\t\t\t\t\t\t\tregionId: region.id,\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tdepartment.floors.forEach((floor, floorIndex) => {\n\t\t\t\t\t\t\t\ttreeData[regionIndex].subOptions[hospitalIndex].subOptions[departmentIndex].subOptions.push({\n\t\t\t\t\t\t\t\t\tname: floor.name,\n\t\t\t\t\t\t\t\t\ticon: 'money',\n\t\t\t\t\t\t\t\t\ttype: SectorTypes.FLOOR,\n\t\t\t\t\t\t\t\t\tsubOptions: [],\n\t\t\t\t\t\t\t\t\tid: floor.id,\n\t\t\t\t\t\t\t\t\tdepartmentId: department.id,\n\t\t\t\t\t\t\t\t\thospitalId: hospital.id,\n\t\t\t\t\t\t\t\t\tregionId: region.id,\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\tfloor.rooms.forEach((room, roomIndex) => {\n\t\t\t\t\t\t\t\t\ttreeData[regionIndex].subOptions[hospitalIndex].subOptions[departmentIndex].subOptions[floorIndex].subOptions.push({\n\t\t\t\t\t\t\t\t\t\tname: room.name,\n\t\t\t\t\t\t\t\t\t\ticon: 'meeting_room',\n\t\t\t\t\t\t\t\t\t\ttype: SectorTypes.ROOM,\n\t\t\t\t\t\t\t\t\t\tsubOptions: [],\n\t\t\t\t\t\t\t\t\t\tfloorId: floor.id,\n\t\t\t\t\t\t\t\t\t\tdepartmentId: department.id,\n\t\t\t\t\t\t\t\t\t\thospitalId: hospital.id,\n\t\t\t\t\t\t\t\t\t\tregionId: region.id,\n\t\t\t\t\t\t\t\t\t\tid: room.id,\n\t\t\t\t\t\t\t\t\t\troomIndex: roomIndex,\n\t\t\t\t\t\t\t\t\t\tstatus: 'online',\n\t\t\t\t\t\t\t\t\t\thelloDeviceId: room.helloDeviceId ? Number(room.helloDeviceId) : null,\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t\tres(treeData);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getMembers(pageSize = 10, pageIndex = 0, searchValue) {\n\tlet params = {\n\t\tpageSize: pageSize,\n\t\tpageIndex: pageIndex,\n\t\tsearchValue: searchValue,\n\t};\n\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/companies/organizations/${APP_CONFIG.companyId}/members`, {\n\t\t\t\tparams: params,\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getHealthSystemMembers(healthSystemId, pageSize = 10, pageIndex = 0, searchValue) {\n\tlet params = {\n\t\tpageSize: pageSize,\n\t\tpageIndex: pageIndex,\n\t\tsearchValue: searchValue,\n\t};\n\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/organizations/${APP_CONFIG.companyId}/healthsystems/${healthSystemId}/members`, {\n\t\t\t\tparams: params,\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getInvitedMembers(pageSize = 10, pageIndex = 0, searchValue) {\n\tlet params = {\n\t\tpageSize: pageSize,\n\t\tpageIndex: pageIndex,\n\t\tsearchValue: searchValue,\n\t};\n\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/companies/${APP_CONFIG.companyId}/organization-invites`, {\n\t\t\t\tparams: params,\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getHealthSystemInvitedUsers(healthSystemId, pageSize = 10, pageIndex = 0, searchValue) {\n\tlet params = {\n\t\tpageSize: pageSize,\n\t\tpageIndex: pageIndex,\n\t\tsearchValue: searchValue,\n\t};\n\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/companies/${APP_CONFIG.companyId}/healthsystems/${healthSystemId}/organization-invites`, {\n\t\t\t\tparams: params,\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\n// sign up, activate and accept invitation\nexport function registerUser(values, inviteId, companyId) {\n\treturn new Promise((res, rej) => {\n\t\tlocalApi\n\t\t\t.post(`v2.0/api/organization/signup`, {\n\t\t\t\tType: 21,\n\t\t\t\tOrganizationInviteData: {\n\t\t\t\t\tCompanyId: companyId,\n\t\t\t\t\tInviteId: inviteId,\n\t\t\t\t\tClientType: IdentityClientType,\n\t\t\t\t},\n\t\t\t\tLogInData: {\n\t\t\t\t\tSignInEmail: values.email,\n\t\t\t\t\tSignInPassword: values.password,\n\t\t\t\t},\n\t\t\t\tSignUpModel: {\n\t\t\t\t\tFirstName: values.firstName,\n\t\t\t\t\tLastName: values.lastName,\n\t\t\t\t\tEmail: values.email,\n\t\t\t\t\tPassword: values.password,\n\t\t\t\t},\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function createInvite(emails, inviteTypeId) {\n\tvar users = [];\n\n\temails.forEach(email => {\n\t\tusers.push({ Email: email, InviteTypeId: inviteTypeId });\n\t});\n\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.post(`/v1/companies/${APP_CONFIG.companyId}/organization-invites`, {\n\t\t\t\tInviteInfo: null,\n\t\t\t\tUsers: users,\n\t\t\t\tClientType: ClientTypes.BANYAN,\n\t\t\t})\n\t\t\t.then(() => res())\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function createNurseInvite(emails, inviteTypeId, healthSystems) {\n\tconst users = [];\n\tconst channels = [];\n\temails.forEach(email => {\n\t\tusers.push({ Email: email, InviteTypeId: inviteTypeId });\n\t});\n\thealthSystems.forEach(hs => {\n\t\tchannels.push({ Id: hs.value, Name: hs.label });\n\t});\n\n\tconst data = {\n\t\tUsers: users,\n\t\tInviteInfo: {\n\t\t\tChannels: channels,\n\t\t},\n\t\tClientType: ClientTypes.BANYAN,\n\t};\n\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.post(`/v1/companies/${APP_CONFIG.companyId}/organization-invites`, data)\n\t\t\t.then(() => res())\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function assignMember(healthSystemId, teamId, companyUserId) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.put(`/v1/organizations/${APP_CONFIG.companyId}/health-systems/${healthSystemId}/levels/${teamId}/assign`, {\n\t\t\t\tCompanyUserId: companyUserId,\n\t\t\t})\n\t\t\t.then(() => res())\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function createAdInvite(emails, inviteTypeId, hospitalId, healthSystem) {\n\tlet users = [];\n\tconst channels = [];\n\n\temails.forEach(email => {\n\t\tusers.push({ Email: email, InviteTypeId: inviteTypeId });\n\t});\n\n\tchannels.push({ Id: healthSystem, Name: '' });\n\n\tconsole.log('channels', channels);\n\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.post(`/v1/companies/${APP_CONFIG.companyId}/ad-organization-invites`, {\n\t\t\t\tInviteInfo: {\n\t\t\t\t\tChannels: channels,\n\t\t\t\t},\n\t\t\t\tUsers: users,\n\t\t\t\tClientType: ClientTypes.BANYAN,\n\t\t\t\thospitalId,\n\t\t\t})\n\t\t\t.then(response => res(response))\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function deleteMember(memberId) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.delete(`/v1/companies/${APP_CONFIG.companyId}/members/${memberId}`)\n\t\t\t.then(() => res())\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getInvite(inviteId, email) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/companies/${APP_CONFIG.companyId}/invites/${inviteId}`, {\n\t\t\t\tparams: {\n\t\t\t\t\temail: email,\n\t\t\t\t},\n\t\t\t})\n\t\t\t.then(response => res(response.data))\n\t\t\t.catch(e => rej(e.response.data));\n\t});\n}\n\nexport function updateInviteStatus(inviteId, statusId) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.put(`/v1/companies/${APP_CONFIG.companyId}/invites/${inviteId}/status`, {\n\t\t\t\tStatusId: statusId,\n\t\t\t})\n\t\t\t.then(response => res(response.data))\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function checkUserAccount(email) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/users/${email}/exists`)\n\t\t\t.then(response => res(response.data.result))\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function checkIfCompanyMemberExists(email) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/companies/${APP_CONFIG.companyId}/members/${email}/exists`)\n\t\t\t.then(response => {\n\t\t\t\tif (response.data.exists) res(response.data.exists);\n\t\t\t\telse rej(response.data.exists);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function acceptInvite(inviteId, email) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.put(`/v1/companies/${APP_CONFIG.companyId}/organization-invites/${inviteId}/accept`, {\n\t\t\t\tEmail: email,\n\t\t\t})\n\t\t\t.then(response => res(response.data))\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function addToHealthSystem(healthSystemId, memberId) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.post(`/v1/organizations/${APP_CONFIG.companyId}/healthsystems/${healthSystemId}/vcp-members`, {\n\t\t\t\tId: memberId,\n\t\t\t})\n\t\t\t.then(() => {\n\t\t\t\tres();\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function deleteHealthSystemMember(healthSystemId, memberId) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.delete(`/v1/organizations/${APP_CONFIG.companyId}/healthsystems/${healthSystemId}/vcp-members/${memberId}`)\n\t\t\t.then(() => {\n\t\t\t\tres();\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getNurseHealthSystems(memberId) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/organizations/${APP_CONFIG.companyId}/vcp-members/${memberId}/healthsystems`)\n\t\t\t.then(response => res(response.data.healthSystems))\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function updateNurse(values, userId, guidUserId, roleId) {\n\treturn new Promise((res, rej) => {\n\t\tlegacyApi\n\t\t\t.put(`v2.1/api/profile/nurse/${userId}`, {\n\t\t\t\tFirstName: values.firstName,\n\t\t\t\tLastName: values.lastName,\n\t\t\t\tCompanyName: 'Banyan',\n\t\t\t\tJobTitle: values.jobTitle ? values.jobTitle : '',\n\t\t\t\tWorkExperienceId: roleId,\n\t\t\t\tNurseUserGuid: guidUserId,\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getNurseProfileInfo(userId) {\n\treturn new Promise((res, rej) => {\n\t\tlegacyApi\n\t\t\t.get(`/v2.0/api/profiles/${userId}`)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data.Result);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function sendOrganizationPasswordRecoveryEmail(email) {\n\treturn new Promise((res, rej) => {\n\t\tlocalApi\n\t\t\t.post('v2.0/api/organization-account/recover', {\n\t\t\t\temail,\n\t\t\t\tcompanyId: APP_CONFIG.companyId,\n\t\t\t\trecoveryInviteId: null,\n\t\t\t\tuserId: null,\n\t\t\t})\n\t\t\t.then(r => res(r))\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function sendRecoveryEmail(email, userId, recoveryInviteId) {\n\treturn new Promise((res, rej) => {\n\t\tlegacyApi\n\t\t\t.post('v2.0/api/organization-account/recover', {\n\t\t\t\temail,\n\t\t\t\tcompanyId: APP_CONFIG.companyId,\n\t\t\t\trecoveryInviteId,\n\t\t\t\tuserId,\n\t\t\t})\n\t\t\t.then(r => res(r.data))\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function sendPasswordRecoveredEmail(email, password, code) {\n\treturn new Promise((res, rej) => {\n\t\tlocalApi\n\t\t\t.post('api/account/password-reset', {\n\t\t\t\tEmail: email,\n\t\t\t\tPassword: password,\n\t\t\t\tCode: code,\n\t\t\t\tOrganizationId: APP_CONFIG.companyId,\n\t\t\t})\n\t\t\t.then(() => res())\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function editSuperUserHealthSystem(superCompanyUserId, healthSystemId, pastHealthSystemId) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.put(`/v1/organizations/${APP_CONFIG.companyId}/super-users/${superCompanyUserId}/health-system`, {\n\t\t\t\thealthSystemId,\n\t\t\t\tpastHealthSystemId,\n\t\t\t})\n\t\t\t.then(() => {\n\t\t\t\tres();\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getHealthSystemSubTreeBasic(healthSystemId) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/organizations/${APP_CONFIG.companyId}/health-systems/${healthSystemId}/full`)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport const getNursesList = async (search = '') => {\n\ttry {\n\t\tconst { data } = await gatewayApi.get(`/v1/companies/${APP_CONFIG.companyId}/nurses${search ? `?searchPattern=${search}` : ''}`);\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n","import { IDENTITY_CONFIG, METADATA_OIDC } from 'constants/auth-constants';\nimport { localApi, APP_CONFIG, gatewayApi } from 'constants/global-variables';\n// @ts-ignore\nimport { Log, Logger, UserManager, WebStorageStateStore } from 'oidc-client-ts';\nimport { getRoles } from 'api/roles';\nimport { getHealthSystems } from 'api/users';\nimport { UserRoles, UserTypes } from 'constants/enums';\n\nLog.setLogger(console);\n// @ts-ignore\nLog.setLevel(Log.DEBUG);\n\nconst userManager = new UserManager({\n\t...IDENTITY_CONFIG,\n\tuserStore: new WebStorageStateStore({ store: window.localStorage }),\n\tmetadata: {\n\t\t...METADATA_OIDC,\n\t},\n});\n\nfunction clearLocalStorage() {\n\tlocalStorage.removeItem('access_token');\n\tlocalStorage.removeItem('id_token');\n\tlocalStorage.removeItem('userId');\n\tlocalStorage.removeItem('userProfile');\n\tlocalStorage.removeItem('userRole');\n\tlocalStorage.removeItem('memberExists');\n\tlocalStorage.removeItem('userRoleId');\n\tlocalStorage.removeItem('currentHealthSystemInfo');\n\tlocalStorage.removeItem('isRedirectCalled');\n\tlocalStorage.removeItem('nursePoolingStatus');\n}\n\nfunction setUser(data, userInfo, userRole, memberExistsInCompany, userRoleId) {\n\tlocalStorage.setItem('userId', data.sub);\n\tlocalStorage.setItem('userProfile', JSON.stringify(userInfo));\n\tlocalStorage.setItem('userRole', userRole);\n\tlocalStorage.setItem('userRoleId', userRoleId);\n\tlocalStorage.setItem('memberExists', memberExistsInCompany);\n}\n\nexport function setTokens(authResult) {\n\tlocalStorage.setItem('access_token', authResult.accessToken);\n\tlocalStorage.setItem('id_token', authResult.idToken);\n}\n\nasync function setCurrentHealthSystem() {\n\tlet allHealthSystems = await getHealthSystems();\n\tif (allHealthSystems.length !== 0) {\n\t\tlet currentHealthSystemInfo = {\n\t\t\tcurrentHealthSystemId: allHealthSystems[0].id,\n\t\t\tcurrentRegionId: allHealthSystems[0].regions[0].id,\n\t\t};\n\t\tlocalStorage.setItem('currentHealthSystemInfo', JSON.stringify(currentHealthSystemInfo));\n\t}\n}\n\nfunction navigateToApp() {\n\tconst redirectUri = localStorage.getItem('redirectUri') ? localStorage.getItem('redirectUri') : '/';\n\twindow.location.replace(redirectUri);\n}\n\nasync function fetchUserProfile() {\n\ttry {\n\t\tconst response = await localApi.get('/api/profile');\n\t\treturn { data: response.data, err: false };\n\t} catch (ex) {\n\t\treturn { err: true };\n\t}\n}\n\nfunction swapToken(token) {\n\treturn new Promise((res, rej) => {\n\t\tlocalApi\n\t\t\t.post('/api/swap-token', { token: token })\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => {\n\t\t\t\tLogger.info(e);\n\t\t\t\trej(e);\n\t\t\t});\n\t});\n}\n\nfunction checkMember(email) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/companies/${APP_CONFIG.companyId}/members/${email}/exists`)\n\t\t\t.then(response => res(response.data.exists))\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport async function signinRedirectCallback() {\n\ttry {\n\t\tawait userManager.signinRedirectCallback();\n\t\tconsole.log('Successfully signed in');\n\t} catch (ex) {\n\t\tconsole.error('Signin redirect call failed, ', ex);\n\t\tif (ex.message.includes('iat is in the future') || ex.message.includes('exp is in the past')) {\n\t\t\twindow.location.href = '/time-error';\n\t\t\treturn;\n\t\t}\n\t\tnavigateToApp();\n\t}\n}\n\nexport function logout() {\n\tuserManager.signoutRedirect({\n\t\tid_token_hint: localStorage.getItem('id_token'),\n\t});\n\tuserManager.clearStaleState();\n}\n\nexport function signoutRedirectCallback() {\n\tuserManager.signoutRedirectCallback().then(() => {\n\t\tclearLocalStorage();\n\t\twindow.location.replace(IDENTITY_CONFIG.public_uri);\n\t});\n\n\tuserManager.clearStaleState();\n}\n\nfunction parseJwt(token) {\n\tconst base64Url = token.split('.')[1];\n\tconst base64 = base64Url.replace('-', '+').replace('_', '/');\n\treturn JSON.parse(window.atob(base64));\n}\n\nexport function isAuthenticated() {\n\tconst accessToken = localStorage.getItem('access_token');\n\treturn !!accessToken;\n}\n\nexport function memberExists() {\n\tconst val = localStorage.getItem('memberExists');\n\treturn val === 'true';\n}\n\nexport function signinRedirect(isJWTRoute = false) {\n\tconst localAzJwt = localStorage.getItem('azure_jwt');\n\n\tif (isJWTRoute || (!isJWTRoute && localAzJwt)) {\n\t\t// We don't the redirectUri to get overridden\n\t\tif (!(!window.location.hash && localAzJwt)) {\n\t\t\t// In case we are dealing with AZURE JWT, thats the case we need the reidrectUri to get set.\n\t\t\tlocalStorage.setItem('redirectUri', window.location.pathname);\n\t\t}\n\t} else {\n\t\t// For every other case, just override the redirectUri\n\t\tlocalStorage.setItem('redirectUri', window.location.pathname);\n\t}\n\n\tif (window.location.hash || localAzJwt) {\n\t\tconst hash = window.location.hash.substring(1);\n\t\tlet jwt;\n\t\tif (hash) {\n\t\t\t[, jwt] = hash.split('=');\n\t\t} else {\n\t\t\tjwt = localAzJwt;\n\t\t}\n\t\tswapToken(jwt).then(response => {\n\t\t\tconst args = {};\n\t\t\tconst claims = parseJwt(jwt);\n\t\t\tif (claims.preferred_username) {\n\t\t\t\targs.login_hint = claims.preferred_username;\n\t\t\t}\n\t\t\tif (response) {\n\t\t\t\targs.acr_values = `sol_ref:${response}`;\n\t\t\t}\n\t\t\tlocalStorage.removeItem('azure_jwt'); // Remove JWT so we can logout without getting redirected\n\t\t\tuserManager.signinRedirect(args);\n\t\t});\n\t} else {\n\t\tuserManager.signinRedirect({});\n\t}\n}\n\n// NOTE: This function works with Sol.Identity authentication as well.\nexport function isAzureAuthentication() {\n\tif (isAuthenticated()) {\n\t\tconst localAzJwt = localStorage.getItem('azure_jwt');\n\t\tif (window.location.hash || localAzJwt) {\n\t\t\tlet jwt;\n\t\t\tconst hash = window.location.hash.substring(1);\n\t\t\tif (hash) {\n\t\t\t\t[, jwt] = hash.split('=');\n\t\t\t} else {\n\t\t\t\tjwt = localAzJwt;\n\t\t\t}\n\t\t\tconst userToken = parseJwt(jwt);\n\t\t\tconst userInfo = JSON.parse(localStorage.getItem('userProfile'));\n\t\t\tconst shouldLogout = userInfo.email !== userToken.preferred_username; // Different user\n\t\t\tif (shouldLogout) {\n\t\t\t\tlocalStorage.setItem('azure_jwt', jwt);\n\t\t\t\tlogout();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\twindow.location.hash = '';\n\t\tif (window.location.href.endsWith('#')) {\n\t\t\twindow.location.href = window.location.href.slice(0, -1);\n\t\t}\n\t\treturn true; // Same user\n\t}\n\treturn false;\n}\n\nexport function signinSilentCallback() {\n\tuserManager.signinSilentCallback();\n}\nexport function createSigninRequest() {\n\treturn userManager.createSigninRequest();\n}\n\nexport async function getUser() {\n\tconst user = await userManager.getUser();\n\tif (!user) {\n\t\treturn userManager.signinRedirectCallback();\n\t}\n\treturn user;\n}\n\nexport function getAccessToken() {\n\tif (!localStorage.getItem('access_token')) {\n\t\tthrow new Error('Attempted to access unloaded access token');\n\t}\n\n\treturn localStorage.getItem('access_token');\n}\n\nexport function getUserId() {\n\tif (!localStorage.getItem('userId')) {\n\t\tthrow new Error('Attempted to access unloaded userId');\n\t}\n\n\tlet userId = localStorage.getItem('userId');\n\treturn userId;\n}\n\nexport function hasUserProfile() {\n\treturn !!localStorage.getItem('userProfile');\n}\n\nexport function getUserProfile() {\n\tif (!localStorage.getItem('userProfile')) {\n\t\tthrow new Error('Attempted to access unloaded userInfo');\n\t}\n\n\tlet userInfo = localStorage.getItem('userProfile');\n\treturn JSON.parse(userInfo);\n}\n\nexport function setUserProfile(newProfile) {\n\tlocalStorage.setItem('userProfile', JSON.stringify(newProfile));\n}\n\nexport function getUserRole() {\n\tif (!localStorage.getItem('userRole')) {\n\t\tthrow new Error('Attempted to access non-existing userRole');\n\t}\n\n\tconst userRole = localStorage.getItem('userRole');\n\tswitch (userRole) {\n\t\tcase UserRoles.ADMIN:\n\t\t\treturn UserRoles.ADMIN;\n\t\tcase UserRoles.NURSE:\n\t\t\treturn UserRoles.NURSE;\n\t\tcase UserRoles.VIRTUALSITTER:\n\t\t\treturn UserRoles.VIRTUALSITTER;\n\t\tcase UserRoles.SUPERUSER:\n\t\t\treturn UserRoles.SUPERUSER;\n\t\tdefault:\n\t\t\tthrow new Error('Invalid user role');\n\t}\n}\n\nexport function getUserRoleId() {\n\treturn localStorage.getItem('userRoleId');\n}\n\nexport async function setUserInfo() {\n\tlet accessToken = localStorage.getItem('access_token');\n\tconst data = parseJwt(accessToken);\n\n\tconst { data: userProfile, err } = await fetchUserProfile();\n\n\tif (err) {\n\t\tlocalStorage.setItem('memberExists', 'false');\n\t} else {\n\t\tlet exists = await checkMember(userProfile.email);\n\t\tlet userRole = UserRoles.NURSE;\n\t\tlet userRoleId = UserTypes.VIRTUALCAREPROVIDER;\n\n\t\tif (exists) {\n\t\t\tlet userRoles = await getRoles(APP_CONFIG.companyId, data.sub);\n\t\t\tuserRoles.forEach(role => {\n\t\t\t\tif (role.name === UserRoles.ADMIN) {\n\t\t\t\t\tuserRole = UserRoles.ADMIN;\n\t\t\t\t\tuserRoleId = UserTypes.ADMIN;\n\t\t\t\t} else if (role.name === UserRoles.VIRTUALSITTER) {\n\t\t\t\t\tuserRole = UserRoles.VIRTUALSITTER;\n\t\t\t\t\tuserRoleId = UserTypes.VIRTUALSITTER;\n\t\t\t\t} else if (role.name === UserRoles.SUPERUSER) {\n\t\t\t\t\tuserRole = UserRoles.SUPERUSER;\n\t\t\t\t\tuserRoleId = UserTypes.SUPERUSER;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tsetUser(data, userProfile, userRole, exists, userRoleId);\n\t\tif (exists && !localStorage.getItem('currentHealthSystemInfo')) {\n\t\t\tawait setCurrentHealthSystem();\n\t\t}\n\t}\n}\n\nexport function signinSilent() {\n\tuserManager\n\t\t.signinSilent({ scope: IDENTITY_CONFIG.scope, response_type: IDENTITY_CONFIG.response_type })\n\t\t.then(user => {\n\t\t\tLogger.info('signed in', user);\n\t\t})\n\t\t.catch(err => {\n\t\t\tLogger.error('signinSilent error thrown.', err);\n\t\t\tif (err.message === 'login_required') {\n\t\t\t\tLogger.info('Session on identity has expired. Login is required');\n\t\t\t\tLogger.info('Invoking signoutRedirectCallback()...');\n\t\t\t\tsignoutRedirectCallback();\n\t\t\t} else if (err.message === 'IFrame timed out without a response') {\n\t\t\t\tLogger.info('Frame window timed out');\n\t\t\t\tLogger.info('Invoking signoutRedirectCallback()...');\n\t\t\t\tsignoutRedirectCallback();\n\t\t\t} else if (err.message.includes('iat is in the future') || err.message.includes('exp is in the past')) {\n\t\t\t\tconst isRedirectCalled = localStorage.getItem('isRedirectCalled');\n\t\t\t\t// Temporary Fix. We need to check why this component is being rendered twice.\n\t\t\t\tif (!isRedirectCalled) {\n\t\t\t\t\tlocalStorage.setItem('isRedirectCalled', 'true');\n\t\t\t\t\twindow.location.href = '/time-error';\n\t\t\t\t} else {\n\t\t\t\t\tlocalStorage.removeItem('isRedirectCalled');\n\t\t\t\t}\n\t\t\t}\n\t\t});\n}\n\nuserManager.events.addUserLoaded(user => {\n\tlocalStorage.setItem('access_token', user.access_token);\n\tlocalStorage.setItem('id_token', user.id_token);\n\n\tsetUserInfo().then(() => {\n\t\tif (window.location.href.indexOf('signin-oidc') !== -1) {\n\t\t\tnavigateToApp();\n\t\t}\n\t});\n});\n\nuserManager.events.addSilentRenewError(e => {\n\tLogger.info('silent renew error', e.message);\n});\n\nuserManager.events.addAccessTokenExpired(() => {\n\tLogger.info('token expired');\n\tsigninSilent();\n});\n\nuserManager.events.addAccessTokenExpiring(() => {\n\tLogger.info('token expiring');\n\tsigninSilent();\n});\n","import React, { Component } from 'react';\nimport {\n\tsigninRedirectCallback,\n\tlogout,\n\tsignoutRedirectCallback,\n\tisAuthenticated,\n\tsigninRedirect,\n\tsigninSilentCallback,\n\tcreateSigninRequest,\n\tisAzureAuthentication,\n} from 'infrastructure/auth';\n\nconst AuthContext = React.createContext({\n\tsigninRedirectCallback: () => ({}),\n\tlogout: () => ({}),\n\tsignoutRedirectCallback: () => ({}),\n\tisAuthenticated: () => ({}),\n\tsigninRedirect: isAzureJWT => ({}),\n\tsigninSilentCallback: () => ({}),\n\tcreateSigninRequest: () => ({}),\n\tisAzureAuthentication: () => ({}),\n});\n\nexport const AuthConsumer = AuthContext.Consumer;\n\nexport class AuthProvider extends Component {\n\tauthService;\n\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.authService = {\n\t\t\tsigninRedirectCallback: signinRedirectCallback,\n\t\t\tlogout: logout,\n\t\t\tsignoutRedirectCallback: signoutRedirectCallback,\n\t\t\tisAuthenticated: isAuthenticated,\n\t\t\tsigninRedirect: signinRedirect,\n\t\t\tsigninSilentCallback: signinSilentCallback,\n\t\t\tcreateSigninRequest: createSigninRequest,\n\t\t\tisAzureAuthentication: isAzureAuthentication,\n\t\t};\n\t}\n\n\trender() {\n\t\treturn {this.props.children};\n\t}\n}\n","import React from 'react';\n\nconst Loader = props => ;\n\nexport default Loader;\n","import React from 'react';\n\nconst Grid = props => (\n\t\n\t\t{props.children}\n\t\n);\n\nexport default Grid;\n","import React from 'react';\nimport { AuthConsumer } from '../../providers/authProvider';\nimport Loader from 'components/Loader';\nimport Grid from 'components/Grid';\n\nconst Callback = () => (\n\t\n\t\t{({ signinRedirectCallback }) => {\n\t\t\tconst isRedirectCalled = localStorage.getItem('isRedirectCalled');\n\t\t\t// Temporary Fix. We need to check why this component is being rendered twice.\n\t\t\tif (!isRedirectCalled) {\n\t\t\t\tlocalStorage.setItem('isRedirectCalled', 'true');\n\t\t\t\tsigninRedirectCallback();\n\t\t\t} else {\n\t\t\t\tlocalStorage.removeItem('isRedirectCalled');\n\t\t\t}\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t);\n\t\t}}\n\t
\n);\n\nexport default Callback;\n","import React from 'react';\nimport Grid from 'components/Grid';\n\nfunction signOut() {\n\twindow.location.href = '/logout';\n}\n\nconst UserError = props => (\n\t\n\t\t
\n\t\t\t

You are not authorized to access this page.

\n\t\t\tmember-error\n\t\t\t

If you think there has been a mistake, please contact your administrator.

\n\t\t\t\n\t\t\t\tClick here to login with another account.\n\t\t\t\n\t\t
\n\t
\n);\n\nexport default UserError;\n","import { gatewayApi, legacyApi, APP_CONFIG } from 'constants/global-variables';\nimport { UserRoles } from 'constants/enums';\nimport { OverviewActionTypes } from 'constants/action-types';\n\nexport const actionCreators = {\n\ttoggleLeftNavigation: () => ({ type: OverviewActionTypes.toggleLeftNavigation }),\n\tsetUserInfo: data => async (dispatch, getState) => {\n\t\tconst userId = localStorage.getItem('userId');\n\t\tconst url = `/v1/companies/organizations/${APP_CONFIG.companyId}/members/${userId}/roles`;\n\t\tconst response = await gatewayApi.get(url);\n\n\t\tlet userRole = UserRoles.NURSE;\n\t\tresponse.data.roles.forEach(role => {\n\t\t\tif (role.name === UserRoles.ADMIN) {\n\t\t\t\tuserRole = UserRoles.ADMIN;\n\t\t\t\treturn;\n\t\t\t} else if (role.name === UserRoles.VIRTUALSITTER) {\n\t\t\t\tuserRole = UserRoles.VIRTUALSITTER;\n\t\t\t\treturn;\n\t\t\t}\n\t\t});\n\n\t\tlet userInfo = {\n\t\t\trole: userRole,\n\t\t};\n\n\t\tdispatch({ type: OverviewActionTypes.setUserInfo, payload: userInfo });\n\t},\n\taddNewUserRole: data => async (dispatch, getState) => {\n\t\tconst url = `/v1.1/api/profile/UpdateUserWorkExperience`;\n\t\treturn await legacyApi.post(url, data);\n\t},\n\tupdateUserRole: data => async (dispatch, getState) => {\n\t\tconst url = `/v1.1/api/profile/SaveUserCompany`;\n\t\treturn await legacyApi.post(url, data);\n\t},\n};\n","import React, { Component } from 'react';\nimport { NavLink } from 'react-router-dom';\nimport classNames from 'classnames/bind';\n\nclass LeftNavigation extends Component {\n\trender() {\n\t\treturn (\n\t\t\t\n\t\t);\n\t}\n}\n\nexport default LeftNavigation;\n","import { UserTypes, DeviceListLevel, SectorTypes, UserRoles, ParticipantState, MediaPermissions, MediaInputs, KeyCodes } from 'constants/enums';\nimport React from 'react';\nimport { getUserProfile, getUserRole } from 'infrastructure/auth';\n\nexport function isLoggedInUserAdmin() {\n\tconst userProfile = getUserProfile();\n\tlet isAdmin = userProfile.roles.some(role => {\n\t\treturn role.id === UserTypes.ADMIN;\n\t});\n\n\treturn isAdmin;\n}\n\nexport function getCurrentHealthSystemInfo() {\n\tlet currentHealthSystem = localStorage.getItem('currentHealthSystemInfo');\n\treturn JSON.parse(currentHealthSystem);\n}\n\nexport async function askForPermission(permissionFor) {\n\ttry {\n\t\tconst response = await navigator.mediaDevices.getUserMedia(permissionFor);\n\t\treturn { permission: MediaPermissions.GRANTED, response };\n\t} catch (error) {\n\t\treturn { error };\n\t}\n}\n\n/**\n * @returns {Promise}\n */\nexport async function checkForPermission(permissionFor) {\n\ttry {\n\t\treturn await navigator.permissions.query({ name: permissionFor });\n\t} catch (error) {\n\t\treturn { error };\n\t}\n}\n\nexport async function checkIfMediaDevicesPlugged() {\n\ttry {\n\t\tconst devices = await navigator.mediaDevices.enumerateDevices();\n\t\tlet pluggedDevices = {\n\t\t\tmicrophone: false,\n\t\t\tcamera: false,\n\t\t};\n\n\t\tdevices.forEach(device => {\n\t\t\tif (device.kind === MediaInputs.AUDIO_INPUT) {\n\t\t\t\tpluggedDevices.microphone = true;\n\t\t\t}\n\n\t\t\tif (device.kind === MediaInputs.VIDEO_INPUT) {\n\t\t\t\tpluggedDevices.camera = true;\n\t\t\t}\n\t\t});\n\t\treturn pluggedDevices;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n}\n\nexport function isMacintosh() {\n\treturn navigator.platform.includes('Mac');\n}\n\nexport function getHierarchyFromBreadcrumb(breadcrumb) {\n\tlet hierarchy = '';\n\tbreadcrumb.forEach(({ name }, index) => {\n\t\tif (index > 2) {\n\t\t\thierarchy = hierarchy + ' - ' + name;\n\t\t} else {\n\t\t\thierarchy = hierarchy + ', ' + name;\n\t\t}\n\t});\n\treturn hierarchy.substring(2);\n}\n\nexport function findSectorById(arr, id) {\n\treturn arr.reduce((accumulator, item) => {\n\t\tif (accumulator) {\n\t\t\treturn accumulator;\n\t\t}\n\t\t//comparing whether the id given as argument is equal to any of the items declared in the array.\n\t\tif ([item.regionId, item.hospitalId, item.departmentId, item.floorId, item.roomId, item.id, item.helloDeviceId].includes(id)) {\n\t\t\treturn item;\n\t\t}\n\t\tif (item.subOptions) {\n\t\t\treturn findSectorById(item.subOptions, id);\n\t\t}\n\t}, null);\n}\n\nexport function findDeviceById(arr, id) {\n\treturn arr.reduce((accumulator, item) => {\n\t\tif (accumulator) {\n\t\t\treturn accumulator;\n\t\t}\n\t\tif (+item.helloDeviceId === +id) {\n\t\t\treturn item;\n\t\t}\n\t\tif (item.subOptions) {\n\t\t\treturn findDeviceById(item.subOptions, +id);\n\t\t}\n\t}, null);\n}\n\nexport function sortArrayByProperty(array, property) {\n\treturn array.sort((a, b) => a[property] - b[property]);\n}\n\nexport function getHierarchyByHelloDeviceId(arr, id) {\n\treturn arr.reduce((accumulator, item) => {\n\t\tif (accumulator) {\n\t\t\treturn accumulator;\n\t\t}\n\n\t\tif (+item.helloDeviceId === +id) {\n\t\t\treturn getHierarchyFromBreadcrumb(item.breadcrumb);\n\t\t}\n\t\tif (item.subOptions) {\n\t\t\treturn getHierarchyByHelloDeviceId(item.subOptions, id);\n\t\t}\n\t}, null);\n}\n\nexport function searchSectors(arr, name, sectors = []) {\n\tarr.forEach((item, index) => {\n\t\tif (item.isNewOption) {\n\t\t\tarr.splice(index, 1);\n\t\t\treturn;\n\t\t}\n\t\tif (!name) {\n\t\t\titem.hidden = false;\n\t\t\titem.matchesSearch = false;\n\t\t} else if (item.name.toLowerCase().includes(name.toLowerCase())) {\n\t\t\titem.hidden = false;\n\t\t\titem.matchesSearch = true;\n\t\t\tsectors.push(item);\n\t\t} else {\n\t\t\titem.hidden = true;\n\t\t\titem.matchesSearch = false;\n\t\t}\n\t\tif (item.subOptions) {\n\t\t\tsearchSectors(item.subOptions, name, sectors);\n\t\t}\n\t});\n\treturn sectors;\n}\n\nexport function showPath(tree, arr) {\n\tarr.forEach(item => {\n\t\tif (item.hospitalId) {\n\t\t\tlet hospital = findSectorById(tree, item.hospitalId);\n\t\t\thospital.hidden = false;\n\t\t\thospital.matchesSearch = true;\n\t\t}\n\n\t\tif (item.departmentId) {\n\t\t\tlet department = findSectorById(tree, item.departmentId);\n\t\t\tdepartment.hidden = false;\n\t\t\tdepartment.matchesSearch = true;\n\t\t}\n\n\t\tif (item.floorId) {\n\t\t\tlet floor = findSectorById(tree, item.floorId);\n\t\t\tfloor.hidden = false;\n\t\t\tfloor.matchesSearch = true;\n\t\t}\n\t});\n}\n\nexport function getInitialsColor(letter) {\n\tconst obj = {};\n\tif (!letter) {\n\t\tobj.color = `4772f3`;\n\t\tobj.backgroundColor = `d0e2fd`;\n\t\treturn obj;\n\t}\n\tswitch (letter.toLowerCase().trim()) {\n\t\tcase 'a':\n\t\tcase 'n':\n\t\tcase '0': {\n\t\t\tobj.color = `4772f3`;\n\t\t\tobj.backgroundColor = `d0e2fd`;\n\t\t\tbreak;\n\t\t}\n\t\tcase 'b':\n\t\tcase 'o':\n\t\tcase '1': {\n\t\t\tobj.color = `e361c9`;\n\t\t\tobj.backgroundColor = `edd2fc`;\n\t\t\tbreak;\n\t\t}\n\t\tcase 'c':\n\t\tcase 'p':\n\t\tcase '2': {\n\t\t\tobj.color = `eb605e`;\n\t\t\tobj.backgroundColor = `f9dcd2`;\n\t\t\tbreak;\n\t\t}\n\t\tcase 'd':\n\t\tcase 'q':\n\t\tcase '3': {\n\t\t\tobj.color = `15a6ff`;\n\t\t\tobj.backgroundColor = `d2f0fc`;\n\t\t\tbreak;\n\t\t}\n\t\tcase 'e':\n\t\tcase 'r':\n\t\tcase '4': {\n\t\t\tobj.color = `44ccb5`;\n\t\t\tobj.backgroundColor = `d2f7ec`;\n\t\t\tbreak;\n\t\t}\n\t\tcase 'f':\n\t\tcase 's':\n\t\tcase '5': {\n\t\t\tobj.color = `dd995b`;\n\t\t\tobj.backgroundColor = `f7e4d2`;\n\t\t\tbreak;\n\t\t}\n\t\tcase 'g':\n\t\tcase 't':\n\t\tcase '6': {\n\t\t\tobj.color = `e2619c`;\n\t\t\tobj.backgroundColor = `f9d2f8`;\n\t\t\tbreak;\n\t\t}\n\t\tcase 'h':\n\t\tcase 'u':\n\t\tcase '7': {\n\t\t\tobj.color = `73c140`;\n\t\t\tobj.backgroundColor = `d2f7d6`;\n\t\t\tbreak;\n\t\t}\n\t\tcase 'i':\n\t\tcase 'v':\n\t\tcase '8': {\n\t\t\tobj.color = `8a64dd`;\n\t\t\tobj.backgroundColor = `e2d2f9`;\n\t\t\tbreak;\n\t\t}\n\t\tcase 'j':\n\t\tcase 'w':\n\t\tcase '9': {\n\t\t\tobj.color = `d3f4e8`;\n\t\t\tobj.backgroundColor = `41837a`;\n\t\t\tbreak;\n\t\t}\n\t\tcase 'k':\n\t\tcase 'x': {\n\t\t\tobj.color = `b94557`;\n\t\t\tobj.backgroundColor = `f4d3d3`;\n\t\t\tbreak;\n\t\t}\n\t\tcase 'l':\n\t\tcase 'y': {\n\t\t\tobj.color = `3c9045`;\n\t\t\tobj.backgroundColor = `d2f7d6`;\n\t\t\tbreak;\n\t\t}\n\t\tcase 'm':\n\t\tcase 'z': {\n\t\t\tobj.color = `70a8b5`;\n\t\t\tobj.backgroundColor = `e8f5f9`;\n\t\t\tbreak;\n\t\t}\n\t\tdefault:\n\t}\n\treturn obj;\n}\n\nexport function decodeHtml(txt) {\n\tconst Entities = require('html-entities').AllHtmlEntities;\n\n\tconst entities = new Entities();\n\n\treturn entities.decode(txt);\n}\n\nexport function mapSectionsToRender(hospitals, sector, toggleEditSectorModal, initDeleteOrg) {\n\tlet result = {\n\t\thospitals: [],\n\t\tdepartments: [],\n\t\tfloors: [],\n\t\trooms: [],\n\t};\n\tif (!hospitals || hospitals.length === 0) {\n\t\treturn result;\n\t}\n\tlet selectedSector = findSectorById(hospitals, sector[sector.sectorType + 'Id']);\n\tif (!selectedSector) {\n\t\treturn result;\n\t}\n\n\tconst userRole = getUserRole();\n\tif (sector.sectorType === SectorTypes.HOSPITAL) {\n\t\tselectedSector.subOptions.forEach(department => {\n\t\t\tresult.departments.push({\n\t\t\t\tname: department.name,\n\t\t\t\tid: department.departmentId,\n\t\t\t\tedit: userRole === UserRoles.ADMIN && (\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ttoggleEditSectorModal({\n\t\t\t\t\t\t\t\t\tsectorName: department.name,\n\t\t\t\t\t\t\t\t\tsectorType: department.type,\n\t\t\t\t\t\t\t\t\thospitalId: department.hospitalId,\n\t\t\t\t\t\t\t\t\tdepartmentId: department.departmentId,\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}>\n\t\t\t\t\t\t\tedit\n\t\t\t\t\t\t{' '}\n\t\t\t\t\t\t \n\t\t\t\t\t\t initDeleteOrg({ level: DeviceListLevel.DEPARTMENT, id: department.departmentId, name: department.name })}>\n\t\t\t\t\t\t\tdelete\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t),\n\t\t\t});\n\t\t\tdepartment.subOptions.forEach(floor => {\n\t\t\t\tresult.floors.push({\n\t\t\t\t\tname: floor.name,\n\t\t\t\t\tid: floor.floorId,\n\t\t\t\t\tedit: userRole === UserRoles.ADMIN && (\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\ttoggleEditSectorModal({\n\t\t\t\t\t\t\t\t\t\tsectorName: floor.name,\n\t\t\t\t\t\t\t\t\t\tsectorType: floor.type,\n\t\t\t\t\t\t\t\t\t\thospitalId: floor.hospitalId,\n\t\t\t\t\t\t\t\t\t\tdepartmentId: department.departmentId,\n\t\t\t\t\t\t\t\t\t\tfloorId: floor.floorId,\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t}>\n\t\t\t\t\t\t\t\tedit\n\t\t\t\t\t\t\t{' '}\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t initDeleteOrg({ level: DeviceListLevel.FLOOR, id: floor.floorId, name: floor.name })}>\n\t\t\t\t\t\t\t\tdelete\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t),\n\t\t\t\t});\n\t\t\t\tfloor.subOptions.forEach(room => {\n\t\t\t\t\tresult.rooms.push({\n\t\t\t\t\t\tname: room.name,\n\t\t\t\t\t\tid: room.roomId,\n\t\t\t\t\t\tedit: userRole === UserRoles.ADMIN && (\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\ttoggleEditSectorModal({\n\t\t\t\t\t\t\t\t\t\t\tsectorName: room.name,\n\t\t\t\t\t\t\t\t\t\t\tsectorType: room.type,\n\t\t\t\t\t\t\t\t\t\t\thospitalId: floor.hospitalId,\n\t\t\t\t\t\t\t\t\t\t\tdepartmentId: department.departmentId,\n\t\t\t\t\t\t\t\t\t\t\tfloorId: floor.floorId,\n\t\t\t\t\t\t\t\t\t\t\troomId: room.roomId,\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t}>\n\t\t\t\t\t\t\t\t\tedit\n\t\t\t\t\t\t\t\t{' '}\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t initDeleteOrg({ level: DeviceListLevel.ROOM, id: room.roomId, name: room.name })}>\n\t\t\t\t\t\t\t\t\tdelete\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t),\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t}\n\n\tif (sector.sectorType === SectorTypes.DEPARTMENT) {\n\t\tselectedSector.subOptions.forEach(floor => {\n\t\t\tresult.floors.push({\n\t\t\t\tname: floor.name,\n\t\t\t\tid: floor.floorId,\n\t\t\t\tedit: userRole === UserRoles.ADMIN && (\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ttoggleEditSectorModal({\n\t\t\t\t\t\t\t\t\tsectorName: floor.name,\n\t\t\t\t\t\t\t\t\tsectorType: floor.type,\n\t\t\t\t\t\t\t\t\thospitalId: floor.hospitalId,\n\t\t\t\t\t\t\t\t\tdepartmentId: floor.departmentId,\n\t\t\t\t\t\t\t\t\tfloorId: floor.floorId,\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}>\n\t\t\t\t\t\t\tedit\n\t\t\t\t\t\t{' '}\n\t\t\t\t\t\t \n\t\t\t\t\t\t initDeleteOrg({ level: DeviceListLevel.FLOOR, id: floor.floorId, name: floor.name })}>\n\t\t\t\t\t\t\tdelete\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t),\n\t\t\t});\n\t\t\tfloor.subOptions.forEach(room => {\n\t\t\t\tresult.rooms.push({\n\t\t\t\t\tname: room.name,\n\t\t\t\t\tid: room.roomId,\n\t\t\t\t\tedit: userRole === UserRoles.ADMIN && (\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\ttoggleEditSectorModal({\n\t\t\t\t\t\t\t\t\t\tsectorName: room.name,\n\t\t\t\t\t\t\t\t\t\tsectorType: room.type,\n\t\t\t\t\t\t\t\t\t\thospitalId: floor.hospitalId,\n\t\t\t\t\t\t\t\t\t\tdepartmentId: room.departmentId,\n\t\t\t\t\t\t\t\t\t\tfloorId: floor.floorId,\n\t\t\t\t\t\t\t\t\t\troomId: room.roomId,\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t}>\n\t\t\t\t\t\t\t\tedit\n\t\t\t\t\t\t\t{' '}\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t initDeleteOrg({ level: DeviceListLevel.ROOM, id: room.roomId, name: room.name })}>\n\t\t\t\t\t\t\t\tdelete\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t),\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t}\n\n\tif (sector.sectorType === SectorTypes.FLOOR) {\n\t\tselectedSector.subOptions.forEach(room => {\n\t\t\tresult.rooms.push({\n\t\t\t\tname: room.name,\n\t\t\t\tid: room.roomId,\n\t\t\t\tedit: userRole === UserRoles.ADMIN && (\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ttoggleEditSectorModal({\n\t\t\t\t\t\t\t\t\tsectorName: room.name,\n\t\t\t\t\t\t\t\t\tsectorType: room.type,\n\t\t\t\t\t\t\t\t\thospitalId: room.hospitalId,\n\t\t\t\t\t\t\t\t\tdepartmentId: room.departmentId,\n\t\t\t\t\t\t\t\t\tfloorId: room.floorId,\n\t\t\t\t\t\t\t\t\troomId: room.roomId,\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}>\n\t\t\t\t\t\t\tedit\n\t\t\t\t\t\t{' '}\n\t\t\t\t\t\t \n\t\t\t\t\t\t initDeleteOrg({ level: DeviceListLevel.ROOM, id: room.roomId, name: room.name })}>\n\t\t\t\t\t\t\tdelete\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t),\n\t\t\t});\n\t\t});\n\t}\n\n\treturn result;\n}\n\nexport function getParentSector(arr, element) {\n\tlet parent = {};\n\tif (element.type === SectorTypes.ROOM) {\n\t\tparent = findSectorById(arr, element.floorId);\n\t}\n\tif (element.type === SectorTypes.FLOOR) {\n\t\tparent = findSectorById(arr, element.departmentId);\n\t}\n\tif (element.type === SectorTypes.DEPARTMENT) {\n\t\tparent = findSectorById(arr, element.hospitalId);\n\t}\n\treturn parent;\n}\n\nexport function isValidSector(currentSector, tree, sectorName) {\n\tlet sameLevelSectors;\n\tif (currentSector.type === SectorTypes.HOSPITAL) {\n\t\tsameLevelSectors = tree.filter(s => s.isNewOption === undefined);\n\t\tlet hospitalExists = Object.entries(sameLevelSectors[0]).length > 0;\n\t\tif (!hospitalExists) {\n\t\t\treturn true;\n\t\t}\n\t} else {\n\t\tsameLevelSectors = getParentSector(tree, currentSector).subOptions.filter(s => s.isNewOption === undefined);\n\t}\n\n\treturn !sameLevelSectors.some(s => s.name.toLowerCase() === sectorName.toLowerCase());\n}\n\nexport function getSectorPath(sector) {\n\tlet result = {};\n\tif (!sector) {\n\t\treturn result;\n\t}\n\tif (sector.type === SectorTypes.HOSPITAL) {\n\t\tresult[sector.regionId] = {};\n\t}\n\tif (sector.type === SectorTypes.DEPARTMENT) {\n\t\tresult[sector.regionId] = {};\n\t\tresult[sector.regionId][sector.hospitalId] = {};\n\t}\n\tif (sector.type === SectorTypes.FLOOR) {\n\t\tresult[sector.regionId] = {};\n\t\tresult[sector.regionId][sector.hospitalId] = {};\n\t\tresult[sector.regionId][sector.hospitalId][sector.departmentId] = {};\n\t}\n\tif (sector.type === SectorTypes.ROOM) {\n\t\tresult[sector.regionId] = {};\n\t\tresult[sector.regionId][sector.hospitalId] = {};\n\t\tresult[sector.regionId][sector.hospitalId][sector.departmentId] = {};\n\t\tresult[sector.regionId][sector.hospitalId][sector.departmentId][sector.floorId] = {};\n\t}\n\treturn result;\n}\n\nexport function buildTreeModel(hospitals, assignMode) {\n\tlet treeData = [];\n\tlet baseurl = '/health-system';\n\tlet isMonitoring;\n\tlet userRole = getUserRole();\n\tif (window.location.pathname.includes('monitoring')) {\n\t\tisMonitoring = true;\n\t\tbaseurl = '/monitoring';\n\t}\n\n\tfunction tooltipOptions(hasDevice) {\n\t\tif (isMonitoring && hasDevice) {\n\t\t\treturn 'Add to monitoring view';\n\t\t}\n\n\t\tif (assignMode && !hasDevice) {\n\t\t\treturn 'Assign device';\n\t\t}\n\t\treturn '';\n\t}\n\n\thospitals.forEach((hospital, hospitalIndex) => {\n\t\tif (hospitalIndex === 0) {\n\t\t\ttreeData.firstHospitalId = hospital.id;\n\t\t}\n\n\t\ttreeData.push({\n\t\t\tname: hospital.name,\n\t\t\ticon: 'business',\n\t\t\tlink: `${baseurl}/${hospital.id}`,\n\t\t\ttooltip: userRole === UserRoles.ADMIN ? 'Add Department' : false,\n\t\t\ttype: 'hospital',\n\t\t\tsubOptions: [],\n\t\t\thospitalId: hospital.id,\n\t\t\tbreadcrumb: [\n\t\t\t\t{\n\t\t\t\t\tname: hospital.name,\n\t\t\t\t\tlink: `${baseurl}/${hospital.id}`,\n\t\t\t\t},\n\t\t\t],\n\t\t});\n\n\t\thospital.departments.forEach((department, departmentIndex) => {\n\t\t\ttreeData[hospitalIndex].subOptions.push({\n\t\t\t\tname: department.name,\n\t\t\t\ticon: 'account_balance',\n\t\t\t\tlink: `${baseurl}/${hospital.id}/department/${department.id}`,\n\t\t\t\ttooltip: userRole === UserRoles.ADMIN ? 'Add Floor' : false,\n\t\t\t\ttype: 'department',\n\t\t\t\tsubOptions: [],\n\t\t\t\tdepartmentId: department.id,\n\t\t\t\thospitalId: hospital.id,\n\t\t\t\tbreadcrumb: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: hospital.name,\n\t\t\t\t\t\tlink: `${baseurl}/${hospital.id}`,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: department.name,\n\t\t\t\t\t\tlink: `${baseurl}/${hospital.id}/department/${department.id}`,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\ttreeLocation: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: hospital.name,\n\t\t\t\t\t\ticon: 'business',\n\t\t\t\t\t\ttype: 'hospital',\n\t\t\t\t\t\tsubOptions: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: department.name,\n\t\t\t\t\t\t\t\ticon: 'account_balance',\n\t\t\t\t\t\t\t\ttype: 'department',\n\t\t\t\t\t\t\t\tsubOptions: [],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t});\n\t\t\tdepartment.floors.forEach((floor, floorIndex) => {\n\t\t\t\ttreeData[hospitalIndex].subOptions[departmentIndex].subOptions.push({\n\t\t\t\t\tname: floor.name,\n\t\t\t\t\ticon: 'money',\n\t\t\t\t\tlink: `${baseurl}/${hospital.id}/department/${department.id}/floor/${floor.id}`,\n\t\t\t\t\ttooltip: userRole === UserRoles.ADMIN ? 'Add Room' : false,\n\t\t\t\t\ttype: 'floor',\n\t\t\t\t\tsubOptions: [],\n\t\t\t\t\tfloorId: floor.id,\n\t\t\t\t\tdepartmentId: department.id,\n\t\t\t\t\thospitalId: hospital.id,\n\t\t\t\t\tbreadcrumb: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: hospital.name,\n\t\t\t\t\t\t\tlink: `${baseurl}/${hospital.id}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: department.name,\n\t\t\t\t\t\t\tlink: `${baseurl}/${hospital.id}/department/${department.id}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: floor.name,\n\t\t\t\t\t\t\tlink: `${baseurl}/${hospital.id}/department/${department.id}/floor/${floor.id}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\ttreeLocation: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: hospital.name,\n\t\t\t\t\t\t\ticon: 'business',\n\t\t\t\t\t\t\ttype: 'hospital',\n\t\t\t\t\t\t\tsubOptions: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tname: department.name,\n\t\t\t\t\t\t\t\t\ticon: 'account_balance',\n\t\t\t\t\t\t\t\t\ttype: 'department',\n\t\t\t\t\t\t\t\t\tsubOptions: [\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tname: floor.name,\n\t\t\t\t\t\t\t\t\t\t\ticon: 'meeting_room',\n\t\t\t\t\t\t\t\t\t\t\ttype: 'room',\n\t\t\t\t\t\t\t\t\t\t\tsubOptions: [],\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t});\n\n\t\t\t\tfloor.rooms.forEach((room, roomIndex) => {\n\t\t\t\t\ttreeData[hospitalIndex].subOptions[departmentIndex].subOptions[floorIndex].subOptions.push({\n\t\t\t\t\t\tname: room.name,\n\t\t\t\t\t\ticon: 'meeting_room',\n\t\t\t\t\t\tlink: `${baseurl}/${hospital.id}/department/${department.id}/floor/${floor.id}/room/${room.id}`,\n\t\t\t\t\t\ttype: 'room',\n\t\t\t\t\t\tsubOptions: [],\n\t\t\t\t\t\troomId: room.id,\n\t\t\t\t\t\troomIndex: roomIndex,\n\t\t\t\t\t\tfloorId: floor.id,\n\t\t\t\t\t\tdepartmentId: department.id,\n\t\t\t\t\t\thospitalId: hospital.id,\n\t\t\t\t\t\ttooltip: tooltipOptions(room.helloDeviceId),\n\t\t\t\t\t\tbreadcrumb: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: hospital.name,\n\t\t\t\t\t\t\t\tlink: `${baseurl}/${hospital.id}`,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: department.name,\n\t\t\t\t\t\t\t\tlink: `${baseurl}/${hospital.id}/department/${department.id}`,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: floor.name,\n\t\t\t\t\t\t\t\tlink: `${baseurl}/${hospital.id}/department/${department.id}/floor/${floor.id}`,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: room.name,\n\t\t\t\t\t\t\t\tlink: `${baseurl}/${hospital.id}/department/${department.id}/floor/${floor.id}/room/${room.id}`,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t\tstatus: room.isOnline ? 'online' : 'offline',\n\t\t\t\t\t\tdeviceBusy: room.callState === ParticipantState.CONNECTED.type,\n\t\t\t\t\t\thelloDeviceId: room.helloDeviceId,\n\t\t\t\t\t\ttreeLocation: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: hospital.name,\n\t\t\t\t\t\t\t\ticon: 'business',\n\t\t\t\t\t\t\t\ttype: 'hospital',\n\t\t\t\t\t\t\t\tsubOptions: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: department.name,\n\t\t\t\t\t\t\t\t\t\ticon: 'account_balance',\n\t\t\t\t\t\t\t\t\t\ttype: 'department',\n\t\t\t\t\t\t\t\t\t\tsubOptions: [\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tname: floor.name,\n\t\t\t\t\t\t\t\t\t\t\t\ticon: 'money',\n\t\t\t\t\t\t\t\t\t\t\t\ttype: 'floor',\n\t\t\t\t\t\t\t\t\t\t\t\tsubOptions: [\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tname: room.name,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ticon: 'meeting_room',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlink: `${baseurl}/${hospital.id}/department/${department.id}/floor/${floor.id}/room/${room.id}`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype: 'room',\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t});\n\n\treturn treeData;\n}\n\nexport function getLevelDevices(option) {\n\tlet devices = [];\n\tswitch (option.type) {\n\t\tcase 'hospital': {\n\t\t\tconst departments = option.subOptions;\n\t\t\tdepartments.forEach(department => {\n\t\t\t\tconst floors = department.subOptions;\n\t\t\t\tfloors.forEach(floor => {\n\t\t\t\t\tconst rooms = floor.subOptions;\n\t\t\t\t\trooms.forEach(room => {\n\t\t\t\t\t\tif (room.helloDeviceId !== undefined) {\n\t\t\t\t\t\t\tdevices.push(room.helloDeviceId);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t\treturn devices;\n\t\t}\n\t\tcase 'department': {\n\t\t\tconst floors = option.subOptions;\n\t\t\tfloors.forEach(floor => {\n\t\t\t\tconst rooms = floor.subOptions;\n\t\t\t\trooms.forEach(room => {\n\t\t\t\t\tif (room.helloDeviceId !== undefined) {\n\t\t\t\t\t\tdevices.push(room.helloDeviceId);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t\treturn devices;\n\t\t}\n\t\tcase 'floor': {\n\t\t\tconst rooms = option.subOptions;\n\t\t\trooms.forEach(room => {\n\t\t\t\tif (room.helloDeviceId !== undefined) {\n\t\t\t\t\tdevices.push(room.helloDeviceId);\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn devices;\n\t\t}\n\t\tdefault:\n\t\t\treturn devices;\n\t}\n}\n\nexport function getDeviceAssignedRoom(tree, deviceId) {\n\tconst option = {};\n\ttree.forEach(region => {\n\t\tconst hospitals = region.subOptions;\n\t\thospitals.forEach(hospital => {\n\t\t\tconst departments = hospital.subOptions;\n\t\t\tdepartments.forEach(department => {\n\t\t\t\tconst floors = department.subOptions;\n\t\t\t\tfloors.forEach(floor => {\n\t\t\t\t\tconst rooms = floor.subOptions;\n\t\t\t\t\trooms.forEach(room => {\n\t\t\t\t\t\tif (room.helloDeviceId === deviceId) {\n\t\t\t\t\t\t\toption.roomName = room.name;\n\t\t\t\t\t\t\toption.floorName = floor.name;\n\t\t\t\t\t\t\toption.departmentName = department.name;\n\t\t\t\t\t\t\toption.hospitalName = hospital.name;\n\t\t\t\t\t\t\toption.regionName = region.name;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t});\n\n\treturn option;\n}\n\nexport function getLevelRoomsWithDevices(option) {\n\tlet devices = [];\n\tswitch (option.type) {\n\t\tcase 'hospital': {\n\t\t\tconst departments = option.subOptions;\n\t\t\tdepartments.forEach(department => {\n\t\t\t\tconst floors = department.subOptions;\n\t\t\t\tfloors.forEach(floor => {\n\t\t\t\t\tconst rooms = floor.subOptions;\n\t\t\t\t\trooms.forEach(room => {\n\t\t\t\t\t\tif (room.helloDeviceId) devices.push(room);\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t\treturn devices;\n\t\t}\n\t\tcase 'department': {\n\t\t\tconst floors = option.subOptions;\n\t\t\tfloors.forEach(floor => {\n\t\t\t\tconst rooms = floor.subOptions;\n\t\t\t\trooms.forEach(room => {\n\t\t\t\t\tif (room.helloDeviceId) devices.push(room);\n\t\t\t\t});\n\t\t\t});\n\t\t\treturn devices;\n\t\t}\n\t\tcase 'floor': {\n\t\t\tconst rooms = option.subOptions;\n\t\t\trooms.forEach(room => {\n\t\t\t\tif (room.helloDeviceId) devices.push(room);\n\t\t\t});\n\t\t\treturn devices;\n\t\t}\n\t\tdefault:\n\t\t\treturn devices;\n\t}\n}\n\nexport function getNursePoolingStatus() {\n\treturn localStorage.getItem('nursePoolingStatus');\n}\n\nexport function sortByRoomName(array) {\n\tconst collator = new Intl.Collator(undefined, {\n\t\tnumeric: true,\n\t\tsensitivity: 'base',\n\t});\n\treturn array.sort((a, b) => collator.compare(a.roomName, b.roomName));\n}\n\nexport const getPort = url => {\n\tconst parts = url.split(':');\n\tconst port = parseInt(parts[parts.length - 1], 10);\n\tif (parts[0] === 'http' && (Number.isNaN(port) || parts.length < 3)) {\n\t\treturn '';\n\t}\n\tif (parts[0] === 'https' && (Number.isNaN(port) || parts.length < 3)) {\n\t\treturn '';\n\t}\n\tif (parts.length === 1 || Number.isNaN(port)) return '';\n\treturn port;\n};\n\nexport const handleOnKeyDownNumeric = (event, allowPeriod = false) => {\n\tif (\n\t\t[\n\t\t\tKeyCodes.MINUS,\n\t\t\tKeyCodes.NUMPAD_PERIOD,\n\t\t\tKeyCodes.NUMPAD_ADD,\n\t\t\tKeyCodes.NUMPAD_SUBTRACT,\n\t\t\t!allowPeriod && KeyCodes.PERIOD,\n\t\t\tKeyCodes.PLUS,\n\t\t\tKeyCodes.LETTER_E,\n\t\t].includes(event.which)\n\t) {\n\t\tevent.preventDefault();\n\t}\n};\n","import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { actionCreators } from 'state/mainLayout/actions';\nimport LeftNavigation from 'components/LeftNavigation';\nimport Grid from 'components/Grid';\nimport { getUserRole } from 'infrastructure/auth';\nimport { UserRoles } from 'constants/enums';\nimport { getNursePoolingStatus } from 'infrastructure/helpers/commonHelpers';\n\nclass Layout extends Component {\n\tonLeftNavigationItemClicked = (item, event) => {\n\t\tif (item.role === 'toggleLeftNavigation') {\n\t\t\tevent.preventDefault();\n\t\t\tthis.props.toggleLeftNavigation();\n\t\t}\n\t};\n\n\tgetLeftNavigationItems() {\n\t\tlet leftNavigationItems = [];\n\n\t\tconst isPoolingPage = getUserRole() === UserRoles.NURSE && !getNursePoolingStatus();\n\n\t\tswitch (getUserRole()) {\n\t\t\tcase UserRoles.SUPERUSER: {\n\t\t\t\tleftNavigationItems = [\n\t\t\t\t\t{\n\t\t\t\t\t\ticon: 'panorama_fish_eye',\n\t\t\t\t\t\tlinkTo: '/health-system',\n\t\t\t\t\t\ttitle: 'Organization',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ticon: 'person',\n\t\t\t\t\t\tlinkTo: '/users',\n\t\t\t\t\t\ttitle: 'User Management',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ticon: 'assessment',\n\t\t\t\t\t\tlinkTo: '/calllogs',\n\t\t\t\t\t\ttitle: 'Call logs',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ticon: 'unfold_more',\n\t\t\t\t\t\tlinkTo: '#',\n\t\t\t\t\t\ttitle: 'Collapse',\n\t\t\t\t\t\trole: 'toggleLeftNavigation',\n\t\t\t\t\t},\n\t\t\t\t];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase UserRoles.ADMIN: {\n\t\t\t\tleftNavigationItems = [\n\t\t\t\t\t{\n\t\t\t\t\t\ticon: 'panorama_fish_eye',\n\t\t\t\t\t\tlinkTo: '/health-system',\n\t\t\t\t\t\ttitle: 'Organization',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ticon: 'person',\n\t\t\t\t\t\tlinkTo: '/users',\n\t\t\t\t\t\ttitle: 'User Management',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ticon: 'assessment',\n\t\t\t\t\t\tlinkTo: '/calllogs',\n\t\t\t\t\t\ttitle: 'Call logs',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ticon: 'build',\n\t\t\t\t\t\tlinkTo: '/configurations',\n\t\t\t\t\t\ttitle: 'Configurations',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ticon: 'unfold_more',\n\t\t\t\t\t\tlinkTo: '#',\n\t\t\t\t\t\ttitle: 'Collapse',\n\t\t\t\t\t\trole: 'toggleLeftNavigation',\n\t\t\t\t\t},\n\t\t\t\t];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase UserRoles.NURSE:\n\t\t\t\tleftNavigationItems = [\n\t\t\t\t\t...(!isPoolingPage\n\t\t\t\t\t\t? [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ticon: 'panorama_fish_eye',\n\t\t\t\t\t\t\t\t\tlinkTo: '/health-system',\n\t\t\t\t\t\t\t\t\ttitle: 'Organization',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ticon: 'remove_red_eye',\n\t\t\t\t\t\t\t\t\tlinkTo: '/monitoring',\n\t\t\t\t\t\t\t\t\ttitle: 'Monitoring',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t ]\n\t\t\t\t\t\t: []),\n\t\t\t\t\t{\n\t\t\t\t\t\ticon: 'unfold_more',\n\t\t\t\t\t\tlinkTo: '#',\n\t\t\t\t\t\ttitle: 'Collapse',\n\t\t\t\t\t\trole: 'toggleLeftNavigation',\n\t\t\t\t\t},\n\t\t\t\t].filter(Boolean);\n\n\t\t\t\tbreak;\n\t\t\tcase UserRoles.VIRTUALSITTER: {\n\t\t\t\tleftNavigationItems = [\n\t\t\t\t\t{\n\t\t\t\t\t\ticon: 'remove_red_eye',\n\t\t\t\t\t\tlinkTo: '/monitoring',\n\t\t\t\t\t\ttitle: 'Monitoring',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ticon: 'unfold_more',\n\t\t\t\t\t\tlinkTo: '#',\n\t\t\t\t\t\ttitle: 'Collapse',\n\t\t\t\t\t\trole: 'toggleLeftNavigation',\n\t\t\t\t\t},\n\t\t\t\t];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault: {\n\t\t\t\tleftNavigationItems = [];\n\t\t\t}\n\t\t}\n\n\t\treturn leftNavigationItems;\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t{this.props.children}\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n}\n\nexport default connect(\n\tstate => state.mainLayout,\n\tdispatch => bindActionCreators(actionCreators, dispatch)\n)(Layout);\n","import React from 'react';\nimport classNames from 'classnames/bind';\n\nconst Alert = props => (\n\t\n\t\t{props.message}\n\t\t{!props.hideCloseButton && (\n\t\t\t\n\t\t\t\tclose\n\t\t\t\n\t\t)}\n\t\n);\n\nAlert.defaultProps = {\n\tpersist: false,\n};\n\nexport default Alert;\n","import React from 'react';\nimport classNames from 'classnames/bind';\nimport { If, Then, Else } from 'react-if';\nimport { getInitialsColor } from 'infrastructure/helpers/commonHelpers';\n\nconst getInitialsFromFullName = fullName => {\n\tif (!!fullName.length) {\n\t\tlet fullNameSplit = fullName.split(/\\b\\s+/);\n\t\treturn `${fullNameSplit[0] ? fullNameSplit[0][0] : ''}${fullNameSplit[1] ? fullNameSplit[1][0] : ''}`;\n\t}\n};\n\nconst Avatar = props => {\n\tconst initialsColor = getInitialsColor(props.fullName[0]);\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t{getInitialsFromFullName(props.fullName)?.toUpperCase()}\n\t\t\t\t\n\t\t\t\n\t\t\n\t);\n};\nexport default Avatar;\n","import React from 'react';\nimport classNames from 'classnames/bind';\n\nconst Badge = props => (\n\t
\n\t\t{props.text}\n\t\t{props.icon && {props.icon}}\n\t
\n);\n\nexport default Badge;\n","import React from 'react';\nimport classNames from 'classnames/bind';\nimport { withRouter, Link } from 'react-router-dom';\n\nconst Breadcrumb = props => (\n\t
    \n\t\t{props.links?.map((link, index) => (\n\t\t\t
  • props.onBreadcrumbClick(props.links, index)}>\n\t\t\t\t{link.name}\n\t\t\t
  • \n\t\t))}\n\t
\n);\n\nexport default withRouter(Breadcrumb);\n","import React from 'react';\nimport classNames from 'classnames/bind';\nimport { If, Then, Else } from 'react-if';\n\nconst buttonTypes = {\n\tSUBMIT: 'submit',\n};\n\nconst Button = props => (\n\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t{props.icon && {props.icon}}\n\t\t\t\t{props.text}\n\t\t\t\n\t\t\n\t\n);\n\nexport default Button;\n","import React, { Component } from 'react';\nimport classNames from 'classnames/bind';\n\nclass CallButton extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tisDropdownOpen: false,\n\t\t};\n\t\tthis.isCallButtonClicked = false;\n\t}\n\tcomponentDidMount() {\n\t\tdocument.addEventListener('mousedown', this.handleClickOutside);\n\t}\n\tcomponentWillUnmount() {\n\t\tdocument.removeEventListener('mousedown', this.handleClickOutside);\n\t}\n\tsetWrapperRef = node => {\n\t\tthis.wrapperRef = node;\n\t};\n\thandleClickOutside = event => {\n\t\tif (this.wrapperRef && !this.wrapperRef.contains(event.target)) {\n\t\t\tif (this.state.isDropdownOpen) {\n\t\t\t\tthis.toggleDropdown();\n\t\t\t}\n\t\t}\n\t};\n\ttoggleDropdown = () => {\n\t\tif (this.props.children) {\n\t\t\tthis.setState({\n\t\t\t\tisDropdownOpen: !this.state.isDropdownOpen,\n\t\t\t});\n\t\t} else {\n\t\t\t// Delay toggle event for half a second before it can be clicked again\n\t\t\tif (!this.isCallButtonClicked) {\n\t\t\t\tthis.isCallButtonClicked = true;\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tthis.props.onClick(this.props.name);\n\t\t\t\t\tthis.isCallButtonClicked = false;\n\t\t\t\t}, 500);\n\t\t\t}\n\t\t}\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t this.toggleDropdown()}\n\t\t\t\tdata-tooltip={this.props.tooltip}\n\t\t\t\tdata-position={this.props.tooltipPosition}>\n\t\t\t\t\n\t\t\t\t\t{this.props.icon}\n\t\t\t\t\n\t\t\t\t{this.state.isDropdownOpen && this.props.children}\n\t\t\t\n\t\t);\n\t}\n}\n\nexport default CallButton;\n","import React from 'react';\nimport classNames from 'classnames';\n\nexport default class CallCorrelationInfo extends React.Component {\n\tstate = {\n\t\tcopied: false,\n\t};\n\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.correlationIdRef = React.createRef();\n\t}\n\n\tcopyToClipboard = () => {\n\t\tlet textArea = document.createElement('textarea');\n\t\ttextArea.value = this.props.correlationId;\n\t\tdocument.body.appendChild(textArea);\n\t\ttextArea.select();\n\t\tdocument.execCommand('Copy');\n\t\ttextArea.remove();\n\n\t\tthis.setState({\n\t\t\tcopied: true,\n\t\t});\n\n\t\tsetTimeout(() => {\n\t\t\tthis.setState({\n\t\t\t\tcopied: false,\n\t\t\t});\n\t\t}, 3000);\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t{this.props.correlationId && (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{this.state.copied ? 'Copied!' : this.props.correlationId}\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\n\t\t\t\t\t{!this.props.correlationId && n/a}\n\n\t\t\t\t\t{this.props.correlationId && (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tfile_copy\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t\n\t\t\t
\n\t\t);\n\t}\n}\n","import React from 'react';\nimport Grid from 'components/Grid';\nimport Avatar from 'components/Avatar';\nimport { ConferenceEndReason, ParticipantState } from 'constants/enums';\n\nconst CallEndReason = props => (\n\t
\n\t\t\n\t\t\t
\n\t\t\t\t\n\n\t\t\t\t{props.reason === ConferenceEndReason.PARTICIPANT_BUSY && (\n\t\t\t\t\t

\n\t\t\t\t\t\t{props.onPatientBusyNurse && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{props.onPatientBusyNurse.state === ParticipantState.CONNECTING.type && `This device has initiated a call. Try again later.`}\n\t\t\t\t\t\t\t\t{[ParticipantState.CONNECTED.type, ParticipantState.RECONNECTING.type].includes(props.onPatientBusyNurse.state) &&\n\t\t\t\t\t\t\t\t\t`This device is currently on a call with ${props.onPatientBusyNurse.name}. Try again later.`}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!props.onPatientBusyNurse && `This device is currently on a call. Try again later.`}\n\t\t\t\t\t

\n\t\t\t\t)}\n\n\t\t\t\t{props.reason === ConferenceEndReason.PARTICIPANT_OFFLINE && (\n\t\t\t\t\t

\n\t\t\t\t\t\tThis device is offline. Try again later.\n\t\t\t\t\t

\n\t\t\t\t)}\n\n\t\t\t\t{(props.reason === ConferenceEndReason.PARTICIPANT_LEFT ||\n\t\t\t\t\tprops.reason === ConferenceEndReason.INITIATOR_LEFT ||\n\t\t\t\t\tprops.reason === ConferenceEndReason.OWNER_LEFT) && (\n\t\t\t\t\t

\n\t\t\t\t\t\tCall ended.\n\t\t\t\t\t

\n\t\t\t\t)}\n\n\t\t\t\t{props.reason === ConferenceEndReason.PARTICIPANT_DECLINED && (\n\t\t\t\t\t

\n\t\t\t\t\t\tCall has been declined.\n\t\t\t\t\t

\n\t\t\t\t)}\n\n\t\t\t\t{props.reason === ConferenceEndReason.PARTICIPANT_NOT_ANSWERING && (\n\t\t\t\t\t

\n\t\t\t\t\t\tCan't connect to this device. Please try again.\n\t\t\t\t\t

\n\t\t\t\t)}\n\n\t\t\t\t{props.reason === ConferenceEndReason.ABORTED && (\n\t\t\t\t\t

\n\t\t\t\t\t\tCall has ended. Please try again.\n\t\t\t\t\t

\n\t\t\t\t)}\n\n\t\t\t\t{props.reason === ConferenceEndReason.DROPPED && (\n\t\t\t\t\t

\n\t\t\t\t\t\tFailed to reconnect to the network. Please try again.\n\t\t\t\t\t

\n\t\t\t\t)}\n\n\t\t\t\t{props.reason === ConferenceEndReason.PARTICIPANT_PASSWORD_CHANGED && (\n\t\t\t\t\t

\n\t\t\t\t\t\tThe password for this account has been changed. Please login using the new credentials.\n\t\t\t\t\t

\n\t\t\t\t)}\n\t\t\t\t{props.reason === ConferenceEndReason.PARTICIPANT_IDLE && (\n\t\t\t\t\t

\n\t\t\t\t\t\tYou have been idle for too long. Call is ended.\n\t\t\t\t\t

\n\t\t\t\t)}\n\n\t\t\t\t{props.reason === ConferenceEndReason.TERMINATED_BY_ADMINISTRATOR && (\n\t\t\t\t\t

\n\t\t\t\t\t\tThis session was ended by a Banyan admin.\n\t\t\t\t\t

\n\t\t\t\t)}\n\n\t\t\t\t{props.reason === ConferenceEndReason.PARTICIPANT_INVITE_DENIED && (\n\t\t\t\t\t

\n\t\t\t\t\t\tYou don't have sufficient permissions to call this participant. Please contact your administrator.\n\t\t\t\t\t

\n\t\t\t\t)}\n\n\t\t\t\t{props.reason === ConferenceEndReason.FAILED_TO_GET_INITIATOR_INFO && (\n\t\t\t\t\t

\n\t\t\t\t\t\tFailed to get your information. Please try again.\n\t\t\t\t\t

\n\t\t\t\t)}\n\n\t\t\t\t{props.reason === ConferenceEndReason.PARTICIPANT_INVITE_FAILED && (\n\t\t\t\t\t

\n\t\t\t\t\t\tFailed to get participant information. Please try again.\n\t\t\t\t\t

\n\t\t\t\t)}\n\t\t\t
\n\t\t
\n\t
\n);\n\nexport default CallEndReason;\n","import React from 'react';\n\nconst Checkbox = props => (\n\t\n);\n\nexport default Checkbox;\n","import React from 'react';\n\nconst DescriptionBox = props => (\n\t
    \n\t\t{props.data.map((data, index) => (\n\t\t\t
  • \n\t\t\t\t{data.title && data.title + ':'}\n\t\t\t\t{data.description}\n\t\t\t
  • \n\t\t))}\n\t
\n);\n\nexport default DescriptionBox;\n","import React, { Component } from 'react';\nimport classNames from 'classnames/bind';\nimport ReactDOM from 'react-dom';\n\nclass Dropdown extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.setWrapperRef = this.setWrapperRef.bind(this);\n\t\tthis.handleClickOutside = this.handleClickOutside.bind(this);\n\t\tthis.dropdownChildrenRef = React.createRef();\n\t\tthis.dropdownRef = React.createRef();\n\n\t\tthis.state = {\n\t\t\tisDropdownOpen: false,\n\t\t};\n\t}\n\n\tcomponentDidMount() {\n\t\tdocument.addEventListener('mousedown', this.handleClickOutside);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tdocument.removeEventListener('mousedown', this.handleClickOutside);\n\t}\n\n\tsetWrapperRef(node) {\n\t\tthis.wrapperRef = node;\n\t}\n\n\thandleClickOutside(event) {\n\t\tif (this.wrapperRef && !this.wrapperRef.contains(event.target)) {\n\t\t\tif (\n\t\t\t\tthis.state.isDropdownOpen &&\n\t\t\t\t((this.props.isPortal && this.dropdownChildrenRef && !this.dropdownChildrenRef.current.contains(event.target)) || !this.props.isPortal)\n\t\t\t) {\n\t\t\t\tthis.toggleDropdown(false);\n\t\t\t}\n\t\t}\n\t}\n\n\ttoggleDropdown = isDropdownOpen => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisDropdownOpen: isDropdownOpen === false ? isDropdownOpen : !this.state.isDropdownOpen,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tif (this.props.isDropdownOpen) {\n\t\t\t\t\tthis.props.isDropdownOpen(isDropdownOpen === false ? isDropdownOpen : this.state.isDropdownOpen);\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t};\n\n\tonDropdownItemsClick = () => {\n\t\tif (this.props.closeDropdownOnItemClick) {\n\t\t\tthis.toggleDropdown(false);\n\t\t}\n\t};\n\n\tgetDropdownItems = style => {\n\t\treturn (\n\t\t\t
\n\t\t\t\t{this.props.isDropdownTitleVisible && (\n\t\t\t\t\t
\n\t\t\t\t\t\t

{this.props.dropdownInnerTitle}

\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tclose\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t)}\n\t\t\t\t{this.props.children}\n\t\t\t
\n\t\t);\n\t};\n\n\trender() {\n\t\tconst dropdownRefProperties = this.dropdownRef.current?.getBoundingClientRect();\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t{this.props.imageUrl && ddl-img}\n\t\t\t\t\t{this.props.title}\n\t\t\t\t\t{this.props.icon && {this.props.icon}}\n\t\t\t\t\n\t\t\t\t{this.props.isPortal &&\n\t\t\t\t\tthis.state.isDropdownOpen &&\n\t\t\t\t\tReactDOM.createPortal(\n\t\t\t\t\t\tthis.getDropdownItems({\n\t\t\t\t\t\t\tzIndex: 999999,\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\tright: window.innerWidth - dropdownRefProperties?.right,\n\t\t\t\t\t\t\t...(dropdownRefProperties.top < window.innerHeight / 2 && { top: dropdownRefProperties?.top }),\n\t\t\t\t\t\t\t...(dropdownRefProperties.top > window.innerHeight / 2 && { bottom: window.innerHeight - dropdownRefProperties?.bottom + 30 }),\n\t\t\t\t\t\t}),\n\t\t\t\t\t\tdocument.getElementById('portal-root')\n\t\t\t\t\t)}\n\t\t\t\t{!this.props.isPortal && this.getDropdownItems()}\n\t\t\t\n\t\t);\n\t}\n}\n\nexport default Dropdown;\n","import React from 'react';\n\nconst Form = props => (\n\t
\n\t\t

{props.title}

\n\t\t{props.children}\n\t
\n);\n\nexport default Form;\n","import React from 'react';\n\nconst HelloFeatureBlock = props => (\n\t
\n\t\t{props.icon}\n\t\t

{props.title}

\n\t\t\n\t\t\tinfo\n\t\t\n\t
\n);\n\nexport default HelloFeatureBlock;\n","import React from 'react';\nimport classNames from 'classnames/bind';\n\nconst Input = props => {\n\treturn (\n\t\t
\n\t\t\t

{props.label}

\n\t\t\t

{props.description}

\n\t\t\t{props.type && (\n\t\t\t\t\n\t\t\t)}\n\t\t\t{props.error}\n\t\t
\n\t);\n};\n\nexport default Input;\n","import React, { Component } from 'react';\nimport { If, Then, Else } from 'react-if';\nimport classNames from 'classnames/bind';\n\nconst ListGroups = props => {\n\tconst onListClick = (event, item) => {\n\t\tif (props.onItemClick) {\n\t\t\tprops.onItemClick(event, item);\n\t\t}\n\t};\n\n\tconst onScrollClick = (...args) => {\n\t\tif (props.onScroll) {\n\t\t\tprops.onScroll(...args);\n\t\t}\n\t};\n\n\treturn (\n\t\t {\n\t\t\t\tonScrollClick(e);\n\t\t\t}}>\n\t\t\t{props.lists.map((item, index) => (\n\t\t\t\t
  • \n\t\t\t\t\t\n\t\t\t\t\t\t{item.component}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t onListClick(e, item)}>\n\t\t\t\t\t\t\t\t{item.icon && {item.icon}}\n\t\t\t\t\t\t\t\t{item.title}\n\t\t\t\t\t\t\t\t{item.subLists && }\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
  • \n\t\t\t))}\n\t\t\n\t);\n};\n\nclass ListGroup extends Component {\n\trender() {\n\t\treturn ;\n\t}\n}\n\nexport default ListGroup;\n","import React, { Component } from 'react';\nimport Button from 'components/Button';\nimport classNames from 'classnames/bind';\nimport { If, Then, Else } from 'react-if';\nimport Loader from 'components/Loader';\n\nclass Modal extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.modalReference = React.createRef();\n\t}\n\n\tcomponentDidMount() {\n\t\tdocument.addEventListener('keydown', this.handleKeyPress);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tdocument.removeEventListener('keydown', this.handleKeyPress);\n\t}\n\n\thandleKeyPress = event => {\n\t\tif (event.key === 'Escape' && this.props.display === true) {\n\t\t\tthis.props.onModalClose();\n\t\t}\n\t};\n\n\thandleOutsideClick = event => {\n\t\tlet modalClass = `.${this.modalReference.current.classList[0]}`;\n\t\tif (!event.target.closest(modalClass)) {\n\t\t\tthis.props.onModalClose();\n\t\t}\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t this.handleOutsideClick(evt)}>\n\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t{this.props.children}\n\t\t\t\t\t
    \n\n\t\t\t\t\t{!this.props.hideCloseButton && (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tclose\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t\t{!this.props.hideActionButtons && (\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t{!this.props.hideCloseButton && (\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t{this.props.submitButtonText !== '' && (\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t)}\n\t\t\t\t
    \n\t\t\t\n\t\t);\n\t}\n}\n\nexport default Modal;\n","import React from 'react';\n\nconst Select = props => (\n\t
    \n\t\t

    {props.label}

    \n\t\t

    {props.description}

    \n\t\t\n\t\t{props.error}\n\t
    \n);\n\nexport default Select;\n","import React from 'react';\nimport Grid from 'components/Grid';\nimport Avatar from 'components/Avatar';\nimport { RTCPeerConnectionEnum } from 'constants/enums';\n\nconst ConnectionStatus = props => (\n\t
    \n\t\t\n\t\t\t
    \n\t\t\t\t\n\n\t\t\t\t{(props.peerConnectionState === RTCPeerConnectionEnum.CONNECTION_STATE.DISCONNECTED ||\n\t\t\t\t\tprops.peerConnectionState === RTCPeerConnectionEnum.CONNECTION_STATE.FAILED) && (\n\t\t\t\t\t

    \n\t\t\t\t\t\tPlease wait…attempting to reconnect to the network.\n\t\t\t\t\t

    \n\t\t\t\t)}\n\t\t\t
    \n\t\t
    \n\t
    \n);\n\nexport default ConnectionStatus;\n","import React from 'react';\nimport Grid from 'components/Grid';\n\nconst ActiveConference = () => (\n\t
    \n\t\t\n\t\t\t
    \n\t\t\t\t

    \n\t\t\t\t\tYou're already in a call or monitoring patients.
    \n\t\t\t\t\tPlease try again after you end that session.\n\t\t\t\t

    \n\t\t\t
    \n\t\t
    \n\t
    \n);\n\nexport default ActiveConference;\n","import React from 'react';\nimport Grid from 'components/Grid';\n\nconst AnotherNursePickedUp = () => (\n\t
    \n\t\t\n\t\t\t
    \n\t\t\t\t

    \n\t\t\t\t\tAnother nurse picked up this call.\n\t\t\t\t

    \n\t\t\t
    \n\t\t
    \n\t
    \n);\n\nexport default AnotherNursePickedUp;\n","import React from 'react';\n\nconst SkeletonLoader = props => (\n\t
    \n\t\t{[...Array(props.rows)].map((option, index) => (\n\t\t\t
    \n\t\t))}\n\t
    \n);\n\nexport default SkeletonLoader;\n","import React, { Component } from 'react';\nimport classNames from 'classnames/bind';\n\nclass SmallModal extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.setWrapperRef = this.setWrapperRef.bind(this);\n\t\tthis.handleClickOutside = this.handleClickOutside.bind(this);\n\t}\n\n\tcomponentDidMount() {\n\t\tdocument.addEventListener('mousedown', this.handleClickOutside);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tdocument.removeEventListener('mousedown', this.handleClickOutside);\n\t}\n\n\tsetWrapperRef(node) {\n\t\tthis.wrapperRef = node;\n\t}\n\n\thandleClickOutside(event) {\n\t\tif (this.wrapperRef && !this.wrapperRef.contains(event.target)) {\n\t\t\tthis.props.onModalClose();\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t
    \n\t\t\t\t
    {this.props.children}
    \n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default SmallModal;\n","import React from 'react';\nimport Grid from 'components/Grid';\nimport { StreamError } from 'constants/enums';\nimport { isMacintosh } from 'infrastructure/helpers/commonHelpers';\n\nconst StreamPermissions = props => (\n\t
    \n\t\t\n\t\t\t
    \n\t\t\t\t{props.reason.type === StreamError.PERMISSION_DISMISSED.type && (\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    Allow Banyan to use your microphone

    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t

    Banyan needs access to your microphone so patients can hear you. Check the top left of the screen and click Allow.

    \n\t\t\t\t\t
    \n\t\t\t\t)}\n\n\t\t\t\t{props.reason.type === StreamError.STREAM_NOT_ALLOWED.type && (\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    Turn on Microphone and Camera

    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t

    To make a call on Banyan, you need to allow permissions for microphone and camera.

    \n\t\t\t\t\t
    \n\t\t\t\t)}\n\n\t\t\t\t{props.reason.type === StreamError.DEVICE_NOT_FOUND.type && (\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    Device not found

    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t

    \n\t\t\t\t\t\t\tTo make a video call on Banyan, you need to turn on your camera. For\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\tan audio call, you need to turn on your microphone. Try again by refreshing\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\tthe page.\n\t\t\t\t\t\t

    \n\t\t\t\t\t
    \n\t\t\t\t)}\n\n\t\t\t\t{props.reason.type === StreamError.NOT_READABLE_ERROR.type && (\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    Device may be in use

    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t

    \n\t\t\t\t\t\t\tCamera or microphone may be in use by another application.\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\tPlease close the other application and refresh the page.\n\t\t\t\t\t\t

    \n\t\t\t\t\t
    \n\t\t\t\t)}\n\n\t\t\t\t{props.reason.type === StreamError.MICROPHONE_NOT_FOUND.type && (\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    Can’t find your microphone

    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t

    \n\t\t\t\t\t\t\tPlease check on your system if a mic has been plugged in and you have allowed mic permissions. If not, plug one in or allow permissions and\n\t\t\t\t\t\t\trestart your browser. Patients won’t be able to hear you until you do that.\n\t\t\t\t\t\t

    \n\t\t\t\t\t
    \n\t\t\t\t)}\n\n\t\t\t\t{props.reason.type === StreamError.CAMERA_BLOCKED.type && (\n\t\t\t\t\t
    \n\t\t\t\t\t\tCamera permission\n\t\t\t\t\t\t

    Your Camera is blocked

    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t• Click the Camera blocked icon on the top right of your screen\n\t\t\t\t\t\t\t
    • Allow access and refresh the page\n\t\t\t\t\t\t

    \n\t\t\t\t\t
    \n\t\t\t\t)}\n\n\t\t\t\t{props.reason.type === StreamError.MICROPHONE_BLOCKED.type && (\n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t

    Your Microphone is blocked

    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t• Click the Microphone blocked icon on the top right of your screen\n\t\t\t\t\t\t\t
    • Allow access and refresh the page\n\t\t\t\t\t\t

    \n\t\t\t\t\t
    \n\t\t\t\t)}\n\n\t\t\t\t{props.reason.type === StreamError.CAM_AND_MIC_BLOCKED.type && (\n\t\t\t\t\t
    \n\t\t\t\t\t\tMicrophone and camera permission\n\t\t\t\t\t\t

    Your Camera and Microphone are blocked

    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t• Click the camera blocked icon on the top right of your screen\n\t\t\t\t\t\t\t
    • Allow access and refresh the page\n\t\t\t\t\t\t

    \n\t\t\t\t\t
    \n\t\t\t\t)}\n\t\t\t
    \n\t\t
    \n\t
    \n);\n\nexport default StreamPermissions;\n","import React from 'react';\nimport Checkbox from 'components/Checkbox';\nimport Grid from 'components/Grid';\nimport SkeletonLoader from 'components/SkeletonLoader';\nimport { If, Then, Else } from 'react-if';\n\nconst Table = props => (\n\t
    \n\t\t
    {props.children}
    \n\t\t
    \n\t\t\t{props.isEditable ? : ''}\n\t\t\t{props.headers.map((header, index) => (\n\t\t\t\t
    {header.title}
    \n\t\t\t))}\n\t\t
    \n\t\t
    \n\t\t\t\n\t\t\t\t\n\t\t\t\t\t{props.rows.map((row, index) => (\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t{props.isEditable ? : ''}\n\t\t\t\t\t\t\t{Object.keys(row).map((key, index) => (\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    {row[key]}
    {' '}\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t
    \n\t\t\t\t\t))}\n\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{props.tableEmptyText || 'No data'}\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t
    \n\t
    \n);\n\nexport default Table;\n","import React, { Component } from 'react';\nimport classNames from 'classnames/bind';\n\nclass Tabs extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tcomponentIndex: null,\n\t\t\tlinks: this.props.links,\n\t\t};\n\t}\n\n\tcomponentDidMount() {\n\t\tconst componentIndex = this.state.links.findIndex(item => item.active);\n\t\tthis.setState({\n\t\t\tcomponentIndex,\n\t\t});\n\t}\n\n\tsetActiveComponent = componentIndex => {\n\t\tconst links = this.state.links.map((item, index) => {\n\t\t\tif (item.active) {\n\t\t\t\titem.active = false;\n\t\t\t}\n\n\t\t\tif (componentIndex === index) {\n\t\t\t\titem.active = true;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\t...item,\n\t\t\t\tactive: componentIndex === index,\n\t\t\t};\n\t\t});\n\n\t\tthis.setState({\n\t\t\tcomponentIndex: componentIndex,\n\t\t\tlinks,\n\t\t});\n\n\t\tif (this.props.onTabClick) {\n\t\t\tthis.props.onTabClick(componentIndex);\n\t\t}\n\t};\n\n\tonTabChange = index => {\n\t\tthis.setActiveComponent(index);\n\t\tif (this.props.onTabChange) {\n\t\t\tthis.props.onTabChange(index);\n\t\t}\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t
    \n\t\t\t\t
      \n\t\t\t\t\t{this.state.links.map((tab, index) => (\n\t\t\t\t\t\t
    • this.onTabChange(index)}>\n\t\t\t\t\t\t\t{tab.link}\n\t\t\t\t\t\t
    • \n\t\t\t\t\t))}\n\t\t\t\t
    \n\t\t\t\t{this.props.components && this.props.components[this.state.componentIndex]}\n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default Tabs;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { CameraTiltDirection, ZoomDirection, CameraType, CameraZoomLevels, CameraTiltAction } from 'constants/enums';\nimport classNames from 'classnames/bind';\n\nclass Tilt extends Component {\n\tpreviousTiltAction;\n\n\tisMouseDown = false;\n\n\tsendTiltEvent = (direction, action) => {\n\t\tif (\n\t\t\tthis.props.disabled ||\n\t\t\t(this.props.cameraType === CameraType.HELLO && this.props.disabledDirections[direction]) ||\n\t\t\t(this.previousTiltAction === CameraTiltAction.STOP && action === CameraTiltAction.STOP)\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.props.tiltHandler(direction, action);\n\t\tthis.previousTiltAction = action;\n\t};\n\n\tonMouseDown = (direction, action) => {\n\t\tthis.isMouseDown = true;\n\t\tthis.sendTiltEvent(direction, action);\n\t};\n\n\tonMouseUp = (direction, action) => {\n\t\tthis.isMouseDown = false;\n\t\tthis.sendTiltEvent(direction, action);\n\t};\n\n\tonMouseOut = (direction, action) => {\n\t\tif (this.isMouseDown) {\n\t\t\tthis.sendTiltEvent(direction, action);\n\t\t}\n\t};\n\n\trender() {\n\t\tconst zoomUpperLimit = this.props.cameraType === CameraType.HELLO ? CameraZoomLevels.HELLO_MAX : CameraZoomLevels.HUDDLE_MAX;\n\t\treturn (\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tthis.onMouseDown(CameraTiltDirection.UP, CameraTiltAction.START);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tonMouseUp={() => {\n\t\t\t\t\t\t\t\tthis.onMouseUp(CameraTiltDirection.UP, CameraTiltAction.STOP);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tonMouseOut={() => {\n\t\t\t\t\t\t\t\tthis.onMouseOut(CameraTiltDirection.UP, CameraTiltAction.STOP);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tonBlur={() => {}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tthis.onMouseDown(CameraTiltDirection.RIGHT, CameraTiltAction.START);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tonMouseUp={() => {\n\t\t\t\t\t\t\t\tthis.onMouseUp(CameraTiltDirection.RIGHT, CameraTiltAction.STOP);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tonMouseOut={() => {\n\t\t\t\t\t\t\t\tthis.onMouseOut(CameraTiltDirection.RIGHT, CameraTiltAction.STOP);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tonBlur={() => {}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tthis.onMouseDown(CameraTiltDirection.LEFT, CameraTiltAction.START);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tonMouseUp={() => {\n\t\t\t\t\t\t\t\tthis.onMouseUp(CameraTiltDirection.LEFT, CameraTiltAction.STOP);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tonMouseOut={() => {\n\t\t\t\t\t\t\t\tthis.onMouseOut(CameraTiltDirection.LEFT, CameraTiltAction.STOP);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tonBlur={() => {}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tthis.onMouseDown(CameraTiltDirection.DOWN, CameraTiltAction.START);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tonMouseUp={() => {\n\t\t\t\t\t\t\t\tthis.onMouseUp(CameraTiltDirection.DOWN, CameraTiltAction.STOP);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tonMouseOut={() => {\n\t\t\t\t\t\t\t\tthis.onMouseOut(CameraTiltDirection.DOWN, CameraTiltAction.STOP);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tonBlur={() => {}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t{this.props.cameraType === CameraType.HUDDLE && (\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\trefresh\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t {\n\t\t\t\t\t\t\tif (this.props.cameraZoomLevel === 0 || this.props.disabled) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tthis.props.updateZoomLevel(ZoomDirection.DECREASE);\n\t\t\t\t\t\t}}>\n\t\t\t\t\t\tremove\n\t\t\t\t\t\n\t\t\t\t\t

    Zoom {this.props.cameraZoomLevel !== 0 ? `x${this.props.cameraZoomLevel / 20}` : ''}

    \n\t\t\t\t\t {\n\t\t\t\t\t\t\tif (this.props.cameraZoomLevel === zoomUpperLimit || this.props.disabled) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tthis.props.updateZoomLevel(ZoomDirection.INCREASE);\n\t\t\t\t\t\t}}>\n\t\t\t\t\t\tadd\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t
    \n\t\t);\n\t}\n}\n\nTilt.defaultProps = {\n\tdisabledDirections: {},\n};\n\nTilt.propTypes = {\n\ttiltHandler: PropTypes.func,\n\tcameraZoomLevel: PropTypes.number,\n\tcameraType: PropTypes.string,\n\tupdateZoomLevel: PropTypes.func,\n\tdisabled: PropTypes.bool,\n};\n\nexport default Tilt;\n","import React, { Component } from 'react';\nimport classNames from 'classnames/bind';\nimport PropTypes from 'prop-types';\n\nconst Toggle = props => {\n\treturn (\n\t\t\n\t);\n};\n\nToggle.propTypes = {\n\ttoggleOnText: PropTypes.string,\n\ttoggleOffText: PropTypes.string,\n\ttoggledOn: PropTypes.bool,\n\tclassName: PropTypes.string,\n\tonToggle: PropTypes.func,\n\tdisabled: PropTypes.bool,\n};\nexport default Toggle;\n","import React, { Component } from 'react';\nimport Avatar from 'components/Avatar';\n\nclass TopParticipant extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.videoRef = null;\n\t\tthis.videoSrcObjectHandler = this.videoSrcObjectHandler.bind(this);\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.videoSrcObjectHandler();\n\t}\n\n\tcomponentDidUpdate(prevProps) {\n\t\tconst streamHasChanged =\n\t\t\tprevProps.topParticipantFeed && this.props.topParticipantFeed && prevProps.topParticipantFeed.id !== this.props.topParticipantFeed.id;\n\n\t\tif (streamHasChanged || (this.videoRef && this.videoRef.srcObject == null)) {\n\t\t\tthis.videoSrcObjectHandler();\n\t\t}\n\t}\n\n\tvideoSrcObjectHandler() {\n\t\tif (this.videoRef) {\n\t\t\tthis.videoRef.srcObject = this.props.topParticipantFeed.mediaStream;\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t
    \n\t\t\t\t{this.props.topParticipantFeed && this.props.isTopParticipantVideoActive ? (\n\t\t\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default TopParticipant;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Avatar from 'components/Avatar';\n\nclass Participant extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.videoRef = null;\n\t\tthis.videoSrcObjectHandler = this.videoSrcObjectHandler.bind(this);\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.videoSrcObjectHandler();\n\t}\n\n\tcomponentDidUpdate(prevProps) {\n\t\tif (prevProps.videoCamActive !== this.props.videoCamActive || prevProps.participantFeed.id !== this.props.participantFeed.id) {\n\t\t\tthis.videoSrcObjectHandler();\n\t\t}\n\t}\n\n\tvideoSrcObjectHandler() {\n\t\tif (this.videoRef) {\n\t\t\tthis.videoRef.srcObject = this.props.participantFeed.mediaStream;\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t

    {this.props.name}

    \n\t\t\t\t\t
    {this.props.children}
    \n\t\t\t\t
    \n\t\t\t\t
    this.props.onClick(this.props.participantFeed.id)}>\n\t\t\t\t\t{this.props.participantFeed && this.props.videoCamActive ? (\n\t\t\t\t\t\t
    \n\t\t\t
    \n\t\t);\n\t}\n}\n\nParticipant.propTypes = {\n\taudioMute: PropTypes.bool,\n\tvideoCamActive: PropTypes.bool,\n\tparticipantFeed: PropTypes.object,\n\tonClick: PropTypes.func,\n\tname: PropTypes.string,\n\tchildren: PropTypes.node,\n\tparticipantAvatar: PropTypes.string,\n};\n\nexport default Participant;\n","import React from 'react';\n\nexport const SocketContext = React.createContext({});\n","import React, { Component, useRef, useState, useEffect } from 'react';\nimport { Link } from 'react-router-dom';\nimport { If, Then, Else } from 'react-if';\nimport classNames from 'classnames/bind';\nimport { SectorTypes, CallTypes } from 'constants/enums';\nimport { SocketContext } from 'io-client/SocketContext';\nimport { treeSectorNameMaxCharacters } from 'constants/global-variables';\n\nlet sectors = {\n\thospital: {\n\t\tsubtype: 'department',\n\t\ticon: 'account_balance',\n\t},\n\tdepartment: {\n\t\tsubtype: 'floor',\n\t\ticon: 'money',\n\t},\n\tfloor: {\n\t\tsubtype: 'room',\n\t\ticon: 'meeting_room',\n\t},\n};\n\nconst OptionName = props => {\n\tconst { option } = props;\n\tconst [tooltipStyle, setTooltipStyle] = useState(null);\n\tconst roomStatusRef = useRef(null);\n\tconst toggleTooltip = show => {\n\t\tconst roomStatusEl = roomStatusRef.current?.getBoundingClientRect();\n\t\tif (show && roomStatusEl) {\n\t\t\tsetTooltipStyle({\n\t\t\t\tdisplay: 'block',\n\t\t\t\ttop: roomStatusEl.top,\n\t\t\t\tleft: roomStatusEl.left,\n\t\t\t});\n\t\t} else {\n\t\t\tsetTooltipStyle(null);\n\t\t}\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t{option.name}\n\t\t\t{option.helloDeviceId && fiber_manual_record}\n\t\t\t{option.helloDeviceId && option.deviceBusy && (\n\t\t\t\t<>\n\t\t\t\t\t toggleTooltip(true)}\n\t\t\t\t\t\tonMouseLeave={() => toggleTooltip(false)}\n\t\t\t\t\t\tclassName={classNames('material-icons-round', 'room-status', 'on-call')}>\n\t\t\t\t\t\tfiber_manual_record\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{props.getDeviceBeingUsedMessage(option)}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t)}\n\t\t\n\t);\n};\n\nconst OptionsList = ({\n\toptions,\n\texpandedOptions,\n\tonChange,\n\tonAdd,\n\tonLinkClick,\n\tonAddDevice,\n\tisMonitoring,\n\tselectedSectorId,\n\tsetSelectedId,\n\texpandAll,\n\tonSendCheckDeviceActiveConferences,\n}) => {\n\tconst findProperId = item => {\n\t\tlet prefix = item.type;\n\t\treturn item[`${prefix}Id`];\n\t};\n\n\tconst childrenHidden = option => {\n\t\treturn option.subOptions.every(item => item.hidden === true);\n\t};\n\n\tconst childrenMatchSearch = option => {\n\t\treturn option.subOptions.some(item => item.matchesSearch === true);\n\t};\n\n\tconst toggleOptions = option => {\n\t\tif ((childrenHidden(option) && !childrenMatchSearch(option)) || !childrenMatchSearch(option)) {\n\t\t\toption.subOptions.forEach(item => {\n\t\t\t\titem.hidden = !item.hidden;\n\t\t\t});\n\t\t} else {\n\t\t\toption.subOptions\n\t\t\t\t.filter(i => i.matchesSearch)\n\t\t\t\t.forEach(item => {\n\t\t\t\t\titem.hidden = !item.hidden;\n\t\t\t\t});\n\t\t}\n\t};\n\n\tconst toggleExpand = (selectedOptionId, isAddingSection, option) => {\n\t\tif (expandedOptions[selectedOptionId] && !isAddingSection) {\n\t\t\tdelete expandedOptions[selectedOptionId];\n\t\t} else {\n\t\t\texpandedOptions[selectedOptionId] = {};\n\t\t}\n\t\tif (expandAll) {\n\t\t\ttoggleOptions(option);\n\t\t}\n\t\tonChange(expandedOptions);\n\t};\n\n\tconst addNewOptionClick = selection => {\n\t\tif (selection.type === SectorTypes.ROOM) {\n\t\t\tonAddDevice(selection);\n\t\t\treturn;\n\t\t}\n\n\t\tselection.subOptions.push({\n\t\t\t...selection,\n\t\t\ticon: sectors[selection.type].icon,\n\t\t\ttype: sectors[selection.type].subtype,\n\t\t\tisNewOption: true,\n\t\t\tsubOptions: [],\n\t\t});\n\t\thandleSubOptionsListChange();\n\t\ttoggleExpand(findProperId(selection), true, selection);\n\t};\n\n\tconst addNewOptionOnEnter = (event, selection) => {\n\t\tif (event.which === 13) {\n\t\t\tif (event.target.value.length > treeSectorNameMaxCharacters) {\n\t\t\t\tselection.error = `Cannot add ${selection.type} with more than ${treeSectorNameMaxCharacters} characters`;\n\t\t\t\ttoggleExpand(findProperId(selection), false, selection);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tselection.name = event.target.value;\n\t\t\thandleSubOptionsListChange();\n\t\t\tonAdd(selection);\n\t\t}\n\t};\n\n\tconst handleSubOptionsListChange = (optionId, subSelections) => {\n\t\texpandedOptions[optionId] = subSelections;\n\t\tonChange(expandedOptions);\n\t};\n\n\tconst selectOption = (event, option) => {\n\t\tsetSelectedId(option[`${option.type}Id`]);\n\t\toption.isSelected = true;\n\t\tif (onLinkClick) {\n\t\t\tonLinkClick(option, event);\n\t\t}\n\t\ttoggleExpand(findProperId(option), true, option);\n\t};\n\n\tconst checkDeviceActiveConferences = async option => {\n\t\tif (!option.helloDeviceId || !option.deviceBusy || (option.activeConferences && option.activeConferences.length > 0)) {\n\t\t\treturn;\n\t\t}\n\n\t\tonSendCheckDeviceActiveConferences(+option.helloDeviceId);\n\t};\n\n\tconst getDeviceBeingUsedMessage = option => {\n\t\tconst { helloDeviceId, activeConferences } = option;\n\t\tif (!helloDeviceId || !activeConferences || !activeConferences.length) {\n\t\t\treturn null;\n\t\t}\n\n\t\tlet message = '';\n\t\tif (activeConferences.length === 1) {\n\t\t\tconst [conference] = activeConferences;\n\t\t\tif (conference.callType === CallTypes.MONITORING) {\n\t\t\t\tmessage = 'Device being used by Virtual Sitter';\n\t\t\t} else if (!conference.isInvitedByHost) {\n\t\t\t\tmessage = 'Patient is calling VCP';\n\t\t\t} else {\n\t\t\t\tmessage = 'Device being used by Virtual Care Provider';\n\t\t\t}\n\t\t} else if (activeConferences.some(conference => !conference.isInvitedByHost)) {\n\t\t\tmessage = 'Device being used by Virtual Sitter and patient is calling VCP';\n\t\t} else {\n\t\t\tmessage = 'Device being used by Virtual Care Provider and Virtual Sitter';\n\t\t}\n\n\t\treturn message;\n\t};\n\n\tconst addSectorTooltip = option => {\n\t\tif (isMonitoring && option.activeConferences && option.activeConferences.some(conference => conference.callType === CallTypes.MONITORING)) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn option.tooltip;\n\t};\n\n\treturn (\n\t\t
    \n\t\t\t{options.map((option, index) => (\n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t{option.icon}\n\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\taddNewOptionOnEnter(event, option);\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\ttype='text'\n\t\t\t\t\t\t\t\t\t\t\tplaceholder={`Add ${option.type}`}\n\t\t\t\t\t\t\t\t\t\t\tautoFocus\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t

    {option.error}

    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    checkDeviceActiveConferences(option)} onFocus={() => {}}>\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\ttoggleExpand(findProperId(option), false, option);\n\t\t\t\t\t\t\t\t\t\t}}>\n\t\t\t\t\t\t\t\t\t\t{expandedOptions[findProperId(option)] || (expandAll && !childrenHidden(option)) ? 'keyboard_arrow_down' : 'keyboard_arrow_right'}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t{option.icon}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\t\tselectOption(event, option);\n\t\t\t\t\t\t\t\t\t\t\t\t}}>\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\t\tselectOption(event, option);\n\t\t\t\t\t\t\t\t\t\t\t\t}}>\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t{option.tooltip && !option.isCreatingSector && (\n\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\taddNewOptionClick(option);\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\tdata-tooltip={addSectorTooltip(option)}\n\t\t\t\t\t\t\t\t\t\t\tdata-position='left'>\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t{option.customActionIcon ? option.customActionIcon.icon : 'add_box'}{' '}\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t{option.subOptions && expandAll && (\n\t\t\t\t\t\t handleSubOptionsListChange(findProperId(option), subSelections)}\n\t\t\t\t\t\t\tonAdd={onAdd}\n\t\t\t\t\t\t\tonLinkClick={onLinkClick}\n\t\t\t\t\t\t\tonAddDevice={onAddDevice}\n\t\t\t\t\t\t\tisMonitoring={isMonitoring}\n\t\t\t\t\t\t\tselectedSectorId={selectedSectorId}\n\t\t\t\t\t\t\tsetSelectedId={setSelectedId}\n\t\t\t\t\t\t\texpandAll={expandAll}\n\t\t\t\t\t\t\tonSendCheckDeviceActiveConferences={onSendCheckDeviceActiveConferences}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t\t{option.subOptions && expandedOptions[findProperId(option)] && !expandAll && (\n\t\t\t\t\t\t handleSubOptionsListChange(findProperId(option), subSelections)}\n\t\t\t\t\t\t\tonAdd={onAdd}\n\t\t\t\t\t\t\tonLinkClick={onLinkClick}\n\t\t\t\t\t\t\tonAddDevice={onAddDevice}\n\t\t\t\t\t\t\tisMonitoring={isMonitoring}\n\t\t\t\t\t\t\tselectedSectorId={selectedSectorId}\n\t\t\t\t\t\t\tsetSelectedId={setSelectedId}\n\t\t\t\t\t\t\texpandAll={expandAll}\n\t\t\t\t\t\t\tonSendCheckDeviceActiveConferences={onSendCheckDeviceActiveConferences}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t
    \n\t\t\t))}\n\t\t\n\t);\n};\n\nclass TreeView extends Component {\n\tstate = {\n\t\tselectedSectorId: this.props.selectedSectorId,\n\t\texpandedOptions: this.props.preSelected ? this.props.preSelected : {},\n\t};\n\n\tsetSelectedId = sectorId => {\n\t\tthis.setState({ selectedSectorId: sectorId });\n\t};\n\n\trender() {\n\t\tlet { selectedSectorId, expandedOptions } = this.state;\n\t\treturn (\n\t\t\t this.setState({ expandedOptions })}\n\t\t\t\texpandedOptions={this.state.expandedOptions}\n\t\t\t\tisMonitoring={this.props.isMonitoring}\n\t\t\t\tselectedSectorId={selectedSectorId}\n\t\t\t\tsetSelectedId={this.setSelectedId}\n\t\t\t\texpandAll={this.props.expandAll}\n\t\t\t\tonSendCheckDeviceActiveConferences={this.props.onSendCheckDeviceActiveConferences}\n\t\t\t/>\n\t\t);\n\t}\n}\n\nTreeView.contextType = SocketContext;\nexport default TreeView;\n","const SocketEvents = {\n\tClient: {\n\t\tAUTHORIZE: 'client.authorize',\n\t\tUPDATE_USER_PRESENCE: 'client.updateUserPresence',\n\t\tPING: 'client.ping',\n\n\t\t// subscribers\n\t\tON_USER_ONLINE: 'client.userOnline',\n\t\tON_USER_OFFLINE: 'client.userOffline',\n\t\tON_AUTHENTICATED: 'client.authenticated',\n\t\tON_UNAUTHORIZED: 'client.unauthorized',\n\t\tON_CONNECT: 'connect',\n\t\tON_CONNECT_FAILED: 'connect_failed',\n\t\tON_RECONNECT: 'reconnect',\n\t\tON_RECONNECTING: 'reconnecting',\n\t\tON_DISCONNECT: 'disconnect',\n\t\tON_DEVICE_ONLINE: 'client.deviceOnline',\n\t\tON_DEVICE_OFFLINE: 'client.deviceOffline',\n\t\tON_UPDATED_USER_PRESENCE: 'client.updatedUserPresence',\n\t\tON_NOTIFY_UPDATED_USER_PRESENCE: 'client.notifyUpdatedUserPresence',\n\t},\n\tConference: {\n\t\tSTART: 'conference.start',\n\t\tJOIN: 'conference.join',\n\t\tLEAVE: 'conference.leave',\n\t\tEND: 'conference.end',\n\t\tTOGGLE_STREAMS: 'conference.toggleStreams',\n\t\tAUDIO_TRACK_TOGGLED: 'conference.audioTrackToggled',\n\t\tERROR: 'conference.error',\n\t\tSEND_OFFER: 'conference.sendOffer',\n\t\tSEND_ANSWER: 'conference.sendAnswer',\n\t\tSEND_ICE_CANDIDATE: 'conference.sendIceCandidate',\n\t\tNOT_ANSWERING: 'conference.notAnswering',\n\t\tCLOSING_CLIENT: 'conference.closingClient',\n\t\tDECLINE: 'conference.decline',\n\t\tBROWSER_NOT_SUPPORTED: 'conference.browserNotSupported',\n\t\tSDP: 'conference.sdp',\n\t\tTRACK_TOGGLE: 'conference.toggleParticipantTrack',\n\t\tTRACKS_ADDED: 'conference.tracks.added',\n\t\tTRACKS_REMOVED: 'conference.tracks.removed',\n\t\tUA: 'conference.ua',\n\t\tDATA_RECEIVED: 'conference.data.received',\n\t\tCLOSED: 'conference.closed',\n\t\tHELLODEVICE_LEAVE: 'conference.helloDevice.leave',\n\t\tINVITE_PARTICIPANTS: 'conference.inviteParticipants',\n\t\tREMOVE_PARTICIPANT: 'conference.removeParticipant',\n\t\tPARTICIPANT_RECONNECT: 'conference.participantReconnect',\n\t\tPARTICIAPNT_CHANGE_BITRATE: 'conference.requestToChangeBitrate',\n\t\tPEER_CONNECTION_STATE_CHANGED: 'conference.peerConnectionStateChanged',\n\t\tICE_GATHERING_STATE_CHANGED: 'conference.iceGatheringStateChanged',\n\t\tICE_CONNECTION_STATE_CHANGED: 'conference.iceConnectionStateChanged',\n\t\tLOG: 'conference.log',\n\t\tTERMINATE_REQUEST: 'conference.terminateRequest',\n\t\tTERMINATE_REQUEST_ACCEPT: 'conference.terminateRequest.accept',\n\t\tTERMINATE_REQUEST_CANCEL: 'conference.terminateRequest.cancel',\n\t\tFORCE_TERIMATE: 'conference.forceTerminate',\n\t\tPARTICIPANT_FORCE_TERMINATE: 'conference.participantForceTerminate',\n\t\tALERT_PATIENT_AT_RISK: 'conference.helloDevice.alertPatientAtRisk',\n\t\tALERT_PATIENT_AT_RISK_RESPONSE: 'conference.helloDevice.alertPatientAtRisk.response',\n\n\t\t// subscribers\n\t\tON_PARTICIPANT_NOT_ANSWERING: 'conference.participantNotAnswering',\n\t\tON_PARTICIPANT_DECLINED: 'conference.participantDeclined',\n\t\tON_PARTICIPANT_LEFT: 'conference.participantLeft',\n\t\tON_PARTICIPANT_STREAMS_TOGGLED: 'conference.participantStreamsToggled',\n\t\tON_NEW_ANSWER: 'conference.newAnswer',\n\t\tON_NEW_OFFER: 'conference.newOffer',\n\t\tON_NEW_ICE_CANDIDATE: 'conference.newIceCandidate',\n\t\tON_NEW_PARTICIPANT: 'conference.newParticipant',\n\t\tON_REMOVE_SCREENSHARE_PEER: 'conference.helloDevice.removeScreenSharePeer',\n\t\tON_RINGING: 'conference.ringing',\n\t\tON_INCOMING: 'conference.incoming',\n\t\tON_PARTICIPANT_OFFLINE: 'conference.participantOffline',\n\t\tON_PARTICIPANT_BUSY: 'conference.participantBusy',\n\t\tON_INITIATOR_LEFT: 'conference.initiatorLeft',\n\t\tON_UPDATE_PARTICIPANTS: 'conference.updateParticipants',\n\t\tON_MISSED_CALL: 'conference.missedCall',\n\t\tON_DEVICE_CONTROLS_LOCKED: 'conference.deviceControlsLocked',\n\t\tON_ENDED: 'conference.ended',\n\t\tON_ANSWERED_ELSEWHERE: 'conference.answeredElsewhere',\n\t\tON_PARTICIPANT_REMOVED: 'conference.participantRemoved',\n\t\tON_TRANSFERRED_TO_ANOTHER_CLIENT: 'conference.transferredToAnotherClient',\n\t\tON_TERMINATE_REQUEST: 'conference.newTerminateRequest',\n\t\tON_TERMINATE_REQUEST_ACCEPTED: 'conference.terminateRequest.accepted',\n\t},\n\tHelloDevice: {\n\t\tMOVE_CAMERA: 'helloDevice.moveCamera',\n\t\tZOOM_CAMERA: 'helloDevice.zoomCamera',\n\t\tSWITCH_CAMERA: 'helloDevice.switchCamera',\n\t\tCOMMAND: 'helloDevice.command',\n\t\tDATA_CHANNEL_OFFER: 'helloDevice.dataChannelOffer',\n\t\tDATA_CHANNEL_ANSWER: 'helloDevice.dataChannelAnswer',\n\t\tNEW_ICE_CANDIDATE: 'helloDevice.newIceCandidate',\n\t\tSEND_ICE_CANDIDATE: 'helloDevice.sendIceCandidate',\n\t\tSTOP_PEER_CONNECTION: 'helloDevice.stopPeerConnection',\n\t\tTOGGLE_NIGHTVISION: 'helloDevice.toggleNightVision',\n\t\tCHECK_DEVICE_IN_CONFERENCE: 'helloDevice.checkDeviceInConferences',\n\n\t\t// subscribers\n\t\tON_CALL_STATE_CHANGED: 'helloDevice.callStateChange',\n\t\tON_TOGGLE_TV: 'helloDevice.toggleTv',\n\t\tON_OFFLINE: 'helloDevice.offline',\n\t\tON_BUSY: 'helloDevice.busy',\n\t\tON_CAMERA_RESPONSE: 'helloDevice.cameraEventResponse',\n\t\tON_INITIAL_STATE: 'helloDevice.initialState',\n\t\tON_UPDATE: 'helloDevice.updateName',\n\t\tON_TV_RESPONSE: 'helloDevice.tvEventResponse',\n\t\tON_AUDIO_OUTPUT_DEVICE: 'helloDevice.audioOutputDevice',\n\t},\n\tUser: {\n\t\tNOTIFICATIONS_UPDATED: 'user.notificationsUpdated',\n\t\tON_PASSWORD_CHANGED: 'user.passwordChanged',\n\t},\n};\n\nexport default SocketEvents;\n","import React, { Component } from 'react';\nimport { DeviceCommands, AudioOutputDevice } from 'constants/enums';\nimport SocketEvents from 'constants/socket-events';\nimport { SocketContext } from 'io-client/SocketContext';\nimport CallButton from 'components/CallButton';\nimport ListGroup from 'components/ListGroup';\n\nclass AudioOutputs extends Component {\n\tconstructor(props, socket) {\n\t\tsuper(props);\n\t\tthis.socket = socket;\n\t\tthis.audioOutputDeviceButtons = [\n\t\t\t{\n\t\t\t\ttitle: 'Banyan Bridge',\n\t\t\t\ticon: 'radio_button_unchecked',\n\t\t\t\taudioOutputDevice: AudioOutputDevice.HELLO,\n\t\t\t},\n\t\t\t{\n\t\t\t\ttitle: 'Pillow Speaker',\n\t\t\t\ticon: 'tv',\n\t\t\t\taudioOutputDevice: AudioOutputDevice.TV,\n\t\t\t},\n\t\t];\n\t}\n\n\tchangeAudioOutput = (event, item) => {\n\t\tconst { helloDeviceId, participantId, conferenceId } = this.props;\n\t\tconst dynamicData = JSON.stringify({ audioOutputDevice: item.audioOutputDevice });\n\t\tthis.socket.emit(SocketEvents.HelloDevice.COMMAND, {\n\t\t\tcommand: DeviceCommands.SWITCH_AUDIO_OUTPUT,\n\t\t\thelloDeviceId,\n\t\t\tconferenceId,\n\t\t\tparticipantId,\n\t\t\tdynamicData,\n\t\t});\n\t};\n\n\trender() {\n\t\tconst callButtonIcon = this.props.selectedAudioOutputDevice === AudioOutputDevice.HELLO ? 'radio_button_unchecked' : 'tv';\n\t\treturn (\n\t\t\t {}} tooltip='Audio Output' tooltipPosition='top' isDisabled={this.props.isDisabled}>\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n\nAudioOutputs.contextType = SocketContext;\nexport default AudioOutputs;\n","import React, { Component } from 'react';\nimport CallButton from 'components/CallButton';\nimport ListGroup from 'components/ListGroup';\nimport AudioOutputs from 'components/AudioOutputs';\nimport { SerialTVCommands, TvBrands, TvControlsEnums } from 'constants/enums';\nimport { SocketContext } from 'io-client/SocketContext';\nimport Alert from 'components/Alert';\n\nexport class TvControls extends Component {\n\tconstructor(props, context) {\n\t\tsuper(props, context);\n\n\t\tthis.state = {\n\t\t\tprevVolumeRange: 0,\n\t\t\tvolumeRange: this.props.tvBrand === 0 ? 1 : 0,\n\t\t\tpowerTv: false,\n\t\t\tpowerToolTip: \"Toggle patient's TV power off\",\n\t\t\thdmiIcon: 'looks_one',\n\t\t\tdeviceId: 0,\n\t\t};\n\n\t\tthis.callManager = props.callManagerInstance;\n\n\t\tthis.hdmiTypeButtons = [\n\t\t\t{\n\t\t\t\ttitle: \"Toggle patient's TV to HDMI1\",\n\t\t\t\ticon: 'looks_one',\n\t\t\t\thdmiType: SerialTVCommands.HDMI.SWITCH_HDMI1,\n\t\t\t},\n\t\t\t{\n\t\t\t\ttitle: \"Toggle patient's TV to HDMI2\",\n\t\t\t\ticon: 'looks_two',\n\t\t\t\thdmiType: SerialTVCommands.HDMI.SWITCH_HDMI2,\n\t\t\t},\n\t\t\t{\n\t\t\t\ttitle: \"Toggle patient's TV to HDMI3\",\n\t\t\t\ticon: 'looks_3',\n\t\t\t\thdmiType: SerialTVCommands.HDMI.SWITCH_HDMI3,\n\t\t\t},\n\t\t];\n\t}\n\n\tcomponentDidMount() {\n\t\tif (this.props.hdmiStatus) {\n\t\t\tthis.tvCommandsResponseListener(this.props.hdmiStatus);\n\t\t}\n\n\t\tif (this.props.tvStatus) {\n\t\t\tthis.tvCommandsResponseListener(this.props.tvStatus);\n\t\t}\n\n\t\tif (this.props.volumeStatus) {\n\t\t\tthis.tvCommandsResponseListener(this.props.volumeStatus);\n\t\t}\n\t\tthis.setState({ deviceId: this.props.helloDeviceId });\n\t}\n\n\tcomponentDidUpdate(prevProps) {\n\t\tif (JSON.stringify(this.props.tvStatus) !== JSON.stringify(prevProps.tvStatus)) {\n\t\t\tthis.tvCommandsResponseListener(this.props.tvStatus);\n\t\t}\n\n\t\tif (JSON.stringify(this.props.hdmiStatus) !== JSON.stringify(prevProps.hdmiStatus)) {\n\t\t\tthis.tvCommandsResponseListener(this.props.hdmiStatus);\n\t\t}\n\n\t\tif (JSON.stringify(this.props.volumeStatus) !== JSON.stringify(prevProps.volumeStatus)) {\n\t\t\tthis.tvCommandsResponseListener(this.props.volumeStatus);\n\t\t}\n\t}\n\n\tserialCommandsTv = async (commandType, volumeRange) => {\n\t\tswitch (commandType) {\n\t\t\tcase TvControlsEnums.POWER: {\n\t\t\t\tlet tvPowerStatus = this.state.powerTv ? SerialTVCommands.POWER.POWER_OFF : SerialTVCommands.POWER.POWER_ON;\n\t\t\t\tawait this.callManager.serialCommandsTv(tvPowerStatus, false, this.state.deviceId, this.props.conferenceId, this.props.participantId);\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase TvControlsEnums.VOLUME: {\n\t\t\t\tthis.setState({\n\t\t\t\t\tvolumeRange: +volumeRange,\n\t\t\t\t});\n\n\t\t\t\tif (this.volumeTimeout) {\n\t\t\t\t\tclearTimeout(this.volumeTimeout);\n\t\t\t\t}\n\t\t\t\t// Delays this function call when we adjust the volume to prevent sending many requests\n\t\t\t\tthis.volumeTimeout = setTimeout(() => {\n\t\t\t\t\tthis.callManager.serialCommandsTv(this.state.volumeRange, true, this.state.deviceId, this.props.conferenceId, this.props.participantId);\n\t\t\t\t}, 1000);\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t};\n\n\tchangeVolume = increaseVolume => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tvolumeRange: increaseVolume ? 1 : 0,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.serialCommandsTv(TvControlsEnums.VOLUME, this.state.volumeRange);\n\t\t\t}\n\t\t);\n\t};\n\n\tonHdmiTypeChanged = async (event, item) => {\n\t\tawait this.callManager.serialCommandsTv(\n\t\t\titem.hdmiType || SerialTVCommands.HDMI.SWITCH_HDMI1,\n\t\t\tfalse,\n\t\t\tthis.state.deviceId,\n\t\t\tthis.props.conferenceId,\n\t\t\tthis.props.participantId\n\t\t);\n\t};\n\n\ttvCommandsResponseListener = data => {\n\t\tif (data.isSuccessful) {\n\t\t\tif (!data.tvState.isVolume) {\n\t\t\t\tswitch (data.tvState.tvStatus) {\n\t\t\t\t\tcase SerialTVCommands.INITIAL_TV_POWER: {\n\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\tpowerTv: true,\n\t\t\t\t\t\t\tpowerToolTip: \"Toggle patient's TV power off\",\n\t\t\t\t\t\t});\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcase SerialTVCommands.POWER.POWER_OFF:\n\t\t\t\t\tcase SerialTVCommands.POWER.POWER_ON: {\n\t\t\t\t\t\tconst tvPowerStatus = data.tvState.tvStatus !== SerialTVCommands.POWER.POWER_OFF;\n\t\t\t\t\t\tconst powerToolTip = tvPowerStatus === false ? \"Toggle patient's TV power on\" : \"Toggle patient's TV power off\";\n\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\tpowerTv: tvPowerStatus,\n\t\t\t\t\t\t\tpowerToolTip: powerToolTip,\n\t\t\t\t\t\t});\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcase SerialTVCommands.HDMI.SWITCH_HDMI1:\n\t\t\t\t\tcase SerialTVCommands.HDMI.SWITCH_HDMI2:\n\t\t\t\t\tcase SerialTVCommands.HDMI.SWITCH_HDMI3: {\n\t\t\t\t\t\tconst hdmiTypeIcon = this.hdmiTypeButtons.find(item => item.hdmiType === data.tvState.tvStatus).icon;\n\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\thdmiIcon: hdmiTypeIcon,\n\t\t\t\t\t\t});\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.setState({\n\t\t\t\t\tvolumeRange: data.tvState.tvStatus,\n\t\t\t\t\tprevVolumeRange: this.state.volumeRange,\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\tconst prevVolInitPower = {};\n\n\t\t\tif (data.tvState.isVolume) {\n\t\t\t\tprevVolInitPower.volumeRange = this.state.prevVolumeRange;\n\t\t\t}\n\t\t\tif (data.tvState.tvStatus === SerialTVCommands.INITIAL_TV_POWER) {\n\t\t\t\tprevVolInitPower.powerTv = false;\n\t\t\t\tprevVolInitPower.powerToolTip = \"Toggle patient's TV power on\";\n\t\t\t}\n\n\t\t\tthis.setState(prevVolInitPower);\n\t\t}\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t
    \n\t\t\t\t 0 && this.props.tvBrand !== TvBrands.CEC_TV}\n\t\t\t\t\tpersist={true}\n\t\t\t\t\tmessage='TV is muted or OFF. Please make sure the patient can hear you.'\n\t\t\t\t\tvariant='error'\n\t\t\t\t\tposition='top'\n\t\t\t\t\thideCloseButton={true}\n\t\t\t\t/>\n\t\t\t\t {\n\t\t\t\t\t\tthis.serialCommandsTv(TvControlsEnums.POWER);\n\t\t\t\t\t}}\n\t\t\t\t\ttooltip={this.state.powerToolTip}\n\t\t\t\t\ttooltipPosition='top'\n\t\t\t\t\tisDisabled={this.props.isDisabled}\n\t\t\t\t/>\n\t\t\t\t{this.props.tvBrand !== TvBrands.CEC_TV && (\n\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t{this.state.volumeRange > 0 ? this.state.volumeRange : 0}\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\tthis.serialCommandsTv(TvControlsEnums.VOLUME, event.target.value);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{this.state.volumeRange > 0 ? 'volume_up' : 'volume_off'} \n\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\t{this.props.tvBrand === TvBrands.CEC_TV && (\n\t\t\t\t\t\n\t\t\t\t\t\t
    e.stopPropagation()}>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tVolume\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\t{this.props.tvBrand !== TvBrands.CEC_TV && (\n\t\t\t\t\t {\n\t\t\t\t\t\t\tthis.onHdmiTypeChanged.bind(this);\n\t\t\t\t\t\t}}\n\t\t\t\t\t\ttooltip=\"Switch patient's HDMI\"\n\t\t\t\t\t\ttooltipPosition='top'\n\t\t\t\t\t\tisDisabled={this.props.isDisabled}>\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\t{this.props.tvBrand === TvBrands.CEC_TV && (\n\t\t\t\t\t {\n\t\t\t\t\t\t\tawait this.callManager.serialCommandsTv(\n\t\t\t\t\t\t\t\tSerialTVCommands.HDMI.SWITCH_HDMI1,\n\t\t\t\t\t\t\t\tfalse,\n\t\t\t\t\t\t\t\tthis.state.deviceId,\n\t\t\t\t\t\t\t\tthis.props.conferenceId,\n\t\t\t\t\t\t\t\tthis.props.participantId\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}}\n\t\t\t\t\t\ttooltip='Switch to HELLO Source'\n\t\t\t\t\t\ttooltipPosition='top'\n\t\t\t\t\t\tisDisabled={this.props.isDisabled}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t
    \n\t\t);\n\t}\n}\n\nTvControls.contextType = SocketContext;\nexport default TvControls;\n","import { gatewayApi, APP_CONFIG } from 'constants/global-variables';\n\n/**\n * @function getAllHealthSystems\n * @desc Gets the user's health systems\n */\nexport function getAllHealthSystems() {\n\treturn new Promise((res, rej) => {\n\t\tconst url = `/v1/organizations/${APP_CONFIG.companyId}/health-systems`;\n\t\tgatewayApi\n\t\t\t.get(url)\n\t\t\t.then(response => res(response.data))\n\t\t\t.catch(error => rej(error));\n\t});\n}\n\n/**\n * @function createHealthSystem\n * @desc Creates a new health system\n * @param {string} healthSystemName, Name of the new health system example: \"Florida Health System\"\n * @param {Array} healthSystemRegions, Regions of new health systems example: [{name: \"South Region\"}, {name: \"Norht Region\"}]\n */\nexport async function createHealthSystem(healthSystemName, healthSystemRegions) {\n\tconst url = `/v1/organizations/${APP_CONFIG.companyId}/health-systems`;\n\tawait gatewayApi.post(url, {\n\t\tname: healthSystemName,\n\t\tregions: healthSystemRegions,\n\t});\n}\n\nexport async function editHealthSystemName(healthSystemId, newHealthSystemName) {\n\tconst url = `/v1/organizations/${APP_CONFIG.companyId}/health-systems/${healthSystemId}`;\n\tawait gatewayApi.put(url, {\n\t\tname: newHealthSystemName,\n\t});\n}\n\nexport async function editRegionName(healthSystemId, regionId, newRegionName) {\n\tconst url = `/v1/organizations/${APP_CONFIG.companyId}/health-systems/${healthSystemId}/regions/${regionId}`;\n\tawait gatewayApi.put(url, {\n\t\tname: newRegionName,\n\t});\n}\n\nexport async function createNewRegion(healthSystemId, newRegionName) {\n\tconst url = `/v1/organizations/${APP_CONFIG.companyId}/health-systems/${healthSystemId}/regions`;\n\tlet response = await gatewayApi.post(url, {\n\t\tname: newRegionName,\n\t});\n\treturn response.data.region;\n}\n","import { gatewayApi, APP_CONFIG } from 'constants/global-variables';\nimport axios from 'axios';\n\nexport function deleteOrgUnit(level, id) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.delete(`/v1/organizations/${APP_CONFIG.companyId}/level/${level}/id/${id}`)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data.devices);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function reAssignDevice({ hospitalId, departmentId, floorId, roomId, deviceId }) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.put(\n\t\t\t\t`/v1/organizations/${APP_CONFIG.companyId}/hospitals/${hospitalId}/departments/${departmentId}/floors/${floorId}/rooms/${roomId}/devices/${deviceId}/re-assign`\n\t\t\t)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data.devices);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getTreeData(currentHealthSystemId, currentRegionId) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/organizations/${APP_CONFIG.companyId}/health-systems/${currentHealthSystemId}/regions/${currentRegionId}`)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data.organization.healthSystem.hospitals);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function uploadLogo(fileInput, { x, y, width, height }) {\n\tconst formData = new FormData();\n\tformData.append('file', fileInput, fileInput.name);\n\tformData.append('cropOffsetX', x.toFixed());\n\tformData.append('cropOffsetY', y.toFixed());\n\tformData.append('cropWidth', width.toFixed());\n\tformData.append('cropHeight', height.toFixed());\n\n\tconst accessToken = localStorage.getItem('access_token');\n\treturn new Promise(res => {\n\t\taxios({\n\t\t\tmethod: 'post',\n\t\t\tbaseURL: APP_CONFIG.URL.gatewayApiBasePath,\n\t\t\turl: '/v1/media/pictures/organization-logo',\n\t\t\tdata: formData,\n\t\t\theaders: {\n\t\t\t\t'Content-Type': 'multipart/form-data',\n\t\t\t\tAuthorization: `Bearer ${accessToken}`,\n\t\t\t},\n\t\t})\n\t\t\t.then(({ data }) => res({ data }))\n\t\t\t.catch(error => res({ error }));\n\t});\n}\n\nexport async function saveLogo(teamId, data) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.put(`/v1/companies/${APP_CONFIG.companyId}/teams/${teamId}/picture`, data)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport async function getLogoUrl(teamId) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/companies/${APP_CONFIG.companyId}/teams/${teamId}/picture`)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data.picture);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getHopsitalDepartments(healthSystemId, hospitalId) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/organizations/${APP_CONFIG.companyId}/health-systems/${healthSystemId}/hospitals/${hospitalId}/departments`)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport const setRoomDetails = async (healthSystemId, hospitalId, departmentId, floorId, roomId, params) => {\n\ttry {\n\t\tconst { data } = await gatewayApi.put(\n\t\t\t`/v1/organizations/${APP_CONFIG.companyId}/health-systems/${healthSystemId}/hospitals/${hospitalId}/departments/${departmentId}/floors/${floorId}/rooms/${roomId}`,\n\t\t\tparams\n\t\t);\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n\nexport const getRoomDetails = async (healthSystemId, hospitalId, departmentId, floorId, roomId) => {\n\ttry {\n\t\tconst { data } = await gatewayApi.get(\n\t\t\t`/v1/organizations/${APP_CONFIG.companyId}/health-systems/${healthSystemId}/hospitals/${hospitalId}/departments/${departmentId}/floors/${floorId}/rooms/${roomId}`\n\t\t);\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n\nexport const getRoomLocation = async (healthSystemId, hospitalId, departmentId, floorId, roomId) => {\n\ttry {\n\t\tconst { data } = await gatewayApi.get(\n\t\t\t`/v1/organizations/${APP_CONFIG.companyId}/health-systems/${healthSystemId}/hospitals/${hospitalId}/departments/${departmentId}/floors/${floorId}/rooms/${roomId}/locations`\n\t\t);\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n\nexport const updateRoomLocation = async (healthSystemId, hospitalId, departmentId, floorId, roomId, params) => {\n\ttry {\n\t\tconst { data } = await gatewayApi.put(\n\t\t\t`/v1/organizations/${APP_CONFIG.companyId}/health-systems/${healthSystemId}/hospitals/${hospitalId}/departments/${departmentId}/floors/${floorId}/rooms/${roomId}/locations`,\n\t\t\tparams\n\t\t);\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n\nexport const deleteRoomLocation = async (healthSystemId, hospitalId, departmentId, floorId, roomId) => {\n\ttry {\n\t\tconst { data } = await gatewayApi.delete(\n\t\t\t`/v1/organizations/${APP_CONFIG.companyId}/health-systems/${healthSystemId}/hospitals/${hospitalId}/departments/${departmentId}/floors/${floorId}/rooms/${roomId}/locations`\n\t\t);\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n\nexport const getHealthSystemHospitals = async healthSystemId => {\n\ttry {\n\t\tconst { data } = await gatewayApi.get(`/v1/organizations/${APP_CONFIG.companyId}/healthsystems/${healthSystemId}/hospitals`);\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n","import { gatewayApi, APP_CONFIG } from 'constants/global-variables';\nimport { OverviewActionTypes } from 'constants/action-types';\nimport { getCurrentHealthSystemInfo, buildTreeModel } from 'infrastructure/helpers/commonHelpers';\nimport { getAllHealthSystems } from 'api/healthSystems';\nimport { getTreeData } from 'api/organization';\n\n// eslint-disable-next-line import/prefer-default-export\nexport const actionCreators = {\n\ttoggleSwitchHealthSystemModal: () => ({ type: OverviewActionTypes.toggleSwitchHealthSystemModal }),\n\ttoggleAssignDeviceModal: payload => dispatch => {\n\t\tdispatch({\n\t\t\ttype: OverviewActionTypes.toggleAssignDeviceModal,\n\t\t\tpayload,\n\t\t});\n\t},\n\tsetStreamPermissionMessage: data => ({ type: OverviewActionTypes.setStreamPermissionMessage, payload: data }),\n\taddNewRoom: () => ({ type: OverviewActionTypes.addNewRoom }),\n\tcreateNewHospital: () => ({ type: OverviewActionTypes.createNewHospital }),\n\tsetCurrentSectorLocation: data => ({ type: OverviewActionTypes.setCurrentSectorLocation, payload: data }),\n\tupdateBreadcrumb: data => ({ type: OverviewActionTypes.updateBreadcrumb, payload: data }),\n\tsetCurrentHealthSystemInfo: data => ({ type: OverviewActionTypes.setCurrentHealthSystemInfo, payload: data }),\n\tsetTreeData: data => ({ type: OverviewActionTypes.setTreeData, payload: data }),\n\tsetActiveMonitoringFeeds: data => ({ type: OverviewActionTypes.setActiveMonitoringFeeds, payload: data }),\n\tsetCurrentHospitalId: id => ({ type: OverviewActionTypes.setCurrentHospitalId, payload: id }),\n\tgetAllHealthSystems: () => async dispatch => {\n\t\tlet response = await getAllHealthSystems();\n\t\t// TO DO: Don't set current HS in this function, make a new one!\n\t\t// TEMP Solution\n\t\tlet currentHs = localStorage.getItem('currentHealthSystemInfo');\n\t\tif (currentHs) {\n\t\t\tcurrentHs = JSON.parse(currentHs);\n\t\t} else if (response.healthSystems.length > 0) {\n\t\t\tconst [hs] = response.healthSystems;\n\t\t\t// @ts-ignore\n\t\t\tcurrentHs = {\n\t\t\t\tcurrentHealthSystemId: hs.id,\n\t\t\t\tcurrentHealthSystemName: hs.name,\n\t\t\t\tcurrentRegionId: hs.regions[0].id,\n\t\t\t};\n\t\t}\n\t\tif (currentHs && response.healthSystems.length > 0) {\n\t\t\tdispatch({ type: OverviewActionTypes.setAllHealthSystems, payload: { healthSystems: response.healthSystems, currentHealthSystem: currentHs } });\n\t\t}\n\t},\n\tcreateHospital: name => async () => {\n\t\tconst { currentHealthSystemId, currentRegionId } = getCurrentHealthSystemInfo();\n\t\tconst url = `/v1/organizations/${APP_CONFIG.companyId}/health-systems/${currentHealthSystemId}/hospitals`;\n\t\tawait gatewayApi.post(url, {\n\t\t\tregionId: currentRegionId,\n\t\t\tname: name,\n\t\t});\n\t},\n\tcreateDepartment: (hospitalId, name) => async () => {\n\t\tconst { currentHealthSystemId } = getCurrentHealthSystemInfo();\n\t\tconst url = `/v1/organizations/${APP_CONFIG.companyId}/health-systems/${currentHealthSystemId}/hospitals/${hospitalId}/departments`;\n\t\tawait gatewayApi.post(url, {\n\t\t\tname: name,\n\t\t});\n\t},\n\tcreateFloor: (hospitalId, departmentId, name) => async () => {\n\t\tconst { currentHealthSystemId } = getCurrentHealthSystemInfo();\n\t\tconst url = `/v1/organizations/${APP_CONFIG.companyId}/health-systems/${currentHealthSystemId}/hospitals/${hospitalId}/departments/${departmentId}/floors`;\n\t\tawait gatewayApi.post(url, {\n\t\t\tname: name,\n\t\t});\n\t},\n\tcreateRoom: (hospitalId, departmentId, floorId, name) => async () => {\n\t\tconst { currentHealthSystemId } = getCurrentHealthSystemInfo();\n\t\tconst url = `/v1/organizations/${APP_CONFIG.companyId}/health-systems/${currentHealthSystemId}/hospitals/${hospitalId}/departments/${departmentId}/floors/${floorId}/rooms`;\n\t\tawait gatewayApi.post(url, {\n\t\t\tname: name,\n\t\t});\n\t},\n\tgetHospitalTree: hospitalId => async dispatch => {\n\t\tconst { currentHealthSystemId } = getCurrentHealthSystemInfo();\n\t\tconst url = `/v1/organizations/${APP_CONFIG.companyId}/health-systems/${currentHealthSystemId}/hospitals/${hospitalId}/departments`;\n\t\tconst response = await gatewayApi.get(url);\n\t\tdispatch({ type: OverviewActionTypes.setHospitalTree, payload: response.data.hospital });\n\t},\n\tgetTreeData: () => async dispatch => {\n\t\tconst { currentHealthSystemId, currentRegionId } = getCurrentHealthSystemInfo();\n\t\tconst hospitals = await getTreeData(currentHealthSystemId, currentRegionId);\n\t\tlet treeData = buildTreeModel(hospitals);\n\t\tlet preSelected = {};\n\t\tif (treeData.length) {\n\t\t\tdispatch({ type: OverviewActionTypes.setCurrentHospitalId, payload: treeData.firstHospitalId });\n\t\t}\n\t\tdispatch({\n\t\t\ttype: OverviewActionTypes.setTreeData,\n\t\t\tpayload: {\n\t\t\t\ttree: treeData.length ? treeData : [{}],\n\t\t\t\tpreSelected: preSelected,\n\t\t\t},\n\t\t});\n\t},\n};\n","import { gatewayApi } from '../constants/global-variables';\n\nexport function getUserNotifications(userId, appType, pageNo, pageSize = 10) {\n\treturn new Promise((res, rej) => {\n\t\tconst url = `/v1/users/${userId}/notifications`;\n\t\tgatewayApi\n\t\t\t.get(url, {\n\t\t\t\tparams: {\n\t\t\t\t\tpageSize: pageSize,\n\t\t\t\t\tpageIndex: pageNo,\n\t\t\t\t\tappType: appType,\n\t\t\t\t},\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getMissedCallsNotificationsCounter(userId, appType) {\n\treturn new Promise((res, rej) => {\n\t\tconst url = `/v1/users/${userId}/notifications/count`;\n\t\tgatewayApi\n\t\t\t.get(url, {\n\t\t\t\tparams: {\n\t\t\t\t\tappType: appType,\n\t\t\t\t},\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response.data.total);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function changeNotificationReadStatus(userId, unreadNotifications) {\n\treturn new Promise((res, rej) => {\n\t\tconst url = `/v1/users/${userId}/notifications/status`;\n\t\tgatewayApi\n\t\t\t.patch(url, unreadNotifications)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n","import { UserPresenceActionTypes } from 'constants/action-types';\nimport { getUserPresence, putUserPresence } from 'api/userPresence';\n\nfunction fetchingUserPresence() {\n\treturn {\n\t\ttype: UserPresenceActionTypes.FETCHING_USER_PRESENCE,\n\t};\n}\n\nexport function fetchUserPresenceSucceeded(data) {\n\treturn {\n\t\ttype: UserPresenceActionTypes.FETCH_USER_PRESENCE_SUCCESS,\n\t\tdata: data,\n\t};\n}\n\nfunction fetchUserPresenceFailed() {\n\treturn {\n\t\ttype: UserPresenceActionTypes.FETCH_USER_PRESENCE_FAILURE,\n\t};\n}\n\nexport function fetchUserPresence() {\n\treturn dispatch => {\n\t\tdispatch(fetchingUserPresence());\n\t\tconst userId = localStorage.getItem('userId');\n\n\t\treturn getUserPresence(userId)\n\t\t\t.then(userPresence => {\n\t\t\t\tdispatch(fetchUserPresenceSucceeded(userPresence));\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\tdispatch(fetchUserPresenceFailed());\n\t\t\t});\n\t};\n}\n\nfunction updatingUserPresence() {\n\treturn {\n\t\ttype: UserPresenceActionTypes.UPDATING_USER_PRESENCE,\n\t};\n}\n\nexport function userPresenceUpdateSucceeded(userId, customMessage, presenceStatusTypeId) {\n\treturn {\n\t\ttype: UserPresenceActionTypes.UPDATE_USER_PRESENCE_SUCCESS,\n\t\tdata: {\n\t\t\tcustomMessage: customMessage,\n\t\t\tpresenceStatusTypeId: presenceStatusTypeId,\n\t\t},\n\t};\n}\n\nfunction userPresenceUpdateFailed() {\n\treturn {\n\t\ttype: UserPresenceActionTypes.UPDATE_USER_PRESENCE_FAILURE,\n\t};\n}\n\nexport function updateUserPresence(userId, customMessage, presenceStatusTypeId) {\n\treturn dispatch => {\n\t\tdispatch(updatingUserPresence());\n\n\t\treturn putUserPresence(userId, customMessage, presenceStatusTypeId)\n\t\t\t.then(() => {\n\t\t\t\tlocalStorage.setItem('presenceStatusTypeId', presenceStatusTypeId);\n\t\t\t\tdispatch(userPresenceUpdateSucceeded(userId, customMessage, presenceStatusTypeId));\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\tdispatch(userPresenceUpdateFailed());\n\t\t\t});\n\t};\n}\n","import { gatewayApi } from 'constants/global-variables';\n\nexport function getUserPresence(userId) {\n\treturn new Promise((res, rej) => {\n\t\tconst url = `/v1/users/${userId}/presence`;\n\t\tgatewayApi\n\t\t\t.get(url)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data.presence);\n\t\t\t})\n\t\t\t.catch(e => {\n\t\t\t\tconsole.log(e);\n\t\t\t\trej(e);\n\t\t\t});\n\t});\n}\n\nexport function putUserPresence(userId, customMessage, presenceStatusTypeId) {\n\treturn new Promise((res, rej) => {\n\t\tconst url = `/v1/users/${userId}/presence`;\n\t\tgatewayApi\n\t\t\t.put(url, {\n\t\t\t\tcustomMessage: customMessage,\n\t\t\t\tpresenceStatusTypeId: presenceStatusTypeId,\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n","import { NotificationsCounterActionTypes } from 'constants/action-types';\nimport { getMissedCallsNotificationsCounter } from 'api/notifications';\nimport { getUserProfile } from 'infrastructure/auth';\nimport { BanyanAppType } from 'constants/global-variables';\n\nfunction fetchingNotificationCounter() {\n\treturn {\n\t\ttype: NotificationsCounterActionTypes.FETCHING_NOTIFICATIONS_COUNTER,\n\t};\n}\n\nfunction fetchNotificationCounterSucceeded(data) {\n\treturn {\n\t\ttype: NotificationsCounterActionTypes.FETCH_NOTIFICATIONS_COUNTER_SUCCESS,\n\t\tdata: data,\n\t};\n}\n\nfunction fetchNotificationCounterFailed() {\n\treturn {\n\t\ttype: NotificationsCounterActionTypes.FETCH_NOTIFICATIONS_COUNTER_FAILURE,\n\t};\n}\n\nexport function fetchNotificationCounter() {\n\treturn dispatch => {\n\t\tdispatch(fetchingNotificationCounter());\n\t\tconst userProfile = getUserProfile();\n\n\t\treturn getMissedCallsNotificationsCounter(userProfile.userId, BanyanAppType)\n\t\t\t.then(notificationCounter => {\n\t\t\t\tdispatch(fetchNotificationCounterSucceeded(notificationCounter));\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\tdispatch(fetchNotificationCounterFailed());\n\t\t\t});\n\t};\n}\n","import moment from 'moment';\n\nexport function formatDate(dateObj) {\n\tlet month = '' + (dateObj.getMonth() + 1);\n\tlet day = '' + dateObj.getDate();\n\tlet year = dateObj.getFullYear();\n\n\tif (month.length < 2) month = '0' + month;\n\tif (day.length < 2) day = '0' + day;\n\n\treturn [month, day, year].join('/');\n}\n\nexport function formatTime(dateObj) {\n\tlet h = '' + dateObj.getHours();\n\tlet m = '' + dateObj.getMinutes();\n\n\tif (h.length < 2) h = '0' + h;\n\tif (m.length < 2) m = '0' + m;\n\n\treturn h + ':' + m;\n}\n\nexport function formatDateTime(dateTimeObj) {\n\tlet month = '' + (dateTimeObj.getMonth() + 1);\n\tlet day = '' + dateTimeObj.getDate();\n\tlet year = dateTimeObj.getFullYear();\n\tlet hour = '' + dateTimeObj.getHours();\n\tlet minutes = '' + dateTimeObj.getMinutes();\n\n\tif (month.length < 2) month = '0' + month;\n\tif (day.length < 2) day = '0' + day;\n\tif (hour.length < 2) hour = '0' + hour;\n\tif (minutes.length < 2) minutes = '0' + minutes;\n\n\treturn [day, month, year].join('/') + '-' + hour + ':' + minutes;\n}\n\nexport function calculateDuration(startedAt, endedAt) {\n\tvar delta = Math.abs(startedAt - endedAt) / 1000;\n\n\tvar days = Math.floor(delta / 86400);\n\tdelta -= days * 86400;\n\n\tvar hours = Math.floor(delta / 3600) % 24;\n\tdelta -= hours * 3600;\n\n\tvar minutes = Math.floor(delta / 60) % 60;\n\tdelta -= minutes * 60;\n\n\tvar seconds = Math.round(delta % 60);\n\n\tif (hours < 10) hours = '0' + hours;\n\tif (minutes < 10) minutes = '0' + minutes;\n\tif (seconds < 10) seconds = '0' + seconds;\n\n\treturn hours + ':' + minutes + ':' + seconds;\n}\n\nexport function durationUntilNow(utcDateTime) {\n\tconst k = moment(moment.utc().format()).diff(moment.utc(utcDateTime));\n\tconst days = Math.floor(k / 1000 / 86400);\n\tconst f = days > 0 ? `${days}[d] HH:mm:ss` : 'HH:mm:ss';\n\treturn moment.utc(moment(moment.utc().format()).diff(moment.utc(utcDateTime))).format(f);\n}\n\nexport function utcToLocalTime(date) {\n\tconst stillUtc = moment.utc(date).toDate();\n\tconst localDate = moment(stillUtc);\n\treturn localDate;\n}\n\nexport const getDateDifference = (start, end) => {\n\tconst startDate = moment(start).startOf('day');\n\tconst endDate = moment(end).startOf('day');\n\treturn moment.duration(endDate.diff(startDate)).asDays();\n};\n\nexport const secondsToHHMMSS = seconds => {\n\tconst HH = `${Math.floor(seconds / 3600)}`.padStart(2, '0');\n\tconst MM = `${Math.floor(seconds / 60) % 60}`.padStart(2, '0');\n\tconst SS = `${Math.floor(seconds % 60)}`.padStart(2, '0');\n\treturn [HH, MM, SS].join(':');\n};\n\nexport const convertSecondsToHoursFormat = allSeconds => {\n\tif (!allSeconds) {\n\t\treturn 'N/A';\n\t}\n\tconst floatHours = allSeconds / 3600;\n\tconst hours = Math.floor(floatHours);\n\tconst minutes = Math.floor((floatHours - hours) * 60);\n\tconst seconds = allSeconds % 60;\n\treturn `${hours}h ${minutes.toString().padStart(2, '0')}m ${seconds.toString().padStart(2, '0')}s`;\n};\n","const channel = new BroadcastChannel('notifications');\n\nexport const postMessage = msg => {\n\tchannel.postMessage(msg);\n};\n\nexport const onMessage = handler => {\n\tchannel.onmessage = handler;\n};\n","import { gatewayApi, APP_CONFIG } from 'constants/global-variables';\n\nexport const deleteMemberCallAvailability = async () => {\n\ttry {\n\t\tconst url = `/v1/organizations/${APP_CONFIG.companyId}/members/call-availability`;\n\t\tconst { data } = await gatewayApi.delete(url);\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n\nexport const addOrUpdateMemberCallAvailability = async teams => {\n\ttry {\n\t\tconst url = `/v1/organizations/${APP_CONFIG.companyId}/members/call-availability`;\n\t\tconst { data } = await gatewayApi.post(url, { teams });\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n\nexport const getNurseHealthSystemAvailabilities = async () => {\n\ttry {\n\t\tconst url = `/v1/organizations/${APP_CONFIG.companyId}/members/call-availability`;\n\t\tconst { data } = await gatewayApi.get(url);\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n","import styled from 'styled-components';\n\nexport const Wrapper = styled.div`\n\tbackground: var(--gray-1);\n\twidth: 100%;\n\theight: 100%;\n\tdisplay: flex;\n\tpadding-top: var(--spacing-sl);\n\tjustify-content: center;\n\n\t.flex {\n\t\tdisplay: flex;\n\t}\n\n\t> div {\n\t\twidth: 400px;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tmax-width: 90%;\n\t\tpadding-bottom: var(--spacing-l);\n\n\t\th3,\n\t\tp,\n\t\th4 {\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t}\n\n\t\th3 {\n\t\t\tfont-size: 20px;\n\t\t\tfont-weight: 500;\n\n\t\t\t&:nth-of-type(2) {\n\t\t\t\tmargin-top: var(--spacing-l);\n\t\t\t}\n\t\t}\n\n\t\th4 {\n\t\t\tfont-size: 18px;\n\t\t\tfont-weight: 500;\n\t\t}\n\n\t\tp {\n\t\t\tfont-size: 14px;\n\t\t\tcolor: var(--gray-4);\n\t\t\tmargin-top: var(--spacing-s);\n\t\t}\n\n\t\th4 {\n\t\t\ttext-align: left;\n\t\t\tmargin-top: var(--spacing-l);\n\t\t}\n\n\t\t.select-wrapper {\n\t\t\tposition: relative;\n\n\t\t\tselect {\n\t\t\t\tmargin: var(--spacing-m) 0;\n\t\t\t\tpadding: var(--spacing-m);\n\t\t\t\tborder-radius: var(--spacing-s);\n\t\t\t\tborder: 1px solid var(--gray-2);\n\t\t\t\t-webkit-appearance: none;\n\t\t\t\tappearance: none;\n\t\t\t\twidth: 100%;\n\n\t\t\t\t&:hover {\n\t\t\t\t\toutline: none;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&:after {\n\t\t\t\tcontent: '▼';\n\t\t\t\tfont-size: 10px;\n\t\t\t\ttop: 50%;\n\t\t\t\tright: var(--spacing-m);\n\t\t\t\ttransform: translate(0, -50%);\n\t\t\t\tposition: absolute;\n\t\t\t}\n\t\t}\n\t}\n\n\tbutton:not(.rct-collapse-btn),\n\ta.button {\n\t\twidth: 100%;\n\t\tborder: 0;\n\t\tpadding: var(--spacing-m);\n\t\tborder-radius: var(--spacing-s);\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\tmargin-top: var(--spacing-m);\n\t\tmargin-bottom: var(--spacing-m);\n\t}\n\n\ta.button + a.button {\n\t\tmargin-left: var(--spacing-m);\n\t\tmargin-right: 0;\n\t}\n`;\n\nexport const HealthSystemsListItem = styled.label`\n\tmargin-bottom: var(--spacing-m);\n\tpadding: var(--spacing-m);\n\tborder-radius: var(--spacing-s);\n\tborder: 1px solid var(--gray-2);\n\tbackground: var(--gray-0);\n\tdisplay: flex;\n\tjustify-content: space-between;\n\tfont-size: 14px;\n\n\t&:first-of-type {\n\t\tmargin-top: var(--spacing-m);\n\t}\n`;\n\nexport const TreeViewListWrapper = styled.div`\n\tinput[type='text'] {\n\t\tpadding: var(--spacing-m);\n\t\twidth: 100%;\n\t\tborder: none;\n\t\tborder: 1px solid var(--gray-2);\n\t\tfont-size: 14px;\n\t\tcolor: var(--gray-5);\n\t\tmargin-top: var(--spacing-m);\n\t}\n\n\t.circle-loader {\n\t\tposition: absolute;\n\t\ttop: 50%;\n\t\tleft: 50%;\n\t}\n\n\tlabel {\n\t\twidth: 100%;\n\t\ttext-align: left;\n\t}\n\n\t.react-checkbox-tree {\n\t\tinput {\n\t\t\tdisplay: initial !important;\n\t\t}\n\n\t\tlabel {\n\t\t\t&:hover {\n\t\t\t\tbackground: none;\n\t\t\t}\n\t\t}\n\t\t.rct-icon.rct-icon-check,\n\t\t.rct-checkbox {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\n\t> div {\n\t\t> ol {\n\t\t\tli {\n\t\t\t\tbackground: var(--gray-0);\n\t\t\t\twidth: 100%;\n\t\t\t\tmargin-top: var(--spacing-m);\n\t\t\t\tpadding: var(--spacing-m);\n\n\t\t\t\t.rct-node-icon > i {\n\t\t\t\t\tposition: relative;\n\t\t\t\t\ttop: 1px;\n\t\t\t\t}\n\n\t\t\t\ti {\n\t\t\t\t\tcursor: pointer;\n\t\t\t\t\tfont-size: 18px;\n\t\t\t\t\t-webkit-user-select: none;\n\t\t\t\t\tuser-select: none;\n\t\t\t\t\tmargin-right: var(--spacing-s);\n\t\t\t\t\tcolor: var(--gray-4);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n`;\n","import React, { useEffect, useState, useRef, useContext } from 'react';\nimport { getUserId, getUserProfile } from 'infrastructure/auth';\nimport { Alert, Button, Loader } from 'components';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { getHealthSystemSubTreeBasic } from 'api/users';\nimport CheckboxTree from 'react-checkbox-tree';\nimport 'react-checkbox-tree/lib/react-checkbox-tree.css';\nimport { deleteMemberCallAvailability, addOrUpdateMemberCallAvailability, getNurseHealthSystemAvailabilities } from 'api/nursePooling';\nimport { NursePoolingOptions, PresenceStatusType } from 'constants/enums';\nimport { Wrapper, HealthSystemsListItem, TreeViewListWrapper } from 'containers/PoolingFlow/style';\nimport { getNursePoolingStatus } from 'infrastructure/helpers/commonHelpers';\nimport SocketEvents from 'constants/socket-events';\nimport { SocketContext } from 'io-client/SocketContext';\n\nconst processTreeData = hospitals => {\n\tconst getNode = (node, icon) => ({\n\t\tvalue: node.id,\n\t\tlabel: node.name,\n\t\ticon: {icon},\n\t\t...(node.children && node.children.length > 0 && { children: node.children || [] }),\n\t});\n\n\tconst mapChildren = (nodes, icon) => nodes.map(item => getNode(item, icon));\n\n\treturn hospitals.map(hospital => {\n\t\tconst departments = hospital.departments.map(department => ({\n\t\t\t...department,\n\t\t\tchildren: mapChildren(department.floors, 'money'),\n\t\t}));\n\n\t\treturn {\n\t\t\t...getNode(hospital, 'business'),\n\t\t\t...(departments && departments.length > 0 && { children: mapChildren(departments, 'account_balance') }),\n\t\t};\n\t});\n};\n\nconst PoolingFlow = props => {\n\tconst [userProfile] = useState(getUserProfile);\n\tconst [page, setPage] = useState(0);\n\tconst [nursePoolingStatus, setNursePoolingStatus] = useState('');\n\tconst [healthSystems, setHealthSystems] = useState([]);\n\tconst [selectedHealthSystem, setSelectedHealthSystem] = useState(null);\n\tconst [nodes, setNodes] = useState([]);\n\tconst [filteredText, setFilteredText] = useState('');\n\tconst [nodesFiltered, setFilteredNodes] = useState([]);\n\tconst [checked, setChecked] = useState([]);\n\tconst [expanded, setExpanded] = useState([]);\n\tconst [isLoading, setIsLoading] = useState(false);\n\tconst [initialValues, setInitialValues] = useState([]);\n\tconst [alertErrorText, setAlertErrorText] = useState(null);\n\n\tconst organization = useSelector(state => state.organization);\n\tconst dispatch = useDispatch();\n\n\tconst { current: answerExists } = useRef(getNursePoolingStatus());\n\n\tconst _socket = useContext(SocketContext);\n\n\tuseEffect(() => {\n\t\tconst organizations = [...organization.allHealthSystems];\n\t\tconst mapped = organizations.map(item => ({\n\t\t\t...item,\n\t\t\tisChecked: false,\n\t\t}));\n\t\tsetHealthSystems(mapped);\n\t}, [organization.allHealthSystems]);\n\n\tuseEffect(() => {\n\t\tif (answerExists && !props.isEdit) {\n\t\t\tprops.changePage();\n\t\t}\n\t}, [props.isEdit, props.changePage]);\n\n\tuseEffect(() => {\n\t\tconst fetchData = async () => {\n\t\t\tconst res = await getNurseHealthSystemAvailabilities();\n\t\t\tif (res.error) {\n\t\t\t\tsetAlertErrorText('Something went wrong!');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tsetNursePoolingStatus(answerExists);\n\t\t\tsetInitialValues(res.nurseAvailabilities);\n\t\t};\n\t\tconst resetData = async () => {\n\t\t\tconst deleteRes = await deleteMemberCallAvailability();\n\t\t\tif (deleteRes.error) {\n\t\t\t\tsetAlertErrorText('Something went wrong!');\n\t\t\t}\n\n\t\t\tsetInitialValues([]);\n\t\t};\n\t\tif (!answerExists && !props.isEdit) {\n\t\t\tresetData();\n\t\t}\n\t\tif (answerExists && props.isEdit) {\n\t\t\tfetchData();\n\t\t}\n\t}, [props.isEdit]);\n\n\tconst getTree = async hsList => {\n\t\tsetIsLoading(true);\n\t\ttry {\n\t\t\tconst tree = await getHealthSystemSubTreeBasic(hsList.id);\n\t\t\tsetNodes(processTreeData(tree.regions.reduce((acc, value) => [...acc, ...value.hospitals], [])));\n\t\t\tsetFilteredNodes(processTreeData(tree.regions.reduce((acc, value) => [...acc, ...value.hospitals], [])));\n\t\t} catch (error) {\n\t\t\tsetAlertErrorText('Something went wrong!');\n\t\t}\n\t\tsetIsLoading(false);\n\t};\n\n\tuseEffect(() => {\n\t\tif (initialValues.length > 0) {\n\t\t\tconst checkedTeamIds = [...checked];\n\n\t\t\tsetHealthSystems(prevState => {\n\t\t\t\tconst prevHs = [...prevState];\n\n\t\t\t\tprevHs.forEach(hs => {\n\t\t\t\t\tconst initialValue = initialValues.find(val => val.healthSystemId === hs.id);\n\t\t\t\t\t// eslint-disable-next-line no-param-reassign\n\t\t\t\t\ths.isChecked = initialValue.teams.length > 0;\n\t\t\t\t\tif (hs.isChecked) {\n\t\t\t\t\t\tcheckedTeamIds.push({ healthSystemId: initialValue.healthSystemId, teamIds: initialValue.teams });\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn prevHs;\n\t\t\t});\n\t\t\tsetChecked(checkedTeamIds);\n\t\t}\n\t}, [initialValues]);\n\n\tconst filterNodes = (filtered, element) => {\n\t\tconst children = (element.children || []).reduce(filterNodes, []);\n\n\t\tif (element.label.toLocaleLowerCase().indexOf(filteredText.toLocaleLowerCase()) > -1 || children.length) {\n\t\t\tfiltered.push({ ...element, ...(children && children.length > 0 && { children }) });\n\t\t}\n\n\t\treturn filtered;\n\t};\n\n\tuseEffect(() => {\n\t\tif (!filteredText) {\n\t\t\tsetFilteredNodes([...nodes]);\n\t\t\treturn;\n\t\t}\n\n\t\tsetFilteredNodes([...nodes].reduce(filterNodes, []));\n\t}, [filteredText]);\n\n\tuseEffect(() => {\n\t\tif (selectedHealthSystem) {\n\t\t\tgetTree(selectedHealthSystem);\n\t\t\tsetFilteredText('');\n\t\t}\n\t}, [selectedHealthSystem]);\n\n\tconst setNoReceiveCalls = async () => {\n\t\tconst deleteRes = await deleteMemberCallAvailability();\n\n\t\tif (deleteRes.error) {\n\t\t\tsetAlertErrorText('Something went wrong. Please try again!');\n\t\t\treturn;\n\t\t}\n\n\t\tlocalStorage.setItem('nursePoolingStatus', nursePoolingStatus);\n\t\tconst data = {\n\t\t\tuserId: getUserId(),\n\t\t\tpresenceStatusTypeId: PresenceStatusType.UNAVAILABLE,\n\t\t\tcustomMessage: null,\n\t\t};\n\n\t\t_socket.emit(SocketEvents.Client.UPDATE_USER_PRESENCE, data);\n\n\t\tprops.changePage();\n\t\tsetChecked([]);\n\t};\n\n\tconst setCheckedBasedOnHs = (itemIds, hs) => {\n\t\tsetChecked(prevState => {\n\t\t\tconst prevChecked = [...prevState];\n\n\t\t\tconst checkedItem = prevChecked.find(prev => prev.healthSystemId === hs.id);\n\t\t\tif (!checkedItem) {\n\t\t\t\tprevChecked.push({\n\t\t\t\t\thealthSystemId: hs.id,\n\t\t\t\t\tteamIds: itemIds,\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tcheckedItem.teamIds = itemIds;\n\t\t\t}\n\t\t\treturn prevChecked;\n\t\t});\n\t};\n\n\tconst setHealthSystemsList = item => {\n\t\tsetHealthSystems(prevState => {\n\t\t\tconst hsList = [...prevState];\n\n\t\t\tconst hs = hsList.find(hsItem => hsItem === item);\n\t\t\ths.isChecked = !hs.isChecked;\n\t\t\tif (!hs.isChecked) {\n\t\t\t\tsetCheckedBasedOnHs([], hs);\n\t\t\t}\n\n\t\t\treturn hsList;\n\t\t});\n\t};\n\n\tconst flatMapArray = arr =>\n\t\tarr.flat().map(item => ({\n\t\t\tteamId: item,\n\t\t\tisAvailable: true,\n\t\t}));\n\n\tconst submit = async () => {\n\t\tconst flattedNewParams = flatMapArray([...checked].map(item => item.teamIds));\n\t\tconst flattedInitialValues = flatMapArray([...initialValues].map(item => item.teams));\n\t\tflattedInitialValues.forEach(item => {\n\t\t\tif (!flattedNewParams.some(elem => elem.teamId === item.teamId)) {\n\t\t\t\tflattedNewParams.push({\n\t\t\t\t\tteamId: item.teamId,\n\t\t\t\t\tisAvailable: false,\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\tif (flattedNewParams.length > 0) {\n\t\t\tconst submitRes = await addOrUpdateMemberCallAvailability(flattedNewParams);\n\t\t\tif (submitRes.error) {\n\t\t\t\tsetAlertErrorText('Something went wrong. Please try again!');\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\t\t\tconst deleteRes = await deleteMemberCallAvailability();\n\n\t\t\tif (deleteRes.error) {\n\t\t\t\tsetAlertErrorText('Something went wrong. Please try again!');\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tlocalStorage.setItem('nursePoolingStatus', nursePoolingStatus);\n\n\t\tconst data = {\n\t\t\tuserId: getUserId(),\n\t\t\tpresenceStatusTypeId: flattedNewParams.length > 0 ? PresenceStatusType.AVAILABLE : PresenceStatusType.UNAVAILABLE,\n\t\t\tcustomMessage: null,\n\t\t};\n\n\t\t_socket.emit(SocketEvents.Client.UPDATE_USER_PRESENCE, data);\n\n\t\tprops.changePage();\n\t\tsetPage(0);\n\t\tif (!props.isEdit) {\n\t\t\tsetChecked([]);\n\t\t}\n\t};\n\n\tconst showHealthSystems = () => {\n\t\tsetPage(prev => prev + 1);\n\t\tconst checkedHealthSystems = healthSystems.filter(item => item.isChecked);\n\t\tif (checkedHealthSystems.length > 0) {\n\t\t\tsetSelectedHealthSystem(checkedHealthSystems[0]);\n\t\t}\n\t};\n\n\tconst goBackToHsSelection = () => {\n\t\tsetPage(prev => prev - 1);\n\t\tsetSelectedHealthSystem(null);\n\t\tsetNodes([]);\n\t\tsetFilteredNodes([]);\n\t};\n\n\tconst canSubmitAvailability = () => flatMapArray([...checked].map(item => item.teamIds)).length > 0;\n\n\tconst checkedHealthSystems = healthSystems.filter(item => item.isChecked);\n\tconst foundHealthSystemIndex = checkedHealthSystems.findIndex(item => selectedHealthSystem?.id === item.id);\n\n\treturn (\n\t\t<>\n\t\t\t\n\t\t\t\t{page === 0 && (\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    \n\t\t\t\t\t\t\tHi, {userProfile.firstName} {userProfile.lastName}\n\t\t\t\t\t\t

    \n\t\t\t\t\t\t

    Select whether you will be receiving calls from patients.

    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t{nursePoolingStatus === NursePoolingOptions.YES.toString() && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t

    Select Health Systems

    \n\t\t\t\t\t\t\t\t

    Select the health systems you will be receiving calls from.

    \n\n\t\t\t\t\t\t\t\t{healthSystems.map(item => {\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t{item.name} setHealthSystemsList(item)} checked={item.isChecked} />\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{nursePoolingStatus !== NursePoolingOptions.NO.toString() && (\n\t\t\t\t\t\t\t
    \n\t\t\t\t)}\n\n\t\t\t\t{page === 1 && selectedHealthSystem && (\n\t\t\t\t\t\n\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t{checkedHealthSystems.length > 1 && `Health Systems [${foundHealthSystemIndex + 1} / ${checkedHealthSystems.length}]`}\n\t\t\t\t\t\t\t{checkedHealthSystems.length === 1 && 'Health System'}\n\t\t\t\t\t\t

    \n\n\t\t\t\t\t\t

    Select the level from which you will be receiving calls.

    \n\t\t\t\t\t\t{isLoading && (\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!isLoading && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t

    {selectedHealthSystem.name}

    \n\t\t\t\t\t\t\t\t setFilteredText(event.target.value)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t item.healthSystemId === selectedHealthSystem.id)?.teamIds || []}\n\t\t\t\t\t\t\t\t\texpanded={expanded}\n\t\t\t\t\t\t\t\t\tonCheck={itemIds => setCheckedBasedOnHs(itemIds, selectedHealthSystem)}\n\t\t\t\t\t\t\t\t\tonExpand={data => setExpanded(data)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t{foundHealthSystemIndex + 1 === 1 &&
    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t
    \n\t\t\t\t)}\n\t\t\t
    \n\t\t\t setAlertErrorText(null)} />\n\t\t\n\t);\n};\n\nexport default PoolingFlow;\n","import React from 'react';\nimport { Modal } from 'components';\nimport PoolingFlow from 'containers/PoolingFlow/index';\nimport styled from 'styled-components';\n\nconst EditPoolingModal = props => (\n\t\n\t\t\n\t\t\t\n\t\t\n\t\n);\n\nconst ModalWrapper = styled.div`\n\t.modal.right {\n\t\t.modal__content {\n\t\t\theight: 100vh;\n\t\t\tbackground: var(--gray-1);\n\t\t\tpadding-bottom: var(--spacing-m);\n\t\t}\n\t}\n\n\t.modal__actions {\n\t\tdisplay: none;\n\t}\n`;\n\nexport default EditPoolingModal;\n","import { legacyApi } from 'constants/global-variables';\n\n/**\n * @param {{ oldpassword: string; newpassword: string; }} data\n */\n// eslint-disable-next-line import/prefer-default-export\nexport function changePassword(data) {\n\treturn new Promise((res, rej) => {\n\t\tconst url = `/v2.1/api/account/password`;\n\t\tlegacyApi\n\t\t\t.post(url, data)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n","import React, { Component } from 'react';\nimport { Form, Modal, Input, Select, Tabs, Avatar, DescriptionBox, Alert } from 'components';\nimport { getUserProfile, setUserProfile } from 'infrastructure/auth';\nimport { changePassword } from 'api/user';\nimport { ChangePasswordUseCases } from 'constants/enums';\nimport { passwordRegEx } from 'constants/global-variables';\n\nclass UserSettingsModal extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tuserProfile: {},\n\t\t\tvirtualRoles: [{ value: 'Virtual Nurse' }, { value: 'Virtual Case Manager' }, { value: 'Virtual Sitter' }, { value: 'Virtual Intensivist' }],\n\t\t\tcurrentPassword: '',\n\t\t\tnewPassword: '',\n\t\t\tnewConfirmedPassword: '',\n\t\t\tpasswordInfo: ChangePasswordUseCases.passwordInfo,\n\t\t\tpasswordAlertVariant: 'neutral',\n\t\t\tisConfirmPasswordChangeModalOpen: false,\n\t\t\tselectedTab: 0,\n\t\t};\n\n\t\tthis.COMPANY_INFO = {\n\t\t\tSTARTED: 'Mon Mar 12 2018 00:00:00',\n\t\t\tNAME: 'Banyan',\n\t\t};\n\n\t\tthis.TABS = {\n\t\t\tEDIT_PROFILE: 0,\n\t\t\tCHANGE_PASSWORD: 1,\n\t\t};\n\t}\n\n\tcomponentDidMount = () => {\n\t\tconst locations = this.getUserLocations();\n\t\tconst userProfile = getUserProfile();\n\t\tconst virtualRoleKey = this.state.virtualRoles.findIndex(r => r.value === userProfile.jobTitle);\n\t\tthis.setState({\n\t\t\tuserProfile: {\n\t\t\t\tfullName: `${userProfile.firstName} ${userProfile.lastName}`,\n\t\t\t\tprofilePicUrl: userProfile.profilePicture.url,\n\t\t\t\tvirtualRole: userProfile.jobTitle,\n\t\t\t\tvirtualRoleKey: virtualRoleKey,\n\t\t\t\tuserWorkExperienceId: userProfile.jobId,\n\t\t\t\tlocations: locations,\n\t\t\t},\n\t\t});\n\t};\n\n\tgetUserLocations() {\n\t\tlet locations = [];\n\t\tthis.props.organization.allHealthSystems.forEach(healthSystem => locations.push({ description: healthSystem.name }));\n\t\treturn locations;\n\t}\n\n\tsaveAccountSettings = () => {\n\t\tif (this.state.selectedTab === this.TABS.EDIT_PROFILE) {\n\t\t\tthis.editProfile();\n\t\t} else if (this.state.selectedTab === this.TABS.CHANGE_PASSWORD) {\n\t\t\tthis.changePassword();\n\t\t}\n\t};\n\n\teditProfile = async () => {\n\t\tconst userProfile = getUserProfile();\n\t\tconst { virtualRole, userWorkExperienceId } = this.state.userProfile;\n\t\tconst data = {\n\t\t\tcompanyName: this.COMPANY_INFO.NAME,\n\t\t\tfromDate: this.COMPANY_INFO.STARTED,\n\t\t\tjobDescription: virtualRole,\n\t\t\tjobTitle: virtualRole,\n\t\t\tisCurrent: true,\n\t\t\tshowCompanyOnPage: true,\n\t\t\ttoDate: null,\n\t\t};\n\n\t\tlet response;\n\t\tlet userHasRole = userWorkExperienceId !== 0;\n\t\tif (userHasRole) {\n\t\t\tresponse = await this.props.mainLayoutActions.updateUserRole(data);\n\t\t} else {\n\t\t\tresponse = await this.props.mainLayoutActions.addNewUserRole({\n\t\t\t\t...data,\n\t\t\t\tidUserCompanyId: userWorkExperienceId,\n\t\t\t});\n\t\t}\n\n\t\tsetUserProfile({\n\t\t\t...userProfile,\n\t\t\tjobTitle: response.data.entityData.JobTitle,\n\t\t\tjobId: userHasRole ? response.data.entityData.IdUserCompanies : null,\n\t\t});\n\t\tthis.props.toggleAccountSettingsModal();\n\t};\n\n\tchangeVirtualRole = (selection, index) => {\n\t\tlet user = this.state.userProfile;\n\t\tthis.setState({\n\t\t\tuserProfile: {\n\t\t\t\t...user,\n\t\t\t\tvirtualRole: selection.value,\n\t\t\t\tvirtualRoleKey: index,\n\t\t\t},\n\t\t});\n\t};\n\n\tvalidatePassword = () => {\n\t\tlet { currentPassword, newPassword, newConfirmedPassword } = this.state;\n\t\tlet message;\n\t\tif (currentPassword === '') {\n\t\t\tmessage = ChangePasswordUseCases.currentPassEmpty;\n\t\t} else if (newPassword === '') {\n\t\t\tmessage = ChangePasswordUseCases.newPassEmpty;\n\t\t} else if (newPassword.length < 8) {\n\t\t\tmessage = ChangePasswordUseCases.minLengthRequired;\n\t\t} else if (newConfirmedPassword === '') {\n\t\t\tmessage = ChangePasswordUseCases.confirmNewPassEmpty;\n\t\t} else if (newPassword !== newConfirmedPassword) {\n\t\t\tmessage = ChangePasswordUseCases.newPasswordsDoNotMatch;\n\t\t} else if (currentPassword === newPassword) {\n\t\t\tmessage = ChangePasswordUseCases.newPassSameAsCurrent;\n\t\t} else if (passwordRegEx.test(newPassword) === false || passwordRegEx.test(newConfirmedPassword) === false) {\n\t\t\tmessage = ChangePasswordUseCases.strongPasswordCheck;\n\t\t}\n\t\treturn message;\n\t};\n\n\tresetPasswordFields = () => {\n\t\tthis.setState({\n\t\t\tpasswordData: {\n\t\t\t\t...this.state.passwordData,\n\t\t\t\tnewPassword: '',\n\t\t\t\tnewConfirmedPassword: '',\n\t\t\t},\n\t\t});\n\t};\n\n\tchangePassword = () => {\n\t\tlet message = this.validatePassword();\n\t\tif (message) {\n\t\t\tif (message === ChangePasswordUseCases.newPasswordsDoNotMatch) {\n\t\t\t\tthis.resetPasswordFields();\n\t\t\t}\n\t\t\tthis.setPasswordErrorMessage(message);\n\t\t} else {\n\t\t\tthis.toggleConfirmPasswordDialog();\n\t\t}\n\t};\n\n\tsavePasswordChanges = async () => {\n\t\ttry {\n\t\t\tconst response = await changePassword({\n\t\t\t\toldpassword: this.state.currentPassword,\n\t\t\t\tnewpassword: this.state.newPassword,\n\t\t\t});\n\t\t\tif (response.HasSucceed) {\n\t\t\t\tthis.setState(\n\t\t\t\t\t{\n\t\t\t\t\t\tpasswordInfo: ChangePasswordUseCases.newPassSaved,\n\t\t\t\t\t},\n\t\t\t\t\t() => {\n\t\t\t\t\t\tthis.signOut();\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tthis.setState({\n\t\t\t\tpasswordInfo: ChangePasswordUseCases.currentPasswordIncorrect,\n\t\t\t\tpasswordAlertVariant: 'error',\n\t\t\t\tcurrentPassword: '',\n\t\t\t\tnewPassword: '',\n\t\t\t\tnewConfirmedPassword: '',\n\t\t\t\tisConfirmPasswordChangeModalOpen: false,\n\t\t\t});\n\t\t}\n\t};\n\n\tsetPasswordErrorMessage = msg => {\n\t\tthis.setState({\n\t\t\tpasswordInfo: msg,\n\t\t\tpasswordAlertVariant: 'neutral',\n\t\t});\n\t};\n\n\ttoggleConfirmPasswordDialog = () => {\n\t\tthis.setState({\n\t\t\tisConfirmPasswordChangeModalOpen: !this.state.isConfirmPasswordChangeModalOpen,\n\t\t});\n\t};\n\n\tsetInputValue = event => {\n\t\tthis.setState({\n\t\t\t[event.target.name]: event.target.value,\n\t\t});\n\t};\n\n\tsignOut = () => {\n\t\tthis.props.history.push('/logout');\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t this.setState({ selectedTab: index })}\n\t\t\t\t\t\tcomponents={[\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t

    {this.state.userProfile.fullName}

    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t

    Health Systems

    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t,\n\t\t\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t,\n\t\t\t\t\t\t]}\n\t\t\t\t\t/>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    Are you sure you want to change your password? You will be logged out of your account and must login with your new credentials.

    \n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n\nexport default UserSettingsModal;\n","import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { actionCreators as organizationActionCreators } from 'state/organization/actions';\nimport { actionCreators as mainLayoutActionCreators } from 'state/mainLayout/actions';\nimport { withRouter } from 'react-router-dom';\nimport { UserRoles, PresenceStatusType, PresenceStatusTypeLabels, FeedColors } from 'constants/enums';\nimport { getUserNotifications, changeNotificationReadStatus } from 'api/notifications';\nimport { getUserProfile, getUserId, getUserRole } from 'infrastructure/auth';\nimport { ListGroup, Badge, Breadcrumb, Dropdown, Input, Avatar, Modal, Form } from 'components';\nimport { updateUserPresence, fetchUserPresence } from 'state/userPresence/actions';\nimport { fetchNotificationCounter } from 'state/notifications/actions';\nimport { utcToLocalTime } from 'infrastructure/helpers/dateHelper';\nimport { postMessage } from 'infrastructure/helpers/notificationsChannel';\nimport moment from 'moment';\nimport { BanyanAppType } from 'constants/global-variables';\nimport { getCurrentHealthSystemInfo, getNursePoolingStatus } from 'infrastructure/helpers/commonHelpers';\nimport EditPoolingModal from 'components/EditPoolingModal';\nimport UserSettingsModal from 'components/UserSettings/UserSettingsModal';\n\nclass Header extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.userPresenceDropdownRef = React.createRef();\n\t\tthis.state = {\n\t\t\tcustomMessage: '',\n\t\t\tuserProfile: {},\n\t\t\tnotifications: [],\n\t\t\tnotificationsPageNo: 0,\n\t\t\tnotificationsPageSize: 10,\n\t\t\thasMoreNotifications: true,\n\t\t\tisAccountSettingsModalOpen: false,\n\t\t\tisEditPoolingModalOpen: false,\n\t\t\tisVCPRoleModalOpen: false,\n\t\t\tisSwitchPresenceModalVisible: false,\n\t\t};\n\t}\n\n\tprecautions = [\n\t\t{\n\t\t\ttitle: 'Suspicious Behavior',\n\t\t\tcolor: FeedColors.purple,\n\t\t},\n\t\t{\n\t\t\ttitle: 'Suicide Watch',\n\t\t\tcolor: FeedColors.cyan,\n\t\t},\n\t\t{\n\t\t\ttitle: 'Falls',\n\t\t\tcolor: FeedColors.yellow,\n\t\t},\n\t\t{\n\t\t\ttitle: 'Isolation',\n\t\t\tcolor: FeedColors.red,\n\t\t},\n\t\t{\n\t\t\ttitle: 'Seizure',\n\t\t\tcolor: FeedColors.pink,\n\t\t},\n\t\t{\n\t\t\ttitle: 'Hospice',\n\t\t\tcolor: FeedColors.black,\n\t\t},\n\t\t{\n\t\t\ttitle: 'Detox',\n\t\t\tcolor: FeedColors.orange,\n\t\t},\n\t\t{\n\t\t\ttitle: 'Pulling O2',\n\t\t\tcolor: FeedColors.lightBlue,\n\t\t},\n\t\t{\n\t\t\ttitle: 'Impulsive/Confused',\n\t\t\tcolor: FeedColors.gray,\n\t\t},\n\t\t{\n\t\t\ttitle: 'Non-redirectable',\n\t\t\tcolor: FeedColors.blue,\n\t\t},\n\t];\n\n\tcomponentDidMount = async () => {\n\t\tconst userProfile = getUserProfile();\n\t\tconst user = {\n\t\t\tfullName: `${userProfile.firstName} ${userProfile.lastName}`,\n\t\t\tprofilePicUrl: userProfile.profilePicture.url,\n\t\t\tvirtualRole: userProfile.jobTitle,\n\t\t\tvirtualRoleKey: null,\n\t\t\tuserWorkExperienceId: 0,\n\t\t\tlocations: [],\n\t\t};\n\t\tthis.setState({\n\t\t\tuserProfile: user,\n\t\t});\n\t\tthis.props.fetchNotificationCounter();\n\t};\n\n\tcomponentWillUnmount() {\n\t\tthis.props.organizationActions.updateBreadcrumb([]);\n\t}\n\n\tupdateUserPresence = key => {\n\t\tthis.userPresenceDropdownRef.current.toggleDropdown(false);\n\t\tif (key === this.props.userPresence.presenceStatusTypeId && this.state.customMessage === this.props.userPresence.customMessage) {\n\t\t\treturn;\n\t\t}\n\t\tthis.props.updateUserPresence(getUserId(), this.state.customMessage, key);\n\t};\n\n\tonBreadcrumbClick = (options, breadcrumbIndex) => {\n\t\tlet breadcrumb = [];\n\t\toptions.forEach((option, index) => {\n\t\t\tif (breadcrumbIndex + 1 > index) {\n\t\t\t\tbreadcrumb.push(option);\n\t\t\t}\n\t\t});\n\t\tthis.props.organizationActions.updateBreadcrumb(breadcrumb);\n\t};\n\n\tloadUserNotifications = async isDropdownOpen => {\n\t\tif (!isDropdownOpen) {\n\t\t\tconst userProfile = getUserProfile();\n\n\t\t\tlet unreadNotifications = [];\n\t\t\tthis.state.notifications.forEach(i => {\n\t\t\t\tif (i.isPreview) {\n\t\t\t\t\t// isPreview means it hasn't been read yet\n\t\t\t\t\tunreadNotifications.push(i.id);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (unreadNotifications.length > 0) {\n\t\t\t\tawait changeNotificationReadStatus(userProfile.userId, unreadNotifications);\n\t\t\t\tthis.props.fetchNotificationCounter();\n\t\t\t}\n\t\t\tpostMessage('Update notifications');\n\t\t\tthis.setState({\n\t\t\t\tnotifications: [],\n\t\t\t\thasMoreNotifications: true,\n\t\t\t\tnotificationsPageNo: 0,\n\t\t\t});\n\t\t} else {\n\t\t\tawait this.getUserNotifications();\n\t\t\tthis.setState({\n\t\t\t\tnotificationsPageNo: this.state.notificationsPageNo + 1,\n\t\t\t});\n\t\t}\n\t};\n\n\tformatTime = date => {\n\t\tlet localDate = utcToLocalTime(date);\n\t\tlet now = new Date();\n\t\tnow.setHours(0, 0, 0, 0);\n\t\tconst isNowAfterTheDate = moment(now).isAfter(localDate);\n\t\treturn isNowAfterTheDate ? moment(localDate).format('dddd, MMMM DD, YYYY - h:mm A') : `Today - ${moment(localDate).format('h:mm A')}`;\n\t};\n\n\tgetUserNotifications = async () => {\n\t\tconst userProfile = getUserProfile();\n\t\tconst response = await getUserNotifications(userProfile.userId, BanyanAppType, this.state.notificationsPageNo, this.state.notificationsPageSize);\n\n\t\tlet { notifications } = this.state;\n\t\tlet hasMoreNotifications;\n\n\t\tresponse.notifications.forEach(i => {\n\t\t\ti.timeAgo = this.formatTime(i.dateCreated);\n\t\t\treturn i;\n\t\t});\n\n\t\tif (response === null) {\n\t\t\tnotifications.push({\n\t\t\t\ttitle: (\n\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t

    An error ocurred trying to fetch notifications!

    \n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t),\n\t\t\t});\n\t\t} else if (response.notifications.length === 0 && this.state.notifications.length === 0) {\n\t\t\tnotifications.push({\n\t\t\t\ttitle: (\n\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t

    You don't have any notifications!

    \n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t),\n\t\t\t});\n\t\t} else {\n\t\t\thasMoreNotifications = response.total < this.state.notificationsPageNo * 10 ? false : true;\n\t\t\tresponse.notifications.forEach(n => {\n\t\t\t\tconst el = {\n\t\t\t\t\tid: n.id,\n\t\t\t\t\tisPreview: n.isPreview,\n\t\t\t\t\ttitle: (\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t{n.isPreview ? (\n\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t\tMissed call from {n.callerName}\n\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t

    Missed call from {n.callerName}

    \n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{n.timeAgo}\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t),\n\t\t\t\t};\n\t\t\t\tnotifications.push(el);\n\t\t\t});\n\t\t}\n\n\t\tthis.setState({\n\t\t\tnotifications: notifications,\n\t\t\thasMoreNotifications: hasMoreNotifications,\n\t\t});\n\t};\n\n\tcheckIfScrolledAtBottom = ({ target }) => {\n\t\tconst hasScrolledAtBottom = Math.ceil(target.scrollTop) >= target.scrollHeight - target.offsetHeight;\n\t\tif (!hasScrolledAtBottom || !this.state.hasMoreNotifications) {\n\t\t\treturn;\n\t\t}\n\t\tthis.setState({\n\t\t\tnotificationsPageNo: this.state.notificationsPageNo + 1,\n\t\t});\n\t\tthis.getUserNotifications();\n\t};\n\n\tonAvailabilityDropdownClick = (evt, { available }) => {\n\t\tif (available) {\n\t\t\tconst noCallsShouldBeReceived = '2';\n\t\t\tif (\n\t\t\t\tgetUserRole() === UserRoles.NURSE &&\n\t\t\t\t(!localStorage.getItem('nursePoolingStatus') || localStorage.getItem('nursePoolingStatus') === noCallsShouldBeReceived)\n\t\t\t) {\n\t\t\t\tthis.setState({\n\t\t\t\t\tisSwitchPresenceModalVisible: true,\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.updateUserPresence(PresenceStatusType.AVAILABLE);\n\t\t} else {\n\t\t\tthis.updateUserPresence(PresenceStatusType.UNAVAILABLE);\n\t\t}\n\t};\n\n\tonUserDropdownClick = (evt, { id }) => {\n\t\tif (id === 'account_settings') {\n\t\t\tthis.toggleAccountSettingsModal();\n\t\t} else if (id === 'log_out') {\n\t\t\tthis.signOut();\n\t\t}\n\t};\n\n\tonCustomMessageChanged = evt => {\n\t\tthis.setState({\n\t\t\tcustomMessage: evt.target.value,\n\t\t});\n\t};\n\n\tonCustomMessageKeyUp = evt => {\n\t\tif (evt.which === 13) {\n\t\t\tthis.props.updateUserPresence(getUserId(), this.state.customMessage, this.props.userPresence.presenceStatusTypeId);\n\t\t\tthis.setState({\n\t\t\t\tcustomMessage: '',\n\t\t\t});\n\t\t}\n\t};\n\n\ttoggleAccountSettingsModal = () => {\n\t\tthis.setState({\n\t\t\tisAccountSettingsModalOpen: !this.state.isAccountSettingsModalOpen,\n\t\t});\n\t};\n\n\ttoggleEditPoolingModal = () => {\n\t\tthis.setState({\n\t\t\tisEditPoolingModalOpen: !this.state.isEditPoolingModalOpen,\n\t\t});\n\t};\n\n\tsignOut = () => {\n\t\tthis.props.history.push('/logout');\n\t};\n\n\trender() {\n\t\tconst userRole = getUserRole();\n\t\treturn (\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t{this.props.isMonitoring && (\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t{this.precautions.map(item => (\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tfiber_manual_record\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t{item.title}\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!this.props.isMonitoring && }\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t {\n\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\tisSwitchPresenceModalVisible: false,\n\t\t\t\t\t\t\tisEditPoolingModalOpen: true,\n\t\t\t\t\t\t});\n\t\t\t\t\t}}\n\t\t\t\t\tonModalClose={() => {\n\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\tisSwitchPresenceModalVisible: false,\n\t\t\t\t\t\t});\n\t\t\t\t\t}}>\n\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t

    To switch your presence to “Available“ please make sure you select option “I will be receiving calls“.

    \n\t\t\t\t\t
    \n\t\t\t\t\n\n\t\t\t\t{this.state.isEditPoolingModalOpen && }\n\t\t\t
    \n\t\t);\n\t}\n}\n\nconst mapStateToProps = state => {\n\treturn {\n\t\torganization: state.organization,\n\t\tuserPresence: state.userPresence,\n\t\tnotifications: state.notifications,\n\t};\n};\n\nconst mapDispatchToProps = dispatch => {\n\treturn {\n\t\torganizationActions: bindActionCreators(organizationActionCreators, dispatch),\n\t\tmainLayoutActions: bindActionCreators(mainLayoutActionCreators, dispatch),\n\t\tfetchUserPresence: () => dispatch(fetchUserPresence()),\n\t\tupdateUserPresence: (userId, customMessage, presenceStatusTypeId) => dispatch(updateUserPresence(userId, customMessage, presenceStatusTypeId)),\n\t\tfetchNotificationCounter: () => dispatch(fetchNotificationCounter()),\n\t};\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(withRouter(Header));\n","import React from 'react';\nimport Layout from 'components/Common/Layout';\nimport { Grid } from 'components';\nimport Header from 'components/Common/Header';\nimport PoolingFlow from 'containers/PoolingFlow/index';\n\nconst PoolingFlowWrapper = props => (\n\t\n\t\t\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t props.history.push('/health-system')} />\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t
    \n\t\t
    \n\t
    \n);\n\nexport default PoolingFlowWrapper;\n","import React from 'react';\nimport { Route } from 'react-router-dom';\nimport Loader from 'components/Loader';\nimport Grid from 'components/Grid';\nimport { memberExists, getUserRole } from 'infrastructure/auth';\nimport UserError from 'views/UserError';\nimport { UserRoles } from 'constants/enums';\nimport PoolingFlowWrapper from 'views/PoolingFlowWrapper';\nimport { getNursePoolingStatus } from 'infrastructure/helpers/commonHelpers';\nimport { AuthConsumer } from '../providers/authProvider';\n\n// eslint-disable-next-line import/prefer-default-export\nexport const PrivateRoute = ({ component, roles, ...rest }) => {\n\tconst renderFn = Component => props => (\n\t\t\n\t\t\t{({ isAuthenticated, signinRedirect }) => {\n\t\t\t\tif (!!Component && isAuthenticated()) {\n\t\t\t\t\tlet canAccessRoute = true;\n\t\t\t\t\tif (roles) {\n\t\t\t\t\t\tcanAccessRoute = roles.some(r => r === getUserRole());\n\t\t\t\t\t}\n\t\t\t\t\tif ((memberExists() || props.match.url === '/logout') && canAccessRoute) {\n\t\t\t\t\t\tif (getUserRole() === UserRoles.NURSE && !getNursePoolingStatus()) {\n\t\t\t\t\t\t\treturn ;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn ;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn ;\n\t\t\t\t}\n\n\t\t\t\tsigninRedirect();\n\t\t\t\treturn (\n\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t);\n\t\t\t}}\n\t\t
    \n\t);\n\n\treturn ;\n};\n","import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { actionCreators } from 'state/organization/actions';\nimport { Modal, Form, Input, Alert } from 'components';\nimport { deleteOrgUnit } from 'api/organization';\nimport { editRegionName, createNewRegion, editHealthSystemName } from 'api/healthSystems';\nimport { DeviceListLevel } from 'constants/enums';\nimport { getCurrentHealthSystemInfo } from 'infrastructure/helpers/commonHelpers';\nimport { setTimeout } from 'timers';\nimport { treeSectorNameMaxCharacters } from 'constants/global-variables';\n\nclass EditHealthSystemModal extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tisConfirmDeleteRegionModalOpen: false,\n\t\t\tcurrentRegions: [],\n\t\t\thealthSystemName: '',\n\t\t\thealthSystemId: '',\n\t\t\tisRegionSelected: false,\n\t\t\tshowSuccessAlert: false,\n\t\t\tshowErrorAlert: false,\n\t\t\tregionError: '',\n\t\t\thealthSystemNameError: '',\n\t\t};\n\t\tthis.hasPressedEnter = 13;\n\t\tthis.healthSystemActionsEnum = {\n\t\t\tEDIT_HEALTH_SYSTEM: 0,\n\t\t\tEDIT_REGION_NAME: 1,\n\t\t\tCREATE_NEW_REGION: 2,\n\t\t\tDELETE_HEALTH_SYSTEM: 3,\n\t\t\tDELETE_REGION: 4,\n\t\t};\n\t}\n\n\tcomponentDidUpdate(prevProps) {\n\t\tlet currentRegionsChanged = JSON.stringify(this.props.currentRegions) !== JSON.stringify(prevProps.currentRegions);\n\t\tif (currentRegionsChanged) {\n\t\t\tthis.setState({\n\t\t\t\tcurrentRegions: this.props.currentRegions,\n\t\t\t\thealthSystemName: this.props.healthSystemData.currentHealthSystemName,\n\t\t\t\thealthSystemId: this.props.healthSystemData.currentHealthSystemId,\n\t\t\t});\n\t\t}\n\t}\n\n\teditHealthSystemActions = async data => {\n\t\tswitch (data.action) {\n\t\t\tcase this.healthSystemActionsEnum.EDIT_HEALTH_SYSTEM:\n\t\t\t\tawait editHealthSystemName(data.healthSystemId, data.newHealthSystemName);\n\t\t\t\tbreak;\n\t\t\tcase this.healthSystemActionsEnum.EDIT_REGION_NAME:\n\t\t\t\tawait editRegionName(data.healthSystemId, data.regionId, data.newRegionName);\n\t\t\t\tbreak;\n\t\t\tcase this.healthSystemActionsEnum.CREATE_NEW_REGION:\n\t\t\t\treturn createNewRegion(data.healthSystemId, data.newRegionName);\n\t\t\tcase this.healthSystemActionsEnum.DELETE_HEALTH_SYSTEM:\n\t\t\t\tawait deleteOrgUnit(DeviceListLevel.HEALTHSYSTEM, data.healthSystemId);\n\t\t\t\tbreak;\n\t\t\tcase this.healthSystemActionsEnum.DELETE_REGION:\n\t\t\t\tawait deleteOrgUnit(DeviceListLevel.REGION, data.regionId);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t};\n\n\tsetHealthSystemInputValue = evt => {\n\t\tthis.setState({\n\t\t\t[evt.target.name]: evt.target.value,\n\t\t});\n\n\t\tif (evt.which === this.hasPressedEnter) {\n\t\t\tthis.saveHealthSystemName(evt.target.value);\n\t\t}\n\t};\n\n\tsaveHealthSystemName = async healthSystemName => {\n\t\tif (this.checkIfHealthSystemExists()) {\n\t\t\tthis.setState({\n\t\t\t\thealthSystemNameError: 'Health system with this name already exists',\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.state.healthSystemName.length > treeSectorNameMaxCharacters) {\n\t\t\tthis.setState({\n\t\t\t\thealthSystemNameError: `Name can't be longer than ${treeSectorNameMaxCharacters} characters`,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tlet { currentHealthSystemId } = getCurrentHealthSystemInfo();\n\t\tawait this.editHealthSystemActions({\n\t\t\taction: this.healthSystemActionsEnum.EDIT_HEALTH_SYSTEM,\n\t\t\thealthSystemId: currentHealthSystemId,\n\t\t\tnewHealthSystemName: healthSystemName,\n\t\t});\n\t\tthis.props.onHealthSystemNameChange(healthSystemName);\n\t\tthis.toggleAlert('showSuccessAlert');\n\t\tthis.setState({\n\t\t\thealthSystemNameError: '',\n\t\t});\n\t};\n\n\tsetRegionInputValue = async (evt, region) => {\n\t\tconst keyPressed = evt.which;\n\t\tconst inputVal = evt.target.value;\n\t\tregion.name = inputVal;\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tcurrentRegions: this.state.currentRegions,\n\t\t\t\tregionError: '',\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tif (keyPressed === this.hasPressedEnter) {\n\t\t\t\t\tif (this.regionExist(region)) {\n\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\tregionError: 'Location with this name already exists.',\n\t\t\t\t\t\t});\n\t\t\t\t\t} else if (region.name.length > treeSectorNameMaxCharacters) {\n\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\tregionError: `Location(s) name can't be longer than ${treeSectorNameMaxCharacters} characters`,\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.saveRegionName(region, inputVal);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t};\n\n\tcheckIfHealthSystemExists = () =>\n\t\tthis.props.allHealthSystems.some(healthSystem => healthSystem.name.toLowerCase() === this.state.healthSystemName.toLowerCase());\n\n\tregionExist = region => {\n\t\treturn this.state.currentRegions.some(r => r.name === region.name && r.id !== region.id);\n\t};\n\n\tsaveRegionName = async (region, regionName) => {\n\t\tlet { currentHealthSystemId } = getCurrentHealthSystemInfo();\n\t\tif (region.isNewRegion) {\n\t\t\tlet response = await this.editHealthSystemActions({\n\t\t\t\taction: this.healthSystemActionsEnum.CREATE_NEW_REGION,\n\t\t\t\thealthSystemId: currentHealthSystemId,\n\t\t\t\tnewRegionName: regionName,\n\t\t\t});\n\n\t\t\tregion.id = response.id;\n\t\t\tregion.isNewRegion = false;\n\t\t} else {\n\t\t\tawait this.editHealthSystemActions({\n\t\t\t\taction: this.healthSystemActionsEnum.EDIT_REGION_NAME,\n\t\t\t\thealthSystemId: currentHealthSystemId,\n\t\t\t\tregionId: region.id,\n\t\t\t\tnewRegionName: regionName,\n\t\t\t});\n\t\t}\n\t\tthis.toggleAlert('showSuccessAlert');\n\t};\n\n\tremoveRegion = regionId => {\n\t\tlet regions = this.state.currentRegions.filter(currentRegion => currentRegion.id !== regionId);\n\t\tthis.setState({\n\t\t\tcurrentRegions: regions,\n\t\t});\n\t};\n\n\taddNewRegion = () => {\n\t\tlet regions = this.state.currentRegions.map(currentRegion => ({ ...currentRegion }));\n\t\tregions.push({\n\t\t\tisNewRegion: true,\n\t\t\tname: '',\n\t\t\tid: JSON.stringify(new Date().getTime()),\n\t\t});\n\n\t\tthis.setState({\n\t\t\tcurrentRegions: regions,\n\t\t});\n\t};\n\n\tdeleteSelected = async () => {\n\t\tlet { currentHealthSystemId, currentRegionId } = getCurrentHealthSystemInfo();\n\t\tif (this.state.isRegionSelected) {\n\t\t\tlet { isNewRegion } = this.state.currentRegions.find(currentRegion => currentRegion.id === this.state.selectedRegionId);\n\t\t\tif (!isNewRegion) {\n\t\t\t\tawait this.editHealthSystemActions({\n\t\t\t\t\taction: this.healthSystemActionsEnum.DELETE_REGION,\n\t\t\t\t\tregionId: this.state.selectedRegionId,\n\t\t\t\t});\n\t\t\t}\n\t\t\tconst isCurrentRegion = this.state.currentRegions.some(({ id }) => id === currentRegionId);\n\t\t\tthis.removeRegion(this.state.selectedRegionId);\n\t\t\tif (isCurrentRegion) {\n\t\t\t\tthis.moveToAnotherRegion();\n\t\t\t}\n\t\t} else {\n\t\t\tawait this.editHealthSystemActions({\n\t\t\t\taction: this.healthSystemActionsEnum.DELETE_HEALTH_SYSTEM,\n\t\t\t\thealthSystemId: currentHealthSystemId,\n\t\t\t});\n\t\t\tthis.props.onHealthSystemDelete();\n\t\t}\n\t\tthis.toggleConfirmDeleteModal();\n\t};\n\n\tmoveToAnotherRegion = () => {\n\t\tlet newHealthSystemInfo = {\n\t\t\tcurrentHealthSystemId: this.state.healthSystemId,\n\t\t\tcurrentRegionId: this.state.currentRegions[0].id,\n\t\t\tcurrentHealthSystemName: this.state.healthSystemName,\n\t\t};\n\n\t\tlocalStorage.setItem('currentHealthSystemInfo', JSON.stringify(newHealthSystemInfo));\n\t\tthis.props.onCurrentRegionDelete(this.state.currentRegions[0].id, 0);\n\t};\n\n\ttoggleConfirmDeleteModal = regionId => {\n\t\tif (regionId && this.state.currentRegions.length < 2) {\n\t\t\tthis.toggleAlert('showErrorAlert');\n\t\t} else {\n\t\t\tthis.setState({\n\t\t\t\tisConfirmDeleteRegionModalOpen: !this.state.isConfirmDeleteRegionModalOpen,\n\t\t\t\tisRegionSelected: !!regionId,\n\t\t\t\tselectedRegionId: regionId,\n\t\t\t});\n\t\t}\n\t};\n\n\ttoggleAlert = type => {\n\t\tthis.setState({\n\t\t\t[type]: true,\n\t\t});\n\n\t\tsetTimeout(() => {\n\t\t\tthis.setState({\n\t\t\t\t[type]: false,\n\t\t\t});\n\t\t}, 3000);\n\n\t\tif (document.activeElement instanceof HTMLElement) {\n\t\t\tdocument.activeElement.blur();\n\t\t}\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t{this.state.currentRegions.map(region => (\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t this.setRegionInputValue(evt, region)}\n\t\t\t\t\t\t\t\t\tonChange={evt => this.setRegionInputValue(evt, region)}\n\t\t\t\t\t\t\t\t\ttype='text'\n\t\t\t\t\t\t\t\t\tvalue={region.name}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t this.toggleConfirmDeleteModal(region.id)}>\n\t\t\t\t\t\t\t\t\tdelete\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t))}\n\t\t\t\t\t\t

    {this.state.regionError}

    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\tPress enter to save\n\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t+ Add new location\n\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t this.toggleConfirmDeleteModal()}>\n\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t

    Are you sure you want to delete {this.state.isRegionSelected ? 'location' : 'health system'}?

    \n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n\nexport default connect(\n\tstate => state.organization,\n\tdispatch => bindActionCreators(actionCreators, dispatch)\n)(EditHealthSystemModal);\n","import React, { Component } from 'react';\nimport _ from 'lodash';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { actionCreators } from 'state/organization/actions';\nimport { withRouter } from 'react-router-dom';\nimport { SocketContext } from 'io-client/SocketContext';\nimport { getCurrentHealthSystemInfo, findSectorById, isValidSector, searchSectors, showPath, findDeviceById } from 'infrastructure/helpers/commonHelpers';\nimport { Dropdown, ListGroup, TreeView, Grid, SkeletonLoader, Form, Select, Modal, Input } from 'components';\nimport { getUserRole } from 'infrastructure/auth';\nimport EditHealthSystemModal from 'components/Common/EditHealthSystemModal';\nimport { SectorTypes, UserRoles, ObjectType } from 'constants/enums';\nimport SocketEvents from 'constants/socket-events';\n\nclass SectorList extends Component {\n\tstatic defaultProps = {\n\t\tisMonitoring: false,\n\t};\n\n\tconstructor(props, context) {\n\t\tsuper(props, context);\n\t\tthis.state = {\n\t\t\thealthSystems: [],\n\t\t\tcurrentRegions: [],\n\t\t\tisSwitchHealthSystemModalOpen: false,\n\t\t\tisSwitchHealthSystemModalLoading: true,\n\t\t\tisEditHealthSystemModalOpen: false,\n\t\t\ttreeItems: {},\n\t\t\tshowFeedsLimitModal: false,\n\t\t\tsectorSearchValue: '',\n\t\t\texpandAllTreeItems: false,\n\t\t};\n\n\t\tthis.healthSystemOptions =\n\t\t\tgetUserRole() === UserRoles.ADMIN\n\t\t\t\t? [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttitle: 'Switch Health System',\n\t\t\t\t\t\t\ticon: 'compare_arrows',\n\t\t\t\t\t\t\tid: 'switch_hs',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttitle: 'Create New Health System',\n\t\t\t\t\t\t\ticon: 'add_circle_outline',\n\t\t\t\t\t\t\tlinkTo: '/create',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttitle: 'Edit Health System',\n\t\t\t\t\t\t\tid: 'edit_hs',\n\t\t\t\t\t\t\ticon: 'edit',\n\t\t\t\t\t\t},\n\t\t\t\t ]\n\t\t\t\t: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttitle: 'Switch Location',\n\t\t\t\t\t\t\ticon: 'compare_arrows',\n\t\t\t\t\t\t\tid: 'switch_hs',\n\t\t\t\t\t\t},\n\t\t\t\t ];\n\t\tthis.socket = context;\n\t}\n\n\tcomponentDidMount = async () => {\n\t\tlet currentHealthSystemInfo = getCurrentHealthSystemInfo();\n\t\tlet currentHealthSystemName = this.props.allHealthSystems.filter(healthSystem => {\n\t\t\treturn currentHealthSystemInfo.currentHealthSystemId === healthSystem.id;\n\t\t});\n\n\t\tthis.setState({\n\t\t\t...currentHealthSystemInfo,\n\t\t\tcurrentHealthSystemName: currentHealthSystemName[0].name,\n\t\t});\n\n\t\tawait this.props.getTreeData();\n\t\tconst hasHospitals = this.hasHospitals();\n\t\tif (window.location.pathname === '/health-system' && [UserRoles.ADMIN, UserRoles.SUPERUSER].includes(getUserRole()) && hasHospitals) {\n\t\t\tthis.props.history.push(`/health-system/${this.props.currentHospitalId}`);\n\t\t} else if (!this.props.isMonitoring && !hasHospitals) {\n\t\t\tthis.props.history.push(`/health-system`);\n\t\t}\n\t\tthis.getSelectedSectorFromUrl();\n\t\tlet selectedSectorId = this.getSelectedSectorId();\n\t\tif (selectedSectorId && hasHospitals) {\n\t\t\tlet selectedSector = findSectorById(this.props.treeData.tree, selectedSectorId);\n\t\t\tif (selectedSector !== null) this.props.updateBreadcrumb(selectedSector.breadcrumb);\n\t\t\telse {\n\t\t\t\tthis.props.history.push(`/health-system/${this.props.currentHospitalId}`);\n\t\t\t}\n\t\t}\n\t\tthis.updateHealthSystemList();\n\t};\n\n\tcomponentDidUpdate = prevProps => {\n\t\tlet isHealthSystemListUpdated = JSON.stringify(this.props.allHealthSystems) !== JSON.stringify(prevProps.allHealthSystems);\n\t\tif (isHealthSystemListUpdated && this.state.isSwitchHealthSystemModalOpen) {\n\t\t\tthis.updateHealthSystemList();\n\t\t}\n\n\t\tif (JSON.stringify(this.props.breadcrumb) !== JSON.stringify(prevProps.breadcrumb)) {\n\t\t\tthis.getSelectedSectorFromUrl();\n\t\t}\n\t};\n\n\tgetSelectedSectorFromUrl = () => {\n\t\tthis.setState({\n\t\t\ttreeItems: this.getExpandedOptions(),\n\t\t\ttreeViewKey: +new Date(),\n\t\t});\n\t};\n\n\tgetExpandedOptions = () => {\n\t\tlet { healthSystem, department, floor, room } = this.props.match.params;\n\t\tlet treeObj = {};\n\t\tif (healthSystem) {\n\t\t\ttreeObj = { [healthSystem]: {} };\n\t\t}\n\t\tif (department) {\n\t\t\ttreeObj = {\n\t\t\t\t[healthSystem]: { [department]: {} },\n\t\t\t};\n\t\t}\n\t\tif (floor) {\n\t\t\ttreeObj = {\n\t\t\t\t[healthSystem]: {\n\t\t\t\t\t[department]: { [floor]: {} },\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\tif (room) {\n\t\t\ttreeObj = {\n\t\t\t\t[healthSystem]: {\n\t\t\t\t\t[department]: {\n\t\t\t\t\t\t[floor]: { [room]: {} },\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\treturn treeObj;\n\t};\n\n\tgetSelectedSectorId = () => {\n\t\tlet { healthSystem, department, floor, room } = this.props.match.params;\n\t\tlet selectedSectorId;\n\t\tif (healthSystem) {\n\t\t\tselectedSectorId = healthSystem;\n\t\t}\n\t\tif (department) {\n\t\t\tselectedSectorId = department;\n\t\t}\n\t\tif (floor) {\n\t\t\tselectedSectorId = floor;\n\t\t}\n\t\tif (room) {\n\t\t\tselectedSectorId = room;\n\t\t}\n\t\treturn selectedSectorId;\n\t};\n\n\tupdateHealthSystemList = () => {\n\t\tlet healthSystems = this.transformHealthSystemArr(this.props.allHealthSystems);\n\t\tlet regions = this.transformRegionsArr(this.props.allHealthSystems[healthSystems.currentHealthSystemIndex].regions);\n\t\tthis.setState({\n\t\t\thealthSystems: healthSystems.allHealthSystems,\n\t\t\tcurrentHealthSystem: healthSystems.allHealthSystems[healthSystems.currentHealthSystemIndex],\n\t\t\tcurrentHealthSystemIndex: healthSystems.currentHealthSystemIndex,\n\t\t\tcurrentRegionId: healthSystems.allHealthSystems[healthSystems.currentHealthSystemIndex].regions[regions.currentRegionIndex].id,\n\t\t\tcurrentRegions: regions.currentRegions,\n\t\t\tcurrentRegionIndex: regions.currentRegionIndex,\n\t\t\tisSwitchHealthSystemModalLoading: false,\n\t\t});\n\t};\n\n\tonNewSector = async sector => {\n\t\tlet isValid = isValidSector(sector, this.props.treeData.tree, sector.name);\n\t\tif (!isValid) {\n\t\t\tsector.error = `${sector.type} with this name already exists`;\n\t\t\treturn;\n\t\t}\n\t\tsector.isNewOption = false;\n\t\tsector.subOptions = [];\n\t\tsector.tooltip = `Add ${sector.type}`;\n\t\tsector.isCreatingSector = true;\n\t\tthis.createNewSector(sector);\n\t};\n\n\tcreateNewSector = async sector => {\n\t\tif (sector.type === SectorTypes.HOSPITAL) {\n\t\t\tawait this.props.createHospital(sector.name);\n\t\t} else if (sector.type === SectorTypes.DEPARTMENT) {\n\t\t\tawait this.props.createDepartment(sector.hospitalId, sector.name);\n\t\t} else if (sector.type === SectorTypes.FLOOR) {\n\t\t\tawait this.props.createFloor(sector.hospitalId, sector.departmentId, sector.name);\n\t\t} else if (sector.type === SectorTypes.ROOM) {\n\t\t\tawait this.props.createRoom(sector.hospitalId, sector.departmentId, sector.floorId, sector.name);\n\t\t}\n\t\tthis.props.getTreeData();\n\t};\n\n\thasNoSectors = () => {\n\t\treturn (\n\t\t\tthis.props.treeData.tree.filter(sector => {\n\t\t\t\treturn !sector.isNewOption && sector.name;\n\t\t\t}).length <= 0\n\t\t);\n\t};\n\n\thasHospitals = () => {\n\t\treturn Object.keys(this.props.treeData.tree[0]).length > 0;\n\t};\n\n\tcreateNewHospital = () => {\n\t\tthis.props.createNewHospital();\n\t};\n\n\ttransformRegionsArr = regions => {\n\t\tlet currentRegions = [];\n\t\tlet currentRegionIndex = 0;\n\t\tregions.forEach((region, regionIndex) => {\n\t\t\tif (region.id === this.state.currentRegionId) {\n\t\t\t\tcurrentRegionIndex = regionIndex;\n\t\t\t}\n\t\t\tcurrentRegions.push({\n\t\t\t\tvalue: region.name,\n\t\t\t\tid: region.id,\n\t\t\t});\n\t\t});\n\t\treturn {\n\t\t\tcurrentRegions,\n\t\t\tcurrentRegionIndex,\n\t\t};\n\t};\n\n\ttransformHealthSystemArr = healthSystems => {\n\t\tlet allHealthSystems = [];\n\t\tlet currentHealthSystemIndex = 0;\n\t\thealthSystems.forEach((healthSystem, healthSystemIndex) => {\n\t\t\tif (healthSystem.id === this.state.currentHealthSystemId) {\n\t\t\t\tcurrentHealthSystemIndex = healthSystemIndex;\n\t\t\t}\n\t\t\tallHealthSystems.push({\n\t\t\t\tvalue: healthSystem.name,\n\t\t\t\tname: healthSystem.name,\n\t\t\t\tid: healthSystem.id,\n\t\t\t\tfirstRegion: healthSystem.regions[0],\n\t\t\t\tregions: healthSystem.regions,\n\t\t\t});\n\t\t});\n\t\treturn {\n\t\t\tallHealthSystems,\n\t\t\tcurrentHealthSystemIndex,\n\t\t};\n\t};\n\n\ttoggleSwitchHealthSystemModal = async () => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisSwitchHealthSystemModalOpen: !this.state.isSwitchHealthSystemModalOpen,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.props.getAllHealthSystems();\n\t\t\t}\n\t\t);\n\t};\n\n\ttoggleEditHealthSystemModal = () => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisEditHealthSystemModalOpen: !this.state.isEditHealthSystemModalOpen,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tif (this.state.isEditHealthSystemModalOpen) {\n\t\t\t\t\tlet currentHealthSystem = this.props.allHealthSystems.filter(healthSystem => {\n\t\t\t\t\t\treturn healthSystem.id === this.state.currentHealthSystemId;\n\t\t\t\t\t});\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tcurrentRegions: currentHealthSystem[0].regions,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t};\n\n\tonTreeViewLinkClick = option => {\n\t\tthis.props.setCurrentSectorLocation(option.treeLocation);\n\n\t\tif (this.props.isMonitoring) {\n\t\t\tthis.props.onTreeViewLinkClick(option);\n\t\t} else {\n\t\t\tthis.props.updateBreadcrumb(option.breadcrumb);\n\t\t}\n\t};\n\n\tchangeHealthSystem = (healthSystem, healthSystemIndex) => {\n\t\tlet regions = this.transformRegionsArr(healthSystem.regions);\n\t\tthis.setState({\n\t\t\tcurrentHealthSystem: healthSystem,\n\t\t\tcurrentHealthSystemIndex: healthSystemIndex,\n\t\t\tcurrentRegions: regions.currentRegions,\n\t\t\tcurrentRegionId: healthSystem.firstRegion.id,\n\t\t\tcurrentRegionIndex: 0,\n\t\t});\n\t};\n\n\tchangeRegion = (region, regionIndex) => {\n\t\tthis.setState({\n\t\t\tcurrentRegionId: region.id,\n\t\t\tcurrentRegionIndex: regionIndex,\n\t\t});\n\t};\n\n\tsetCurrentHealthSystemInfo = async (isSwitchModal = true) => {\n\t\tthis.setState({\n\t\t\tisSwitchHealthSystemModalLoading: true,\n\t\t\texpandAllTreeItems: false,\n\t\t});\n\n\t\tlet newHealthSystemInfo = {\n\t\t\tcurrentHealthSystemId: this.state.currentHealthSystem.id,\n\t\t\tcurrentRegionId: this.state.currentRegionId,\n\t\t\tcurrentHealthSystemName: this.state.currentHealthSystem.name,\n\t\t};\n\n\t\tlocalStorage.setItem('currentHealthSystemInfo', JSON.stringify(newHealthSystemInfo));\n\t\tawait this.props.getTreeData();\n\t\tif (isSwitchModal) {\n\t\t\tthis.toggleSwitchHealthSystemModal();\n\t\t}\n\t\tthis.setState({\n\t\t\tcurrentHealthSystemName: this.state.currentHealthSystem.name,\n\t\t\tcurrentHealthSystemId: this.state.currentHealthSystem.id,\n\t\t\tisSwitchHealthSystemModalLoading: false,\n\t\t\tsectorSearchValue: '',\n\t\t});\n\n\t\tif ([UserRoles.ADMIN, UserRoles.SUPERUSER].includes(getUserRole()) && this.hasHospitals()) {\n\t\t\tthis.props.history.push(`/health-system/${this.props.currentHospitalId}`);\n\t\t} else if (!this.props.isMonitoring) {\n\t\t\tthis.props.history.push(`/health-system`);\n\t\t}\n\t\tthis.props.updateBreadcrumb([]);\n\t\tthis.props.setCurrentHealthSystemInfo(newHealthSystemInfo);\n\t};\n\n\tonAddDevice = selection => {\n\t\tthis.props.addFeed(selection);\n\t};\n\n\thandleHealthSystemOptions = (event, item) => {\n\t\tif (item.id === 'switch_hs') {\n\t\t\tthis.toggleSwitchHealthSystemModal();\n\t\t}\n\n\t\tif (item.id === 'edit_hs') {\n\t\t\tthis.toggleEditHealthSystemModal();\n\t\t}\n\t};\n\n\tswitchHealthSystem = () => {\n\t\tlet firstHealthSystem = this.props.allHealthSystems[0];\n\t\tthis.setState({\n\t\t\tcurrentHealthSystem: firstHealthSystem,\n\t\t\tcurrentHealthSystemId: firstHealthSystem.id,\n\t\t\tcurrentRegionId: firstHealthSystem.regions[0].id,\n\t\t\tcurrentHealthSystemName: firstHealthSystem.name,\n\t\t\tisEditHealthSystemModalOpen: false,\n\t\t});\n\t\tthis.setCurrentHealthSystemInfo(false);\n\t};\n\n\tupdateHealthSystemName = name => {\n\t\tthis.setState({\n\t\t\tcurrentHealthSystemName: name,\n\t\t});\n\t};\n\n\ttoggleFeedsLimitModal = () => {\n\t\tthis.setState({\n\t\t\tshowFeedsLimitModal: !this.state.showFeedsLimitModal,\n\t\t});\n\t};\n\n\tsetSearchValue = event => {\n\t\tconst { target } = event;\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\t[target.name]: target.value,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tif (target.value.length > 1) {\n\t\t\t\t\tlet sectors = searchSectors(this.props.treeData.tree, target.value);\n\t\t\t\t\tshowPath(this.props.treeData.tree, sectors);\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\texpandAllTreeItems: true,\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tsearchSectors(this.props.treeData.tree, '');\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\texpandAllTreeItems: false,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t};\n\n\tsendCheckDeviceActiveConferences = objectId => {\n\t\tthis.socket.emit(SocketEvents.HelloDevice.CHECK_DEVICE_IN_CONFERENCE, { objectId, objectType: ObjectType.HELLO_DEVICE }, ({ activeConferences }) => {\n\t\t\tconst tree = _.cloneDeep(this.props.treeData.tree);\n\t\t\tconst room = findDeviceById(tree, objectId);\n\n\t\t\troom.deviceBusy = activeConferences.length > 0;\n\t\t\troom.activeConferences = activeConferences;\n\t\t\tthis.props.setTreeData({\n\t\t\t\ttree,\n\t\t\t\tpreSelected: this.props.treeData.preSelected,\n\t\t\t});\n\t\t});\n\t};\n\n\tonCurrentRegionDelete = async (id, index) => {\n\t\tthis.changeRegion(id, index);\n\t\tawait this.props.getTreeData();\n\t\tthis.props.history.push('/health-system');\n\t};\n\n\trender() {\n\t\tconst userRole = getUserRole();\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{this.props.treeData.tree.length > 0 && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t{this.state.currentHealthSystemName}\n\t\t\t\t\t\t\t{[UserRoles.ADMIN, UserRoles.SUPERUSER].includes(userRole) && (\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t{[UserRoles.ADMIN].includes(userRole) && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{[UserRoles.NURSE, UserRoles.VIRTUALSITTER].includes(userRole) && (\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\tthis.setState({ isSwitchHealthSystemModalOpen: true });\n\t\t\t\t\t\t\t\t}}>\n\t\t\t\t\t\t\t\tcompare_arrows\n\t\t\t\t\t\t\t\tSwitch Health System\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{this.hasHospitals() && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\t{!this.props.treeData.tree.length && (\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t{userRole !== UserRoles.SUPERUSER && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    You have reached the maximum number of rooms to monitor. You can close one of them in order to add another.

    \n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t this.onCurrentRegionDelete(id, index)}\n\t\t\t\t\tisOpen={this.state.isEditHealthSystemModalOpen}\n\t\t\t\t\tonModalClose={this.toggleEditHealthSystemModal}\n\t\t\t\t\thealthSystemData={{ currentHealthSystemName: this.state.currentHealthSystemName, currentHealthSystemId: this.state.currentHealthSystemId }}\n\t\t\t\t\tcurrentRegions={this.state.currentRegions}\n\t\t\t\t/>\n\t\t\t\n\t\t);\n\t}\n}\n\nSectorList.contextType = SocketContext;\n\nexport default connect(\n\tstate => state.organization,\n\tdispatch => bindActionCreators(actionCreators, dispatch)\n)(withRouter(SectorList));\n","import React, { Component } from 'react';\nimport { Modal, Form, Select, TreeView } from 'components';\nimport { SectorTypes } from 'constants/enums';\nimport { getTreeData, reAssignDevice } from 'api/organization';\nimport { buildTreeModel, getCurrentHealthSystemInfo } from 'infrastructure/helpers/commonHelpers';\n\nclass AssignDeviceModal extends Component {\n\tstate = {\n\t\tcurrentHealthSystem: null,\n\t\tcurrentRegionId: null,\n\t\thealthSystems: [],\n\t\tcurrentRegions: [],\n\t\tisAddDeviceModalLoading: false,\n\t\ttree: [],\n\t};\n\n\tcomponentDidMount = async () => {\n\t\tawait this.updateHealthSystemList();\n\t};\n\n\tcomponentDidUpdate = prevProps => {\n\t\tif (!prevProps.showAssignDeviceModalData.show && this.props.showAssignDeviceModalData.show) {\n\t\t\tthis.updateHealthSystemList();\n\t\t\tconst index = this.state.healthSystems.findIndex(({ id }) => getCurrentHealthSystemInfo().currentHealthSystemId === id);\n\t\t\tthis.changeHealthSystem(this.state.healthSystems[index], index);\n\t\t\tthis.getTree();\n\t\t}\n\t};\n\n\ttransformHealthSystemArr = healthSystems => {\n\t\tlet allHealthSystems = [];\n\t\tlet currentHealthSystemIndex = 0;\n\t\thealthSystems.forEach((healthSystem, healthSystemIndex) => {\n\t\t\tif (healthSystem.id === this.state.currentHealthSystemId) {\n\t\t\t\tcurrentHealthSystemIndex = healthSystemIndex;\n\t\t\t}\n\t\t\tallHealthSystems.push({\n\t\t\t\tvalue: healthSystem.name,\n\t\t\t\tname: healthSystem.name,\n\t\t\t\tid: healthSystem.id,\n\t\t\t\tfirstRegion: healthSystem.regions[0],\n\t\t\t\tregions: healthSystem.regions,\n\t\t\t});\n\t\t});\n\t\treturn {\n\t\t\tallHealthSystems,\n\t\t\tcurrentHealthSystemIndex,\n\t\t};\n\t};\n\n\tupdateHealthSystemList = () => {\n\t\tlet healthSystems = this.transformHealthSystemArr(this.props.allHealthSystems);\n\t\tlet regions = this.transformRegionsArr(this.props.allHealthSystems[healthSystems.currentHealthSystemIndex].regions);\n\t\tthis.setState({\n\t\t\thealthSystems: healthSystems.allHealthSystems,\n\t\t\tcurrentHealthSystem: healthSystems.allHealthSystems[healthSystems.currentHealthSystemIndex],\n\t\t\tcurrentHealthSystemIndex: healthSystems.currentHealthSystemIndex,\n\t\t\tcurrentRegionId: healthSystems.allHealthSystems[healthSystems.currentHealthSystemIndex].regions[regions.currentRegionIndex].id,\n\t\t\tcurrentRegions: regions.currentRegions,\n\t\t\tcurrentRegionIndex: regions.currentRegionIndex,\n\t\t});\n\t};\n\n\tchangeHealthSystem = (healthSystem, healthSystemIndex) => {\n\t\tlet regions = this.transformRegionsArr(healthSystem.regions);\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tcurrentHealthSystem: healthSystem,\n\t\t\t\tcurrentHealthSystemIndex: healthSystemIndex,\n\t\t\t\tcurrentRegions: regions.currentRegions,\n\t\t\t\tcurrentRegionId: healthSystem.firstRegion.id,\n\t\t\t\tcurrentRegionIndex: 0,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.getTree();\n\t\t\t}\n\t\t);\n\t};\n\n\ttransformRegionsArr = regions => {\n\t\tlet currentRegions = [];\n\t\tlet currentRegionIndex = 0;\n\t\tregions.forEach((region, regionIndex) => {\n\t\t\tif (region.id === this.state.currentRegionId) {\n\t\t\t\tcurrentRegionIndex = regionIndex;\n\t\t\t}\n\t\t\tcurrentRegions.push({\n\t\t\t\tvalue: region.name,\n\t\t\t\tid: region.id,\n\t\t\t});\n\t\t});\n\t\treturn {\n\t\t\tcurrentRegions,\n\t\t\tcurrentRegionIndex,\n\t\t};\n\t};\n\n\tchangeRegion = (region, regionIndex) => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tcurrentRegionId: region.id,\n\t\t\t\tcurrentRegionIndex: regionIndex,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.getTree();\n\t\t\t}\n\t\t);\n\t};\n\n\tgetTree = async () => {\n\t\tconst hospitals = await getTreeData(this.state.currentHealthSystem.id, this.state.currentRegionId);\n\t\tconst tree = buildTreeModel(hospitals, true);\n\t\tthis.setState({\n\t\t\ttree,\n\t\t});\n\t};\n\n\tonNewSector = async selection => {\n\t\tif (selection.type === SectorTypes.HOSPITAL) {\n\t\t\tawait this.props.createHospital(selection.name);\n\t\t} else if (selection.type === SectorTypes.DEPARTMENT) {\n\t\t\tawait this.props.createDepartment(selection.hospitalId, selection.name);\n\t\t} else if (selection.type === SectorTypes.FLOOR) {\n\t\t\tawait this.props.createFloor(selection.hospitalId, selection.departmentId, selection.name);\n\t\t} else if (selection.type === SectorTypes.ROOM) {\n\t\t\tawait this.props.createRoom(selection.hospitalId, selection.departmentId, selection.floorId, selection.name);\n\t\t}\n\t\tthis.getTree();\n\t\tthis.props.getTreeData();\n\t};\n\n\tassignDevice = async ({ hospitalId, departmentId, floorId, roomId }) => {\n\t\tthis.setState({\n\t\t\tisAddDeviceModalLoading: true,\n\t\t});\n\t\tawait reAssignDevice({ hospitalId, departmentId, floorId, roomId, deviceId: this.props.showAssignDeviceModalData.deviceId });\n\t\tthis.setState({\n\t\t\tisAddDeviceModalLoading: false,\n\t\t});\n\t\tthis.props.getTreeData();\n\t\tthis.props.toggleAssignDeviceModal({ show: false, assignCompleted: true });\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t null}\n\t\t\t\tposition='right'\n\t\t\t\tsubmitButtonText=''\n\t\t\t\tonModalClose={() => this.props.toggleAssignDeviceModal({ show: false, assignCompleted: false })}>\n\t\t\t\t
    evt.preventDefault()}>\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t

    Select room

    \n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n\nexport default AssignDeviceModal;\n","import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { actionCreators } from 'state/organization/actions';\nimport Grid from 'components/Grid';\nimport HelloFeatureBlock from 'components/HelloFeatureBlock';\nimport Modal from 'components/Modal';\nimport Form from 'components/Form';\nimport { withRouter } from 'react-router-dom';\nimport { SocketContext } from 'io-client/SocketContext';\nimport { DeviceStatus, MediaPermissions, MediaTypes, StreamError } from 'constants/enums';\nimport { If, Then, Else } from 'react-if';\nimport { findSectorById, askForPermission, checkForPermission, checkIfMediaDevicesPlugged } from 'infrastructure/helpers/commonHelpers';\n\nclass CallPatient extends Component {\n\tconstructor(props, context) {\n\t\tsuper(props, context);\n\t\tthis.state = {\n\t\t\tisDeviceUnavailableModalOpen: false,\n\t\t};\n\n\t\tthis.camStatus = null;\n\t\tthis.micStatus = null;\n\t}\n\n\tasync componentDidMount() {\n\t\tthis.camStatus = await checkForPermission(MediaTypes.CAMERA);\n\t\tthis.micStatus = await checkForPermission(MediaTypes.MICROPHONE);\n\t\tthis.camStatus.onchange = this.onDevicePermissionChange;\n\t\tthis.micStatus.onchange = this.onDevicePermissionChange;\n\t}\n\n\ttoggleDeviceUnavailable = () => {\n\t\tthis.setState({\n\t\t\tisDeviceUnavailableModalOpen: !this.state.isDeviceUnavailableModalOpen,\n\t\t});\n\t};\n\n\tcheckIfRoomAvailable = () => {\n\t\tconst room = findSectorById(this.props.treeData.tree, this.props.match.params.roomId);\n\t\tif (!room) {\n\t\t\treturn null;\n\t\t}\n\t\tif (room.status === DeviceStatus.OFFLINE) {\n\t\t\tthis.setState({ isDeviceUnavailableModalOpen: true });\n\t\t\treturn null;\n\t\t}\n\t\treturn room;\n\t};\n\n\tredirect = ({ to, helloDeviceId, roomName }) => {\n\t\tlet link = '';\n\t\tif (to === 'patient-feed') {\n\t\t\tlink = `/patient-feed/${helloDeviceId}/${encodeURIComponent(roomName)}`;\n\t\t}\n\t\tif (to === 'audio') {\n\t\t\tlink = `/call/audio/${helloDeviceId}/${encodeURIComponent(roomName)}/start`;\n\t\t}\n\t\twindow.open(link, '_blank');\n\t};\n\n\tgetCurrentRoom() {\n\t\tlet room = findSectorById(this.props.treeData.tree, this.props.match.params.roomId);\n\t\treturn {\n\t\t\tsectorName: room ? room.name : '',\n\t\t\troomName: room ? room.name : '',\n\t\t\thelloDeviceId: room ? room.helloDeviceId : null,\n\t\t};\n\t}\n\n\tviewPatient = async () => {\n\t\tconst room = this.checkIfRoomAvailable();\n\t\tif (!room) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst pluggedDevices = await checkIfMediaDevicesPlugged();\n\n\t\tif (this.micStatus.state === MediaPermissions.PROMPT && pluggedDevices.microphone) {\n\t\t\tthis.props.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'modal',\n\t\t\t\ttype: StreamError.MICROPHONE_BLOCKED.type,\n\t\t\t});\n\t\t\tawait askForPermission({ audio: true });\n\t\t}\n\t\tthis.props.setStreamPermissionMessage(null);\n\t\tthis.redirect({\n\t\t\tto: 'patient-feed',\n\t\t\troomName: room.name,\n\t\t\thelloDeviceId: room.helloDeviceId,\n\t\t});\n\t};\n\n\ttalkToPatient = async () => {\n\t\tconst room = this.checkIfRoomAvailable();\n\t\tif (!room) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst pluggedDevices = await checkIfMediaDevicesPlugged();\n\n\t\tif (!pluggedDevices.camera || !pluggedDevices.microphone) {\n\t\t\tthis.props.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'modal',\n\t\t\t\ttype: !pluggedDevices.camera ? StreamError.CAMERA_NOT_FOUND.type : StreamError.MICROPHONE_NOT_FOUND.type,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.micStatus.state === MediaPermissions.PROMPT) {\n\t\t\tthis.props.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'modal',\n\t\t\t\ttype: StreamError.MICROPHONE_BLOCKED.type,\n\t\t\t});\n\t\t}\n\t\tlet permissionRes = await askForPermission({ audio: true });\n\t\tif (permissionRes.error) {\n\t\t\tif (permissionRes.error.name === 'NotReadableError') {\n\t\t\t\tif (permissionRes.error.message.includes('audio')) {\n\t\t\t\t\tthis.props.setStreamPermissionMessage({\n\t\t\t\t\t\tcomponent: 'modal',\n\t\t\t\t\t\ttype: StreamError.MICROPHONE_NOT_FOUND.type,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.props.setStreamPermissionMessage({\n\t\t\t\t\tcomponent: 'popup',\n\t\t\t\t\ttype: StreamError.MICROPHONE_BLOCKED.type,\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (this.micStatus.state === MediaPermissions.GRANTED) {\n\t\t\tthis.redirect({\n\t\t\t\tto: 'audio',\n\t\t\t\troomName: room.name,\n\t\t\t\thelloDeviceId: room.helloDeviceId,\n\t\t\t});\n\t\t}\n\t};\n\n\tonDevicePermissionChange = res => {\n\t\tif (res.target.state === MediaPermissions.GRANTED || res.target.state === MediaPermissions.PROMPT) {\n\t\t\tthis.props.setStreamPermissionMessage(null);\n\t\t}\n\t};\n\n\trender() {\n\t\tconst helloBlocksMessages = {\n\t\t\tpatientView:\n\t\t\t\t\"This option will enable you to see and hear the patient; the patient won't be able to see or hear you unless you enable it during the feed.\",\n\t\t\ttalkToPatient:\n\t\t\t\t\"This option will initiate an audio call to the patient, they will be able to hear you and you will be able to hear them. During the call, you can switch your or patient's camera on, or even share your screen.\",\n\t\t};\n\t\tconst { roomName, helloDeviceId } = this.getCurrentRoom();\n\t\treturn (\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t

    {roomName}

    \n\t\t\t\t\t

    {this.props.description}

    \n\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\tThis room doesn't have any assigned devices.\n\t\t\t\t\t\t\t\t
    Please contact your administrator.\n\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    Call could not be started from {roomName}. Device offline. Please try again later.

    \n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default connect(\n\tstate => state.organization,\n\tdispatch => bindActionCreators(actionCreators, dispatch)\n)(withRouter(CallPatient));\nCallPatient.contextType = SocketContext;\n","import React, { useEffect, useRef, useState } from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { actionCreators } from 'state/organization/actions';\nimport { Modal, Form, Input, Alert } from 'components';\nimport { findSectorById, getCurrentHealthSystemInfo, isValidSector } from 'infrastructure/helpers/commonHelpers';\nimport { SectorTypes } from 'constants/enums';\nimport { deleteRoomLocation, getRoomDetails, getRoomLocation, setRoomDetails, updateRoomLocation } from 'api/organization';\nimport { APP_CONFIG, gatewayApi, treeSectorNameMaxCharacters } from 'constants/global-variables';\nimport { Formik } from 'formik';\nimport * as Yup from 'yup';\n\nconst EditSector = props => {\n\tconst [isLoading, setIsLoading] = useState(false);\n\tconst [error, setError] = useState('');\n\tconst [sectorNameError, setSectorNameError] = useState('');\n\tconst [adtRoomLocation, setAdtRoomLocation] = useState({ unit: '', room: '', bed: '' });\n\tconst [adtRoomLocationError, setAdtRoomLocationError] = useState({ unit: '', room: '', bed: '' });\n\tconst uploadLogoInputRef = useRef(null);\n\n\tuseEffect(() => {\n\t\tconst getRoomDetail = async () => {\n\t\t\tconst { hospitalId, departmentId, floorId, roomId } = props.sectorData;\n\t\t\tconst { currentHealthSystemId } = getCurrentHealthSystemInfo();\n\t\t\tif (!hospitalId) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsetIsLoading(true);\n\t\t\tconst [roomDetails, roomLocation] = await Promise.all([\n\t\t\t\tgetRoomDetails(currentHealthSystemId, hospitalId, departmentId, floorId, roomId),\n\t\t\t\tgetRoomLocation(currentHealthSystemId, hospitalId, departmentId, floorId, roomId),\n\t\t\t]);\n\t\t\tconst responseError = roomDetails.error || roomLocation.error;\n\t\t\tif (responseError) {\n\t\t\t\tsetError(responseError.message);\n\t\t\t\tsetIsLoading(false);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsetAdtRoomLocation(prevState => ({\n\t\t\t\t...prevState,\n\t\t\t\tunit: roomLocation.result?.unit,\n\t\t\t\troom: roomLocation.result?.room,\n\t\t\t\tbed: roomLocation.result?.bed,\n\t\t\t}));\n\t\t\tsetAdtRoomLocationError(prevState => ({ ...prevState, unit: '', room: '', bed: '' }));\n\t\t\tsetIsLoading(false);\n\t\t};\n\t\tif (SectorTypes.ROOM === props.sectorData.sectorType) {\n\t\t\tgetRoomDetail();\n\t\t}\n\t}, [props.sectorData]);\n\n\tconst getLocationIdentificationInformation = values => ({\n\t\tunit: values.detailUnit,\n\t\troom: values.detailRoom,\n\t\tbed: values.detailBed,\n\t});\n\n\tconst editRoomDetails = async values => {\n\t\tsetAdtRoomLocationError(prevState => ({ ...prevState, unit: '', room: '', bed: '' }));\n\t\tconst { currentHealthSystemId } = getCurrentHealthSystemInfo();\n\t\tconst { hospitalId, departmentId, floorId, roomId } = props.sectorData;\n\t\tconst emptyUnit = !values.detailUnit || values.detailUnit?.trim() === '';\n\t\tconst emptyRoom = !values.detailRoom || values.detailRoom?.trim() === '';\n\t\tconst emptyBed = !values.detailBed || values.detailBed?.trim() === '';\n\n\t\tif (!emptyUnit || !emptyRoom || !emptyBed) {\n\t\t\tif (emptyUnit) {\n\t\t\t\tsetAdtRoomLocationError(prevState => ({ ...prevState, unit: 'Unit cannot be empty' }));\n\t\t\t}\n\t\t\tif (emptyRoom) {\n\t\t\t\tsetAdtRoomLocationError(prevState => ({ ...prevState, room: 'Room cannot be empty' }));\n\t\t\t}\n\t\t\tif (emptyBed) {\n\t\t\t\tsetAdtRoomLocationError(prevState => ({ ...prevState, bed: 'Bed cannot be empty' }));\n\t\t\t}\n\t\t\tif (emptyUnit || emptyRoom || emptyBed) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tsetIsLoading(true);\n\n\t\tlet response = null;\n\n\t\tresponse = await setRoomDetails(currentHealthSystemId, hospitalId, departmentId, floorId, roomId, { name: values.sectorName });\n\n\t\tif (!emptyUnit && !emptyRoom && !emptyBed) {\n\t\t\tresponse = updateRoomLocation(currentHealthSystemId, hospitalId, departmentId, floorId, roomId, getLocationIdentificationInformation(values));\n\t\t}\n\n\t\tif (emptyUnit && emptyRoom && emptyBed) {\n\t\t\tresponse = deleteRoomLocation(currentHealthSystemId, hospitalId, departmentId, floorId, roomId);\n\t\t}\n\n\t\tif (response.error) {\n\t\t\tsetError(response.error.message);\n\t\t\tsetIsLoading(false);\n\t\t\treturn;\n\t\t}\n\t\tprops.onEditSector();\n\t\tsetIsLoading(false);\n\t\tsetAdtRoomLocation(prevState => ({ ...prevState, unit: '', room: '', bed: '' }));\n\t};\n\n\tconst editSectorName = async values => {\n\t\tconst sector = findSectorById(props.treeData.tree, props.sectorData[`${props.sectorData.sectorType}Id`]);\n\t\tconst isValid = isValidSector(sector, props.treeData.tree, values.sectorName);\n\t\tif (!isValid && values.sectorName !== props.sectorData.sectorName) {\n\t\t\tsetSectorNameError(`${props.sectorData.sectorType} with this name already exists`);\n\t\t\tsetIsLoading(false);\n\t\t\treturn;\n\t\t}\n\t\tconst { currentHealthSystemId, currentRegionId } = getCurrentHealthSystemInfo();\n\t\tconst { hospitalId, departmentId, floorId, roomId, sectorType } = props.sectorData;\n\t\tlet url;\n\t\tif (sectorType !== SectorTypes.ROOM) {\n\t\t\tswitch (sectorType) {\n\t\t\t\tcase SectorTypes.HOSPITAL: {\n\t\t\t\t\turl = `/v1/organizations/${APP_CONFIG.companyId}/health-systems/${currentHealthSystemId}/regions/${currentRegionId}/hospitals/${hospitalId}`;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase SectorTypes.DEPARTMENT: {\n\t\t\t\t\turl = `/v1/organizations/${APP_CONFIG.companyId}/health-systems/${currentHealthSystemId}/hospitals/${hospitalId}/departments/${departmentId}`;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase SectorTypes.FLOOR: {\n\t\t\t\t\turl = `/v1/organizations/${APP_CONFIG.companyId}/health-systems/${currentHealthSystemId}/hospitals/${hospitalId}/departments/${departmentId}/floors/${floorId}`;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase SectorTypes.ROOM: {\n\t\t\t\t\turl = `/v1/organizations/${APP_CONFIG.companyId}/health-systems/${currentHealthSystemId}/hospitals/${hospitalId}/departments/${departmentId}/floors/${floorId}/rooms/${roomId}`;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\tsetError('Wrong Sector type');\n\t\t\t\t}\n\t\t\t}\n\t\t\tawait gatewayApi.put(url, {\n\t\t\t\tname: values.sectorName,\n\t\t\t});\n\t\t\tprops.onEditSector();\n\t\t}\n\t\tif (sectorType === SectorTypes.ROOM) {\n\t\t\teditRoomDetails(values);\n\t\t}\n\t\tsetError('');\n\t\tsetIsLoading(false);\n\t};\n\n\tconst onModalClose = () => {\n\t\tsetAdtRoomLocation(prevState => ({ ...prevState, unit: '', room: '', bed: '' }));\n\t\tsetAdtRoomLocationError(prevState => ({ ...prevState, unit: '', room: '', bed: '' }));\n\t\tsetError('');\n\t\tprops.onModalClose();\n\t};\n\n\tconst getInitialData = () => ({\n\t\tsectorName: props.sectorData.sectorName || '',\n\t\tdetailUnit: adtRoomLocation.unit,\n\t\tdetailRoom: adtRoomLocation.room,\n\t\tdetailBed: adtRoomLocation.bed,\n\t});\n\n\treturn (\n\t\t<>\n\t\t\t\n\t\t\t\t{formikProps => {\n\t\t\t\t\tconst { values, errors, handleChange, handleSubmit } = formikProps;\n\t\t\t\t\treturn (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{props.sectorData.sectorType === SectorTypes.HOSPITAL && (\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t{props.hospitalLogo && logo}\n\t\t\t\t\t\t\t\t\t\t

    Upload hospital image

    \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t\t\tPicture size can't exceed 600KB and file type should be .PNG.\n\t\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t{props.parentSectorType === 'floor' && money}\n\t\t\t\t\t\t\t\t\t{props.parentSectorType === 'department' && account_balance}\n\t\t\t\t\t\t\t\t\t{props.parentSectorType === 'hospital' && business}\n\t\t\t\t\t\t\t\t\t{props.parentSectorName}\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t{props.sectorData.sectorType === SectorTypes.ROOM && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t

    ADT Room Location

    \n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t);\n\t\t\t\t}}\n\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n\nexport default connect(\n\tstate => state.organization,\n\tdispatch => bindActionCreators(actionCreators, dispatch)\n)(EditSector);\n","import { gatewayApi, APP_CONFIG } from 'constants/global-variables';\nimport { DeviceCommands, DeviceSettings } from 'constants/enums';\n\nexport function getUnassociatedDevices() {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/organizations/${APP_CONFIG.companyId}/unassociated-devices`)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data.devices);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getDeviceList(level, id) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/organizations/${APP_CONFIG.companyId}/level/${level}/id/${id}/devices`)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data.devices);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getAllowList(solHelloId) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`v1/devices/${solHelloId}/allowlist/logs`)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data.result.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function deleteDevice(deviceId) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.delete(`/v1/organizations/${APP_CONFIG.companyId}/devices/${deviceId}`)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data.devices);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function sendCommand(deviceId, command, reason = null) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.post(`/v1/devices/${deviceId}/command`, {\n\t\t\t\tcommand,\n\t\t\t\treason,\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getLatestAppRelease(appId) {\n\t// DO NOT REMOVE. Returning default value until we decide to include force update in production\n\treturn new Promise((res, rej) => {\n\t\tres({\n\t\t\tid: 0,\n\t\t\tshort_version: '',\n\t\t\tversion: '',\n\t\t\tuploaded_at: '',\n\t\t\tinstall_url: '',\n\t\t\tmin_os: '',\n\t\t});\n\t});\n\t// return new Promise((res, rej) => {\n\t// \tgatewayApi\n\t// \t\t.get(`v1/device-apps/apps/${appId}/version/latest`)\n\t// \t\t.then(response => {\n\t// \t\t\tres(response.data);\n\t// \t\t})\n\t// \t\t.catch(e => rej(e));\n\t// });\n}\n\n/**\n * Send device force update command to Hello\n * @method forceUpdateDevice\n * @param {object} data\n * @param {number} data.deviceId\n * @param {string} data.dynamicData\n */\nexport function forceUpdateDevice(data) {\n\t// DO NOT REMOVE. Commented until we decide to include force update in production\n\t// return new Promise((res, rej) => {\n\t// \tgatewayApi\n\t// \t\t.post(`/v1/devices/${data.deviceId}/command`, {\n\t// \t\t\tcommand: DeviceCommands.FORCE_UPDATE,\n\t// \t\t\t...data,\n\t// \t\t})\n\t// \t\t.then(response => {\n\t// \t\t\tres(response);\n\t// \t\t})\n\t// \t\t.catch(e => rej(e));\n\t// });\n}\n\nexport function getDeviceRebootLogs(deviceId) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/devices/${deviceId}/logs/type/command`)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data.deviceCommandLogs);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport const addDeviceSettings = async settings => {\n\ttry {\n\t\tconst { data } = await gatewayApi.post(`/v1/organizations/${APP_CONFIG.companyId}/device-settings`, {\n\t\t\tsettings,\n\t\t\tsettingTypeId: DeviceSettings.VoiceCommandCalling,\n\t\t});\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n\nexport const getDeviceLogsCommand = async deviceId => {\n\ttry {\n\t\tconst { data } = await gatewayApi.post(`/v1/devices/${deviceId}/command`, {\n\t\t\tcommand: DeviceCommands.PULL_LOGS,\n\t\t\tdynamicData: 'logcat',\n\t\t\tdeviceId,\n\t\t});\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n","import React, { useState, useEffect, useRef } from 'react';\nimport propsTypes from 'prop-types';\nimport { CSVLink } from 'react-csv';\n\nconst CsvExport = ({ asyncExportMethod, children, disable, fileName = undefined, className = 'button download' }) => {\n\tconst [csvData, setCsvData] = useState(null);\n\tconst csvInstance = useRef();\n\tuseEffect(() => {\n\t\tif (csvData && csvInstance.current && csvInstance.current.link) {\n\t\t\tsetTimeout(() => {\n\t\t\t\tcsvInstance.current.link.click();\n\t\t\t\tsetCsvData(null);\n\t\t\t});\n\t\t}\n\t}, [csvData]);\n\treturn (\n\t\t<>\n\t\t\t {\n\t\t\t\t\tif (disable) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tconst newCsvData = await asyncExportMethod();\n\t\t\t\t\tsetCsvData(newCsvData);\n\t\t\t\t}}>\n\t\t\t\t{children}\n\t\t\t\n\t\t\t{csvData !== null ? : undefined}\n\t\t\n\t);\n};\n\nexport default CsvExport;\n\nCsvExport.defaultProps = {\n\tchildren: undefined,\n\tasyncExportMethod: () => null,\n\tdisable: false,\n};\n\nCsvExport.propTypes = {\n\tchildren: propsTypes.node,\n\tasyncExportMethod: propsTypes.func,\n\tdisable: propsTypes.bool,\n};\n","import React from 'react';\nimport { getDeviceRebootLogs } from 'api/devices';\nimport moment from 'moment';\nimport { utcToLocalTime } from 'infrastructure/helpers/dateHelper';\nimport CsvExport from './Common/CsvExport';\n\nconst hasNameChanges = logs => {\n\tlet hasChanges = {\n\t\tuser: false,\n\t\tdevice: false,\n\t};\n\tlogs.forEach(log => {\n\t\tif (!hasChanges.user) {\n\t\t\tif (log.user.fullName !== log.user.currentName) {\n\t\t\t\thasChanges.user = true;\n\t\t\t}\n\t\t}\n\t\tif (!hasChanges.device) {\n\t\t\tif (log.device.name !== log.device.currentName) {\n\t\t\t\thasChanges.device = true;\n\t\t\t}\n\t\t}\n\t});\n\n\treturn hasChanges;\n};\n\nconst exportLogsAsCsv = async deviceId => {\n\tconst logs = await getDeviceRebootLogs(deviceId);\n\tif (logs.length === 0) {\n\t\treturn [{ Info: 'This device has no reboot logs yet.' }];\n\t}\n\tconst hasChanges = hasNameChanges(logs);\n\n\treturn logs.map(log => {\n\t\tconst user = log.user.fullName !== log.user.currentName ? `${log.user.fullName}` : '';\n\t\tconst device = log.device.name !== log.device.currentName ? `${log.device.name}` : '';\n\t\tlet report = {\n\t\t\tUser: log.user.currentName,\n\t\t};\n\t\tif (hasChanges.user) {\n\t\t\treport['Old user name'] = user;\n\t\t}\n\t\treport.Device = log.device.currentName;\n\t\tif (hasChanges.device) {\n\t\t\treport['Old device name'] = device;\n\t\t}\n\n\t\treport['Serial number'] = log.device.sn;\n\t\treport.Date = moment(utcToLocalTime(log.createdDate)).format('MM/DD/YYYY-hh:mm A');\n\t\treport.Reason = log.reason || 'Not specified';\n\t\treturn report;\n\t});\n};\n\nconst RebootLogExport = ({ solHelloDeviceId, serialNumber }) => (\n\t exportLogsAsCsv(solHelloDeviceId)} fileName={`${serialNumber}-${(+new Date()).toString()}.csv`} className=''>\n\t\t\n\t\t\tget_app\n\t\t\n\t\n);\n\nexport default RebootLogExport;\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst Checkbox = ({ type = 'checkbox', name, id, checked = false, onChange }) => (\n\t\n);\n\nCheckbox.propTypes = {\n\ttype: PropTypes.string,\n\tname: PropTypes.string.isRequired,\n\tchecked: PropTypes.bool,\n\tonChange: PropTypes.func.isRequired,\n};\n\nexport default Checkbox;\n","import React, { Component } from 'react';\nimport classNames from 'classnames/bind';\nimport { SectorTypes } from 'constants/enums';\nimport CheckBox from 'components/Common/CheckBox';\nimport { getLevelDevices, getLevelRoomsWithDevices } from 'infrastructure/helpers/commonHelpers';\n\nconst OptionName = props => {\n\tconst { option } = props;\n\treturn (\n\t\t<>\n\t\t\t{option.name}\n\t\t\t{option.helloDeviceId && fiber_manual_record}\n\t\t\n\t);\n};\n\nconst OptionsList = ({ options, expandedOptions, onChange, selectedSectorId, setSelectedId, handleCheckBoxChange, poolDevices }) => {\n\tconst findProperId = item => {\n\t\tconst prefix = item.type;\n\t\treturn item[`${prefix}Id`];\n\t};\n\n\tconst toggleExpand = (selectedOptionId, isAddingSection) => {\n\t\tif (expandedOptions[selectedOptionId] && !isAddingSection) {\n\t\t\tdelete expandedOptions[selectedOptionId];\n\t\t} else {\n\t\t\texpandedOptions[selectedOptionId] = {};\n\t\t}\n\t\tonChange(expandedOptions);\n\t};\n\n\tconst handleSubOptionsListChange = (optionId, subSelections) => {\n\t\texpandedOptions[optionId] = subSelections;\n\t\tonChange(expandedOptions);\n\t};\n\n\tconst allDevicesSelected = option => {\n\t\tconst rooms = getLevelRoomsWithDevices(option);\n\t\treturn rooms.every(x => x.voiceCommandCalling === true);\n\t};\n\n\tconst getCheckBoxId = option => {\n\t\tswitch (option.type) {\n\t\t\tcase 'hospital':\n\t\t\t\treturn option.hospitalId;\n\t\t\tcase 'deaprtment':\n\t\t\t\treturn option.departmentId;\n\t\t\tcase 'floor':\n\t\t\t\treturn option.floorId;\n\t\t}\n\t};\n\n\treturn (\n\t\t
    \n\t\t\t{options.map((option, index) => (\n\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\ttoggleExpand(findProperId(option));\n\t\t\t\t\t\t\t\t}}>\n\t\t\t\t\t\t\t\t{expandedOptions[findProperId(option)] ? 'keyboard_arrow_down' : 'keyboard_arrow_right'}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{option.icon}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{option.type !== 'room' && getLevelDevices(option).length !== 0 && (\n\t\t\t\t\t\t\t\t handleCheckBoxChange(option, e)} />\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{option.type === 'room' && option.helloDeviceId !== undefined && (\n\t\t\t\t\t\t\t\t handleCheckBoxChange(option, e)} />\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t{option.subOptions && expandedOptions[findProperId(option)] && (\n\t\t\t\t\t\t handleSubOptionsListChange(findProperId(option), subSelections)}\n\t\t\t\t\t\t\tselectedSectorId={selectedSectorId}\n\t\t\t\t\t\t\tsetSelectedId={setSelectedId}\n\t\t\t\t\t\t\thandleCheckBoxChange={handleCheckBoxChange}\n\t\t\t\t\t\t\tpoolDevices={poolDevices}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t
    \n\t\t\t))}\n\t\t
    \n\t);\n};\n\nclass DeviceSelection extends Component {\n\tstate = {\n\t\tselectedSectorId: this.props.selectedSectorId,\n\t\texpandedOptions: this.props.preSelected ? this.props.preSelected : {},\n\t};\n\n\tsetSelectedId = sectorId => {\n\t\tthis.setState({ selectedSectorId: sectorId });\n\t};\n\n\trender() {\n\t\tconst { selectedSectorId, expandedOptions } = this.state;\n\t\treturn (\n\t\t\t this.setState({ expandedOptions })}\n\t\t\t\texpandedOptions={this.state.expandedOptions}\n\t\t\t\tselectedSectorId={selectedSectorId}\n\t\t\t\tsetSelectedId={this.setSelectedId}\n\t\t\t\thandleCheckBoxChange={this.props.handleCheckBoxChange}\n\t\t\t\tpoolDevices={this.props.poolDevices}\n\t\t\t/>\n\t\t);\n\t}\n}\n\nexport default DeviceSelection;\n","import React, { useState } from 'react';\nimport { Modal, Form, Loader } from 'components';\nimport DeviceSelection from 'components/NursePooling/DeviceSelection';\nimport { getLevelRoomsWithDevices } from 'infrastructure/helpers/commonHelpers';\nimport { addDeviceSettings } from 'api/devices';\n\nconst VoiceCommandCallingModal = props => {\n\tconst [changedDevices, setChangedDevices] = useState([]);\n\tconst [isLoading, setLoading] = useState(false);\n\tconst [, setHasErrors] = useState(null);\n\n\tconst handleCheckBoxChange = (option, e) => {\n\t\tconst isChecked = !!e.target.checked;\n\n\t\tconst newDevices = [...changedDevices];\n\t\tif (option.type === 'room') {\n\t\t\tconst exists = newDevices.find(x => x.solHelloDeviceId === option.helloDeviceId);\n\t\t\tif (!exists) {\n\t\t\t\tnewDevices.push({ solHelloDeviceId: option.helloDeviceId, settingValue: isChecked });\n\t\t\t} else {\n\t\t\t\texists.settingValue = isChecked;\n\t\t\t}\n\n\t\t\tsetChangedDevices(newDevices);\n\t\t\tprops.updateVoiceCommandCallingList([option.helloDeviceId], isChecked);\n\t\t} else {\n\t\t\tconst sectorDevices = [];\n\t\t\tconst rooms = getLevelRoomsWithDevices(option);\n\t\t\trooms.forEach(r => {\n\t\t\t\tif (r.voiceCommandCalling !== isChecked) {\n\t\t\t\t\tconst exists = newDevices.find(x => x.solHelloDeviceId === r.helloDeviceId);\n\t\t\t\t\tsectorDevices.push({ solHelloDeviceId: r.helloDeviceId, settingValue: isChecked });\n\t\t\t\t\tif (!exists) {\n\t\t\t\t\t\tnewDevices.push({ solHelloDeviceId: r.helloDeviceId, settingValue: isChecked });\n\t\t\t\t\t} else {\n\t\t\t\t\t\texists.settingValue = isChecked;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tsetChangedDevices(newDevices);\n\t\t\tprops.updateVoiceCommandCallingList(\n\t\t\t\tsectorDevices.map(x => x.solHelloDeviceId),\n\t\t\t\tisChecked\n\t\t\t);\n\t\t}\n\t};\n\n\tconst changeVoiceCommandCalling = async () => {\n\t\tif (changedDevices.length) {\n\t\t\tsetLoading(true);\n\t\t\tconst settings = changedDevices.map(s => ({ solHelloDeviceId: +s.solHelloDeviceId, settingValue: `${s.settingValue}` }));\n\t\t\tconst { error } = await addDeviceSettings(settings);\n\t\t\tif (error) {\n\t\t\t\tsetHasErrors(true);\n\t\t\t}\n\t\t}\n\n\t\tsetLoading(false);\n\t\tsetHasErrors(false);\n\n\t\tprops.toggleVoiceCommandCallingModal();\n\t};\n\n\tconst toggleModal = () => {\n\t\tsetChangedDevices([]);\n\t\tprops.toggleVoiceCommandCallingModal();\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t\n\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t

    \n\t\t\t\t\t\tYou can use this option to activate voice command calling in different levels of a hospital. Through this option patient will be able to call nurses\n\t\t\t\t\t\tby saying \"Call Nurse\" or \"Call the nurse\".\n\t\t\t\t\t

    \n\t\t\t\t\t{isLoading && }\n\t\t\t\t\t{!isLoading && (\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t

    Devices

    \n\t\t\t\t\t\t\t

    Select the devices you wish to activate this feature

    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t)}\n\t\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n\nexport default VoiceCommandCallingModal;\n","import React, { useState } from 'react';\nimport { getDeviceLogsCommand } from 'api/devices';\nimport Modal from 'components/Modal';\n\nconst PullDeviceLogs = ({ deviceId, isOnline }) => {\n\tconst [modal, setModal] = useState({\n\t\tisOpen: false,\n\t\thasErrors: null,\n\t});\n\n\tconst sendPullLogsCommand = async () => {\n\t\tif (isOnline) {\n\t\t\tconst response = await getDeviceLogsCommand(deviceId);\n\t\t\tsetModal({\n\t\t\t\tisOpen: true,\n\t\t\t\thasErrors: !!response.error,\n\t\t\t});\n\t\t} else {\n\t\t\tsetModal({\n\t\t\t\tisOpen: true,\n\t\t\t\thasErrors: null,\n\t\t\t});\n\t\t}\n\t};\n\n\tconst getModalText = () => {\n\t\tif (!isOnline) {\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t{' '}\n\t\t\t\t\tFailed to get device logs.
    Device is offline.\n\t\t\t\t
    \n\t\t\t);\n\t\t}\n\t\tif (modal.hasErrors) {\n\t\t\treturn Something went wrong, please try again.;\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t\t\tDevice logs registered on Solaborate system.
    You can close this message.\n\t\t\t
    \n\t\t);\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t\n\t\t\t\tassessment\n\t\t\t\n\t\t\t setModal({ isOpen: false, hasErrors: null })}>\n\t\t\t\t
    \n\t\t\t\t\t

    Device logs

    \n\t\t\t\t\t{getModalText()}\n\t\t\t\t
    \n\t\t\t\n\t\t\n\t);\n};\n\nexport default PullDeviceLogs;\n","import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { actionCreators } from 'state/organization/actions';\nimport { withRouter } from 'react-router-dom';\nimport { Button, Table, Tabs, DescriptionBox, Modal, Form, Input } from 'components';\nimport { deleteOrgUnit, uploadLogo, saveLogo, getLogoUrl } from 'api/organization';\nimport { DeviceListLevel, SectorTypes, DeviceCommands, UserRoles, AndroidVersions } from 'constants/enums';\nimport EditSectorModal from 'components/Common/EditSectorModal';\nimport { getDeviceList, deleteDevice, sendCommand, forceUpdateDevice, getLatestAppRelease } from 'api/devices';\nimport {\n\tmapSectionsToRender,\n\tfindSectorById,\n\tgetParentSector,\n\tgetCurrentHealthSystemInfo,\n\tgetHierarchyByHelloDeviceId,\n\tfindDeviceById,\n\tsortByRoomName,\n} from 'infrastructure/helpers/commonHelpers';\nimport { APP_CONFIG } from 'constants/global-variables';\nimport { CSVLink } from 'react-csv';\nimport ReactCrop from 'react-image-crop';\nimport 'react-image-crop/dist/ReactCrop.css';\nimport { getUserRole } from 'infrastructure/auth';\nimport RebootLogExport from 'components/RebootLogExport';\nimport VoiceCommandCallingModal from 'components/Common/VoiceCommandCallingModal';\nimport PullDeviceLogs from 'components/PullDeviceLogs';\nimport _ from 'lodash';\n\nclass Hospital extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tdevices: [],\n\t\t\tisHospitalModalOpen: false,\n\t\t\tselectedDevice: {},\n\t\t\tselectedOrg: {},\n\t\t\tisDeleteDeviceModalOpen: false,\n\t\t\tisRebootDeviceModalOpen: false,\n\t\t\tisUpdateDeviceModalOpen: false,\n\t\t\tisDeleteOrgUnitModalOpen: false,\n\t\t\tsectorData: {},\n\t\t\trebootReason: '',\n\t\t\tparentSectorName: '',\n\t\t\tparentSectorType: '',\n\t\t\tisDeleteDeviceModalLoading: false,\n\t\t\tlatestAppRelease: null,\n\t\t\tisVoiceCommandCallingModalOpen: false,\n\t\t\tisUploadLogoModalOpen: false,\n\t\t\tsrc: '',\n\t\t\tcrop: {\n\t\t\t\twidth: 200,\n\t\t\t\theight: 200,\n\t\t\t},\n\t\t\thospitalLogo: '',\n\t\t\tisHospitalLogoModalLoading: false,\n\t\t\tcurrentSector: [],\n\t\t};\n\t}\n\n\tasync componentDidMount() {\n\t\tthis.loadHospital();\n\t}\n\n\tcomponentDidUpdate = prevProps => {\n\t\tconst { hospitalId } = this.props.match.params;\n\t\tif (\n\t\t\thospitalId !== prevProps.match.params.hospitalId ||\n\t\t\t(!prevProps.showAssignDeviceModalData.assignCompleted && this.props.showAssignDeviceModalData.assignCompleted)\n\t\t) {\n\t\t\tthis.loadHospital();\n\t\t}\n\t};\n\n\texportAsCsv() {\n\t\treturn this.state.devices.map(({ roomName, serialNumber, macAddress, appVersion, osVersion, firmwareRevision, solHelloDeviceId, ipAddress }) => ({\n\t\t\troomName,\n\t\t\tserialNumber,\n\t\t\troom: getHierarchyByHelloDeviceId(this.props.treeData.tree, solHelloDeviceId),\n\t\t\tmacAddress,\n\t\t\tappVersion,\n\t\t\tosVersion: firmwareRevision,\n\t\t\tandroidVersion: this.getCodeNameByOsVersion(osVersion),\n\t\t\tipAddress,\n\t\t}));\n\t}\n\n\tgetCurrentHospital() {\n\t\tlet hospitals = this.props.treeData.tree;\n\t\tlet hospital = hospitals.find(item => item.hospitalId === this.props.match.params.hospitalId);\n\t\treturn {\n\t\t\tsectorName: hospital ? hospital.name : '',\n\t\t\tsectorId: hospital ? hospital.hospitalId : '',\n\t\t\thospitalName: hospital ? hospital.name : '',\n\t\t\thospitalId: hospital ? hospital.hospitalId : '',\n\t\t\tsectorType: hospital ? hospital.type : '',\n\t\t};\n\t}\n\n\tgetCodeNameByOsVersion = osVersion => {\n\t\tlet version = AndroidVersions.find(({ apiLevel }) => apiLevel.includes(+osVersion));\n\t\treturn version?.codeName ?? 'N/A';\n\t};\n\n\tloadHospital = async () => {\n\t\tconst devices = await getDeviceList(DeviceListLevel.HOSPITAL, this.props.match.params.hospitalId);\n\t\tconst latestAppRelease = await getLatestAppRelease(APP_CONFIG.deviceAppId);\n\t\tconst currentSector = findSectorById(this.props.treeData.tree, this.props.match.params.hospitalId);\n\t\tlet deviceList = [];\n\t\tif (currentSector?.subOptions) {\n\t\t\tdeviceList = devices.map(d => {\n\t\t\t\tconst roomName = findSectorById(this.props.treeData.tree, d.solHelloDeviceId.toString())?.name ?? '';\n\t\t\t\tconst device = findDeviceById(currentSector.subOptions, d.solHelloDeviceId);\n\t\t\t\tif (device) {\n\t\t\t\t\tdevice.voiceCommandCalling = d.voiceCommandCalling;\n\t\t\t\t}\n\t\t\t\treturn { ...d, roomName };\n\t\t\t});\n\t\t}\n\n\t\tthis.setState({\n\t\t\tdevices: sortByRoomName(deviceList),\n\t\t\tlatestAppRelease,\n\t\t\tcurrentSector: currentSector ? [currentSector] : [],\n\t\t});\n\t};\n\n\tdisplayDevices = () => {\n\t\tif (!this.state.devices.length) {\n\t\t\treturn [];\n\t\t}\n\t\tconst userRole = getUserRole();\n\t\treturn this.state.devices.map(\n\t\t\t({ roomName, serialNumber, solHelloDeviceId, firmwareRevision, appVersion, osVersion, macAddress, isOnline, voiceCommandCalling, ipAddress }) => {\n\t\t\t\treturn {\n\t\t\t\t\troomName: roomName ?? '',\n\t\t\t\t\tserialNumber: serialNumber ?? 'N/A',\n\t\t\t\t\tmacAddress: macAddress ?? 'N/A',\n\t\t\t\t\tappVersion:
    {appVersion || 'N/A'}
    ,\n\t\t\t\t\tfirmwareRevision: firmwareRevision ?? 'N/A',\n\t\t\t\t\tosVersion: this.getCodeNameByOsVersion(osVersion),\n\t\t\t\t\tipAddress,\n\t\t\t\t\tvoiceCommandCalling: voiceCommandCalling ? 'Active' : 'Not active',\n\t\t\t\t\tactions: (\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t this.toggleRebootDeviceModal({ deviceId: solHelloDeviceId, serialNumber })}>\n\t\t\t\t\t\t\t\trefresh\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{userRole === UserRoles.ADMIN && (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t this.props.toggleAssignDeviceModal({ deviceId: solHelloDeviceId, show: true })}>\n\t\t\t\t\t\t\t\t\t\tswap_vert\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t this.toggleDeleteDeviceModal({ deviceId: solHelloDeviceId, serialNumber })}>\n\t\t\t\t\t\t\t\t\t\tdelete\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t
    \n\t\t\t\t\t),\n\t\t\t\t};\n\t\t\t}\n\t\t);\n\t};\n\n\tinitDeleteOrg = data => {\n\t\tthis.setState({\n\t\t\tselectedOrg: data,\n\t\t});\n\t\tthis.toggleDeleteOrgUnitModal();\n\t};\n\n\tunAssignDevice = async () => {\n\t\tconst {\n\t\t\tselectedDevice: { deviceId },\n\t\t} = this.state;\n\n\t\tif (deviceId) {\n\t\t\tthis.setState({\n\t\t\t\tisDeleteDeviceModalLoading: true,\n\t\t\t});\n\n\t\t\tawait deleteDevice(deviceId);\n\t\t}\n\n\t\tthis.loadHospital();\n\t\tthis.toggleDeleteDeviceModal();\n\t\tthis.props.getTreeData();\n\n\t\tthis.setState({\n\t\t\tisDeleteDeviceModalLoading: false,\n\t\t});\n\t};\n\n\trebootDevice = async () => {\n\t\tconst {\n\t\t\tselectedDevice: { deviceId },\n\t\t} = this.state;\n\n\t\tif (deviceId) {\n\t\t\tawait sendCommand(deviceId, DeviceCommands.REBOOT, this.state.rebootReason);\n\t\t}\n\n\t\tthis.toggleRebootDeviceModal();\n\t};\n\n\tforceUpdateDevice = async () => {\n\t\tconst {\n\t\t\tselectedDevice: { deviceId, appVersion },\n\t\t\tlatestAppRelease: { install_url: appInstallUrl, short_version: latestAppVersion },\n\t\t} = this.state;\n\n\t\tif (appVersion && latestAppVersion && appVersion !== latestAppVersion) {\n\t\t\tawait forceUpdateDevice({\n\t\t\t\tdeviceId,\n\t\t\t\tdynamicData: appInstallUrl,\n\t\t\t});\n\t\t}\n\n\t\tthis.toggleUpdateDeviceModal();\n\t};\n\n\tdeleteOrgUnitSubmit = async () => {\n\t\tawait deleteOrgUnit(this.state.selectedOrg.level, this.state.selectedOrg.id);\n\t\tthis.toggleDeleteOrgUnitModal();\n\t\tthis.props.getTreeData();\n\t\tif (this.state.selectedOrg.level === DeviceListLevel.HOSPITAL) {\n\t\t\tthis.props.history.push('/health-system');\n\t\t\tthis.props.updateBreadcrumb([]);\n\t\t}\n\t};\n\n\ttoggleHospitalModal = () => {\n\t\tthis.setState({\n\t\t\tisHospitalModalOpen: !this.state.isHospitalModalOpen,\n\t\t});\n\t};\n\n\ttoggleEditSectorModal = data => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisEditSectorModalOpen: !this.state.isEditSectorModalOpen,\n\t\t\t},\n\t\t\tasync () => {\n\t\t\t\tif (this.state.isEditSectorModalOpen) {\n\t\t\t\t\tif (!data) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tlet sector = findSectorById(this.props.treeData.tree, data[`${data.sectorType}Id`]);\n\t\t\t\t\tthis.props.setCurrentSectorLocation(sector.treeLocation);\n\t\t\t\t\tlet currentHealthSystem = this.getCurrentHealthSystem(this.props.allHealthSystems, getCurrentHealthSystemInfo().currentHealthSystemId);\n\t\t\t\t\tlet sectorParent =\n\t\t\t\t\t\tdata.sectorType === SectorTypes.HOSPITAL\n\t\t\t\t\t\t\t? { type: SectorTypes.HEALTHSYSTEM, name: currentHealthSystem.name }\n\t\t\t\t\t\t\t: getParentSector(this.props.treeData.tree, sector);\n\t\t\t\t\tlet hospitalLogo = await getLogoUrl(data.hospitalId);\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tsectorData: data,\n\t\t\t\t\t\tparentSectorName: sectorParent.name,\n\t\t\t\t\t\tparentSectorType: sectorParent.type,\n\t\t\t\t\t\thospitalLogo,\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tthis.setState({ fileError: false });\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t};\n\n\ttoggleVoiceCommandCallingModal = () => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisVoiceCommandCallingModalOpen: !this.state.isVoiceCommandCallingModalOpen,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.loadHospital();\n\t\t\t}\n\t\t);\n\t};\n\n\tgetCurrentHealthSystem = (healthSystems, currentHealthSystemId) => {\n\t\treturn healthSystems.find(({ id }) => id === currentHealthSystemId);\n\t};\n\n\ttoggleDeleteDeviceModal = (selectedDevice = {}) => {\n\t\tthis.setState({\n\t\t\tselectedDevice,\n\t\t\tisDeleteDeviceModalOpen: !this.state.isDeleteDeviceModalOpen,\n\t\t});\n\t};\n\n\ttoggleRebootDeviceModal = (selectedDevice = {}) => {\n\t\tthis.setState({\n\t\t\tselectedDevice,\n\t\t\tisRebootDeviceModalOpen: !this.state.isRebootDeviceModalOpen,\n\t\t\trebootReason: '',\n\t\t});\n\t};\n\n\ttoggleUpdateDeviceModal = (selectedDevice = {}) => {\n\t\tthis.setState({\n\t\t\tselectedDevice,\n\t\t\tisUpdateDeviceModalOpen: !this.state.isUpdateDeviceModalOpen,\n\t\t});\n\t};\n\n\ttoggleDeleteOrgUnitModal = () => {\n\t\tthis.setState({\n\t\t\tisDeleteOrgUnitModalOpen: !this.state.isDeleteOrgUnitModalOpen,\n\t\t});\n\t};\n\n\tsetInputValues = event => {\n\t\tthis.setState({\n\t\t\t[event.target.name]: event.target.value,\n\t\t});\n\t};\n\n\tupdateTree = async () => {\n\t\tthis.props.getTreeData();\n\t\tthis.toggleEditSectorModal();\n\t};\n\n\tonSelectFile = ({ target }) => {\n\t\tconst input = target;\n\t\tconst [file] = input.files;\n\t\tif (!file) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (file.size > 600000 || !file.type.includes('png')) {\n\t\t\tthis.setState({ fileError: true });\n\t\t\tinput.value = '';\n\t\t\treturn;\n\t\t}\n\n\t\tconst reader = new FileReader();\n\t\treader.addEventListener('load', () => this.setState({ src: reader.result }));\n\t\treader.readAsDataURL(file);\n\n\t\tthis.setState({\n\t\t\tisUploadLogoModalOpen: true,\n\t\t\tisEditSectorModalOpen: false,\n\t\t\tfile,\n\t\t});\n\t};\n\n\tonImageLoaded = image => {\n\t\tthis.imageRef = image;\n\t};\n\n\tonCropChange = crop => {\n\t\tthis.setState({ crop });\n\t};\n\n\tmakeClientCrop = async () => {\n\t\tthis.setState({\n\t\t\tisHospitalLogoModalLoading: true,\n\t\t\tcrop: {\n\t\t\t\twidth: 200,\n\t\t\t\theight: 200,\n\t\t\t},\n\t\t\tisEditSectorModalOpen: true,\n\t\t});\n\t\tif (this.imageRef && this.state.crop.width && this.state.crop.height) {\n\t\t\tconst imageData = await this.uploadLogo();\n\t\t\tif (imageData) {\n\t\t\t\tconst logoData = {\n\t\t\t\t\tpicture: imageData.originalUrl,\n\t\t\t\t};\n\t\t\t\tsaveLogo(this.state.sectorData.hospitalId, logoData);\n\t\t\t}\n\t\t}\n\t};\n\n\tuploadLogo = async () => {\n\t\tconst { data, error } = await uploadLogo(this.state.file, this.getImageCrop());\n\t\tlet errorStateParameters = {};\n\n\t\tif (error) {\n\t\t\terrorStateParameters = {\n\t\t\t\tfileError: error.request.status === 400,\n\t\t\t\tisEditSectorModalOpen: true,\n\t\t\t};\n\t\t}\n\n\t\tthis.setState({\n\t\t\tisHospitalLogoModalLoading: false,\n\t\t\tisUploadLogoModalOpen: false,\n\t\t\tsrc: '',\n\t\t\t...errorStateParameters,\n\t\t});\n\n\t\treturn data;\n\t};\n\n\tgetImageCrop = () => {\n\t\tconst { crop } = this.state;\n\n\t\tconst image = this.imageRef;\n\t\tconst xScale = image.naturalWidth > image.width ? image.naturalWidth / image.width : 1;\n\t\tconst yScale = image.naturalHeight > image.height ? image.naturalHeight / image.height : 1;\n\n\t\treturn {\n\t\t\twidth: crop.width * xScale,\n\t\t\theight: crop.height * yScale,\n\t\t\tx: crop.x * xScale,\n\t\t\ty: crop.y * yScale,\n\t\t};\n\t};\n\n\ttoggleHospitalLogoCrop = () => {\n\t\tthis.setState({\n\t\t\tisUploadLogoModalOpen: !this.state.isUploadLogoModalOpen,\n\t\t\tcrop: {\n\t\t\t\twidth: 200,\n\t\t\t\theight: 200,\n\t\t\t},\n\t\t});\n\t};\n\n\tupdateVCCList = (solHelloDeviceIds, isChecked) => {\n\t\tconst currentSector = _.cloneDeep(this.state.currentSector);\n\t\tsolHelloDeviceIds.forEach(solHelloDeviceId => {\n\t\t\tconst device = findDeviceById(currentSector, solHelloDeviceId);\n\t\t\tif (device) {\n\t\t\t\tdevice.voiceCommandCalling = isChecked;\n\t\t\t}\n\t\t});\n\t\tthis.setState({ currentSector });\n\t};\n\n\trender() {\n\t\tconst hospital = this.getCurrentHospital();\n\t\tconst sections = mapSectionsToRender(this.props.treeData.tree, hospital, this.toggleEditSectorModal, this.initDeleteOrg);\n\t\tconst userRole = getUserRole();\n\t\treturn (\n\t\t\t
    \n\t\t\t\t

    \n\t\t\t\t\t{hospital.hospitalName}\n\t\t\t\t\t{userRole === UserRoles.ADMIN && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t

    \n\t\t\t\t\n\t\t\t\t,\n\t\t\t\t\t\t,\n\t\t\t\t\t\t
    ,\n\t\t\t\t\t\t
    ,\n\t\t\t\t\t]}\n\t\t\t\t/>\n\n\t\t\t\t\n\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t

    Are you sure you want to unassign device {this.state.selectedDevice.serialNumber}? Neither you or patient won't be able to make any calls.

    \n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t

    Why do you want to reboot device {this.state.selectedDevice.serialNumber}?

    \n\t\t\t\t\t\t this.setState({ rebootReason: e.target.value })}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t

    Are you sure you want to force update device {this.state.selectedDevice.serialNumber}?

    \n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t

    \n\t\t\t\t\t\t\tAre you sure you want to delete {this.state.selectedOrg.name}? Any devices related to it will be deleted and neither Virtual Care Providers or\n\t\t\t\t\t\t\tpatients won't be able to make any calls.\n\t\t\t\t\t\t

    \n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t{this.state.src && (\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t)}\n\t\t\t\t\n\n\t\t\t\t this.setState({ fileError: false })}\n\t\t\t\t\thospitalLogo={this.state.hospitalLogo}\n\t\t\t\t\tfileError={this.state.fileError}\n\t\t\t\t/>\n\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n\nexport default connect(\n\tstate => state.organization,\n\tdispatch => bindActionCreators(actionCreators, dispatch)\n)(withRouter(Hospital));\n","import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { actionCreators } from 'state/organization/actions';\nimport { withRouter } from 'react-router-dom';\nimport { Button, Table, Tabs, DescriptionBox, Modal, Form, Input } from 'components';\nimport { getDeviceList, deleteDevice, sendCommand, getLatestAppRelease, forceUpdateDevice } from 'api/devices';\nimport { deleteOrgUnit } from 'api/organization';\nimport { DeviceListLevel, DeviceCommands, UserRoles, AndroidVersions } from 'constants/enums';\nimport EditSectorModal from 'components/Common/EditSectorModal';\nimport { APP_CONFIG } from 'constants/global-variables';\nimport {\n\tfindSectorById,\n\tmapSectionsToRender,\n\tgetParentSector,\n\tgetHierarchyByHelloDeviceId,\n\tfindDeviceById,\n\tsortByRoomName,\n} from 'infrastructure/helpers/commonHelpers';\nimport { CSVLink } from 'react-csv';\nimport { getUserRole } from 'infrastructure/auth';\nimport RebootLogExport from 'components/RebootLogExport';\nimport VoiceCommandCallingModal from 'components/Common/VoiceCommandCallingModal';\nimport PullDeviceLogs from 'components/PullDeviceLogs';\nimport _ from 'lodash';\n\nclass Department extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tdevices: [],\n\t\t\tisDepartmentModalOpen: false,\n\t\t\tselectedDevice: {},\n\t\t\tselectedOrg: {},\n\t\t\tisDeleteDeviceModalOpen: false,\n\t\t\tisRebootDeviceModalOpen: false,\n\t\t\trebootReason: '',\n\t\t\tisUpdateDeviceModalOpen: false,\n\t\t\tisDeleteOrgUnitModalOpen: false,\n\t\t\tsectorData: {},\n\t\t\tisEditSectorModalOpen: false,\n\t\t\tparentSectorName: '',\n\t\t\tparentSectorType: '',\n\t\t\tisDeleteDeviceModalLoading: false,\n\t\t\tlatestAppRelease: null,\n\t\t\tisVoiceCommandCallingModalOpen: false,\n\t\t\tcurrentSector: [],\n\t\t};\n\t}\n\n\tasync componentDidMount() {\n\t\tthis.loadDepartment();\n\t}\n\n\tcomponentDidUpdate = prevProps => {\n\t\tconst { departmentId } = this.props.match.params;\n\t\tif (\n\t\t\tdepartmentId !== prevProps.match.params.departmentId ||\n\t\t\t(!prevProps.showAssignDeviceModalData.assignCompleted && this.props.showAssignDeviceModalData.assignCompleted)\n\t\t) {\n\t\t\tthis.loadDepartment();\n\t\t}\n\t};\n\n\texportAsCsv() {\n\t\treturn this.state.devices.map(({ roomName, serialNumber, macAddress, appVersion, firmwareRevision, osVersion, solHelloDeviceId, ipAddress }) => ({\n\t\t\troomName,\n\t\t\tserialNumber,\n\t\t\troom: getHierarchyByHelloDeviceId(this.props.treeData.tree, solHelloDeviceId),\n\t\t\tmacAddress,\n\t\t\tappVersion,\n\t\t\tosVersion: firmwareRevision,\n\t\t\tandroidVersion: this.getCodeNameByOsVersion(osVersion),\n\t\t\tipAddress,\n\t\t}));\n\t}\n\n\tgetCurrentDepartment() {\n\t\tlet hospitals = this.props.treeData.tree;\n\t\tlet department = findSectorById(hospitals, this.props.match.params.departmentId);\n\t\treturn {\n\t\t\tsectorName: department ? department.name : '',\n\t\t\tsectorId: department ? department.departmentId : '',\n\t\t\tdepartmentName: department ? department.name : '',\n\t\t\thospitalId: department ? department.hospitalId : '',\n\t\t\tdepartmentId: department ? department.departmentId : '',\n\t\t\tsectorType: department ? department.type : '',\n\t\t};\n\t}\n\n\tloadDepartment = async () => {\n\t\tconst devices = await getDeviceList(DeviceListLevel.DEPARTMENT, this.props.match.params.departmentId);\n\t\tconst latestAppRelease = await getLatestAppRelease(APP_CONFIG.deviceAppId);\n\t\tconst currentSector = findSectorById(this.props.treeData.tree, this.props.match.params.departmentId);\n\t\tlet deviceList = [];\n\t\tif (currentSector?.subOptions) {\n\t\t\tdeviceList = devices.map(d => {\n\t\t\t\tconst roomName = findSectorById(this.props.treeData.tree, d.solHelloDeviceId.toString())?.name ?? '';\n\t\t\t\tconst device = findDeviceById(currentSector.subOptions, d.solHelloDeviceId);\n\t\t\t\tif (device) {\n\t\t\t\t\tdevice.voiceCommandCalling = d.voiceCommandCalling;\n\t\t\t\t}\n\t\t\t\treturn { ...d, roomName };\n\t\t\t});\n\t\t}\n\n\t\tthis.setState({\n\t\t\tdevices: sortByRoomName(deviceList),\n\t\t\tlatestAppRelease,\n\t\t\tcurrentSector: currentSector ? [currentSector] : [],\n\t\t});\n\t};\n\n\ttoggleEditSectorModal = data => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisEditSectorModalOpen: !this.state.isEditSectorModalOpen,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tif (this.state.isEditSectorModalOpen) {\n\t\t\t\t\tif (!data) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tlet sector = findSectorById(this.props.treeData.tree, data[data.sectorType + 'Id']);\n\t\t\t\t\tthis.props.setCurrentSectorLocation(sector.treeLocation);\n\t\t\t\t\tlet sectorParent = getParentSector(this.props.treeData.tree, sector);\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tsectorType: data.sectorType,\n\t\t\t\t\t\tsectorName: data.sectorName,\n\t\t\t\t\t\tsectorData: data,\n\t\t\t\t\t\tsectorLocation: sector.treeLocation,\n\t\t\t\t\t\tparentSectorName: sectorParent.name,\n\t\t\t\t\t\tparentSectorType: sectorParent.type,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t};\n\n\tinitDeleteOrg = data => {\n\t\tthis.setState({\n\t\t\tselectedOrg: data,\n\t\t});\n\t\tthis.toggleDeleteOrgUnitModal();\n\t};\n\n\tunAssignDevice = async () => {\n\t\tconst {\n\t\t\tselectedDevice: { deviceId },\n\t\t} = this.state;\n\n\t\tif (deviceId) {\n\t\t\tthis.setState({\n\t\t\t\tisDeleteDeviceModalLoading: true,\n\t\t\t});\n\n\t\t\tawait deleteDevice(deviceId);\n\t\t}\n\n\t\tthis.loadDepartment();\n\t\tthis.toggleDeleteDeviceModal();\n\t\tthis.props.getTreeData();\n\n\t\tthis.setState({\n\t\t\tisDeleteDeviceModalLoading: false,\n\t\t});\n\t};\n\n\trebootDevice = async () => {\n\t\tconst {\n\t\t\tselectedDevice: { deviceId },\n\t\t} = this.state;\n\n\t\tif (deviceId) {\n\t\t\tawait sendCommand(deviceId, DeviceCommands.REBOOT, this.state.rebootReason);\n\t\t}\n\n\t\tthis.toggleRebootDeviceModal();\n\t};\n\n\tforceUpdateDevice = async () => {\n\t\tconst {\n\t\t\tselectedDevice: { deviceId, appVersion },\n\t\t\tlatestAppRelease: { install_url: appInstallUrl, short_version: latestAppVersion },\n\t\t} = this.state;\n\n\t\tif (appVersion && latestAppVersion && appVersion !== latestAppVersion) {\n\t\t\tawait forceUpdateDevice({\n\t\t\t\tdeviceId,\n\t\t\t\tdynamicData: appInstallUrl,\n\t\t\t});\n\t\t}\n\n\t\tthis.toggleUpdateDeviceModal();\n\t};\n\n\tdeleteOrgUnitSubmit = async () => {\n\t\tawait deleteOrgUnit(this.state.selectedOrg.level, this.state.selectedOrg.id);\n\t\tthis.moveToParentSector(this.state.selectedOrg.id);\n\t\tthis.toggleDeleteOrgUnitModal();\n\t\tthis.props.getTreeData();\n\t};\n\n\tmoveToParentSector = currentSectorId => {\n\t\tlet selectedSector = findSectorById(this.props.treeData.tree, currentSectorId);\n\t\tlet parentSector = getParentSector(this.props.treeData.tree, selectedSector);\n\t\tparentSector.isSelected = true;\n\t\tthis.props.history.push(parentSector.link);\n\t\tthis.props.updateBreadcrumb(parentSector.breadcrumb);\n\t};\n\n\ttoggleDeleteDeviceModal = (selectedDevice = {}) => {\n\t\tthis.setState({\n\t\t\tselectedDevice,\n\t\t\tisDeleteDeviceModalOpen: !this.state.isDeleteDeviceModalOpen,\n\t\t});\n\t};\n\n\ttoggleRebootDeviceModal = (selectedDevice = {}) => {\n\t\tthis.setState({\n\t\t\tselectedDevice,\n\t\t\tisRebootDeviceModalOpen: !this.state.isRebootDeviceModalOpen,\n\t\t\trebootReason: '',\n\t\t});\n\t};\n\n\ttoggleUpdateDeviceModal = (selectedDevice = {}) => {\n\t\tthis.setState({\n\t\t\tselectedDevice,\n\t\t\tisUpdateDeviceModalOpen: !this.state.isUpdateDeviceModalOpen,\n\t\t});\n\t};\n\n\ttoggleDeleteOrgUnitModal = () => {\n\t\tthis.setState({\n\t\t\tisDeleteOrgUnitModalOpen: !this.state.isDeleteOrgUnitModalOpen,\n\t\t});\n\t};\n\n\ttoggleDepartmentModal = () => {\n\t\tthis.setState({\n\t\t\tisDepartmentModalOpen: !this.state.isDepartmentModalOpen,\n\t\t});\n\t};\n\n\tgetCodeNameByOsVersion = osVersion => {\n\t\tlet version = AndroidVersions.find(({ apiLevel }) => apiLevel.includes(+osVersion));\n\t\treturn version?.codeName ?? 'N/A';\n\t};\n\n\tdisplayDevices = () => {\n\t\tif (!this.state.devices.length) {\n\t\t\treturn [];\n\t\t}\n\t\tconst userRole = getUserRole();\n\t\treturn this.state.devices.map(\n\t\t\t({ roomName, serialNumber, solHelloDeviceId, firmwareRevision, appVersion, osVersion, macAddress, isOnline, voiceCommandCalling, ipAddress }) => {\n\t\t\t\treturn {\n\t\t\t\t\troomName: roomName ?? 'N/A',\n\t\t\t\t\tserialNumber: serialNumber ?? 'N/A',\n\t\t\t\t\tmacAddress: macAddress ?? 'N/A',\n\t\t\t\t\tappVersion:
    {appVersion || 'N/A'}
    ,\n\t\t\t\t\tfirmwareRevision: firmwareRevision ?? 'N/A',\n\t\t\t\t\tosVersion: this.getCodeNameByOsVersion(osVersion),\n\t\t\t\t\tipAddress,\n\t\t\t\t\tvoiceCommandCalling: voiceCommandCalling ? 'Active' : 'Not active',\n\t\t\t\t\tactions: (\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t this.toggleRebootDeviceModal({ deviceId: solHelloDeviceId, serialNumber })}>\n\t\t\t\t\t\t\t\trefresh\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{userRole === UserRoles.ADMIN && (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t this.props.toggleAssignDeviceModal({ deviceId: solHelloDeviceId, show: true })}>\n\t\t\t\t\t\t\t\t\t\tswap_vert\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t this.toggleDeleteDeviceModal({ deviceId: solHelloDeviceId, serialNumber })}>\n\t\t\t\t\t\t\t\t\t\tdelete\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t
    \n\t\t\t\t\t),\n\t\t\t\t};\n\t\t\t}\n\t\t);\n\t};\n\n\tupdateTree = () => {\n\t\tthis.props.getTreeData();\n\t\tthis.toggleEditSectorModal();\n\t};\n\n\tgetActiveDevices() {\n\t\treturn this.state.devices.filter(device => device.isOnline);\n\t}\n\n\ttoggleVoiceCommandCallingModal = () => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisVoiceCommandCallingModalOpen: !this.state.isVoiceCommandCallingModalOpen,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.loadDepartment();\n\t\t\t}\n\t\t);\n\t};\n\n\tupdateVCCList = (solHelloDeviceIds, isChecked) => {\n\t\tconst currentSector = _.cloneDeep(this.state.currentSector);\n\t\tsolHelloDeviceIds.forEach(solHelloDeviceId => {\n\t\t\tconst device = findDeviceById(currentSector, solHelloDeviceId);\n\t\t\tif (device) {\n\t\t\t\tdevice.voiceCommandCalling = isChecked;\n\t\t\t}\n\t\t});\n\t\tthis.setState({ currentSector });\n\t};\n\n\trender() {\n\t\tconst department = this.getCurrentDepartment();\n\t\tconst sections = mapSectionsToRender(this.props.treeData.tree, department, this.toggleEditSectorModal, this.initDeleteOrg);\n\t\tconst userRole = getUserRole();\n\t\treturn (\n\t\t\t
    \n\t\t\t\t

    \n\t\t\t\t\t{department.departmentName}\n\t\t\t\t\t{userRole === UserRoles.ADMIN && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t

    \n\t\t\t\t\n\t\t\t\t,\n\t\t\t\t\t\t
    ,\n\t\t\t\t\t\t
    ,\n\t\t\t\t\t]}\n\t\t\t\t/>\n\n\t\t\t\t\n\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t

    Are you sure you want to unassign device {this.state.selectedDevice.serialNumber}? Neither you or patient won't be able to make any calls.

    \n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t

    Why do you want to reboot device {this.state.selectedDevice.serialNumber}?

    \n\t\t\t\t\t\t this.setState({ rebootReason: e.target.value })}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t

    Are you sure you want to force update device {this.state.selectedDevice.serialNumber}?

    \n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t

    \n\t\t\t\t\t\t\tAre you sure you want to delete {this.state.selectedOrg.name}? Any devices related to it will be deleted and neither Virtual Care Providers or\n\t\t\t\t\t\t\tpatients won't be able to make any calls.\n\t\t\t\t\t\t

    \n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n\nexport default connect(\n\tstate => state.organization,\n\tdispatch => bindActionCreators(actionCreators, dispatch)\n)(withRouter(Department));\n","import React, { Component } from 'react';\nimport { Button, Table, Tabs, Form, Modal, DescriptionBox, Input } from 'components';\nimport { withRouter } from 'react-router-dom';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { actionCreators } from 'state/organization/actions';\nimport { getDeviceList, deleteDevice, sendCommand, getLatestAppRelease, forceUpdateDevice } from 'api/devices';\nimport { deleteOrgUnit } from 'api/organization';\nimport { DeviceListLevel, DeviceCommands, UserRoles, AndroidVersions } from 'constants/enums';\nimport EditSectorModal from 'components/Common/EditSectorModal';\nimport {\n\tfindSectorById,\n\tmapSectionsToRender,\n\tgetParentSector,\n\tgetHierarchyByHelloDeviceId,\n\tfindDeviceById,\n\tsortByRoomName,\n} from 'infrastructure/helpers/commonHelpers';\nimport { APP_CONFIG } from 'constants/global-variables';\nimport { CSVLink } from 'react-csv';\nimport { getUserRole } from 'infrastructure/auth';\nimport RebootLogExport from 'components/RebootLogExport';\nimport VoiceCommandCallingModal from 'components/Common/VoiceCommandCallingModal';\nimport PullDeviceLogs from 'components/PullDeviceLogs';\nimport _ from 'lodash';\n\nclass Floor extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tdevices: [],\n\t\t\tpreSelected: null,\n\t\t\tselectedDevice: {},\n\t\t\tselectedOrg: {},\n\t\t\tisDeleteDeviceModalOpen: false,\n\t\t\tisRebootDeviceModalOpen: false,\n\t\t\tisUpdateDeviceModalOpen: false,\n\t\t\tisDeleteOrgUnitModalOpen: false,\n\t\t\tisEditSectorModalOpen: false,\n\t\t\tsectorData: {},\n\t\t\tsectorLocation: [],\n\t\t\tparentSectorName: '',\n\t\t\tparentSectorType: '',\n\t\t\trebootReason: '',\n\t\t\tisDeleteDeviceModalLoading: false,\n\t\t\tlatestAppRelease: null,\n\t\t\tisVoiceCommandCallingModalOpen: false,\n\t\t\tcurrentSector: [],\n\t\t};\n\t}\n\n\tasync componentDidMount() {\n\t\tthis.loadFloor();\n\t}\n\n\tcomponentDidUpdate = (prevProps, prevState) => {\n\t\tconst { floorId } = this.props.match.params;\n\t\tif (\n\t\t\tfloorId !== prevProps.match.params.floorId ||\n\t\t\t(!prevProps.showAssignDeviceModalData.assignCompleted && this.props.showAssignDeviceModalData.assignCompleted)\n\t\t) {\n\t\t\tthis.loadFloor();\n\t\t}\n\t};\n\n\texportAsCsv() {\n\t\treturn this.state.devices.map(({ roomName, serialNumber, macAddress, appVersion, firmwareRevision, osVersion, solHelloDeviceId, ipAddress }) => ({\n\t\t\troomName,\n\t\t\tserialNumber,\n\t\t\troom: getHierarchyByHelloDeviceId(this.props.treeData.tree, solHelloDeviceId),\n\t\t\tmacAddress,\n\t\t\tappVersion,\n\t\t\tosVersion: firmwareRevision,\n\t\t\tandroidVersion: this.getCodeNameByOsVersion(osVersion),\n\t\t\tipAddress,\n\t\t}));\n\t}\n\n\tgetCodeNameByOsVersion = osVersion => {\n\t\tlet version = AndroidVersions.find(({ apiLevel }) => apiLevel.includes(+osVersion));\n\t\treturn version?.codeName ?? 'N/A';\n\t};\n\n\tgetCurrentFloor() {\n\t\tlet hospitals = this.props.treeData.tree;\n\t\tlet floor = findSectorById(hospitals, this.props.match.params.floorId);\n\t\treturn {\n\t\t\tsectorName: floor ? floor.name : '',\n\t\t\tsectorId: floor ? floor.floorId : '',\n\t\t\tfloorName: floor ? floor.name : '',\n\t\t\thospitalId: floor ? floor.hospitalId : '',\n\t\t\tdepartmentId: floor ? floor.departmentId : '',\n\t\t\tfloorId: floor ? floor.floorId : '',\n\t\t\tsectorType: floor ? floor.type : '',\n\t\t};\n\t}\n\n\tloadFloor = async () => {\n\t\tconst devices = await getDeviceList(DeviceListLevel.FLOOR, this.props.match.params.floorId);\n\t\tconst latestAppRelease = await getLatestAppRelease(APP_CONFIG.deviceAppId);\n\t\tconst currentSector = findSectorById(this.props.treeData.tree, this.props.match.params.floorId);\n\t\tlet deviceList = [];\n\t\tif (currentSector?.subOptions) {\n\t\t\tdeviceList = devices.map(d => {\n\t\t\t\tconst roomName = findSectorById(this.props.treeData.tree, d.solHelloDeviceId.toString())?.name ?? '';\n\t\t\t\tconst device = findDeviceById(currentSector.subOptions, d.solHelloDeviceId);\n\t\t\t\tif (device) {\n\t\t\t\t\tdevice.voiceCommandCalling = d.voiceCommandCalling;\n\t\t\t\t}\n\t\t\t\treturn { ...d, roomName };\n\t\t\t});\n\t\t}\n\t\tthis.setState({\n\t\t\tdevices: sortByRoomName(deviceList),\n\t\t\tlatestAppRelease,\n\t\t\tcurrentSector: currentSector ? [currentSector] : [],\n\t\t});\n\t};\n\n\tdisplayDevices = () => {\n\t\tif (!this.state.devices.length) {\n\t\t\treturn [];\n\t\t}\n\t\tconst userRole = getUserRole();\n\t\treturn this.state.devices.map(\n\t\t\t({ roomName, serialNumber, solHelloDeviceId, firmwareRevision, appVersion, osVersion, macAddress, isOnline, voiceCommandCalling, ipAddress }) => {\n\t\t\t\treturn {\n\t\t\t\t\troomName: roomName ?? 'N/A',\n\t\t\t\t\tserialNumber: serialNumber ?? 'N/A',\n\t\t\t\t\tmacAddress: macAddress ?? 'N/A',\n\t\t\t\t\tappVersion:
    {appVersion || 'N/A'}
    ,\n\t\t\t\t\tfirmwareRevision: firmwareRevision ?? 'N/A',\n\t\t\t\t\tosVersion: this.getCodeNameByOsVersion(osVersion),\n\t\t\t\t\tipAddress,\n\t\t\t\t\tvoiceCommandCalling: voiceCommandCalling ? 'Active' : 'Not active',\n\t\t\t\t\tactions: (\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t this.toggleRebootDeviceModal({ deviceId: solHelloDeviceId, serialNumber })}>\n\t\t\t\t\t\t\t\trefresh\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{userRole === UserRoles.ADMIN && (\n\t\t\t\t\t\t\t\t this.props.toggleAssignDeviceModal({ deviceId: solHelloDeviceId, show: true })}>\n\t\t\t\t\t\t\t\t\tswap_vert\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{userRole === UserRoles.ADMIN && (\n\t\t\t\t\t\t\t\t this.toggleDeleteDeviceModal({ deviceId: solHelloDeviceId, serialNumber })}>\n\t\t\t\t\t\t\t\t\tdelete\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t
    \n\t\t\t\t\t),\n\t\t\t\t};\n\t\t\t}\n\t\t);\n\t};\n\n\ttoggleEditSectorModal = data => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisEditSectorModalOpen: !this.state.isEditSectorModalOpen,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tif (this.state.isEditSectorModalOpen) {\n\t\t\t\t\tif (!data) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tlet sector = findSectorById(this.props.treeData.tree, data[data.sectorType + 'Id']);\n\t\t\t\t\tthis.props.setCurrentSectorLocation(sector.treeLocation);\n\t\t\t\t\tlet sectorParent = getParentSector(this.props.treeData.tree, sector);\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tsectorType: data.sectorType,\n\t\t\t\t\t\tsectorName: data.sectorName,\n\t\t\t\t\t\tsectorData: data,\n\t\t\t\t\t\tsectorLocation: sector.treeLocation,\n\t\t\t\t\t\tparentSectorName: sectorParent.name,\n\t\t\t\t\t\tparentSectorType: sectorParent.type,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t};\n\n\tinitDeleteOrg = data => {\n\t\tthis.setState({\n\t\t\tselectedOrg: data,\n\t\t});\n\t\tthis.toggleDeleteOrgUnitModal();\n\t};\n\n\tunAssignDevice = async () => {\n\t\tconst {\n\t\t\tselectedDevice: { deviceId },\n\t\t} = this.state;\n\n\t\tif (deviceId) {\n\t\t\tthis.setState({\n\t\t\t\tisDeleteDeviceModalLoading: true,\n\t\t\t});\n\n\t\t\tawait deleteDevice(deviceId);\n\t\t}\n\n\t\tthis.loadFloor();\n\t\tthis.toggleDeleteDeviceModal();\n\t\tthis.props.getTreeData();\n\n\t\tthis.setState({\n\t\t\tisDeleteDeviceModalLoading: false,\n\t\t});\n\t};\n\n\trebootDevice = async () => {\n\t\tconst {\n\t\t\tselectedDevice: { deviceId },\n\t\t} = this.state;\n\n\t\tif (deviceId) {\n\t\t\tawait sendCommand(deviceId, DeviceCommands.REBOOT, this.state.rebootReason);\n\t\t}\n\n\t\tthis.toggleRebootDeviceModal();\n\t};\n\n\tforceUpdateDevice = async () => {\n\t\tconst {\n\t\t\tselectedDevice: { deviceId, appVersion },\n\t\t\tlatestAppRelease: { install_url: appInstallUrl, short_version: latestAppVersion },\n\t\t} = this.state;\n\n\t\tif (appVersion && latestAppVersion && appVersion !== latestAppVersion) {\n\t\t\tawait forceUpdateDevice({\n\t\t\t\tdeviceId,\n\t\t\t\tdynamicData: appInstallUrl,\n\t\t\t});\n\t\t}\n\n\t\tthis.toggleUpdateDeviceModal();\n\t};\n\n\tdeleteOrgUnitSubmit = async () => {\n\t\tawait deleteOrgUnit(this.state.selectedOrg.level, this.state.selectedOrg.id);\n\t\tthis.moveToParentSector(this.state.selectedOrg.id);\n\t\tthis.toggleDeleteOrgUnitModal();\n\t\tthis.props.getTreeData();\n\t};\n\n\tmoveToParentSector = currentSectorId => {\n\t\tlet selectedSector = findSectorById(this.props.treeData.tree, currentSectorId);\n\t\tlet parentSector = getParentSector(this.props.treeData.tree, selectedSector);\n\t\tparentSector.isSelected = true;\n\t\tthis.props.history.push(parentSector.link);\n\t\tthis.props.updateBreadcrumb(parentSector.breadcrumb);\n\t};\n\n\ttoggleDeleteDeviceModal = (selectedDevice = {}) => {\n\t\tthis.setState({\n\t\t\tselectedDevice,\n\t\t\tisDeleteDeviceModalOpen: !this.state.isDeleteDeviceModalOpen,\n\t\t});\n\t};\n\n\ttoggleRebootDeviceModal = (selectedDevice = {}) => {\n\t\tthis.setState({\n\t\t\tselectedDevice,\n\t\t\tisRebootDeviceModalOpen: !this.state.isRebootDeviceModalOpen,\n\t\t\trebootReason: '',\n\t\t});\n\t};\n\n\ttoggleUpdateDeviceModal = (selectedDevice = {}) => {\n\t\tthis.setState({\n\t\t\tselectedDevice,\n\t\t\tisUpdateDeviceModalOpen: !this.state.isUpdateDeviceModalOpen,\n\t\t});\n\t};\n\n\ttoggleDeleteOrgUnitModal = () => {\n\t\tthis.setState({\n\t\t\tisDeleteOrgUnitModalOpen: !this.state.isDeleteOrgUnitModalOpen,\n\t\t});\n\t};\n\n\tsetInputValues = event => {\n\t\tthis.setState({\n\t\t\t[event.target.name]: event.target.value,\n\t\t});\n\t};\n\n\tupdateTree = () => {\n\t\tthis.props.getTreeData();\n\t\tthis.toggleEditSectorModal();\n\t};\n\n\ttoggleVoiceCommandCallingModal = () => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisVoiceCommandCallingModalOpen: !this.state.isVoiceCommandCallingModalOpen,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.loadFloor();\n\t\t\t}\n\t\t);\n\t};\n\n\tupdateVCCList = (solHelloDeviceIds, isChecked) => {\n\t\tconst currentSector = _.cloneDeep(this.state.currentSector);\n\t\tsolHelloDeviceIds.forEach(solHelloDeviceId => {\n\t\t\tconst device = findDeviceById(currentSector, solHelloDeviceId);\n\t\t\tif (device) {\n\t\t\t\tdevice.voiceCommandCalling = isChecked;\n\t\t\t}\n\t\t});\n\t\tthis.setState({ currentSector });\n\t};\n\n\trender() {\n\t\tconst floor = this.getCurrentFloor();\n\t\tconst sections = mapSectionsToRender(this.props.treeData.tree, floor, this.toggleEditSectorModal, this.initDeleteOrg);\n\t\tconst userRole = getUserRole();\n\t\treturn (\n\t\t\t
    \n\t\t\t\t

    \n\t\t\t\t\t{floor.floorName}\n\t\t\t\t\t{userRole === UserRoles.ADMIN && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t

    \n\t\t\t\t\n\t\t\t\t,\n\t\t\t\t\t\t
    ,\n\t\t\t\t\t]}\n\t\t\t\t/>\n\n\t\t\t\t\n\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t

    Are you sure you want to unassign device {this.state.selectedDevice.serialNumber}? Neither you or patient won't be able to make any calls.

    \n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t

    Why do you want to reboot device {this.state.selectedDevice.serialNumber}?

    \n\t\t\t\t\t\t this.setState({ rebootReason: e.target.value })}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t

    Are you sure you want to force update device {this.state.selectedDevice.serialNumber}?

    \n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t

    \n\t\t\t\t\t\t\tAre you sure you want to delete {this.state.selectedOrg.name}? Any devices related to it will be deleted and neither Virtual Care Providers or\n\t\t\t\t\t\t\tpatients won't be able to make any calls.\n\t\t\t\t\t\t

    \n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n\nexport default connect(\n\tstate => state.organization,\n\tdispatch => bindActionCreators(actionCreators, dispatch)\n)(withRouter(Floor));\n","import React, { Component } from 'react';\nimport Table from 'components/Table';\nimport Tabs from 'components/Tabs';\nimport Button from 'components/Button';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { actionCreators } from 'state/organization/actions';\nimport { withRouter } from 'react-router-dom';\nimport { If, Then, Else } from 'react-if';\nimport { Modal, Form, Alert, Input, DescriptionBox, SkeletonLoader, TreeView, Dropdown, ListGroup, Badge } from 'components';\nimport { DeviceListLevel, DeviceCommands, UserRoles, AndroidVersions } from 'constants/enums';\nimport { gatewayApi, APP_CONFIG } from 'constants/global-variables';\nimport {\n\tgetUnassociatedDevices,\n\tdeleteDevice,\n\tsendCommand,\n\tgetLatestAppRelease,\n\tforceUpdateDevice,\n\taddDeviceSettings,\n\tgetDeviceList,\n\tgetAllowList,\n} from 'api/devices';\nimport { deleteOrgUnit } from 'api/organization';\nimport { findSectorById, getParentSector, getHierarchyFromBreadcrumb } from 'infrastructure/helpers/commonHelpers';\nimport { CSVLink } from 'react-csv';\nimport EditSectorModal from 'components/Common/EditSectorModal';\nimport { getUserRole } from 'infrastructure/auth';\nimport RebootLogExport from 'components/RebootLogExport';\nimport PullDeviceLogs from 'components/PullDeviceLogs';\nimport CheckBox from 'components/Common/CheckBox';\nimport moment from 'moment';\n\nclass Room extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.exportAllowlistRef = React.createRef();\n\t\tthis.exportDeviceDetailsRef = React.createRef();\n\n\t\tthis.state = {\n\t\t\tisEditSectorModalOpen: false,\n\t\t\tisDevicesModalOpen: false,\n\t\t\tisVoiceCommandCallingOpen: false,\n\t\t\tisRoomLoaded: false,\n\t\t\tpreSelected: null,\n\t\t\tdevices: [],\n\t\t\tallowListList: [],\n\t\t\thelloDeviceId: null,\n\t\t\tunassociatedDevicesToSelect: [],\n\t\t\tisAddDeviceModalLoading: true,\n\t\t\tselectedDevice: {},\n\t\t\tselectedOrg: {},\n\t\t\tisDeleteDeviceModalOpen: false,\n\t\t\tisRebootDeviceModalOpen: false,\n\t\t\tisUpdateDeviceModalOpen: false,\n\t\t\tisDeleteOrgUnitModalOpen: false,\n\t\t\tparentSectorName: '',\n\t\t\trebootReason: '',\n\t\t\tparentSectorType: '',\n\t\t\tisAddDeviceModalSubmitDisabled: true,\n\t\t\tisDeleteDeviceModalLoading: false,\n\t\t\tlatestAppRelease: null,\n\t\t\tdeviceIdInput: '',\n\t\t\terror: '',\n\t\t\tsuccess: '',\n\t\t\tisVoiceCommandCallingModalLoading: false,\n\t\t\tsectorData: {},\n\t\t};\n\n\t\tthis.csvDropdownItems = [\n\t\t\t{\n\t\t\t\ttitle: 'Device Details CSV',\n\t\t\t\ticon: 'save',\n\t\t\t\tid: 'save_device_csv',\n\t\t\t},\n\t\t\t{\n\t\t\t\ttitle: 'Endpoints Whitelist CSV',\n\t\t\t\ticon: 'check_box',\n\t\t\t\tid: 'save_allowlist_csv',\n\t\t\t},\n\t\t];\n\t}\n\n\tasync componentDidMount() {\n\t\tthis.loadRoom();\n\t}\n\n\tcomponentDidUpdate = (prevProps, prevState) => {\n\t\tconst { roomId } = this.props.match.params;\n\t\tif (\n\t\t\troomId !== prevProps.match.params.roomId ||\n\t\t\t(!prevProps.showAssignDeviceModalData.assignCompleted && this.props.showAssignDeviceModalData.assignCompleted)\n\t\t) {\n\t\t\tthis.loadRoom();\n\t\t}\n\t};\n\n\tgetCodeNameByOsVersion = osVersion => {\n\t\tconst version = AndroidVersions.find(({ apiLevel }) => apiLevel.includes(+osVersion));\n\t\treturn version?.codeName ?? 'N/A';\n\t};\n\n\texportAsCsv() {\n\t\tconst room = getHierarchyFromBreadcrumb(this.props.breadcrumb);\n\t\treturn this.state.devices.map(({ serialNumber, macAddress, appVersion, osVersion, firmwareRevision, ipAddress }) => ({\n\t\t\t'Serial Number': serialNumber,\n\t\t\tRoom: room,\n\t\t\t'Mac Address': macAddress,\n\t\t\t'App Version:': appVersion,\n\t\t\t'Os Version': firmwareRevision,\n\t\t\t'Android Version': this.getCodeNameByOsVersion(osVersion),\n\t\t\t'Ip Addres': ipAddress,\n\t\t}));\n\t}\n\n\texportAllowlistCsv() {\n\t\treturn this.state.allowListList.map(({ id, domainUrl, createdDate, isAllowed, protocol, response }) => ({\n\t\t\tID: id,\n\t\t\t'Domain Url': domainUrl,\n\t\t\t'Reported On': moment(createdDate).format('YYYY/MM/DD - HH:mm'),\n\t\t\tAllowed: isAllowed ? 'Allowed' : 'Denied',\n\t\t\tProtocol: protocol,\n\t\t\tResponse: response,\n\t\t}));\n\t}\n\n\tloadRoom = async () => {\n\t\tconst devicesList = [];\n\t\tlet allowListList = [];\n\t\tconst fetchUnassociatedDevices = getUnassociatedDevices();\n\t\tconst fetchDeviceData = getDeviceList(DeviceListLevel.ROOM, this.props.match.params.roomId);\n\t\tconst fetchLatestAppRelease = getLatestAppRelease(APP_CONFIG.deviceAppId);\n\n\t\tconst [deviceData, unassociatedDevicesRes, latestAppRelease] = await Promise.all([fetchDeviceData, fetchUnassociatedDevices, fetchLatestAppRelease]);\n\n\t\tif (deviceData.length > 0) {\n\t\t\tconst { solHelloDeviceId } = deviceData[0];\n\t\t\tconst response = await getAllowList(solHelloDeviceId);\n\t\t\tif (response.error) {\n\t\t\t\tthis.showErrorMessage(response.error.message);\n\t\t\t} else {\n\t\t\t\tallowListList = response;\n\t\t\t}\n\t\t}\n\n\t\tconst currentSector = this.props.currentSectorLocation;\n\t\tlet preSelected = {};\n\t\tif (currentSector.length) {\n\t\t\tpreSelected = {\n\t\t\t\t[currentSector[0].name]: {\n\t\t\t\t\t[currentSector[0].subOptions[0].name]: {\n\t\t\t\t\t\t[currentSector[0].subOptions[0].subOptions[0].name]: {\n\t\t\t\t\t\t\t[currentSector[0].subOptions[0].subOptions[0].subOptions[0]]: {},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\tunassociatedDevicesRes.map(device => {\n\t\t\tdevicesList.push({\n\t\t\t\tvalue: device.uid,\n\t\t\t\tid: device.solHelloDeviceId,\n\t\t\t});\n\t\t});\n\n\t\tthis.setState({\n\t\t\tisRoomLoaded: true,\n\t\t\tpreSelected,\n\t\t\tdevices: deviceData,\n\t\t\tallowListList: allowListList.reverse(),\n\t\t\tunassociatedDevicesToSelect: devicesList,\n\t\t\tisAddDeviceModalLoading: false,\n\t\t\tlatestAppRelease,\n\t\t\tisVoiceCommandCallingModalLoading: false,\n\t\t});\n\t};\n\n\tdisplayDevices = () => {\n\t\tif (!this.state.devices.length) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst userRole = getUserRole();\n\t\treturn this.state.devices.map(\n\t\t\t({ serialNumber, solHelloDeviceId, appVersion, osVersion, firmwareRevision, macAddress, isOnline, voiceCommandCalling, ipAddress }) => {\n\t\t\t\treturn {\n\t\t\t\t\troomName: this.getCurrentRoom()?.roomName ?? 'N/A',\n\t\t\t\t\tserialNumber: serialNumber ?? 'N/A',\n\t\t\t\t\tmacAddress: macAddress ?? 'N/A',\n\t\t\t\t\tappVersion:
    {appVersion || 'N/A'}
    ,\n\t\t\t\t\tfirmwareRevision: firmwareRevision ?? 'N/A',\n\t\t\t\t\tosVersion: this.getCodeNameByOsVersion(osVersion),\n\t\t\t\t\tipAddress,\n\t\t\t\t\tvoiceCommandCalling: voiceCommandCalling ? 'Active' : 'Not active',\n\t\t\t\t\tactions: (\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t{userRole === UserRoles.ADMIN && (\n\t\t\t\t\t\t\t\t this.toggleVoiceCommandCallingModal({ deviceId: solHelloDeviceId, serialNumber, voiceCommandCalling })}>\n\t\t\t\t\t\t\t\t\tsupervisor_account\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t this.toggleRebootDeviceModal({ deviceId: solHelloDeviceId, serialNumber })}>\n\t\t\t\t\t\t\t\trefresh\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{userRole === UserRoles.ADMIN && (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t this.props.toggleAssignDeviceModal({ deviceId: solHelloDeviceId, show: true })}>\n\t\t\t\t\t\t\t\t\t\tswap_vert\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t this.toggleDeleteDeviceModal({ deviceId: solHelloDeviceId, serialNumber })}>\n\t\t\t\t\t\t\t\t\t\tdelete\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t
    \n\t\t\t\t\t),\n\t\t\t\t};\n\t\t\t}\n\t\t);\n\t};\n\n\tdisplayAllowlist = () => {\n\t\tif (!this.state.allowListList.length) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn this.state.allowListList.map(({ id, domainUrl, createdDate, isAllowed, protocol, response }) => ({\n\t\t\tnumber: id,\n\t\t\tdomainUrl,\n\t\t\tcreatedDate: moment(createdDate).format('YYYY/MM/DD - HH:mm'),\n\t\t\tisAllowed: isAllowed ? 'Allowed' : 'Denied',\n\t\t\tprotocol,\n\t\t\tresponse,\n\t\t}));\n\t};\n\n\tunAssignDevice = async () => {\n\t\tconst {\n\t\t\tselectedDevice: { deviceId },\n\t\t} = this.state;\n\n\t\tif (deviceId) {\n\t\t\tthis.setState({\n\t\t\t\tisDeleteDeviceModalLoading: true,\n\t\t\t});\n\t\t\tawait deleteDevice(deviceId);\n\t\t}\n\n\t\tthis.loadRoom();\n\t\tthis.toggleDeleteDeviceModal();\n\t\tthis.props.getTreeData();\n\n\t\tthis.setState({\n\t\t\tisDeleteDeviceModalLoading: false,\n\t\t});\n\t};\n\n\trebootDevice = async () => {\n\t\tconst {\n\t\t\tselectedDevice: { deviceId },\n\t\t} = this.state;\n\n\t\tif (deviceId) {\n\t\t\tawait sendCommand(deviceId, DeviceCommands.REBOOT, this.state.rebootReason);\n\t\t}\n\n\t\tthis.toggleRebootDeviceModal();\n\t};\n\n\trequestAllowlist = async () => {\n\t\tconst deviceId = this.state.devices[0].solHelloDeviceId;\n\n\t\tif (deviceId) {\n\t\t\tconst response = await sendCommand(deviceId, DeviceCommands.REQUEST_ALLOWLIST_CHECK, this.state.allowListReason);\n\t\t\tif (!response.data.hasSucceeded) {\n\t\t\t\tthis.showErrorMessage('Something went wrong');\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tthis.showSuccessMessage('Your request for endpoint whitelisting is being processed. Please refresh the page to see the updated version.');\n\t\tthis.loadRoom();\n\t};\n\n\tforceUpdateDevice = async () => {\n\t\tconst {\n\t\t\tselectedDevice: { deviceId, appVersion },\n\t\t\tlatestAppRelease: { install_url: appInstallUrl, short_version: latestAppVersion },\n\t\t} = this.state;\n\n\t\tif (appVersion && latestAppVersion && appVersion !== latestAppVersion) {\n\t\t\tawait forceUpdateDevice({\n\t\t\t\tdeviceId,\n\t\t\t\tdynamicData: appInstallUrl,\n\t\t\t});\n\t\t}\n\n\t\tthis.toggleUpdateDeviceModal();\n\t};\n\n\tdeleteOrgUnitSubmit = async () => {\n\t\tawait deleteOrgUnit(this.state.selectedOrg.level, this.state.selectedOrg.id);\n\t\tthis.moveToParentSector(this.state.selectedOrg.id);\n\t\tthis.toggleDeleteOrgUnitModal();\n\t\tthis.props.getTreeData();\n\t};\n\n\tmoveToParentSector = currentSectorId => {\n\t\tconst selectedSector = findSectorById(this.props.treeData.tree, currentSectorId);\n\t\tconst parentSector = getParentSector(this.props.treeData.tree, selectedSector);\n\t\tparentSector.isSelected = true;\n\t\tthis.props.history.push(parentSector.link);\n\t\tthis.props.updateBreadcrumb(parentSector.breadcrumb);\n\t};\n\n\ttoggleDeleteDeviceModal = (selectedDevice = {}) => {\n\t\tthis.setState({\n\t\t\tselectedDevice,\n\t\t\tisDeleteDeviceModalOpen: !this.state.isDeleteDeviceModalOpen,\n\t\t});\n\t};\n\n\ttoggleRebootDeviceModal = (selectedDevice = {}) => {\n\t\tthis.setState({\n\t\t\tselectedDevice,\n\t\t\tisRebootDeviceModalOpen: !this.state.isRebootDeviceModalOpen,\n\t\t\trebootReason: '',\n\t\t});\n\t};\n\n\ttoggleVoiceCommandCallingModal = (selectedDevice = {}) => {\n\t\tthis.setState({\n\t\t\tselectedDevice,\n\t\t\tisVoiceCommandCallingOpen: !this.state.isVoiceCommandCallingOpen,\n\t\t});\n\t};\n\n\ttoggleUpdateDeviceModal = (selectedDevice = {}) => {\n\t\tthis.setState({\n\t\t\tselectedDevice,\n\t\t\tisUpdateDeviceModalOpen: !this.state.isUpdateDeviceModalOpen,\n\t\t});\n\t};\n\n\ttoggleDeleteOrgUnitModal = (selectedOrg = {}) => {\n\t\tthis.setState({\n\t\t\tselectedOrg,\n\t\t\tisDeleteOrgUnitModalOpen: !this.state.isDeleteOrgUnitModalOpen,\n\t\t});\n\t};\n\n\tfindSelectedDeviceById = (devices, id) => {\n\t\tlet device;\n\t\tdevices.forEach((item, index) => {\n\t\t\tif (item.value === id) {\n\t\t\t\tdevice = {\n\t\t\t\t\tid: item.id,\n\t\t\t\t\tvalue: item.value,\n\t\t\t\t\tindex: index,\n\t\t\t\t};\n\t\t\t}\n\t\t});\n\t\treturn device;\n\t};\n\n\tsetDeviceId = event => {\n\t\tconst device = this.findSelectedDeviceById(this.state.unassociatedDevicesToSelect, event.target.value);\n\t\tif (!device) {\n\t\t\tthis.setState({\n\t\t\t\thelloDeviceId: null,\n\t\t\t\tisAddDeviceModalSubmitDisabled: false,\n\t\t\t\tdeviceIdInput: event.target.value,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tthis.setState({\n\t\t\thelloDeviceId: device.id,\n\t\t\tisAddDeviceModalSubmitDisabled: false,\n\t\t\tdeviceIdInput: event.target.value,\n\t\t});\n\t};\n\n\tshowErrorMessage = (errorMessage = 'Device ID not found') => {\n\t\tthis.setState({\n\t\t\terror: errorMessage,\n\t\t});\n\n\t\tsetTimeout(() => {\n\t\t\tthis.setState({\n\t\t\t\terror: '',\n\t\t\t});\n\t\t}, 3000);\n\t};\n\n\tshowSuccessMessage = (message = 'Successful ') => {\n\t\tthis.setState({\n\t\t\tsuccess: message,\n\t\t});\n\n\t\tsetTimeout(() => {\n\t\t\tthis.setState({\n\t\t\t\tsuccess: '',\n\t\t\t});\n\t\t}, 6000);\n\t};\n\n\tassignDevice = async evt => {\n\t\tevt.preventDefault();\n\t\tif (!this.state.helloDeviceId) {\n\t\t\tthis.showErrorMessage();\n\t\t\treturn;\n\t\t}\n\n\t\tthis.setState({\n\t\t\tisAddDeviceModalLoading: true,\n\t\t});\n\t\tconst { hospitalId, departmentId, floorId, roomId } = this.props.match.params;\n\t\tconst url = `/v1/organizations/${APP_CONFIG.companyId}/hospitals/${hospitalId}/departments/${departmentId}/floors/${floorId}/rooms/${roomId}/devices`;\n\t\tawait gatewayApi.put(url, {\n\t\t\tdevices: [this.state.helloDeviceId],\n\t\t});\n\t\tthis.setState({\n\t\t\tisAddDeviceModalLoading: false,\n\t\t\tdeviceIdInput: '',\n\t\t});\n\t\tthis.toggleDevicesModal();\n\t\tthis.props.getTreeData();\n\t\tthis.loadRoom();\n\t};\n\n\tvoiceCommandCallingSubmit = async () => {\n\t\tthis.setState({\n\t\t\tisVoiceCommandCallingModalLoading: true,\n\t\t});\n\n\t\tconst { selectedDevice } = this.state;\n\n\t\tconst setting = { solHelloDeviceId: +selectedDevice.deviceId, settingValue: `${selectedDevice.voiceCommandCalling}` };\n\t\tawait addDeviceSettings([setting]);\n\t\tthis.loadRoom();\n\t\tthis.toggleVoiceCommandCallingModal();\n\t};\n\n\ttoggleRoomModal = () => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisRoomModalOpen: !this.state.isRoomModalOpen,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tif (this.state.isRoomModalOpen) {\n\t\t\t\t\tconst sector = findSectorById(this.props.treeData.tree, this.props.match.params.roomId);\n\t\t\t\t\tconst sectorParent = getParentSector(this.props.treeData.tree, sector);\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tparentSectorName: sectorParent.name,\n\t\t\t\t\t\tparentSectorType: sectorParent.type,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t};\n\n\ttoggleDevicesModal = () => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisDevicesModalOpen: !this.state.isDevicesModalOpen,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tif (this.state.isDevicesModalOpen) {\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tisAddDeviceModalSubmitDisabled: true,\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tdeviceIdInput: '',\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t};\n\n\tsetInputValues = event => {\n\t\tthis.setState({\n\t\t\t[event.target.name]: event.target.value,\n\t\t});\n\t};\n\n\tgetCurrentRoom() {\n\t\tconst hospitals = this.props.treeData.tree;\n\t\tconst room = findSectorById(hospitals, this.props.match.params.roomId);\n\t\treturn {\n\t\t\tsectorName: room ? room.name : '',\n\t\t\tsectorId: room ? room.roomId : '',\n\t\t\troomName: room ? room.name : '',\n\t\t\thospitalId: room ? room.hospitalId : '',\n\t\t\tdepartmentId: room ? room.departmentId : '',\n\t\t\tfloorId: room ? room.floorId : '',\n\t\t\troomId: room ? room.roomId : '',\n\t\t\tsectorType: room ? room.type : '',\n\t\t};\n\t}\n\n\ttoggleEditSectorModal = data => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisEditSectorModalOpen: !this.state.isEditSectorModalOpen,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tif (this.state.isEditSectorModalOpen) {\n\t\t\t\t\tif (!data) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tconst sector = findSectorById(this.props.treeData.tree, data[`${data.sectorType}Id`]);\n\t\t\t\t\tthis.props.setCurrentSectorLocation(sector.treeLocation);\n\t\t\t\t\tconst sectorParent = getParentSector(this.props.treeData.tree, sector);\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tsectorData: data,\n\t\t\t\t\t\tsectorLocation: sector.treeLocation,\n\t\t\t\t\t\tparentSectorName: sectorParent.name,\n\t\t\t\t\t\tparentSectorType: sectorParent.type,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t};\n\n\tupdateTree = () => {\n\t\tthis.props.getTreeData();\n\t\tthis.toggleEditSectorModal();\n\t};\n\n\ttoggleVoiceCommandCalling = () => {\n\t\tconst { selectedDevice } = this.state;\n\t\tselectedDevice.voiceCommandCalling = !selectedDevice.voiceCommandCalling;\n\t\tthis.setState({ selectedDevice });\n\t};\n\n\thandleCsvDropdownClick = item => {\n\t\tif (item.id === 'save_device_csv') {\n\t\t\tthis.exportDeviceDetailsRef.current.link.click();\n\t\t} else if (item.id === 'save_allowlist_csv') {\n\t\t\tthis.exportAllowlistRef.current.link.click();\n\t\t}\n\t};\n\n\trender() {\n\t\tconst room = this.getCurrentRoom();\n\t\tconst userRole = getUserRole();\n\t\treturn (\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t{room.roomName}\n\t\t\t\t\t\t\t{userRole === UserRoles.ADMIN && (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\n\t\t\t\t\t\t,\n\t\t\t\t\t\t\t\t,\n\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t/>\n\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t

    Assign Device

    \n\t\t\t\t\t\t\t

    Select a serial number to associate with this room.

    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{this.state.unassociatedDevicesToSelect.map(({ value, id }) => (\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t{this.state.preSelected && }\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    \n\t\t\t\t\t\t\tYou can use this option to activate voice command calling in different levels of a hospital. Through this option patient will be able to call\n\t\t\t\t\t\t\tnurses by saying "Call Nurse" or "Call the nurse".\n\t\t\t\t\t\t

    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t

    Are you sure you want to unassign device {this.state.selectedDevice.serialNumber}? Neither you or patient won't be able to make any calls.

    \n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t

    Why do you want to reboot device {this.state.selectedDevice.serialNumber}?

    \n\t\t\t\t\t\t this.setState({ rebootReason: e.target.value })}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t

    Are you sure you want to force update device {this.state.selectedDevice.serialNumber}?

    \n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t

    \n\t\t\t\t\t\t\tAre you sure you want to delete {this.state.selectedOrg.name}? Any devices related to it will be deleted and neither Virtual Care Providers or\n\t\t\t\t\t\t\tpatients won't be able to make any calls.\n\t\t\t\t\t\t

    \n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default connect(\n\tstate => state.organization,\n\tdispatch => bindActionCreators(actionCreators, dispatch)\n)(withRouter(Room));\n","import React from 'react';\nimport Grid from 'components/Grid';\n\nfunction signOut() {\n\twindow.location.href = '/logout';\n}\n\nconst UnassignedNurse = props => (\n\t\n\t\t
    \n\t\t\t

    You are currently not assigned to any health system.

    \n\t\t\tmember-error\n\t\t\t

    If you think there has been a mistake, please contact your administrator.

    \n\t\t\t\n\t\t\t\tClick here to login with another account.\n\t\t\t\n\t\t
    \n\t
    \n);\n\nexport default UnassignedNurse;\n","import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { actionCreators } from 'state/organization/actions';\nimport { withRouter, Route } from 'react-router-dom';\nimport { If, Then, Else } from 'react-if';\nimport { UserRoles } from 'constants/enums';\n\nimport Grid from 'components/Grid';\nimport Layout from 'components/Common/Layout';\nimport Header from 'components/Common/Header';\nimport SectorList from 'components/Common/SectorList';\n\nimport AssignDeviceModal from 'components/Common/AssignDeviceModal';\n\nimport CallPatient from 'views/Organization/Partials/CallPatient';\nimport Hospital from 'views/Organization/Partials/Hospital';\nimport Department from 'views/Organization/Partials/Department';\nimport Floor from 'views/Organization/Partials/Floor';\nimport Room from 'views/Organization/Partials/Room';\nimport UnassignedNurse from 'views/UnassignedNurse';\n\nimport { getUserRole } from 'infrastructure/auth';\n\nclass Organization extends Component {\n\thasHealthSystems = () => {\n\t\treturn this.props.allHealthSystems.length > 0;\n\t};\n\n\tisRoomURL = () => {\n\t\tlet pathName = window.location.pathname.split('/');\n\t\treturn pathName.some((path, index) => path.toLowerCase() === 'room' && pathName[index + 1]);\n\t};\n\n\trender() {\n\t\tif (!this.hasHealthSystems()) {\n\t\t\treturn ;\n\t\t}\n\n\t\tconst userRole = getUserRole();\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t{!this.isRoomURL() && (\n\t\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t\t\tIn order to communicate with a room,
    \n\t\t\t\t\t\t\t\t\t\t\tplease open a hospital, choose the department,
    \n\t\t\t\t\t\t\t\t\t\t\tclick on a floor, and select a room.\n\t\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t{this.props.treeData.tree.length > 0 && (\n\t\t\t\t\t\t\t\t\t\t } />\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default connect(\n\tstate => state.organization,\n\tdispatch => bindActionCreators(actionCreators, dispatch)\n)(withRouter(Organization));\n\nexport { Organization }; //Exported for Unit Tests only!\n","import _ from 'lodash';\n\nclass Emitter {\n\tconstructor() {\n\t\tthis.events = {};\n\t}\n\n\temit(event, ...args) {\n\t\tif (this.events[event]) {\n\t\t\tthis.events[event].forEach(fn => fn(...args));\n\t\t}\n\t\treturn this;\n\t}\n\n\ton(event, fn) {\n\t\tif (this.events[event]) this.events[event].push(fn);\n\t\telse this.events[event] = [fn];\n\t\treturn this;\n\t}\n\n\toff(event, fn) {\n\t\tif (event && _.isFunction(fn)) {\n\t\t\tconst listeners = this.events[event];\n\t\t\tconst index = listeners.findIndex(_fn => _fn === fn);\n\t\t\tlisteners.splice(index, 1);\n\t\t} else this.events[event] = [];\n\t\treturn this;\n\t}\n}\n\nexport default Emitter;\n","import SocketEvents from 'constants/socket-events';\n\n/**\n * @class SignalingChannel\n * @classDesc Signaling module for Open WebRTC Toolkit P2P chat\n */\nexport default function SignalingChannel(socket, logger) {\n\tthis.onMessage = null;\n\tconst wsServer = socket;\n\n\tconst bindOn = (event, callback) => {\n\t\twsServer.on(event, data => {\n\t\t\tlogger.debug(`WS:ON:${event}`, { socketId: wsServer?.id }, data);\n\t\t\tcallback(data);\n\t\t});\n\t};\n\n\tthis.send = function(event, message) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlogger.debug(`WS:EMIT:${event}`, { socketId: wsServer?.id }, message);\n\t\t\twsServer.emit(event, message, data => {\n\t\t\t\tif (data) {\n\t\t\t\t\tresolve(data);\n\t\t\t\t} else {\n\t\t\t\t\treject();\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t};\n\n\tbindOn(SocketEvents.Conference.ON_NEW_ICE_CANDIDATE, _data => {\n\t\tconst newData = {\n\t\t\tfrom: _data.participantId,\n\t\t\tdata: {\n\t\t\t\ttype: SocketEvents.Conference.SDP,\n\t\t\t\tdata: {\n\t\t\t\t\ttype: 'candidate',\n\t\t\t\t\tcandidate: _data.candidate.sdp,\n\t\t\t\t\tsdpMid: _data.candidate.sdpMid,\n\t\t\t\t\tsdpMLineIndex: _data.candidate.sdpMLineIndex,\n\t\t\t\t\tstreamInfo: null,\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\n\t\tif (this.onMessage) this.onMessage(newData.from, newData.data);\n\t});\n\n\tbindOn(SocketEvents.Conference.ON_NEW_ANSWER, _data => {\n\t\tconst newData = {\n\t\t\tfrom: _data.participantId,\n\t\t\tdata: {\n\t\t\t\ttype: SocketEvents.Conference.SDP,\n\t\t\t\tdata: _data.sdp,\n\t\t\t\tstreamInfo: _data.streamInfo,\n\t\t\t},\n\t\t};\n\n\t\tif (this.onMessage) {\n\t\t\tthis.onMessage(newData.from, newData.data);\n\t\t}\n\t});\n\n\tbindOn(SocketEvents.Conference.ON_NEW_OFFER, _data => {\n\t\tconst newData = {\n\t\t\tfrom: _data.participantId,\n\t\t\tdata: {\n\t\t\t\ttype: SocketEvents.Conference.SDP,\n\t\t\t\tdata: _data.sdp,\n\t\t\t\tstreamInfo: _data.streamInfo,\n\t\t\t},\n\t\t};\n\n\t\tif (this.onMessage) {\n\t\t\tthis.onMessage(newData.from, newData.data);\n\t\t}\n\t});\n}\n","// MIT License\n//\n// Copyright (c) 2012 Universidad Politécnica de Madrid\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\n\n// Copyright (C) <2018> Intel Corporation\n//\n// SPDX-License-Identifier: Apache-2.0\n\n// This file is borrowed from lynckia/licode with some modifications.\n\n/**\n * @class EventDispatcher\n * @classDesc A shim for EventTarget. Might be changed to EventTarget later.\n * @memberof Owt.Base\n * @hideconstructor\n */\nexport const EventDispatcher = function() {\n\t// Private vars\n\tconst spec = {};\n\tspec.dispatcher = {};\n\tspec.dispatcher.eventListeners = {};\n\n\t/**\n\t * @function addEventListener\n\t * @desc This function registers a callback function as a handler for the corresponding event. It's shortened form is on(eventType, listener). See the event description in the following table.\n\t * @instance\n\t * @memberof Owt.Base.EventDispatcher\n\t * @param {string} eventType Event string.\n\t * @param {function} listener Callback function.\n\t */\n\tthis.addEventListener = function(eventType, listener) {\n\t\tif (spec.dispatcher.eventListeners[eventType] === undefined) {\n\t\t\tspec.dispatcher.eventListeners[eventType] = [];\n\t\t}\n\t\tspec.dispatcher.eventListeners[eventType].push(listener);\n\t};\n\n\t/**\n\t * @function removeEventListener\n\t * @desc This function removes a registered event listener.\n\t * @instance\n\t * @memberof Owt.Base.EventDispatcher\n\t * @param {string} eventType Event string.\n\t * @param {function} listener Callback function.\n\t */\n\tthis.removeEventListener = function(eventType, listener) {\n\t\tif (!spec.dispatcher.eventListeners[eventType]) {\n\t\t\treturn;\n\t\t}\n\t\tconst index = spec.dispatcher.eventListeners[eventType].indexOf(listener);\n\t\tif (index !== -1) {\n\t\t\tspec.dispatcher.eventListeners[eventType].splice(index, 1);\n\t\t}\n\t};\n\n\t/**\n\t * @function clearEventListener\n\t * @desc This function removes all event listeners for one type.\n\t * @instance\n\t * @memberof Owt.Base.EventDispatcher\n\t * @param {string} eventType Event string.\n\t */\n\tthis.clearEventListener = function(eventType) {\n\t\tspec.dispatcher.eventListeners[eventType] = [];\n\t};\n\n\t// It dispatch a new event to the event listeners, based on the type\n\t// of event. All events are intended to be LicodeEvents.\n\tthis.dispatchEvent = function(event) {\n\t\tif (!spec.dispatcher.eventListeners[event.type]) {\n\t\t\treturn;\n\t\t}\n\t\tspec.dispatcher.eventListeners[event.type].map(function(listener) {\n\t\t\tlistener(event);\n\t\t});\n\t};\n};\n\n/**\n * @class OwtEvent\n * @classDesc Class OwtEvent represents a generic Event in the library.\n * @memberof Owt.Base\n * @hideconstructor\n */\nexport class OwtEvent {\n\t// eslint-disable-next-line require-jsdoc\n\tconstructor(type) {\n\t\tthis.type = type;\n\t}\n}\n\n/**\n * @class MessageEvent\n * @classDesc Class MessageEvent represents a message Event in the library.\n * @memberof Owt.Base\n * @hideconstructor\n */\nexport class MessageEvent extends OwtEvent {\n\t// eslint-disable-next-line require-jsdoc\n\tconstructor(type, init) {\n\t\tsuper(type);\n\t\t/**\n\t\t * @member {string} origin\n\t\t * @instance\n\t\t * @memberof Owt.Base.MessageEvent\n\t\t * @desc ID of the remote endpoint who published this stream.\n\t\t */\n\t\tthis.origin = init.origin;\n\t\t/**\n\t\t * @member {string} message\n\t\t * @instance\n\t\t * @memberof Owt.Base.MessageEvent\n\t\t */\n\t\tthis.message = init.message;\n\t\t/**\n\t\t * @member {string} to\n\t\t * @instance\n\t\t * @memberof Owt.Base.MessageEvent\n\t\t * @desc Values could be \"all\", \"me\" in conference mode, or undefined in P2P mode..\n\t\t */\n\t\tthis.to = init.to;\n\t}\n}\n\n/**\n * @class ErrorEvent\n * @classDesc Class ErrorEvent represents an error Event in the library.\n * @memberof Owt.Base\n * @hideconstructor\n */\nexport class ErrorEvent extends OwtEvent {\n\t// eslint-disable-next-line require-jsdoc\n\tconstructor(type, init) {\n\t\tsuper(type);\n\t\t/**\n\t\t * @member {Error} error\n\t\t * @instance\n\t\t * @memberof Owt.Base.ErrorEvent\n\t\t */\n\t\tthis.error = init.error;\n\t}\n}\n\n/**\n * @class MuteEvent\n * @classDesc Class MuteEvent represents a mute or unmute event.\n * @memberof Owt.Base\n * @hideconstructor\n */\nexport class MuteEvent extends OwtEvent {\n\t// eslint-disable-next-line require-jsdoc\n\tconstructor(type, init) {\n\t\tsuper(type);\n\t\t/**\n\t\t * @member {Owt.Base.TrackKind} kind\n\t\t * @instance\n\t\t * @memberof Owt.Base.MuteEvent\n\t\t */\n\t\tthis.kind = init.kind;\n\t}\n}\n","// Copyright (C) <2018> Intel Corporation\n//\n// SPDX-License-Identifier: Apache-2.0\nexport const errors = {\n\t// 2100-2999 for P2P errors\n\t// 2100-2199 for connection errors\n\t// 2100-2109 for server errors\n\tP2P_CONN_SERVER_UNKNOWN: {\n\t\tcode: 2100,\n\t\tmessage: 'Server unknown error.',\n\t},\n\tP2P_CONN_SERVER_UNAVAILABLE: {\n\t\tcode: 2101,\n\t\tmessage: 'Server is unavaliable.',\n\t},\n\tP2P_CONN_SERVER_BUSY: {\n\t\tcode: 2102,\n\t\tmessage: 'Server is too busy.',\n\t},\n\tP2P_CONN_SERVER_NOT_SUPPORTED: {\n\t\tcode: 2103,\n\t\tmessage: 'Method has not been supported by server.',\n\t},\n\t// 2110-2119 for client errors\n\tP2P_CONN_CLIENT_UNKNOWN: {\n\t\tcode: 2110,\n\t\tmessage: 'Client unknown error.',\n\t},\n\tP2P_CONN_CLIENT_NOT_INITIALIZED: {\n\t\tcode: 2111,\n\t\tmessage: 'Connection is not initialized.',\n\t},\n\t// 2120-2129 for authentication errors\n\tP2P_CONN_AUTH_UNKNOWN: {\n\t\tcode: 2120,\n\t\tmessage: 'Authentication unknown error.',\n\t},\n\tP2P_CONN_AUTH_FAILED: {\n\t\tcode: 2121,\n\t\tmessage: 'Wrong username or token.',\n\t},\n\t// 2200-2299 for message transport errors\n\tP2P_MESSAGING_TARGET_UNREACHABLE: {\n\t\tcode: 2201,\n\t\tmessage: 'Remote user cannot be reached.',\n\t},\n\tP2P_CLIENT_DENIED: {\n\t\tcode: 2202,\n\t\tmessage: 'User is denied.',\n\t},\n\t// 2301-2399 for chat room errors\n\t// 2401-2499 for client errors\n\tP2P_CLIENT_UNKNOWN: {\n\t\tcode: 2400,\n\t\tmessage: 'Unknown errors.',\n\t},\n\tP2P_CLIENT_UNSUPPORTED_METHOD: {\n\t\tcode: 2401,\n\t\tmessage: 'This method is unsupported in current browser.',\n\t},\n\tP2P_CLIENT_ILLEGAL_ARGUMENT: {\n\t\tcode: 2402,\n\t\tmessage: 'Illegal argument.',\n\t},\n\tP2P_CLIENT_INVALID_STATE: {\n\t\tcode: 2403,\n\t\tmessage: 'Invalid peer state.',\n\t},\n\tP2P_CLIENT_NOT_ALLOWED: {\n\t\tcode: 2404,\n\t\tmessage: 'Remote user is not allowed.',\n\t},\n\t// 2501-2599 for WebRTC erros.\n\tP2P_WEBRTC_UNKNOWN: {\n\t\tcode: 2500,\n\t\tmessage: 'WebRTC error.',\n\t},\n\tP2P_WEBRTC_SDP: {\n\t\tcode: 2502,\n\t\tmessage: 'SDP error.',\n\t},\n};\n\n/**\n * @function getErrorByCode\n * @desc Get error object by error code.\n * @param {string} errorCode Error code.\n * @return {Owt.P2P.Error} Error object\n * @private\n */\nexport function getErrorByCode(errorCode) {\n\tconst codeErrorMap = {\n\t\t2100: errors.P2P_CONN_SERVER_UNKNOWN,\n\t\t2101: errors.P2P_CONN_SERVER_UNAVAILABLE,\n\t\t2102: errors.P2P_CONN_SERVER_BUSY,\n\t\t2103: errors.P2P_CONN_SERVER_NOT_SUPPORTED,\n\t\t2110: errors.P2P_CONN_CLIENT_UNKNOWN,\n\t\t2111: errors.P2P_CONN_CLIENT_NOT_INITIALIZED,\n\t\t2120: errors.P2P_CONN_AUTH_UNKNOWN,\n\t\t2121: errors.P2P_CONN_AUTH_FAILED,\n\t\t2201: errors.P2P_MESSAGING_TARGET_UNREACHABLE,\n\t\t2400: errors.P2P_CLIENT_UNKNOWN,\n\t\t2401: errors.P2P_CLIENT_UNSUPPORTED_METHOD,\n\t\t2402: errors.P2P_CLIENT_ILLEGAL_ARGUMENT,\n\t\t2403: errors.P2P_CLIENT_INVALID_STATE,\n\t\t2404: errors.P2P_CLIENT_NOT_ALLOWED,\n\t\t2500: errors.P2P_WEBRTC_UNKNOWN,\n\t\t2501: errors.P2P_WEBRTC_SDP,\n\t};\n\treturn codeErrorMap[errorCode];\n}\n\n/**\n * @class P2PError\n * @classDesc The P2PError object represents an error in P2P mode.\n * @memberOf Owt.P2P\n * @hideconstructor\n */\nexport class P2PError extends Error {\n\t// eslint-disable-next-line require-jsdoc\n\tconstructor(error, message) {\n\t\tsuper(message);\n\t\tif (typeof error === 'number') {\n\t\t\tthis.code = error;\n\t\t} else {\n\t\t\tthis.code = error.code;\n\t\t}\n\t}\n}\n","// Copyright (C) <2018> Intel Corporation\n//\n// SPDX-License-Identifier: Apache-2.0\n\n/* global navigator, window */\nconst sdkVersion = '4.2.1';\n\n// eslint-disable-next-line require-jsdoc\nexport function isFirefox() {\n\treturn window.navigator.userAgent.match('Firefox') !== null;\n}\n// eslint-disable-next-line require-jsdoc\nexport function isChrome() {\n\treturn window.navigator.userAgent.match('Chrome') !== null;\n}\n// eslint-disable-next-line require-jsdoc\nexport function isSafari() {\n\treturn /^((?!chrome|android).)*safari/i.test(window.navigator.userAgent);\n}\n// eslint-disable-next-line require-jsdoc\nexport function isEdge() {\n\treturn window.navigator.userAgent.match(/Edge\\/(\\d+).(\\d+)$/) !== null;\n}\n// eslint-disable-next-line require-jsdoc\nexport function createUuid() {\n\treturn 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n\t\tconst r = (Math.random() * 16) | 0;\n\t\tconst v = c === 'x' ? r : (r & 0x3) | 0x8;\n\t\treturn v.toString(16);\n\t});\n}\n\n// Returns system information.\n// Format: {sdk:{version:**, type:**}, runtime:{version:**, name:**}, os:{version:**, name:**}};\n// eslint-disable-next-line require-jsdoc\nexport function sysInfo() {\n\tconst info = Object.create({});\n\tinfo.sdk = {\n\t\tversion: sdkVersion,\n\t\ttype: 'JavaScript',\n\t};\n\t// Runtime info.\n\tconst userAgent = navigator.userAgent;\n\tconst firefoxRegex = /Firefox\\/([0-9\\.]+)/;\n\tconst chromeRegex = /Chrome\\/([0-9\\.]+)/;\n\tconst edgeRegex = /Edge\\/([0-9\\.]+)/;\n\tconst safariVersionRegex = /Version\\/([0-9\\.]+) Safari/;\n\tlet result = chromeRegex.exec(userAgent);\n\tif (result) {\n\t\tinfo.runtime = {\n\t\t\tname: 'Chrome',\n\t\t\tversion: result[1],\n\t\t};\n\t} else if ((result = firefoxRegex.exec(userAgent))) {\n\t\tinfo.runtime = {\n\t\t\tname: 'Firefox',\n\t\t\tversion: result[1],\n\t\t};\n\t} else if ((result = edgeRegex.exec(userAgent))) {\n\t\tinfo.runtime = {\n\t\t\tname: 'Edge',\n\t\t\tversion: result[1],\n\t\t};\n\t} else if (isSafari()) {\n\t\tresult = safariVersionRegex.exec(userAgent);\n\t\tinfo.runtime = {\n\t\t\tname: 'Safari',\n\t\t};\n\t\tinfo.runtime.version = result ? result[1] : 'Unknown';\n\t} else {\n\t\tinfo.runtime = {\n\t\t\tname: 'Unknown',\n\t\t\tversion: 'Unknown',\n\t\t};\n\t}\n\t// OS info.\n\tconst windowsRegex = /Windows NT ([0-9\\.]+)/;\n\tconst macRegex = /Intel Mac OS X ([0-9_\\.]+)/;\n\tconst iPhoneRegex = /iPhone OS ([0-9_\\.]+)/;\n\tconst linuxRegex = /X11; Linux/;\n\tconst androidRegex = /Android( ([0-9\\.]+))?/;\n\tconst chromiumOsRegex = /CrOS/;\n\tif ((result = windowsRegex.exec(userAgent))) {\n\t\tinfo.os = {\n\t\t\tname: 'Windows NT',\n\t\t\tversion: result[1],\n\t\t};\n\t} else if ((result = macRegex.exec(userAgent))) {\n\t\tinfo.os = {\n\t\t\tname: 'Mac OS X',\n\t\t\tversion: result[1].replace(/_/g, '.'),\n\t\t};\n\t} else if ((result = iPhoneRegex.exec(userAgent))) {\n\t\tinfo.os = {\n\t\t\tname: 'iPhone OS',\n\t\t\tversion: result[1].replace(/_/g, '.'),\n\t\t};\n\t} else if ((result = linuxRegex.exec(userAgent))) {\n\t\tinfo.os = {\n\t\t\tname: 'Linux',\n\t\t\tversion: 'Unknown',\n\t\t};\n\t} else if ((result = androidRegex.exec(userAgent))) {\n\t\tinfo.os = {\n\t\t\tname: 'Android',\n\t\t\tversion: result[1] || 'Unknown',\n\t\t};\n\t} else if ((result = chromiumOsRegex.exec(userAgent))) {\n\t\tinfo.os = {\n\t\t\tname: 'Chrome OS',\n\t\t\tversion: 'Unknown',\n\t\t};\n\t} else {\n\t\tinfo.os = {\n\t\t\tname: 'Unknown',\n\t\t\tversion: 'Unknown',\n\t\t};\n\t}\n\tinfo.capabilities = {\n\t\tcontinualIceGathering: false,\n\t\tunifiedPlan: true,\n\t\tstreamRemovable: info.runtime.name !== 'Firefox',\n\t};\n\treturn info;\n}\n","// @ts-nocheck\n// Copyright (C) <2018> Intel Corporation\n//\n// SPDX-License-Identifier: Apache-2.0\n/* eslint-disable max-classes-per-file */\nimport * as Utils from './utils';\nimport { EventDispatcher } from '../base/event';\n\n/**\n * @class AudioPublicationSettings\n * @memberOf Owt.Base\n * @classDesc The audio settings of a publication.\n * @hideconstructor\n */\nexport class AudioPublicationSettings {\n\t// eslint-disable-next-line require-jsdoc\n\tconstructor(codec) {\n\t\t/**\n\t\t * @member {?Owt.Base.AudioCodecParameters} codec\n\t\t * @instance\n\t\t * @memberof Owt.Base.AudioPublicationSettings\n\t\t */\n\t\tthis.codec = codec;\n\t}\n}\n\n/**\n * @class VideoPublicationSettings\n * @memberOf Owt.Base\n * @classDesc The video settings of a publication.\n * @hideconstructor\n */\nexport class VideoPublicationSettings {\n\t// eslint-disable-next-line require-jsdoc\n\tconstructor(codec, resolution, frameRate, bitrate, keyFrameInterval) {\n\t\t/**\n\t\t * @member {?Owt.Base.VideoCodecParameters} codec\n\t\t * @instance\n\t\t * @memberof Owt.Base.VideoPublicationSettings\n\t\t */\n\t\tthis.codec = codec;\n\t\t/**\n\t\t * @member {?Owt.Base.Resolution} resolution\n\t\t * @instance\n\t\t * @memberof Owt.Base.VideoPublicationSettings\n\t\t */\n\t\tthis.resolution = resolution;\n\t\t/**\n\t\t * @member {?number} frameRates\n\t\t * @instance\n\t\t * @classDesc Frames per second.\n\t\t * @memberof Owt.Base.VideoPublicationSettings\n\t\t */\n\t\tthis.frameRate = frameRate;\n\t\t/**\n\t\t * @member {?number} bitrate\n\t\t * @instance\n\t\t * @memberof Owt.Base.VideoPublicationSettings\n\t\t */\n\t\tthis.bitrate = bitrate;\n\t\t/**\n\t\t * @member {?number} keyFrameIntervals\n\t\t * @instance\n\t\t * @classDesc The time interval between key frames. Unit: second.\n\t\t * @memberof Owt.Base.VideoPublicationSettings\n\t\t */\n\t\tthis.keyFrameInterval = keyFrameInterval;\n\t}\n}\n\n/**\n * @class PublicationSettings\n * @memberOf Owt.Base\n * @classDesc The settings of a publication.\n * @hideconstructor\n */\nexport class PublicationSettings {\n\t// eslint-disable-next-line require-jsdoc\n\tconstructor(audio, video) {\n\t\t/**\n\t\t * @member {Owt.Base.AudioPublicationSettings} audio\n\t\t * @instance\n\t\t * @memberof Owt.Base.PublicationSettings\n\t\t */\n\t\tthis.audio = audio;\n\t\t/**\n\t\t * @member {Owt.Base.VideoPublicationSettings} video\n\t\t * @instance\n\t\t * @memberof Owt.Base.PublicationSettings\n\t\t */\n\t\tthis.video = video;\n\t}\n}\n\n/**\n * @class Publication\n * @extends Owt.Base.EventDispatcher\n * @memberOf Owt.Base\n * @classDesc Publication represents a sender for publishing a stream. It\n * handles the actions on a LocalStream published to a conference.\n * Events:\n *\n * | Event Name | Argument Type | Fired when |\n * | ----------------| ---------------- | ---------------- |\n * | ended | Event | Publication is ended. |\n * | error | ErrorEvent | An error occurred on the publication. |\n * | mute | MuteEvent | Publication is muted. Client stopped sending audio and/or video data to remote endpoint. |\n * | unmute | MuteEvent | Publication is unmuted. Client continued sending audio and/or video data to remote endpoint. |\n *\n * @hideconstructor\n */\nexport class Publication extends EventDispatcher {\n\t// eslint-disable-next-line require-jsdoc\n\tconstructor(id, stop, getStats, mute, unmute) {\n\t\tsuper();\n\t\t/**\n\t\t * @member {string} id\n\t\t * @instance\n\t\t * @memberof Owt.Base.Publication\n\t\t */\n\t\tObject.defineProperty(this, 'id', {\n\t\t\tconfigurable: false,\n\t\t\twritable: false,\n\t\t\tvalue: id ? id : Utils.createUuid(),\n\t\t});\n\t\t/**\n\t\t * @function stop\n\t\t * @instance\n\t\t * @desc Stop certain publication. Once a subscription is stopped, it cannot be recovered.\n\t\t * @memberof Owt.Base.Publication\n\t\t * @returns {undefined}\n\t\t */\n\t\tthis.stop = stop;\n\t\t/**\n\t\t * @function getStats\n\t\t * @instance\n\t\t * @desc Get stats of underlying PeerConnection.\n\t\t * @memberof Owt.Base.Publication\n\t\t * @returns {Promise}\n\t\t */\n\t\tthis.getStats = getStats;\n\t\t/**\n\t\t * @function mute\n\t\t * @instance\n\t\t * @desc Stop sending data to remote endpoint.\n\t\t * @memberof Owt.Base.Publication\n\t\t * @param {Owt.Base.TrackKind } kind Kind of tracks to be muted.\n\t\t * @returns {Promise}\n\t\t */\n\t\tthis.mute = mute;\n\t\t/**\n\t\t * @function unmute\n\t\t * @instance\n\t\t * @desc Continue sending data to remote endpoint.\n\t\t * @memberof Owt.Base.Publication\n\t\t * @param {Owt.Base.TrackKind } kind Kind of tracks to be unmuted.\n\t\t * @returns {Promise}\n\t\t */\n\t\tthis.unmute = unmute;\n\t}\n}\n\n/**\n * @class PublishOptions\n * @memberOf Owt.Base\n * @classDesc PublishOptions defines options for publishing a Owt.Base.LocalStream.\n */\nexport class PublishOptions {\n\t// eslint-disable-next-line require-jsdoc\n\tconstructor(audio, video) {\n\t\t/**\n\t\t * @member {?Array} audio\n\t\t * @instance\n\t\t * @memberof Owt.Base.PublishOptions\n\t\t */\n\t\tthis.audio = audio;\n\t\t/**\n\t\t * @member {?Array} video\n\t\t * @instance\n\t\t * @memberof Owt.Base.PublishOptions\n\t\t */\n\t\tthis.video = video;\n\t}\n}\n","// Copyright (C) <2018> Intel Corporation\n//\n// SPDX-License-Identifier: Apache-2.0\nimport { OwtEvent } from './event.js';\nimport * as Utils from './utils.js';\nimport { EventDispatcher } from './event.js';\n\n// eslint-disable-next-line require-jsdoc\nfunction isAllowedValue(obj, allowedValues) {\n\treturn allowedValues.some(ele => {\n\t\treturn ele === obj;\n\t});\n}\n/**\n * @class StreamSourceInfo\n * @memberOf Owt.Base\n * @classDesc Information of a stream's source.\n * @constructor\n * @description Audio source info or video source info could be undefined if a stream does not have audio/video track.\n * @param {?string} audioSourceInfo Audio source info. Accepted values are: \"mic\", \"screen-cast\", \"file\", \"mixed\" or undefined.\n * @param {?string} videoSourceInfo Video source info. Accepted values are: \"camera\", \"screen-cast\", \"file\", \"mixed\" or undefined.\n */\nexport class StreamSourceInfo {\n\t// eslint-disable-next-line require-jsdoc\n\tconstructor(audioSourceInfo, videoSourceInfo) {\n\t\tif (!isAllowedValue(audioSourceInfo, [undefined, 'mic', 'screen-cast', 'file', 'mixed'])) {\n\t\t\tthrow new TypeError('Incorrect value for audioSourceInfo');\n\t\t}\n\t\tif (!isAllowedValue(videoSourceInfo, [undefined, 'camera', 'screen-cast', 'file', 'encoded-file', 'raw-file', 'mixed'])) {\n\t\t\tthrow new TypeError('Incorrect value for videoSourceInfo');\n\t\t}\n\t\tthis.audio = audioSourceInfo;\n\t\tthis.video = videoSourceInfo;\n\t}\n}\n/**\n * @class Stream\n * @memberOf Owt.Base\n * @classDesc Base class of streams.\n * @extends Owt.Base.EventDispatcher\n * @hideconstructor\n */\nexport class Stream extends EventDispatcher {\n\t// eslint-disable-next-line require-jsdoc\n\tconstructor(stream, sourceInfo, attributes) {\n\t\tsuper();\n\t\tif ((stream && !(stream instanceof MediaStream)) || typeof sourceInfo !== 'object') {\n\t\t\tthrow new TypeError('Invalid stream or sourceInfo.');\n\t\t}\n\t\tif (stream && ((stream.getAudioTracks().length > 0 && !sourceInfo.audio) || (stream.getVideoTracks().length > 0 && !sourceInfo.video))) {\n\t\t\tthrow new TypeError('Missing audio source info or video source info.');\n\t\t}\n\t\t/**\n\t\t * @member {?MediaStream} mediaStream\n\t\t * @instance\n\t\t * @memberof Owt.Base.Stream\n\t\t * @see {@link https://www.w3.org/TR/mediacapture-streams/#mediastream|MediaStream API of Media Capture and Streams}.\n\t\t */\n\t\tObject.defineProperty(this, 'mediaStream', {\n\t\t\tconfigurable: false,\n\t\t\twritable: true,\n\t\t\tvalue: stream,\n\t\t});\n\t\t/**\n\t\t * @member {Owt.Base.StreamSourceInfo} source\n\t\t * @instance\n\t\t * @memberof Owt.Base.Stream\n\t\t * @desc Source info of a stream.\n\t\t */\n\t\tObject.defineProperty(this, 'source', {\n\t\t\tconfigurable: false,\n\t\t\twritable: false,\n\t\t\tvalue: sourceInfo,\n\t\t});\n\t\t/**\n\t\t * @member {object} attributes\n\t\t * @instance\n\t\t * @memberof Owt.Base.Stream\n\t\t * @desc Custom attributes of a stream.\n\t\t */\n\t\tObject.defineProperty(this, 'attributes', {\n\t\t\tconfigurable: true,\n\t\t\twritable: false,\n\t\t\tvalue: attributes,\n\t\t});\n\t}\n}\n/**\n * @class LocalStream\n * @classDesc Stream captured from current endpoint.\n * @memberOf Owt.Base\n * @extends Owt.Base.Stream\n * @constructor\n * @param {MediaStream} stream Underlying MediaStream.\n * @param {Owt.Base.StreamSourceInfo} sourceInfo Information about stream's source.\n * @param {object} attributes Custom attributes of the stream.\n */\nexport class LocalStream extends Stream {\n\t// eslint-disable-next-line require-jsdoc\n\tconstructor(stream, sourceInfo, attributes) {\n\t\tif (!(stream instanceof MediaStream)) {\n\t\t\tthrow new TypeError('Invalid stream.');\n\t\t}\n\t\tsuper(stream, sourceInfo, attributes);\n\t\t/**\n\t\t * @member {string} id\n\t\t * @instance\n\t\t * @memberof Owt.Base.LocalStream\n\t\t */\n\t\tObject.defineProperty(this, 'id', {\n\t\t\tconfigurable: false,\n\t\t\twritable: false,\n\t\t\tvalue: Utils.createUuid(),\n\t\t});\n\t}\n}\n/**\n * @class RemoteStream\n * @classDesc Stream sent from a remote endpoint.\n * Events:\n *\n * | Event Name | Argument Type | Fired when |\n * | ----------------| ---------------- | ------------------ |\n * | ended | Event | Stream is ended. |\n * | updated | Event | Stream is updated. |\n *\n * @memberOf Owt.Base\n * @extends Owt.Base.Stream\n * @hideconstructor\n */\nexport class RemoteStream extends Stream {\n\t// eslint-disable-next-line require-jsdoc\n\tconstructor(id, origin, stream, sourceInfo, attributes) {\n\t\tsuper(stream, sourceInfo, attributes);\n\t\t/**\n\t\t * @member {string} id\n\t\t * @instance\n\t\t * @memberof Owt.Base.RemoteStream\n\t\t */\n\t\tObject.defineProperty(this, 'id', {\n\t\t\tconfigurable: false,\n\t\t\twritable: false,\n\t\t\tvalue: id ? id : Utils.createUuid(),\n\t\t});\n\t\t/**\n\t\t * @member {string} origin\n\t\t * @instance\n\t\t * @memberof Owt.Base.RemoteStream\n\t\t * @desc ID of the remote endpoint who published this stream.\n\t\t */\n\t\tObject.defineProperty(this, 'origin', {\n\t\t\tconfigurable: false,\n\t\t\twritable: false,\n\t\t\tvalue: origin,\n\t\t});\n\t\t/**\n\t\t * @member {Owt.Base.PublicationSettings} settings\n\t\t * @instance\n\t\t * @memberof Owt.Base.RemoteStream\n\t\t * @desc Original settings for publishing this stream. This property is only valid in conference mode.\n\t\t */\n\t\tthis.settings = undefined;\n\t\t/**\n\t\t * @member {Owt.Conference.SubscriptionCapabilities} capabilities\n\t\t * @instance\n\t\t * @memberof Owt.Base.RemoteStream\n\t\t * @desc Capabilities remote endpoint provides for subscription. This property is only valid in conference mode.\n\t\t */\n\t\tthis.capabilities = undefined;\n\t}\n}\n\n/**\n * @class StreamEvent\n * @classDesc Event for Stream.\n * @extends Owt.Base.OwtEvent\n * @memberof Owt.Base\n * @hideconstructor\n */\nexport class StreamEvent extends OwtEvent {\n\t// eslint-disable-next-line require-jsdoc\n\tconstructor(type, init) {\n\t\tsuper(type);\n\t\t/**\n\t\t * @member {Owt.Base.Stream} stream\n\t\t * @instance\n\t\t * @memberof Owt.Base.StreamEvent\n\t\t */\n\t\tthis.stream = init.stream;\n\t}\n}\n","// MIT License\n//\n// Copyright (c) 2012 Universidad Politécnica de Madrid\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\n\n// Copyright (C) <2018> Intel Corporation\n//\n// SPDX-License-Identifier: Apache-2.0\n\n// This file is borrowed from lynckia/licode with some modifications.\n\n/* global window */\n\n/*\n * API to write logs based on traditional logging mechanisms: debug, trace,\n * info, warning, error\n */\nconst Logger = (function() {\n\tconst DEBUG = 0;\n\tconst TRACE = 1;\n\tconst INFO = 2;\n\tconst WARNING = 3;\n\tconst ERROR = 4;\n\tconst NONE = 5;\n\n\tconst noOp = function() {};\n\n\t// |that| is the object to be returned.\n\tconst that = {\n\t\tDEBUG: DEBUG,\n\t\tTRACE: TRACE,\n\t\tINFO: INFO,\n\t\tWARNING: WARNING,\n\t\tERROR: ERROR,\n\t\tNONE: NONE,\n\t};\n\n\tthat.log = window.console.log.bind(window.console);\n\n\tconst bindType = function(type) {\n\t\tif (typeof window.console[type] === 'function') {\n\t\t\treturn window.console[type].bind(window.console);\n\t\t} else {\n\t\t\treturn window.console.log.bind(window.console);\n\t\t}\n\t};\n\n\tconst setLogLevel = function(level) {\n\t\tif (level <= DEBUG) {\n\t\t\tthat.debug = bindType('log');\n\t\t} else {\n\t\t\tthat.debug = noOp;\n\t\t}\n\t\tif (level <= TRACE) {\n\t\t\tthat.trace = bindType('trace');\n\t\t} else {\n\t\t\tthat.trace = noOp;\n\t\t}\n\t\tif (level <= INFO) {\n\t\t\tthat.info = bindType('info');\n\t\t} else {\n\t\t\tthat.info = noOp;\n\t\t}\n\t\tif (level <= WARNING) {\n\t\t\tthat.warning = bindType('warn');\n\t\t} else {\n\t\t\tthat.warning = noOp;\n\t\t}\n\t\tif (level <= ERROR) {\n\t\t\tthat.error = bindType('error');\n\t\t} else {\n\t\t\tthat.error = noOp;\n\t\t}\n\t};\n\n\tsetLogLevel(DEBUG); // Default level is debug.\n\n\tthat.setLogLevel = setLogLevel;\n\n\treturn that;\n})();\n\nexport default Logger;\n","/*\n * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.\n *\n * Use of this source code is governed by a BSD-style license\n * that can be found in the LICENSE file in the root of the source\n * tree.\n */\n\n/* More information about these options at jshint.com/docs/options */\n\n/* eslint-disable */\n\n/* globals adapter, trace */\n/* exported setCodecParam, iceCandidateType, formatTypePreference,\n maybeSetOpusOptions, maybePreferAudioReceiveCodec,\n maybePreferAudioSendCodec, maybeSetAudioReceiveBitRate,\n maybeSetAudioSendBitRate, maybePreferVideoReceiveCodec,\n maybePreferVideoSendCodec, maybeSetVideoReceiveBitRate,\n maybeSetVideoSendBitRate, maybeSetVideoSendInitialBitRate,\n maybeRemoveVideoFec, mergeConstraints, removeCodecParam*/\n\n/* This file is borrowed from apprtc with some modifications. */\n/* Commit hash: c6af0c25e9af527f71b3acdd6bfa1389d778f7bd + PR 530 */\n\nimport Logger from './logger.js';\n\nfunction mergeConstraints(cons1, cons2) {\n\tif (!cons1 || !cons2) {\n\t\treturn cons1 || cons2;\n\t}\n\tconst merged = cons1;\n\tfor (const key in cons2) {\n\t\tmerged[key] = cons2[key];\n\t}\n\treturn merged;\n}\n\nfunction iceCandidateType(candidateStr) {\n\treturn candidateStr.split(' ')[7];\n}\n\n// Turns the local type preference into a human-readable string.\n// Note that this mapping is browser-specific.\nfunction formatTypePreference(pref) {\n\tif (adapter.browserDetails.browser === 'chrome') {\n\t\tswitch (pref) {\n\t\t\tcase 0:\n\t\t\t\treturn 'TURN/TLS';\n\t\t\tcase 1:\n\t\t\t\treturn 'TURN/TCP';\n\t\t\tcase 2:\n\t\t\t\treturn 'TURN/UDP';\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t} else if (adapter.browserDetails.browser === 'firefox') {\n\t\tswitch (pref) {\n\t\t\tcase 0:\n\t\t\t\treturn 'TURN/TCP';\n\t\t\tcase 5:\n\t\t\t\treturn 'TURN/UDP';\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t}\n\treturn '';\n}\n\nfunction maybeSetOpusOptions(sdp, params) {\n\t// Set Opus in Stereo, if stereo is true, unset it, if stereo is false, and\n\t// do nothing if otherwise.\n\tif (params.opusStereo === 'true') {\n\t\tsdp = setCodecParam(sdp, 'opus/48000', 'stereo', '1');\n\t} else if (params.opusStereo === 'false') {\n\t\tsdp = removeCodecParam(sdp, 'opus/48000', 'stereo');\n\t}\n\n\t// Set Opus FEC, if opusfec is true, unset it, if opusfec is false, and\n\t// do nothing if otherwise.\n\tif (params.opusFec === 'true') {\n\t\tsdp = setCodecParam(sdp, 'opus/48000', 'useinbandfec', '1');\n\t} else if (params.opusFec === 'false') {\n\t\tsdp = removeCodecParam(sdp, 'opus/48000', 'useinbandfec');\n\t}\n\n\t// Set Opus DTX, if opusdtx is true, unset it, if opusdtx is false, and\n\t// do nothing if otherwise.\n\tif (params.opusDtx === 'true') {\n\t\tsdp = setCodecParam(sdp, 'opus/48000', 'usedtx', '1');\n\t} else if (params.opusDtx === 'false') {\n\t\tsdp = removeCodecParam(sdp, 'opus/48000', 'usedtx');\n\t}\n\n\t// Set Opus maxplaybackrate, if requested.\n\tif (params.opusMaxPbr) {\n\t\tsdp = setCodecParam(sdp, 'opus/48000', 'maxplaybackrate', params.opusMaxPbr);\n\t}\n\treturn sdp;\n}\n\nfunction maybeSetAudioSendBitRate(sdp, params) {\n\tif (!params.audioSendBitrate) {\n\t\treturn sdp;\n\t}\n\tLogger.debug('Prefer audio send bitrate: ' + params.audioSendBitrate);\n\treturn preferBitRate(sdp, params.audioSendBitrate, 'audio');\n}\n\nfunction maybeSetAudioReceiveBitRate(sdp, params) {\n\tif (!params.audioRecvBitrate) {\n\t\treturn sdp;\n\t}\n\tLogger.debug('Prefer audio receive bitrate: ' + params.audioRecvBitrate);\n\treturn preferBitRate(sdp, params.audioRecvBitrate, 'audio');\n}\n\nfunction maybeSetVideoSendBitRate(sdp, params) {\n\tif (!params.videoSendBitrate) {\n\t\treturn sdp;\n\t}\n\tLogger.debug('Prefer video send bitrate: ' + params.videoSendBitrate);\n\treturn preferBitRate(sdp, params.videoSendBitrate, 'video');\n}\n\nfunction maybeSetVideoReceiveBitRate(sdp, params) {\n\tif (!params.videoRecvBitrate) {\n\t\treturn sdp;\n\t}\n\tLogger.debug('Prefer video receive bitrate: ' + params.videoRecvBitrate);\n\treturn preferBitRate(sdp, params.videoRecvBitrate, 'video');\n}\n\n// Add a b=AS:bitrate line to the m=mediaType section.\nfunction preferBitRate(sdp, bitrate, mediaType) {\n\tconst sdpLines = sdp.split('\\r\\n');\n\n\t// Find m line for the given mediaType.\n\tconst mLineIndex = findLine(sdpLines, 'm=', mediaType);\n\tif (mLineIndex === null) {\n\t\tLogger.debug('Failed to add bandwidth line to sdp, as no m-line found');\n\t\treturn sdp;\n\t}\n\n\t// Find next m-line if any.\n\tlet nextMLineIndex = findLineInRange(sdpLines, mLineIndex + 1, -1, 'm=');\n\tif (nextMLineIndex === null) {\n\t\tnextMLineIndex = sdpLines.length;\n\t}\n\n\t// Find c-line corresponding to the m-line.\n\tconst cLineIndex = findLineInRange(sdpLines, mLineIndex + 1, nextMLineIndex, 'c=');\n\tif (cLineIndex === null) {\n\t\tLogger.debug('Failed to add bandwidth line to sdp, as no c-line found');\n\t\treturn sdp;\n\t}\n\n\t// Check if bandwidth line already exists between c-line and next m-line.\n\tconst bLineIndex = findLineInRange(sdpLines, cLineIndex + 1, nextMLineIndex, 'b=AS');\n\tif (bLineIndex) {\n\t\tsdpLines.splice(bLineIndex, 1);\n\t}\n\n\t// Create the b (bandwidth) sdp line.\n\tconst bwLine = 'b=AS:' + bitrate;\n\t// As per RFC 4566, the b line should follow after c-line.\n\tsdpLines.splice(cLineIndex + 1, 0, bwLine);\n\tsdp = sdpLines.join('\\r\\n');\n\treturn sdp;\n}\n\n// Add an a=fmtp: x-google-min-bitrate=kbps line, if videoSendInitialBitrate\n// is specified. We'll also add a x-google-min-bitrate value, since the max\n// must be >= the min.\nfunction maybeSetVideoSendInitialBitRate(sdp, params) {\n\tlet initialBitrate = parseInt(params.videoSendInitialBitrate);\n\tif (!initialBitrate) {\n\t\treturn sdp;\n\t}\n\n\t// Validate the initial bitrate value.\n\tlet maxBitrate = parseInt(initialBitrate);\n\tconst bitrate = parseInt(params.videoSendBitrate);\n\tif (bitrate) {\n\t\tif (initialBitrate > bitrate) {\n\t\t\tLogger.debug('Clamping initial bitrate to max bitrate of ' + bitrate + ' kbps.');\n\t\t\tinitialBitrate = bitrate;\n\t\t\tparams.videoSendInitialBitrate = initialBitrate;\n\t\t}\n\t\tmaxBitrate = bitrate;\n\t}\n\n\tconst sdpLines = sdp.split('\\r\\n');\n\n\t// Search for m line.\n\tconst mLineIndex = findLine(sdpLines, 'm=', 'video');\n\tif (mLineIndex === null) {\n\t\tLogger.debug('Failed to find video m-line');\n\t\treturn sdp;\n\t}\n\t// Figure out the first codec payload type on the m=video SDP line.\n\tconst videoMLine = sdpLines[mLineIndex];\n\tconst pattern = new RegExp('m=video\\\\s\\\\d+\\\\s[A-Z/]+\\\\s');\n\tconst sendPayloadType = videoMLine.split(pattern)[1].split(' ')[0];\n\tconst fmtpLine = sdpLines[findLine(sdpLines, 'a=rtpmap', sendPayloadType)];\n\tconst codecName = fmtpLine.split('a=rtpmap:' + sendPayloadType)[1].split('/')[0];\n\n\t// Use codec from params if specified via URL param, otherwise use from SDP.\n\tconst codec = params.videoSendCodec || codecName;\n\tsdp = setCodecParam(sdp, codec, 'x-google-min-bitrate', params.videoSendInitialBitrate.toString());\n\tsdp = setCodecParam(sdp, codec, 'x-google-max-bitrate', maxBitrate.toString());\n\n\treturn sdp;\n}\n\nfunction removePayloadTypeFromMline(mLine, payloadType) {\n\tmLine = mLine.split(' ');\n\tfor (let i = 0; i < mLine.length; ++i) {\n\t\tif (mLine[i] === payloadType.toString()) {\n\t\t\tmLine.splice(i, 1);\n\t\t}\n\t}\n\treturn mLine.join(' ');\n}\n\nfunction removeCodecByName(sdpLines, codec) {\n\tconst index = findLine(sdpLines, 'a=rtpmap', codec);\n\tif (index === null) {\n\t\treturn sdpLines;\n\t}\n\tconst payloadType = getCodecPayloadTypeFromLine(sdpLines[index]);\n\tsdpLines.splice(index, 1);\n\n\t// Search for the video m= line and remove the codec.\n\tconst mLineIndex = findLine(sdpLines, 'm=', 'video');\n\tif (mLineIndex === null) {\n\t\treturn sdpLines;\n\t}\n\tsdpLines[mLineIndex] = removePayloadTypeFromMline(sdpLines[mLineIndex], payloadType);\n\treturn sdpLines;\n}\n\nfunction removeCodecByPayloadType(sdpLines, payloadType) {\n\tconst index = findLine(sdpLines, 'a=rtpmap', payloadType.toString());\n\tif (index === null) {\n\t\treturn sdpLines;\n\t}\n\tsdpLines.splice(index, 1);\n\n\t// Search for the video m= line and remove the codec.\n\tconst mLineIndex = findLine(sdpLines, 'm=', 'video');\n\tif (mLineIndex === null) {\n\t\treturn sdpLines;\n\t}\n\tsdpLines[mLineIndex] = removePayloadTypeFromMline(sdpLines[mLineIndex], payloadType);\n\treturn sdpLines;\n}\n\nfunction maybeRemoveVideoFec(sdp, params) {\n\tif (params.videoFec !== 'false') {\n\t\treturn sdp;\n\t}\n\n\tlet sdpLines = sdp.split('\\r\\n');\n\n\tlet index = findLine(sdpLines, 'a=rtpmap', 'red');\n\tif (index === null) {\n\t\treturn sdp;\n\t}\n\tconst redPayloadType = getCodecPayloadTypeFromLine(sdpLines[index]);\n\tsdpLines = removeCodecByPayloadType(sdpLines, redPayloadType);\n\n\tsdpLines = removeCodecByName(sdpLines, 'ulpfec');\n\n\t// Remove fmtp lines associated with red codec.\n\tindex = findLine(sdpLines, 'a=fmtp', redPayloadType.toString());\n\tif (index === null) {\n\t\treturn sdp;\n\t}\n\tconst fmtpLine = parseFmtpLine(sdpLines[index]);\n\tconst rtxPayloadType = fmtpLine.pt;\n\tif (rtxPayloadType === null) {\n\t\treturn sdp;\n\t}\n\tsdpLines.splice(index, 1);\n\n\tsdpLines = removeCodecByPayloadType(sdpLines, rtxPayloadType);\n\treturn sdpLines.join('\\r\\n');\n}\n\n// Promotes |audioSendCodec| to be the first in the m=audio line, if set.\nfunction maybePreferAudioSendCodec(sdp, params) {\n\treturn maybePreferCodec(sdp, 'audio', 'send', params.audioSendCodec);\n}\n\n// Promotes |audioRecvCodec| to be the first in the m=audio line, if set.\nfunction maybePreferAudioReceiveCodec(sdp, params) {\n\treturn maybePreferCodec(sdp, 'audio', 'receive', params.audioRecvCodec);\n}\n\n// Promotes |videoSendCodec| to be the first in the m=audio line, if set.\nfunction maybePreferVideoSendCodec(sdp, params) {\n\treturn maybePreferCodec(sdp, 'video', 'send', params.videoSendCodec);\n}\n\n// Promotes |videoRecvCodec| to be the first in the m=audio line, if set.\nfunction maybePreferVideoReceiveCodec(sdp, params) {\n\treturn maybePreferCodec(sdp, 'video', 'receive', params.videoRecvCodec);\n}\n\n// Sets |codec| as the default |type| codec if it's present.\n// The format of |codec| is 'NAME/RATE', e.g. 'opus/48000'.\nfunction maybePreferCodec(sdp, type, dir, codec) {\n\tconst str = type + ' ' + dir + ' codec';\n\tif (!codec) {\n\t\tLogger.debug('No preference on ' + str + '.');\n\t\treturn sdp;\n\t}\n\n\tLogger.debug('Prefer ' + str + ': ' + codec);\n\n\tconst sdpLines = sdp.split('\\r\\n');\n\n\t// Search for m line.\n\tconst mLineIndex = findLine(sdpLines, 'm=', type);\n\tif (mLineIndex === null) {\n\t\treturn sdp;\n\t}\n\n\t// If the codec is available, set it as the default in m line.\n\tlet payload = null;\n\tfor (let i = 0; i < sdpLines.length; i++) {\n\t\tconst index = findLineInRange(sdpLines, i, -1, 'a=rtpmap', codec);\n\t\tif (index !== null) {\n\t\t\tpayload = getCodecPayloadTypeFromLine(sdpLines[index]);\n\t\t\tif (payload) {\n\t\t\t\tsdpLines[mLineIndex] = setDefaultCodec(sdpLines[mLineIndex], payload);\n\t\t\t}\n\t\t}\n\t}\n\n\tsdp = sdpLines.join('\\r\\n');\n\treturn sdp;\n}\n\n// Set fmtp param to specific codec in SDP. If param does not exists, add it.\nfunction setCodecParam(sdp, codec, param, value) {\n\tlet sdpLines = sdp.split('\\r\\n');\n\t// SDPs sent from MCU use \\n as line break.\n\tif (sdpLines.length <= 1) {\n\t\tsdpLines = sdp.split('\\n');\n\t}\n\n\tconst fmtpLineIndex = findFmtpLine(sdpLines, codec);\n\n\tlet fmtpObj = {};\n\tif (fmtpLineIndex === null) {\n\t\tconst index = findLine(sdpLines, 'a=rtpmap', codec);\n\t\tif (index === null) {\n\t\t\treturn sdp;\n\t\t}\n\t\tconst payload = getCodecPayloadTypeFromLine(sdpLines[index]);\n\t\tfmtpObj.pt = payload.toString();\n\t\tfmtpObj.params = {};\n\t\tfmtpObj.params[param] = value;\n\t\tsdpLines.splice(index + 1, 0, writeFmtpLine(fmtpObj));\n\t} else {\n\t\tfmtpObj = parseFmtpLine(sdpLines[fmtpLineIndex]);\n\t\tfmtpObj.params[param] = value;\n\t\tsdpLines[fmtpLineIndex] = writeFmtpLine(fmtpObj);\n\t}\n\n\tsdp = sdpLines.join('\\r\\n');\n\treturn sdp;\n}\n\n// Remove fmtp param if it exists.\nfunction removeCodecParam(sdp, codec, param) {\n\tconst sdpLines = sdp.split('\\r\\n');\n\n\tconst fmtpLineIndex = findFmtpLine(sdpLines, codec);\n\tif (fmtpLineIndex === null) {\n\t\treturn sdp;\n\t}\n\n\tconst map = parseFmtpLine(sdpLines[fmtpLineIndex]);\n\tdelete map.params[param];\n\n\tconst newLine = writeFmtpLine(map);\n\tif (newLine === null) {\n\t\tsdpLines.splice(fmtpLineIndex, 1);\n\t} else {\n\t\tsdpLines[fmtpLineIndex] = newLine;\n\t}\n\n\tsdp = sdpLines.join('\\r\\n');\n\treturn sdp;\n}\n\n// Split an fmtp line into an object including 'pt' and 'params'.\nfunction parseFmtpLine(fmtpLine) {\n\tconst fmtpObj = {};\n\tconst spacePos = fmtpLine.indexOf(' ');\n\tconst keyValues = fmtpLine.substring(spacePos + 1).split(';');\n\n\tconst pattern = new RegExp('a=fmtp:(\\\\d+)');\n\tconst result = fmtpLine.match(pattern);\n\tif (result && result.length === 2) {\n\t\tfmtpObj.pt = result[1];\n\t} else {\n\t\treturn null;\n\t}\n\n\tconst params = {};\n\tfor (let i = 0; i < keyValues.length; ++i) {\n\t\tconst pair = keyValues[i].split('=');\n\t\tif (pair.length === 2) {\n\t\t\tparams[pair[0]] = pair[1];\n\t\t}\n\t}\n\tfmtpObj.params = params;\n\n\treturn fmtpObj;\n}\n\n// Generate an fmtp line from an object including 'pt' and 'params'.\nfunction writeFmtpLine(fmtpObj) {\n\tif (!fmtpObj.hasOwnProperty('pt') || !fmtpObj.hasOwnProperty('params')) {\n\t\treturn null;\n\t}\n\tconst pt = fmtpObj.pt;\n\tconst params = fmtpObj.params;\n\tconst keyValues = [];\n\tlet i = 0;\n\tfor (const key in params) {\n\t\tkeyValues[i] = key + '=' + params[key];\n\t\t++i;\n\t}\n\tif (i === 0) {\n\t\treturn null;\n\t}\n\treturn 'a=fmtp:' + pt.toString() + ' ' + keyValues.join(';');\n}\n\n// Find fmtp attribute for |codec| in |sdpLines|.\nfunction findFmtpLine(sdpLines, codec) {\n\t// Find payload of codec.\n\tconst payload = getCodecPayloadType(sdpLines, codec);\n\t// Find the payload in fmtp line.\n\treturn payload ? findLine(sdpLines, 'a=fmtp:' + payload.toString()) : null;\n}\n\n// Find the line in sdpLines that starts with |prefix|, and, if specified,\n// contains |substr| (case-insensitive search).\nfunction findLine(sdpLines, prefix, substr) {\n\treturn findLineInRange(sdpLines, 0, -1, prefix, substr);\n}\n\n// Find the line in sdpLines[startLine...endLine - 1] that starts with |prefix|\n// and, if specified, contains |substr| (case-insensitive search).\nfunction findLineInRange(sdpLines, startLine, endLine, prefix, substr) {\n\tconst realEndLine = endLine !== -1 ? endLine : sdpLines.length;\n\tfor (let i = startLine; i < realEndLine; ++i) {\n\t\tif (sdpLines[i].indexOf(prefix) === 0) {\n\t\t\tif (!substr || sdpLines[i].toLowerCase().indexOf(substr.toLowerCase()) !== -1) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t}\n\treturn null;\n}\n\n// Gets the codec payload type from sdp lines.\nfunction getCodecPayloadType(sdpLines, codec) {\n\tconst index = findLine(sdpLines, 'a=rtpmap', codec);\n\treturn index ? getCodecPayloadTypeFromLine(sdpLines[index]) : null;\n}\n\n// Gets the codec payload type from an a=rtpmap:X line.\nfunction getCodecPayloadTypeFromLine(sdpLine) {\n\tconst pattern = new RegExp('a=rtpmap:(\\\\d+) [a-zA-Z0-9-]+\\\\/\\\\d+');\n\tconst result = sdpLine.match(pattern);\n\treturn result && result.length === 2 ? result[1] : null;\n}\n\n// Returns a new m= line with the specified codec as the first one.\nfunction setDefaultCodec(mLine, payload) {\n\tconst elements = mLine.split(' ');\n\n\t// Just copy the first three parameters; codec order starts on fourth.\n\tconst newLine = elements.slice(0, 3);\n\n\t// Put target payload first and copy in the rest.\n\tnewLine.push(payload);\n\tfor (let i = 3; i < elements.length; i++) {\n\t\tif (elements[i] !== payload) {\n\t\t\tnewLine.push(elements[i]);\n\t\t}\n\t}\n\treturn newLine.join(' ');\n}\n\n/* Below are newly added functions */\n\n// Following codecs will not be removed from SDP event they are not in the\n// user-specified codec list.\nconst audioCodecWhiteList = ['CN', 'telephone-event'];\nconst videoCodecWhiteList = ['red', 'ulpfec'];\n\n// Returns a new m= line with the specified codec order.\nfunction setCodecOrder(mLine, payloads) {\n\tconst elements = mLine.split(' ');\n\n\t// Just copy the first three parameters; codec order starts on fourth.\n\tlet newLine = elements.slice(0, 3);\n\n\t// Concat payload types.\n\tnewLine = newLine.concat(payloads);\n\n\treturn newLine.join(' ');\n}\n\n// Append RTX payloads for existing payloads.\nfunction appendRtxPayloads(sdpLines, payloads) {\n\tfor (const payload of payloads) {\n\t\tconst index = findLine(sdpLines, 'a=fmtp', 'apt=' + payload);\n\t\tif (index !== null) {\n\t\t\tconst fmtpLine = parseFmtpLine(sdpLines[index]);\n\t\t\tpayloads.push(fmtpLine.pt);\n\t\t}\n\t}\n\treturn payloads;\n}\n\n// Remove a codec with all its associated a lines.\nfunction removeCodecFramALine(sdpLines, payload) {\n\tconst pattern = new RegExp('a=(rtpmap|rtcp-fb|fmtp):' + payload + '\\\\s');\n\tfor (let i = sdpLines.length - 1; i > 0; i--) {\n\t\tif (sdpLines[i].match(pattern)) {\n\t\t\tsdpLines.splice(i, 1);\n\t\t}\n\t}\n\treturn sdpLines;\n}\n\n// Reorder codecs in m-line according the order of |codecs|. Remove codecs from\n// m-line if it is not present in |codecs|\n// The format of |codec| is 'NAME/RATE', e.g. 'opus/48000'.\nexport function reorderCodecs(sdp, type, codecs) {\n\tif (!codecs || codecs.length === 0) {\n\t\treturn sdp;\n\t}\n\n\tcodecs = type === 'audio' ? codecs.concat(audioCodecWhiteList) : codecs.concat(videoCodecWhiteList);\n\n\tlet sdpLines = sdp.split('\\r\\n');\n\n\t// Search for m line.\n\tconst mLineIndex = findLine(sdpLines, 'm=', type);\n\tif (mLineIndex === null) {\n\t\treturn sdp;\n\t}\n\n\tconst originPayloads = sdpLines[mLineIndex].split(' ');\n\toriginPayloads.splice(0, 3);\n\n\t// If the codec is available, set it as the default in m line.\n\tlet payloads = [];\n\tfor (const codec of codecs) {\n\t\tfor (let i = 0; i < sdpLines.length; i++) {\n\t\t\tconst index = findLineInRange(sdpLines, i, -1, 'a=rtpmap', codec);\n\t\t\tif (index !== null) {\n\t\t\t\tconst payload = getCodecPayloadTypeFromLine(sdpLines[index]);\n\t\t\t\tif (payload) {\n\t\t\t\t\tpayloads.push(payload);\n\t\t\t\t\ti = index;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tpayloads = appendRtxPayloads(sdpLines, payloads);\n\tsdpLines[mLineIndex] = setCodecOrder(sdpLines[mLineIndex], payloads);\n\n\t// Remove a lines.\n\tfor (const payload of originPayloads) {\n\t\tif (payloads.indexOf(payload) === -1) {\n\t\t\tsdpLines = removeCodecFramALine(sdpLines, payload);\n\t\t}\n\t}\n\n\tsdp = sdpLines.join('\\r\\n');\n\treturn sdp;\n}\n\nexport function setMinBitrate(sdp, encodingParametersList) {\n\tfor (const encodingParameters of encodingParametersList) {\n\t\tif (encodingParameters.minBitrate) {\n\t\t\tsdp = setCodecParam(sdp, encodingParameters.codec.name, 'x-google-min-bitrate', encodingParameters.minBitrate.toString());\n\t\t}\n\t}\n\treturn sdp;\n}\n\nexport function setMaxBitrate(sdp, encodingParametersList) {\n\tfor (const encodingParameters of encodingParametersList) {\n\t\tif (encodingParameters.maxBitrate) {\n\t\t\tsdp = setCodecParam(sdp, encodingParameters.codec.name, 'x-google-max-bitrate', encodingParameters.maxBitrate.toString());\n\t\t}\n\t}\n\treturn sdp;\n}\n\nexport function setStartBitrate(sdp, encodingParametersList) {\n\tfor (const encodingParameters of encodingParametersList) {\n\t\tif (encodingParameters.startBitrate) {\n\t\t\tsdp = setCodecParam(sdp, encodingParameters.codec.name, 'x-google-start-bitrate', encodingParameters.startBitrate.toString());\n\t\t}\n\t}\n\treturn sdp;\n}\n","// Copyright (C) <2018> Intel Corporation\n//\n// SPDX-License-Identifier: Apache-2.0\n\n// This file doesn't have public APIs.\n/* eslint-disable valid-jsdoc, max-classes-per-file, require-jsdoc */\n// eslint-disable-next-line no-redeclare\n/* global Event, Map, Promise, RTCIceCandidate */\nimport SocketEvents from 'constants/socket-events';\nimport { ConferenceErrorType, CallTypes } from 'constants/enums';\nimport { EventDispatcher, MessageEvent, OwtEvent } from '../base/event';\nimport { Publication } from '../base/publication';\nimport * as Utils from '../base/utils';\nimport * as ErrorModule from './error';\nimport * as StreamModule from '../base/stream';\nimport * as SdpUtils from '../base/sdputils';\n\n/**\n * @class P2PPeerConnectionChannelEvent\n * @desc Event for Stream.\n * @memberOf Owt.P2P\n * @private\n * */\nexport class P2PPeerConnectionChannelEvent extends Event {\n\t/* eslint-disable-next-line require-jsdoc */\n\tconstructor(init) {\n\t\tsuper(init);\n\t\tthis.stream = init.stream;\n\t}\n}\n\nconst DataChannelLabel = {\n\tMESSAGE: 'message',\n\tFILE: 'file',\n};\n\nconst sysInfo = Utils.sysInfo();\n\n/**\n * @class P2PPeerConnectionChannel\n * @desc A P2PPeerConnectionChannel handles all interactions between this endpoint and a remote endpoint.\n * @memberOf Owt.P2P\n * @private\n */\nclass P2PPeerConnectionChannel extends EventDispatcher {\n\t// |signaling| is an object has a method |sendSignalingMessage|.\n\t/* eslint-disable-next-line require-jsdoc */\n\tconstructor({ config, localId, remoteId, signaling, logger }) {\n\t\tsuper();\n\t\tthis._config = config;\n\t\tthis._localId = localId;\n\t\tthis._remoteId = remoteId;\n\t\tthis._signaling = signaling;\n\t\tthis._pc = null;\n\t\tthis._publishedStreams = new Map(); // Key is streams published, value is its publication.\n\t\tthis._pendingStreams = []; // Streams going to be added to PeerConnection.\n\t\tthis._publishingStreams = []; // Streams have been added to PeerConnection, but does not receive ack from remote side.\n\t\tthis._pendingUnpublishStreams = []; // Streams going to be removed.\n\t\tthis._myStreamInfo = [];\n\t\t// Key is MediaStream's ID, value is an object {source:{audio:string, video:string}, attributes: object, stream: RemoteStream, mediaStream: MediaStream}.\n\t\t// `stream` and `mediaStream` will be set when `track` event is fired on `RTCPeerConnection`.\n\t\t// `mediaStream` will be `null` after `streamadded` event is fired on `P2PClient`.\n\t\t// Other propertes will be set upon `STREAM_INFO` event from signaling channel.\n\t\tthis._remoteStreamInfo = new Map();\n\t\tthis._remoteStreams = [];\n\t\tthis._remoteTrackSourceInfo = new Map(); // Key is MediaStreamTrack's ID, value is source info.\n\t\tthis._publishPromises = new Map(); // Key is MediaStream's ID, value is an object has |resolve| and |reject|.\n\t\tthis._unpublishPromises = new Map(); // Key is MediaStream's ID, value is an object has |resolve| and |reject|.\n\t\tthis._publishingStreamTracks = new Map(); // Key is MediaStream's ID, value is an array of the ID of its MediaStreamTracks that haven't been acked.\n\t\tthis._publishedStreamTracks = new Map(); // Key is MediaStream's ID, value is an array of the ID of its MediaStreamTracks that haven't been removed.\n\t\tthis._isNegotiationNeeded = false;\n\t\tthis._remoteSideSupportsRemoveStream = true;\n\t\tthis._remoteSideSupportsPlanB = true;\n\t\tthis._remoteSideSupportsUnifiedPlan = true;\n\t\tthis._remoteIceCandidates = [];\n\t\tthis._dataChannels = new Map(); // Key is data channel's label, value is a RTCDataChannel.\n\t\tthis._pendingMessages = [];\n\t\tthis._dataSeq = 1; // Sequence number for data channel messages.\n\t\tthis._sendDataPromises = new Map(); // Key is data sequence number, value is an object has |resolve| and |reject|.\n\t\tthis._addedTrackIds = []; // Tracks that have been added after receiving remote SDP but before connection is established. Draining these messages when ICE connection state is connected.\n\t\tthis._isCaller = true;\n\t\tthis._infoSent = false;\n\t\tthis._disposed = false;\n\t\tthis.logger = logger;\n\t\tthis._createPeerConnection();\n\t\tthis.participantId = null;\n\t\tthis.conferenceId = null;\n\t\tthis.actioneeParticipantId = null;\n\t\tthis.helloDeviceId = null;\n\t\tthis._polite = true;\n\t\tthis._ignoredOffer = false;\n\t\tthis._offering = false;\n\t}\n\n\t/**\n\t * @function publishConferenceError\n\t * @desc Publish a conference error\n\t * @private\n\t */\n\tpublishConferenceError(message, method, errorType) {\n\t\tthis._sendSignalingMessage(SocketEvents.Conference.ERROR, {\n\t\t\tmessage: message,\n\t\t\tactioneeParticipantId: this.actioneeParticipantId,\n\t\t\tparticipantId: this.participantId,\n\t\t\tconferenceId: this.conferenceId,\n\t\t\tpeerConnectionState: this._pc.iceConnectionState,\n\t\t\tmethod: method,\n\t\t\terrorType: errorType,\n\t\t});\n\t}\n\n\t/**\n\t * @function publish\n\t * @desc Publish a stream to the remote endpoint.\n\t * @private\n\t */\n\tpublish(stream, offer, reconnectingPublish) {\n\t\tthis.conferenceId = offer.conferenceId;\n\t\tthis.participantId = offer.participantId;\n\t\tthis.actioneeParticipantId = offer.actioneeParticipantId;\n\t\tthis.setMyStreamInfo(stream);\n\t\treturn new Promise(resolve => {\n\t\t\t// Replace |addStream| with PeerConnection.addTrack when all browsers are ready.\n\t\t\tlet senders = this._pc.getSenders();\n\t\t\tlet sendersId = senders.reduce((result, sender) => {\n\t\t\t\tif (sender.track != null) {\n\t\t\t\t\tresult.push(sender.track.id);\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t}, []);\n\n\t\t\tlet tracks = stream.mediaStream.getTracks();\n\n\t\t\tif (!reconnectingPublish && !tracks.length && (offer.callType === CallTypes.SECURITYCAM || offer.callType === CallTypes.MONITORING)) {\n\t\t\t\t// on monitoring / camera feed we need to notify the other part ex. hello\n\t\t\t\t// that we will recive RTP for both audio and video ...\n\t\t\t\tthis._pc.addTransceiver('audio', { direction: 'recvonly' });\n\t\t\t\tthis._pc.addTransceiver('video', { direction: 'recvonly' });\n\t\t\t}\n\n\t\t\tlet tracksId = tracks.map(track => track.id);\n\t\t\tif (sendersId.length < tracks.length) {\n\t\t\t\tconst reuseAudioTransceiver = this._pc.getTransceivers().find(t => t.mid === '0');\n\t\t\t\t// video would be always at position 1 or 2 (because the calls always start as audio first);\n\t\t\t\tconst reuseVideoTransceiver = this._pc.getTransceivers().find(t => (t.mid === '1' || t.mid === '2') && t.direction === 'recvonly');\n\t\t\t\ttracks.forEach(track => {\n\t\t\t\t\tif (!sendersId.includes(track.id)) {\n\t\t\t\t\t\tif (track.kind !== 'audio' && reuseVideoTransceiver) {\n\t\t\t\t\t\t\tthis.logger.debug(`Reusing ${track.kind} transceiver \\nactioneeParticipantId ${this.actioneeParticipantId}`, { offer });\n\t\t\t\t\t\t\treuseVideoTransceiver.direction = 'sendrecv';\n\t\t\t\t\t\t\treuseVideoTransceiver.sender.replaceTrack(track);\n\t\t\t\t\t\t} else if (track.kind === 'audio' && reuseAudioTransceiver) {\n\t\t\t\t\t\t\tthis.logger.debug(`Reusing ${track.kind} transceiver \\nactioneeParticipantId ${this.actioneeParticipantId}`, { offer });\n\t\t\t\t\t\t\treuseAudioTransceiver.direction = 'sendrecv';\n\t\t\t\t\t\t\treuseAudioTransceiver.sender.replaceTrack(track);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.logger.debug(`Adding track to peer connection... \\nactioneeParticipantId ${this.actioneeParticipantId}`, { offer });\n\t\t\t\t\t\t\tthis._pc.addTrack(track, stream.mediaStream);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else if (sendersId.length > tracks.length && !!sendersId.length) {\n\t\t\t\tsenders.forEach((sender, i) => {\n\t\t\t\t\tif (sender.track != null && !tracksId.includes(sender.track.id)) {\n\t\t\t\t\t\tthis._pc.removeTrack(senders[i]);\n\t\t\t\t\t\tsenders.splice(i, 1);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tthis._onNegotiationneeded(offer).then(() => {\n\t\t\t\tresolve();\n\t\t\t});\n\t\t});\n\t}\n\n\t_getVideoTransceivers() {\n\t\treturn this._pc.getTransceivers().find(t => (t.mid === '1' || t.mid === '2') && t.sender.track != null && !t.sender.track.label.startsWith('screen'));\n\t}\n\n\t_setEncodingParmeters(transceiver, maxBitrate, maxFramerate) {\n\t\tconst rtcRtpSendParameters = transceiver.sender.getParameters();\n\t\tconst encodingParameterList = rtcRtpSendParameters.encodings.map(e => {\n\t\t\tif (e.active) {\n\t\t\t\te.maxBitrate = maxBitrate;\n\t\t\t\te.maxFramerate = maxFramerate;\n\t\t\t}\n\t\t\treturn e;\n\t\t});\n\t\trtcRtpSendParameters.encodings = encodingParameterList;\n\t\ttransceiver.sender.setParameters(rtcRtpSendParameters);\n\t}\n\n\t/**\n\t * @function send\n\t * @desc Send a message to the remote endpoint.\n\t * @private\n\t */\n\tsend(message, offer, wsEvent) {\n\t\tif (!(typeof message === 'string')) {\n\t\t\treturn Promise.reject(new TypeError('Invalid message.'));\n\t\t}\n\n\t\tif (offer) {\n\t\t\tthis.participantId = offer.participantId;\n\t\t\tthis.helloDeviceId = offer.helloDeviceId;\n\t\t}\n\t\tconst data = {\n\t\t\tid: this._dataSeq++,\n\t\t\tdata: message,\n\t\t};\n\t\tconst promise = new Promise((resolve, reject) => {\n\t\t\tthis._sendDataPromises.set(data.id, {\n\t\t\t\tresolve: resolve,\n\t\t\t\treject: reject,\n\t\t\t});\n\t\t});\n\t\tif (!this._dataChannels.has(DataChannelLabel.MESSAGE)) {\n\t\t\tthis._createDataChannel(DataChannelLabel.MESSAGE, offer, wsEvent);\n\t\t}\n\n\t\tthis._sendClosedMsgIfNecessary().catch(err => {\n\t\t\tthis.logger.debug(`Failed to send closed message. ${err.message}`);\n\t\t});\n\n\t\tthis._sendSysInfoIfNecessary().catch(err => {\n\t\t\tthis.logger.debug(`Failed to send sysInfo. ${err.message}`);\n\t\t});\n\n\t\tconst dc = this._dataChannels.get(DataChannelLabel.MESSAGE);\n\t\tif (dc.readyState === 'open') {\n\t\t\tthis._dataChannels.get(DataChannelLabel.MESSAGE).send(JSON.stringify(data));\n\t\t} else {\n\t\t\tthis._pendingMessages.push(data);\n\t\t}\n\t\treturn promise;\n\t}\n\n\t/**\n\t * @function stop\n\t * @desc Stop the connection with remote endpoint.\n\t * @private\n\t */\n\tstop() {\n\t\tthis._stop(undefined, true);\n\t}\n\n\t/**\n\t * @function getStats\n\t * @desc Get stats for a specific MediaStream.\n\t * @private\n\t */\n\tgetStats(mediaStream) {\n\t\tif (this._pc) {\n\t\t\tif (mediaStream === undefined) {\n\t\t\t\treturn this._pc.getStats();\n\t\t\t}\n\n\t\t\tconst tracksStatsReports = [];\n\t\t\treturn Promise.all([\n\t\t\t\tmediaStream.getTracks().forEach(track => {\n\t\t\t\t\tthis._getStats(track, tracksStatsReports);\n\t\t\t\t}),\n\t\t\t]).then(() => {\n\t\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\t\tresolve(tracksStatsReports);\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\treturn Promise.reject(new ErrorModule.P2PError(ErrorModule.errors.P2P_CLIENT_INVALID_STATE));\n\t}\n\n\t_getStats(mediaStreamTrack, reportsResult) {\n\t\treturn this._pc.getStats(mediaStreamTrack).then(statsReport => {\n\t\t\treportsResult.push(statsReport);\n\t\t});\n\t}\n\n\t/**\n\t * @function onMessage\n\t * @desc This method is called by P2PClient when there is new signaling message arrived.\n\t * @private\n\t */\n\tonMessage(message) {\n\t\tthis._SignalingMesssageHandler(message);\n\t}\n\n\t_sendSdp(sdp, event) {\n\t\treturn this._signaling.sendSignalingMessage(event, sdp);\n\t}\n\n\t_sendSignalingMessage(type, message) {\n\t\treturn this._signaling.sendSignalingMessage(type, message);\n\t}\n\n\t_SignalingMesssageHandler(message) {\n\t\tif (message?.type !== SocketEvents.Conference.SDP) {\n\t\t\tthis.logger.debug(`Channel received message`, message);\n\t\t}\n\t\tswitch (message.type) {\n\t\t\tcase SocketEvents.Conference.UA:\n\t\t\t\tthis._handleRemoteCapability(message.data);\n\t\t\t\tthis._sendSysInfoIfNecessary();\n\t\t\t\tbreak;\n\t\t\tcase SocketEvents.Conference.ON_TRACK_SOURCES:\n\t\t\t\tthis._trackSourcesHandler(message.data);\n\t\t\t\tbreak;\n\t\t\tcase SocketEvents.Conference.ON_STREAM_INFO:\n\t\t\t\tthis._streamInfoHandler(message.data);\n\t\t\t\tbreak;\n\t\t\tcase SocketEvents.Conference.TRACKS_ADDED:\n\t\t\t\tthis._tracksAddedHandler(message.data);\n\t\t\t\tbreak;\n\t\t\tcase SocketEvents.Conference.TRACKS_REMOVED:\n\t\t\t\tthis._tracksRemovedHandler(message.data);\n\t\t\t\tbreak;\n\t\t\tcase SocketEvents.Conference.SDP:\n\t\t\t\tthis._sdpHandler(message.data, message.streamInfo);\n\t\t\t\tbreak;\n\t\t\tcase SocketEvents.Conference.CLOSED:\n\t\t\t\tthis._chatClosedHandler(message.data);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthis.logger.error(`Invalid signaling message received. Type: ${message.type}`);\n\t\t}\n\t}\n\n\t/**\n\t * @function _tracksAddedHandler\n\t * @desc Handle track added event from remote side.\n\t * @private\n\t */\n\t_tracksAddedHandler(ids) {\n\t\t// Currently, |ids| contains all track IDs of a MediaStream. Following algorithm also handles |ids| is a part of a MediaStream's tracks.\n\t\tids.forEach(id => {\n\t\t\t// It could be a problem if there is a track published with different MediaStreams.\n\t\t\tthis._publishingStreamTracks.forEach((mediaTrackIds, mediaStreamId) => {\n\t\t\t\tfor (let i = 0; i < mediaTrackIds.length; i += 1) {\n\t\t\t\t\tif (mediaTrackIds[i] === id) {\n\t\t\t\t\t\t// Move this track from publishing tracks to published tracks.\n\t\t\t\t\t\tif (!this._publishedStreamTracks.has(mediaStreamId)) {\n\t\t\t\t\t\t\tthis._publishedStreamTracks.set(mediaStreamId, []);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis._publishedStreamTracks.get(mediaStreamId).push(mediaTrackIds[i]);\n\t\t\t\t\t\tmediaTrackIds.splice(i, 1);\n\t\t\t\t\t}\n\t\t\t\t\t// Resolving certain publish promise when remote endpoint received all tracks of a MediaStream.\n\t\t\t\t\tif (mediaTrackIds.length === 0) {\n\t\t\t\t\t\tif (!this._publishPromises.has(mediaStreamId)) {\n\t\t\t\t\t\t\tthis.logger.warn(`Cannot find the promise for publishing ${mediaStreamId}`);\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst targetStreamIndex = this._publishingStreams.findIndex(element => element.mediaStream.id === mediaStreamId);\n\t\t\t\t\t\tconst targetStream = this._publishingStreams[targetStreamIndex];\n\t\t\t\t\t\tthis._publishingStreams.splice(targetStreamIndex, 1);\n\t\t\t\t\t\tconst publication = new Publication(\n\t\t\t\t\t\t\tid,\n\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\tthis._unpublish(targetStream).then(\n\t\t\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\t\t\tpublication.dispatchEvent(new OwtEvent('ended'));\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\terr => {\n\t\t\t\t\t\t\t\t\t\t// Use debug mode because this error usually doesn't block stopping a publication.\n\t\t\t\t\t\t\t\t\t\tthis.logger.debug(`Something wrong happened during stopping a publication. ${err.message}`);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\tif (!targetStream || !targetStream.mediaStream) {\n\t\t\t\t\t\t\t\t\treturn Promise.reject(new ErrorModule.P2PError(ErrorModule.errors.P2P_CLIENT_INVALID_STATE, 'Publication is not available.'));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn this.getStats(targetStream.mediaStream);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t\tthis._publishedStreams.set(targetStream, publication);\n\t\t\t\t\t\tthis._publishPromises.get(mediaStreamId).resolve(publication);\n\t\t\t\t\t\tthis._publishPromises.delete(mediaStreamId);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\t/**\n\t * @function _tracksRemovedHandler\n\t * @desc Handle track removed event from remote side.\n\t * @private\n\t */\n\t_tracksRemovedHandler(ids) {\n\t\t// Currently, |ids| contains all track IDs of a MediaStream. Following algorithm also handles |ids| is a part of a MediaStream's tracks.\n\t\tids.forEach(id => {\n\t\t\t// It could be a problem if there is a track published with different MediaStreams.\n\t\t\tthis._publishedStreamTracks.forEach((mediaTrackIds, mediaStreamId) => {\n\t\t\t\tfor (let i = 0; i < mediaTrackIds.length; i += 1) {\n\t\t\t\t\tif (mediaTrackIds[i] === id) {\n\t\t\t\t\t\tmediaTrackIds.splice(i, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\t/**\n\t * @function _dataReceivedHandler\n\t * @desc Handle data received event from remote side.\n\t * @private\n\t */\n\t_dataReceivedHandler(id) {\n\t\tif (!this._sendDataPromises.has(id)) {\n\t\t\tthis.logger.warn(`Received unknown data received message. ID: ${id}`);\n\t\t} else {\n\t\t\tthis._sendDataPromises.get(id).resolve();\n\t\t}\n\t}\n\n\t/**\n\t * @function _sdpHandler\n\t * @desc Handle SDP received event from remote side.\n\t * @private\n\t */\n\t_sdpHandler(sdp, streamInfo) {\n\t\tif (sdp.type === 'offer') {\n\t\t\tthis._streamInfoHandler(streamInfo);\n\t\t\tthis._onOffer(sdp);\n\t\t} else if (sdp.type === 'answer') {\n\t\t\tthis._streamInfoHandler(streamInfo);\n\t\t\tthis._onAnswer(sdp);\n\t\t} else if (sdp.type === 'candidate') {\n\t\t\tthis._onRemoteIceCandidate(sdp);\n\t\t}\n\t}\n\n\t/**\n\t * @function _trackSourcesHandler\n\t * @desc Received track source information from remote side.\n\t * @private\n\t */\n\t_trackSourcesHandler(data) {\n\t\tdata.forEach(info => {\n\t\t\tthis._remoteTrackSourceInfo.set(info.id, info.source);\n\t\t});\n\t}\n\n\t/**\n\t * @function _streamInfoHandler\n\t * @desc Received stream information from remote side.\n\t * @private\n\t */\n\t_streamInfoHandler(data) {\n\t\tif (!data) {\n\t\t\tthis.logger.warn('Unexpected stream info', data);\n\t\t\treturn;\n\t\t}\n\t\tthis._remoteStreamInfo.set(data.id, {\n\t\t\tsource: data.source,\n\t\t\tattributes: data.attributes,\n\t\t\tstream: null,\n\t\t\tmediaStream: null,\n\t\t\ttrackIds: data.tracks, // Track IDs may not match at sender and receiver sides. Keep it for legacy porposes.\n\t\t});\n\t}\n\n\t/**\n\t * @function _chatClosedHandler\n\t * @desc Received chat closed event from remote side.\n\t * @private\n\t */\n\t_chatClosedHandler(data) {\n\t\tthis._disposed = true;\n\t\tthis._stop(data, false);\n\t}\n\n\t_onOffer(sdp) {\n\t\tthis.logger.debug(`About to set remote description. Signaling state: ${this._pc.signalingState} \\nactioneeParticipantId ${this.actioneeParticipantId}`, {\n\t\t\tsdp,\n\t\t});\n\t\tsdp.sdp = this._setRtpSenderOptions(sdp.sdp, this._config);\n\t\t// Firefox only has one codec in answer, which does not truly reflect its\n\t\t// decoding capability. So we set codec preference to remote offer, and let\n\t\t// Firefox choose its preferred codec.\n\t\t// Reference: https://bugzilla.mozilla.org/show_bug.cgi?id=814227.\n\t\tif (Utils.isFirefox()) {\n\t\t\tsdp.sdp = this._setCodecOrder(sdp.sdp);\n\t\t}\n\t\tconst sessionDescription = new RTCSessionDescription(sdp);\n\t\tconst collision = this._pc.signalingState !== 'stable' || this._offering;\n\t\tthis._ignoredOffer = !this._polite && collision;\n\t\tif (this._ignoredOffer) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._pc.setRemoteDescription(sessionDescription).then(\n\t\t\t() => {\n\t\t\t\tthis._createAndSendAnswer();\n\t\t\t\tthis.dispatchEvent(new OwtEvent('remoteDescriptionSet'));\n\t\t\t},\n\t\t\terror => {\n\t\t\t\tthis.logger.error(`Set remote description failed. Message: ${error.message} \\nactioneeParticipantId ${this.actioneeParticipantId}`);\n\t\t\t\tthis.publishConferenceError(error.message, 'setRemoteDescription -> _onOffer', ConferenceErrorType.MEDIA_SOURCE_ERROR);\n\t\t\t\tthis._stop(error, true);\n\t\t\t}\n\t\t);\n\t}\n\n\t_onAnswer(sdp) {\n\t\tthis.logger.debug(`About to set remote description. Signaling state: ${this._pc.signalingState} \\nactioneeParticipantId ${this.actioneeParticipantId}`, {\n\t\t\tsdp,\n\t\t});\n\t\tsdp.sdp = this._setRtpSenderOptions(sdp.sdp, this._config);\n\t\tconst sessionDescription = new RTCSessionDescription(sdp);\n\t\tthis._pc.setRemoteDescription(new RTCSessionDescription(sessionDescription)).then(\n\t\t\t() => {\n\t\t\t\tthis._drainPendingMessages();\n\t\t\t},\n\t\t\terror => {\n\t\t\t\tthis.logger.error(`Set remote description failed. Message: ${error.message} \\nactioneeParticipantId ${this.actioneeParticipantId}`);\n\t\t\t\tthis.publishConferenceError(error.message, 'setRemoteDescription -> _onAnswer', ConferenceErrorType.MEDIA_SOURCE_ERROR);\n\t\t\t\tthis._stop(error, true);\n\t\t\t}\n\t\t);\n\t}\n\n\t_onLocalIceCandidate(event) {\n\t\tif (event.candidate) {\n\t\t\tlet data = {\n\t\t\t\tparticipantId: this.participantId,\n\t\t\t\tactioneeParticipantId: this.actioneeParticipantId,\n\t\t\t\tconferenceId: this.conferenceId,\n\t\t\t\tcandidate: {\n\t\t\t\t\tsdp: event.candidate.candidate,\n\t\t\t\t\tsdpMid: event.candidate.sdpMid,\n\t\t\t\t\tsdpMLineIndex: event.candidate.sdpMLineIndex,\n\t\t\t\t},\n\t\t\t};\n\t\t\tlet eventType = SocketEvents.Conference.SEND_ICE_CANDIDATE;\n\n\t\t\tthis._sendSdp(data, eventType).catch(e => {\n\t\t\t\tthis.publishConferenceError(e.message, '_onLocalIceCandidate', ConferenceErrorType.NEGOTIATION_FAILURE);\n\t\t\t\tthis.logger.error(`Failed to send candidate \\nactioneeParticipantId ${this.actioneeParticipantId}`, { data });\n\t\t\t});\n\t\t}\n\t}\n\n\t_onRemoteTrackAdded(event) {\n\t\tthis.logger.debug(`Remote track added \\nactioneeParticipantId ${this.actioneeParticipantId}`, { streams: event?.streams });\n\t\tevent.streams.forEach(stream => {\n\t\t\tif (!this._remoteStreamInfo.has(stream.id)) {\n\t\t\t\tthis.logger.warn('Missing stream info.');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!this._remoteStreamInfo.get(stream.id).stream) {\n\t\t\t\tthis._setStreamToRemoteStreamInfo(stream);\n\t\t\t}\n\t\t});\n\t\tif (this._pc.iceConnectionState === 'connected' || this._pc.iceConnectionState === 'completed') {\n\t\t\tthis._checkIceConnectionStateAndFireEvent();\n\t\t} else {\n\t\t\tthis._addedTrackIds.concat(event.track.id);\n\t\t}\n\t}\n\n\t_onRemoteStreamAdded(event) {\n\t\tthis.logger.debug(`Remote stream added \\nactioneeParticipantId ${this.actioneeParticipantId}`, { streams: event?.streams });\n\t\tif (!this._remoteStreamInfo.has(event.stream.id)) {\n\t\t\tthis.logger.warn(`Cannot find source info for stream ${event.stream.id} \\nactioneeParticipantId ${this.actioneeParticipantId}`);\n\t\t\treturn;\n\t\t}\n\t\tif (this._pc.iceConnectionState === 'connected' || this._pc.iceConnectionState === 'completed') {\n\t\t\tthis._sendSignalingMessage(SocketEvents.Conference.TRACKS_ADDED, this._remoteStreamInfo.get(event.stream.id).trackIds);\n\t\t} else {\n\t\t\tthis._addedTrackIds = this._addedTrackIds.concat(this._remoteStreamInfo.get(event.stream.id).trackIds);\n\t\t}\n\t\tconst audioTrackSource = this._remoteStreamInfo.get(event.stream.id).source.audio;\n\t\tconst videoTrackSource = this._remoteStreamInfo.get(event.stream.id).source.video;\n\t\tconst sourceInfo = new StreamModule.StreamSourceInfo(audioTrackSource, videoTrackSource);\n\t\tif (Utils.isSafari()) {\n\t\t\tif (!sourceInfo.audio) {\n\t\t\t\tevent.stream.getAudioTracks().forEach(track => {\n\t\t\t\t\tevent.stream.removeTrack(track);\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (!sourceInfo.video) {\n\t\t\t\tevent.stream.getVideoTracks().forEach(track => {\n\t\t\t\t\tevent.stream.removeTrack(track);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tconst { attributes } = this._remoteStreamInfo.get(event.stream.id);\n\t\tconst stream = new StreamModule.RemoteStream(undefined, this._remoteId, event.stream, sourceInfo, attributes);\n\t\tif (stream) {\n\t\t\tthis._remoteStreams.push(stream);\n\t\t\tconst streamEvent = new StreamModule.StreamEvent('streamadded', {\n\t\t\t\tstream: stream,\n\t\t\t});\n\t\t\tthis.dispatchEvent(streamEvent);\n\t\t}\n\t}\n\n\t_onRemoteStreamRemoved(event) {\n\t\tthis.logger.debug(`Remote stream removed \\nactioneeParticipantId ${this.actioneeParticipantId}`, { streams: event?.streams });\n\t\tconst i = this._remoteStreams.findIndex(s => {\n\t\t\treturn s.mediaStream.id === event.stream.id;\n\t\t});\n\t\tif (i !== -1) {\n\t\t\tconst stream = this._remoteStreams[i];\n\t\t\tthis._streamRemoved(stream);\n\t\t\tthis._remoteStreams.splice(i, 1);\n\t\t}\n\t}\n\n\t_onNegotiationneeded(offer, wsEvent) {\n\t\t// This is intented to be executed when onnegotiationneeded event is fired.\n\t\t// However, onnegotiationneeded may fire mutiple times when more than one\n\t\t// track is added/removed. So we manually execute this function after\n\t\t// adding/removing track and creating data channel.\n\t\tthis.logger.debug(`On negotiation needed \\nactioneeParticipantId ${this.actioneeParticipantId}`, { offer });\n\t\treturn this._doNegotiate(offer, wsEvent);\n\t}\n\n\t_onRemoteIceCandidate(candidateInfo) {\n\t\tconst candidate = new RTCIceCandidate({\n\t\t\tcandidate: candidateInfo.candidate,\n\t\t\tsdpMid: candidateInfo.sdpMid,\n\t\t\tsdpMLineIndex: candidateInfo.sdpMLineIndex,\n\t\t});\n\n\t\tif (this._pc.remoteDescription && this._pc.remoteDescription.sdp !== '') {\n\t\t\tthis._pc.addIceCandidate(candidate).catch(error => {\n\t\t\t\tthis.logger.error(`Error processing remote ICE candidate: ${error.message} \\nactioneeParticipantId ${this.actioneeParticipantId}`, { candidate });\n\t\t\t\tthis.publishConferenceError(\n\t\t\t\t\t`${error.message}, state: ${this._pc.signalingState}, ice: ${candidate.candidate}`,\n\t\t\t\t\t'onAddIceCandidate -> _onRemoteIceCandidate',\n\t\t\t\t\tConferenceErrorType.ICE_CONNECTION_FAILURE\n\t\t\t\t);\n\t\t\t\tif (!this._ignoredOffer) throw error;\n\t\t\t});\n\t\t} else {\n\t\t\tthis._remoteIceCandidates.push(candidate);\n\t\t}\n\t}\n\n\t_onSignalingStateChange(event) {\n\t\tthis.logger.debug(`Signaling state changed \"${event.currentTarget.signalingState}\" \\nactioneeParticipantId ${this.actioneeParticipantId}`);\n\t\tif (this._pc.signalingState === 'closed') {\n\t\t\t// stopChatLocally(peer, peer.id);\n\t\t} else if (this._pc.signalingState === 'stable') {\n\t\t\tthis._negotiating = false;\n\t\t\tif (this._isNegotiationNeeded) {\n\t\t\t\tthis._onNegotiationneeded();\n\t\t\t} else {\n\t\t\t\tthis._drainPendingStreams();\n\t\t\t\tthis._drainPendingMessages();\n\t\t\t}\n\t\t} else if (this._pc.signalingState === 'have-remote-offer') {\n\t\t\tthis._drainPendingRemoteIceCandidates();\n\t\t}\n\t}\n\n\t_onIceConnectionStateChange(event) {\n\t\tthis.logger.debug(`Ice connection state changed \"${event.currentTarget.iceConnectionState}\" \\nactioneeParticipantId ${this.actioneeParticipantId}`);\n\t\tthis._sendSignalingMessage(SocketEvents.Conference.ICE_CONNECTION_STATE_CHANGED, {\n\t\t\tconferenceId: this.conferenceId,\n\t\t\tparticipantId: this.participantId,\n\t\t\tactioneeParticipantId: this.actioneeParticipantId,\n\t\t\tstate: event.currentTarget.iceConnectionState,\n\t\t\tpeerConnection: this._pc,\n\t\t});\n\n\t\tif (event.currentTarget.iceConnectionState === 'closed' || event.currentTarget.iceConnectionState === 'failed') {\n\t\t\tconst error = new ErrorModule.P2PError(ErrorModule.errors.P2P_WEBRTC_UNKNOWN, 'ICE connection failed or closed.');\n\t\t\tthis._stop(error, true);\n\t\t} else if (event.currentTarget.iceConnectionState === 'connected' || event.currentTarget.iceConnectionState === 'completed') {\n\t\t\tthis._sendSignalingMessage(SocketEvents.Conference.TRACKS_ADDED, this._addedTrackIds);\n\t\t\tthis._addedTrackIds = [];\n\t\t\tthis._checkIceConnectionStateAndFireEvent();\n\t\t}\n\t}\n\n\t_onIceGatheringStateChange(event) {\n\t\tthis.logger.debug(`Ice Gathering state changed \"${event.currentTarget.iceGatheringState}\" \\nactioneeParticipantId ${this.actioneeParticipantId}`);\n\t\tthis._sendSignalingMessage(SocketEvents.Conference.ICE_GATHERING_STATE_CHANGED, {\n\t\t\tconferenceId: this.conferenceId,\n\t\t\tparticipantId: this.participantId,\n\t\t\tactioneeParticipantId: this.actioneeParticipantId,\n\t\t\tstate: event.currentTarget.iceGatheringState,\n\t\t\tpeerConnection: this._pc,\n\t\t});\n\t}\n\n\t_onDataChannelMessage(event) {\n\t\tconst message = JSON.parse(event.data);\n\t\tthis.logger.debug(`Data channel message received ${message.data}`);\n\t\tthis._sendSignalingMessage(SocketEvents.Conference.DATA_RECEIVED, message.id);\n\t\tconst messageEvent = new MessageEvent('messagereceived', {\n\t\t\tmessage: message.data,\n\t\t\torigin: this._remoteId,\n\t\t});\n\t\tthis.dispatchEvent(messageEvent);\n\t}\n\n\t_onDataChannelOpen(event) {\n\t\tthis.logger.debug('Data Channel is opened.');\n\t\tif (event.target.label === DataChannelLabel.MESSAGE) {\n\t\t\tthis.logger.debug('Data channel for messages is opened.');\n\t\t\tthis._drainPendingMessages();\n\t\t}\n\t}\n\n\t_onDataChannelClose(event) {\n\t\tthis.logger.debug('Data Channel is closed.');\n\t}\n\n\t_streamRemoved(stream) {\n\t\tif (!this._remoteStreamInfo.has(stream.mediaStream.id)) {\n\t\t\tthis.logger.warn('Cannot find stream info', { stream });\n\t\t}\n\t\tthis._sendSignalingMessage(SocketEvents.Conference.TRACKS_REMOVED, this._remoteStreamInfo.get(stream.mediaStream.id).trackIds);\n\t\tconst event = new OwtEvent('ended');\n\t\tstream.dispatchEvent(event);\n\t}\n\n\t_isUnifiedPlan() {\n\t\tif (Utils.isFirefox() && Utils.isChrome()) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t_createPeerConnection() {\n\t\tthis.logger.debug(`Creating new peer connection \\nactioneeParticipantId ${this._remoteId}`);\n\t\tconst pcConfiguration = this._config.rtcConfiguration || {};\n\t\tif (Utils.isChrome()) {\n\t\t\tpcConfiguration.sdpSemantics = 'unified-plan';\n\t\t}\n\t\tthis._pc = new RTCPeerConnection(pcConfiguration);\n\n\t\tthis.logger.debug(`Signaling state: ${this._pc.signalingState} \\nactioneeParticipantId ${this._remoteId}`);\n\t\tthis.logger.debug(`Connection state: ${this._pc.connectionState} \\nactioneeParticipantId ${this._remoteId}`);\n\t\tthis.logger.debug(`Ice connection state: ${this._pc.iceConnectionState} \\nactioneeParticipantId ${this._remoteId}`);\n\t\tthis.logger.debug(`Ice gathering state: ${this._pc.iceGatheringState} \\nactioneeParticipantId ${this._remoteId}`);\n\n\t\t// Firefox 59 implemented addTransceiver. However, mid in SDP will differ from track's ID in this case. And transceiver's mid is null.\n\t\tif (typeof this._pc.addTransceiver === 'function' && Utils.isSafari()) {\n\t\t\tthis._pc.addTransceiver('audio');\n\t\t\tthis._pc.addTransceiver('video');\n\t\t}\n\n\t\tthis._pc.ontrack = event => {\n\t\t\tthis._onRemoteTrackAdded.apply(this, [event]);\n\t\t};\n\t\tthis._pc.onicecandidate = event => {\n\t\t\tthis._onLocalIceCandidate.apply(this, [event]);\n\t\t};\n\t\tthis._pc.ondatachannel = event => {\n\t\t\tthis.logger.debug('On data channel.');\n\t\t\t// Save remote created data channel.\n\t\t\tif (!this._dataChannels.has(event.channel.label)) {\n\t\t\t\tthis._dataChannels.set(event.channel.label, event.channel);\n\t\t\t\tthis.logger.debug('Save remote created data channel.');\n\t\t\t}\n\t\t\tthis._bindEventsToDataChannel(event.channel);\n\t\t};\n\t\tthis._pc.onsignalingstatechange = event => {\n\t\t\tthis._onSignalingStateChange.apply(this, [event]);\n\t\t};\n\t\tthis._pc.oniceconnectionstatechange = event => {\n\t\t\tthis._onIceConnectionStateChange.apply(this, [event]);\n\t\t};\n\t\tthis._pc.onicegatheringstatechange = event => {\n\t\t\tthis._onIceGatheringStateChange.apply(this, [event]);\n\t\t};\n\t}\n\n\t_drainPendingStreams() {\n\t\tlet negotiationNeeded = false;\n\t\tthis.logger.debug(`Draining pending streams \\nactioneeParticipantId ${this.actioneeParticipantId}`);\n\t\tif (this._pc && (this._pc.signalingState === 'stable' || this._pc.signalingState === 'have-remote-offer')) {\n\t\t\tthis.logger.debug(`Peer connection is ready for draining pending streams \\nactioneeParticipantId ${this.actioneeParticipantId}`);\n\t\t\tfor (let i = 0; i < this._pendingStreams.length; i += 1) {\n\t\t\t\tconst stream = this._pendingStreams[i];\n\t\t\t\t// OnNegotiationNeeded event will be triggered immediately after adding stream to PeerConnection in Firefox.\n\t\t\t\t// And OnNegotiationNeeded handler will execute drainPendingStreams. To avoid add the same stream multiple times,\n\t\t\t\t// shift it from pending stream list before adding it to PeerConnection.\n\t\t\t\tthis._pendingStreams.shift();\n\t\t\t\tif (!stream.mediaStream) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tstream.mediaStream.getTracks().forEach(track => {\n\t\t\t\t\tthis._pc.addTrack(track, stream.mediaStream);\n\t\t\t\t\tif (this._pc.signalingState !== 'have-remote-offer') {\n\t\t\t\t\t\tnegotiationNeeded = true;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tthis.logger.debug(`Added stream to peer connection \\nactioneeParticipantId ${this.actioneeParticipantId}`);\n\t\t\t\tthis._publishingStreams.push(stream);\n\t\t\t}\n\t\t\tthis._pendingStreams.length = 0;\n\t\t\tfor (let j = 0; j < this._pendingUnpublishStreams.length; j += 1) {\n\t\t\t\tif (!this._pendingUnpublishStreams[j].mediaStream) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tthis._pc.removeStream(this._pendingUnpublishStreams[j].mediaStream);\n\t\t\t\tif (this._pc.signalingState !== 'have-remote-offer') {\n\t\t\t\t\tnegotiationNeeded = true;\n\t\t\t\t}\n\t\t\t\tthis._unpublishPromises.get(this._pendingUnpublishStreams[j].mediaStream.id).resolve();\n\t\t\t\tthis._publishedStreams.delete(this._pendingUnpublishStreams[j]);\n\t\t\t\tthis.logger.debug(`Remove stream \\nactioneeParticipantId ${this.actioneeParticipantId}`);\n\t\t\t}\n\t\t\tthis._pendingUnpublishStreams.length = 0;\n\t\t}\n\t\tif (negotiationNeeded) {\n\t\t\tthis._onNegotiationneeded();\n\t\t}\n\t}\n\n\t_drainPendingRemoteIceCandidates() {\n\t\tfor (let i = 0; i < this._remoteIceCandidates.length; i += 1) {\n\t\t\tthis.logger.debug(`Draining pending remote ice candidates \\nactioneeParticipantId ${this.actioneeParticipantId}`);\n\t\t\tthis._pc.addIceCandidate(this._remoteIceCandidates[i]).catch(error => {\n\t\t\t\tthis.logger.warn(`Error processing ICE candidate: ${error} \\nactioneeParticipantId ${this.actioneeParticipantId}`);\n\t\t\t});\n\t\t}\n\t\tthis._remoteIceCandidates.length = 0;\n\t}\n\n\t_drainPendingMessages() {\n\t\tthis.logger.debug(`Draining pending messages \\nactioneeParticipantId ${this.actioneeParticipantId}`);\n\t\tif (this._pendingMessages.length === 0) {\n\t\t\treturn;\n\t\t}\n\t\tconst dc = this._dataChannels.get(DataChannelLabel.MESSAGE);\n\t\tif (dc && dc.readyState === 'open') {\n\t\t\tfor (let i = 0; i < this._pendingMessages.length; i += 1) {\n\t\t\t\tthis.logger.debug(`Sending message via data channel: ${this._pendingMessages[i]}`);\n\t\t\t\tdc.send(JSON.stringify(this._pendingMessages[i]));\n\t\t\t}\n\t\t\tthis._pendingMessages.length = 0;\n\t\t} else if (this._pc && !dc) {\n\t\t\tthis._createDataChannel(DataChannelLabel.MESSAGE);\n\t\t}\n\t}\n\n\t_sendStreamInfo(stream, data) {\n\t\tif (!stream || !stream.mediaStream) {\n\t\t\treturn new ErrorModule.P2PError(ErrorModule.errors.P2P_CLIENT_ILLEGAL_ARGUMENT);\n\t\t}\n\t\tconst info = [];\n\t\tstream.mediaStream.getTracks().forEach(track => {\n\t\t\tinfo.push({\n\t\t\t\tid: track.id,\n\t\t\t\tsource: stream.source[track.kind],\n\t\t\t});\n\t\t});\n\n\t\tlet trackInfoData = {\n\t\t\tdata: info,\n\t\t\ttype: SocketEvents.Conference.ON_TRACK_SOURCES,\n\t\t\tparticipantId: data.participantId,\n\t\t\tconferenceId: data.conferenceId,\n\t\t};\n\n\t\tlet streamInfoData = {\n\t\t\tdata: {\n\t\t\t\tid: stream.mediaStream.id,\n\t\t\t\tsource: stream.source,\n\t\t\t\ttracks: Array.from(info, item => item.id),\n\t\t\t},\n\t\t\ttype: SocketEvents.Conference.ON_STREAM_INFO,\n\t\t\tparticipantId: data.participantId,\n\t\t\tconferenceId: data.conferenceId,\n\t\t};\n\t\treturn Promise.all([\n\t\t\tthis._sendSignalingMessage(SocketEvents.Conference.TRACK_SOURCES, trackInfoData),\n\t\t\tthis._sendSignalingMessage(SocketEvents.Conference.STREAM_INFO, streamInfoData),\n\t\t]);\n\t}\n\n\t_createStreamInfo(stream) {\n\t\tif (!stream || !stream.mediaStream) {\n\t\t\tthis.logger.error('Error while creating the stream info!', { stream });\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst tracks = stream.mediaStream.getTracks();\n\t\tconst streamInfoData = {\n\t\t\tid: stream.mediaStream.id,\n\t\t\tsource: stream.source,\n\t\t\ttracks: Array.from(tracks, item => item.id),\n\t\t};\n\t\treturn streamInfoData;\n\t}\n\n\t_sendSysInfoIfNecessary() {\n\t\tif (this._infoSent) {\n\t\t\treturn Promise.resolve();\n\t\t}\n\t\tthis._infoSent = true;\n\t\treturn this._sendSignalingMessage(SocketEvents.Conference.UA, sysInfo);\n\t}\n\n\t_sendClosedMsgIfNecessary() {\n\t\tif (this._pc.remoteDescription === null || this._pc.remoteDescription.sdp === '') {\n\t\t\treturn this._sendSignalingMessage(SocketEvents.Conference.CLOSED);\n\t\t}\n\t\treturn Promise.resolve();\n\t}\n\n\t_handleRemoteCapability(ua) {\n\t\tif (ua.sdk && ua.sdk && ua.sdk.type === 'JavaScript' && ua.runtime && ua.runtime.name === 'Firefox') {\n\t\t\tthis._remoteSideSupportsRemoveStream = false;\n\t\t\tthis._remoteSideSupportsPlanB = false;\n\t\t\tthis._remoteSideSupportsUnifiedPlan = true;\n\t\t} else {\n\t\t\t// Remote side is iOS/Android/C++ which uses Google's WebRTC stack.\n\t\t\tthis._remoteSideSupportsRemoveStream = true;\n\t\t\tthis._remoteSideSupportsPlanB = true;\n\t\t\tthis._remoteSideSupportsUnifiedPlan = false;\n\t\t}\n\t}\n\n\t_doNegotiate(offer, wsEvent) {\n\t\treturn this._createAndSendOffer(offer, wsEvent);\n\t}\n\n\t_setCodecOrder(sdp) {\n\t\tif (this._config.audioEncoding) {\n\t\t\tconst audioCodecNames = Array.from(this._config.audioEncoding, encodingParameters => encodingParameters.codec.name);\n\t\t\tsdp = SdpUtils.reorderCodecs(sdp, 'audio', audioCodecNames);\n\t\t}\n\t\tif (this._config.videoEncoding) {\n\t\t\tconst videoCodecNames = Array.from(this._config.videoEncoding, encodingParameters => encodingParameters.codec.name);\n\t\t\tsdp = SdpUtils.reorderCodecs(sdp, 'video', videoCodecNames);\n\t\t}\n\t\treturn sdp;\n\t}\n\n\t_setMinBitrate(sdp, options) {\n\t\tif (typeof options.videoEncoding === 'object') {\n\t\t\tsdp = SdpUtils.setMinBitrate(sdp, options.videoEncoding);\n\t\t}\n\t\treturn sdp;\n\t}\n\n\t_setMaxBitrate(sdp, options) {\n\t\tif (typeof options.audioEncoding === 'object') {\n\t\t\tsdp = SdpUtils.setMaxBitrate(sdp, options.audioEncodings);\n\t\t}\n\t\tif (typeof options.videoEncoding === 'object') {\n\t\t\tsdp = SdpUtils.setMaxBitrate(sdp, options.videoEncoding);\n\t\t}\n\t\treturn sdp;\n\t}\n\n\t_setStartBitrate(sdp, options) {\n\t\tif (typeof options.videoEncoding === 'object') {\n\t\t\tsdp = SdpUtils.setStartBitrate(sdp, options.videoEncoding);\n\t\t}\n\t\treturn sdp;\n\t}\n\n\t_setRtpSenderOptions(sdp, options) {\n\t\tsdp = this._setMinBitrate(sdp, options);\n\t\tsdp = this._setMaxBitrate(sdp, options);\n\t\tsdp = this._setStartBitrate(sdp, options);\n\t\treturn sdp;\n\t}\n\n\t_setRtpReceiverOptions(sdp) {\n\t\tsdp = this._setCodecOrder(sdp);\n\t\treturn sdp;\n\t}\n\n\t_createAndSendOffer(offer, wsEvent) {\n\t\tif (!this._pc) {\n\t\t\tthis.logger.error(`Peer connection has not been created \\nactioneeParticipantId ${this.actioneeParticipantId}`, { offer });\n\t\t\treturn undefined;\n\t\t}\n\t\tconst newOffer = { ...offer };\n\t\tthis._isNegotiationNeeded = false;\n\t\tthis._isCaller = true;\n\t\tconst iceRestart = newOffer.iceRestart || false;\n\t\tdelete newOffer.iceRestart;\n\t\tlet localDesc;\n\t\treturn this._pc\n\t\t\t.createOffer({\n\t\t\t\ticeRestart,\n\t\t\t})\n\t\t\t.then(desc => {\n\t\t\t\tdesc.sdp = this._setRtpReceiverOptions(desc.sdp);\n\t\t\t\tlocalDesc = desc;\n\t\t\t\tif (this._pc.signalingState === 'stable') {\n\t\t\t\t\tthis._offering = true;\n\t\t\t\t\treturn this._pc\n\t\t\t\t\t\t.setLocalDescription(desc)\n\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\tconst streamInfo = this._myStreamInfo.pop();\n\t\t\t\t\t\t\tObject.assign(newOffer, streamInfo && { streamInfo });\n\t\t\t\t\t\t\tObject.assign(newOffer, { sdp: localDesc });\n\t\t\t\t\t\t\tthis._sendSdp(newOffer, wsEvent || SocketEvents.Conference.SEND_OFFER);\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.finally(() => {\n\t\t\t\t\t\t\tthis._offering = false;\n\t\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t})\n\t\t\t.catch(e => {\n\t\t\t\tconst ignore = this._pc.signalingState === 'have-local-offer';\n\t\t\t\tthis.logger.error(`${e.message} Please check your codec settings \\nactioneeParticipantId ${this.actioneeParticipantId}`);\n\t\t\t\tconst error = new ErrorModule.P2PError(ErrorModule.errors.P2P_WEBRTC_SDP, e.message);\n\t\t\t\tthis.publishConferenceError(`${e.message}, ignored: ${ignore}`, '_createAndSendOffer', ConferenceErrorType.SDP_GENERATION_ERROR);\n\t\t\t\tif (ignore) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis._stop(error, true);\n\t\t\t});\n\t}\n\n\t_createAndSendAnswer() {\n\t\tthis._drainPendingStreams();\n\t\tthis._isNegotiationNeeded = false;\n\t\tthis._isCaller = false;\n\t\tlet localDesc;\n\t\tthis._pc\n\t\t\t.createAnswer()\n\t\t\t.then(desc => {\n\t\t\t\tdesc.sdp = this._setRtpReceiverOptions(desc.sdp);\n\t\t\t\tlocalDesc = desc;\n\t\t\t\tthis._logCurrentAndPendingLocalDescription();\n\t\t\t\treturn this._pc.setLocalDescription(desc);\n\t\t\t})\n\t\t\t.then(() => {\n\t\t\t\tconst { participantId, conferenceId, actioneeParticipantId } = this;\n\t\t\t\tconst answerPayload = {\n\t\t\t\t\tparticipantId,\n\t\t\t\t\tconferenceId,\n\t\t\t\t\tactioneeParticipantId,\n\t\t\t\t\tsdp: localDesc,\n\t\t\t\t};\n\t\t\t\tconst streamInfo = this._myStreamInfo.pop();\n\t\t\t\tObject.assign(answerPayload, streamInfo && { streamInfo });\n\t\t\t\treturn this._sendSdp(answerPayload, SocketEvents.Conference.SEND_ANSWER);\n\t\t\t})\n\t\t\t.catch(e => {\n\t\t\t\tthis.logger.error(`${e.message} Please check your codec settings \\nactioneeParticipantId ${this.actioneeParticipantId}`);\n\t\t\t\tconst error = new ErrorModule.P2PError(ErrorModule.errors.P2P_WEBRTC_SDP, e.message);\n\t\t\t\tthis.publishConferenceError(error.message, '_createAndSendAnswer', ConferenceErrorType.SDP_GENERATION_ERROR);\n\t\t\t\tthis._stop(error, true);\n\t\t\t});\n\t}\n\n\t_logCurrentAndPendingLocalDescription() {\n\t\tthis.logger.debug(`Current description \\nactioneeParticipantId ${this.actioneeParticipantId}`, this._pc.currentLocalDescription);\n\t\tthis.logger.debug(`Pending description \\nactioneeParticipantId ${this.actioneeParticipantId}`, this._pc.pendingLocalDescription);\n\t}\n\n\t_getAndDeleteTrackSourceInfo(tracks) {\n\t\tif (tracks.length > 0) {\n\t\t\tconst trackId = tracks[0].id;\n\t\t\tif (this._remoteTrackSourceInfo.has(trackId)) {\n\t\t\t\tconst sourceInfo = this._remoteTrackSourceInfo.get(trackId);\n\t\t\t\tthis._remoteTrackSourceInfo.delete(trackId);\n\t\t\t\treturn sourceInfo;\n\t\t\t}\n\n\t\t\tthis.logger.warn(`Cannot find source info for ${trackId}`);\n\t\t\treturn null;\n\t\t}\n\t}\n\n\t_unpublish(stream) {\n\t\tif (navigator.mozGetUserMedia || !this._remoteSideSupportsRemoveStream) {\n\t\t\t// Actually unpublish is supported. It is a little bit complex since Firefox implemented WebRTC spec while Chrome implemented an old API.\n\t\t\tthis.logger.error('Stopping a publication is not supported on Firefox. Please use P2PClient.stop() to stop the connection with remote endpoint.');\n\t\t\treturn Promise.reject(new ErrorModule.P2PError(ErrorModule.errors.P2P_CLIENT_UNSUPPORTED_METHOD));\n\t\t}\n\t\tif (!this._publishedStreams.has(stream)) {\n\t\t\treturn Promise.reject(new ErrorModule.P2PError(ErrorModule.errors.P2P_CLIENT_ILLEGAL_ARGUMENT));\n\t\t}\n\t\tthis._pendingUnpublishStreams.push(stream);\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis._unpublishPromises.set(stream.mediaStream.id, {\n\t\t\t\tresolve: resolve,\n\t\t\t\treject: reject,\n\t\t\t});\n\t\t\tthis._drainPendingStreams();\n\t\t});\n\t}\n\n\t// Make sure |_pc| is available before calling this method.\n\t_createDataChannel(label, offer, wsEvent) {\n\t\tif (this._dataChannels.has(label)) {\n\t\t\tthis.logger.warn(`Data channel labeled ${label} already exists.`);\n\t\t\treturn;\n\t\t}\n\t\tif (!this._pc) {\n\t\t\tthis.logger.debug('PeerConnection is not available before creating DataChannel.');\n\t\t\treturn;\n\t\t}\n\t\tthis.logger.debug('Create data channel.');\n\t\tconst dc = this._pc.createDataChannel(label);\n\t\tthis._bindEventsToDataChannel(dc);\n\t\tthis._dataChannels.set(DataChannelLabel.MESSAGE, dc);\n\t\tif (offer && wsEvent) {\n\t\t\tthis._onNegotiationneeded(offer, wsEvent);\n\t\t} else {\n\t\t\tthis._onNegotiationneeded();\n\t\t}\n\t}\n\n\t_bindEventsToDataChannel(dc) {\n\t\tdc.onmessage = event => {\n\t\t\tthis._onDataChannelMessage.apply(this, [event]);\n\t\t};\n\t\tdc.onopen = event => {\n\t\t\tthis._onDataChannelOpen.apply(this, [event]);\n\t\t};\n\t\tdc.onclose = event => {\n\t\t\tthis._onDataChannelClose.apply(this, [event]);\n\t\t};\n\t\tdc.onerror = error => {\n\t\t\tthis.logger.debug('Data Channel Error:', error);\n\t\t};\n\t}\n\n\t// Returns all MediaStreams it belongs to.\n\t_getStreamByTrack(mediaStreamTrack) {\n\t\tconst streams = [];\n\t\tfor (const [id, info] of this._remoteStreamInfo) {\n\t\t\tif (!info.stream || !info.stream.mediaStream) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor (const track of info.stream.mediaStream.getTracks()) {\n\t\t\t\tif (mediaStreamTrack === track) {\n\t\t\t\t\tstreams.push(info.stream.mediaStream);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn streams;\n\t}\n\n\t_areAllTracksEnded(mediaStream) {\n\t\tfor (const track of mediaStream.getTracks()) {\n\t\t\tif (track.readyState === 'live') {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\t_stop(error, notifyRemote) {\n\t\tlet promiseError = error;\n\t\tif (!promiseError) {\n\t\t\tpromiseError = new ErrorModule.P2PError(ErrorModule.errors.P2P_CLIENT_UNKNOWN);\n\t\t}\n\t\tfor (const [label, dc] of this._dataChannels) {\n\t\t\tdc.close();\n\t\t}\n\t\tthis._dataChannels.clear();\n\t\tif (this._pc && this._pc.iceConnectionState !== 'closed') {\n\t\t\tthis._pc.close();\n\t\t}\n\t\tfor (const [id, promise] of this._publishPromises) {\n\t\t\tpromise.reject(promiseError);\n\t\t}\n\t\tthis._publishPromises.clear();\n\t\tfor (const [id, promise] of this._unpublishPromises) {\n\t\t\tpromise.reject(promiseError);\n\t\t}\n\t\tthis._unpublishPromises.clear();\n\t\tfor (const [id, promise] of this._sendDataPromises) {\n\t\t\tpromise.reject(promiseError);\n\t\t}\n\t\tthis._sendDataPromises.clear();\n\t\t// Fire ended event if publication or remote stream exists.\n\t\tthis._publishedStreams.forEach(publication => {\n\t\t\tpublication.dispatchEvent(new OwtEvent('ended'));\n\t\t});\n\t\tthis._publishedStreams.clear();\n\t\tthis._remoteStreams.forEach(stream => {\n\t\t\tstream.dispatchEvent(new OwtEvent('ended'));\n\t\t});\n\t\tthis._remoteStreams = [];\n\t\tif (!this._disposed) {\n\t\t\tif (notifyRemote) {\n\t\t\t\tlet sendError;\n\t\t\t\tif (error) {\n\t\t\t\t\tsendError = JSON.parse(JSON.stringify(error));\n\t\t\t\t\t// Avoid to leak detailed error to remote side.\n\t\t\t\t\tsendError.message = 'Error happened at remote side.';\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.dispatchEvent(new Event('ended'));\n\t\t}\n\t}\n\n\t_setStreamToRemoteStreamInfo(mediaStream) {\n\t\tconst info = this._remoteStreamInfo.get(mediaStream.id);\n\t\tconst { attributes } = info;\n\t\tconst sourceInfo = new StreamModule.StreamSourceInfo(\n\t\t\tthis._remoteStreamInfo.get(mediaStream.id).source.audio,\n\t\t\tthis._remoteStreamInfo.get(mediaStream.id).source.video\n\t\t);\n\t\tinfo.stream = new StreamModule.RemoteStream(undefined, this._remoteId, mediaStream, sourceInfo, attributes);\n\t\tinfo.mediaStream = mediaStream;\n\t\tconst { stream } = info;\n\t\tif (stream) {\n\t\t\tthis._remoteStreams.push(stream);\n\t\t} else {\n\t\t\tthis.logger.warn('Failed to create RemoteStream', { mediaStream });\n\t\t}\n\t}\n\n\t_checkIceConnectionStateAndFireEvent() {\n\t\tif (this._pc.iceConnectionState === 'connected' || this._pc.iceConnectionState === 'completed') {\n\t\t\tfor (const [id, info] of this._remoteStreamInfo) {\n\t\t\t\t// Set _remoteStreamInfo.mediaStream and _remoteStreamInfo.stream if mediaStream exists on peer connection\n\t\t\t\t// but is null not set on _remoteStreamInfo\n\t\t\t\tconst pcRemoteStream = this._pc.getRemoteStreams().find(stream => stream.id === id);\n\t\t\t\tif (!info.mediaStream && pcRemoteStream) {\n\t\t\t\t\tthis._setStreamToRemoteStreamInfo(pcRemoteStream);\n\t\t\t\t}\n\t\t\t\tif (info.mediaStream) {\n\t\t\t\t\tconst streamEvent = new StreamModule.StreamEvent('streamadded', {\n\t\t\t\t\t\tstream: info.stream,\n\t\t\t\t\t});\n\t\t\t\t\tif (this._isUnifiedPlan()) {\n\t\t\t\t\t\tfor (const track of info.mediaStream.getTracks()) {\n\t\t\t\t\t\t\ttrack.addEventListener('ended', event => {\n\t\t\t\t\t\t\t\tconst mediaStreams = this._getStreamByTrack(event.target);\n\t\t\t\t\t\t\t\tfor (const mediaStream of mediaStreams) {\n\t\t\t\t\t\t\t\t\tif (this._areAllTracksEnded(mediaStream)) {\n\t\t\t\t\t\t\t\t\t\tthis._onRemoteStreamRemoved(mediaStream);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis._sendSignalingMessage(SocketEvents.Conference.TRACKS_ADDED, info.trackIds);\n\t\t\t\t\tthis._remoteStreamInfo.get(info.mediaStream.id).mediaStream = null;\n\t\t\t\t\tthis.dispatchEvent(streamEvent);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tgetRTCPeerConnection() {\n\t\treturn this._pc;\n\t}\n\n\taddStreamToPendingStreams(stream) {\n\t\tif (!stream) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._pendingStreams.push(stream);\n\t}\n\n\tsetMyStreamInfo(stream) {\n\t\tconst streamInfoData = this._createStreamInfo(stream);\n\t\tif (streamInfoData) {\n\t\t\tthis._myStreamInfo.push(streamInfoData);\n\t\t}\n\t}\n\n\tremoveTrackById = (trackId, offer) => {\n\t\tconst rtcPeerConnection = this.getRTCPeerConnection();\n\n\t\trtcPeerConnection.getSenders().forEach(sender => {\n\t\t\tconst { track } = sender;\n\t\t\tif (track && track.id === trackId) {\n\t\t\t\trtcPeerConnection.removeTrack(sender);\n\t\t\t\tthis._onNegotiationneeded(offer);\n\t\t\t}\n\t\t});\n\t};\n}\n\nexport default P2PPeerConnectionChannel;\n","// eslint-disable-next-line max-classes-per-file\nimport { APP_CONFIG } from 'constants/global-variables';\n\nexport class Offer {\n\tconstructor(actioneeParticipantId, callType, conferenceId, forScreenShare, isAudio, isVideo, isScreen, toScreenSharingSocket, participantId) {\n\t\tthis.actioneeParticipantId = actioneeParticipantId;\n\n\t\tthis.callType = callType;\n\n\t\tthis.conferenceId = conferenceId;\n\n\t\tthis.forScreenShare = forScreenShare;\n\n\t\tthis.isAudio = isAudio;\n\n\t\tthis.isVideo = isVideo;\n\n\t\tthis.isScreen = isScreen;\n\n\t\tthis.toScreenSharingSocket = toScreenSharingSocket;\n\n\t\tthis.participantId = participantId;\n\t}\n}\n\nexport class ConferenceInfo {\n\tconstructor(\n\t\tcallType,\n\t\tconferenceId,\n\t\tconferenceName,\n\t\tconversationId,\n\t\tfromUser,\n\t\tisAudio,\n\t\tisChat,\n\t\tisDirectToHello,\n\t\tisMeetingRoom,\n\t\tisMultiparty,\n\t\tisScreen,\n\t\tisVideo,\n\t\tparticipantId,\n\t\tparticipants,\n\t\tinputDevices,\n\t\tisSecurityCam = false,\n\t\tsource = 'WEB'\n\t) {\n\t\tthis.callType = callType;\n\n\t\tthis.conferenceId = conferenceId;\n\n\t\tthis.conferenceName = conferenceName;\n\n\t\tthis.conversationId = conversationId;\n\n\t\tthis.from = fromUser;\n\n\t\tthis.isAudio = isAudio;\n\n\t\tthis.isChat = isChat;\n\n\t\tthis.isDirectToHello = isDirectToHello;\n\n\t\tthis.isMeetingRoom = isMeetingRoom;\n\n\t\tthis.isMultiparty = isMultiparty;\n\n\t\tthis.isScreen = isScreen;\n\n\t\tthis.isVideo = isVideo;\n\n\t\tthis.participantId = participantId;\n\n\t\tthis.participants = participants;\n\n\t\tthis.inputDevices = inputDevices;\n\n\t\tthis.isSecurityCam = isSecurityCam;\n\n\t\tthis.source = source;\n\n\t\tthis.tenantId = APP_CONFIG.companyId;\n\t}\n}\n\nexport class FromUser {\n\tconstructor(name, jobTitle, picture, objectGuidId, friendlyUrl) {\n\t\tthis.name = name;\n\n\t\tthis.jobTitle = jobTitle;\n\n\t\tthis.picture = picture;\n\n\t\tthis.objectGuidId = objectGuidId;\n\n\t\tthis.friendlyUrl = friendlyUrl;\n\t}\n}\n\nexport class ConferenceParticipant {\n\tconstructor(objectId, objectType) {\n\t\tthis.objectId = objectId;\n\n\t\tthis.objectType = objectType;\n\t}\n}\n","// @ts-nocheck\n// Copyright (C) <2018> Intel Corporation\n//\n// SPDX-License-Identifier: Apache-2.0\n\n/* global Map, Promise */\nimport { EventDispatcher } from '../base/event.js';\nimport * as ErrorModule from './error.js';\nimport P2PPeerConnectionChannel from './peerconnection-channel.js';\nimport SocketEvents from '../../constants/socket-events';\nimport { Offer } from 'owt/base/conference.js';\n\nconst ConnectionState = {\n\tREADY: 1,\n\tCONNECTING: 2,\n\tCONNECTED: 3,\n};\n\n/* eslint-disable no-unused-vars */\n/**\n * @class P2PClientConfiguration\n * @classDesc Configuration for P2PClient.\n * @memberOf Owt.P2P\n * @hideconstructor\n */\nexport const P2PClientConfiguration = function() {\n\t/**\n\t * @member {?Array} audioEncoding\n\t * @instance\n\t * @desc Encoding parameters for publishing audio tracks.\n\t * @memberof Owt.P2P.P2PClientConfiguration\n\t */\n\tthis.audioEncoding = undefined;\n\t/**\n\t * @member {?Array} videoEncoding\n\t * @instance\n\t * @desc Encoding parameters for publishing video tracks.\n\t * @memberof Owt.P2P.P2PClientConfiguration\n\t */\n\tthis.videoEncoding = undefined;\n\t/**\n\t * @member {?RTCConfiguration} rtcConfiguration\n\t * @instance\n\t * @memberof Owt.P2P.P2PClientConfiguration\n\t * @desc It will be used for creating PeerConnection.\n\t * @see {@link https://www.w3.org/TR/webrtc/#rtcconfiguration-dictionary|RTCConfiguration Dictionary of WebRTC 1.0}.\n\t * @example\n\t * // Following object can be set to p2pClientConfiguration.rtcConfiguration.\n\t * {\n\t * iceServers: [{\n\t * urls: \"stun:example.com:3478\"\n\t * }, {\n\t * urls: [\n\t * \"turn:example.com:3478?transport=udp\",\n\t * \"turn:example.com:3478?transport=tcp\"\n\t * ],\n\t * credential: \"password\",\n\t * username: \"username\"\n\t * }\n\t * }\n\t */\n\tthis.rtcConfiguration = undefined;\n};\n/* eslint-enable no-unused-vars */\n\n/**\n * @class P2PClient\n * @classDesc The P2PClient handles PeerConnections between different clients.\n * Events:\n *\n * | Event Name | Argument Type | Fired when |\n * | --------------------- | ---------------- | ---------------- |\n * | streamadded | StreamEvent | A new stream is sent from remote endpoint. |\n * | messagereceived | MessageEvent | A new message is received. |\n * | socketdisconnected | OwtEvent | Disconnected from signaling server. |\n *\n * @memberof Owt.P2P\n * @extends Owt.Base.EventDispatcher\n * @constructor\n * @param {?Owt.P2P.P2PClientConfiguration } configuration Configuration for Owt.P2P.P2PClient.\n * @param {Object} signalingChannel A channel for sending and receiving signaling messages.\n */\n// @ts-ignore\nexport const P2PClient = function({ configuration, signalingChannel, onPeerConnectionCreated, logger }) {\n\tObject.setPrototypeOf(this, new EventDispatcher());\n\tconst config = configuration;\n\tconst signaling = signalingChannel;\n\t/** @type {Map} */\n\tconst channels = new Map(); // Map of PeerConnectionChannels.\n\tconst self = this;\n\tlet state = ConnectionState.CONNECTED; // ConnectionState.READY;\n\tlet myId;\n\tlet init;\n\n\tconst WsEvents = {\n\t\tON_CHAT_CLOSED: 'chat-closed',\n\t};\n\n\tsignaling.onMessage = function(origin, message) {\n\t\tswitch (message.type) {\n\t\t\tcase WsEvents.ON_CHAT_CLOSED:\n\t\t\t\tif (channels.has(origin)) {\n\t\t\t\t\tgetOrCreateChannel(origin).onMessage(message);\n\t\t\t\t\tchannels.delete(origin);\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif (self.allowedRemoteIds.indexOf(origin) >= 0) {\n\t\t\tgetOrCreateChannel(origin).onMessage(message);\n\t\t} else {\n\t\t\tsendSignalingMessage(WsEvents.ON_CHAT_CLOSED, ErrorModule.errors.P2P_CLIENT_DENIED);\n\t\t}\n\t};\n\n\t/**\n\t * @member {array} allowedRemoteIds\n\t * @memberof Owt.P2P.P2PClient\n\t * @instance\n\t * @desc Only allowed remote endpoint IDs are able to publish stream or send message to current endpoint. Removing an ID from allowedRemoteIds does stop existing connection with certain endpoint. Please call stop to stop the PeerConnection.\n\t */\n\tthis.allowedRemoteIds = [];\n\n\t/**\n\t * @function connect\n\t * @instance\n\t * @desc Connect to signaling server. Since signaling can be customized, this method does not define how a token looks like. SDK passes token to signaling channel without changes.\n\t * @memberof Owt.P2P.P2PClient\n\t * @param {string} token A token for connecting to signaling server. The format of this token depends on signaling server's requirement.\n\t * @return {Promise} It returns a promise resolved with an object returned by signaling channel once signaling channel reports connection has been established.\n\t */\n\tthis.connect = function(token) {\n\t\tif (state === ConnectionState.READY) {\n\t\t\tstate = ConnectionState.CONNECTING;\n\t\t} else {\n\t\t\tlogger.warn(`Invalid connection state: ${state}`);\n\t\t\treturn Promise.reject(new ErrorModule.P2PError(ErrorModule.errors.P2P_CLIENT_INVALID_STATE));\n\t\t}\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tsignaling.connect(token).then(\n\t\t\t\tid => {\n\t\t\t\t\tmyId = id;\n\t\t\t\t\tstate = ConnectionState.CONNECTED;\n\t\t\t\t\tresolve(myId);\n\t\t\t\t},\n\t\t\t\terrCode => {\n\t\t\t\t\treject(new ErrorModule.P2PError(ErrorModule.getErrorByCode(errCode)));\n\t\t\t\t}\n\t\t\t);\n\t\t});\n\t};\n\n\t/**\n\t * @function disconnect\n\t * @instance\n\t * @desc Disconnect from the signaling channel. It stops all existing sessions with remote endpoints.\n\t * @memberof Owt.P2P.P2PClient\n\t * @returns {Promise}\n\t */\n\tthis.disconnect = function() {\n\t\tif (state === ConnectionState.READY) {\n\t\t\treturn;\n\t\t}\n\t\tchannels.forEach(channel => {\n\t\t\tchannel.stop();\n\t\t});\n\t\tchannels.clear();\n\t\tsignaling.disconnect();\n\t};\n\n\t/**\n\t * @function publish\n\t * @instance\n\t * @desc Publish a stream to a remote endpoint.\n\t * @memberof Owt.P2P.P2PClient\n\t * @param {string} remoteId Remote endpoint's ID.\n\t * @param {Owt.Base.LocalStream} stream An Owt.Base.LocalStream to be published.\n\t * @param {Offer} offer A Conference.Offer to be sent to peer.\n\t * @param {boolean} reconnectingPublish boolean indicating this is a publish for reconnecting to participant\n\t * @return {Promise} A promised that resolves when remote side received the certain stream. However, remote endpoint may not display this stream, or ignore it.\n\t */\n\tthis.publish = function(remoteId, stream, offer, reconnectingPublish = false) {\n\t\tif (state !== ConnectionState.CONNECTED) {\n\t\t\treturn Promise.reject(new ErrorModule.P2PError(ErrorModule.errors.P2P_CLIENT_INVALID_STATE, 'P2P Client is not connected to signaling channel.'));\n\t\t}\n\t\tif (this.allowedRemoteIds.indexOf(remoteId) < 0) {\n\t\t\treturn Promise.reject(new ErrorModule.P2PError(ErrorModule.errors.P2P_CLIENT_NOT_ALLOWED));\n\t\t}\n\n\t\treturn Promise.resolve(getOrCreateChannel(remoteId).publish(stream, offer, reconnectingPublish));\n\t};\n\n\t/**\n\t * @function send\n\t * @instance\n\t * @desc Send a message to remote endpoint.\n\t * @memberof Owt.P2P.P2PClient\n\t * @param {string} remoteId Remote endpoint's ID.\n\t * @param {string} message Message to be sent. It should be a string.\n\t * @return {Promise} It returns a promise resolved when remote endpoint received certain message.\n\t */\n\tthis.send = function(remoteId, message, offer) {\n\t\tif (state !== ConnectionState.CONNECTED) {\n\t\t\treturn Promise.reject(new ErrorModule.P2PError(ErrorModule.errors.P2P_CLIENT_INVALID_STATE, 'P2P Client is not connected to signaling channel.'));\n\t\t}\n\t\tif (this.allowedRemoteIds.indexOf(remoteId) < 0) {\n\t\t\treturn Promise.reject(new ErrorModule.P2PError(ErrorModule.errors.P2P_CLIENT_NOT_ALLOWED));\n\t\t}\n\t\treturn Promise.resolve(getOrCreateChannel(remoteId).send(message, offer, SocketEvents.HelloDevice.DATA_CHANNEL_OFFER));\n\t};\n\n\t/**\n\t * @function stop\n\t * @instance\n\t * @desc Clean all resources associated with given remote endpoint.\n\t * It may include RTCPeerConnection, RTCRtpTransceiver and RTCDataChannel.\n\t * It still possible to publish a stream, or send a message to given remote endpoint after stop.\n\t * @memberof Owt.P2P.P2PClient\n\t * @param {string} remoteId Remote endpoint's ID.\n\t * @return {undefined}\n\t */\n\tthis.stop = function(remoteId) {\n\t\tif (!channels.has(remoteId)) {\n\t\t\tlogger.warn('No PeerConnection between current endpoint and specific remote endpoint.', { remoteId });\n\t\t\treturn;\n\t\t}\n\n\t\tchannels.get(remoteId).stop();\n\t\tchannels.delete(remoteId);\n\t\tconst index = this.allowedRemoteIds.findIndex(id => id === remoteId);\n\t\tthis.allowedRemoteIds.splice(index, 1);\n\t};\n\n\t/**\n\t * @function removeTrack\n\t * @instance\n\t * @desc Remove peer connection track by trackID\n\t * @memberof Owt.P2P.P2PClient\n\t * @param {string} remoteId Remote endpoint's ID.\n\t * @param {string} trackId Track ID.\n\t * @param {Offer} offer Offer to re-negotiate.\n\t * @return {undefined}\n\t */\n\tthis.removeTrack = function(remoteId, trackId, offer) {\n\t\tif (!channels.has(remoteId)) {\n\t\t\tlogger.warn('No PeerConnection between current endpoint and specific remote endpoint.', { remoteId });\n\t\t\treturn;\n\t\t}\n\n\t\tconst channel = channels.get(remoteId);\n\t\tchannel.removeTrackById(trackId, offer);\n\t};\n\n\t/**\n\t * @function getStats\n\t * @instance\n\t * @desc Get stats of underlying PeerConnection.\n\t * @memberof Owt.P2P.P2PClient\n\t * @param {string} remoteId Remote endpoint's ID.\n\t * @return {Promise} It returns a promise resolved with an RTCStatsReport or reject with an Error if there is no connection with specific user.\n\t */\n\tthis.getStats = function(remoteId) {\n\t\tif (!channels.has(remoteId)) {\n\t\t\treturn Promise.reject(\n\t\t\t\tnew ErrorModule.P2PError(ErrorModule.errors.P2P_CLIENT_INVALID_STATE, 'No PeerConnection between current endpoint and specific remote ' + 'endpoint.')\n\t\t\t);\n\t\t}\n\t\treturn channels.get(remoteId).getStats();\n\t};\n\n\tthis.sendMessageToSignaling = function(event, message) {\n\t\treturn sendSignalingMessage(event, message);\n\t};\n\n\tconst sendSignalingMessage = function(event, message) {\n\t\treturn signaling.send(event, message).catch(e => {\n\t\t\tif (typeof e === 'number') {\n\t\t\t\tthrow ErrorModule.getErrorByCode(e);\n\t\t\t}\n\t\t});\n\t};\n\n\tconst getOrCreateChannel = function(remoteId) {\n\t\tif (!channels.has(remoteId)) {\n\t\t\t// Construct an signaling sender/receiver for P2PPeerConnection.\n\t\t\tconst signalingForChannel = Object.create(EventDispatcher);\n\t\t\tsignalingForChannel.sendSignalingMessage = sendSignalingMessage;\n\n\t\t\tconst pcc = new P2PPeerConnectionChannel({\n\t\t\t\tconfig: config,\n\t\t\t\tlocalId: myId,\n\t\t\t\tremoteId: remoteId,\n\t\t\t\tsignaling: signalingForChannel,\n\t\t\t\tlogger,\n\t\t\t});\n\n\t\t\tif (typeof onPeerConnectionCreated === 'function') {\n\t\t\t\tconst peerConnObj = pcc.getRTCPeerConnection();\n\t\t\t\tif (peerConnObj !== null) {\n\t\t\t\t\tonPeerConnectionCreated(peerConnObj, remoteId);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpcc.addEventListener('streamadded', streamEvent => {\n\t\t\t\tself.dispatchEvent(streamEvent);\n\t\t\t});\n\t\t\tpcc.addEventListener('messagereceived', messageEvent => {\n\t\t\t\tself.dispatchEvent(messageEvent);\n\t\t\t});\n\t\t\tpcc.addEventListener('remoteDescriptionSet', ev => {\n\t\t\t\tself.dispatchEvent({ ...ev, origin: remoteId });\n\t\t\t});\n\t\t\tpcc.addEventListener('ended', () => {\n\t\t\t\tchannels.delete(remoteId);\n\t\t\t});\n\t\t\tchannels.set(remoteId, pcc);\n\t\t}\n\t\treturn channels.get(remoteId);\n\t};\n\n\tthis.getChannel = remoteId => {\n\t\tif (!remoteId) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn getOrCreateChannel(remoteId);\n\t};\n\n\tthis.hasPeerConnectionChannelForRemoteId = remoteId => {\n\t\treturn channels.has(remoteId);\n\t};\n};\n","// Copyright (C) <2018> Intel Corporation\n//\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @class AudioSourceInfo\n * @classDesc Source info about an audio track. Values: 'mic', 'screen-cast', 'file', 'mixed'.\n * @memberOf Owt.Base\n * @readonly\n * @enum {string}\n */\nexport const AudioSourceInfo = {\n\tMIC: 'mic',\n\tSCREENCAST: 'screen-cast',\n\tFILE: 'file',\n\tMIXED: 'mixed',\n};\n\n/**\n * @class VideoSourceInfo\n * @classDesc Source info about a video track. Values: 'camera', 'screen-cast', 'file', 'mixed'.\n * @memberOf Owt.Base\n * @readonly\n * @enum {string}\n */\nexport const VideoSourceInfo = {\n\tCAMERA: 'camera',\n\tSCREENCAST: 'screen-cast',\n\tFILE: 'file',\n\tMIXED: 'mixed',\n};\n\n/**\n * @class TrackKind\n * @classDesc Kind of a track. Values: 'audio' for audio track, 'video' for video track, 'av' for both audio and video tracks.\n * @memberOf Owt.Base\n * @readonly\n * @enum {string}\n */\nexport const TrackKind = {\n\t/**\n\t * Audio tracks.\n\t * @type string\n\t */\n\tAUDIO: 'audio',\n\t/**\n\t * Video tracks.\n\t * @type string\n\t */\n\tVIDEO: 'video',\n\t/**\n\t * Both audio and video tracks.\n\t * @type string\n\t */\n\tAUDIO_AND_VIDEO: 'av',\n};\n/**\n * @class Resolution\n * @memberOf Owt.Base\n * @classDesc The Resolution defines the size of a rectangle.\n * @constructor\n * @param {number} width\n * @param {number} height\n */\nexport class Resolution {\n\t// eslint-disable-next-line require-jsdoc\n\tconstructor(width, height) {\n\t\t/**\n\t\t * @member {number} width\n\t\t * @instance\n\t\t * @memberof Owt.Base.Resolution\n\t\t */\n\t\tthis.width = width;\n\t\t/**\n\t\t * @member {number} height\n\t\t * @instance\n\t\t * @memberof Owt.Base.Resolution\n\t\t */\n\t\tthis.height = height;\n\t}\n}\n","/* eslint-disable max-classes-per-file */\n// Copyright (C) <2018> Intel Corporation\n//\n// SPDX-License-Identifier: Apache-2.0\n\n/* global Promise, navigator */\n\nimport * as utils from './utils';\nimport * as MediaFormatModule from './mediaformat';\n\n/**\n * @class AudioTrackConstraints\n * @classDesc Constraints for creating an audio MediaStreamTrack.\n * @memberof Owt.Base\n * @constructor\n * @param {Owt.Base.AudioSourceInfo} source Source info of this audio track.\n */\nexport class AudioTrackConstraints {\n\t// eslint-disable-next-line require-jsdoc\n\tconstructor(source) {\n\t\tif (!Object.values(MediaFormatModule.AudioSourceInfo).some(v => v === source)) {\n\t\t\tthrow new TypeError('Invalid source.');\n\t\t}\n\t\t/**\n\t\t * @member {string} source\n\t\t * @memberof Owt.Base.AudioTrackConstraints\n\t\t * @desc Values could be \"mic\", \"screen-cast\", \"file\" or \"mixed\".\n\t\t * @instance\n\t\t */\n\t\tthis.source = source;\n\t\t/**\n\t\t * @member {string} deviceId\n\t\t * @memberof Owt.Base.AudioTrackConstraints\n\t\t * @desc Do not provide deviceId if source is not \"mic\".\n\t\t * @instance\n\t\t * @see https://w3c.github.io/mediacapture-main/#def-constraint-deviceId\n\t\t */\n\t\tthis.deviceId = undefined;\n\t}\n}\n\n/**\n * @class VideoTrackConstraints\n * @classDesc Constraints for creating a video MediaStreamTrack.\n * @memberof Owt.Base\n * @constructor\n * @param {Owt.Base.VideoSourceInfo} source Source info of this video track.\n */\nexport class VideoTrackConstraints {\n\t// eslint-disable-next-line require-jsdoc\n\tconstructor(source) {\n\t\tif (!Object.values(MediaFormatModule.VideoSourceInfo).some(v => v === source)) {\n\t\t\tthrow new TypeError('Invalid source.');\n\t\t}\n\t\t/**\n\t\t * @member {string} source\n\t\t * @memberof Owt.Base.VideoTrackConstraints\n\t\t * @desc Values could be \"camera\", \"screen-cast\", \"file\" or \"mixed\".\n\t\t * @instance\n\t\t */\n\t\tthis.source = source;\n\t\t/**\n\t\t * @member {string} deviceId\n\t\t * @memberof Owt.Base.VideoTrackConstraints\n\t\t * @desc Do not provide deviceId if source is not \"camera\".\n\t\t * @instance\n\t\t * @see https://w3c.github.io/mediacapture-main/#def-constraint-deviceId\n\t\t */\n\n\t\tthis.deviceId = undefined;\n\n\t\t/**\n\t\t * @member {Owt.Base.Resolution} resolution\n\t\t * @memberof Owt.Base.VideoTrackConstraints\n\t\t * @instance\n\t\t */\n\t\tthis.resolution = undefined;\n\n\t\t/**\n\t\t * @member {number} frameRate\n\t\t * @memberof Owt.Base.VideoTrackConstraints\n\t\t * @instance\n\t\t */\n\t\tthis.frameRate = undefined;\n\t}\n}\n/**\n * @class StreamConstraints\n * @classDesc Constraints for creating a MediaStream from screen mic and camera.\n * @memberof Owt.Base\n * @constructor\n * @param {?Owt.Base.AudioTrackConstraints} audioConstraints\n * @param {?Owt.Base.VideoTrackConstraints} videoConstraints\n */\nexport class StreamConstraints {\n\t// eslint-disable-next-line require-jsdoc\n\tconstructor(audioConstraints = false, videoConstraints = false) {\n\t\t/**\n\t\t * @member {Owt.Base.MediaStreamTrackDeviceConstraintsForAudio} audio\n\t\t * @memberof Owt.Base.MediaStreamDeviceConstraints\n\t\t * @instance\n\t\t */\n\t\tthis.audio = audioConstraints;\n\t\t/**\n\t\t * @member {Owt.Base.MediaStreamTrackDeviceConstraintsForVideo} Video\n\t\t * @memberof Owt.Base.MediaStreamDeviceConstraints\n\t\t * @instance\n\t\t */\n\t\tthis.video = videoConstraints;\n\t}\n}\n\n// eslint-disable-next-line require-jsdoc\nfunction isVideoConstrainsForScreenCast(constraints) {\n\treturn typeof constraints.video === 'object' && constraints.video.source === MediaFormatModule.VideoSourceInfo.SCREENCAST;\n}\n\n/**\n * @class MediaStreamFactory\n * @classDesc A factory to create MediaStream. You can also create MediaStream by yourself.\n * @memberof Owt.Base\n */\nexport class MediaStreamFactory {\n\t/**\n\t * @function createMediaStream\n\t * @static\n\t * @desc Create a MediaStream with given constraints. If you want to create a MediaStream for screen cast, please make sure both audio and video's source are \"screen-cast\".\n\t * @memberof Owt.Base.MediaStreamFactory\n\t * @returns {Promise} Return a promise that is resolved when stream is successfully created, or rejected if one of the following error happened:\n\t * - One or more parameters cannot be satisfied.\n\t * - Specified device is busy.\n\t * - Cannot obtain necessary permission or operation is canceled by user.\n\t * - Video source is screen cast, while audio source is not.\n\t * - Audio source is screen cast, while video source is disabled.\n\t * @param {Owt.Base.StreamConstraints} constraints\n\t */\n\tstatic createMediaStream(constraints) {\n\t\tif (typeof constraints !== 'object' || (!constraints.audio && !constraints.video)) {\n\t\t\treturn Promise.reject(new TypeError('Invalid constrains'));\n\t\t}\n\t\tif (\n\t\t\t!isVideoConstrainsForScreenCast(constraints) &&\n\t\t\ttypeof constraints.audio === 'object' &&\n\t\t\tconstraints.audio.source === MediaFormatModule.AudioSourceInfo.SCREENCAST\n\t\t) {\n\t\t\treturn Promise.reject(new TypeError('Cannot share screen without video.'));\n\t\t}\n\t\tif (isVideoConstrainsForScreenCast(constraints) && !utils.isChrome() && !utils.isFirefox()) {\n\t\t\treturn Promise.reject(new TypeError('Screen sharing only supports Chrome and Firefox.'));\n\t\t}\n\t\tif (\n\t\t\tisVideoConstrainsForScreenCast(constraints) &&\n\t\t\ttypeof constraints.audio === 'object' &&\n\t\t\tconstraints.audio.source !== MediaFormatModule.AudioSourceInfo.SCREENCAST\n\t\t) {\n\t\t\treturn Promise.reject(new TypeError('Cannot capture video from screen cast while capture audio from' + ' other source.'));\n\t\t}\n\n\t\t// Check and convert constraints.\n\t\tif (!constraints.audio && !constraints.video) {\n\t\t\treturn Promise.reject(new TypeError('At least one of audio and video must be requested.'));\n\t\t}\n\t\tconst mediaConstraints = Object.create({});\n\t\tif (typeof constraints.audio === 'object' && constraints.audio.source === MediaFormatModule.AudioSourceInfo.MIC) {\n\t\t\tmediaConstraints.audio = Object.create({});\n\t\t\tif (utils.isEdge()) {\n\t\t\t\tmediaConstraints.audio.deviceId = constraints.audio.deviceId;\n\t\t\t} else {\n\t\t\t\tmediaConstraints.audio.deviceId = {\n\t\t\t\t\texact: constraints.audio.deviceId,\n\t\t\t\t};\n\t\t\t}\n\t\t} else if (constraints.audio.source === MediaFormatModule.AudioSourceInfo.SCREENCAST) {\n\t\t\tmediaConstraints.audio = true;\n\t\t} else {\n\t\t\tmediaConstraints.audio = constraints.audio;\n\t\t}\n\n\t\tif (typeof constraints.video === 'object') {\n\t\t\tmediaConstraints.video = Object.create({});\n\t\t\tif (typeof constraints.video.frameRate === 'number') {\n\t\t\t\tmediaConstraints.video.frameRate = constraints.video.frameRate;\n\t\t\t}\n\t\t\tif (constraints.video.resolution && constraints.video.resolution.width && constraints.video.resolution.height) {\n\t\t\t\tif (constraints.video.source === MediaFormatModule.VideoSourceInfo.SCREENCAST) {\n\t\t\t\t\tmediaConstraints.video.width = constraints.video.resolution.width;\n\t\t\t\t\tmediaConstraints.video.height = constraints.video.resolution.height;\n\t\t\t\t} else {\n\t\t\t\t\tmediaConstraints.video.width = Object.create({});\n\t\t\t\t\tmediaConstraints.video.width.ideal = constraints.video.resolution.width;\n\t\t\t\t\tmediaConstraints.video.height = Object.create({});\n\t\t\t\t\tmediaConstraints.video.height.ideal = constraints.video.resolution.height;\n\t\t\t\t\tmediaConstraints.video.aspectRatio = Object.create({});\n\t\t\t\t\tmediaConstraints.video.aspectRatio.ideal = 1.7777777778;\n\t\t\t\t\tmediaConstraints.video.facingMode = Object.create({});\n\t\t\t\t\tmediaConstraints.video.facingMode.ideal = ['user'];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (typeof constraints.video.deviceId === 'string') {\n\t\t\t\tmediaConstraints.video.deviceId = { exact: constraints.video.deviceId };\n\t\t\t}\n\t\t\tif (utils.isFirefox() && constraints.video.source === MediaFormatModule.VideoSourceInfo.SCREENCAST) {\n\t\t\t\tmediaConstraints.video.mediaSource = 'screen';\n\t\t\t}\n\t\t} else {\n\t\t\tmediaConstraints.video = constraints.video;\n\t\t}\n\n\t\tif (isVideoConstrainsForScreenCast(constraints)) {\n\t\t\treturn navigator.mediaDevices.getDisplayMedia(mediaConstraints);\n\t\t}\n\n\t\treturn navigator.mediaDevices.getUserMedia(mediaConstraints);\n\t}\n}\n","/***\n * Used for saving the audio sound that it is playing and stopping it afterwards\n * */\nlet audio;\n\n/**\n * Method used to play a sound depending on audio url\n * @param {string} audioUrl the string url for the audio to be played\n * @param {Object} options\n * @param {boolean} options.muted used to mute or unmute the audio\n * @param {boolean} options.loop used to loop through the audio\n */\nexport const playSound = async (audioUrl, options) => {\n\tconst { muted, loop } = options;\n\taudio = new Audio(audioUrl);\n\n\taudio.muted = muted;\n\taudio.loop = loop;\n\taudio.currentTime = 0;\n\n\ttry {\n\t\tawait audio.play();\n\n\t\treturn audio;\n\t} catch (error) {\n\t\tconsole.log('Autoplay failed:', error);\n\t}\n};\n\n/**\n * Method used to stop a sound depending on audio object\n */\nexport const stopSound = () => {\n\tif (!!audio) {\n\t\taudio.pause();\n\t\taudio.currentTime = 0;\n\t}\n};\n\n/**\n * Method used to play a busy sound\n */\nexport const busySound = () => {\n\treturn playSound('https://static.solaborate.com/global/brand/calls/busy.mp3', { muted: false, loop: false });\n};\n\n/**\n * Method used to play a drop sound\n */\nexport const dropSound = () => {\n\treturn playSound('https://static.solaborate.com/global/brand/calls/call_drop.mp3', { muted: false, loop: false });\n};\n\n/**\n * Method used to play the incoming call sound eg. when receiving a call\n */\nexport const incomingCallSound = () => {\n\treturn playSound('https://static.solaborate.com/global/brand/calls/ring.mp3', { muted: false, loop: true });\n};\n\n/**\n * Method used to play the outgoing call sound eg. when calling someone\n */\nexport const outGoingCallSound = () => {\n\treturn playSound('https://static.solaborate.com/global/brand/calls/call_ringing.mp3', { muted: false, loop: true });\n};\n\n/**\n * Method used to stop the incoming call sound eg. when user answeres the call\n */\nexport const stopIncomingCallSound = () => {\n\tstopSound();\n};\n\n/**\n * Method used to stop the outgoing call sound eg. when user answeres the call\n */\nexport const stopOutgoingCallSound = () => {\n\tstopSound();\n};\n","import { gatewayApi } from '../constants/global-variables';\n\nexport async function getIceServers() {\n\ttry {\n\t\tconst { data } = await gatewayApi.get(`/v1/ice-server?provider=twilio`);\n\t\tif (data.hasSucceeded && data.result !== null) {\n\t\t\treturn prepareICEList(data.result.iceServers);\n\t\t}\n\t} catch (error) {\n\t\tconsole.warn('Failed to get ice servers!', error);\n\t}\n}\n\nfunction prepareICEList(iceServers) {\n\t// example:\n\t// iceServers: [{\n\t// urls: [\n\t// 'turn:global.turn.twilio.com:3478?transport=udp',\n\t// 'turn:global.turn.twilio.com:3478?transport=tcp',\n\t// 'turn:global.turn.twilio.com:443?transport=tcp'\n\t// ],\n\t// username: \"3d7f3e4fafba9b1ab42bb9644ac9f33ce98fc99575bbcd5d56d643d491889488\",\n\t// credential: \"ybTn5WxASjj7saN7aKRK8bOug/tiH8RITApVCIgwVL8=\",\n\t// },\n\t// {\n\t// urls: [\"stun:global.stun.twilio.com:3478?transport=udp\"]\n\t// }]\n\treturn iceServers.map(server => {\n\t\tserver.urls = server.urls.map(url => `${server.type}:${url}`);\n\t\tconst { id, isDeleted, type, ...returnServer } = server;\n\n\t\tif (returnServer.password) {\n\t\t\treturnServer.credential = returnServer.password;\n\t\t\tdelete returnServer.password;\n\t\t}\n\t\treturn returnServer;\n\t});\n}\n","import { gatewayApi } from 'constants/global-variables';\n\n// eslint-disable-next-line import/prefer-default-export\nexport async function sendStats(data, retries = 5) {\n\treturn new Promise((res, rej) => {\n\t\tconst url = `v1/callmetrics`;\n\t\tgatewayApi\n\t\t\t.post(url, data)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => {\n\t\t\t\tconsole.error('error while sending call stats logs', e);\n\t\t\t\tif (retries > 0) {\n\t\t\t\t\tsendStats(data, retries - 1);\n\t\t\t\t}\n\t\t\t\trej(e);\n\t\t\t});\n\t});\n}\n","import { sendStats } from 'api/callStats';\n\nclass CallStats {\n\tconstructor() {\n\t\tthis.outgoingMetricsBuffer = [];\n\t\tthis.flushInterval = 30000; // ms\n\t\t// this.batchSize = 10;\n\t}\n\n\taddPeerConnection = async ({ pcObject, pushInterval, conferenceId, participantId, remoteParticipantId, userId }) => {\n\t\tthis.startSendingStats();\n\n\t\tconst getStatsInterval = setInterval(async () => {\n\t\t\tif (pcObject.connectionState === 'closed') {\n\t\t\t\tthis.removePeerConnection(getStatsInterval);\n\t\t\t\tthis.stop();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst stats = await pcObject.getStats();\n\n\t\t\tthis.pushStats({ stats, conferenceId, participantId, remoteParticipantId, userId });\n\t\t}, pushInterval);\n\t};\n\n\tstop = () => {\n\t\t// Send the remaining stats\n\t\tthis.sendStats();\n\t};\n\n\tremovePeerConnection = getStatsInterval => {\n\t\tclearInterval(getStatsInterval);\n\t};\n\n\tstartSendingStats = () => {\n\t\tsetTimeout(this.sendStats, this.flushInterval);\n\t};\n\n\tsendStats = async () => {\n\t\tif (this.outgoingMetricsBuffer.length === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst batch = this.prepareBatch();\n\n\t\ttry {\n\t\t\tawait sendStats(batch);\n\t\t} catch (ex) {\n\t\t\tconsole.error('error while sending call stats logs', ex);\n\t\t} finally {\n\t\t\tsetTimeout(this.sendStats, this.flushInterval);\n\t\t}\n\t};\n\n\tprepareBatch = () => {\n\t\tconst batchSize = this.outgoingMetricsBuffer.length;\n\t\treturn {\n\t\t\tdata: { values: this.outgoingMetricsBuffer.splice(0, batchSize) },\n\t\t};\n\t};\n\n\tpushStats = ({ stats, conferenceId, participantId, remoteParticipantId, userId }) => {\n\t\tlet result = [];\n\n\t\tstats.forEach(report => {\n\t\t\tif (report.type === 'certificate') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tresult.push(report);\n\t\t});\n\n\t\tthis.outgoingMetricsBuffer.push({\n\t\t\tconferenceId: conferenceId,\n\t\t\tuserId: userId,\n\t\t\tparticipantId: participantId,\n\t\t\tremoteParticipantId: remoteParticipantId,\n\t\t\ttimeStamp: this.generateTimeStamp(),\n\t\t\tstats: result,\n\t\t});\n\t};\n\n\tgenerateTimeStamp = () => {\n\t\treturn Math.round(new Date().getTime());\n\t};\n}\n\nexport default CallStats;\n","import { ApplicationInsights } from '@microsoft/applicationinsights-web';\nimport { ReactPlugin } from '@microsoft/applicationinsights-react-js';\nimport { ClickAnalyticsPlugin } from '@microsoft/applicationinsights-clickanalytics-js';\n\nconst clickPluginInstance = new ClickAnalyticsPlugin();\nconst clickPluginConfig = {\n\tdataTags: {\n\t\tcustomDataPrefix: 'data-custom-',\n\t\taiBlobAttributeTag: 'customblob',\n\t\tparentDataTag: 'parent-group',\n\t\tdonotTrackDataTag: 'dnt',\n\t\tcaptureAllMetaDataContent: true,\n\t\tuseDefaultContentNameOrId: true,\n\t},\n\tdefaultRightClickBhvr: 'rc',\n};\n\nconst reactPlugin = new ReactPlugin();\n\nconst appInsights = new ApplicationInsights({\n\tconfig: {\n\t\tmaxBatchInterval: 0,\n\t\tdisableFetchTracking: false,\n\t\textensions: [reactPlugin, clickPluginInstance],\n\t\textensionConfig: {\n\t\t\t[clickPluginInstance.identifier]: clickPluginConfig,\n\t\t},\n\t},\n});\n\nconst createTelemetryService = () => {\n\t/**\n\t * Initialize the Application Insights class\n\t * @param {string} instrumentationKey - Application Insights Instrumentation Key\n\t * @param {Object} browserHistory - client's browser history, supplied by the withRouter HOC\n\t * @return {void}\n\t */\n\tconst initialize = (instrumentationKey, browserHistory) => {\n\t\tif (!browserHistory) {\n\t\t\tthrow new Error('Could not initialize Telemetry Service');\n\t\t}\n\t\tif (!instrumentationKey) {\n\t\t\tthrow new Error('Instrumentation key not provided in ./src/telemetry-provider.jsx');\n\t\t}\n\n\t\tappInsights.config.instrumentationKey = instrumentationKey;\n\t\tappInsights.config.extensionConfig = {\n\t\t\t...appInsights.config.extensionConfig,\n\t\t\t[reactPlugin.identifier]: {\n\t\t\t\thistory: browserHistory,\n\t\t\t},\n\t\t};\n\n\t\tappInsights.loadAppInsights();\n\n\t\tconst telemetryInitializer = envelope => {\n\t\t\tconst { tags } = envelope;\n\t\t\ttags['ai.cloud.role'] = 'banyan.web';\n\t\t};\n\t\tappInsights.addTelemetryInitializer(telemetryInitializer);\n\t};\n\n\treturn { reactPlugin, appInsights, initialize };\n};\n\nexport const ai = createTelemetryService();\nexport const getAppInsights = () => appInsights;\n","/* eslint-disable no-console */\nimport { APP_CONFIG } from 'constants/global-variables';\n\nclass Logger {\n\t/**\n\t * @param {object} data\n\t * @param {string} data.name\n\t * @param {import('@microsoft/applicationinsights-web').ApplicationInsights} data.appInsights\n\t */\n\tconstructor({ name, appInsights }) {\n\t\tthis.name = name;\n\t\tthis.appInsights = appInsights;\n\n\t\tthis.conferenceData = null;\n\t\tthis.sendCallClientLogs = APP_CONFIG.sendCallClientLogs === 'true';\n\t\tthis.printConsole = APP_CONFIG.isDevelopment || !this.sendCallClientLogs;\n\t}\n\n\t/**\n\t * @param {{ conferenceId?: string; participantId?: string; }} data\n\t */\n\tsetConferenceData(data) {\n\t\tthis.conferenceData = {\n\t\t\t...this.conferenceData,\n\t\t\t...data,\n\t\t};\n\t}\n\n\t/**\n\t * @param {'log' | 'info' | 'debug' | 'warn'} type\n\t * @param {string} message\n\t * @param {...any} rest\n\t */\n\tconsoleMethod = (type, message, ...rest) => {\n\t\tconst args = rest.filter(val => val !== undefined);\n\n\t\tif (this.appInsights?.appInsights?.isInitialized() && this.sendCallClientLogs) {\n\t\t\tthis.appInsights.trackEvent({ name: this.name, properties: { type, message, args, ...(this.conferenceData ? this.conferenceData : null) } });\n\t\t}\n\t\tif (this.printConsole) {\n\t\t\tconsole[type](message, ...args);\n\t\t}\n\t};\n\n\tlog(message, ...rest) {\n\t\tthis.consoleMethod('log', message, ...rest);\n\t}\n\n\tinfo(message, ...rest) {\n\t\tthis.consoleMethod('info', message, ...rest);\n\t}\n\n\tdebug(message, ...rest) {\n\t\tthis.consoleMethod('debug', message, ...rest);\n\t}\n\n\twarn(message, ...rest) {\n\t\tthis.consoleMethod('warn', message, ...rest);\n\t}\n\n\terror = (message, ...rest) => {\n\t\tconst args = rest.filter(val => val !== undefined);\n\n\t\tif (this.appInsights?.appInsights?.isInitialized()) {\n\t\t\tthis.appInsights.trackException({\n\t\t\t\texception: new Error(message),\n\t\t\t\tproperties: { name: this.name, message, args, ...(this.conferenceData ? this.conferenceData : null) },\n\t\t\t});\n\t\t}\n\t\tif (this.printConsole) {\n\t\t\tconsole.error(message, ...args);\n\t\t}\n\t};\n}\n\nexport default Logger;\n","import Emitter from 'owt/p2p/Emitter';\nimport SignalingChannel from 'owt/p2p/sc.websocket';\nimport { P2PClient, P2PClientConfiguration } from 'owt/p2p/p2pclient';\nimport { Offer, FromUser } from 'owt/base/conference';\nimport { LocalStream, StreamSourceInfo } from 'owt/base/stream';\nimport { AudioTrackConstraints, MediaStreamFactory, StreamConstraints, VideoTrackConstraints } from 'owt/base/mediastream-factory';\nimport { AudioSourceInfo, VideoSourceInfo } from 'owt/base/mediaformat';\nimport SocketEvents from 'constants/socket-events';\nimport {\n\tCallTypes,\n\tParticipantState,\n\tStreamError,\n\tConferenceEndReason,\n\tSocketState,\n\tRTCPeerConnectionEnum,\n\tDeviceCommands,\n\tJoinConferenceFailureReasonEnum,\n\tParticipantRemoveReason,\n\tTerminateRequestFailureReasonEnum,\n\tAudioOutputDevice,\n\tStreamTypes,\n\tObjectType,\n\tToggleFailureReasonEnum,\n\tStartConferenceFailureReason,\n} from 'constants/enums';\nimport { getIceServers } from 'api/iceServers';\nimport { busySound, dropSound, outGoingCallSound, stopOutgoingCallSound } from 'components/CallSounds';\nimport CallStats from 'infrastructure/callStats/callStats';\nimport { getUserProfile } from 'infrastructure/auth';\nimport { ai } from 'infrastructure/helpers/appInsightsTelemetry';\nimport Logger from 'owt/p2p/logger';\n\nclass CallManager extends Emitter {\n\tconstructor(socket, options) {\n\t\tsuper();\n\n\t\tthis.participants = {};\n\t\tthis.socket = socket;\n\t\tthis.p2p = null;\n\t\tthis.outGoingCallTimer = {};\n\t\tthis._callStats = new CallStats();\n\t\tthis._useCallStats = options.useCallStats;\n\t\tthis._sendCallStatsInterval = options.sendCallStatsInterval;\n\t\tthis.reconnectTimer = null;\n\t\tthis.cameraEventInProgress = false;\n\t\tthis.cameraEventTimeout = null;\n\t\tthis.endingCall = false;\n\t\tthis.callStartedOrJoined = false;\n\t\tthis.socketAuthorizationPromise = new Promise(resolve => {\n\t\t\tthis.socketAuthorizationResolve = resolve;\n\t\t});\n\t\tthis.socketListeners = {};\n\n\t\tthis.reAddToMonitoringIntervals = new Map();\n\t\tthis.logger = new Logger({ name: 'CallLogs', appInsights: ai.appInsights });\n\t\tthis.deniedParticipant = {};\n\t}\n\n\tbindOn = (event, callback) => {\n\t\tconst eventCallback = data => {\n\t\t\tthis.logger.debug(`WS:ON:${event}`, { socketId: this.socket.id }, data);\n\t\t\tcallback(data);\n\t\t};\n\t\tthis.socketListeners[event] = eventCallback;\n\t\tthis.socket.on(event, eventCallback);\n\t\treturn this;\n\t};\n\n\tunbindTimeouts = () => {\n\t\tif (this.cameraEventTimeout) {\n\t\t\tclearTimeout(this.cameraEventTimeout);\n\t\t}\n\t};\n\n\t/**\n\t * Method to send payload to signaling to invite new device\n\t * @typedef InviteResponse\n\t * @property {string} id\n\t * @property {string} name\n\t * @property {number} objectId\n\t * @property {number} objectType\n\t * @property {string} reason\n\t * @param {Object} data\n\t * @param {Object} data.participant\n\t * @param {number} data.participant.objectId\n\t * @param {number} data.participant.objectType\n\t * @param {String} data.conferenceId\n\t * @param {String} data.participantId\n\t * @return {Promise<{failedInvitationToParticipants: InviteResponse[]}>}\n\t */\n\taddDeviceToMonitoring = async data => {\n\t\tconst inviteParticipantPayload = {\n\t\t\tparticipants: [data.participant],\n\t\t\tconferenceId: data.conferenceId,\n\t\t\tparticipantId: data.participantId,\n\t\t};\n\n\t\tthis.startOutGoingCallTimerForParticipant({\n\t\t\tobjectId: data.participant.objectId,\n\t\t});\n\n\t\treturn this.p2p.sendMessageToSignaling(SocketEvents.Conference.INVITE_PARTICIPANTS, inviteParticipantPayload);\n\t};\n\n\tremoveDeviceFromMonitoring = async ({ conferenceId, participantId, actioneeParticipantId }) => {\n\t\tconst actioneeParticipant = this.getParticipantByParticipantId(actioneeParticipantId);\n\t\tif (actioneeParticipant) {\n\t\t\tthis.clearMonitoringReAddInterval(actioneeParticipant.objectId);\n\t\t\tdelete this.participants[actioneeParticipant.objectId];\n\t\t\tthis.p2p.sendMessageToSignaling(SocketEvents.Conference.REMOVE_PARTICIPANT, {\n\t\t\t\tconferenceId,\n\t\t\t\tparticipantId,\n\t\t\t\tactioneeParticipantId,\n\t\t\t});\n\n\t\t\tconst hasPeerConnectionChannelForRemoteId = this.p2p.hasPeerConnectionChannelForRemoteId(actioneeParticipantId);\n\t\t\tif (hasPeerConnectionChannelForRemoteId) {\n\t\t\t\tthis.p2p.stop(actioneeParticipantId);\n\t\t\t}\n\t\t}\n\t};\n\n\tclearMonitoringReAddInterval = objectId => {\n\t\tconst reAddInterval = this.reAddToMonitoringIntervals.get(objectId);\n\t\tif (reAddInterval) {\n\t\t\tclearInterval(reAddInterval);\n\t\t\tthis.reAddToMonitoringIntervals.delete(objectId);\n\t\t}\n\t};\n\n\tstartMonitoring = async startConferenceInfo => {\n\t\tthis.conferenceInfo = startConferenceInfo;\n\n\t\tthis.logger.setConferenceData({\n\t\t\tconferenceId: this.conferenceInfo.conferenceId,\n\t\t\tparticipantId: this.conferenceInfo.participantId,\n\t\t});\n\n\t\tawait this.setP2pClient();\n\n\t\tthis.startOutGoingCallTimerForParticipant({\n\t\t\tobjectId: startConferenceInfo.participants[0].objectId,\n\t\t});\n\n\t\tconst data = await this.p2p.sendMessageToSignaling(SocketEvents.Conference.START, startConferenceInfo);\n\t\tif (data.hasActiveConference) {\n\t\t\tthis.emit('end-call', { hasActiveConference: true });\n\t\t\tthis.clearManager();\n\t\t\treturn;\n\t\t}\n\n\t\tif (!data.ok && data.failureReason === StartConferenceFailureReason.GET_INITIATOR_INFO_FAILED) {\n\t\t\tthis.emit('end-call', { endReason: ConferenceEndReason.FAILED_TO_GET_INITIATOR_INFO });\n\t\t\tthis.clearManager();\n\t\t\treturn;\n\t\t}\n\n\t\t// if monitoring fails to start because of denied invitation\n\t\t// reset the value in order to be able to add other feeds\n\t\tif (Object.entries(this.deniedParticipant).length > 0) {\n\t\t\tthis.deniedParticipant = {};\n\t\t\treturn;\n\t\t}\n\n\t\tthis.callStartedOrJoined = true;\n\t\tthis.endingCall = false;\n\t\tthis.emit('call-started', { conferenceInfo: startConferenceInfo, failedInvites: data.failedInvitationToParticipants });\n\t};\n\n\tsetP2pClient = async () => {\n\t\tif (this.p2p) {\n\t\t\treturn;\n\t\t}\n\t\tconst iceServers = await getIceServers();\n\t\tif (!iceServers) return;\n\t\tconst p2pClientConfiguration = Object.assign(new P2PClientConfiguration(), {\n\t\t\t// videoEncoding: [\n\t\t\t// new VideoEncodingParameters(new VideoCodecParameters(VideoCodec.H264)),\n\t\t\t// new VideoEncodingParameters(new VideoCodecParameters(VideoCodec.VP8)),\n\t\t\t// ],\n\t\t\trtcConfiguration: { iceServers },\n\t\t});\n\n\t\tthis.p2p = new P2PClient({\n\t\t\tconfiguration: p2pClientConfiguration,\n\t\t\tsignalingChannel: new SignalingChannel(this.socket, this.logger),\n\t\t\tonPeerConnectionCreated: this.onPeerConnectionCreated,\n\t\t\tlogger: this.logger,\n\t\t});\n\n\t\tthis.bindP2pEvents();\n\t};\n\n\tstartConference = async startConferenceInfo => {\n\t\tawait this.socketAuthorizationPromise;\n\n\t\tthis.conferenceInfo = startConferenceInfo;\n\n\t\tthis.logger.setConferenceData({\n\t\t\tconferenceId: this.conferenceInfo.conferenceId,\n\t\t\tparticipantId: this.conferenceInfo.participantId,\n\t\t});\n\n\t\tawait this.setP2pClient();\n\n\t\tlet { isAudio, isVideo, isScreen, callType } = startConferenceInfo;\n\t\t// manually changed isAudio and isVideo to false\n\t\t// because the conference in patient view(securitycam) starts with isAudio and isVideo -> true\n\t\tif (callType === CallTypes.SECURITYCAM) {\n\t\t\tisAudio = false;\n\t\t\tisVideo = false;\n\t\t}\n\t\tawait this.initMediaStream(isAudio, isVideo, isScreen);\n\t\tthis.setTrackIdsInConferenceInfo({\n\t\t\tisAudio,\n\t\t\tisVideo,\n\t\t\tisScreen,\n\t\t});\n\n\t\tthis.startOutGoingCallTimerForParticipant({\n\t\t\tobjectId: startConferenceInfo.participants[0].objectId,\n\t\t});\n\n\t\tconst data = await this.p2p.sendMessageToSignaling(SocketEvents.Conference.START, startConferenceInfo);\n\n\t\tif (data.hasActiveConference) {\n\t\t\tthis.emit('end-call', { hasActiveConference: true });\n\t\t\tthis.clearManager();\n\t\t\tthis.closeSocket();\n\t\t\treturn;\n\t\t}\n\n\t\tif (!data.ok && data.failureReason === StartConferenceFailureReason.GET_INITIATOR_INFO_FAILED) {\n\t\t\tthis.emit('end-call', { endReason: ConferenceEndReason.FAILED_TO_GET_INITIATOR_INFO });\n\t\t\tthis.clearManager();\n\t\t\tthis.closeSocket();\n\t\t\treturn;\n\t\t}\n\n\t\tthis.callStartedOrJoined = true;\n\t\tthis.callerParticipantId = data.participants[0].id;\n\t\tthis.p2p.allowedRemoteIds = [data.participants[0].id];\n\t\tthis.endingCall = false;\n\t\tthis.emit('call-started', {\n\t\t\tconferenceId: startConferenceInfo.conferenceId,\n\t\t\tparticipantId: startConferenceInfo.participantId,\n\t\t\thelloDeviceName: data.participants[0].name,\n\t\t});\n\t};\n\n\tsetTrackIdsInConferenceInfo = ({ isAudio, isVideo, isScreen }) => {\n\t\tif (isAudio && this.localSrc) {\n\t\t\tthis.conferenceInfo.audioTrackId = this.localSrc.mediaStream.getAudioTracks()[0].id;\n\t\t}\n\t\tif (isVideo && this.localSrc) {\n\t\t\tthis.conferenceInfo.videoTrackId = this.localSrc.mediaStream.getVideoTracks()[0].id;\n\t\t}\n\t\tif (isScreen && this.localScreenSrc) {\n\t\t\tthis.conferenceInfo.screenTrackId = this.localScreenSrc.mediaStream.getVideoTracks()[0].id;\n\t\t}\n\t};\n\n\tjoinConference = async joinConferenceInfo => {\n\t\tawait this.socketAuthorizationPromise;\n\n\t\tthis.conferenceInfo = joinConferenceInfo;\n\n\t\tthis.logger.setConferenceData({\n\t\t\tconferenceId: this.conferenceInfo.conferenceId,\n\t\t\tparticipantId: this.conferenceInfo.participantId,\n\t\t});\n\n\t\tawait this.setP2pClient();\n\t\t// joining a conference will be an audio call\n\t\t// change should be here if use case changes\n\t\tawait this.initMediaStream(true, false, false);\n\t\tthis.localSrc.mediaStream.getTracks().forEach(track => this.bindOnTrackEndedEventListener(track, this.conferenceInfo.from.id));\n\n\t\tthis.setTrackIdsInConferenceInfo({\n\t\t\tisAudio: true,\n\t\t\tisVideo: false,\n\t\t\tisScreen: false,\n\t\t});\n\t\tthis.emit('audio-call', { audioStream: this.localSrc });\n\n\t\tthis.participants[this.conferenceInfo.from.objectId] = this.conferenceInfo.from;\n\t\tthis.p2p.allowedRemoteIds.push(this.conferenceInfo.from.id);\n\t\tconst p2pChannel = this.p2p.getChannel(this.conferenceInfo.from.id);\n\t\tp2pChannel.addStreamToPendingStreams(this.localSrc);\n\t\tp2pChannel.setMyStreamInfo(this.localSrc);\n\t\tp2pChannel.actioneeParticipantId = this.conferenceInfo.from.id;\n\t\tp2pChannel.participantId = this.conferenceInfo.participantId;\n\t\tp2pChannel.conferenceId = this.conferenceInfo.conferenceId;\n\n\t\tthis.callerParticipantId = this.conferenceInfo.from.id;\n\t\tconst userProfile = getUserProfile();\n\t\tconst fromUser = new FromUser(`${userProfile.firstName} ${userProfile.lastName}`, userProfile.jobTitle, userProfile.profilePicture.url);\n\t\tconst data = await this.p2p.sendMessageToSignaling(SocketEvents.Conference.JOIN, {\n\t\t\tconferenceId: this.conferenceInfo.conferenceId,\n\t\t\tcallType: this.conferenceInfo.callType,\n\t\t\tparticipantId: this.conferenceInfo.participantId,\n\t\t\tfrom: fromUser,\n\t\t\tinputDevices: this.conferenceInfo.inputDevices,\n\t\t});\n\n\t\t// check if false because it can be undefined\n\t\tif (data.ok === false) {\n\t\t\tswitch (data.failureReason) {\n\t\t\t\tcase JoinConferenceFailureReasonEnum.FAILED_TO_GET_PARTICIPANT_INFO:\n\t\t\t\t\tthis.emit('end-call', { endReason: ConferenceEndReason.PARTICIPANT_INVITE_FAILED });\n\t\t\t\t\tbreak;\n\t\t\t\tcase JoinConferenceFailureReasonEnum.WRONG_PARTICIPANT_STATE:\n\t\t\t\t\tthis.emit('end-call', { anotherNursePickedUp: true });\n\t\t\t\t\tbreak;\n\t\t\t\tcase JoinConferenceFailureReasonEnum.UNHANDLED_EXCEPTION:\n\t\t\t\tcase JoinConferenceFailureReasonEnum.NULL_CONFERENCE:\n\t\t\t\t\tthis.emit('end-call', { endReason: ConferenceEndReason.ABORTED });\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tthis.clearManager();\n\t\t\tthis.closeSocket();\n\t\t\treturn;\n\t\t}\n\n\t\tthis.logger.setConferenceData({\n\t\t\tparticipantId: data.participantId,\n\t\t});\n\n\t\tthis.callStartedOrJoined = true;\n\t\tObject.assign(this.conferenceInfo, data);\n\t\tthis.emit('call-started', {\n\t\t\tconferenceId: data.conferenceId,\n\t\t\tparticipantId: data.participantId,\n\t\t\thelloDeviceName: this.conferenceInfo.from.name,\n\t\t});\n\t};\n\n\tnewOffer = (isAudio, isVideo, isScreen) => {\n\t\tconst { callerParticipantId, conferenceInfo } = this;\n\n\t\treturn new Offer(\n\t\t\tcallerParticipantId,\n\t\t\tconferenceInfo.callType,\n\t\t\tconferenceInfo.conferenceId,\n\t\t\tconferenceInfo.forScreenShare,\n\t\t\tisAudio,\n\t\t\tisVideo,\n\t\t\tisScreen,\n\t\t\tconferenceInfo.toScreenSharingSocket,\n\t\t\tconferenceInfo.participantId\n\t\t);\n\t};\n\n\tinitMediaStream = async (isAudio, isVideo, isScreen) => {\n\t\tif (isAudio || isVideo) {\n\t\t\t// check for permissions to show the 'allow permission dialog' if needed\n\t\t\tconst status = await this.getInputStreamsStatus();\n\t\t\tconst streamPermission = this.validateStreamStatus(isAudio, isVideo, status);\n\t\t\tif (streamPermission) {\n\t\t\t\tthis.emit('stream-permission', streamPermission);\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\tthis.localSrc = await this.getStream(isAudio, isVideo, isScreen);\n\t\t\tthis.emit('stream-permission', null);\n\t\t} catch (err) {\n\t\t\tconst errorType = this.handelMediaStreamError(err);\n\t\t\tthis.emit('stream-permission', errorType);\n\t\t\tif (errorType.type !== StreamError.PERMISSION_DISMISSED.type && errorType.type !== StreamError.STREAM_NOT_ALLOWED.type) {\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t\t// start a lisener to check if the user gives stream permission (mic & cam)\n\t\t\tawait this.checkForStreamPermissions({ isAudio, isVideo });\n\t\t\t// we call initMediaStream because we need to set the stream to the this.localSrc after the user granted the permissions\n\t\t\tawait this.initMediaStream(isAudio, isVideo, isScreen);\n\t\t}\n\t};\n\n\tvalidateStreamStatus = (isAudio, isVideo, status) => {\n\t\tlet streamPermission;\n\t\tif (isAudio && !isVideo) {\n\t\t\t// audio call\n\t\t\tif (!status.mic.available) {\n\t\t\t\tstreamPermission = StreamError.DEVICE_NOT_FOUND;\n\t\t\t}\n\t\t\tif (!status.mic.permission) {\n\t\t\t\tstreamPermission = StreamError.MICROPHONE_BLOCKED;\n\t\t\t}\n\t\t} else if (isAudio && isVideo) {\n\t\t\t// video call\n\t\t\tif (!status.mic.available || !status.cam.available) {\n\t\t\t\tstreamPermission = StreamError.DEVICE_NOT_FOUND;\n\t\t\t}\n\t\t\tif (!status.mic.permission) {\n\t\t\t\tstreamPermission = StreamError.MICROPHONE_BLOCKED;\n\t\t\t}\n\t\t\tif (!status.mic.permission || !status.cam.permission) {\n\t\t\t\tstreamPermission = StreamError.PERMISSION_DISMISSED;\n\t\t\t}\n\t\t}\n\t\treturn streamPermission;\n\t};\n\n\taudioCall = async () => {\n\t\tconst offer = this.newOffer(true, false, false);\n\t\tawait this.p2p.publish(offer.actioneeParticipantId, this.localSrc, offer);\n\t\tthis.emit('audio-call', { audioStream: this.localSrc, actioneeParticipantId: offer.actioneeParticipantId });\n\t};\n\n\tvideoCall = async () => {\n\t\tconst offer = this.newOffer(true, true, false);\n\t\tawait this.p2p.publish(offer.actioneeParticipantId, this.localSrc, offer);\n\t\tthis.emit('video-call', { videoStream: this.localSrc, actioneeParticipantId: offer.actioneeParticipantId });\n\t};\n\n\tcameraFeedCall = async () => {\n\t\tconst offer = this.newOffer(true, true, false);\n\t\tthis.emit('feed-call', { localStream: this.localSrc, actioneeParticipantId: offer.actioneeParticipantId });\n\t\tawait this.p2p.publish(offer.actioneeParticipantId, this.localSrc, offer);\n\t};\n\n\tmonitoringSendOffer = async participantId => {\n\t\tconst offer = this.newOffer(true, true, false);\n\t\toffer.actioneeParticipantId = participantId;\n\t\tconst streamSourceInfo = new StreamSourceInfo(undefined, undefined);\n\t\tconst mediaStream = new MediaStream();\n\t\tconst localStream = new LocalStream(mediaStream, streamSourceInfo);\n\t\tthis.localSrc = localStream;\n\t\tawait this.p2p.publish(offer.actioneeParticipantId, this.localSrc, offer);\n\t};\n\n\tscreenShare = async () => {\n\t\tif (this.togglingScreenShare) {\n\t\t\treturn;\n\t\t}\n\t\tthis.togglingScreenShare = true;\n\t\tconst offer = this.newOffer(false, false, true);\n\t\tif (!this.localScreenSrc) {\n\t\t\ttry {\n\t\t\t\tconst screenStream = await this.getStream(false, false, true);\n\t\t\t\tthis.localScreenSrc = screenStream;\n\t\t\t\tconst screenTrack = screenStream.mediaStream.getVideoTracks()[0];\n\t\t\t\tthis.conferenceInfo.screenTrackId = screenTrack.id;\n\t\t\t\tconst toggleInfo = this.toggleEvent(StreamTypes.SCREEN_SHARE, false, false, true);\n\n\t\t\t\tconst eventResponse = await this.p2p.sendMessageToSignaling(SocketEvents.Conference.TOGGLE_STREAMS, toggleInfo);\n\t\t\t\tif (!eventResponse.ok) {\n\t\t\t\t\tthis.conferenceInfo.screenTrackId = null;\n\t\t\t\t\tthis.conferenceInfo.isScreen = false;\n\t\t\t\t\tscreenTrack.stop();\n\t\t\t\t\treturn this.handleEventFailureResponse(eventResponse);\n\t\t\t\t}\n\n\t\t\t\tthis.bindOnTrackEndedEventListener(screenTrack);\n\t\t\t\tthis.localSrc.mediaStream.addTrack(screenTrack);\n\t\t\t\tthis.localSrc.source.video = 'screen-cast';\n\n\t\t\t\tawait this.p2p.publish(offer.actioneeParticipantId, this.localSrc, offer);\n\t\t\t\tthis.emit('screensharing', { localSrc: this.localSrc, activeSrc: this.localScreenSrc, localScreenSrc: this.localScreenSrc });\n\t\t\t} catch (err) {\n\t\t\t\tthis.handelMediaStreamError(err);\n\t\t\t} finally {\n\t\t\t\tthis.togglingScreenShare = false;\n\t\t\t}\n\t\t} else {\n\t\t\tconst videoTracks = this.localSrc.mediaStream.getVideoTracks();\n\t\t\tconst screenTrack = this.localScreenSrc.mediaStream.getVideoTracks()[0];\n\t\t\tconst toggleInfo = this.toggleEvent(StreamTypes.SCREEN_SHARE, false, false, true);\n\t\t\tconst eventResponse = await this.p2p.sendMessageToSignaling(SocketEvents.Conference.TOGGLE_STREAMS, toggleInfo);\n\t\t\tif (!eventResponse.ok) {\n\t\t\t\tthis.conferenceInfo.screenTrackId = screenTrack.id;\n\t\t\t\tthis.conferenceInfo.isScreen = true;\n\t\t\t\treturn this.handleEventFailureResponse(eventResponse);\n\t\t\t}\n\n\t\t\tfor (let i = 0; i < videoTracks.length; i += 1) {\n\t\t\t\tif (videoTracks[i].id === screenTrack.id) {\n\t\t\t\t\tthis.localScreenSrc.mediaStream.getVideoTracks()[0].stop();\n\t\t\t\t\tthis.localSrc.mediaStream.getVideoTracks()[i].stop();\n\t\t\t\t\tthis.localScreenSrc = null;\n\t\t\t\t\tthis.localSrc.mediaStream.removeTrack(this.localSrc.mediaStream.getVideoTracks()[i]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tawait this.p2p.publish(offer.actioneeParticipantId, this.localSrc, offer);\n\t\t\tthis.emit('screensharing', { localSrc: this.localSrc, activeSrc: this.localSrc, localScreenSrc: this.localScreenSrc });\n\t\t\tthis.togglingScreenShare = false;\n\t\t}\n\t};\n\n\ttoggleAudio = async () => {\n\t\tif (this.localSrc.mediaStream.getAudioTracks().length && this.conferenceInfo.callType !== CallTypes.MONITORING) {\n\t\t\tconst audioTrack = this.localSrc.mediaStream.getAudioTracks()[0];\n\t\t\tif (!audioTrack.enabled) {\n\t\t\t\t// check if user changed permissions for mic during the call\n\t\t\t\tconst status = await this.getInputStreamsStatus();\n\t\t\t\tif (!status.mic.available || !status.mic.permission) {\n\t\t\t\t\tthis.logger.error('No mic or permission available on audio toggle');\n\t\t\t\t\treturn {\n\t\t\t\t\t\terror: 'No mic or permission available',\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!this.conferenceInfo.isAudio) {\n\t\t\t\tthis.conferenceInfo.audioTrackId = audioTrack.id;\n\t\t\t}\n\t\t\tconst toggleInfo = this.toggleEvent(StreamTypes.AUDIO, true, false, false);\n\t\t\tconst eventResponse = await this.p2p.sendMessageToSignaling(SocketEvents.Conference.TOGGLE_STREAMS, toggleInfo);\n\t\t\tif (!eventResponse.ok) {\n\t\t\t\tthis.conferenceInfo.isAudio = !this.conferenceInfo.isAudio;\n\t\t\t\tthis.conferenceInfo.audioTrackId = this.conferenceInfo.isAudio ? audioTrack.id : null;\n\t\t\t\treturn this.handleEventFailureResponse(eventResponse.failureReason);\n\t\t\t}\n\t\t\taudioTrack.enabled = !audioTrack.enabled;\n\t\t\tthis.emit('toggle-audio');\n\t\t} else {\n\t\t\t// case for patient view because the call starts with no tracks so we need to add the audio track\n\t\t\ttry {\n\t\t\t\tconst audioStream = await this.getStream(true, false, false);\n\t\t\t\tconst audioTrack = audioStream.mediaStream.getAudioTracks()[0];\n\t\t\t\tlet stream = audioStream;\n\n\t\t\t\tconst offer = this.newOffer(true, false, false);\n\t\t\t\t// created manually the toggle info object because with each feed we need the toggle info like this\n\t\t\t\tconst toggleInfo = {\n\t\t\t\t\tstreamType: StreamTypes.AUDIO,\n\t\t\t\t\tisAudio: true,\n\t\t\t\t\tisVideo: false,\n\t\t\t\t\tisScreen: false,\n\t\t\t\t\tconferenceId: this.conferenceInfo.conferenceId,\n\t\t\t\t\tparticipantId: this.conferenceInfo.participantId,\n\t\t\t\t\tactioneeParticipantId: offer.actioneeParticipantId,\n\t\t\t\t\taudioTrackId: audioTrack.id,\n\t\t\t\t\tvideoTrackId: null,\n\t\t\t\t\tscreenTrackId: null,\n\t\t\t\t};\n\t\t\t\tconst eventResponse = await this.p2p.sendMessageToSignaling(SocketEvents.Conference.TOGGLE_STREAMS, toggleInfo);\n\t\t\t\tif (!eventResponse.ok) {\n\t\t\t\t\taudioTrack.stop();\n\t\t\t\t\tif (eventResponse.failureReason === ToggleFailureReasonEnum.DEVICE_LOCKED) {\n\t\t\t\t\t\treturn { error: eventResponse };\n\t\t\t\t\t}\n\t\t\t\t\treturn this.handleEventFailureResponse(eventResponse);\n\t\t\t\t}\n\n\t\t\t\tif (this.conferenceInfo.callType !== CallTypes.MONITORING) {\n\t\t\t\t\tthis.localSrc.mediaStream.addTrack(audioStream.mediaStream.getAudioTracks()[0]);\n\t\t\t\t\tthis.localSrc.source.audio = 'mic';\n\t\t\t\t\tstream = this.localSrc;\n\t\t\t\t\tthis.emit('toggle-audio');\n\t\t\t\t}\n\n\t\t\t\tthis.bindOnTrackEndedEventListener(audioTrack, offer.actioneeParticipantId);\n\n\t\t\t\tawait this.p2p.publish(offer.actioneeParticipantId, stream, offer);\n\t\t\t\treturn audioStream;\n\t\t\t} catch (err) {\n\t\t\t\treturn {\n\t\t\t\t\terror: this.handelMediaStreamError(err),\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t};\n\n\ttoggleVideo = async () => {\n\t\tif (this.togglingVideo) {\n\t\t\treturn;\n\t\t}\n\t\tthis.togglingVideo = true;\n\t\tconst offer = this.newOffer(false, true, false);\n\t\tif (!this.hasCameraTrack()) {\n\t\t\ttry {\n\t\t\t\tconst videoStream = await this.getStream(false, true, false);\n\t\t\t\tconst videoTrack = videoStream.mediaStream.getVideoTracks()[0];\n\t\t\t\tthis.conferenceInfo.videoTrackId = videoTrack.id;\n\t\t\t\tconst toggleInfo = this.toggleEvent(StreamTypes.VIDEO, false, true);\n\t\t\t\tconst eventResponse = await this.p2p.sendMessageToSignaling(SocketEvents.Conference.TOGGLE_STREAMS, toggleInfo);\n\t\t\t\tif (!eventResponse.ok) {\n\t\t\t\t\tthis.conferenceInfo.videoTrackId = null;\n\t\t\t\t\tthis.conferenceInfo.isVideo = false;\n\t\t\t\t\tvideoTrack.stop();\n\t\t\t\t\tthis.handleEventFailureResponse(eventResponse);\n\t\t\t\t\treturn {\n\t\t\t\t\t\terror: 'camera blocked',\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tthis.localSrc.mediaStream.addTrack(videoStream.mediaStream.getVideoTracks()[0]);\n\t\t\t\tthis.localSrc.source.video = 'camera';\n\n\t\t\t\t// if there are 2 tracks, perform this to change positions of the track\n\t\t\t\tif (this.localSrc.mediaStream.getVideoTracks().length === 2) {\n\t\t\t\t\tconst screensharingTrack = this.localSrc.mediaStream.getVideoTracks()[0];\n\t\t\t\t\tthis.localSrc.mediaStream.removeTrack(screensharingTrack);\n\t\t\t\t\tthis.localSrc.mediaStream.addTrack(screensharingTrack);\n\t\t\t\t}\n\n\t\t\t\tthis.bindOnTrackEndedEventListener(videoTrack, offer.actioneeParticipantId);\n\n\t\t\t\tawait this.p2p.publish(offer.actioneeParticipantId, this.localSrc, offer);\n\t\t\t\tthis.emit('toggle-video', { hasVideoTrack: true });\n\t\t\t} catch (err) {\n\t\t\t\treturn {\n\t\t\t\t\terror: this.handelMediaStreamError(err),\n\t\t\t\t};\n\t\t\t} finally {\n\t\t\t\tthis.togglingVideo = false;\n\t\t\t}\n\t\t} else {\n\t\t\tconst videoTrack = this.localSrc.mediaStream.getVideoTracks()[0];\n\t\t\tconst toggleInfo = this.toggleEvent(StreamTypes.VIDEO, false, true);\n\t\t\tconst eventResponse = await this.p2p.sendMessageToSignaling(SocketEvents.Conference.TOGGLE_STREAMS, toggleInfo);\n\t\t\tif (!eventResponse.ok) {\n\t\t\t\tthis.conferenceInfo.videoTrackId = videoTrack.id;\n\t\t\t\tthis.conferenceInfo.isVideo = true;\n\t\t\t\tthis.handleEventFailureResponse(eventResponse);\n\t\t\t\treturn {\n\t\t\t\t\terror: 'camera blocked',\n\t\t\t\t};\n\t\t\t}\n\t\t\tthis.localSrc.mediaStream.getVideoTracks()[0].stop();\n\t\t\tthis.localSrc.mediaStream.removeTrack(this.localSrc.mediaStream.getVideoTracks()[0]);\n\t\t\tawait this.p2p.publish(offer.actioneeParticipantId, this.localSrc, offer);\n\t\t\tthis.emit('toggle-video', { hasVideoTrack: false });\n\t\t\tthis.togglingVideo = false;\n\t\t}\n\t};\n\n\t/**\n\t * Method checks if there is a camera track\n\t * @returns {boolean}\n\t * */\n\thasCameraTrack() {\n\t\tconst { localSrc, localScreenSrc } = this;\n\n\t\t// if no screensharing, video track should be in localSrc\n\t\tif (!localScreenSrc) return !!localSrc.mediaStream.getVideoTracks().length;\n\n\t\t// if yes screensharing, check the tracks in localSrc if there exists one with different track id\n\t\tif (localSrc) {\n\t\t\tconst screenTrack = localScreenSrc.mediaStream.getVideoTracks()[0];\n\t\t\tconst videoTracks = localSrc.mediaStream.getVideoTracks();\n\t\t\tfor (let i = 0; i < videoTracks.length; i++) {\n\t\t\t\tif (screenTrack.id !== videoTracks[i].id) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\thandleEventFailureResponse = eventResponse => {\n\t\tthis.emit('event-failure', eventResponse);\n\t\tthis.logger.warn('Event failure response', { eventResponse });\n\t\treturn null;\n\t};\n\n\ttoggleEvent = (_streamType, _isAudio, _isVideo, _isScreen, _actioneeParticipantId) => {\n\t\tif (_isAudio) this.conferenceInfo.isAudio = !this.conferenceInfo.isAudio;\n\t\tif (_isVideo) this.conferenceInfo.isVideo = !this.conferenceInfo.isVideo;\n\t\tif (_isScreen) this.conferenceInfo.isScreen = !this.conferenceInfo.isScreen;\n\n\t\tif (!this.conferenceInfo.isAudio) {\n\t\t\tthis.conferenceInfo.audioTrackId = null;\n\t\t}\n\t\tif (!this.conferenceInfo.isVideo) {\n\t\t\tthis.conferenceInfo.videoTrackId = null;\n\t\t}\n\t\tif (!this.conferenceInfo.isScreen) {\n\t\t\tthis.conferenceInfo.screenTrackId = null;\n\t\t}\n\n\t\tconst toggleInfo = {\n\t\t\tstreamType: _streamType,\n\t\t\tisAudio: this.conferenceInfo.isAudio,\n\t\t\tisVideo: this.conferenceInfo.isVideo,\n\t\t\tisScreen: this.conferenceInfo.isScreen,\n\t\t\tconferenceId: this.conferenceInfo.conferenceId,\n\t\t\tparticipantId: this.conferenceInfo.participantId,\n\t\t\tactioneeParticipantId: _actioneeParticipantId,\n\t\t\taudioTrackId: this.conferenceInfo.audioTrackId,\n\t\t\tvideoTrackId: this.conferenceInfo.videoTrackId,\n\t\t\tscreenTrackId: this.conferenceInfo.screenTrackId,\n\t\t};\n\n\t\treturn toggleInfo;\n\t};\n\n\trequestToChangeBitrate = data => {\n\t\tthis.p2p.sendMessageToSignaling(SocketEvents.Conference.PARTICIAPNT_CHANGE_BITRATE, data);\n\t};\n\n\tbindP2pEvents = () => {\n\t\tconst { p2p } = this;\n\t\tp2p.addEventListener('streamadded', e => {\n\t\t\tif (e.stream.source.audio || e.stream.source.video) {\n\t\t\t\tconst hasAudioTrack = e.stream.mediaStream.getAudioTracks().length > 0;\n\t\t\t\tconst hasVideoTrack = e.stream.mediaStream.getVideoTracks().length > 0;\n\t\t\t\tconst participant = this.getParticipantByParticipantId(e.stream.origin);\n\t\t\t\tObject.assign(this.participants[participant.objectId], {\n\t\t\t\t\thasAudioTrack,\n\t\t\t\t\thasVideoTrack,\n\t\t\t\t});\n\n\t\t\t\tthis.emit('peer-stream', { peerSrc: e.stream, activeSrc: e.stream, participantId: e.origin });\n\t\t\t}\n\t\t});\n\n\t\tp2p.addEventListener('remoteDescriptionSet', ({ origin }) => {\n\t\t\tthis.emit('remoteStreamChanged', origin);\n\t\t});\n\t};\n\n\tping = () => {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tif (!this.isIoConnected()) {\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\treject();\n\t\t\t\t}, 500);\n\t\t\t} else {\n\t\t\t\tthis.socket.emit(SocketEvents.Client.PING, ({ pong }) => {\n\t\t\t\t\tresolve(pong);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t};\n\n\tpromiseTimeout = (ms, promise) => {\n\t\t// Create a promise that rejects in milliseconds\n\t\tlet timeout = new Promise((resolve, reject) => {\n\t\t\tlet id = setTimeout(() => {\n\t\t\t\tclearTimeout(id);\n\t\t\t\treject();\n\t\t\t}, ms);\n\t\t});\n\n\t\t// Returns a race between our timeout and the passed in promise\n\t\treturn Promise.race([promise, timeout]);\n\t};\n\n\tcheckIfConnectedToSignaling = () => {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tconst checkIfConnected = async () => {\n\t\t\t\ttry {\n\t\t\t\t\tconst pong = await this.promiseTimeout(1000, this.ping());\n\t\t\t\t\tif (pong) {\n\t\t\t\t\t\tresolve();\n\t\t\t\t\t} else {\n\t\t\t\t\t\treject();\n\t\t\t\t\t}\n\t\t\t\t} catch (error) {\n\t\t\t\t\tcheckIfConnected();\n\t\t\t\t}\n\t\t\t};\n\t\t\tcheckIfConnected();\n\t\t});\n\t};\n\n\thandleReconnectingWithParticipant = async (participantId, stream = this.localSrc) => {\n\t\t// check for network and signaling\n\t\t// if connection state failed because of network then execute reconnect when the network is up\n\t\tawait this.checkIfConnectedToSignaling();\n\t\tif (this.conferenceInfo) {\n\t\t\tconst response = await this.p2p.sendMessageToSignaling(SocketEvents.Conference.PARTICIPANT_RECONNECT, {\n\t\t\t\tconferenceId: this.conferenceInfo.conferenceId,\n\t\t\t\tparticipantId: this.conferenceInfo.participantId,\n\t\t\t\tisAudio: this.conferenceInfo.isAudio,\n\t\t\t\tisVideo: this.conferenceInfo.isVideo,\n\t\t\t\tisScreen: this.conferenceInfo.isScreen,\n\t\t\t});\n\n\t\t\tif (response.isActive) {\n\t\t\t\tconst participant = response.participants.find(p => p.id === participantId);\n\t\t\t\tif (participant.state === ParticipantState.CONNECTING.type || participant.state === ParticipantState.CONNECTED.type) {\n\t\t\t\t\tconst p2pChannel = this.p2p.getChannel(participant.id);\n\t\t\t\t\tconst rtcPeerConnection = p2pChannel.getRTCPeerConnection();\n\t\t\t\t\tconst { connectionState, iceConnectionState } = rtcPeerConnection;\n\t\t\t\t\tif (connectionState === RTCPeerConnectionEnum.CONNECTION_STATE.FAILED || connectionState === RTCPeerConnectionEnum.CONNECTION_STATE.CLOSED) {\n\t\t\t\t\t\t// close this peer connection and make a new one after with the same participant\n\t\t\t\t\t\tif (connectionState === RTCPeerConnectionEnum.CONNECTION_STATE.CLOSED) {\n\t\t\t\t\t\t\tthis.logger.debug(`Close peer connection and create a new one on reconnect \\nactioneeParticipantId ${participant.id}`);\n\t\t\t\t\t\t\tthis.p2p.stop(participant.id);\n\t\t\t\t\t\t\tthis.p2p.allowedRemoteIds.push(participant.id);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.callerParticipantId = participant.id;\n\t\t\t\t\t\tconst offer = this.newOffer(this.conferenceInfo.isAudio, this.conferenceInfo.isVideo, this.conferenceInfo.isScreen);\n\t\t\t\t\t\tif (iceConnectionState === RTCPeerConnectionEnum.ICE_CONNECTION_STATE.DISCONNECTED) {\n\t\t\t\t\t\t\tthis.logger.debug(`ICE restart on reconnect \\nactioneeParticipantId ${participant.id}`);\n\t\t\t\t\t\t\tObject.assign(offer, { iceRestart: true });\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (stream) {\n\t\t\t\t\t\t\tthis.p2p.publish(participant.id, stream, offer, true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthis.emit('participant-status', {\n\t\t\t\t\t\tstatus: participant.state,\n\t\t\t\t\t\tobjectId: participant.objectId,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.endCall({ endReason: ConferenceEndReason.DROPPED });\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * Method used to bind MediaStreamTrack.ended event to local track\n\t * @function onTrackEndedEventListener\n\t * @param {MediaStreamTrack} track\n\t * @param {string} [actioneeParticipantId] Remote id\n\t */\n\tbindOnTrackEndedEventListener = (track, actioneeParticipantId) => {\n\t\ttrack.removeEventListener('ended', () => this.onTrackEndedEventListener(track, actioneeParticipantId));\n\t\ttrack.addEventListener('ended', () => this.onTrackEndedEventListener(track, actioneeParticipantId));\n\t};\n\n\tonTrackEndedEventListener = async (track, actioneeParticipantId) => {\n\t\tif (this.conferenceInfo.isScreen && !!this.localScreenSrc) {\n\t\t\tthis.screenShare();\n\t\t\treturn;\n\t\t}\n\n\t\tconst inputDevices = (await navigator.mediaDevices.enumerateDevices()).filter(device => device.kind === `${track.kind}input`);\n\t\tconst trackDeviceNotFound = !inputDevices.some(device => device.groupId === track.getSettings().groupId);\n\n\t\tconst trackType = track.kind === 'audio' ? 'Audio' : 'Video';\n\t\tconst localTrack = this.localSrc.mediaStream[`get${trackType}Tracks`]().find(t => t.id === track.id);\n\t\tif (localTrack) {\n\t\t\tlocalTrack.stop();\n\t\t\tthis.localSrc.mediaStream.removeTrack(localTrack);\n\t\t}\n\t\tthis.removeTrackById(actioneeParticipantId, track.id);\n\t\tthis.emit(`local-${track.kind}-error`, { participantId: actioneeParticipantId, inputDevices, trackDeviceNotFound });\n\n\t\tlet message = `${trackType} track has ended.`;\n\t\tif (trackDeviceNotFound) {\n\t\t\tmessage += ` ${trackType} input device that was being used is not found!`;\n\t\t} else if (!trackDeviceNotFound && inputDevices.length) {\n\t\t\tmessage += ` ${trackType} input devices disabled!`;\n\t\t} else if (!inputDevices.length) {\n\t\t\tmessage += ` No ${trackType} input device found!`;\n\t\t}\n\n\t\tthis.publishConferenceLog(message, { actioneeParticipantId, inputDevices });\n\t};\n\n\t/**\n\t * Send leave conference event\n\t * @param {object} leaveData\n\t * @param {string} leaveData.participantId\n\t * @param {string} leaveData.conferenceId\n\t * @param {number} [leaveData.leaveReason]\n\t * @returns {Promise} Ack promise\n\t */\n\tsendLeaveEvent = leaveData => {\n\t\treturn this.p2p.sendMessageToSignaling(SocketEvents.Conference.LEAVE, leaveData);\n\t};\n\n\tstopTracks = stream => {\n\t\tif (stream && stream.mediaStream) {\n\t\t\tconst tracks = stream.mediaStream.getTracks();\n\t\t\tfor (const track of tracks) {\n\t\t\t\ttrack.stop();\n\t\t\t}\n\t\t}\n\t};\n\n\tendCall = ({ endReason }) => {\n\t\tthis.logger.debug(`Trying to end the call`, { endReason, endingCall: this.endingCall });\n\t\tif (!this.endingCall) {\n\t\t\tthis.endingCall = true;\n\t\t\tconst shouldCloseSocket = this.conferenceInfo.callType !== CallTypes.MONITORING || endReason === ConferenceEndReason.DROPPED;\n\t\t\tconst leaveData = {\n\t\t\t\tconferenceId: this.conferenceInfo.conferenceId,\n\t\t\t\tparticipantId: this.conferenceInfo.participantId,\n\t\t\t};\n\n\t\t\tif (endReason === ConferenceEndReason.PARTICIPANT_PASSWORD_CHANGED) {\n\t\t\t\tleaveData.leaveReason = ParticipantRemoveReason.PASSWORD_CHANGED;\n\t\t\t} else if (endReason === ConferenceEndReason.PARTICIPANT_IDLE) {\n\t\t\t\tleaveData.leaveReason = ParticipantRemoveReason.IDLE;\n\t\t\t} else if (endReason === ConferenceEndReason.TERMINATED_BY_ADMINISTRATOR) {\n\t\t\t\tleaveData.leaveReason = ParticipantRemoveReason.CONFERENCE_TERMINATED_BY_ADMINISTRATOR;\n\t\t\t}\n\n\t\t\tthis.clearManager();\n\t\t\tthis.sendLeaveEvent(leaveData);\n\t\t\tif (shouldCloseSocket) {\n\t\t\t\tthis.closeSocket();\n\t\t\t}\n\t\t\tthis.emit('end-call', { endReason });\n\t\t}\n\t};\n\n\tcloseSocket = () => {\n\t\tif (this.conferenceInfo?.callType === CallTypes.MONITORING) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Disable this tab from receiveing any more calls by closing it's socket\n\t\tthis.logger.info('Disconnecting socket...', { id: this.socket.id });\n\t\tthis.socket.removeAllListeners();\n\t\tthis.socket.close();\n\t};\n\n\tclearManager = () => {\n\t\tthis.conferenceInfo = null;\n\t\tthis.callStartedOrJoined = false;\n\t\tthis.stopTracks(this.localSrc);\n\t\tthis.stopTracks(this.localScreenSrc);\n\t\tthis.clearAndDeleteTimers({ timers: this.outGoingCallTimer });\n\t\tthis.reAddToMonitoringIntervals.clear();\n\t\tif (this._useCallStats) {\n\t\t\tthis._callStats.stop();\n\t\t}\n\t\tObject.values(this.participants).forEach(participant => {\n\t\t\tthis.p2p.stop(participant.id);\n\t\t});\n\t\tthis.participants = {};\n\t};\n\n\t/**\n\t * Method used to clear and delete timers\n\t * @function clearAndDeleteTimers\n\t * @param {Object} data\n\t * @param {Object} data.timers\n\t */\n\tclearAndDeleteTimers = data => {\n\t\tconst { timers } = data;\n\n\t\tif (timers) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor (const key in timers) {\n\t\t\tclearTimeout(timers[key]);\n\t\t\tdelete timers[key];\n\t\t}\n\t};\n\n\ttoggleParticipantTrack = async (trackType, isTrackMuted, actioneeParticipantId = this.callerParticipantId) => {\n\t\t// only updating hasAudioTrack and hasVideoTrack for participant when isTrackMuted is true because streamAdded won't be called after the participant removes a track\n\t\t// if isTrackMuted is false than streamAdded will be called and hasAudioTrack and hasVideoTrack will be updated\n\t\tif (isTrackMuted) {\n\t\t\tconst participant = this.getParticipantByParticipantId(actioneeParticipantId);\n\t\t\tif (trackType === CallTypes.AUDIO) {\n\t\t\t\tthis.participants[participant.objectId].hasAudioTrack = false;\n\t\t\t} else {\n\t\t\t\tthis.participants[participant.objectId].hasVideoTrack = false;\n\t\t\t}\n\t\t}\n\n\t\tconst data = {\n\t\t\tparticipantId: this.conferenceInfo.participantId,\n\t\t\tconferenceId: this.conferenceInfo.conferenceId,\n\t\t\tactioneeParticipantId,\n\t\t\ttype: trackType,\n\t\t\tmuted: isTrackMuted,\n\t\t};\n\n\t\treturn this.p2p.sendMessageToSignaling(SocketEvents.Conference.TRACK_TOGGLE, data);\n\t};\n\n\t/**\n\t * Method used to send move camera event\n\t * @function panTiltCamera\n\t * @param {object} data\n\t * @param {string} data.direction\n\t * @param {string} data.action\n\t * @param {string} data.participantId\n\t * @param {string} data.conferenceId\n\t * @param {number} data.helloDeviceId\n\t * @param {number} [data.level]\n\t */\n\tpanTiltCamera = async data => {\n\t\ttry {\n\t\t\tconst response = await this.p2p.sendMessageToSignaling(SocketEvents.HelloDevice.MOVE_CAMERA, data);\n\n\t\t\treturn response;\n\t\t} catch (error) {\n\t\t\tconst returnData = { error };\n\t\t\tthis.logger.warn('Camera tilt event send failed!', returnData);\n\t\t\treturn returnData;\n\t\t}\n\t};\n\n\t/**\n\t * Method used to send zoom or switch camera event\n\t * @function sendCameraEvent\n\t * @param {string} eventType\n\t * @param {object} data\n\t * @param {string} data.participantId\n\t * @param {string} data.conferenceId\n\t * @param {number} data.helloDeviceId\n\t * @param {number} [data.level]\n\t */\n\tsendCameraEvent = async (eventType, data) => {\n\t\tif (this.cameraEventInProgress) {\n\t\t\treturn { cameraEventInProgress: true };\n\t\t}\n\n\t\tthis.cameraEventInProgress = true;\n\n\t\t// If no ack is received from camera enable the controls after 3 seconds\n\t\tif (this.cameraEventTimeout) {\n\t\t\tclearTimeout(this.cameraEventTimeout);\n\t\t}\n\t\tthis.cameraEventTimeout = setTimeout(() => {\n\t\t\tif (this.cameraEventInProgress) {\n\t\t\t\tthis.cameraEventInProgress = false;\n\t\t\t}\n\t\t}, 3000);\n\n\t\ttry {\n\t\t\tconst response = await this.p2p.sendMessageToSignaling(eventType, data);\n\n\t\t\treturn response;\n\t\t} catch (error) {\n\t\t\tconst returnData = { error };\n\t\t\tthis.logger.warn(`'${eventType}'`, 'event send failed!', returnData);\n\t\t\treturn returnData;\n\t\t}\n\t};\n\n\tserialCommandsTv = (serialCommand, isVolume, deviceId, conferenceId, participantId) => {\n\t\treturn this.p2p.sendMessageToSignaling(SocketEvents.HelloDevice.ON_TOGGLE_TV, {\n\t\t\ttvStatus: serialCommand,\n\t\t\tisVolume: isVolume,\n\t\t\thelloDeviceId: deviceId,\n\t\t\tconferenceId: conferenceId,\n\t\t\tparticipantId: participantId,\n\t\t});\n\t};\n\n\ttoggleNightVision = (nightVisionMode, deviceId, conferenceId, participantId) => {\n\t\treturn this.p2p.sendMessageToSignaling(SocketEvents.HelloDevice.TOGGLE_NIGHTVISION, {\n\t\t\thelloDeviceId: deviceId,\n\t\t\ttoggleNightVision: nightVisionMode,\n\t\t\tconferenceId: conferenceId,\n\t\t\tparticipantId: participantId,\n\t\t});\n\t};\n\n\ttogglePatientAtRiskAlert = ({ conferenceId, participantId, actioneeParticipantId, data }) => {\n\t\treturn this.p2p.sendMessageToSignaling(SocketEvents.Conference.ALERT_PATIENT_AT_RISK, {\n\t\t\tconferenceId,\n\t\t\tparticipantId,\n\t\t\tactioneeParticipantId,\n\t\t\tdata,\n\t\t});\n\t};\n\n\t/**\n\t * This method is used to get the stream for these cases:\n\t * F,F,F -> monitoring or patient view\n\t * F,F,T -> only screenshare\n\t * F,T,F -> only video\n\t * F,T,T -> we don't support this case (video && screenshare)\n\t * T,F,F -> only audio\n\t * T,F,T -> we don't support this case (audio && screenshare)\n\t * T,T,F -> audio and video\n\t * T,T,T -> we don't support this case (audio && video && screenshare)\n\t * @param {boolean} isAudio\n\t * @param {boolean} isVideo\n\t * @param {boolean} isScreenshare\n\t * @returns {LocalStream}\n\t */\n\tgetStream = (isAudio, isVideo, isScreenshare) => {\n\t\treturn new Promise(async (resolve, reject) => {\n\t\t\tif ((isAudio && isScreenshare) || (isVideo && isScreenshare) || (isAudio && isVideo && isScreenshare)) {\n\t\t\t\treject(`Can't get this stream!`);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet streamSourceInfo;\n\t\t\tlet streamConstraints;\n\n\t\t\tif (isAudio && !isVideo) {\n\t\t\t\t// only audio\n\t\t\t\tconst audioConstraintsForMic = new AudioTrackConstraints(AudioSourceInfo.MIC);\n\t\t\t\tstreamSourceInfo = new StreamSourceInfo('mic', undefined);\n\t\t\t\tstreamConstraints = new StreamConstraints(audioConstraintsForMic);\n\t\t\t} else if (isAudio && isVideo) {\n\t\t\t\t// audio and video\n\t\t\t\tconst audioConstraintsForMic = new AudioTrackConstraints(AudioSourceInfo.MIC);\n\t\t\t\tconst videoConstraintsForCamera = new VideoTrackConstraints(VideoSourceInfo.CAMERA);\n\t\t\t\tvideoConstraintsForCamera.resolution = { width: 1280, height: 720 };\n\t\t\t\tvideoConstraintsForCamera.frameRate = 30;\n\t\t\t\tstreamSourceInfo = new StreamSourceInfo('mic', 'camera');\n\t\t\t\tstreamConstraints = new StreamConstraints(audioConstraintsForMic, videoConstraintsForCamera);\n\t\t\t} else if (isVideo) {\n\t\t\t\t// only video\n\t\t\t\tconst videoConstraintsForCamera = new VideoTrackConstraints(VideoSourceInfo.CAMERA);\n\t\t\t\tvideoConstraintsForCamera.resolution = { width: 1280, height: 720 };\n\t\t\t\tvideoConstraintsForCamera.frameRate = 30;\n\t\t\t\tstreamSourceInfo = new StreamSourceInfo(undefined, 'camera');\n\t\t\t\tstreamConstraints = new StreamConstraints(undefined, videoConstraintsForCamera);\n\t\t\t} else if (isScreenshare) {\n\t\t\t\t// only screenshare\n\t\t\t\tconst videoConstraintsForCamera = new VideoTrackConstraints(VideoSourceInfo.SCREENCAST);\n\t\t\t\tstreamSourceInfo = new StreamSourceInfo(undefined, 'screen-cast');\n\t\t\t\tstreamConstraints = new StreamConstraints(false, videoConstraintsForCamera);\n\t\t\t} else {\n\t\t\t\t// monitoring or patient view\n\t\t\t\tstreamSourceInfo = new StreamSourceInfo(undefined, undefined);\n\t\t\t\tconst mediaStream = new MediaStream();\n\t\t\t\tconst stream = new LocalStream(mediaStream, streamSourceInfo);\n\t\t\t\tresolve(stream);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tconst mediaStream = await MediaStreamFactory.createMediaStream(streamConstraints);\n\t\t\t\tconst stream = new LocalStream(mediaStream, streamSourceInfo);\n\t\t\t\tresolve(stream);\n\t\t\t\treturn;\n\t\t\t} catch (error) {\n\t\t\t\treject(error);\n\t\t\t\treturn;\n\t\t\t}\n\t\t});\n\t};\n\n\thandelMediaStreamError = error => {\n\t\tthis.logger.error('GET USER MEDIA ERROR:', { error });\n\t\tlet errorType = StreamError.CANT_ACCESS_MEDIA_STREAM;\n\n\t\tif (error.name === 'NotFoundError' || error.name === 'DevicesNotFoundError') {\n\t\t\terrorType = StreamError.DEVICE_NOT_FOUND;\n\t\t} else if (error.name === 'NotReadableError') {\n\t\t\terrorType = error.message.includes('audio') ? StreamError.MICROPHONE_NOT_FOUND : StreamError.CAMERA_NOT_FOUND;\n\t\t} else if (error.name === 'TrackStartError') {\n\t\t\terrorType = StreamError.NOT_READABLE_ERROR;\n\t\t} else if (error.name === 'NotAllowedError') {\n\t\t\terrorType = StreamError.STREAM_NOT_ALLOWED;\n\t\t} else if (error.name === 'PermissionDismissedError') {\n\t\t\terrorType = StreamError.PERMISSION_DISMISSED;\n\t\t}\n\n\t\treturn errorType;\n\t};\n\n\tstartReAddFeedInterval = participant => {\n\t\tif (![ParticipantState.LEFT_CALL.type, ParticipantState.DISCONNECTED.type].includes(participant.state)) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { objectId } = participant;\n\n\t\tthis.p2p.allowedRemoteIds.push(participant.id);\n\n\t\tthis.emit('re-add-feed', { objectId });\n\n\t\tthis.addDeviceToMonitoring({\n\t\t\tconferenceId: this.conferenceInfo.conferenceId,\n\t\t\tparticipantId: this.conferenceInfo.participantId,\n\t\t\tparticipant: {\n\t\t\t\tobjectType: ObjectType.HELLO_DEVICE,\n\t\t\t\tobjectId,\n\t\t\t},\n\t\t});\n\n\t\tif (!this.reAddToMonitoringIntervals.get(objectId)) {\n\t\t\tthis.reAddToMonitoringIntervals.set(\n\t\t\t\tobjectId,\n\t\t\t\tsetInterval(() => {\n\t\t\t\t\tif (this.conferenceInfo && [ParticipantState.LEFT_CALL.type, ParticipantState.DISCONNECTED.type].includes(participant.state)) {\n\t\t\t\t\t\tthis.addDeviceToMonitoring({\n\t\t\t\t\t\t\tconferenceId: this.conferenceInfo.conferenceId,\n\t\t\t\t\t\t\tparticipantId: this.conferenceInfo.participantId,\n\t\t\t\t\t\t\tparticipant: {\n\t\t\t\t\t\t\t\tobjectType: ObjectType.HELLO_DEVICE,\n\t\t\t\t\t\t\t\tobjectId,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}, 10000)\n\t\t\t);\n\t\t}\n\t};\n\n\t/**\n\t * This function binds socket listeners needed in a call\n\t */\n\tbindSocketEventListeners = (playSound = true, shouldCloseSocket = true) => {\n\t\tthis.bindOn(SocketEvents.Conference.ON_RINGING, async () => {\n\t\t\tif (playSound) {\n\t\t\t\tawait outGoingCallSound();\n\t\t\t}\n\t\t})\n\t\t\t.bindOn(SocketEvents.Conference.ON_TRANSFERRED_TO_ANOTHER_CLIENT, data => {\n\t\t\t\tif (this.conferenceInfo && this.conferenceInfo.conferenceId === data.conferenceId) {\n\t\t\t\t\tthis.emit('end-call', { endReason: ConferenceEndReason.ABORTED });\n\t\t\t\t\tthis.clearManager();\n\t\t\t\t\tif (shouldCloseSocket) {\n\t\t\t\t\t\tthis.closeSocket();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t\t.bindOn(SocketEvents.Conference.ON_PARTICIPANT_DECLINED, data => {\n\t\t\t\tthis.stopTracks(this.localSrc);\n\t\t\t\tstopOutgoingCallSound();\n\t\t\t\tthis.updateParticipantStatus(ParticipantState.DECLINED.type, data);\n\t\t\t})\n\t\t\t.bindOn(SocketEvents.HelloDevice.ON_OFFLINE, this.updateParticipantStatus.bind(this, ParticipantState.OFFLINE.type))\n\t\t\t.bindOn(SocketEvents.Conference.ON_PARTICIPANT_OFFLINE, this.updateParticipantStatus.bind(this, ParticipantState.OFFLINE.type))\n\t\t\t.bindOn(SocketEvents.Conference.ON_PARTICIPANT_BUSY, data => {\n\t\t\t\tthis.emit('participant-busy', data);\n\t\t\t\tif (data.objectId) {\n\t\t\t\t\tthis.clearOutGoingCallTimerForParticipant({ objectId: data.objectId });\n\t\t\t\t}\n\t\t\t})\n\t\t\t.bindOn(SocketEvents.Conference.ON_PARTICIPANT_LEFT, data => {\n\t\t\t\tconst { conferenceId, participantId, reason } = data;\n\n\t\t\t\tconst participant = this.getParticipantByParticipantId(participantId);\n\t\t\t\tif (!this.conferenceInfo || this.conferenceInfo.conferenceId !== conferenceId || !participant) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tparticipant.state = ParticipantState.LEFT_CALL.type;\n\t\t\t\tthis.p2p.stop(participant.id);\n\n\t\t\t\tif (\n\t\t\t\t\tthis.conferenceInfo.callType === CallTypes.MONITORING &&\n\t\t\t\t\t[ParticipantRemoveReason.DISCONNECTED, ParticipantRemoveReason.DISCONNECTED_PARTICIPANT_CLEANUP].includes(reason) &&\n\t\t\t\t\tparticipant.isOnline\n\t\t\t\t) {\n\t\t\t\t\tthis.startReAddFeedInterval(participant);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis.updateParticipantStatus(ParticipantState.LEFT_CALL.type, { objectId: participant.objectId, reason });\n\t\t\t})\n\t\t\t.bindOn(SocketEvents.HelloDevice.ON_TV_RESPONSE, data => {\n\t\t\t\tthis.emit('tv-commands', data);\n\t\t\t})\n\t\t\t.bindOn(SocketEvents.HelloDevice.ON_CAMERA_RESPONSE, data => {\n\t\t\t\tthis.cameraEventInProgress = false;\n\t\t\t\tthis.emit('camera-response', data);\n\t\t\t})\n\t\t\t.bindOn(SocketEvents.HelloDevice.ON_INITIAL_STATE, data => {\n\t\t\t\tthis.emit('initial-device-state', data);\n\t\t\t})\n\t\t\t.bindOn(SocketEvents.HelloDevice.ON_AUDIO_OUTPUT_DEVICE, data => {\n\t\t\t\t// just for loging the error\n\t\t\t\tif (!data.isSwitchSuccessful) {\n\t\t\t\t\tthis.logger.error(\n\t\t\t\t\t\t`Switch was not successful! Current audio device is ${AudioOutputDevice.HELLO === data.audioOutputDevice ? 'Banyan Bridge' : 'Pillow Speaker'}`,\n\t\t\t\t\t\t{ data }\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tthis.emit('audio-output-changed', data);\n\t\t\t})\n\t\t\t.bindOn(SocketEvents.Conference.ON_ENDED, async data => {\n\t\t\t\t// if conferenceInfo exists on conference ended event it means that the remote peer ended the call\n\t\t\t\t// so we need only to clean up and we don't need to send a leave event\n\t\t\t\tif (this.conferenceInfo && this.conferenceInfo.conferenceId === data.conferenceId) {\n\t\t\t\t\tif (data.reason === ConferenceEndReason.PARTICIPANT_INVITE_DENIED) {\n\t\t\t\t\t\t// if we're only trying to invite the participant with insufficient permissions\n\t\t\t\t\t\t// the call will end and only one participant will on the list of participants\n\t\t\t\t\t\tthis.deniedParticipant = { ...Object.values(this.conferenceInfo.participants)[0] };\n\t\t\t\t\t}\n\t\t\t\t\tthis.emit('end-call', {\n\t\t\t\t\t\tendReason: data.reason,\n\t\t\t\t\t\t...(data.reason === ConferenceEndReason.PARTICIPANT_INVITE_DENIED && { deniedParticipant: this.deniedParticipant }),\n\t\t\t\t\t});\n\t\t\t\t\tthis.clearManager();\n\t\t\t\t\tif (shouldCloseSocket) {\n\t\t\t\t\t\tthis.closeSocket();\n\t\t\t\t\t}\n\n\t\t\t\t\tif (playSound) {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\tConferenceEndReason.PARTICIPANT_OFFLINE,\n\t\t\t\t\t\t\t\tConferenceEndReason.PARTICIPANT_BUSY,\n\t\t\t\t\t\t\t\tConferenceEndReason.PARTICIPANT_NOT_ANSWERING,\n\t\t\t\t\t\t\t\tConferenceEndReason.PARTICIPANT_DECLINED,\n\t\t\t\t\t\t\t].indexOf(data.reason) !== -1\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tawait busySound();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tawait dropSound();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t\t.bindOn(SocketEvents.Conference.ON_PARTICIPANT_REMOVED, data => {\n\t\t\t\tconst { actioneeParticipantId } = data;\n\t\t\t\tconst participant = this.getParticipantByParticipantId(actioneeParticipantId);\n\t\t\t\tif (participant) {\n\t\t\t\t\tthis.updateParticipantStatus(ParticipantState.REMOVED.type, { objectId: participant.objectId });\n\t\t\t\t}\n\n\t\t\t\tconst hasPeerConnectionChannelForRemoteId = this.p2p.hasPeerConnectionChannelForRemoteId(actioneeParticipantId);\n\t\t\t\tif (hasPeerConnectionChannelForRemoteId) {\n\t\t\t\t\tthis.p2p.stop(actioneeParticipantId);\n\t\t\t\t}\n\t\t\t})\n\t\t\t.bindOn(SocketEvents.Conference.ON_NEW_PARTICIPANT, data => {\n\t\t\t\tconst { conferenceInfo } = this;\n\t\t\t\tconst { participant } = data;\n\t\t\t\tif (!this.outGoingCallTimer[participant.objectId]) {\n\t\t\t\t\tthis.logger.info('Out going call timer has been executed!', { data });\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis.clearOutGoingCallTimerForParticipant({ objectId: participant.objectId });\n\n\t\t\t\tif (conferenceInfo.callType === CallTypes.SECURITYCAM) {\n\t\t\t\t\tthis.cameraFeedCall();\n\t\t\t\t} else if (conferenceInfo.callType === CallTypes.MONITORING) {\n\t\t\t\t\tthis.clearMonitoringReAddInterval(participant.objectId);\n\t\t\t\t\tthis.monitoringSendOffer(participant.id);\n\t\t\t\t} else if (conferenceInfo.callType === CallTypes.AUDIO) {\n\t\t\t\t\tthis.audioCall();\n\t\t\t\t} else if (conferenceInfo.callType === CallTypes.VIDEO) {\n\t\t\t\t\tthis.videoCall();\n\t\t\t\t}\n\n\t\t\t\tconst { mediaStream } = this.localSrc;\n\t\t\t\tif (mediaStream) {\n\t\t\t\t\tmediaStream.getTracks().forEach(track => this.bindOnTrackEndedEventListener(track, participant.id));\n\t\t\t\t}\n\t\t\t})\n\t\t\t.bindOn(SocketEvents.Conference.ON_UPDATE_PARTICIPANTS, data => {\n\t\t\t\tconst { conferenceInfo } = this;\n\t\t\t\tconst { allowedRemoteIds } = this.p2p;\n\t\t\t\tconst { conferenceId, participants } = data;\n\t\t\t\tif (conferenceInfo && conferenceId !== conferenceInfo.conferenceId) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (participants.length === 0) {\n\t\t\t\t\tthis.logger.warn('No participant to update', { data });\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// we choose updateParticipants event to insert the new participants because those are all invited participants\n\t\t\t\t// even if they don't join we still get the information about the participant being invited for a call\n\t\t\t\t// we will use participant data to send leave or remove event later during the call\n\t\t\t\tconst participant = participants[0];\n\t\t\t\t// don't update the state for participant that left the call\n\t\t\t\tif (\n\t\t\t\t\tthis.participants[participant.objectId] &&\n\t\t\t\t\t(this.participants[participant.objectId].state === ParticipantState.DISCONNECTED.type ||\n\t\t\t\t\t\t(this.participants[participant.objectId].state === ParticipantState.LEFT_CALL.type && conferenceInfo.callType !== CallTypes.MONITORING))\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (!allowedRemoteIds.includes(participant.id)) {\n\t\t\t\t\tthis.p2p.allowedRemoteIds.push(participant.id);\n\t\t\t\t}\n\t\t\t\t// add new participant or overwrite participant with the updates values\n\t\t\t\tif (!this.participants[participant.objectId]) {\n\t\t\t\t\tthis.participants[participant.objectId] = participant;\n\t\t\t\t} else {\n\t\t\t\t\tObject.assign(this.participants[participant.objectId], participant);\n\t\t\t\t}\n\t\t\t\tthis.emit('update-participant', participants);\n\t\t\t})\n\t\t\t.bindOn(SocketEvents.Client.ON_CONNECT, async () => {\n\t\t\t\tthis.emit('socket-state', { socketState: SocketState.CONNECTED });\n\t\t\t\tif (this.reconnectTimer !== null) {\n\t\t\t\t\tclearTimeout(this.reconnectTimer);\n\t\t\t\t\tthis.reconnectTimer = null;\n\t\t\t\t}\n\t\t\t})\n\t\t\t.bindOn(SocketEvents.Client.ON_AUTHENTICATED, async () => {\n\t\t\t\tthis.socketAuthorizationResolve();\n\n\t\t\t\tif (this.conferenceInfo && this.callStartedOrJoined) {\n\t\t\t\t\tconst data = await this.p2p.sendMessageToSignaling(SocketEvents.Conference.PARTICIPANT_RECONNECT, {\n\t\t\t\t\t\tconferenceId: this.conferenceInfo.conferenceId,\n\t\t\t\t\t\tparticipantId: this.conferenceInfo.participantId,\n\t\t\t\t\t\tisAudio: this.conferenceInfo.isAudio,\n\t\t\t\t\t\tisVideo: this.conferenceInfo.isVideo,\n\t\t\t\t\t\tisScreen: this.conferenceInfo.isScreen,\n\t\t\t\t\t});\n\t\t\t\t\tif (!data.isActive) {\n\t\t\t\t\t\tthis.endCall({ endReason: ConferenceEndReason.DROPPED });\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t\t// .off(SocketEvents.Client.ON_DISCONNECT)\n\t\t\t.bindOn(SocketEvents.Client.ON_DISCONNECT, reason => {\n\t\t\t\tthis.emit('socket-state', { socketState: SocketState.DISCONNECTED });\n\t\t\t\tthis.socketDisconnectReason = reason;\n\t\t\t\tif (reason === 'io client disconnect') {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (reason === 'io server disconnect') {\n\t\t\t\t\tthis.socket.connect();\n\t\t\t\t}\n\n\t\t\t\t// if after 60 seconds we still don't have a connection than show view connection lost\n\t\t\t\tthis.reconnectTimer = setTimeout(() => {\n\t\t\t\t\tclearTimeout(this.reconnectTimer);\n\t\t\t\t\tthis.reconnectTimer = null;\n\t\t\t\t\tif (this.conferenceInfo) {\n\t\t\t\t\t\tthis.endCall({ endReason: ConferenceEndReason.DROPPED });\n\t\t\t\t\t}\n\t\t\t\t}, 60000);\n\t\t\t})\n\t\t\t// .off(SocketEvents.Client.ON_RECONNECT)\n\t\t\t// .off(SocketEvents.Client.ON_RECONNECTING)\n\t\t\t// .off(SocketEvents.Client.ON_CONNECT_ERROR)\n\t\t\t.bindOn(SocketEvents.Client.ON_CONNECT_ERROR, () => {\n\t\t\t\tthis.logger.error('Socket server not responding', { id: this.socket.id });\n\t\t\t})\n\t\t\t.off(SocketEvents.User.ON_PASSWORD_CHANGED)\n\t\t\t.bindOn(SocketEvents.User.ON_PASSWORD_CHANGED, () => {\n\t\t\t\tif (!this.conferenceInfo) {\n\t\t\t\t\twindow.location.href = '/logout';\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst { callType } = this.conferenceInfo;\n\t\t\t\tthis.endCall({ endReason: ConferenceEndReason.PARTICIPANT_PASSWORD_CHANGED });\n\t\t\t\tif (callType === CallTypes.MONITORING) {\n\t\t\t\t\twindow.location.href = '/logout';\n\t\t\t\t}\n\t\t\t})\n\t\t\t.bindOn(SocketEvents.Conference.ON_TERMINATE_REQUEST, async data => {\n\t\t\t\tif (data.conferenceId === this.conferenceInfo.conferenceId) {\n\t\t\t\t\tconst response = await this.p2p.sendMessageToSignaling(SocketEvents.Conference.TERMINATE_REQUEST_ACCEPT, { conferenceId: data.conferenceId });\n\t\t\t\t\tif (!response.ok) {\n\t\t\t\t\t\tif (response.failureReason === TerminateRequestFailureReasonEnum.NULL_TERMINATE_REQUEST) {\n\t\t\t\t\t\t\t// Terminate request was canceled\n\t\t\t\t\t\t\tthis.logger.warn('Terminate request was canceled', { data });\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tthis.endCall({ endReason: ConferenceEndReason.TERMINATED_BY_ADMINISTRATOR });\n\t\t\t\t}\n\t\t\t})\n\t\t\t.bindOn(SocketEvents.Client.ON_DEVICE_ONLINE, ({ helloDeviceId: objectId }) => {\n\t\t\t\tconst participant = this.participants[objectId];\n\n\t\t\t\tif (!participant) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tparticipant.isOnline = true;\n\n\t\t\t\tif (this.conferenceInfo.callType === CallTypes.MONITORING) {\n\t\t\t\t\tthis.startReAddFeedInterval(participant);\n\t\t\t\t}\n\t\t\t})\n\t\t\t.bindOn(SocketEvents.Client.ON_DEVICE_OFFLINE, ({ helloDeviceId: objectId }) => {\n\t\t\t\tconst participant = this.participants[objectId];\n\n\t\t\t\tif (!participant) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tparticipant.isOnline = false;\n\t\t\t});\n\n\t\treturn this;\n\t};\n\n\tunbindSocketEventListeners = () => {\n\t\tObject.entries(this.socketListeners).forEach(([event, cb]) => this.socket.off(event, cb));\n\n\t\treturn this;\n\t};\n\n\tupdateParticipantStatus = (status, data) => {\n\t\tconst objectId = data.objectId || data.helloDeviceId;\n\t\tthis.emit('participant-status', { status, objectId, reason: data?.reason });\n\t\tif (objectId) {\n\t\t\tconst participant = this.participants[objectId];\n\t\t\tif (participant && status === ParticipantState.OFFLINE.type) {\n\t\t\t\tparticipant.isOnline = false;\n\t\t\t}\n\t\t\tthis.clearOutGoingCallTimerForParticipant({ objectId });\n\t\t}\n\t};\n\n\tgetInputStreamsStatus = async () => {\n\t\tif (!navigator.mediaDevices || !navigator.mediaDevices.enumerateDevices) {\n\t\t\tthis.logger.warn('enumerateDevices() not supported.');\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tconst devices = await navigator.mediaDevices.enumerateDevices();\n\t\t\tconst status = {\n\t\t\t\tmic: {\n\t\t\t\t\tavailable: false,\n\t\t\t\t\tpermission: false,\n\t\t\t\t},\n\t\t\t\tcam: {\n\t\t\t\t\tavailable: false,\n\t\t\t\t\tpermission: false,\n\t\t\t\t},\n\t\t\t};\n\n\t\t\tdevices.forEach(device => {\n\t\t\t\tif (device.kind === 'audioinput') {\n\t\t\t\t\tstatus.mic.available = true;\n\t\t\t\t\tif (device.label) {\n\t\t\t\t\t\tstatus.mic.permission = true;\n\t\t\t\t\t}\n\t\t\t\t} else if (device.kind === 'videoinput') {\n\t\t\t\t\tstatus.cam.available = true;\n\t\t\t\t\tif (device.label) {\n\t\t\t\t\t\tstatus.cam.permission = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn status;\n\t\t} catch (err) {\n\t\t\tthis.logger.error(`Can't enumerate devices. ${err.message}`);\n\t\t}\n\t};\n\n\tcheckForStreamPermissions = options => {\n\t\treturn new Promise(resolve => {\n\t\t\tconst { isAudio, isVideo } = options;\n\t\t\tconst streamInterval = setInterval(async () => {\n\t\t\t\tconst status = await this.getInputStreamsStatus();\n\t\t\t\tconst streamPermission = this.validateStreamStatus(isAudio, isVideo, status);\n\t\t\t\tif (!streamPermission) {\n\t\t\t\t\tthis.emit('stream-permission', null);\n\t\t\t\t\tclearInterval(streamInterval);\n\t\t\t\t\tresolve();\n\t\t\t\t}\n\t\t\t}, 2000);\n\t\t});\n\t};\n\n\t/**\n\t * Method used to start outgoing call timer for a participant\n\t * @function startOutGoingCallTimerForParticipant\n\t * @param {Object} data\n\t * @param {Number} data.objectId\n\t */\n\tstartOutGoingCallTimerForParticipant = data => {\n\t\tconst { objectId } = data;\n\n\t\tif (!objectId) {\n\t\t\tthis.logger.warn('Missing participant object id.');\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.outGoingCallTimer[objectId]) {\n\t\t\tclearTimeout(this.outGoingCallTimer[objectId]);\n\t\t}\n\n\t\tthis.outGoingCallTimer[objectId] = setTimeout(() => {\n\t\t\tstopOutgoingCallSound();\n\t\t\t// clearOutGoingCallTimerForParticipant will be cleared in updateParticipantStatus function\n\t\t\tthis.updateParticipantStatus(ParticipantState.NOT_ANSWERING.type, { objectId });\n\n\t\t\tconst participant = this.participants[objectId];\n\t\t\tif (!participant) {\n\t\t\t\tthis.logger.warn('Participant was not found in participants', { objectId });\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (this.conferenceInfo.callType !== CallTypes.MONITORING) {\n\t\t\t\tthis.endCall({ endReason: ConferenceEndReason.PARTICIPANT_NOT_ANSWERING });\n\t\t\t} else {\n\t\t\t\tthis.removeDeviceFromMonitoring({\n\t\t\t\t\tconferenceId: this.conferenceInfo.conferenceId,\n\t\t\t\t\tparticipantId: this.conferenceInfo.participantId,\n\t\t\t\t\tactioneeParticipantId: participant.id,\n\t\t\t\t});\n\t\t\t}\n\t\t}, 60000);\n\t};\n\n\t/**\n\t * Method used to clear the timer for outgoing call timer for a participant\n\t * @function clearOutGoingCallTimerForParticipant\n\t * @param {Object} data\n\t * @param {Number} data.objectId\n\t */\n\tclearOutGoingCallTimerForParticipant = data => {\n\t\tconst { objectId } = data;\n\n\t\tif (this.outGoingCallTimer && this.outGoingCallTimer[objectId]) {\n\t\t\tclearTimeout(this.outGoingCallTimer[objectId]);\n\t\t\tdelete this.outGoingCallTimer[objectId];\n\t\t}\n\t};\n\n\t/**\n\t * Remove peer connection channel track by id\n\t * @function removeTrackById\n\t * @param {string} participantId\n\t * @param {string} trackId\n\t */\n\tremoveTrackById = (participantId, trackId) => {\n\t\tconst offer = this.newOffer(this.conferenceInfo.isAudio, this.conferenceInfo.isVideo, this.conferenceInfo.isScreen);\n\t\tif (this.conferenceInfo.callType === CallTypes.MONITORING) {\n\t\t\toffer.isAudio = true;\n\t\t\toffer.actioneeParticipantId = participantId;\n\t\t}\n\n\t\tthis.p2p.removeTrack(participantId, trackId, offer);\n\t};\n\n\tgetStats = () => {\n\t\treturn this.p2p.getStats(this.callerParticipantId);\n\t};\n\n\tisIoConnected = () => {\n\t\treturn this.socket !== null && this.socket.connected;\n\t};\n\n\tonPeerConnectionCreated = (pccObj, remoteParticipantId) => {\n\t\tconst exposePeerconnections =\n\t\t\tprocess.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test'\n\t\t\t\t? process.env.REACT_APP_EXPOSE_PEERCONNECTIONS\n\t\t\t\t: window.__env__.REACT_APP_EXPOSE_PEERCONNECTIONS;\n\t\tif (exposePeerconnections === 'true') {\n\t\t\tif (!window.peerConnections) {\n\t\t\t\twindow.peerConnections = [];\n\t\t\t}\n\t\t\twindow.peerConnections.push(pccObj);\n\t\t}\n\n\t\tif (this._useCallStats) {\n\t\t\tthis._callStats.addPeerConnection({\n\t\t\t\tpcObject: pccObj,\n\t\t\t\tpushInterval: this._sendCallStatsInterval,\n\t\t\t\tconferenceId: this.conferenceInfo.conferenceId,\n\t\t\t\tparticipantId: this.conferenceInfo.participantId,\n\t\t\t\tremoteParticipantId: remoteParticipantId,\n\t\t\t\tuserId: localStorage.getItem('userId'),\n\t\t\t});\n\t\t}\n\n\t\tpccObj.onconnectionstatechange = event => this.onConnectionStateChange(event, remoteParticipantId);\n\t};\n\n\tonConnectionStateChange = (event, remoteParticipantId, stream) => {\n\t\tthis.p2p.sendMessageToSignaling(SocketEvents.Conference.PEER_CONNECTION_STATE_CHANGED, {\n\t\t\tconferenceId: this.conferenceInfo.conferenceId,\n\t\t\tparticipantId: this.conferenceInfo.participantId,\n\t\t\tactioneeParticipantId: remoteParticipantId,\n\t\t\tstate: event.currentTarget.connectionState,\n\t\t\tpeerConnection: event.currentTarget,\n\t\t});\n\n\t\tconst { connectionState } = event.currentTarget;\n\t\tthis.logger.debug(`Peer connection state changed \"${connectionState}\" \\nactioneeParticipantId ${remoteParticipantId}`);\n\n\t\tconst { objectId } = this.getParticipantByParticipantId(remoteParticipantId);\n\n\t\tthis.participants[objectId].peerConnectionState = connectionState;\n\t\tif (connectionState === RTCPeerConnectionEnum.CONNECTION_STATE.FAILED && !this.participants[objectId].reconnecting) {\n\t\t\tthis.participants[objectId].reconnecting = true;\n\t\t\tthis.handleReconnectingWithParticipant(remoteParticipantId, stream);\n\t\t} else if (connectionState === RTCPeerConnectionEnum.CONNECTION_STATE.CONNECTED && this.participants[objectId].reconnecting) {\n\t\t\tthis.participants[objectId].reconnecting = false;\n\t\t}\n\t\tthis.emit('peer-connection-state', {\n\t\t\tparticipantObjectId: objectId,\n\t\t\tpeerConnectionState: connectionState,\n\t\t});\n\t};\n\n\t/**\n\t * Get participant from participants by participant id\n\t * @function getParticipantById\n\t * @param {string} participantId\n\t * @returns {Object} participant\n\t */\n\tgetParticipantByParticipantId = participantId => {\n\t\tconst participant = Object.values(this.participants).find(p => p.id.toString() === participantId);\n\t\treturn participant;\n\t};\n\n\trebootHuddleCam = ({ conferenceId, participantId, helloDeviceId }) => {\n\t\treturn this.p2p.sendMessageToSignaling(SocketEvents.HelloDevice.COMMAND, {\n\t\t\tconferenceId,\n\t\t\tparticipantId,\n\t\t\thelloDeviceId,\n\t\t\tcommand: DeviceCommands.REBOOT_HUDDLE_CAM,\n\t\t});\n\t};\n\n\t/**\n\t * @param {string} message Message to log\n\t * @param {object} [rest] Metadata\n\t * @returns {Promise}\n\t */\n\tpublishConferenceLog = (message, rest = {}) => {\n\t\treturn this.p2p.sendMessageToSignaling(SocketEvents.Conference.LOG, {\n\t\t\tmessage: message,\n\t\t\tparticipantId: this.conferenceInfo.participantId,\n\t\t\tconferenceId: this.conferenceInfo.conferenceId,\n\t\t\t...rest,\n\t\t});\n\t};\n\n\tmonitoringTrackToggled = async (isEnabled, actioneeParticipantId) => {\n\t\tconst toggleInfo = {\n\t\t\tconferenceId: this.conferenceInfo.conferenceId,\n\t\t\tparticipantId: this.conferenceInfo.participantId,\n\t\t\tactioneeParticipantId: actioneeParticipantId,\n\t\t\thasAudio: isEnabled,\n\t\t};\n\n\t\treturn this.p2p.sendMessageToSignaling(SocketEvents.Conference.AUDIO_TRACK_TOGGLED, toggleInfo);\n\t};\n}\n\nexport default CallManager;\n","import React, { useState } from 'react';\nimport styled, { css } from 'styled-components';\nimport PropTypes from 'prop-types';\n\nconst NotesWrapper = styled.section`\n\tposition: relative;\n\twidth: 100%;\n\theight: 60px;\n\n\t${props =>\n\t\tprops.isHidden &&\n\t\tcss`\n\t\t\tdisplay: none;\n\t\t`}\n\n\t&::before {\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\ttop: -9px;\n\t\tleft: 0;\n\t\twidth: 100%;\n\t\theight: 10px;\n\t\tbackground: linear-gradient(to top, rgba(0, 0, 0, 0.05), transparent);\n\t}\n\n\ttextarea {\n\t\tresize: none;\n\t\twidth: 100%;\n\t\tborder: none;\n\t\toutline: none;\n\t\tpadding: var(--spacing-m);\n\t\tcolor: var(--gray-5);\n\t\tbox-shadow: 0 1px 2px rgb(0 0 0 / 10%);\n\t\theight: 100%;\n\t\tpadding-right: calc(var(--spacing-sssl) + var(--spacing-m));\n\t}\n\n\ttextarea::placeholder {\n\t\tcolor: var(--gray-3);\n\t}\n\n\ttextarea:focus {\n\t\toutline: none;\n\t}\n\n\t> div:first-of-type {\n\t\tposition: absolute;\n\t\ttop: var(--spacing-m);\n\t\tright: var(--spacing-m);\n\n\t\tbutton {\n\t\t\tmargin-left: var(--spacing-m);\n\t\t\tpadding: 0;\n\t\t\tbackground: transparent;\n\t\t\tborder: none;\n\n\t\t\ti {\n\t\t\t\tfont-size: 18px;\n\t\t\t\tcursor: pointer;\n\t\t\t\tcolor: var(--gray-4);\n\t\t\t\tuser-select: none;\n\t\t\t}\n\t\t}\n\t}\n\n\t> div:last-of-type {\n\t\tposition: absolute;\n\t\tright: var(--spacing-m);\n\t\tbottom: var(--spacing-s);\n\t\tfont-size: 12px;\n\t\tcolor: var(--gray-3);\n\t}\n`;\n\nconst Notes = props => {\n\tconst [note, setNote] = useState('');\n\tconst [noteFontSize, setNoteFontSize] = useState(14);\n\n\tconst minFontSize = 10;\n\tconst maxFontSize = 14;\n\tconst maxCharacters = 250;\n\treturn (\n\t\t\n\t\t\t setNote(e.target.value)}\n\t\t\t\tvalue={note}\n\t\t\t\tname='note'\n\t\t\t\trows={2}\n\t\t\t\tplaceholder='Enter note here'\n\t\t\t/>\n\n\t\t\t
    \n\t\t\t\t {\n\t\t\t\t\t\tif (noteFontSize > minFontSize) {\n\t\t\t\t\t\t\tsetNoteFontSize(prevState => prevState - 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t\tclassName={noteFontSize === minFontSize ? 'disabled' : ''}>\n\t\t\t\t\ttext_decrease\n\t\t\t\t\n\t\t\t\t {\n\t\t\t\t\t\tif (noteFontSize < maxFontSize) {\n\t\t\t\t\t\t\tsetNoteFontSize(prevState => prevState + 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t\tclassName={noteFontSize === maxFontSize ? 'disabled' : ''}>\n\t\t\t\t\ttext_increase\n\t\t\t\t\n\t\t\t
    \n\t\t\t
    {`${note.length}/${maxCharacters}`}
    \n\t\t
    \n\t);\n};\n\nNotes.propTypes = {\n\tisHidden: PropTypes.bool,\n};\n\nexport default Notes;\n","import React, { useEffect, useState } from 'react';\nimport classNames from 'classnames';\n\n/**\n * @typedef {React.ButtonHTMLAttributes & { audioTrack: any, toggle: (isActive: boolean) => void }} HTMLAttributesWithProps\n */\nconst LocalMicBtn = (/** @type {HTMLAttributesWithProps} */ { audioTrack, toggle, ...htmlAttributes }) => {\n\tconst [isActive, setIsMyMicActive] = useState(false);\n\n\tuseEffect(() => {\n\t\tsetIsMyMicActive(audioTrack && audioTrack.enabled);\n\t}, [audioTrack, audioTrack?.enabled]);\n\n\treturn (\n\t\t toggle(!isActive)}>\n\t\t\t\n\t\t\t\t{isActive ? 'mic' : 'mic_off'}\n\t\t\t\n\t\t\n\t);\n};\n\nexport default LocalMicBtn;\n","import React, { Component } from 'react';\nimport styled, { css } from 'styled-components';\nimport { Loader, Dropdown, ListGroup } from 'components';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames/bind';\nimport { ParticipantState, DeviceStatusMessages, FeedColors, ParticipantRemoveReason } from 'constants/enums';\nimport Notes from 'components/Monitoring/Notes';\nimport ReactDOM from 'react-dom';\nimport LocalMicBtn from 'components/Monitoring/LocalMicButton';\n\nclass VideoFeed extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tisFeedExpanded: false,\n\t\t\tshowMicPortal: false,\n\t\t\tshowCamPortal: false,\n\t\t};\n\n\t\tthis.videoRef = null;\n\t\tthis.micBtnRef = React.createRef();\n\t\tthis.camBtnRef = React.createRef();\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.setVideoRefSource();\n\t}\n\n\tcomponentDidUpdate(prevProps) {\n\t\tif (\n\t\t\tthis.props.src &&\n\t\t\t(!prevProps.src ||\n\t\t\t\t(prevProps.src && prevProps.src.id !== this.props.src.id) ||\n\t\t\t\tprevProps.peerConnectionState !== this.props.peerConnectionState ||\n\t\t\t\tprevProps.disableButtons !== this.props.disableButtons)\n\t\t) {\n\t\t\tthis.setVideoRefSource();\n\t\t}\n\t}\n\n\tsetVideoRefSource() {\n\t\tif (this.videoRef) {\n\t\t\tthis.videoRef.srcObject = this.props.src.mediaStream;\n\t\t}\n\t}\n\n\tgetDeviceStatus() {\n\t\tswitch (this.props.status) {\n\t\t\tcase ParticipantState.BUSY.type:\n\t\t\t\tif (this.props.onPatientBusyNurse && this.props.onPatientBusyNurse.name) {\n\t\t\t\t\treturn `${DeviceStatusMessages.deviceOnCallWithNurse} ${this.props.onPatientBusyNurse.name}.`;\n\t\t\t\t}\n\t\t\t\treturn DeviceStatusMessages.deviceOnCall;\n\t\t\tcase ParticipantState.OFFLINE.type:\n\t\t\t\treturn DeviceStatusMessages.deviceOffline;\n\t\t\tcase ParticipantState.NOT_ANSWERING.type:\n\t\t\t\treturn DeviceStatusMessages.notAnswering;\n\t\t\tcase ParticipantState.DISCONNECTED.type:\n\t\t\tcase ParticipantState.LEFT_CALL.type:\n\t\t\t\treturn this.props.removeReason === ParticipantRemoveReason.FAILED_TO_GET_INFO\n\t\t\t\t\t? DeviceStatusMessages.participantInviteFailed\n\t\t\t\t\t: DeviceStatusMessages.leftCall;\n\t\t\tcase ParticipantState.RECONNECTING.type:\n\t\t\t\treturn DeviceStatusMessages.reconnecting;\n\t\t\tcase ParticipantState.REMOVED.type:\n\t\t\t\treturn DeviceStatusMessages.removed;\n\t\t\tcase ParticipantState.INVITE_DENIED.type:\n\t\t\t\treturn DeviceStatusMessages.participantInviteDenied;\n\t\t\tcase ParticipantState.FAILED_TO_GET_INFO.type:\n\t\t\t\treturn DeviceStatusMessages.participantInviteFailed;\n\t\t\tdefault:\n\t\t\t\treturn DeviceStatusMessages.initiatingMonitoring;\n\t\t}\n\t}\n\n\tsetFeedColor = (event, item) => {\n\t\tthis.props.onSetFeedColor(item.color);\n\t};\n\n\ttoggleExpand = () => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisFeedExpanded: !this.state.isFeedExpanded,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.props.onExpandClick();\n\t\t\t}\n\t\t);\n\t};\n\n\tcheckIsColorActive = color => {\n\t\treturn this.props.feedColors && this.props.feedColors.length > 0 && this.props.feedColors.find(item => item === color);\n\t};\n\n\tgetTooltipElement = (ref, text) => {\n\t\tconst toolTipElementProperties = ref.getBoundingClientRect();\n\n\t\tconst style = {\n\t\t\tzIndex: 999999,\n\t\t\tposition: 'absolute',\n\t\t\tbackground: 'var(--gray-5)',\n\t\t\tmaxWidth: '300px',\n\t\t\tfontSize: '12px',\n\t\t\tcolor: 'var(--gray-0)',\n\t\t\tboxShadow: '0 1px 2px rgb(0 0 0 / 10%)',\n\t\t\tborderRadius: 'var(--border-radius)',\n\t\t\tfontFamily: 'var(--font-family)',\n\t\t\tright: window.innerWidth - toolTipElementProperties?.right,\n\t\t\t...{ top: toolTipElementProperties?.top + 25 },\n\t\t};\n\t\treturn {text};\n\t};\n\n\trender() {\n\t\tconst showFeed = this.props.src !== null && this.props.status === ParticipantState.CONNECTED.type;\n\t\tconst showButtons = !this.props.disableButtons && this.props.status === ParticipantState.CONNECTED.type;\n\n\t\treturn (\n\t\t\t\n\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t

    {this.props.title}

    \n\t\t\t\t\t\t{showButtons && (\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfiber_manual_record\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\ttitle: (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSuspicious Behavior\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{this.checkIsColorActive(FeedColors.purple) && done}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\tcolor: FeedColors.purple,\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\ticon: (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfiber_manual_record\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\ttitle: (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSuicide Watch\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{this.checkIsColorActive(FeedColors.cyan) && done}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\tcolor: FeedColors.cyan,\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\ticon: (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfiber_manual_record\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\ttitle: (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tFalls\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{this.checkIsColorActive(FeedColors.yellow) && done}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\tcolor: FeedColors.yellow,\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\ticon: (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfiber_manual_record\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\ttitle: (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tIsolation\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{this.checkIsColorActive(FeedColors.red) && done}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\tcolor: FeedColors.red,\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\ticon: (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfiber_manual_record\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\ttitle: (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSeizure\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{this.checkIsColorActive(FeedColors.pink) && done}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\tcolor: FeedColors.pink,\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\ticon: (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfiber_manual_record\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\ttitle: (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tHospice\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{this.checkIsColorActive(FeedColors.black) && done}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\tcolor: FeedColors.black,\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\ticon: (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfiber_manual_record\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\ttitle: (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDetox\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{this.checkIsColorActive(FeedColors.orange) && done}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\tcolor: FeedColors.orange,\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\ticon: (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfiber_manual_record\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\ttitle: (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tPulling O2\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{this.checkIsColorActive(FeedColors.lightBlue) && done}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\tcolor: FeedColors.lightBlue,\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\ticon: (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfiber_manual_record\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\ttitle: (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tImpulsive/Confused\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{this.checkIsColorActive(FeedColors.gray) && done}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\tcolor: FeedColors.gray,\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\ticon: (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfiber_manual_record\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\ttitle: (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tNon-redirectable\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{this.checkIsColorActive(FeedColors.blue) && done}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\tcolor: FeedColors.blue,\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t\t\t\t\tonItemClick={this.setFeedColor}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t{this.props.isMicPrivacyOn && (\n\t\t\t\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t\t\t\t\t this.setState({ showMicPortal: true })}\n\t\t\t\t\t\t\t\t\t\t\t\tonMouseLeave={() => this.setState({ showMicPortal: false })}>\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\tmic_off\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t\t{this.micBtnRef?.current &&\n\t\t\t\t\t\t\t\t\t\t\t\tthis.state.showMicPortal &&\n\t\t\t\t\t\t\t\t\t\t\t\tReactDOM.createPortal(\n\t\t\t\t\t\t\t\t\t\t\t\t\tthis.getTooltipElement(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.micBtnRef?.current,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'You are not hearing the patient because the physical mic privacy button has been enabled on Banyan Bridge. This button can be disabled only manually. Please contact your administrator.'\n\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('tooltip-root')\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t{this.props.isCameraPrivacyOn && (\n\t\t\t\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t\t\t\t\t this.setState({ showCamPortal: true })}\n\t\t\t\t\t\t\t\t\t\t\t\tonMouseLeave={() => this.setState({ showCamPortal: false })}>\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\tvideocam_off\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t\t{this.camBtnRef?.current &&\n\t\t\t\t\t\t\t\t\t\t\t\tthis.state.showCamPortal &&\n\t\t\t\t\t\t\t\t\t\t\t\tReactDOM.createPortal(\n\t\t\t\t\t\t\t\t\t\t\t\t\tthis.getTooltipElement(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.camBtnRef?.current,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'You are not seeing the patient because the physical camera privacy button has been enabled on Banyan Bridge. This button can be disabled only manually. Please contact your administrator.'\n\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('tooltip-root')\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!showButtons && (\n\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t)}\n\t\t\t\t\t
    \n\t\t\t\t\t{showFeed && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t
    \n\t\t\t\t{}\n\n\t\t\t\t{!showFeed && (\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    {this.getDeviceStatus()}

    \n\t\t\t\t\t\t{this.props.status === ParticipantState.CONNECTING.type && }\n\t\t\t\t\t
    \n\t\t\t\t)}\n\t\t\t\t{this.props.children}\n\t\t\t
    \n\t\t);\n\t}\n}\n\nconst VideoFeedWrapper = styled.div`\n\tbackground: var(--gray-5);\n\tposition: relative;\n\tmax-height: calc(100vh - 115px);\n\tdisplay: flex;\n\tflex-direction: column;\n\n\tmain {\n\t\tflex: 1;\n\t\tmin-height: 0;\n\t\tposition: relative;\n\t}\n\n\tli {\n\t\tlist-style: none;\n\t\tdisplay: flex;\n\n\t\tbutton {\n\t\t\t&::before {\n\t\t\t\twhite-space: normal;\n\t\t\t\twidth: 200px;\n\t\t\t}\n\t\t}\n\n\t\t[data-tooltip],\n\t\t[data-tooltip] i {\n\t\t\tcursor: default;\n\t\t}\n\t}\n\n\theader {\n\t\twidth: 100%;\n\t\tdisplay: flex;\n\t\talign-items: flex-start;\n\t\tpadding: var(--spacing-s) var(--spacing-m);\n\t\theight: 30px;\n\t\tz-index: 1;\n\t\tbackground: var(--gray-3);\n\n\t\tul {\n\t\t\tdisplay: flex;\n\n\t\t\tli {\n\t\t\t\tbutton.mic-cam-btn {\n\t\t\t\t\tposition: relative;\n\t\t\t\t\t&::after {\n\t\t\t\t\t\tdisplay: none;\n\t\t\t\t\t}\n\t\t\t\t\t&:hover {\n\t\t\t\t\t\t&::after {\n\t\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\t\tcontent: '';\n\t\t\t\t\t\t\tbackground: var(--gray-5);\n\t\t\t\t\t\t\tpadding: 4px;\n\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\tleft: 50%;\n\t\t\t\t\t\t\ttop: calc(100% + var(--spacing-s));\n\t\t\t\t\t\t\ttransform: translate(-50%, -50%) rotate(45deg);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t\tpadding: var(--spacing-m);\n\n\t\t\t\t\t> i {\n\t\t\t\t\t\tpadding-right: var(--spacing-s);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbutton i,\n\t\t.dropdown i {\n\t\t\tcolor: var(--gray-0);\n\t\t\tcursor: pointer;\n\t\t\tfont-size: 18px;\n\t\t\tmargin-right: 0 !important;\n\t\t}\n\n\t\t.dropdown ul li a span {\n\t\t\tmargin-right: var(--spacing-s);\n\t\t}\n\n\t\t.dropdown ul li a span + i {\n\t\t\tcolor: var(--gray-5);\n\t\t\tmargin-left: auto;\n\t\t\tfont-size: 16px;\n\t\t}\n\n\t\tbutton {\n\t\t\tbackground: none;\n\t\t\tborder: none;\n\t\t\tfont-size: 0;\n\t\t}\n\t}\n\n\t.center-loader {\n\t\ttop: calc(50% + 15px);\n\t\twidth: calc(100% - var(--spacing-m));\n\t}\n\n\t.center-loader p {\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t}\n\n\t.center-loader {\n\t\ttop: calc(50% + 15px);\n\t\twidth: calc(100% - var(--spacing-m));\n\t}\n\n\t.center-loader p {\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t}\n\n\th1 {\n\t\tfont-size: 14px;\n\t\tcolor: var(--gray-0);\n\t\tpadding: 0;\n\t\tmargin: 0;\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t\tflex: 1;\n\t\ttext-align: left;\n\t\ttext-overflow: ellipsis;\n\t}\n\n\t> div {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tmargin-left: auto;\n\t}\n\n\t.dropdown__items a > i {\n\t\tmargin: 0;\n\t}\n\n\tvideo {\n\t\twidth: 100%;\n\t\theight: calc(100% - 30px);\n\t}\n\n\t.dropdown {\n\t\tpadding: 0;\n\t}\n`;\n\nconst VideoFeedBottomOptions = styled.div`\n\tposition: absolute;\n\tbottom: var(--spacing-m);\n\twidth: 100%;\n\tfont-size: 0;\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\tpadding-right: var(--spacing-m);\n\n\tbutton {\n\t\tborder: none;\n\t\tbackground: var(--red-1);\n\t\tpadding: var(--spacing-s);\n\t\tborder-radius: 100%;\n\t\ti {\n\t\t\tcursor: pointer;\n\t\t\tcolor: var(--gray-0) !important;\n\t\t\tfont-size: 16px;\n\t\t\tmargin-right: 0px;\n\t\t}\n\n\t\t&.active {\n\t\t\tbackground: var(--blue-2);\n\t\t}\n\t}\n\n\tbutton + button {\n\t\tmargin-right: 0;\n\t}\n\n\t.call-button:not(:last-child) {\n\t\tmargin-right: var(--spacing-s);\n\t}\n`;\n\nconst VideoFeedColorsWrapper = styled.div`\n\tdisplay: flex;\n\theight: 5px;\n\twidth: 100%;\n\tposition: absolute;\n\tz-index: 1;\n\tbottom: -5px;\n\n\t${props =>\n\t\t!props.isFeedExpanded &&\n\t\tprops.isAnyFeedExpanded &&\n\t\tcss`\n\t\t\tbottom: 0;\n\t\t`}\n\n\tdiv {\n\t\tflex: 1;\n\t\theight: 100%;\n\t}\n`;\n\nconst PortalTooltip = styled.div`\n\tpadding: var(--spacing-l);\n\tbackground: var(--gray-6);\n`;\n\nVideoFeed.propTypes = {\n\tsrc: PropTypes.object,\n\ttitle: PropTypes.string,\n\tonCloseClick: PropTypes.func,\n\tsocketState: PropTypes.object,\n\tonIncreaseBitrate: PropTypes.func,\n\tisFeedExpanded: PropTypes.bool,\n\tisAnyFeedExpanded: PropTypes.bool,\n};\n\nexport default VideoFeed;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport { Toggle, Tilt } from 'components';\nimport { CameraType } from 'constants/enums';\nimport Modal from 'components/Modal';\nimport Form from 'components/Form';\n\nclass CameraControls extends Component {\n\tconstructor(props, context) {\n\t\tsuper(props, context);\n\n\t\tthis.state = {\n\t\t\tisRebootCameraModalOpen: false,\n\t\t};\n\t}\n\n\tonRebootHuddleCamClick = async () => {\n\t\tif (!this.state.isRebootCameraModalOpen) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.props.onRebootHuddleCam();\n\n\t\tthis.setState({ isRebootCameraModalOpen: false });\n\t};\n\n\trender() {\n\t\tconst { state, props } = this;\n\t\tconst shouldDisableTilt = props.isDisabled || (props.isCameraPrivacyOn && props.cameraType === CameraType.HELLO);\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{props.showPTZ && (\n\t\t\t\t\t
    \n\t\t\t\t\t\t this.setState({ isRebootCameraModalOpen: true })}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t\n\t\t\t\t\t\t{props.cameraType === CameraType.HUDDLE && (\n\t\t\t\t\t\t\t this.setState({ isRebootCameraModalOpen: false })}>\n\t\t\t\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t\t\t\t

    Are you sure you want to reboot huddle cam?

    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t
    \n\t\t\t\t)}\n\t\t\t\n\t\t);\n\t}\n}\n\nCameraControls.defaultProps = {\n\tshowPTZ: true,\n\tcameraType: CameraType.HELLO,\n\tcameraZoomLevel: 0,\n\tisHuddleCamConnected: true,\n};\n\nCameraControls.propTypes = {\n\tshowPTZ: PropTypes.bool,\n\tcameraType: PropTypes.string,\n\tcameraZoomLevel: PropTypes.number,\n\tonToggleCameraSwitch: PropTypes.func,\n\tonZoomCamera: PropTypes.func,\n\tonPanTiltCamera: PropTypes.func,\n\tonRebootHuddleCam: PropTypes.func,\n\tdisabledTiltDirections: PropTypes.object,\n\tisHuddleCamConnected: PropTypes.bool,\n};\n\nexport default CameraControls;\n","import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport v4 from 'uuid';\nimport { Prompt } from 'react-router-dom';\nimport _ from 'lodash';\nimport classNames from 'classnames/bind';\n\nimport { actionCreators } from 'state/organization/actions';\nimport { SocketContext } from 'io-client/SocketContext';\nimport CallManager from 'owt/p2p/CallManager';\nimport { ConferenceInfo, ConferenceParticipant, FromUser } from 'owt/base/conference';\nimport { Grid, Modal, Form, Alert } from 'components';\nimport VideoFeed from 'components/Monitoring/VideoFeed';\nimport Layout from 'components/Common/Layout';\nimport SectorList from 'components/Common/SectorList';\nimport Header from 'components/Common/Header';\nimport CameraControls from 'components/Common/CameraControls';\nimport StreamPermissions from 'components/StreamPermissions';\nimport {\n\tCallTypes,\n\tObjectType,\n\tParticipantState,\n\tSectorTypes,\n\tSocketState,\n\tConferenceEndReason,\n\tRTCPeerConnectionEnum,\n\tCameraType,\n\tCameraEventTypes,\n\tCameraTiltDirection,\n\tCameraTiltAction,\n\tZoomDirection,\n\tMediaPermissions,\n\tMediaTypes,\n\tStreamError,\n\tParticipantRemoveReason,\n\tToggleFailureReasonEnum,\n\tInviteParticipantFailureReason,\n} from 'constants/enums';\nimport { findSectorById, sortArrayByProperty, askForPermission, checkForPermission, checkIfMediaDevicesPlugged } from 'infrastructure/helpers/commonHelpers';\nimport SocketEvents from 'constants/socket-events';\nimport { APP_CONFIG } from 'constants/global-variables';\nimport { getUserProfile } from 'infrastructure/auth';\nimport UnassignedNurse from './UnassignedNurse';\n\nclass Monitoring extends Component {\n\tconstructor(props, context) {\n\t\tsuper(props, context);\n\t\tthis.state = {\n\t\t\tvideoFeeds: {},\n\t\t\tparticipants: {},\n\t\t\tconferenceInfo: null,\n\t\t\tisFeedZoomed: false,\n\t\t\troomHasDeviceAssigned: true,\n\t\t\tcurrentRoomName: '',\n\t\t\tisSecondColumnCollapsed: false,\n\t\t\tshowDeviceControlsLockedModal: false,\n\t\t\tsocketState: SocketState.CONNECTED,\n\t\t\thasActiveConference: false,\n\t\t\tconferenceEndReason: null,\n\t\t\tshouldShowSwitchToHelloCamError: false,\n\t\t\tshowAllowMicrophoneModal: false,\n\t\t\tstatAlarmError: '',\n\t\t\tdeniedParticipant: null,\n\t\t\tinitiatorInfoFailed: false,\n\t\t};\n\t\tthis.lowerBitrateFeedCountThreshold = 4;\n\t\tthis.micStatus = null;\n\t\tthis.camStatus = null;\n\t\tthis.previousParticipantId = null;\n\t\tthis.callManager = new CallManager(this.context, {\n\t\t\tuseCallStats: APP_CONFIG.useCallStats && APP_CONFIG.sendCallStatsOnMonitoring,\n\t\t\tsendCallStatsInterval: APP_CONFIG.sendCallStatsInterval,\n\t\t});\n\t}\n\n\tasync componentDidMount() {\n\t\tthis.camStatus = await checkForPermission(MediaTypes.CAMERA);\n\t\tthis.micStatus = await checkForPermission(MediaTypes.MICROPHONE);\n\t\tthis.micStatus.onchange = this.onDevicePermissionChange;\n\t\tthis.callManager\n\t\t\t.on('peer-stream', data => {\n\t\t\t\tconst { origin } = data.peerSrc;\n\t\t\t\tconst { videoFeeds, conferenceInfo } = this.state;\n\n\t\t\t\tconst feed = this.getVideoFeedByParticipantId(origin, videoFeeds);\n\t\t\t\tif (!feed) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfeed.conference = conferenceInfo;\n\t\t\t\tfeed.src = data.peerSrc;\n\t\t\t\tfeed.status = ParticipantState.CONNECTED.type;\n\n\t\t\t\tthis.handleBitrateChange();\n\t\t\t\tthis.setState({ videoFeeds });\n\t\t\t})\n\t\t\t.on('update-participant', data => {\n\t\t\t\tconst { participants, videoFeeds } = this.state;\n\t\t\t\tdata.forEach(p => {\n\t\t\t\t\tparticipants[p.id] = {\n\t\t\t\t\t\tid: p.id,\n\t\t\t\t\t\tobjectId: p.objectId,\n\t\t\t\t\t};\n\t\t\t\t\tconst feed = videoFeeds[p.objectId];\n\t\t\t\t\tif (!!feed) {\n\t\t\t\t\t\tfeed.participantId = p.id;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tthis.setState({ participants });\n\t\t\t})\n\t\t\t.on('call-started', data => {\n\t\t\t\tif (data.failedInvites) {\n\t\t\t\t\tconst { videoFeeds } = this.state;\n\t\t\t\t\tObject.values(videoFeeds).forEach(v => {\n\t\t\t\t\t\tconst newFeed = { ...v };\n\t\t\t\t\t\tconst failedFeed = data.failedInvites.find(f => f.objectId === v.deviceId);\n\t\t\t\t\t\tif (failedFeed.reason === InviteParticipantFailureReason.INVITE_DENIED) {\n\t\t\t\t\t\t\tnewFeed.status = ParticipantState.INVITE_DENIED.type;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (failedFeed.reason === InviteParticipantFailureReason.FAILED_TO_GET_INFO) {\n\t\t\t\t\t\t\tnewFeed.status = ParticipantState.FAILED_TO_GET_INFO.type;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvideoFeeds[v.deviceId] = newFeed;\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tthis.setState({ conferenceInfo: data.conferenceInfo, hasActiveConference: false });\n\t\t\t})\n\t\t\t.on('participant-status', statusResponse => {\n\t\t\t\tconst { status, objectId, reason } = statusResponse;\n\t\t\t\tconst { videoFeeds } = this.state;\n\n\t\t\t\tconst feed = videoFeeds[objectId];\n\t\t\t\tif (feed) {\n\t\t\t\t\tif (\n\t\t\t\t\t\t(feed.status === ParticipantState.LEFT_CALL.type && status !== ParticipantState.REMOVED.type) ||\n\t\t\t\t\t\tfeed.status === ParticipantState.DISCONNECTED.type ||\n\t\t\t\t\t\t(status === ParticipantState.LEFT_CALL.type &&\n\t\t\t\t\t\t\t[ParticipantRemoveReason.DISCONNECTED, ParticipantRemoveReason.DISCONNECTED_PARTICIPANT_CLEANUP].includes(reason))\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tfeed.status = status;\n\t\t\t\t\tfeed.removeReason = reason;\n\t\t\t\t\tthis.setState({ videoFeeds });\n\t\t\t\t}\n\t\t\t})\n\t\t\t.on('participant-busy', data => {\n\t\t\t\tconst videoFeeds = { ...this.state.videoFeeds };\n\t\t\t\tconst feed = videoFeeds[data.objectId];\n\t\t\t\tif (feed) {\n\t\t\t\t\tconst { activeConferences } = data;\n\t\t\t\t\tif (!activeConferences || activeConferences.length === 0) {\n\t\t\t\t\t\tthis.callManager.logger.warn('On participant busy - no active conference was found');\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst conference = activeConferences.find(ac => ac.initialCallType === CallTypes.MONITORING);\n\t\t\t\t\tif (!conference) {\n\t\t\t\t\t\tthis.callManager.logger.warn('On participant busy - no active patient view or talk to patient conference was found');\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\n\t\t\t\t\t// there should be only one participant with ObjectType User\n\t\t\t\t\tconst monitoringNurse = conference.participants.find(p => p.objectType === ObjectType.USER);\n\t\t\t\t\tif (!monitoringNurse) {\n\t\t\t\t\t\tthis.callManager.logger.warn('On participant busy - monitoring nurse is missing from participants');\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\n\t\t\t\t\tfeed.status = ParticipantState.BUSY.type;\n\t\t\t\t\tfeed.onPatientBusyNurse = monitoringNurse;\n\t\t\t\t\tthis.setState({ videoFeeds });\n\t\t\t\t}\n\t\t\t})\n\t\t\t.on('camera-response', this.cameraResponseListener)\n\t\t\t.on('initial-device-state', ({ helloDeviceId, isNightVision, zoomLevel, isHuddleCamConnected, cameraType, isCameraPrivacyOn, isMicPrivacyOn }) => {\n\t\t\t\tconst { videoFeeds } = this.state;\n\t\t\t\tconst feed = videoFeeds[helloDeviceId];\n\n\t\t\t\tif (!feed) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfeed.zoomLevel = zoomLevel;\n\t\t\t\tfeed.cameraType = cameraType;\n\t\t\t\tfeed.isNightVisionActive = isNightVision;\n\t\t\t\tfeed.isHuddleCamConnected = isHuddleCamConnected;\n\t\t\t\tfeed.isCameraPrivacyOn = isCameraPrivacyOn;\n\t\t\t\tfeed.isMicPrivacyOn = isMicPrivacyOn;\n\n\t\t\t\tthis.setState({ videoFeeds });\n\t\t\t})\n\t\t\t.on('socket-state', ({ socketState }) => {\n\t\t\t\tif (this.state.socketState.type === socketState.type) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst newState = { socketState };\n\t\t\t\tswitch (socketState.type) {\n\t\t\t\t\tcase SocketState.DISCONNECTED.type:\n\t\t\t\t\t\tObject.assign(newState, {\n\t\t\t\t\t\t\tdisableButtons: true,\n\t\t\t\t\t\t});\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SocketState.CONNECTED.type:\n\t\t\t\t\t\tObject.assign(newState, {\n\t\t\t\t\t\t\tdisableButtons: false,\n\t\t\t\t\t\t});\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tthis.setState(newState);\n\t\t\t})\n\t\t\t.on('peer-connection-state', ({ peerConnectionState, participantObjectId }) => {\n\t\t\t\tconst { videoFeeds } = this.state;\n\n\t\t\t\tconst newVideoFeeds = { ...videoFeeds };\n\t\t\t\tnewVideoFeeds[participantObjectId].peerConnectionState = peerConnectionState;\n\t\t\t\tswitch (peerConnectionState) {\n\t\t\t\t\tcase RTCPeerConnectionEnum.CONNECTION_STATE.CONNECTED:\n\t\t\t\t\t\tnewVideoFeeds[participantObjectId].status = ParticipantState.CONNECTED.type;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase RTCPeerConnectionEnum.CONNECTION_STATE.DISCONNECTED:\n\t\t\t\t\t\tnewVideoFeeds[participantObjectId].status = ParticipantState.RECONNECTING.type;\n\t\t\t\t\t\tif (newVideoFeeds[participantObjectId]?.isAlarmActive) {\n\t\t\t\t\t\t\tnewVideoFeeds[participantObjectId].isAlarmActive = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase RTCPeerConnectionEnum.CONNECTION_STATE.FAILED:\n\t\t\t\t\t\tnewVideoFeeds[participantObjectId].status = ParticipantState.RECONNECTING.type;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tthis.setState({ videoFeeds: newVideoFeeds });\n\t\t\t})\n\t\t\t.on('end-call', data => {\n\t\t\t\tObject.keys(this.state.videoFeeds).forEach(key => {\n\t\t\t\t\tthis.changeRoomAddDeviceIcon(false, this.state.videoFeeds[key].roomId);\n\t\t\t\t});\n\t\t\t\tconst deniedParticipant = Object.values(this.state.videoFeeds).find(f => f.deviceId === data.deniedParticipant?.objectId);\n\t\t\t\tconst initiatorInfoFailed = data.endReason === ConferenceEndReason.FAILED_TO_GET_INITIATOR_INFO || false;\n\n\t\t\t\tthis.setState({\n\t\t\t\t\tvideoFeeds: {},\n\t\t\t\t\tparticipants: {},\n\t\t\t\t\tconferenceInfo: null,\n\t\t\t\t\tisFeedZoomed: false,\n\t\t\t\t\troomHasDeviceAssigned: true,\n\t\t\t\t\tisSecondColumnCollapsed: false,\n\t\t\t\t\tshowDeviceControlsLockedModal: false,\n\t\t\t\t\thasActiveConference: data.hasActiveConference,\n\t\t\t\t\tconferenceEndReason: data.endReason,\n\t\t\t\t\tinitiatorInfoFailed,\n\t\t\t\t\tdeniedParticipant,\n\t\t\t\t});\n\t\t\t\tthis.setActiveVideoFeeds([]);\n\t\t\t})\n\t\t\t.on('local-audio-error', this.onLocalAudioError)\n\t\t\t.on('re-add-feed', this.deviceStatusChanged)\n\t\t\t.bindSocketEventListeners(false, false);\n\n\t\tthis.bindWindowListeners();\n\t\tthis.context.on(SocketEvents.Conference.ON_DEVICE_CONTROLS_LOCKED, this.onDeviceLockedEventHandler);\n\t\tthis.context.on(SocketEvents.Conference.AUDIO_TRACK_TOGGLED, this.onAudioTrackToggled);\n\t\tthis.context.on(SocketEvents.Conference.ALERT_PATIENT_AT_RISK_RESPONSE, this.onAlertPatientResponse);\n\t}\n\n\tcomponentDidUpdate = prevProps => {\n\t\tif (prevProps.currentHealthSystemId !== this.props.currentHealthSystemId) {\n\t\t\tthis.changeRoomsAndDevicesIcons();\n\t\t}\n\t};\n\n\tcomponentWillUnmount() {\n\t\tthis.callManager.unbindSocketEventListeners().unbindTimeouts();\n\n\t\tthis.context.off(SocketEvents.Conference.ON_DEVICE_CONTROLS_LOCKED, this.onDeviceLockedEventHandler);\n\t\tthis.context.off(SocketEvents.Conference.AUDIO_TRACK_TOGGLED, this.onAudioTrackToggled);\n\t\tthis.context.off(SocketEvents.Conference.ALERT_PATIENT_AT_RISK_RESPONSE, this.onAlertPatientResponse);\n\n\t\tif (Object.keys(this.state.videoFeeds).length) {\n\t\t\tthis.endMonitoring();\n\t\t}\n\n\t\tthis.setActiveVideoFeeds([]);\n\t}\n\n\tsetActiveVideoFeeds = videoFeeds => {\n\t\tconst mappedIds = Object.keys(videoFeeds).map(key => ({ helloDeviceId: videoFeeds[key].deviceId, roomId: videoFeeds[key].roomId }));\n\t\tthis.props.setActiveMonitoringFeeds(mappedIds);\n\t};\n\n\tonDevicePermissionChange = res => {\n\t\tif (res.target.state === MediaPermissions.GRANTED || res.target.state === MediaPermissions.PROMPT) {\n\t\t\tthis.props.setStreamPermissionMessage(null);\n\t\t} else {\n\t\t\tconst { videoFeeds } = this.state;\n\t\t\tObject.keys(videoFeeds).forEach(key => {\n\t\t\t\tif (videoFeeds[key].audioTrack?.enabled) {\n\t\t\t\t\tthis.toggleMonitoringMic(videoFeeds[key]);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tthis.callManager.publishConferenceLog(`Microphone permission state is changed to ${res.target.state}.`);\n\t};\n\n\tbeforeUnloadEvent = event => {\n\t\tif (this.state.conferenceInfo) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.returnValue = '';\n\t\t}\n\t};\n\n\tbindWindowListeners() {\n\t\twindow.addEventListener('beforeunload', this.beforeUnloadEvent);\n\t\twindow.addEventListener('unload', () => {\n\t\t\tif (this.state.conferenceInfo) {\n\t\t\t\tthis.callManager.endCall({ endReason: ConferenceEndReason.PARTICIPANT_LEFT });\n\t\t\t}\n\t\t});\n\n\t\twindow.addEventListener('message', message => {\n\t\t\tif (message.data === 'IN_CALL') {\n\t\t\t\tif (this.state.conferenceInfo) {\n\t\t\t\t\tthis.callManager.endCall({ endReason: ConferenceEndReason.PARTICIPANT_IDLE });\n\t\t\t\t}\n\t\t\t\twindow.location.href = '/logout';\n\t\t\t}\n\t\t});\n\t}\n\n\tprepareStartConferenceInfo = async deviceId => {\n\t\tconst userProfile = getUserProfile();\n\t\tconst fromUser = new FromUser(`${userProfile.firstName} ${userProfile.lastName}`, userProfile.jobTitle, userProfile.profilePicture.url);\n\t\tconst participant = new ConferenceParticipant(deviceId, ObjectType.HELLO_DEVICE);\n\t\tconst devices = await navigator.mediaDevices.enumerateDevices();\n\t\tconst inputDevices = {\n\t\t\tdevices,\n\t\t\tpermissions: {\n\t\t\t\tcamera: this.camStatus.state,\n\t\t\t\tmicrophone: this.micStatus.state,\n\t\t\t},\n\t\t};\n\n\t\treturn new ConferenceInfo(\n\t\t\tCallTypes.MONITORING,\n\t\t\tv4(),\n\t\t\t'Monitoring',\n\t\t\tnull,\n\t\t\tfromUser,\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t\tv4(),\n\t\t\t[participant],\n\t\t\tinputDevices,\n\t\t\ttrue\n\t\t);\n\t};\n\n\thasPermissionForMonitoring = async () => {\n\t\tconst pluggedDevices = await checkIfMediaDevicesPlugged();\n\n\t\tif (this.micStatus.error) {\n\t\t\treturn false;\n\t\t}\n\n\t\tswitch (this.micStatus.state) {\n\t\t\tcase MediaPermissions.DENIED:\n\t\t\t\tawait askForPermission({ audio: true });\n\t\t\t\treturn true;\n\t\t\tcase MediaPermissions.PROMPT && pluggedDevices.microphone:\n\t\t\t\tthis.props.setStreamPermissionMessage({\n\t\t\t\t\tcomponent: 'modal',\n\t\t\t\t\ttype: StreamError.MICROPHONE_BLOCKED.type,\n\t\t\t\t});\n\t\t\t\tawait askForPermission({ audio: true });\n\t\t\t\tthis.props.setStreamPermissionMessage(null);\n\t\t\t\treturn true;\n\t\t\tdefault:\n\t\t\t\treturn true;\n\t\t}\n\t};\n\n\tgetFailedFeed = (videoFeeds, helloDeviceId, failedParticipants) =>\n\t\tObject.values(videoFeeds).forEach(v => {\n\t\t\tconst nFeed = { ...v };\n\t\t\tif (nFeed.deviceId === helloDeviceId) {\n\t\t\t\tconst failedFeed = failedParticipants.find(f => f.objectId === helloDeviceId);\n\t\t\t\tif (failedFeed.reason === InviteParticipantFailureReason.INVITE_DENIED) {\n\t\t\t\t\tnFeed.status = ParticipantState.INVITE_DENIED.type;\n\t\t\t\t}\n\t\t\t\tif (failedFeed.reason === InviteParticipantFailureReason.FAILED_TO_GET_INFO) {\n\t\t\t\t\tnFeed.status = ParticipantState.FAILED_TO_GET_INFO.type;\n\t\t\t\t}\n\t\t\t\tvideoFeeds[v.deviceId] = nFeed;\n\t\t\t}\n\t\t});\n\n\taddFeed = async data => {\n\t\tif (this.state.deniedParticipant) {\n\t\t\tthis.setState({ conferenceEndReason: null, deniedParticipant: null });\n\t\t}\n\t\tconst hasPermission = await this.hasPermissionForMonitoring();\n\n\t\tif (!hasPermission) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { videoFeeds, conferenceInfo } = this.state;\n\n\t\tlet { name } = findSectorById(this.props.treeData.tree, data.hospitalId);\n\n\t\tif (videoFeeds[data.helloDeviceId]) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (Object.keys(videoFeeds).length === 16) {\n\t\t\tthis.setState({\n\t\t\t\tshowFeedsLimitModal: true,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tthis.changeRoomAddDeviceIcon(true, data.roomId);\n\n\t\tconst newFeed = {\n\t\t\tsrc: null,\n\t\t\troomName: `${name} > ${data.name}`,\n\t\t\tdeviceId: +data.helloDeviceId,\n\t\t\thospitalId: data.hospitalId,\n\t\t\tdepartmentId: data.departmentId,\n\t\t\tfloorId: data.floorId,\n\t\t\troomId: data.roomId,\n\t\t\tstatus: ParticipantState.CONNECTING.type,\n\t\t\thospitalName: name,\n\t\t\tisPeerSpeakerActive: false,\n\t\t\tpeerConnectionState: RTCPeerConnectionEnum.CONNECTION_STATE.NEW,\n\t\t\tzoomLevel: 0,\n\t\t\tcameraType: CameraType.HELLO,\n\t\t\tdisabledTiltDirections: {},\n\t\t\tisCameraPrivacyOn: false,\n\t\t\tisMicPrivacyOn: false,\n\t\t\tdateAdded: +new Date(),\n\t\t\tisOnline: true,\n\t\t};\n\n\t\tvideoFeeds[newFeed.deviceId] = newFeed;\n\n\t\tif (!conferenceInfo) {\n\t\t\tif (Object.keys(videoFeeds).length === 1) {\n\t\t\t\tthis.callManager.startMonitoring(await this.prepareStartConferenceInfo(+data.helloDeviceId));\n\t\t\t} else if (Object.keys(videoFeeds).length > 1) {\n\t\t\t\tthis.changeRoomAddDeviceIcon(false, data.roomId);\n\t\t\t\tdelete videoFeeds[newFeed.deviceId];\n\t\t\t}\n\t\t} else {\n\t\t\tconst response = await this.callManager.addDeviceToMonitoring({\n\t\t\t\tconferenceId: this.state.conferenceInfo.conferenceId,\n\t\t\t\tparticipantId: this.state.conferenceInfo.participantId,\n\t\t\t\tparticipant: {\n\t\t\t\t\tobjectType: ObjectType.HELLO_DEVICE,\n\t\t\t\t\tobjectId: +data.helloDeviceId,\n\t\t\t\t},\n\t\t\t});\n\t\t\tif (response?.failedInvitationToParticipants?.length) {\n\t\t\t\tthis.getFailedFeed(videoFeeds, +data.helloDeviceId, response.failedInvitationToParticipants);\n\t\t\t}\n\t\t}\n\t\tthis.setState({\n\t\t\tvideoFeeds,\n\t\t\troomHasDeviceAssigned: !!data.helloDeviceId,\n\t\t\tcurrentRoomName: data.name,\n\t\t\tinitiatorInfoFailed: false,\n\t\t});\n\t\tthis.setActiveVideoFeeds(videoFeeds);\n\t};\n\n\tremoveFeed = key => {\n\t\tlet { videoFeeds, conferenceInfo } = this.state;\n\n\t\tconst feed = videoFeeds[key];\n\t\tif (!feed) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (feed.audioTrack) {\n\t\t\tfeed.audioTrack.stop();\n\t\t}\n\n\t\tconst { roomId, participantId } = feed;\n\t\tthis.changeRoomAddDeviceIcon(false, roomId);\n\t\tdelete videoFeeds[key];\n\n\t\tthis.callManager.removeDeviceFromMonitoring({\n\t\t\tconferenceId: conferenceInfo.conferenceId,\n\t\t\tparticipantId: conferenceInfo.participantId,\n\t\t\tactioneeParticipantId: participantId,\n\t\t});\n\n\t\tif (Object.keys(videoFeeds).length === 0) {\n\t\t\tthis.endMonitoring();\n\t\t\tconferenceInfo = null;\n\t\t}\n\n\t\tlet { isFeedExpanded } = feed;\n\n\t\tthis.setState({\n\t\t\tvideoFeeds,\n\t\t\tconferenceInfo,\n\t\t\tisFeedZoomed: isFeedExpanded ? !isFeedExpanded : this.state.isFeedZoomed,\n\t\t});\n\t\tthis.handleBitrateChange();\n\t\tthis.setActiveVideoFeeds(videoFeeds);\n\t};\n\n\tendMonitoring = () => {\n\t\tthis.callManager.endCall({ endReason: ConferenceEndReason.INITIATOR_LEFT });\n\t};\n\n\tuseHighBitrate = deviceId => {\n\t\tconst { videoFeeds, conferenceInfo } = this.state;\n\t\tconst feed = videoFeeds[deviceId];\n\n\t\tif (!feed) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { participantId } = feed;\n\t\tthis.callManager.requestToChangeBitrate({\n\t\t\tconferenceId: conferenceInfo.conferenceId,\n\t\t\tparticipantId: conferenceInfo.participantId,\n\t\t\tactioneeParticipantId: participantId,\n\t\t\tsettings: {\n\t\t\t\tminBitrate: 700,\n\t\t\t\tmaxBitrate: 900,\n\t\t\t},\n\t\t});\n\t};\n\n\tuseLowBitrate = deviceId => {\n\t\tconst { videoFeeds, conferenceInfo } = this.state;\n\t\tconst feed = videoFeeds[deviceId];\n\t\tif (!feed) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { participantId } = feed;\n\n\t\tthis.callManager.requestToChangeBitrate({\n\t\t\tconferenceId: conferenceInfo.conferenceId,\n\t\t\tparticipantId: conferenceInfo.participantId,\n\t\t\tactioneeParticipantId: participantId,\n\t\t\tsettings: {\n\t\t\t\tminBitrate: 400,\n\t\t\t\tmaxBitrate: 600,\n\t\t\t},\n\t\t});\n\t};\n\n\thandleBitrateChange = () => {\n\t\tlet { videoFeeds } = this.state;\n\t\tlet videoFeedsLength = Object.keys(videoFeeds).length;\n\t\tlet expandedFeed = Object.values(videoFeeds).find(v => v.isFeedExpanded);\n\n\t\tif (expandedFeed) {\n\t\t\tObject.keys(videoFeeds).forEach(key => {\n\t\t\t\tif (expandedFeed.deviceId !== videoFeeds[key].deviceId) {\n\t\t\t\t\tthis.useLowBitrate(videoFeeds[key].deviceId);\n\t\t\t\t} else {\n\t\t\t\t\tthis.useHighBitrate(videoFeeds[key].deviceId);\n\t\t\t\t}\n\t\t\t});\n\t\t} else if (videoFeedsLength <= this.lowerBitrateFeedCountThreshold) {\n\t\t\tObject.keys(videoFeeds).forEach(key => {\n\t\t\t\tthis.useHighBitrate(videoFeeds[key].deviceId);\n\t\t\t});\n\t\t} else if (videoFeedsLength > this.lowerBitrateFeedCountThreshold) {\n\t\t\tObject.keys(videoFeeds).forEach(key => {\n\t\t\t\tthis.useLowBitrate(videoFeeds[key].deviceId);\n\t\t\t});\n\t\t}\n\t};\n\n\tchangeRoomAddDeviceIcon = (deviceAdded, roomId) => {\n\t\tconst treeData = { ...this.props.treeData };\n\t\tconst sector = findSectorById(treeData.tree, roomId);\n\n\t\tif (deviceAdded) {\n\t\t\tsector.customActionIcon = {\n\t\t\t\ticonColor: '#4cd137',\n\t\t\t\ticon: 'check_circle',\n\t\t\t};\n\t\t} else if (sector) {\n\t\t\tdelete sector.customActionIcon;\n\t\t}\n\n\t\tthis.props.setTreeData(treeData);\n\t};\n\n\tchangeRoomsAndDevicesIcons = () => {\n\t\tconst deviceIds = Object.keys(this.state.videoFeeds);\n\t\tif (deviceIds.length === 0) {\n\t\t\treturn;\n\t\t}\n\t\tconst treeData = { ...this.props.treeData };\n\t\ttreeData.tree.forEach(hospital => {\n\t\t\thospital.subOptions.forEach(dep => {\n\t\t\t\tdep.subOptions.forEach(floor => {\n\t\t\t\t\tfloor.subOptions.forEach(room => {\n\t\t\t\t\t\tif (deviceIds.includes(room.helloDeviceId)) {\n\t\t\t\t\t\t\t// eslint-disable-next-line no-param-reassign\n\t\t\t\t\t\t\troom.customActionIcon = {\n\t\t\t\t\t\t\t\ticonColor: '#4cd137',\n\t\t\t\t\t\t\t\ticon: 'check_circle',\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t\tthis.props.setTreeData(treeData);\n\t};\n\n\ttoggleExpandFeed = feed => {\n\t\tlet videoFeeds = { ...this.state.videoFeeds };\n\t\tlet previousExpandedFeed = Object.values(videoFeeds).find(v => v.isFeedExpanded) || {};\n\t\tlet currentFeed = Object.values(videoFeeds).find(f => feed.deviceId === f.deviceId);\n\t\tif (previousExpandedFeed.deviceId !== currentFeed.deviceId) {\n\t\t\tpreviousExpandedFeed.isFeedExpanded = false;\n\t\t}\n\t\tcurrentFeed.isFeedExpanded = !currentFeed.isFeedExpanded;\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisFeedZoomed: currentFeed.isFeedExpanded,\n\t\t\t\tvideoFeeds: videoFeeds,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.handleBitrateChange();\n\t\t\t}\n\t\t);\n\t};\n\n\ttoggleNightVision = async feed => {\n\t\tconst { conferenceInfo } = this.state;\n\t\tconst nightVisionMode = !feed.isNightVisionActive;\n\n\t\ttry {\n\t\t\tconst toggleResponse = await this.callManager.toggleNightVision(nightVisionMode, feed.deviceId, conferenceInfo.conferenceId, feed.participantId);\n\n\t\t\tif (toggleResponse.deviceControlsLocked) {\n\t\t\t\tthis.setState({ showDeviceControlsLockedModal: true });\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tthis.callManager.logger.error(`Toggle nightvision failed ${err}`);\n\t\t}\n\t};\n\n\ttogglePeerSpeaker = async feed => {\n\t\tconst { videoFeeds } = this.state;\n\n\t\tthis.callManager.callerParticipantId = feed.participantId;\n\t\tconst response = await this.callManager.toggleParticipantTrack(CallTypes.AUDIO, feed.isPeerSpeakerActive);\n\t\t// check if peer(hello) is in another call\n\t\tif (response.deviceControlsLocked) {\n\t\t\tthis.setState({ showDeviceControlsLockedModal: true });\n\t\t\treturn;\n\t\t}\n\n\t\tvideoFeeds[feed.deviceId].isPeerSpeakerActive = !videoFeeds[feed.deviceId].isPeerSpeakerActive;\n\t\t// if peer(hello) is not in another call than disable speaker to the previous hellos\n\t\tconst previousFeeds = Object.values(videoFeeds).filter(videoFeed => videoFeed.participantId !== feed.participantId && videoFeed.isPeerSpeakerActive);\n\t\tif (previousFeeds && previousFeeds.length) {\n\t\t\tpreviousFeeds.forEach(previousFeed => {\n\t\t\t\tthis.callManager.toggleParticipantTrack(CallTypes.AUDIO, true, previousFeed.participantId);\n\t\t\t});\n\t\t}\n\n\t\tthis.setState({ videoFeeds });\n\t};\n\n\ttoggleAlarm = feed => {\n\t\tconst { conferenceInfo } = this.state;\n\n\t\tconst currentFeed = Object.values(this.state.videoFeeds).find(f => feed.deviceId === f.deviceId);\n\n\t\tif (!currentFeed) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.callManager.togglePatientAtRiskAlert({\n\t\t\tconferenceId: conferenceInfo.conferenceId,\n\t\t\tparticipantId: conferenceInfo.participantId,\n\t\t\tactioneeParticipantId: feed.participantId,\n\t\t\tdata: !currentFeed.isAlarmActive,\n\t\t});\n\t};\n\n\tonAlertPatientResponse = result => {\n\t\tconst videoFeeds = { ...this.state.videoFeeds };\n\t\tconst currentFeed = Object.values(videoFeeds).find(f => result.participantId === f.participantId);\n\t\tif (!currentFeed) {\n\t\t\treturn;\n\t\t}\n\t\tif (!result.isSuccessful) {\n\t\t\tthis.setState({\n\t\t\t\tstatAlarmError: `There was an error toggling stat alarm of ${currentFeed.roomName}. Please try again!`,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tcurrentFeed.isAlarmActive = result.data;\n\t\tthis.setState({\n\t\t\tstatAlarmError: '',\n\t\t\tvideoFeeds: videoFeeds,\n\t\t});\n\t};\n\n\ttoggleMyMicrophone = async (feed, enabled) => {\n\t\tconst pluggedDevices = await checkIfMediaDevicesPlugged();\n\n\t\tif (!pluggedDevices.microphone) {\n\t\t\tthis.props.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'modal',\n\t\t\t\ttype: StreamError.MICROPHONE_NOT_FOUND.type,\n\t\t\t});\n\t\t\treturn false;\n\t\t}\n\n\t\tif (this.micStatus.state === MediaPermissions.DENIED) {\n\t\t\tawait askForPermission({ audio: true });\n\t\t\tthis.props.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'popup',\n\t\t\t\ttype: StreamError.MICROPHONE_BLOCKED.type,\n\t\t\t});\n\t\t\treturn false;\n\t\t}\n\n\t\tif (this.micStatus.state === MediaPermissions.PROMPT) {\n\t\t\tthis.props.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'modal',\n\t\t\t\ttype: StreamError.MICROPHONE_BLOCKED.type,\n\t\t\t});\n\t\t\tawait askForPermission({ audio: true });\n\t\t\tthis.props.setStreamPermissionMessage(null);\n\t\t\treturn false;\n\t\t}\n\n\t\tthis.toggleMonitoringMic(feed, enabled);\n\n\t\treturn true;\n\t};\n\n\ttoggleMonitoringMic = async (feed, enabled) => {\n\t\tconst selectedFeed = feed;\n\n\t\tif (selectedFeed.audioTrack) {\n\t\t\tif (this.prevFeed && this.prevFeed.audioTrack && this.prevFeed.audioTrack.id !== selectedFeed.audioTrack.id) {\n\t\t\t\tthis.prevFeed.audioTrack.enabled = false;\n\t\t\t\tthis.callManager.monitoringTrackToggled(false, this.prevFeed.participantId);\n\t\t\t}\n\n\t\t\tthis.prevFeed = selectedFeed;\n\t\t\tselectedFeed.audioTrack.enabled = enabled;\n\t\t\tthis.callManager.monitoringTrackToggled(selectedFeed.audioTrack.enabled, selectedFeed.participantId);\n\t\t\tthis.setFeedAudioTrackAndDisablePrevious(selectedFeed);\n\t\t\treturn;\n\t\t}\n\n\t\tthis.callManager.callerParticipantId = selectedFeed.participantId;\n\n\t\tconst audioStream = await this.callManager.toggleAudio();\n\n\t\tif (this.callManager.p2p.hasPeerConnectionChannelForRemoteId(selectedFeed.participantId)) {\n\t\t\tconst pc = this.callManager.p2p.getChannel(selectedFeed.participantId).getRTCPeerConnection();\n\t\t\tpc.onconnectionstatechange = event =>\n\t\t\t\tthis.callManager.onConnectionStateChange(\n\t\t\t\t\tevent,\n\t\t\t\t\tselectedFeed.participantId,\n\t\t\t\t\tselectedFeed.audioTrack && selectedFeed.audioTrack.readyState === 'live' ? audioStream : null\n\t\t\t\t);\n\t\t}\n\n\t\tif (!audioStream || audioStream.error) {\n\t\t\t// Unsure what this part of functionality was added for, looks like we need to remove it\n\t\t\t// if (this.prevFeed && this.prevFeed.audioTrack?.enabled) {\n\t\t\t// \tconst videoFeeds = { ...this.state.videoFeeds };\n\t\t\t// \tthis.setState({\n\t\t\t// \t\tshowDeviceControlsLockedModal: !audioStream,\n\t\t\t// \t\tvideoFeeds: Object.keys(videoFeeds).reduce((acc, key) => {\n\t\t\t// \t\t\tconst newFeed = { ...acc[key] };\n\t\t\t// \t\t\tif (newFeed.participantId === this.prevFeed.participantId) {\n\t\t\t// \t\t\t\tnewFeed.audioTrack.enabled = false;\n\t\t\t// \t\t\t}\n\t\t\t// \t\t\tacc[key] = newFeed;\n\t\t\t// \t\t\treturn acc;\n\t\t\t// \t\t}, videoFeeds),\n\t\t\t// \t});\n\t\t\t// } else {\n\t\t\t// this.setState({ showDeviceControlsLockedModal: !audioStream });\n\t\t\t// }\n\n\t\t\tif (audioStream?.error?.failureReason === ToggleFailureReasonEnum.DEVICE_LOCKED) {\n\t\t\t\tthis.setState({ showDeviceControlsLockedModal: true });\n\t\t\t} else if (audioStream?.error) {\n\t\t\t\tthis.props.setStreamPermissionMessage({\n\t\t\t\t\tcomponent: 'modal',\n\t\t\t\t\ttype: StreamError.MICROPHONE_NOT_FOUND.type,\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tthis.prevFeed = selectedFeed;\n\t\tconst audioTrack = audioStream.mediaStream.getAudioTracks()[0];\n\t\tselectedFeed.audioTrack = audioTrack;\n\t\tthis.setFeedAudioTrackAndDisablePrevious(selectedFeed);\n\t};\n\n\tsetFeedAudioTrackAndDisablePrevious = currentFeed => {\n\t\tconst videoFeeds = { ...this.state.videoFeeds };\n\n\t\tconst newVideoFeeds = Object.keys(videoFeeds).reduce((acc, key) => {\n\t\t\tconst newFeed = { ...acc[key] };\n\t\t\tif (newFeed.participantId === currentFeed?.participantId) {\n\t\t\t\tnewFeed.audioTrack = currentFeed.audioTrack;\n\t\t\t} else if (newFeed.participantId !== currentFeed?.participantId && newFeed.audioTrack?.enabled) {\n\t\t\t\tnewFeed.audioTrack.enabled = false;\n\t\t\t}\n\t\t\tacc[key] = newFeed;\n\n\t\t\treturn acc;\n\t\t}, videoFeeds);\n\n\t\tthis.setState({\n\t\t\tvideoFeeds: newVideoFeeds,\n\t\t});\n\t};\n\n\tsetFeedColor = (feedColor, participantId) => {\n\t\tconst { videoFeeds } = this.state;\n\t\tObject.values(videoFeeds).forEach(videoFeed => {\n\t\t\tif (videoFeed.participantId === participantId && feedColor) {\n\t\t\t\tif (!videoFeed.colors || videoFeed.colors.length === 0) {\n\t\t\t\t\tvideoFeed.colors = [feedColor];\n\t\t\t\t} else {\n\t\t\t\t\tconst foundIndex = videoFeed.colors.findIndex(item => item === feedColor);\n\t\t\t\t\tif (foundIndex === -1) {\n\t\t\t\t\t\tvideoFeed.colors.push(feedColor);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvideoFeed.colors.splice(foundIndex, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tthis.setState({ videoFeeds });\n\t};\n\n\tonTreeViewLinkClick = sector => {\n\t\tif (Object.values(this.state.videoFeeds).length) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (sector.type === SectorTypes.ROOM) {\n\t\t\tthis.setState({\n\t\t\t\troomHasDeviceAssigned: !!sector.helloDeviceId,\n\t\t\t\tcurrentRoomName: sector.name,\n\t\t\t});\n\t\t}\n\t};\n\n\tcollapseSecondColumn = () => {\n\t\tthis.setState({\n\t\t\tisSecondColumnCollapsed: !this.state.isSecondColumnCollapsed,\n\t\t});\n\t};\n\n\tonDeviceLockedEventHandler = async data => {\n\t\tconst { deviceId } = data;\n\t\tconst newVideoFeeds = { ...this.state.videoFeeds };\n\t\tconst feed = newVideoFeeds[deviceId];\n\t\tlet showDeviceControlsLockedModal = false;\n\t\tlet stateToSet = {};\n\n\t\tif (feed?.audioTrack) {\n\t\t\tshowDeviceControlsLockedModal = feed.audioTrack.enabled;\n\t\t\tthis.callManager.removeTrackById(feed.participantId, feed.audioTrack.id);\n\t\t\tfeed.audioTrack.stop();\n\t\t\tdelete feed.audioTrack;\n\t\t\tstateToSet = { videoFeeds: newVideoFeeds };\n\t\t}\n\n\t\tif (feed?.isPeerSpeakerActive) {\n\t\t\tshowDeviceControlsLockedModal = true;\n\t\t\t// handle only ui because track will be removed from hello side\n\t\t\tfeed.isPeerSpeakerActive = false;\n\t\t}\n\n\t\tif (showDeviceControlsLockedModal) {\n\t\t\tthis.setState({ ...stateToSet, showDeviceControlsLockedModal });\n\t\t}\n\t};\n\n\thasHealthSystems = () => {\n\t\treturn this.props.allHealthSystems.length > 0;\n\t};\n\n\tsendCameraEvent = async (eventType, data) => {\n\t\tlet deviceControlsLocked;\n\t\tswitch (eventType) {\n\t\t\tcase SocketEvents.HelloDevice.MOVE_CAMERA:\n\t\t\t\t({ deviceControlsLocked } = await this.doSendPanTiltCameraEvent(data));\n\t\t\t\tbreak;\n\t\t\tcase SocketEvents.HelloDevice.COMMAND:\n\t\t\t\t({ deviceControlsLocked } = await this.callManager.rebootHuddleCam(data));\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t({ deviceControlsLocked } = await this.callManager.sendCameraEvent(eventType, data));\n\t\t}\n\n\t\tif (deviceControlsLocked) {\n\t\t\tthis.setState({ showDeviceControlsLockedModal: true });\n\t\t}\n\t};\n\n\tdoSendPanTiltCameraEvent = async ({ direction, action }) => {\n\t\tconst { videoFeeds, conferenceInfo } = this.state;\n\t\tconst feeds = Object.values(videoFeeds);\n\t\tlet expandedFeed = feeds.length === 1 ? feeds[0] : feeds.find(feed => feed.isFeedExpanded);\n\n\t\tif (!expandedFeed) {\n\t\t\treturn {};\n\t\t}\n\n\t\tconst { conferenceId } = conferenceInfo;\n\t\tconst { participantId, deviceId } = expandedFeed;\n\n\t\treturn this.callManager.panTiltCamera({ direction, helloDeviceId: deviceId, action, conferenceId, participantId });\n\t};\n\n\tcameraResponseListener = ({ event, message, isSuccessful, objectId }) => {\n\t\tconst { videoFeeds } = this.state;\n\t\tlet feed = videoFeeds[objectId];\n\n\t\tif (!feed) {\n\t\t\treturn;\n\t\t}\n\n\t\tswitch (event) {\n\t\t\tcase CameraEventTypes.SWITCH:\n\t\t\t\tif (isSuccessful) {\n\t\t\t\t\tfeed.cameraType = message;\n\t\t\t\t\tfeed.zoomLevel = 0;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CameraEventTypes.ZOOM:\n\t\t\t\tfeed.zoomLevel = +message;\n\t\t\t\tbreak;\n\t\t\tcase CameraEventTypes.TILT: {\n\t\t\t\tconst { disabledTiltDirections } = feed;\n\n\t\t\t\tif (isSuccessful) {\n\t\t\t\t\tif ([CameraTiltDirection.UP, CameraTiltDirection.DOWN].includes(message)) {\n\t\t\t\t\t\tdisabledTiltDirections[CameraTiltDirection.UP] = false;\n\t\t\t\t\t\tdisabledTiltDirections[CameraTiltDirection.DOWN] = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdisabledTiltDirections[CameraTiltDirection.LEFT] = false;\n\t\t\t\t\t\tdisabledTiltDirections[CameraTiltDirection.RIGHT] = false;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tdisabledTiltDirections[message] = true;\n\t\t\t\t\tthis.doSendPanTiltCameraEvent({ direction: message, action: CameraTiltAction.STOP });\n\t\t\t\t}\n\n\t\t\t\tfeed.disabledTiltDirections = disabledTiltDirections;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase CameraEventTypes.HUDDLE_CONNECTED_STATE:\n\t\t\t\tfeed.isHuddleCamConnected = isSuccessful;\n\t\t\t\tbreak;\n\t\t\tcase CameraEventTypes.NIGHT_VISION:\n\t\t\t\tfeed.isNightVisionActive = isSuccessful;\n\t\t\t\tbreak;\n\t\t\tcase CameraEventTypes.HELLO_CAMERA_PRIVACY_STATE: {\n\t\t\t\tfeed.isCameraPrivacyOn = isSuccessful;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase CameraEventTypes.HELLO_MIC_PRIVACY_STATE: {\n\t\t\t\tfeed.isMicPrivacyOn = isSuccessful;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault:\n\t\t}\n\n\t\tthis.setState({ videoFeeds });\n\t};\n\n\tonToggleCameraSwitch = feed => {\n\t\tconst { participantId, deviceId, cameraType, isCameraPrivacyOn } = feed;\n\t\tconst { conferenceId } = this.state.conferenceInfo;\n\n\t\tconst notAllowedToSwitchToHelloCam = cameraType === CameraType.HUDDLE && isCameraPrivacyOn;\n\t\tif (notAllowedToSwitchToHelloCam) {\n\t\t\tthis.setState({ shouldShowSwitchToHelloCamError: true });\n\t\t\treturn;\n\t\t}\n\n\t\tthis.sendCameraEvent(SocketEvents.HelloDevice.SWITCH_CAMERA, { participantId, conferenceId, helloDeviceId: deviceId });\n\t};\n\n\tgetConferenceEndedText = conferenceEndReason => {\n\t\tif (conferenceEndReason === ConferenceEndReason.DROPPED) {\n\t\t\treturn 'Failed to reconnect to the network.';\n\t\t}\n\n\t\tif (conferenceEndReason === ConferenceEndReason.TERMINATED_BY_ADMINISTRATOR) {\n\t\t\treturn 'This session was ended by a Banyan admin.';\n\t\t}\n\n\t\tif (conferenceEndReason === ConferenceEndReason.PARTICIPANT_INVITE_DENIED) {\n\t\t\treturn \"You don't have sufficient permissions to call this participant. Please contact your administrator.\";\n\t\t}\n\n\t\treturn undefined;\n\t};\n\n\tgetVideoFeedByParticipantId = (participantId, videoFeeds) => {\n\t\tconst participant = this.state.participants[participantId];\n\t\tif (!participant) {\n\t\t\tthis.callManager.logger.warn('Participant not found for remote ID:', origin);\n\t\t\treturn null;\n\t\t}\n\n\t\tconst { objectId } = participant;\n\t\tif (!objectId) {\n\t\t\tthis.callManager.logger.warn('objectId not set for participant!');\n\t\t\treturn null;\n\t\t}\n\n\t\tconst feed = videoFeeds[objectId];\n\t\tif (!feed) {\n\t\t\tthis.callManager.logger.warn('Video feed or source not found for objectId: ', objectId);\n\t\t\treturn null;\n\t\t}\n\n\t\treturn feed;\n\t};\n\n\tonAudioTrackToggled = data => {\n\t\tif (!data) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { participantId, hasAudio } = data;\n\t\tconst { videoFeeds } = this.state;\n\t\tconst feed = this.getVideoFeedByParticipantId(participantId, videoFeeds);\n\t\tif (!feed) {\n\t\t\treturn;\n\t\t}\n\n\t\tfeed.isPeerSpeakerActive = hasAudio;\n\t\tthis.setState({ videoFeeds });\n\t};\n\n\tonLocalAudioError = ({ participantId, trackDeviceNotFound, inputDevices }) => {\n\t\tconst { videoFeeds } = this.state;\n\t\tconst feed = this.getVideoFeedByParticipantId(participantId, videoFeeds);\n\t\tif (!feed) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (feed.audioTrack?.enabled && (!trackDeviceNotFound || !inputDevices.length)) {\n\t\t\tthis.props.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'modal',\n\t\t\t\ttype: StreamError.MICROPHONE_NOT_FOUND.type,\n\t\t\t});\n\t\t}\n\n\t\tdelete feed.audioTrack;\n\n\t\tthis.setState({ videoFeeds });\n\t};\n\n\tdeviceStatusChanged = ({ objectId }) => {\n\t\tconst { videoFeeds } = this.state;\n\n\t\tconst feed = videoFeeds[objectId];\n\t\tif (!feed) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (feed.audioTrack) {\n\t\t\tfeed.audioTrack.stop();\n\t\t\tdelete feed.audioTrack;\n\t\t}\n\t\tfeed.isPeerSpeakerActive = false;\n\t\tfeed.status = ParticipantState.RECONNECTING.type;\n\n\t\tthis.setState({ videoFeeds });\n\t};\n\n\ttoggleSecondColumnButton = () => (\n\t\t\n\t);\n\n\trender() {\n\t\tif (!this.hasHealthSystems()) {\n\t\t\treturn ;\n\t\t}\n\n\t\tconst { videoFeeds, conferenceInfo, roomHasDeviceAssigned, disableButtons, conferenceEndReason, hasActiveConference, deniedParticipant } = this.state;\n\n\t\tconst allFeeds = Object.values(videoFeeds);\n\t\tconst feeds = sortArrayByProperty(allFeeds, 'dateAdded');\n\t\tconst shouldShowConferenceEnded = [ConferenceEndReason.DROPPED, ConferenceEndReason.TERMINATED_BY_ADMINISTRATOR].includes(conferenceEndReason);\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t{!shouldShowConferenceEnded && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t{!hasActiveConference && (\n\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t{roomHasDeviceAssigned && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{feeds.map(feed => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t this.removeFeed(feed.deviceId)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonExpandClick={() => this.toggleExpandFeed(feed)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonToggleNightVision={() => this.toggleNightVision(feed)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonToggleMyMicrophone={_.debounce(enabled => this.toggleMyMicrophone(feed, enabled), 200)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonToggleAlarm={_.debounce(() => this.toggleAlarm(feed), 500)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonTogglePeerSpeaker={_.debounce(() => this.togglePeerSpeaker(feed), 500)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSetFeedColor={color => this.setFeedColor(color, feed.participantId)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisableButtons={disableButtons}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpeerConnectionState={feed.peerConnectionState}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconferenceId={conferenceInfo && conferenceInfo.conferenceId}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisAnyFeedExpanded={this.state.isFeedZoomed}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{(feed.isFeedExpanded || (feeds.length === 1 && feeds[0].src)) &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconferenceInfo &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfeed.peerConnectionState === RTCPeerConnectionEnum.CONNECTION_STATE.CONNECTED &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfeed.status === ParticipantState.CONNECTED.type && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t this.onToggleCameraSwitch(feed)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonZoomCamera={direction => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst level = direction === ZoomDirection.INCREASE ? feed.zoomLevel + 20 : feed.zoomLevel - 20;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.sendCameraEvent(SocketEvents.HelloDevice.ZOOM_CAMERA, {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlevel,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tparticipantId: feed.participantId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconferenceId: conferenceInfo.conferenceId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thelloDeviceId: feed.deviceId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonPanTiltCamera={(direction, action) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.sendCameraEvent(SocketEvents.HelloDevice.MOVE_CAMERA, { direction, action })\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonRebootHuddleCam={() =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.sendCameraEvent(SocketEvents.HelloDevice.COMMAND, {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tparticipantId: feed.participantId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tconferenceId: conferenceInfo.conferenceId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thelloDeviceId: feed.deviceId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{!Object.values(videoFeeds).length && !this.state.deniedParticipant && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t

    {this.state.currentRoomName}

    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tIn order to monitor rooms, please
    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topen a hospital, choose the department,
    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclick on a floor, and select a room.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{!!this.state.deniedParticipant && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t

    {this.state.currentRoomName}

    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tYou don't have sufficient permissions to call {deniedParticipant?.roomName}.
    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tPlease contact your administrator.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t\t\t\t{!roomHasDeviceAssigned && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t

    {this.state.currentRoomName}

    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tThis room doesn't have any assigned devices.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
    Please contact your administrator.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t\t{hasActiveConference && (\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tYou're already in a call or monitoring patients.
    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tPlease try again after you end that session.\n\t\t\t\t\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{shouldShowConferenceEnded && (\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t\t\t\t{this.getConferenceEndedText(conferenceEndReason)}
    \n\t\t\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{this.state.isSecondColumnCollapsed ? 'keyboard_arrow_right' : 'keyboard_arrow_left'}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\tthis.setState({ shouldShowSwitchToHelloCamError: false });\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tpersist={true}\n\t\t\t\t\t\t\t\tmessage={`You can't switch back to Banyan Bridge because the physical privacy buttons have been enabled. These buttons can be disabled only manually. Please contact your administrator.`}\n\t\t\t\t\t\t\t\tvariant='error'\n\t\t\t\t\t\t\t\tposition='top'\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\tthis.setState({ statAlarmError: '' });\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tpersist={true}\n\t\t\t\t\t\t\t\tmessage={this.state.statAlarmError}\n\t\t\t\t\t\t\t\tvariant='error'\n\t\t\t\t\t\t\t\tposition='top'\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\tthis.setState({ initiatorInfoFailed: false });\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tpersist={true}\n\t\t\t\t\t\t\t\tmessage='Failed to get your information. Please try again.'\n\t\t\t\t\t\t\t\tvariant='error'\n\t\t\t\t\t\t\t\tposition='top'\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t {\n\t\t\t\t\t\tthis.setState({ showDeviceControlsLockedModal: false });\n\t\t\t\t\t}}>\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    A Virtual Care Provider is in a call with this device. You will be able to use these controls as soon as the call ends.

    \n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t {\n\t\t\t\t\t\twindow.location.reload();\n\t\t\t\t\t}}\n\t\t\t\t\thideActionButtons={true}>\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    Please refresh the page.

    \n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{this.state.streamPermission && }\n\t\t\t
    \n\t\t);\n\t}\n}\n\nMonitoring.contextType = SocketContext;\n\nexport default connect(\n\tstate => state.organization,\n\tdispatch => bindActionCreators(actionCreators, dispatch)\n)(Monitoring);\n","import { gatewayApi, APP_CONFIG } from '../constants/global-variables';\n\nexport function getDeviceConferencesByLevel(level, id, pageSize = 10, pageIndex = 0, start, end) {\n\tlet params = {\n\t\tlevel: level,\n\t\tid: id || APP_CONFIG.companyId,\n\t\tpageSize: pageSize,\n\t\tpageIndex: pageIndex,\n\t\tstart: start ? new Date(start).getTime() / 1000 : undefined,\n\t\tend: end ? new Date(end).getTime() / 1000 : undefined,\n\t};\n\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1.2/conferences/organization-devices/${APP_CONFIG.companyId}`, {\n\t\t\t\tparams: params,\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getDeviceOngoingConferencesByLevel(level, id, pageSize = 10, pageIndex = 0) {\n\tlet params = {\n\t\tlevel: level,\n\t\tid: id || APP_CONFIG.companyId,\n\t\tpageSize: pageSize,\n\t\tpageIndex: pageIndex,\n\t};\n\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/conferences/ongoing/organization-devices/${APP_CONFIG.companyId}`, {\n\t\t\t\tparams: params,\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport const startExportLogsTask = async ({ level, id, start, end }) => {\n\ttry {\n\t\tlet params = {\n\t\t\tlevel: level,\n\t\t\tid: id || APP_CONFIG.companyId,\n\t\t\tstart: Math.round(new Date(start).getTime() / 1000),\n\t\t\tend: Math.round(new Date(end).getTime() / 1000),\n\t\t\ttimezone: Intl.DateTimeFormat().resolvedOptions().timeZone,\n\t\t};\n\n\t\tconst { data } = await gatewayApi.get(`v1/tasks/companies/${APP_CONFIG.companyId}/conferences`, { params });\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n\nexport const exportCallLogs = async ({ start, end, healthSystemId, regionId, hospitalId, departmentId, floorId, roomId }) => {\n\ttry {\n\t\tconst params = {\n\t\t\tstart,\n\t\t\tend,\n\t\t\thealthSystemId,\n\t\t\tregionId,\n\t\t\thospitalId,\n\t\t\tdepartmentId,\n\t\t\tfloorId,\n\t\t\troomId,\n\t\t\ttimezone: Intl.DateTimeFormat().resolvedOptions().timeZone,\n\t\t};\n\t\tconst { data } = await gatewayApi.get(`/v1.1/tasks/companies/${APP_CONFIG.companyId}/conferences`, { params });\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n\nexport const getPastCallLogs = async ({ start, end, healthSystemId, regionId, hospitalId, departmentId, floorId, roomId, pageSize, pageIndex }) => {\n\ttry {\n\t\tconst params = {\n\t\t\tstart,\n\t\t\tend,\n\t\t\thealthSystemId,\n\t\t\tregionId,\n\t\t\thospitalId,\n\t\t\tdepartmentId,\n\t\t\tfloorId,\n\t\t\troomId,\n\t\t\tpageSize,\n\t\t\tpageIndex,\n\t\t};\n\t\tconst { data } = await gatewayApi.get(`/v1/conferences/past/organization/${APP_CONFIG.companyId}`, { params });\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n\nexport const getNurseCallsForDashboard = async ({ healthSystemId, regionId, hospitalId, nurseId, start, end }) => {\n\ttry {\n\t\tconst params = {\n\t\t\thealthSystemId,\n\t\t\tregionId,\n\t\t\thospitalId,\n\t\t\tnurseId,\n\t\t\tstart,\n\t\t\tend,\n\t\t};\n\t\tconst { data } = await gatewayApi.get(`/v1/organizations/${APP_CONFIG.companyId}/callstats/nurses/call-count`, { params });\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n\nexport const getKpisForDashboard = async ({ healthSystemId, regionId, hospitalId, nurseId, start, end }) => {\n\ttry {\n\t\tconst params = {\n\t\t\thealthSystemId,\n\t\t\tregionId,\n\t\t\thospitalId,\n\t\t\tnurseId,\n\t\t\tstart,\n\t\t\tend,\n\t\t};\n\t\tconst { data } = await gatewayApi.get(`/v1/organizations/${APP_CONFIG.companyId}/callstats/kpis`, { params });\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n","import React, { Component } from 'react';\nimport Table from 'components/Table';\nimport { ObjectType } from 'constants/enums';\n\nclass CallDetails extends Component {\n\tisFeatureUsed(roomFeatureUsed, vcpFeatureUsed) {\n\t\treturn (\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\tPatient: \n\t\t\t\t\t{roomFeatureUsed ? 'Yes' : 'No'}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tNurse: \n\t\t\t\t\t{vcpFeatureUsed ? 'Yes' : 'No'}\n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t}\n\n\tgetCallDetails() {\n\t\tlet log = this.props.selectedConference;\n\n\t\tif (log.callType === 'Monitoring') {\n\t\t\tconst headers = [{ title: 'Room' }, { title: 'Audio Used' }, { title: 'Video Used' }, { title: 'Screen Used' }];\n\n\t\t\tlet nurse = log.participants.find(participant => participant.objectType === ObjectType.USER);\n\t\t\tlet devices = log.participants.filter(participant => participant.objectType === ObjectType.HELLO_DEVICE);\n\t\t\tlet devicesFeatures = devices.map(device => {\n\t\t\t\treturn {\n\t\t\t\t\tname: device.name,\n\t\t\t\t\taudioUsed: this.isFeatureUsed(device.usedAudio, nurse.usedAudio),\n\t\t\t\t\tvideoUsed: this.isFeatureUsed(device.usedVideo, nurse.usedVideo),\n\t\t\t\t\tscreenUsed: this.isFeatureUsed(device.usedScreen, nurse.usedScreen),\n\t\t\t\t};\n\t\t\t});\n\n\t\t\treturn
    ;\n\t\t} else {\n\t\t\tconst headers = [{ title: 'Audio Used' }, { title: 'Video Used' }, { title: 'Screen Used' }];\n\n\t\t\tlet features =\n\t\t\t\tObject.entries(log).length !== 0 && log.constructor === Object\n\t\t\t\t\t? {\n\t\t\t\t\t\t\taudioUsed: this.isFeatureUsed(log.usedAudio.room, log.usedAudio.vcp),\n\t\t\t\t\t\t\tvideoUsed: this.isFeatureUsed(log.usedVideo.room, log.usedVideo.vcp),\n\t\t\t\t\t\t\tscreenUsed: this.isFeatureUsed(log.usedScreen.room, log.usedScreen.vcp),\n\t\t\t\t\t }\n\t\t\t\t\t: {};\n\n\t\t\treturn
    ;\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t
    \n\t\t\t\t

    Call Details

    \n\t\t\t\t{this.getCallDetails()}\n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default CallDetails;\n","import React, { Component } from 'react';\nimport Select from 'react-select';\n\nclass Pagination extends Component {\n\tpageSizeChanged = pageSize => {\n\t\tthis.props.onChange(pageSize, 0);\n\t};\n\n\tgoToNextPage = () => {\n\t\tthis.props.onChange(this.props.pageSize, this.props.pageIndex + 1);\n\t};\n\n\tgoToPrevPage = () => {\n\t\tthis.props.onChange(this.props.pageSize, this.props.pageIndex - 1);\n\t};\n\n\ttotalNumberOfPages = () => {\n\t\tlet pages = parseInt(Math.ceil(parseFloat(this.props.totalCount / this.props.pageSize.value)));\n\t\treturn pages || 1;\n\t};\n\n\trender() {\n\t\tconst options = [\n\t\t\t{ value: 10, label: '10' },\n\t\t\t{ value: 25, label: '25' },\n\t\t\t{ value: 50, label: '50' },\n\t\t];\n\n\t\tconst DropdownIndicator = () => {\n\t\t\treturn arrow_drop_down;\n\t\t};\n\n\t\treturn (\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\tRows per page:\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{' '}\n\t\t\t\t\t\t{this.props.pageIndex + 1} of {this.totalNumberOfPages()}{' '}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{this.props.pageIndex !== 0 && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{this.props.pageIndex + 1 !== this.totalNumberOfPages() && this.totalNumberOfPages() !== 0 && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default Pagination;\n","import { exportCallLogs, getPastCallLogs } from 'api/calllogs';\nimport { getHealthSystems, getOrgTeamChildren } from 'api/users';\nimport { Badge, Grid, Modal, Table } from 'components';\nimport CallDetails from 'components/CallLogs/CallDetails';\nimport Pagination from 'components/Common/Pagination';\nimport { BanyanCallTypesMessage, CallStatus, CallTypes, DeviceListLevel, ObjectType, ParticipantState, UserRoles } from 'constants/enums';\nimport { getUserProfile, getUserRole } from 'infrastructure/auth';\nimport { convertSecondsToHoursFormat, formatDate, getDateDifference, utcToLocalTime } from 'infrastructure/helpers/dateHelper';\nimport moment from 'moment';\nimport React, { Component } from 'react';\nimport DayPickerInput from 'react-day-picker/DayPickerInput';\nimport 'react-day-picker/lib/style.css';\nimport { parseDate } from 'react-day-picker/moment';\nimport Select from 'react-select';\n\nclass PastCallsList extends Component {\n\tstate = {\n\t\tlogs: [],\n\t\tloading: false,\n\t\tpageSize: { value: 10, label: '10' },\n\t\tpageIndex: 0,\n\t\ttotalCount: 0,\n\t\tfrom: undefined,\n\t\tto: undefined,\n\t\tselectedHealthSystem: null,\n\t\tselectedRegion: null,\n\t\tselectedHospital: null,\n\t\tselectedDepartment: null,\n\t\tselectedFloor: null,\n\t\tselectedRoom: null,\n\t\thealthSystems: [],\n\t\tregions: [],\n\t\thospitals: [],\n\t\tdepartments: [],\n\t\tfloors: [],\n\t\trooms: [],\n\t\tcurrentLevel: DeviceListLevel.ORGANIZATION,\n\t\tcurrentTeamId: null,\n\t\tshowCallQueueModal: false,\n\t\tshowCallDetailsModal: false,\n\t\tshowListOfRoomsModal: false,\n\t\tshowStatAlarmsModal: false,\n\t\tcurrentCallLogQueue: [],\n\t\tselectedConference: {},\n\t\tselectedConferenceRoom: {},\n\t\tisExportLogsModalOpen: false,\n\t\tdateError: '',\n\t\tisExportLogsModalLoading: false,\n\t\thasExportLogsModalErrors: false,\n\t};\n\n\tuserProfile = getUserProfile();\n\n\tallObj = { label: 'All', value: null };\n\n\tasync componentDidMount() {\n\t\tconst healthSystems = await getHealthSystems();\n\t\tconst healthSystemsOptions = healthSystems.map(hs => {\n\t\t\treturn { value: hs.id, label: hs.name };\n\t\t});\n\n\t\tif (getUserRole() === UserRoles.ADMIN) {\n\t\t\thealthSystemsOptions.unshift(this.allObj);\n\t\t}\n\n\t\tthis.setState({\n\t\t\thealthSystems: healthSystemsOptions,\n\t\t});\n\n\t\tif (getUserRole() !== UserRoles.ADMIN) {\n\t\t\tthis.filterByLevel(healthSystems[0].id, DeviceListLevel.HEALTHSYSTEM);\n\n\t\t\tconst regions = await getOrgTeamChildren(healthSystems[0].id);\n\t\t\tconst regionsOptions = regions.map(r => {\n\t\t\t\treturn { value: r.id, label: r.name };\n\t\t\t});\n\t\t\tregionsOptions.unshift(this.allObj);\n\n\t\t\tthis.setState({\n\t\t\t\tselectedHealthSystem: { value: healthSystems[0].id, label: healthSystems[0].name },\n\t\t\t\tcurrentLevel: DeviceListLevel.HEALTHSYSTEM,\n\t\t\t\tcurrentTeamId: healthSystems[0].id,\n\t\t\t\thealthSystems: healthSystemsOptions,\n\t\t\t\tregions: regionsOptions,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tthis.onInitPastCallLogs();\n\t}\n\n\tgetCallType(callType, initiator) {\n\t\tif (callType === CallTypes.AUDIO && initiator === 'Virtual Care Provider') {\n\t\t\treturn BanyanCallTypesMessage.TALK_TO_PATIENT;\n\t\t}\n\t\tif (callType === CallTypes.AUDIO && initiator === 'Patient') {\n\t\t\treturn BanyanCallTypesMessage.TALK_TO_NURSE;\n\t\t}\n\t\tif (callType === CallTypes.VIDEO) {\n\t\t\treturn BanyanCallTypesMessage.VIDEO_CALL;\n\t\t}\n\t\tif (callType === CallTypes.SECURITYCAM) {\n\t\t\treturn BanyanCallTypesMessage.PATIENT_VIEW;\n\t\t}\n\t\tif (callType === CallTypes.MONITORING) {\n\t\t\treturn BanyanCallTypesMessage.MONITORING;\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tisSuccessfulCall(status) {\n\t\tif (status === CallStatus.FAILED.type || status === CallStatus.MISSED.type || status === CallStatus.ABORTED.type) return false;\n\n\t\treturn true;\n\t}\n\n\tgetLogs(conferences) {\n\t\treturn conferences.map(conference => {\n\t\t\tconst room =\n\t\t\t\tconference.callType === CallTypes.MONITORING ? this.getMonitoredRooms(conference.participants) : this.getPatientRoom(conference.participants);\n\t\t\tconst vcp = this.getVirtualCareProvider(conference.participants, conference.status);\n\t\t\tconst status = this.getCallStatus(conference.status);\n\t\t\tconst startedAt = moment(utcToLocalTime(conference.startedAt)).format('MM/DD/YYYY-hh:mm A');\n\t\t\tconst endedAt = moment(utcToLocalTime(conference.endedAt)).format('MM/DD/YYYY-hh:mm A');\n\t\t\tconst initiator = vcp?.isInitiator ? 'Virtual Care Provider' : 'Patient';\n\t\t\tconst rooms = conference.participants.filter(p => p.objectType === ObjectType.HELLO_DEVICE);\n\t\t\treturn {\n\t\t\t\tid: conference.id,\n\t\t\t\tinitiator: initiator,\n\t\t\t\tprovider: (conference.callType !== CallTypes.MONITORING && room.isInitiator && !this.isSuccessfulCall(conference.status)) || !vcp ? 'N/A' : vcp.name,\n\t\t\t\troom: conference.callType === CallTypes.MONITORING ? room : room.name,\n\t\t\t\tstartedAt: startedAt,\n\t\t\t\tendedAt: endedAt,\n\t\t\t\torigin: vcp?.isInitiator ? 'Outgoing' : 'Incoming',\n\t\t\t\tstatus: status,\n\t\t\t\tcallType: this.getCallType(conference.callType, initiator),\n\t\t\t\tduration: conference.callDuration,\n\t\t\t\tusedAudio: { room: room.usedAudio, vcp: vcp?.usedAudio },\n\t\t\t\tusedVideo: { room: room.usedVideo, vcp: vcp?.usedVideo },\n\t\t\t\tusedScreen: { room: room.usedScreen, vcp: vcp?.usedScreen },\n\t\t\t\tparticipants: conference.participants,\n\t\t\t\tqueue: room.isInitiator ? conference.participants.filter(participant => participant.objectType === ObjectType.USER) : [],\n\t\t\t\troomCount: rooms.length,\n\t\t\t};\n\t\t});\n\t}\n\n\tgetMonitoredRooms(participants) {\n\t\tconst rooms = participants.reduce((acc, value) => {\n\t\t\tif (value.objectType === ObjectType.HELLO_DEVICE) {\n\t\t\t\treturn `${acc}${acc && ','}${value.name}`;\n\t\t\t}\n\t\t\treturn acc;\n\t\t}, '');\n\n\t\treturn rooms;\n\t}\n\n\tgetTableRows() {\n\t\tif (this.state.logs.length === 0) return [];\n\t\treturn this.state.logs.map(log => {\n\t\t\treturn {\n\t\t\t\tconferenceId: log.id,\n\t\t\t\tinitiator: log.initiator,\n\t\t\t\tprovider: log.provider,\n\t\t\t\troom:\n\t\t\t\t\tlog.callType === BanyanCallTypesMessage.MONITORING ? (\n\t\t\t\t\t\t this.openListOfRoomsModal(log)}>\n\t\t\t\t\t\t\tView All\n\t\t\t\t\t\t\n\t\t\t\t\t) : (\n\t\t\t\t\t\tlog.room\n\t\t\t\t\t),\n\t\t\t\tdate: (\n\t\t\t\t\t
    \n\t\t\t\t\t\t{log.startedAt}\n\t\t\t\t\t\t{log.endedAt}\n\t\t\t\t\t
    \n\t\t\t\t),\n\t\t\t\torigin: log.origin,\n\t\t\t\tstatus: this.getStatusBadge(log.status),\n\t\t\t\tduration: log.duration,\n\t\t\t\tcallType: log.callType,\n\t\t\t\tdetails: (\n\t\t\t\t\t this.openCallDetailsModal(log)}>\n\t\t\t\t\t\tView Details\n\t\t\t\t\t\n\t\t\t\t),\n\t\t\t\tqueue:\n\t\t\t\t\tlog.queue.length > 0 ? (\n\t\t\t\t\t\t this.openCallLogQueueModal(log.queue)}>\n\t\t\t\t\t\t\tView All\n\t\t\t\t\t\t\n\t\t\t\t\t) : (\n\t\t\t\t\t\t'N/A'\n\t\t\t\t\t),\n\t\t\t};\n\t\t});\n\t}\n\n\topenCallLogQueueModal(participants) {\n\t\tthis.setState({\n\t\t\tshowCallQueueModal: true,\n\t\t\tcurrentCallLogQueue: participants,\n\t\t});\n\t}\n\n\topenCallDetailsModal(conference) {\n\t\tthis.setState({\n\t\t\tshowCallDetailsModal: true,\n\t\t\tselectedConference: conference,\n\t\t});\n\t}\n\n\tstartExportTask = async () => {\n\t\tthis.setState({\n\t\t\tisExportLogsModalLoading: true,\n\t\t});\n\t\tconst { error } = await exportCallLogs({\n\t\t\tstart: Math.round(new Date(this.state.from).getTime() / 1000),\n\t\t\tend: Math.round(new Date(this.state.to).getTime() / 1000),\n\t\t\thealthSystemId: this.state.selectedHealthSystem?.value ?? null,\n\t\t\tregionId: this.state.selectedRegion?.value ?? null,\n\t\t\thospitalId: this.state.selectedHospital?.value ?? null,\n\t\t\tdepartmentId: this.state.selectedDepartment?.value ?? null,\n\t\t\tfloorId: this.state.selectedFloor?.value ?? null,\n\t\t\troomId: this.state.selectedRoom?.value ?? null,\n\t\t});\n\n\t\tthis.setState({\n\t\t\tisExportLogsModalLoading: false,\n\t\t\thasExportLogsModalErrors: !!error,\n\t\t\tisExportLogsModalOpen: !!error,\n\t\t});\n\t};\n\n\tgetVirtualCareProvider(participants, status) {\n\t\tif (status === CallStatus.SUCCESSFUL.type && participants.length > 2) {\n\t\t\treturn participants.find(participant => {\n\t\t\t\treturn participant.objectType === ObjectType.USER && participant.isInitiator;\n\t\t\t});\n\t\t}\n\n\t\treturn participants.find(participant => {\n\t\t\treturn participant.objectType === ObjectType.USER;\n\t\t});\n\t}\n\n\tgetPatientRoom(participants) {\n\t\treturn participants.find(participant => {\n\t\t\treturn participant.objectType === ObjectType.HELLO_DEVICE;\n\t\t});\n\t}\n\n\tgetCallStatus(status) {\n\t\tswitch (status) {\n\t\t\tcase CallStatus.UNDEFINED.type: {\n\t\t\t\treturn CallStatus.UNDEFINED.message;\n\t\t\t}\n\t\t\tcase CallStatus.SUCCESSFUL.type: {\n\t\t\t\treturn CallStatus.SUCCESSFUL.message;\n\t\t\t}\n\t\t\tcase CallStatus.PARTIALLYSUCCESSFUL.type: {\n\t\t\t\treturn CallStatus.PARTIALLYSUCCESSFUL.message;\n\t\t\t}\n\t\t\tcase CallStatus.FAILED.type: {\n\t\t\t\treturn CallStatus.FAILED.message;\n\t\t\t}\n\t\t\tcase CallStatus.DISRUPTED.type: {\n\t\t\t\treturn CallStatus.DISRUPTED.message;\n\t\t\t}\n\t\t\tcase CallStatus.PARTIALLYDISRUPTED.type: {\n\t\t\t\treturn CallStatus.PARTIALLYDISRUPTED.message;\n\t\t\t}\n\t\t\tcase CallStatus.MISSED.type: {\n\t\t\t\treturn CallStatus.MISSED.message;\n\t\t\t}\n\t\t\tcase CallStatus.ABORTED.type: {\n\t\t\t\treturn CallStatus.ABORTED.message;\n\t\t\t}\n\t\t\tcase CallStatus.DROPPED.type: {\n\t\t\t\treturn CallStatus.DROPPED.message;\n\t\t\t}\n\t\t\t// no default\n\t\t}\n\t}\n\n\tgetStatusBadge(status) {\n\t\treturn ;\n\t}\n\n\tonChange = async (pageSize, pageIndex, start, end) => {\n\t\tconst startDate = start || this.state.from;\n\t\tconst endDate = end || this.state.to;\n\t\tconst result = await getPastCallLogs({\n\t\t\tstart: startDate ? Math.round(new Date(startDate).getTime() / 1000) : null,\n\t\t\tend: endDate ? Math.round(new Date(endDate).getTime() / 1000) : null,\n\t\t\thealthSystemId: this.state.selectedHealthSystem?.value,\n\t\t\tregionId: this.state.selectedRegion?.value,\n\t\t\thospitalId: this.state.selectedHospital?.value,\n\t\t\tdepartmentId: this.state.selectedDepartment?.value,\n\t\t\tfloorId: this.state.selectedFloor?.value,\n\t\t\troomId: this.state.selectedRoom?.value,\n\t\t\tpageSize: this.state.pageSize?.value,\n\t\t\tpageIndex: this.state.pageIndex,\n\t\t});\n\t\tif (result.error) {\n\t\t\treturn;\n\t\t}\n\t\tconst logs = this.getLogs(result.conferences);\n\t\tthis.setState({\n\t\t\tlogs,\n\t\t\tloading: false,\n\t\t\tpageSize,\n\t\t\tpageIndex,\n\t\t\ttotalCount: result.totalCount,\n\t\t});\n\t};\n\n\tshowFromMonth() {\n\t\tconst { from, to } = this.state;\n\t\tif (!from) {\n\t\t\treturn;\n\t\t}\n\t\tif (moment(to).diff(moment(from), 'months') < 2) {\n\t\t\tthis.to.getDayPicker().showMonth(from);\n\t\t}\n\t}\n\n\thandleFromChange = from => {\n\t\tconst daysDiff = this.state.selectedHealthSystem === this.allObj ? 1 : 90;\n\t\tconst diff = getDateDifference(from, this.state.to);\n\t\tif (diff > daysDiff) {\n\t\t\tthis.setState({\n\t\t\t\tdateError: `Date difference cant be more than ${daysDiff} days`,\n\t\t\t\tfrom,\n\t\t\t});\n\t\t} else {\n\t\t\tthis.setState({ from, dateError: '' });\n\t\t\tif (from && !this.state.to) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.onChange(this.state.pageSize, 0, this.state.to?.setHours(0, 0, 0, 0), from?.setHours(23, 59, 59));\n\t\t}\n\t};\n\n\thandleToChange = to => {\n\t\tconst daysDiff = this.state.selectedHealthSystem === this.allObj ? 1 : 90;\n\t\tconst diff = getDateDifference(this.state.from, to);\n\t\tif (diff > daysDiff) {\n\t\t\tthis.setState({\n\t\t\t\tdateError: `Date difference cant be more than ${daysDiff} days`,\n\t\t\t\tto,\n\t\t\t});\n\t\t} else {\n\t\t\tthis.setState({ to, dateError: '' }, this.showFromMonth);\n\t\t\tif (!this.state.from && to) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.onChange(this.state.pageSize, 0, this.state.from?.setHours(0, 0, 0, 0), to?.setHours(23, 59, 59));\n\t\t}\n\t};\n\n\thandleResetClick = () => {\n\t\tthis.setState({ from: undefined, to: undefined });\n\t};\n\n\tasync filterByLevel(value, type, isInit = false) {\n\t\tthis.setState({\n\t\t\tloading: true,\n\t\t\tpageIndex: 0,\n\t\t\tdateError: '',\n\t\t});\n\n\t\tlet start = this.state.from ? Math.round(new Date(this.state.from).getTime() / 1000) : null;\n\t\tlet end = this.state.to ? Math.round(new Date(this.state.to).getTime() / 1000) : null;\n\n\t\tif (type === DeviceListLevel.ORGANIZATION && isInit) {\n\t\t\tconst oneDayBefore = new Date();\n\t\t\toneDayBefore.setDate(oneDayBefore.getDate() - 1);\n\t\t\tconst endDate = new Date();\n\t\t\tconst formattedStart = oneDayBefore.setHours(0, 0, 0, 0);\n\t\t\tconst formattedEnd = endDate.setHours(23, 59, 59, 999);\n\t\t\tstart = Math.round(new Date(formattedStart).getTime() / 1000);\n\t\t\tend = Math.round(new Date(formattedEnd).getTime() / 1000);\n\n\t\t\tthis.setState({\n\t\t\t\tfrom: oneDayBefore,\n\t\t\t\tto: endDate,\n\t\t\t});\n\t\t}\n\n\t\tconst result = await getPastCallLogs({\n\t\t\tstart,\n\t\t\tend,\n\t\t\thealthSystemId: type === DeviceListLevel.HEALTHSYSTEM ? value : this.state.selectedHealthSystem?.value,\n\t\t\tregionId: type === DeviceListLevel.REGION ? value : this.state.selectedRegion?.value,\n\t\t\thospitalId: type === DeviceListLevel.HOSPITAL ? value : this.state.selectedHospital?.value,\n\t\t\tdepartmentId: type === DeviceListLevel.DEPARTMENT ? value : this.state.selectedDepartment?.value,\n\t\t\tfloorId: type === DeviceListLevel.FLOOR ? value : this.state.selectedFloor?.value,\n\t\t\troomId: type === DeviceListLevel.ROOM ? value : this.state.selectedRoom?.value,\n\t\t\tpageSize: this.state.pageSize.value,\n\t\t\tpageIndex: this.state.pageIndex,\n\t\t});\n\t\tif (result.error) {\n\t\t\treturn;\n\t\t}\n\t\tconst logs = this.getLogs(result.conferences);\n\t\tthis.setState({\n\t\t\tlogs: logs,\n\t\t\tloading: false,\n\t\t\ttotalCount: result.totalCount,\n\t\t});\n\t}\n\n\tasync onHealthSystemSelected(value) {\n\t\tif (!value?.value) {\n\t\t\tthis.onInitPastCallLogs();\n\t\t\treturn;\n\t\t}\n\t\tthis.setState({\n\t\t\tselectedHealthSystem: value,\n\t\t\tselectedRegion: this.allObj,\n\t\t\tselectedHospital: null,\n\t\t\tselectedDepartment: null,\n\t\t\tselectedFloor: null,\n\t\t\tselectedRoom: null,\n\t\t\tregions: [],\n\t\t\thospitals: [],\n\t\t\tdepartments: [],\n\t\t\tfloors: [],\n\t\t\trooms: [],\n\t\t\tcurrentLevel: DeviceListLevel.HEALTHSYSTEM,\n\t\t\tcurrentTeamId: value.value,\n\t\t});\n\n\t\tthis.filterByLevel(value.value, DeviceListLevel.HEALTHSYSTEM);\n\n\t\tconst regions = await getOrgTeamChildren(value.value);\n\t\tconst regionsOptions = regions.map(r => {\n\t\t\treturn { value: r.id, label: r.name };\n\t\t});\n\t\tregionsOptions.unshift(this.allObj);\n\t\tthis.setState({ regions: regionsOptions });\n\t}\n\n\tasync onInitPastCallLogs() {\n\t\tif (this.state.from && this.state.to) {\n\t\t\tconst diff = getDateDifference(this.state.from, this.state.to);\n\t\t\tif (diff > 1) {\n\t\t\t\tthis.setState({\n\t\t\t\t\tdateError: `Date difference cant be more than 1 day`,\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tthis.setState({\n\t\t\tselectedHealthSystem: this.allObj,\n\t\t\tselectedRegion: null,\n\t\t\tselectedHospital: null,\n\t\t\tselectedDepartment: null,\n\t\t\tselectedFloor: null,\n\t\t\tselectedRoom: null,\n\t\t\tregions: [],\n\t\t\thospitals: [],\n\t\t\tdepartments: [],\n\t\t\tfloors: [],\n\t\t\trooms: [],\n\t\t\tdateError: false,\n\t\t});\n\n\t\tthis.filterByLevel(null, DeviceListLevel.ORGANIZATION, true);\n\t}\n\n\tasync onRegionSelected(value) {\n\t\tthis.setState({\n\t\t\tselectedRegion: value,\n\t\t\tselectedHospital: this.allObj,\n\t\t\tselectedDepartment: null,\n\t\t\tselectedFloor: null,\n\t\t\tselectedRoom: null,\n\t\t\thospitals: [],\n\t\t\tdepartments: [],\n\t\t\tfloors: [],\n\t\t\trooms: [],\n\t\t\tcurrentLevel: DeviceListLevel.REGION,\n\t\t\tcurrentTeamId: value.value,\n\t\t});\n\n\t\tthis.filterByLevel(value.value, DeviceListLevel.REGION);\n\n\t\tconst hospitals = await getOrgTeamChildren(value.value);\n\t\tconst hospitalOptions = hospitals.map(h => {\n\t\t\treturn { value: h.id, label: h.name };\n\t\t});\n\t\thospitalOptions.unshift(this.allObj);\n\t\tthis.setState({ hospitals: hospitalOptions });\n\t}\n\n\tasync onHospitalSelected(value) {\n\t\tthis.setState({\n\t\t\tselectedHospital: value,\n\t\t\tselectedDepartment: this.allObj,\n\t\t\tselectedFloor: null,\n\t\t\tselectedRoom: null,\n\t\t\tdepartments: [],\n\t\t\tfloors: [],\n\t\t\trooms: [],\n\t\t\tcurrentLevel: DeviceListLevel.HOSPITAL,\n\t\t\tcurrentTeamId: value.value,\n\t\t});\n\n\t\tthis.filterByLevel(value.value, DeviceListLevel.HOSPITAL);\n\n\t\tconst departments = await getOrgTeamChildren(value.value);\n\t\tconst departmentOptions = departments.map(d => {\n\t\t\treturn { value: d.id, label: d.name };\n\t\t});\n\t\tthis.setState({ departments: departmentOptions });\n\t}\n\n\tasync onDepartmentSelected(value) {\n\t\tthis.setState({\n\t\t\tselectedDepartment: value,\n\t\t\tselectedFloor: this.allObj,\n\t\t\tselectedRoom: null,\n\t\t\tfloors: [],\n\t\t\trooms: [],\n\t\t\tcurrentLevel: DeviceListLevel.DEPARTMENT,\n\t\t\tcurrentTeamId: value.value,\n\t\t});\n\n\t\tthis.filterByLevel(value.value, DeviceListLevel.DEPARTMENT);\n\n\t\tconst floors = await getOrgTeamChildren(value.value);\n\t\tconst floorOptions = floors.map(f => {\n\t\t\treturn { value: f.id, label: f.name };\n\t\t});\n\t\tfloorOptions.unshift(this.allObj);\n\t\tthis.setState({ floors: floorOptions });\n\t}\n\n\tasync onFloorSelected(value) {\n\t\tthis.setState({\n\t\t\tselectedFloor: value,\n\t\t\tselectedRoom: this.allObj,\n\t\t\trooms: [],\n\t\t\tcurrentLevel: DeviceListLevel.FLOOR,\n\t\t\tcurrentTeamId: value.value,\n\t\t});\n\n\t\tthis.filterByLevel(value.value, DeviceListLevel.FLOOR);\n\n\t\tconst rooms = await getOrgTeamChildren(value.value);\n\t\tconst roomOptions = rooms.map(r => {\n\t\t\treturn { value: r.id, label: r.name };\n\t\t});\n\t\troomOptions.unshift(this.allObj);\n\t\tthis.setState({ rooms: roomOptions });\n\t}\n\n\tasync onRoomSelected(value) {\n\t\tthis.setState({\n\t\t\tselectedRoom: value,\n\t\t\tcurrentLevel: DeviceListLevel.ROOM,\n\t\t\tcurrentTeamId: value.value,\n\t\t});\n\n\t\tthis.filterByLevel(value.value, DeviceListLevel.ROOM);\n\t}\n\n\tshowListOfUnavailableNurses() {\n\t\tconst headers = [{ title: 'Name' }, { title: 'Status' }];\n\n\t\tconst unavailableNurses = this.state.currentCallLogQueue.map(nurse => {\n\t\t\treturn {\n\t\t\t\tname: nurse.name,\n\t\t\t\tstatus: this.getParticipantState(nurse.state),\n\t\t\t};\n\t\t});\n\n\t\treturn ;\n\t}\n\n\tgetParticipantState(state) {\n\t\tswitch (state) {\n\t\t\tcase ParticipantState.CONNECTING.type: {\n\t\t\t\treturn ParticipantState.CONNECTING.message;\n\t\t\t}\n\t\t\tcase ParticipantState.CONNECTED.type: {\n\t\t\t\treturn ParticipantState.CONNECTED.message;\n\t\t\t}\n\t\t\tcase ParticipantState.BUSY.type: {\n\t\t\t\treturn ParticipantState.BUSY.message;\n\t\t\t}\n\t\t\tcase ParticipantState.DECLINED.type: {\n\t\t\t\treturn ParticipantState.DECLINED.message;\n\t\t\t}\n\t\t\tcase ParticipantState.OFFLINE.type: {\n\t\t\t\treturn ParticipantState.OFFLINE.message;\n\t\t\t}\n\t\t\tcase ParticipantState.LEFT_CALL.type: {\n\t\t\t\treturn ParticipantState.LEFT_CALL.message;\n\t\t\t}\n\t\t\tcase ParticipantState.NOT_ANSWERING.type: {\n\t\t\t\treturn ParticipantState.NOT_ANSWERING.message;\n\t\t\t}\n\t\t\tcase ParticipantState.CANT_CONNECT.type: {\n\t\t\t\treturn ParticipantState.CANT_CONNECT.message;\n\t\t\t}\n\t\t\tcase ParticipantState.DISRUPTED.type: {\n\t\t\t\treturn ParticipantState.DISRUPTED.message;\n\t\t\t}\n\t\t\tcase ParticipantState.REMOVED.type: {\n\t\t\t\treturn ParticipantState.REMOVED.message;\n\t\t\t}\n\t\t\tdefault: {\n\t\t\t\treturn 'N/A';\n\t\t\t}\n\t\t}\n\t}\n\n\topenListOfRoomsModal = conference => {\n\t\tthis.setState({\n\t\t\tselectedConference: conference,\n\t\t\tshowListOfRoomsModal: true,\n\t\t});\n\t};\n\n\topenStatAlarmsModal = conferenceRoom => {\n\t\tthis.setState({\n\t\t\tselectedConferenceRoom: conferenceRoom,\n\t\t\tshowStatAlarmsModal: true,\n\t\t});\n\t};\n\n\tshowListOfRooms = () => {\n\t\tconst headers = [{ title: 'Room' }, { title: 'Status' }, { title: 'Stat Alarms' }];\n\t\tconst conference = this.state.selectedConference;\n\t\tif (!conference || !conference.participants) {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\treturn console.error('Error while getting list of participants!');\n\t\t}\n\n\t\tconst rooms = conference.participants.reduce((acc, participant) => {\n\t\t\tif (participant.objectType === ObjectType.HELLO_DEVICE) {\n\t\t\t\tacc.push({\n\t\t\t\t\troom: participant.name,\n\t\t\t\t\tstatus: this.getParticipantState(participant.state),\n\t\t\t\t\tstatAlarms:\n\t\t\t\t\t\tparticipant.statAlarms?.length > 0 ? (\n\t\t\t\t\t\t\t this.openStatAlarmsModal(participant)}>\n\t\t\t\t\t\t\t\tView All\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t'N/A'\n\t\t\t\t\t\t),\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn acc;\n\t\t}, []);\n\n\t\treturn
    ;\n\t};\n\n\tshowListOfStatAlarms = () => {\n\t\tconst headers = [{ title: 'Activation Time' }, { title: 'Deactivation Time' }, { title: 'Duration' }];\n\t\tconst conferenceRoom = this.state.selectedConferenceRoom;\n\t\tif (!conferenceRoom || !conferenceRoom.statAlarms) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst statAlarms = conferenceRoom.statAlarms.map(statAlarm => ({\n\t\t\tactivationTime: statAlarm.dateEnabled ? moment(utcToLocalTime(statAlarm.dateEnabled)).format('MM/DD/YYYY-hh:mm A') : 'N/A',\n\t\t\tdeactivationTime: statAlarm.dateDisabled ? moment(utcToLocalTime(statAlarm.dateDisabled)).format('MM/DD/YYYY-hh:mm A') : 'N/A',\n\t\t\tduration: statAlarm.dateEnabled && statAlarm.dateDisabled ? convertSecondsToHoursFormat(statAlarm.durationInSeconds) : 'N/A',\n\t\t}));\n\n\t\t// eslint-disable-next-line consistent-return\n\t\treturn
    ;\n\t};\n\n\trender() {\n\t\tconst tableHeaders = [\n\t\t\t{ title: 'ID' },\n\t\t\t{ title: 'Call Initiator' },\n\t\t\t{ title: 'Virtual Care Provider' },\n\t\t\t{ title: 'Room' },\n\t\t\t{ title: 'Date/Time' },\n\t\t\t{ title: 'Call Origin' },\n\t\t\t{ title: 'Call Status' },\n\t\t\t{ title: 'Call Duration' },\n\t\t\t{ title: 'Call Type' },\n\t\t\t{ title: 'Details' },\n\t\t\t{ title: 'Queue' },\n\t\t];\n\t\tconst { from, to } = this.state;\n\t\tconst modifiers = { start: from, end: to };\n\t\tconst DropdownIndicator = () => {\n\t\t\treturn arrow_drop_down;\n\t\t};\n\t\treturn (\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t this.onHealthSystemSelected(value)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t this.onRegionSelected(value)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t this.onHospitalSelected(value)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t this.onDepartmentSelected(value)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t this.onFloorSelected(value)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t this.onRoomSelected(value)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\tdate_range\n\t\t\t\t\t\t\t\t this.to.getInput().focus(),\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tonDayChange={this.handleFromChange}\n\t\t\t\t\t\t\t\t/>{' '}\n\t\t\t\t\t\t\t\t-{' '}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t (this.to = el)}\n\t\t\t\t\t\t\t\t\t\tvalue={to}\n\t\t\t\t\t\t\t\t\t\tplaceholder='--/--/----'\n\t\t\t\t\t\t\t\t\t\tformat='LL'\n\t\t\t\t\t\t\t\t\t\tformatDate={formatDate}\n\t\t\t\t\t\t\t\t\t\tparseDate={parseDate}\n\t\t\t\t\t\t\t\t\t\tdayPickerProps={{\n\t\t\t\t\t\t\t\t\t\t\tselectedDays: [from, { from, to }],\n\t\t\t\t\t\t\t\t\t\t\tdisabledDays: { before: from },\n\t\t\t\t\t\t\t\t\t\t\tmodifiers,\n\t\t\t\t\t\t\t\t\t\t\tmonth: from,\n\t\t\t\t\t\t\t\t\t\t\tfromMonth: from,\n\t\t\t\t\t\t\t\t\t\t\tnumberOfMonths: 2,\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tonDayChange={this.handleToChange}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tarrow_drop_down\n\t\t\t\t\t\t\t
    \n\n\t\t\t\t\t\t\t{this.state.dateError &&

    {this.state.dateError}

    }\n\t\t\t\t\t\t
    \n\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tthis.setState({ isExportLogsModalOpen: true });\n\t\t\t\t\t\t\t}}>\n\t\t\t\t\t\t\tattach_emailExport to CSV\n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t this.onChange(pageSize, pageIndex)}\n\t\t\t\t/>\n\t\t\t\t this.setState({ showCallQueueModal: false, currentCallLogQueue: [] })}>\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    Queue of nurses that were called

    \n\t\t\t\t\t\t{this.showListOfUnavailableNurses()}\n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t this.setState({ showCallDetailsModal: false, selectedConference: {} })}>\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t this.setState({ showListOfRoomsModal: false, selectedConference: {} })}>\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    List of Rooms

    \n\t\t\t\t\t\t{this.state.showListOfRoomsModal && this.showListOfRooms()}\n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t this.setState({ showStatAlarmsModal: false, selectedConferenceRoom: {} })}>\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    List of Stat Alarms

    \n\t\t\t\t\t\t{this.state.showStatAlarmsModal && this.showListOfStatAlarms()}\n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t this.setState({ isExportLogsModalOpen: false, isExportLogsModalLoading: false, hasExportLogsModalErrors: false })}>\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    Export CSV Logs

    \n\t\t\t\t\t\t{!this.state.hasExportLogsModalErrors && (\n\t\t\t\t\t\t\t

    {`The CSV export will be created in the background. Once finished, it will be sent to ${this.userProfile.email} in an attachment.`}

    \n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{this.state.hasExportLogsModalErrors &&

    Something went wrong. Please try again later

    }\n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default PastCallsList;\n","import React, { Component } from 'react';\nimport moment from 'moment';\nimport { SocketContext } from 'io-client/SocketContext';\nimport { utcToLocalTime } from 'infrastructure/helpers/dateHelper';\nimport { getUserProfile, getUserRole } from 'infrastructure/auth';\nimport { Table, Modal, Grid, Button } from 'components';\nimport Pagination from 'components/Common/Pagination';\nimport {\n\tObjectType,\n\tCallStatus,\n\tDeviceListLevel,\n\tCallTypes,\n\tParticipantState,\n\tUserRoles,\n\tTerminateRequestFailureReasonMessages,\n\tTerminateRequestFailureReasonEnum,\n\tBanyanCallTypesMessage,\n} from 'constants/enums';\nimport SocketEvents from 'constants/socket-events';\nimport { getDeviceOngoingConferencesByLevel } from 'api/calllogs';\nimport { getHealthSystems } from 'api/users';\n\nexport class OngoingCallsList extends Component {\n\tconstructor(props, socket) {\n\t\tsuper(props);\n\t\tthis.socket = socket;\n\t\tthis.state = {\n\t\t\tlogs: [],\n\t\t\tloading: true,\n\t\t\tpageSize: { value: 10, label: '10' },\n\t\t\tpageIndex: 0,\n\t\t\ttotalCount: 0,\n\t\t\tcurrentLevel: DeviceListLevel.ORGANIZATION,\n\t\t\tcurrentTeamId: null,\n\t\t\tshowListOfRoomsModal: false,\n\t\t\tshowTerminateCallModal: false,\n\t\t\tshowParticipantTerminateCallModal: false,\n\t\t\tisTerminateCallModalLoading: false,\n\t\t\tterminateRequestFailureReason: null,\n\t\t\tterminateRequestSubmitButtonText: '',\n\t\t\tterminateRequestCloseButtonText: 'Cancel',\n\t\t\tterminateRequestInProgress: false,\n\t\t\tselectedConferenceId: null,\n\t\t\tselectedParticipantId: null,\n\t\t};\n\t}\n\n\tasync componentDidMount() {\n\t\tthis.bindSocketEvents();\n\t\tthis.bindWindowEventListener();\n\t\tconst userRole = getUserRole();\n\t\tconst healthSystems = await getHealthSystems();\n\t\t// uncomment this if you need to use it\n\t\t// const healthSystemsOptions = healthSystems.map(hs => {\n\t\t// \treturn { value: hs.id, label: hs.name };\n\t\t// });\n\n\t\tlet currentLevel = DeviceListLevel.ORGANIZATION;\n\t\tlet currentTeamId;\n\t\tif (userRole !== UserRoles.ADMIN) {\n\t\t\tcurrentLevel = DeviceListLevel.HEALTHSYSTEM;\n\t\t\tcurrentTeamId = healthSystems[0].id;\n\t\t}\n\n\t\tconst result = await getDeviceOngoingConferencesByLevel(currentLevel, currentTeamId);\n\t\tconst logs = this.getLogs(result.conferences);\n\t\tthis.setState({\n\t\t\tlogs,\n\t\t\tloading: false,\n\t\t\ttotalCount: result.totalCount,\n\t\t\tpageIndex: result.pageIndex,\n\t\t\tcurrentLevel,\n\t\t\tcurrentTeamId,\n\t\t\t// healthSystems: healthSystemsOptions, // uncomment this if you need to use it\n\t\t});\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.clearTerminateRequestTimeout();\n\t\tthis.unbindSocketEvents();\n\t}\n\n\tonTerminateRequestAcceptedHandler = data => {\n\t\tif (this.state.selectedConferenceId === data.conferenceId) {\n\t\t\t// stop the timeout for terminate request\n\t\t\tthis.clearTerminateRequestTimeout();\n\n\t\t\t// remove conference from logs\n\t\t\tconst logs = this.removeConferenceFromLogs(data.conferenceId);\n\t\t\tthis.setState({\n\t\t\t\tisTerminateCallModalLoading: false,\n\t\t\t\tterminateRequestSubmitButtonText: '',\n\t\t\t\tterminateRequestInProgress: false,\n\t\t\t\tterminateRequestCloseButtonText: 'Close',\n\t\t\t\tlogs,\n\t\t\t});\n\t\t}\n\t};\n\n\tbindSocketEvents() {\n\t\tthis.socket.on(SocketEvents.Conference.ON_TERMINATE_REQUEST_ACCEPTED, this.onTerminateRequestAcceptedHandler);\n\t}\n\n\tunbindSocketEvents() {\n\t\tthis.socket.off(SocketEvents.Conference.ON_TERMINATE_REQUEST_ACCEPTED, this.onTerminateRequestAcceptedHandler);\n\t}\n\n\tbindWindowEventListener() {\n\t\twindow.addEventListener('beforeunload', event => {\n\t\t\tif (this.state.terminateRequestInProgress) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\t// eslint-disable-next-line no-param-reassign\n\t\t\t\tevent.returnValue = '';\n\t\t\t}\n\t\t});\n\n\t\twindow.addEventListener('unload', () => {\n\t\t\tif (this.state.terminateRequestInProgress) {\n\t\t\t\tthis.sendTerminateRequestCloseEvent();\n\t\t\t}\n\t\t});\n\t}\n\n\tgetCallType(callType, initiator) {\n\t\tif (callType === CallTypes.AUDIO && initiator === 'Virtual Care Provider') {\n\t\t\treturn BanyanCallTypesMessage.TALK_TO_PATIENT;\n\t\t}\n\t\tif (callType === CallTypes.AUDIO && initiator === 'Patient') {\n\t\t\treturn BanyanCallTypesMessage.TALK_TO_NURSE;\n\t\t}\n\t\tif (callType === CallTypes.VIDEO) {\n\t\t\treturn BanyanCallTypesMessage.VIDEO_CALL;\n\t\t}\n\t\tif (callType === CallTypes.SECURITYCAM) {\n\t\t\treturn BanyanCallTypesMessage.PATIENT_VIEW;\n\t\t}\n\t\tif (callType === CallTypes.MONITORING) {\n\t\t\treturn BanyanCallTypesMessage.MONITORING;\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tisSuccessfulCall(status) {\n\t\tif (status === CallStatus.FAILED.type || status === CallStatus.MISSED.type || status === CallStatus.ABORTED.type) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tgetVirtualCareProvider(participants, status) {\n\t\tif (status === CallStatus.SUCCESSFUL.type && participants.length > 2) {\n\t\t\treturn participants.find(participant => {\n\t\t\t\treturn (\n\t\t\t\t\tparticipant.objectType === ObjectType.USER &&\n\t\t\t\t\t(participant.state === ParticipantState.CONNECTED.type ||\n\t\t\t\t\t\tparticipant.state === ParticipantState.LEFT_CALL.type ||\n\t\t\t\t\t\tparticipant.state === ParticipantState.CONNECTING.type ||\n\t\t\t\t\t\tparticipants.state === ParticipantState.DISRUPTED.type)\n\t\t\t\t);\n\t\t\t});\n\t\t}\n\n\t\treturn participants.find(participant => {\n\t\t\treturn participant.objectType === ObjectType.USER;\n\t\t});\n\t}\n\n\tgetPatientRoom(participants) {\n\t\treturn participants.find(participant => {\n\t\t\treturn participant.objectType === ObjectType.HELLO_DEVICE;\n\t\t});\n\t}\n\n\tgetCallStatus(status) {\n\t\tlet result;\n\t\tswitch (status) {\n\t\t\tcase CallStatus.UNDEFINED.type: {\n\t\t\t\tresult = CallStatus.UNDEFINED.message;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase CallStatus.SUCCESSFUL.type: {\n\t\t\t\tresult = CallStatus.SUCCESSFUL.message;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase CallStatus.PARTIALLYSUCCESSFUL.type: {\n\t\t\t\tresult = CallStatus.PARTIALLYSUCCESSFUL.message;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase CallStatus.FAILED.type: {\n\t\t\t\tresult = CallStatus.FAILED.message;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase CallStatus.DISRUPTED.type: {\n\t\t\t\tresult = CallStatus.DISRUPTED.message;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase CallStatus.PARTIALLYDISRUPTED.type: {\n\t\t\t\tresult = CallStatus.PARTIALLYDISRUPTED.message;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase CallStatus.MISSED.type: {\n\t\t\t\tresult = CallStatus.MISSED.message;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase CallStatus.ABORTED.type: {\n\t\t\t\tresult = CallStatus.ABORTED.message;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase CallStatus.DROPPED.type: {\n\t\t\t\tresult = CallStatus.DROPPED.message;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault: {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\tgetLogs(conferences) {\n\t\tconst filtered = conferences.filter(conference => {\n\t\t\treturn typeof this.getVirtualCareProvider(conference.participants, conference.status) !== 'undefined';\n\t\t});\n\t\treturn filtered.map(conference => {\n\t\t\tconst room = this.getPatientRoom(conference.participants);\n\t\t\tconst vcp = this.getVirtualCareProvider(conference.participants, conference.status);\n\t\t\tconst status = this.getCallStatus(conference.status);\n\t\t\tconst startedAt = moment(utcToLocalTime(conference.startedAt)).format('MM/DD/YYYY-hh:mm A');\n\t\t\tconst initiator = vcp?.isInitiator ? 'Virtual Care Provider' : 'Patient';\n\t\t\treturn {\n\t\t\t\tid: conference.id,\n\t\t\t\tinitiator: initiator,\n\t\t\t\tprovider: room?.isInitiator && !this.isSuccessfulCall(conference.status) ? 'N/A' : vcp?.name,\n\t\t\t\troom: room?.name ?? 'N/A',\n\t\t\t\tstartedAt: startedAt,\n\t\t\t\torigin: vcp?.isInitiator ? 'Outgoing' : 'Incoming',\n\t\t\t\tstatus: status,\n\t\t\t\tcallType: this.getCallType(conference.callType, initiator),\n\t\t\t\tduration: conference.callDuration,\n\t\t\t\tusedAudio: { room: room?.usedAudio ?? 'N/A', vcp: vcp?.usedAudio ?? 'N/A' },\n\t\t\t\tusedVideo: { room: room?.usedVideo ?? 'N/A', vcp: vcp?.usedVideo ?? 'N/A' },\n\t\t\t\tusedScreen: { room: room?.usedScreen ?? 'N/A', vcp: vcp?.usedScreen ?? 'N/A' },\n\t\t\t\tparticipants: conference.participants,\n\t\t\t\tqueue: room?.isInitiator ? conference.participants.filter(participant => participant.objectType === ObjectType.USER) : [],\n\t\t\t};\n\t\t});\n\t}\n\n\tgetTableRows() {\n\t\tif (this.state.logs.length === 0) return [];\n\t\treturn this.state.logs.map(log => {\n\t\t\treturn {\n\t\t\t\tconferenceId: log.id,\n\t\t\t\tinitiator: log.initiator,\n\t\t\t\tprovider: log.provider,\n\t\t\t\troom:\n\t\t\t\t\tlog.callType === BanyanCallTypesMessage.MONITORING ? (\n\t\t\t\t\t\t this.openListOfRoomsModal(log.id)}>\n\t\t\t\t\t\t\tView All\n\t\t\t\t\t\t\n\t\t\t\t\t) : (\n\t\t\t\t\t\tlog.room\n\t\t\t\t\t),\n\t\t\t\tdate: (\n\t\t\t\t\t
    \n\t\t\t\t\t\t{log.startedAt}\n\t\t\t\t\t
    \n\t\t\t\t),\n\t\t\t\torigin: log.origin,\n\t\t\t\tduration: log.duration,\n\t\t\t\tcallType: log.callType,\n\t\t\t\tterminateCall: (\n\t\t\t\t\t
    \n\t\t\t\t\t\t this.openForceTerminateCallModal(log.id)}>\n\t\t\t\t\t\t\thighlight_off\n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t),\n\t\t\t};\n\t\t});\n\t}\n\n\tonChange(pageSize, pageIndex) {\n\t\tthis.setState({ loading: true }, () => {\n\t\t\tgetDeviceOngoingConferencesByLevel(\n\t\t\t\tthis.state.currentLevel,\n\t\t\t\tthis.state.currentTeamId ? this.state.currentTeamId : undefined,\n\t\t\t\tpageSize.value,\n\t\t\t\tpageIndex\n\t\t\t).then(result => {\n\t\t\t\tconst logs = this.getLogs(result.conferences);\n\t\t\t\tthis.setState({\n\t\t\t\t\tlogs: logs,\n\t\t\t\t\tloading: false,\n\t\t\t\t\tpageSize: pageSize,\n\t\t\t\t\tpageIndex: pageIndex,\n\t\t\t\t\ttotalCount: result.totalCount,\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t}\n\n\topenForceTerminateCallModal(conferenceId) {\n\t\tthis.setState({\n\t\t\tshowTerminateCallModal: true,\n\t\t\tterminateRequestSubmitButtonText: 'End call',\n\t\t\tselectedConferenceId: conferenceId,\n\t\t});\n\t}\n\n\topenParticipantForceTerminateCallModal(conferenceId, participantId) {\n\t\tthis.setState({\n\t\t\tshowParticipantTerminateCallModal: true,\n\t\t\tterminateRequestSubmitButtonText: 'End call for room',\n\t\t\tselectedParticipantId: participantId,\n\t\t\tselectedConferenceId: conferenceId,\n\t\t\tshowListOfRoomsModal: false,\n\t\t});\n\t}\n\n\tcloseParticipantTerminalCallModal = () => {\n\t\tif (this.state.terminateRequestInProgress) {\n\t\t\tthis.sendTerminateRequestCloseEvent();\n\t\t}\n\t\tthis.clearTerminateRequestTimeout();\n\t\tthis.setState({\n\t\t\tshowParticipantTerminateCallModal: false,\n\t\t\tisTerminateCallModalLoading: false,\n\t\t\tterminateRequestFailureReason: null,\n\t\t\tterminateRequestSubmitButtonText: '',\n\t\t\tterminateRequestCloseButtonText: 'Close',\n\t\t\tterminateRequestInProgress: false,\n\t\t\tselectedParticipantId: null,\n\t\t});\n\t};\n\n\tcloseTerminalCallModal = () => {\n\t\tif (this.state.terminateRequestInProgress) {\n\t\t\tthis.sendTerminateRequestCloseEvent();\n\t\t}\n\t\tthis.clearTerminateRequestTimeout();\n\t\tthis.setState({\n\t\t\tshowTerminateCallModal: false,\n\t\t\tisTerminateCallModalLoading: false,\n\t\t\tterminateRequestFailureReason: null,\n\t\t\tterminateRequestSubmitButtonText: '',\n\t\t\tterminateRequestCloseButtonText: 'Close',\n\t\t\tterminateRequestInProgress: false,\n\t\t\tselectedConferenceId: null,\n\t\t});\n\t};\n\n\tonForceTerminalCallModalSubmit = async () => {\n\t\tthis.setState({\n\t\t\tisTerminateCallModalLoading: true,\n\t\t\tterminateRequestSubmitButtonText: 'Retry',\n\t\t\tterminateRequestInProgress: true,\n\t\t});\n\n\t\tconst userProfile = getUserProfile();\n\t\tconst user = {\n\t\t\tfullName: `${userProfile.firstName} ${userProfile.lastName}`,\n\t\t};\n\t\tthis.socket.emit(SocketEvents.Conference.FORCE_TERIMATE, { conferenceId: this.state.selectedConferenceId, user }, response => {\n\t\t\tif (!response.ok) {\n\t\t\t\tthis.clearTerminateRequestTimeout();\n\t\t\t\tconst newState = {\n\t\t\t\t\tisTerminateCallModalLoading: false,\n\t\t\t\t\tterminateRequestFailureReason: response.failureReason, // shows the reason\n\t\t\t\t\tterminateRequestSubmitButtonText: '', // hides submit the button\n\t\t\t\t\tterminateRequestInProgress: false,\n\t\t\t\t};\n\t\t\t\tif (response.failureReason === TerminateRequestFailureReasonEnum.NULL_CONFERENCE) {\n\t\t\t\t\t// remove conference from logs\n\t\t\t\t\tconst logs = this.removeConferenceFromLogs(this.state.selectedConferenceId);\n\t\t\t\t\tObject.assign(newState, { logs });\n\t\t\t\t\tObject.assign(newState, { terminateRequestCloseButtonText: 'Close' });\n\t\t\t\t} else if (\n\t\t\t\t\t[TerminateRequestFailureReasonEnum.UNHANDLED_EXCEPTION, TerminateRequestFailureReasonEnum.NULL_CONNECTED_USER_PARTICIPANT].includes(\n\t\t\t\t\t\tresponse.failureReason\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tObject.assign(newState, { terminateRequestSubmitButtonText: 'Retry' });\n\t\t\t\t}\n\n\t\t\t\tthis.setState(newState);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst logs = this.removeConferenceFromLogs(this.state.selectedConferenceId);\n\t\t\tthis.setState({\n\t\t\t\tisTerminateCallModalLoading: false,\n\t\t\t\tterminateRequestSubmitButtonText: '',\n\t\t\t\tterminateRequestInProgress: false,\n\t\t\t\tterminateRequestCloseButtonText: 'Close',\n\t\t\t\tlogs,\n\t\t\t});\n\t\t});\n\t};\n\n\tonParticipantForceTerminalCallModalSubmit = () => {\n\t\tthis.setState({\n\t\t\tisTerminateCallModalLoading: true,\n\t\t\tterminateRequestSubmitButtonText: 'Retry',\n\t\t\tterminateRequestInProgress: true,\n\t\t});\n\n\t\tconst userProfile = getUserProfile();\n\t\tconst user = {\n\t\t\tfullName: `${userProfile.firstName} ${userProfile.lastName}`,\n\t\t};\n\t\tthis.socket.emit(SocketEvents.Conference.PARTICIPANT_FORCE_TERMINATE, { participantId: this.state.selectedParticipantId, user }, response => {\n\t\t\tif (!response.ok) {\n\t\t\t\tthis.clearTerminateRequestTimeout();\n\t\t\t\tconst newState = {\n\t\t\t\t\tisTerminateCallModalLoading: false,\n\t\t\t\t\tterminateRequestFailureReason: response.failureReason, // shows the reason\n\t\t\t\t\tterminateRequestSubmitButtonText: '', // hides submit the button\n\t\t\t\t\tterminateRequestInProgress: false,\n\t\t\t\t};\n\t\t\t\tif (response.failureReason === TerminateRequestFailureReasonEnum.NULL_CONFERENCE) {\n\t\t\t\t\t// remove conference from logs\n\t\t\t\t\tconst logs = this.removeConferenceFromLogs(this.state.selectedConferenceId);\n\t\t\t\t\tObject.assign(newState, { logs });\n\t\t\t\t\tObject.assign(newState, { terminateRequestCloseButtonText: 'Close' });\n\t\t\t\t} else if (\n\t\t\t\t\t[TerminateRequestFailureReasonEnum.UNHANDLED_EXCEPTION, TerminateRequestFailureReasonEnum.NULL_CONNECTED_USER_PARTICIPANT].includes(\n\t\t\t\t\t\tresponse.failureReason\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tObject.assign(newState, { terminateRequestSubmitButtonText: 'Retry' });\n\t\t\t\t}\n\n\t\t\t\tthis.setState(newState);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst logs = this.changeStatusOfParticipantLogs(this.state.selectedParticipantId);\n\t\t\tthis.setState({\n\t\t\t\tisTerminateCallModalLoading: false,\n\t\t\t\tterminateRequestSubmitButtonText: '',\n\t\t\t\tterminateRequestInProgress: false,\n\t\t\t\tterminateRequestCloseButtonText: 'Close',\n\t\t\t\tlogs,\n\t\t\t});\n\t\t});\n\t};\n\n\tonTerminalCallModalSubmit = async () => {\n\t\tthis.setState({\n\t\t\tisTerminateCallModalLoading: true,\n\t\t\tterminateRequestSubmitButtonText: 'Retry',\n\t\t\tterminateRequestInProgress: true,\n\t\t});\n\n\t\tthis.socket.emit(SocketEvents.Conference.TERMINATE_REQUEST, { conferenceId: this.state.selectedConferenceId }, response => {\n\t\t\tif (!response.ok) {\n\t\t\t\tthis.clearTerminateRequestTimeout();\n\t\t\t\tconst newState = {\n\t\t\t\t\tisTerminateCallModalLoading: false,\n\t\t\t\t\tterminateRequestFailureReason: response.failureReason, // shows the reason\n\t\t\t\t\tterminateRequestSubmitButtonText: '', // hides submit the button\n\t\t\t\t\tterminateRequestInProgress: false,\n\t\t\t\t};\n\t\t\t\tif (response.failureReason === TerminateRequestFailureReasonEnum.NULL_CONFERENCE) {\n\t\t\t\t\t// remove conference from logs\n\t\t\t\t\tconst logs = this.removeConferenceFromLogs(this.state.selectedConferenceId);\n\t\t\t\t\tObject.assign(newState, { logs });\n\t\t\t\t\tObject.assign(newState, { terminateRequestCloseButtonText: 'Close' });\n\t\t\t\t} else if (\n\t\t\t\t\t[TerminateRequestFailureReasonEnum.UNHANDLED_EXCEPTION, TerminateRequestFailureReasonEnum.NULL_CONNECTED_USER_PARTICIPANT].includes(\n\t\t\t\t\t\tresponse.failureReason\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tObject.assign(newState, { terminateRequestSubmitButtonText: 'Retry' });\n\t\t\t\t}\n\n\t\t\t\tthis.setState(newState);\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tthis.terminateRequestTimeout = setTimeout(() => {\n\t\t\t\tthis.clearTerminateRequestTimeout();\n\t\t\t\tthis.setState({\n\t\t\t\t\tisTerminateCallModalLoading: false,\n\t\t\t\t});\n\t\t\t}, 30000);\n\t\t\treturn undefined;\n\t\t});\n\t};\n\n\tclearTerminateRequestTimeout = () => {\n\t\tif (this.terminateRequestTimeout) {\n\t\t\tclearTimeout(this.terminateRequestTimeout);\n\t\t\tthis.terminateRequestTimeout = null;\n\t\t}\n\t};\n\n\tsendTerminateRequestCloseEvent = () => {\n\t\tthis.socket.emit(SocketEvents.Conference.TERMINATE_REQUEST_CANCEL, { conferenceId: this.state.selectedConferenceId });\n\t};\n\n\tremoveConferenceFromLogs = conferenceId => {\n\t\t// remove conference from logs\n\t\tconst logs = [...this.state.logs];\n\t\tconst conferenceIndex = logs.findIndex(conference => conference.id === conferenceId);\n\t\tif (conferenceIndex !== -1) {\n\t\t\tlogs.splice(conferenceIndex, 1);\n\t\t}\n\t\treturn logs;\n\t};\n\n\tchangeStatusOfParticipantLogs = participantId => {\n\t\tconst logs = [...this.state.logs];\n\t\tconst log = logs.find(conference => conference.id === this.state.selectedConferenceId);\n\t\tconst participant = log.participants.find(x => x.id === participantId);\n\t\tparticipant.state = ParticipantState.REMOVED.type;\n\t\treturn logs;\n\t};\n\n\ttableHeaders = [\n\t\t{ title: 'ID' },\n\t\t{ title: 'Call Initiator' },\n\t\t{ title: 'Virtual Care Provider' },\n\t\t{ title: 'Room' },\n\t\t{ title: 'Date/Time' },\n\t\t{ title: 'Call Origin' },\n\t\t{ title: 'Call Duration (so far)' },\n\t\t{ title: 'Call Type' },\n\t\t{ edit: '' },\n\t];\n\n\tgetParticipantState(state) {\n\t\tswitch (state) {\n\t\t\tcase ParticipantState.CONNECTING.type: {\n\t\t\t\treturn ParticipantState.CONNECTING.message;\n\t\t\t}\n\t\t\tcase ParticipantState.CONNECTED.type: {\n\t\t\t\treturn ParticipantState.CONNECTED.message;\n\t\t\t}\n\t\t\tcase ParticipantState.BUSY.type: {\n\t\t\t\treturn ParticipantState.BUSY.message;\n\t\t\t}\n\t\t\tcase ParticipantState.DECLINED.type: {\n\t\t\t\treturn ParticipantState.DECLINED.message;\n\t\t\t}\n\t\t\tcase ParticipantState.OFFLINE.type: {\n\t\t\t\treturn ParticipantState.OFFLINE.message;\n\t\t\t}\n\t\t\tcase ParticipantState.LEFT_CALL.type: {\n\t\t\t\treturn ParticipantState.LEFT_CALL.message;\n\t\t\t}\n\t\t\tcase ParticipantState.NOT_ANSWERING.type: {\n\t\t\t\treturn ParticipantState.NOT_ANSWERING.message;\n\t\t\t}\n\t\t\tcase ParticipantState.CANT_CONNECT.type: {\n\t\t\t\treturn ParticipantState.CANT_CONNECT.message;\n\t\t\t}\n\t\t\tcase ParticipantState.DISRUPTED.type: {\n\t\t\t\treturn ParticipantState.DISRUPTED.message;\n\t\t\t}\n\t\t\tcase ParticipantState.REMOVED.type: {\n\t\t\t\treturn ParticipantState.REMOVED.message;\n\t\t\t}\n\t\t\tdefault: {\n\t\t\t\treturn 'N/A';\n\t\t\t}\n\t\t}\n\t}\n\n\topenListOfRoomsModal = conferenceId => {\n\t\tthis.setState({\n\t\t\tselectedConferenceId: conferenceId,\n\t\t\tshowListOfRoomsModal: true,\n\t\t});\n\t};\n\n\tshowListOfRooms = () => {\n\t\tconst headers = [{ title: 'Room' }, { title: 'Status' }, { title: '' }];\n\t\tconst conference = this.state.logs.find(c => c.id === this.state.selectedConferenceId);\n\t\tif (!conference || !conference.participants) {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\treturn console.error('Error while getting list of rooms!');\n\t\t}\n\n\t\tconst rooms = conference.participants.reduce((acc, participant) => {\n\t\t\tif (participant.objectType === ObjectType.HELLO_DEVICE) {\n\t\t\t\tacc.push({\n\t\t\t\t\tname: participant.name,\n\t\t\t\t\tstatus: this.getParticipantState(participant.state),\n\t\t\t\t\tterminateCall: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{participant.state !== ParticipantState.REMOVED.type && (\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t this.openParticipantForceTerminateCallModal(conference.id, participant.id)}>\n\t\t\t\t\t\t\t\t\t\thighlight_off\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\n\t\t\t\t\t),\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn acc;\n\t\t}, []);\n\n\t\treturn ;\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t
    \n\n\t\t\t\t this.onChange(pageSize, pageIndex)}\n\t\t\t\t/>\n\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t{this.state.terminateRequestFailureReason === null && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{this.state.terminateRequestSubmitButtonText === 'End call' && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t

    Warning

    \n\t\t\t\t\t\t\t\t\t\t

    Are you sure you want to terminate this session? This will end the call between the care provider and the patient.

    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{this.state.terminateRequestSubmitButtonText === 'Retry' && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t

    Terminate request timeout

    \n\t\t\t\t\t\t\t\t\t\t

    Do you want to retry? This will end the call between the care provider and the patient.

    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{this.state.terminateRequestSubmitButtonText === '' && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t

    Done

    \n\t\t\t\t\t\t\t\t\t\t

    Session has been terminated successfully.

    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{this.state.terminateRequestFailureReason !== null && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t

    Error

    \n\t\t\t\t\t\t\t\t

    {TerminateRequestFailureReasonMessages[this.state.terminateRequestFailureReason]}

    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t
    \n\t\t\t\t\n\n\t\t\t\t{/* room force terminate */}\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t{this.state.terminateRequestFailureReason === null && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{this.state.terminateRequestSubmitButtonText === 'End call for room' && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t

    Warning

    \n\t\t\t\t\t\t\t\t\t\t

    Are you sure you want to terminate this room session? This will end the call between the care provider and the patient.

    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{this.state.terminateRequestSubmitButtonText === 'Retry' && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t

    Terminate request timeout

    \n\t\t\t\t\t\t\t\t\t\t

    Do you want to retry? This will end the call between the care provider and the patient.

    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{this.state.terminateRequestSubmitButtonText === '' && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t

    Done

    \n\t\t\t\t\t\t\t\t\t\t

    Room session has been terminated successfully.

    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{this.state.terminateRequestFailureReason !== null && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t

    Error

    \n\t\t\t\t\t\t\t\t

    {TerminateRequestFailureReasonMessages[this.state.terminateRequestFailureReason]}

    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t
    \n\t\t\t\t\n\n\t\t\t\t this.setState({ showListOfRoomsModal: false, selectedConferenceId: null })}>\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    List of Rooms

    \n\t\t\t\t\t\t{this.state.showListOfRoomsModal && this.showListOfRooms()}\n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n\nOngoingCallsList.contextType = SocketContext;\n\nexport default OngoingCallsList;\n","import React, { useEffect, useRef, useState } from 'react';\nimport { Chart } from 'primereact/chart';\nimport { Grid, SkeletonLoader, Table } from 'components';\nimport { getKpisForDashboard, getNurseCallsForDashboard } from 'api/calllogs';\nimport Select from 'react-select';\nimport { getHealthSystems, getNursesList, getOrgTeamChildren } from 'api/users';\nimport { getCurrentHealthSystemInfo } from 'infrastructure/helpers/commonHelpers';\nimport { CallTypes, DeviceListLevel, UserRoles } from 'constants/enums';\nimport DayPickerInput from 'react-day-picker/DayPickerInput';\nimport { parseDate } from 'react-day-picker/moment';\nimport { formatDate, secondsToHHMMSS } from 'infrastructure/helpers/dateHelper';\nimport { getUserRole } from 'infrastructure/auth';\n\nconst Dashboard = () => {\n\tconst getFirstDayOfMonth = (year, month) => new Date(year, month, 1);\n\tconst date = new Date();\n\tconst [isLoading, setIsLoading] = useState(true);\n\tconst [chartData, setChartData] = useState({\n\t\tlabels: [],\n\t\tdatasets: [\n\t\t\t{\n\t\t\t\tlabel: 'Talk to Patient',\n\t\t\t\tbackgroundColor: '#42A5F5',\n\t\t\t\tdata: [],\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: 'View Patient',\n\t\t\t\tbackgroundColor: '#CCC',\n\t\t\t\tdata: [],\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: 'Monitoring',\n\t\t\t\tbackgroundColor: '#FFA726',\n\t\t\t\tdata: [],\n\t\t\t},\n\t\t],\n\t});\n\tconst [kpis, setKpis] = useState({\n\t\ttotalCount: 0,\n\t\tvcpCount: 0,\n\t\troomsObserved: 0,\n\t\tnumberOfCalls: {\n\t\t\ttalkToPatient: 0,\n\t\t\tmonitoring: 0,\n\t\t\tviewPatient: 0,\n\t\t},\n\t\taverageDuration: {\n\t\t\ttalkToPatient: 0,\n\t\t\tmonitoring: 0,\n\t\t\tviewPatient: 0,\n\t\t},\n\t});\n\tconst [healthSystems, setHealthSystems] = useState([]);\n\tconst [regions, setRegions] = useState([]);\n\tconst [hospitals, setHospitals] = useState([]);\n\tconst [nurses, setNurses] = useState([]);\n\tconst [selectedHealthSystem, setSelectedHealthSystem] = useState(null);\n\tconst [selectedRegion, setSelectedRegion] = useState(null);\n\tconst [selectedHospital, setSelectedHospital] = useState(null);\n\tconst [selectedNurse, setSelectedNurse] = useState(null);\n\tconst [from, setFrom] = useState(new Date(getFirstDayOfMonth(date.getFullYear(), date.getMonth())));\n\tconst [to, setTo] = useState(new Date());\n\tconst [currentLevel, setCurrentLevel] = useState(null);\n\tconst [searchedNurse, setSearchedNurse] = useState('');\n\tconst toInput = useRef(null);\n\n\tuseEffect(() => {\n\t\tconst getHealthSystemOptions = hsList => {\n\t\t\tconst healthSystemsOptions = hsList.map(hs => {\n\t\t\t\treturn { value: hs.id, label: hs.name };\n\t\t\t});\n\t\t\tif (getUserRole() === UserRoles.ADMIN) {\n\t\t\t\thealthSystemsOptions.unshift({ label: 'All', value: null });\n\t\t\t}\n\t\t\treturn healthSystemsOptions;\n\t\t};\n\n\t\tconst fetchData = async () => {\n\t\t\tconst hsList = await getHealthSystems();\n\t\t\tconst healthSystemsOptions = getHealthSystemOptions(hsList);\n\n\t\t\tsetHealthSystems(healthSystemsOptions);\n\t\t\tlet current = null;\n\t\t\tif (getUserRole() === UserRoles.SUPERUSER) {\n\t\t\t\t[current] = healthSystemsOptions;\n\t\t\t} else {\n\t\t\t\tcurrent = healthSystemsOptions.find(item => item.value === getCurrentHealthSystemInfo().currentHealthSystemId);\n\t\t\t}\n\n\t\t\tif (current) {\n\t\t\t\tsetSelectedHealthSystem(current);\n\t\t\t\tsetCurrentLevel(DeviceListLevel.HEALTHSYSTEM);\n\t\t\t\tconst regionsList = await getOrgTeamChildren(current.value);\n\t\t\t\tif (regionsList.error) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst regionsOptions = regionsList.map(region => ({ value: region.id, label: region.name }));\n\t\t\t\tregionsOptions.unshift({ label: 'All', value: null });\n\t\t\t\tsetRegions(regionsOptions);\n\t\t\t}\n\t\t};\n\t\tfetchData();\n\t}, []);\n\n\tuseEffect(() => {\n\t\tconst fetchNurses = async () => {\n\t\t\tconst response = await getNursesList(searchedNurse);\n\t\t\tif (!response.error) {\n\t\t\t\tconst nursesList = response.companyUsers.map(nurse => {\n\t\t\t\t\treturn { value: nurse.userId, label: `${nurse.firstname} ${nurse.lastname}` };\n\t\t\t\t});\n\t\t\t\tnursesList.unshift({\n\t\t\t\t\tlabel: 'All',\n\t\t\t\t\tvalue: null,\n\t\t\t\t});\n\t\t\t\tsetNurses(nursesList);\n\t\t\t}\n\t\t};\n\t\tif (searchedNurse) {\n\t\t\tfetchNurses();\n\t\t} else {\n\t\t\tsetNurses([\n\t\t\t\t{\n\t\t\t\t\tlabel: 'All',\n\t\t\t\t\tvalue: null,\n\t\t\t\t},\n\t\t\t]);\n\t\t}\n\t}, [searchedNurse]);\n\n\tconst getFilteredNursesBasedOnCallsCount = arr => {\n\t\tarr.sort((a, b) => {\n\t\t\tif (a.count < b.count) {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tif (a.count > b.count) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\treturn 0;\n\t\t});\n\t\treturn arr.filter((_item, i) => i < 10);\n\t};\n\n\tuseEffect(() => {\n\t\tconst getKpisTalkToPatientCallNumber = kpisResponse =>\n\t\t\tkpisResponse.callTypesCount.filter(x => [CallTypes.AUDIO, CallTypes.VIDEO, CallTypes.SCREENSHARE].includes(x.callType)).length\n\t\t\t\t? kpisResponse.callTypesCount\n\t\t\t\t\t\t.filter(x => [CallTypes.AUDIO, CallTypes.VIDEO, CallTypes.SCREENSHARE].includes(x.callType))\n\t\t\t\t\t\t.reduce((accumulator, object) => {\n\t\t\t\t\t\t\treturn accumulator + object.count;\n\t\t\t\t\t\t}, 0)\n\t\t\t\t: 0;\n\n\t\tconst getKpisTalkToPatientAverageDuration = kpisResponse =>\n\t\t\tkpisResponse.callTypesDuration.filter(x => [CallTypes.AUDIO, CallTypes.VIDEO, CallTypes.SCREENSHARE].includes(x.callType)).length\n\t\t\t\t? kpisResponse.callTypesDuration\n\t\t\t\t\t\t.filter(x => [CallTypes.AUDIO, CallTypes.VIDEO, CallTypes.SCREENSHARE].includes(x.callType))\n\t\t\t\t\t\t.reduce((accumulator, object) => {\n\t\t\t\t\t\t\treturn accumulator + object.duration;\n\t\t\t\t\t\t}, 0)\n\t\t\t\t: 0;\n\n\t\tconst getDashboardTalkToPatientData = filtered =>\n\t\t\tfiltered.map(item =>\n\t\t\t\titem.callTypes.filter(x => [CallTypes.AUDIO, CallTypes.VIDEO, CallTypes.SCREENSHARE].includes(x.callType)).length\n\t\t\t\t\t? item.callTypes\n\t\t\t\t\t\t\t.filter(x => [CallTypes.AUDIO, CallTypes.VIDEO, CallTypes.SCREENSHARE].includes(x.callType))\n\t\t\t\t\t\t\t.reduce((accumulator, object) => {\n\t\t\t\t\t\t\t\treturn accumulator + object.count;\n\t\t\t\t\t\t\t}, 0)\n\t\t\t\t\t: 0\n\t\t\t);\n\n\t\tconst filterByLevel = async () => {\n\t\t\tsetIsLoading(true);\n\t\t\tconst params = {\n\t\t\t\thealthSystemId: selectedHealthSystem.value,\n\t\t\t\tregionId: selectedRegion ? selectedRegion.value : null,\n\t\t\t\thospitalId: selectedHospital ? selectedHospital.value : null,\n\t\t\t\tnurseId: selectedNurse ? selectedNurse.value : null,\n\t\t\t\tstart: Math.round(new Date(from).getTime()),\n\t\t\t\tend: Math.round(new Date(to).getTime()),\n\t\t\t};\n\t\t\tconst [response, kpisResponse] = await Promise.all([getNurseCallsForDashboard(params), getKpisForDashboard(params)]);\n\n\t\t\tif (!response.error && !kpisResponse.error) {\n\t\t\t\tlet labels = [];\n\t\t\t\tlet datasets = [];\n\n\t\t\t\tconst kpisObj = {\n\t\t\t\t\ttotalCount: kpisResponse.totalCount,\n\t\t\t\t\tvcpCount: kpisResponse.vcpCount,\n\t\t\t\t\troomsObserved: kpisResponse.roomsObserved,\n\t\t\t\t\tnumberOfCalls: {\n\t\t\t\t\t\ttalkToPatient: getKpisTalkToPatientCallNumber(kpisResponse),\n\t\t\t\t\t\tmonitoring: kpisResponse.callTypesCount.find(item => item.callType === CallTypes.MONITORING)?.count || 0,\n\t\t\t\t\t\tviewPatient: kpisResponse.callTypesCount.find(item => item.callType === CallTypes.SECURITYCAM)?.count || 0,\n\t\t\t\t\t},\n\t\t\t\t\taverageDuration: {\n\t\t\t\t\t\ttalkToPatient: getKpisTalkToPatientAverageDuration(kpisResponse),\n\t\t\t\t\t\tmonitoring: kpisResponse.callTypesDuration.find(item => item.callType === CallTypes.MONITORING)?.duration || 0,\n\t\t\t\t\t\tviewPatient: kpisResponse.callTypesDuration.find(item => item.callType === CallTypes.SECURITYCAM)?.duration || 0,\n\t\t\t\t\t},\n\t\t\t\t};\n\n\t\t\t\tsetKpis(kpisObj);\n\n\t\t\t\tif (response.data.length) {\n\t\t\t\t\tconst filtered = getFilteredNursesBasedOnCallsCount(response.data);\n\t\t\t\t\tlabels = filtered.map(item => item.name);\n\t\t\t\t\tdatasets = [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: 'Talk to Patient',\n\t\t\t\t\t\t\tbackgroundColor: '#42A5F5',\n\t\t\t\t\t\t\tdata: getDashboardTalkToPatientData(filtered),\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: 'View Patient',\n\t\t\t\t\t\t\tbackgroundColor: '#CCC',\n\t\t\t\t\t\t\tdata: filtered.map(item => item.callTypes.find(x => x.callType === CallTypes.SECURITYCAM)?.count || 0),\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: 'Monitoring',\n\t\t\t\t\t\t\tbackgroundColor: '#FFA726',\n\t\t\t\t\t\t\tdata: filtered.map(item => item.callTypes.find(x => x.callType === CallTypes.MONITORING)?.count || 0),\n\t\t\t\t\t\t},\n\t\t\t\t\t];\n\t\t\t\t} else {\n\t\t\t\t\tlabels = [];\n\t\t\t\t\tdatasets = [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: 'Talk to Patient',\n\t\t\t\t\t\t\tbackgroundColor: '#42A5F5',\n\t\t\t\t\t\t\tdata: [],\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: 'View Patient',\n\t\t\t\t\t\t\tbackgroundColor: '#CCC',\n\t\t\t\t\t\t\tdata: [],\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: 'Monitoring',\n\t\t\t\t\t\t\tbackgroundColor: '#FFA726',\n\t\t\t\t\t\t\tdata: [],\n\t\t\t\t\t\t},\n\t\t\t\t\t];\n\t\t\t\t}\n\n\t\t\t\tsetChartData({\n\t\t\t\t\tlabels,\n\t\t\t\t\tdatasets,\n\t\t\t\t});\n\t\t\t}\n\t\t\tsetIsLoading(false);\n\t\t};\n\t\tif ([DeviceListLevel.HEALTHSYSTEM, DeviceListLevel.REGION, DeviceListLevel.HOSPITAL].includes(currentLevel)) {\n\t\t\tfilterByLevel();\n\t\t}\n\t}, [currentLevel, selectedHealthSystem, selectedRegion, selectedHospital, selectedNurse, from, to]);\n\n\tconst onHealthSystemSelected = async healthSystem => {\n\t\tsetSelectedHealthSystem(healthSystem);\n\t\tsetRegions([]);\n\t\tsetSelectedRegion(null);\n\t\tsetHospitals([]);\n\t\tsetSelectedHospital(null);\n\t\tsetCurrentLevel(DeviceListLevel.HEALTHSYSTEM);\n\t\tif (healthSystem.value) {\n\t\t\tconst regionsList = await getOrgTeamChildren(healthSystem.value);\n\t\t\tif (regionsList.error) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst regionsOptions = regionsList.map(region => ({ value: region.id, label: region.name }));\n\t\t\tregionsOptions.unshift({ label: 'All', value: null });\n\t\t\tsetRegions(regionsOptions);\n\t\t}\n\t};\n\n\tconst onRegionSelected = async region => {\n\t\tsetSelectedRegion(region);\n\t\tsetHospitals([]);\n\t\tsetSelectedHospital(null);\n\t\tsetCurrentLevel(region.value ? DeviceListLevel.REGION : DeviceListLevel.HEALTHSYSTEM);\n\t\tif (region.value) {\n\t\t\tconst hospitalsList = await getOrgTeamChildren(region.value);\n\t\t\tif (hospitalsList.error) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst hospitalOptions = hospitalsList.map(hospital => ({ value: hospital.id, label: hospital.name }));\n\t\t\thospitalOptions.unshift({ label: 'All', value: null });\n\t\t\tsetHospitals(hospitalOptions);\n\t\t}\n\t};\n\n\tconst onHospitalSelected = hospital => {\n\t\tsetSelectedHospital(hospital);\n\t\tsetCurrentLevel(hospital.value ? DeviceListLevel.HOSPITAL : DeviceListLevel.REGION);\n\t};\n\n\tconst onNurseSelected = nurse => {\n\t\tsetSelectedNurse(nurse);\n\t};\n\n\tconst DropdownIndicator = () => {\n\t\treturn arrow_drop_down;\n\t};\n\n\tconst modifiers = { start: from, end: to };\n\n\treturn (\n\t\t
    \n\t\t\t\n\t\t\t\t\t\t),\n\t\t\t\t\t},\n\t\t\t\t]}>\n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t onHealthSystemSelected(value)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t onRegionSelected(value)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t onHospitalSelected(value)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t onNurseSelected(value)}\n\t\t\t\t\t\t\tonInputChange={value => {\n\t\t\t\t\t\t\t\tsetSearchedNurse(value);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\tdate_range\n\t\t\t\t\t\t\t\t toInput.current.getInput().focus(),\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tonDayChange={e => setFrom(e)}\n\t\t\t\t\t\t\t\t/>{' '}\n\t\t\t\t\t\t\t\t-{' '}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t setTo(e)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tarrow_drop_down\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t{isLoading && }\n\t\t\t\t\t{!isLoading && (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\tTotal number of nurses\n\t\t\t\t\t\t\t\t

    {kpis.vcpCount}

    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\tTotal Calls\n\t\t\t\t\t\t\t\t

    {kpis.totalCount}

    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\tNumber of rooms observed\n\t\t\t\t\t\t\t\t

    {kpis.roomsObserved}

    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\tNumber of Talk to patient calls\n\t\t\t\t\t\t\t\t

    {kpis.numberOfCalls.talkToPatient}

    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\tNumber of Monitoring calls\n\t\t\t\t\t\t\t\t

    {kpis.numberOfCalls.monitoring}

    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\tNumber of View patient calls\n\t\t\t\t\t\t\t\t

    {kpis.numberOfCalls.viewPatient}

    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\tAverage time of Talk to patient calls\n\t\t\t\t\t\t\t\t

    {secondsToHHMMSS(kpis.averageDuration.talkToPatient)}

    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\tAverage time of Monitoring calls\n\t\t\t\t\t\t\t\t

    {secondsToHHMMSS(kpis.numberOfCalls.monitoring)}

    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\tAverage time of View patient calls\n\t\t\t\t\t\t\t\t

    {secondsToHHMMSS(kpis.numberOfCalls.viewPatient)}

    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t)}\n\t\t\t\t
    \n\t\t\t\n\t\t
    \n\t);\n};\n\nexport default Dashboard;\n","import React from 'react';\nimport 'react-day-picker/lib/style.css';\nimport Layout from 'components/Common/Layout';\nimport Header from 'components/Common/Header';\nimport { Tabs, Grid } from 'components';\n\nimport PastCallsList from 'components/CallLogs/List/PastCallsList';\nimport OngoingCallsList from 'components/CallLogs/List/OngoingCallsList';\nimport Dashboard from 'containers/Dashboard';\n\nfunction CallLogs() {\n\treturn (\n\t\t\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t
    \n\t\t
    \n\t);\n}\n\nexport default CallLogs;\n","import React, { Component } from 'react';\nimport moment from 'moment';\nimport PropTypes from 'prop-types';\n\nclass CallDuration extends Component {\n\tstatic defaultProps = {\n\t\tformat: 'HH:mm:ss',\n\t};\n\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tlet duration = moment.duration(0, 's');\n\t\tif (props.callStartTime) {\n\t\t\tconst timeDiff = Math.abs(new Date().getTime() - props.callStartTime.getTime());\n\t\t\tduration = moment.duration(Math.floor(timeDiff / 1000), 's');\n\t\t}\n\n\t\tthis.state = {\n\t\t\tduration,\n\t\t\tcallDuration: null,\n\t\t};\n\n\t\tthis.durationInterval = null;\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.startDurationInterval();\n\t}\n\n\tcomponentWillUnmount() {\n\t\tif (this.durationInterval) {\n\t\t\tclearInterval(this.durationInterval);\n\t\t}\n\t}\n\n\tgetDuration = (initial = false) => {\n\t\tlet callDuration;\n\n\t\tif (this.props.format === 'HH:mm:ss') {\n\t\t\tif (!initial) {\n\t\t\t\tthis.state.duration.add(1, 'seconds');\n\t\t\t}\n\t\t\tcallDuration = moment.utc(this.state.duration.asMilliseconds()).format(this.props.format);\n\t\t}\n\t\tif (this.props.format === 'MM/DD/YY hh:mm A') {\n\t\t\tcallDuration = moment().format(this.props.format);\n\t\t}\n\n\t\treturn callDuration;\n\t};\n\n\tstartDurationInterval = () => {\n\t\tthis.durationInterval = setInterval(() => {\n\t\t\tthis.setState({ callDuration: this.getDuration() });\n\t\t}, 1000);\n\t};\n\n\trender() {\n\t\treturn

    {this.state.callDuration || this.getDuration(true)}

    ;\n\t}\n}\n\nCallDuration.propTypes = {\n\tformat: PropTypes.string,\n};\n\nexport default CallDuration;\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport CallButton from 'components/CallButton';\n\nconst NightVisionControl = props => {\n\treturn (\n\t\t<>\n\t\t\t{props.showButton && (\n\t\t\t\t\n\t\t\t)}\n\t\t\n\t);\n};\n\nNightVisionControl.defaultProps = {\n\tshowButton: true,\n};\n\nNightVisionControl.propTypes = {\n\tnightVisionMode: PropTypes.bool,\n\tshowButton: PropTypes.bool,\n\tisDisabled: PropTypes.bool,\n\ttoggleNightvisionHandler: PropTypes.func,\n};\n\nexport default NightVisionControl;\n","import React from 'react';\n\nconst CallStats = ({ stats, connectionQualityColor }) => (\n\t
    \n\t\t\n\t\t\t\n\t\t\t\tbar_chart\n\t\t\t\n\t\t\n\t\t
    \n\t\t\t{stats.map(({ key, value }) => (\n\t\t\t\t

    \n\t\t\t\t\t{key}: {value}\n\t\t\t\t

    \n\t\t\t))}\n\t\t
    \n\t
    \n);\n\nexport default CallStats;\n","import React, { Component } from 'react';\nimport CallStats from 'components/Common/CallStats';\n\nclass PeerStats extends Component {\n\tstate = {\n\t\tvideoBytesSent: null,\n\t\taudioBytesSent: null,\n\t\tvideoBytesRec: null,\n\t\taudioBytesRec: null,\n\t\tframeRate: null,\n\t\tresolution: { width: 0, height: 0 },\n\t\tcodec: null,\n\t\ttransportType: null,\n\t};\n\n\tpreviousStats = {\n\t\toutbound: {},\n\t\tinbound: {},\n\t};\n\n\tcurrentStats = {\n\t\toutbound: {},\n\t\tinbound: {},\n\t\tvideoResolution: undefined,\n\t\tvideoOutboundResolution: undefined,\n\t\taudioCodec: undefined,\n\t\tvideoCodec: undefined,\n\t\tvideoOutboundCodec: undefined,\n\t\taudioOutboundCodec: undefined,\n\t\ttransportType: undefined,\n\t};\n\n\tRTCStatsType = {\n\t\tOUTBOUND: 'outbound-rtp',\n\t\tINBOUND: 'inbound-rtp',\n\t\tTRACK: 'track',\n\t\tCODEC: 'codec',\n\t\tREMOTE_CANDIDATE: 'remote-candidate',\n\t};\n\n\tRTCMediaType = {\n\t\tAUDIO: 'audio',\n\t\tVIDEO: 'video',\n\t};\n\n\tfetchTimeInSeconds = 3;\n\n\tbyteToKilobit = 125;\n\n\tgetStatsInterval = null;\n\n\tcurrInboundReports = [];\n\n\tcurrOutboundReports = [];\n\n\tcomponentDidMount = async () => {\n\t\tthis.getStatsInterval = setInterval(async () => {\n\t\t\tawait this.getStats();\n\t\t\tconst newStats = JSON.parse(JSON.stringify(this.currentStats));\n\t\t\tthis.setState(this.getState(), () => {\n\t\t\t\tthis.previousStats = newStats;\n\t\t\t});\n\t\t}, this.fetchTimeInSeconds * 1000);\n\t};\n\n\tgetState = () => {\n\t\tif (!this.props.isLocalSrc) {\n\t\t\treturn {\n\t\t\t\tvideoBytesSent:\n\t\t\t\t\tthis.currentStats.outbound.video && this.previousStats.outbound.video\n\t\t\t\t\t\t? this.getDifference(this.currentStats.outbound.video.bytesSent, this.previousStats.outbound.video.bytesSent) /\n\t\t\t\t\t\t this.fetchTimeInSeconds /\n\t\t\t\t\t\t this.byteToKilobit\n\t\t\t\t\t\t: null,\n\t\t\t\taudioBytesSent:\n\t\t\t\t\tthis.currentStats.outbound.audio && this.previousStats.outbound.audio && !this.props.isMyMicOff\n\t\t\t\t\t\t? this.getDifference(this.currentStats.outbound.audio.bytesSent, this.previousStats.outbound.audio.bytesSent) /\n\t\t\t\t\t\t this.fetchTimeInSeconds /\n\t\t\t\t\t\t this.byteToKilobit\n\t\t\t\t\t\t: null,\n\t\t\t\tvideoBytesRec:\n\t\t\t\t\tthis.currentStats.inbound.video && this.previousStats.inbound.video\n\t\t\t\t\t\t? this.getDifference(this.currentStats.inbound.video.bytesReceived, this.previousStats.inbound.video.bytesReceived) /\n\t\t\t\t\t\t this.fetchTimeInSeconds /\n\t\t\t\t\t\t this.byteToKilobit\n\t\t\t\t\t\t: null,\n\t\t\t\taudioBytesRec:\n\t\t\t\t\tthis.currentStats.inbound.audio && this.previousStats.inbound.audio && !this.props.isPeerMicPrivacyOn\n\t\t\t\t\t\t? this.getDifference(this.currentStats.inbound.audio.bytesReceived, this.previousStats.inbound.audio.bytesReceived) /\n\t\t\t\t\t\t this.fetchTimeInSeconds /\n\t\t\t\t\t\t this.byteToKilobit\n\t\t\t\t\t\t: null,\n\t\t\t\tframeRate: this.getInboundFrameRate(),\n\t\t\t\tresolution: this.getInboundFrameRate() && this.currentStats.videoResolution ? this.currentStats.videoResolution : { width: 0, height: 0 },\n\t\t\t\tcodec:\n\t\t\t\t\t// eslint-disable-next-line no-nested-ternary\n\t\t\t\t\t!this.currentStats.videoCodec && !this.currentStats.audioCodec\n\t\t\t\t\t\t? 'N/A'\n\t\t\t\t\t\t: this.currentStats.videoCodec\n\t\t\t\t\t\t? `${this.currentStats.audioCodec}\\\\${this.currentStats.videoCodec}`\n\t\t\t\t\t\t: `${this.currentStats.audioCodec}`,\n\t\t\t\ttransportType: this.currentStats.transportType ? this.currentStats.transportType : 'N/A',\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\tframeRate:\n\t\t\t\tthis.currentStats.outbound.video && this.previousStats.outbound.video\n\t\t\t\t\t? this.getDifference(this.currentStats.outbound.video.framesEncoded, this.previousStats.outbound.video.framesEncoded) / this.fetchTimeInSeconds\n\t\t\t\t\t: null,\n\t\t\tresolution: this.currentStats.videoOutboundResolution ? this.currentStats.videoOutboundResolution : { width: 0, height: 0 },\n\t\t\tcodec:\n\t\t\t\t// eslint-disable-next-line no-nested-ternary\n\t\t\t\t!this.currentStats.videoOutboundCodec && !this.currentStats.audioOutboundCodec\n\t\t\t\t\t? 'N/A'\n\t\t\t\t\t: this.currentStats.videoOutboundCodec\n\t\t\t\t\t? `${this.currentStats.audioOutboundCodec}\\\\${this.currentStats.videoOutboundCodec}`\n\t\t\t\t\t: `${this.currentStats.audioOutboundCodec}`,\n\t\t};\n\t};\n\n\tgetDifference = (a, b) => {\n\t\treturn a - b >= 0 ? a - b : 0;\n\t};\n\n\tcomponentWillUnmount = () => {\n\t\tif (this.getStatsInterval) {\n\t\t\tclearInterval(this.getStatsInterval);\n\t\t\tthis.getStatsInterval = null;\n\t\t}\n\t};\n\n\tgetStats = async () => {\n\t\tconst stats = await this.props.callManager.getStats();\n\n\t\tthis.currInboundReports = [];\n\t\tthis.currOutboundReports = [];\n\n\t\tstats.forEach(report => {\n\t\t\tif (report.type === this.RTCStatsType.INBOUND) {\n\t\t\t\tthis.currInboundReports.push(report);\n\t\t\t\tconst codecReport = stats.get(report.codecId);\n\t\t\t\tif (codecReport) {\n\t\t\t\t\tcodecReport.kind = report.kind;\n\t\t\t\t\tcodecReport.remoteSource = true;\n\t\t\t\t\tthis.currInboundReports.push(codecReport);\n\t\t\t\t}\n\t\t\t\tif (report.kind === this.RTCMediaType.VIDEO) {\n\t\t\t\t\tconst trackReport = stats.get(report.trackId);\n\t\t\t\t\tif (trackReport) {\n\t\t\t\t\t\ttrackReport.kind = report.kind;\n\t\t\t\t\t\tthis.currInboundReports.push(trackReport);\n\t\t\t\t\t}\n\t\t\t\t} else if (report.kind === this.RTCMediaType.AUDIO) {\n\t\t\t\t\tconst transportReport = stats.get(report.transportId);\n\t\t\t\t\tif (transportReport) {\n\t\t\t\t\t\tconst candidatePair = stats.get(transportReport.selectedCandidatePairId);\n\t\t\t\t\t\tif (candidatePair) {\n\t\t\t\t\t\t\tconst remoteCandidate = stats.get(candidatePair.remoteCandidateId);\n\t\t\t\t\t\t\tif (remoteCandidate) {\n\t\t\t\t\t\t\t\tremoteCandidate.kind = report.kind;\n\t\t\t\t\t\t\t\tthis.currInboundReports.push(remoteCandidate);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (report.type === this.RTCStatsType.OUTBOUND) {\n\t\t\t\tthis.currOutboundReports.push(report);\n\t\t\t\tconst codecReport = stats.get(report.codecId);\n\t\t\t\tif (codecReport) {\n\t\t\t\t\tcodecReport.kind = report.kind;\n\t\t\t\t\tcodecReport.remoteSource = false;\n\t\t\t\t\tthis.currOutboundReports.push(codecReport);\n\t\t\t\t}\n\n\t\t\t\tif (report.kind === this.RTCMediaType.VIDEO) {\n\t\t\t\t\tconst trackReport = stats.get(report.trackId);\n\t\t\t\t\tif (trackReport) {\n\t\t\t\t\t\ttrackReport.kind = report.kind;\n\t\t\t\t\t\tthis.currOutboundReports.push(trackReport);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tthis.setCurrentStats();\n\t};\n\n\tsetCurrentStats = () => {\n\t\t// Inbound\n\t\t[this.currentStats.inbound.video] = this.currInboundReports\n\t\t\t.filter(x => x.kind === this.RTCMediaType.VIDEO && x.type === this.RTCStatsType.INBOUND)\n\t\t\t.sort((a, b) => (a.trackId > b.trackId ? -1 : 1));\n\n\t\tconst [track] = this.currInboundReports\n\t\t\t.filter(x => x.kind === this.RTCMediaType.VIDEO && x.type === this.RTCStatsType.TRACK && x.remoteSource === true)\n\t\t\t.sort((a, b) => (a.id > b.id ? -1 : 1));\n\n\t\tif (track && track.frameHeight) {\n\t\t\tthis.currentStats.videoResolution = { width: track.frameWidth, height: track.frameHeight };\n\t\t} else {\n\t\t\tthis.currentStats.videoResolution = { width: 0, height: 0 };\n\t\t}\n\n\t\tconst videoCodec = this.currInboundReports.find(x => x.kind === this.RTCMediaType.VIDEO && x.type === this.RTCStatsType.CODEC && x.remoteSource === true);\n\n\t\tif (videoCodec) {\n\t\t\tthis.currentStats.videoCodec = videoCodec.mimeType.replace('video/', '');\n\t\t}\n\t\tconst audioCodec = this.currInboundReports.find(x => x.kind === this.RTCMediaType.AUDIO && x.type === this.RTCStatsType.CODEC && x.remoteSource === true);\n\n\t\tif (audioCodec) {\n\t\t\tthis.currentStats.audioCodec = audioCodec.mimeType.replace('audio/', '').toUpperCase();\n\t\t}\n\n\t\t[this.currentStats.inbound.audio] = this.currInboundReports\n\t\t\t.filter(x => x.kind === this.RTCMediaType.AUDIO && x.type === this.RTCStatsType.INBOUND)\n\t\t\t.sort((a, b) => (a.trackId > b.trackId ? -1 : 1));\n\n\t\tconst remoteCandidate = this.currInboundReports.find(x => x.kind === this.RTCMediaType.AUDIO && x.type === this.RTCStatsType.REMOTE_CANDIDATE);\n\t\tif (remoteCandidate) {\n\t\t\tthis.currentStats.transportType = remoteCandidate.candidateType === 'relay' ? 'Relay' : 'P2P';\n\t\t}\n\n\t\t// Outbound\n\t\t[this.currentStats.outbound.video] = this.currOutboundReports\n\t\t\t.filter(x => x.kind === this.RTCMediaType.VIDEO && x.type === this.RTCStatsType.OUTBOUND && x.trackId)\n\t\t\t.sort((a, b) => (a.trackId > b.trackId ? -1 : 1));\n\n\t\t[this.currentStats.outbound.audio] = this.currOutboundReports\n\t\t\t.filter(x => x.kind === this.RTCMediaType.AUDIO && x.type === this.RTCStatsType.OUTBOUND)\n\t\t\t.sort((a, b) => (a.trackId > b.trackId ? -1 : 1));\n\n\t\tconst [outboundTrack] = this.currOutboundReports\n\t\t\t.filter(x => x.kind === this.RTCMediaType.VIDEO && x.type === this.RTCStatsType.TRACK && x.remoteSource === false)\n\t\t\t.sort((a, b) => (a.id > b.id ? -1 : 1));\n\n\t\tif (outboundTrack && outboundTrack.frameWidth) {\n\t\t\tthis.currentStats.videoOutboundResolution = {\n\t\t\t\twidth: outboundTrack.frameWidth,\n\t\t\t\theight: outboundTrack.frameHeight,\n\t\t\t};\n\t\t} else {\n\t\t\tthis.currentStats.videoOutboundResolution = {\n\t\t\t\twidth: 0,\n\t\t\t\theight: 0,\n\t\t\t};\n\t\t}\n\n\t\tconst videoOutboundCodec = this.currOutboundReports.find(\n\t\t\tx => x.kind === this.RTCMediaType.VIDEO && x.type === this.RTCStatsType.CODEC && x.remoteSource === false\n\t\t);\n\n\t\tif (videoOutboundCodec) {\n\t\t\tthis.currentStats.videoOutboundCodec = videoOutboundCodec.mimeType.replace('video/', '');\n\t\t}\n\t\tconst audioOutboundCodec = this.currOutboundReports.find(\n\t\t\tx => x.kind === this.RTCMediaType.AUDIO && x.type === this.RTCStatsType.CODEC && x.remoteSource === false\n\t\t);\n\n\t\tif (audioOutboundCodec) {\n\t\t\tthis.currentStats.audioOutboundCodec = audioOutboundCodec.mimeType.replace('audio/', '').toUpperCase();\n\t\t}\n\t};\n\n\tgetInboundFrameRate = () => {\n\t\treturn this.currentStats.inbound.video && this.previousStats.inbound.video\n\t\t\t? this.getDifference(this.currentStats.inbound.video.framesDecoded, this.previousStats.inbound.video.framesDecoded) / this.fetchTimeInSeconds\n\t\t\t: null;\n\t};\n\n\trender() {\n\t\tconst { audioBytesSent, videoBytesSent, videoBytesRec, audioBytesRec, frameRate, resolution, codec, transportType } = this.state;\n\n\t\tlet stats;\n\t\tif (!this.props.isLocalSrc) {\n\t\t\tstats = [\n\t\t\t\t{ key: 'Video', value: `${Math.round(videoBytesSent)}kbs↑ ${Math.round(videoBytesRec)}kbs↓` },\n\t\t\t\t{ key: 'Audio', value: `${Math.round(audioBytesSent)}kbs↑ ${Math.round(audioBytesRec)}kbs↓` },\n\t\t\t\t{ key: 'Codec', value: codec },\n\t\t\t\t{ key: 'Framerate', value: `${Math.round(frameRate)} FPS` },\n\t\t\t\t{ key: 'Resolution', value: `${resolution.width}x${resolution.height}` },\n\t\t\t\t{ key: 'TT', value: transportType },\n\t\t\t];\n\t\t} else {\n\t\t\tstats = [\n\t\t\t\t{ key: 'Framerate', value: `${Math.round(frameRate)} FPS` },\n\t\t\t\t{ key: 'Resolution', value: `${resolution.width}x${resolution.height}` },\n\t\t\t\t{ key: 'Codec', value: codec },\n\t\t\t];\n\t\t}\n\n\t\treturn ;\n\t}\n}\n\nexport default PeerStats;\n","import React, { Component } from 'react';\nimport v4 from 'uuid';\nimport _ from 'lodash';\nimport classNames from 'classnames/bind';\nimport { SocketContext } from 'io-client/SocketContext';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport Grid from 'components/Grid';\nimport Dropdown from 'components/Dropdown';\nimport ListGroup from 'components/ListGroup';\nimport TopParticipant from 'components/TopParticipant';\nimport Participant from 'components/Participant';\nimport CallButton from 'components/CallButton';\nimport CallEndReason from 'components/CallEndReason';\nimport ActiveConference from 'components/Call/ActiveConference';\nimport AnotherNursePickedUp from 'components/Call/AnotherNursePickedUp';\nimport ConnectionStatus from 'components/Call/ConnectionStatus';\nimport StreamPermissions from 'components/StreamPermissions';\nimport Button from 'components/Button';\nimport Loader from 'components/Loader';\nimport TvControls from 'components/TvControls';\nimport CameraControls from 'components/Common/CameraControls';\nimport CallDuration from 'components/Common/CallDuration';\nimport NightVisionControl from 'components/Common/NightVisionControl';\nimport { stopOutgoingCallSound } from 'components/CallSounds';\nimport CallCorrelationInfo from 'components/CallCorrelationInfo';\nimport Alert from 'components/Alert';\nimport { getCurrentHealthSystemInfo, checkIfMediaDevicesPlugged, checkForPermission, askForPermission } from 'infrastructure/helpers/commonHelpers';\nimport { getUserProfile } from 'infrastructure/auth';\nimport { actionCreators as organizationActionCreators } from 'state/organization/actions';\nimport { fetchNotificationCounter } from 'state/notifications/actions';\nimport { APP_CONFIG } from 'constants/global-variables';\nimport SocketEvents from 'constants/socket-events';\nimport {\n\tCallTypes,\n\tObjectType,\n\tConferenceEndReason,\n\tRTCPeerConnectionEnum,\n\tCameraType,\n\tCameraEventTypes,\n\tCameraTiltDirection,\n\tCameraTiltAction,\n\tZoomDirection,\n\tSocketState,\n\tSerialTVCommands,\n\tAudioOutputDevice,\n\tStreamError,\n\tMediaTypes,\n\tMediaPermissions,\n} from 'constants/enums';\nimport CallManager from 'owt/p2p/CallManager';\nimport { ConferenceInfo, ConferenceParticipant, FromUser } from 'owt/base/conference';\nimport PeerStats from 'containers/PeerStats';\n\nconst TrackType = {\n\tAUDIO: 'audio',\n\tVIDEO: 'video',\n\tSCREEN: 'screen',\n};\n\nexport class Call extends Component {\n\tconstructor(props, context) {\n\t\tsuper(props, context);\n\t\tthis.state = {\n\t\t\tcallerObjectId: parseInt(props.match.params.patientId, 10),\n\t\t\thealthSystemPath: null,\n\t\t\troomName: decodeURIComponent(props.match.params.roomName),\n\t\t\tlocalSrc: null,\n\t\t\tlocalScreenSrc: null,\n\t\t\tpeerSrc: null,\n\t\t\tactiveSrc: null,\n\t\t\tmicActive: true,\n\t\t\tisMyVideoCamActive: true,\n\t\t\tisPeerVideoCamActive: true,\n\t\t\tisVideoCall: false,\n\t\t\tpeerMicActive: true,\n\t\t\tshowPTZ: false,\n\t\t\tconferenceId: null,\n\t\t\tparticipantId: null,\n\t\t\tinitialCallType: null,\n\t\t\tconferenceEndReason: null,\n\t\t\tsocketState: SocketState.CONNECTED,\n\t\t\tstreamPermission: null,\n\t\t\ttvStatus: null,\n\t\t\thdmiStatus: null,\n\t\t\ttvBrand: null,\n\t\t\tvolumeStatus: null,\n\t\t\tnightVisionMode: false,\n\t\t\tcameraZoomLevel: 0,\n\t\t\tcameraType: CameraType.HELLO,\n\t\t\tisHuddleCamConnected: true,\n\t\t\tisCameraPrivacyOn: false,\n\t\t\tisMicPrivacyOn: false,\n\t\t\tdisabledTiltDirections: {},\n\t\t\tcallStartTime: null,\n\t\t\tpeerConnectionState: RTCPeerConnectionEnum.CONNECTION_STATE.NEW,\n\t\t\tdisableButtons: false,\n\t\t\thasActiveConference: false,\n\t\t\tanotherNursePickedUp: false,\n\t\t\tonPatientBusyNurse: null, // this is the name of the nurse that the hello is talking already when we get the busy participant event\n\t\t\tshowRightColumn: true,\n\t\t\tshouldShowSwitchToHelloCamError: false,\n\t\t\taudioOutputDevice: AudioOutputDevice.HELLO,\n\t\t};\n\n\t\tthis.myAvatarUrl = '';\n\t\tthis.userInfo = {};\n\t\tthis.camStatus = null;\n\t\tthis.micStatus = null;\n\n\t\tthis.callManager = new CallManager(this.context, {\n\t\t\tuseCallStats: APP_CONFIG.useCallStats,\n\t\t\tsendCallStatsInterval: APP_CONFIG.sendCallStatsInterval,\n\t\t});\n\t}\n\n\tasync componentDidMount() {\n\t\tthis.props.fetchNotificationCounter();\n\t\tconst userProfile = getUserProfile();\n\t\tconst avatarUrl = userProfile.profilePicture.url;\n\t\tthis.userInfo = userProfile;\n\t\tthis.myAvatarUrl = avatarUrl?.includes('duser') ? '' : avatarUrl;\n\t\tthis.micStatus = await checkForPermission(MediaTypes.MICROPHONE);\n\t\tthis.camStatus = await checkForPermission(MediaTypes.CAMERA);\n\t\tthis.micStatus.onchange = this.onMicPermissionChange;\n\t\tthis.camStatus.onchange = this.onCamPermissionChange;\n\t\tthis.callManager\n\t\t\t.on('call-started', data => {\n\t\t\t\tlet roomNamePath = this.getRoomNamePath(data);\n\t\t\t\tthis.setState({\n\t\t\t\t\tconferenceId: data.conferenceId,\n\t\t\t\t\tparticipantId: data.participantId,\n\t\t\t\t\t...roomNamePath,\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('audio-call', data => {\n\t\t\t\tthis.setState({\n\t\t\t\t\tlocalSrc: data.audioStream,\n\t\t\t\t\tactiveSrc: data.audioStream,\n\t\t\t\t\tisMyVideoCamActive: false,\n\t\t\t\t\tisPeerVideoCamActive: false,\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('video-call', data => {\n\t\t\t\tthis.setState({\n\t\t\t\t\tlocalSrc: data.videoStream,\n\t\t\t\t\tactiveSrc: data.videoStream,\n\t\t\t\t\tisMyVideoCamActive: true,\n\t\t\t\t\tisPeerVideoCamActive: true,\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('screensharing', data => {\n\t\t\t\tlet { localSrc, activeSrc, localScreenSrc } = data;\n\t\t\t\tconst { peerSrc } = this.state;\n\n\t\t\t\tif (localScreenSrc === null && !!peerSrc.mediaStream.getVideoTracks().length) {\n\t\t\t\t\tactiveSrc = peerSrc;\n\t\t\t\t}\n\n\t\t\t\tthis.setState({\n\t\t\t\t\tlocalSrc: localSrc,\n\t\t\t\t\tactiveSrc: activeSrc,\n\t\t\t\t\tlocalScreenSrc: localScreenSrc,\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('toggle-audio', () => {\n\t\t\t\tthis.setState({ micActive: !this.state.micActive });\n\t\t\t})\n\t\t\t.on('toggle-video', data => {\n\t\t\t\tthis.setState({ isVideoCall: data.hasVideoTrack ? true : this.state.isVideoCall, isMyVideoCamActive: data.hasVideoTrack }, () => {\n\t\t\t\t\tconst { isMyVideoCamActive, isPeerVideoCamActive, peerSrc, localSrc } = this.state;\n\n\t\t\t\t\tif (!isMyVideoCamActive && isPeerVideoCamActive && peerSrc) {\n\t\t\t\t\t\t// Switch to patient if i have toggled my camera off\n\t\t\t\t\t\tthis.activeSrcHandle(this.state.peerSrc.id);\n\t\t\t\t\t} else if (isMyVideoCamActive && localSrc && (this.isMyVideoSelected() || !isPeerVideoCamActive)) {\n\t\t\t\t\t\t// Show my video as active\n\t\t\t\t\t\tthis.activeSrcHandle(this.state.localSrc.id);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('peer-stream', data => {\n\t\t\t\tconst { peerSrc, activeSrc } = data;\n\t\t\t\tlet newState = {};\n\t\t\t\tif (this.state.isPeerVideoCamActive) {\n\t\t\t\t\tObject.assign(newState, { peerSrc, activeSrc, isVideoCall: true });\n\t\t\t\t} else {\n\t\t\t\t\tObject.assign(newState, { peerSrc });\n\t\t\t\t}\n\n\t\t\t\tif (!this.state.callStartTime) {\n\t\t\t\t\tObject.assign(newState, { callStartTime: new Date() });\n\t\t\t\t}\n\n\t\t\t\tstopOutgoingCallSound();\n\t\t\t\tthis.setState(newState, () => {\n\t\t\t\t\tif (this.audioRef) {\n\t\t\t\t\t\tthis.audioRef.srcObject = null;\n\t\t\t\t\t\tthis.audioRef.srcObject = peerSrc.mediaStream;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('end-call', data => {\n\t\t\t\tthis.startCloseTabTimeout();\n\t\t\t\tthis.setState({\n\t\t\t\t\tlocalSrc: null,\n\t\t\t\t\tlocalScreenSrc: null,\n\t\t\t\t\tpeerSrc: null,\n\t\t\t\t\tactiveSrc: null,\n\t\t\t\t\tconferenceEndReason: data.endReason,\n\t\t\t\t\thasActiveConference: data.hasActiveConference,\n\t\t\t\t\tanotherNursePickedUp: data.anotherNursePickedUp,\n\t\t\t\t\tconferenceId: null,\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('stream-permission', status => {\n\t\t\t\tif (status && status.type === StreamError.STREAM_NOT_ALLOWED.type) {\n\t\t\t\t\tthis.props.organizationActions.setStreamPermissionMessage({\n\t\t\t\t\t\tcomponent: 'popup',\n\t\t\t\t\t\ttype: StreamError.MICROPHONE_BLOCKED.type,\n\t\t\t\t\t});\n\t\t\t\t\tthis.setState({ streamPermission: null });\n\t\t\t\t} else {\n\t\t\t\t\tthis.setState({ streamPermission: status });\n\t\t\t\t}\n\t\t\t})\n\t\t\t.on('tv-commands', data => {\n\t\t\t\tif (data.tvState.isVolume) {\n\t\t\t\t\tthis.setState({ volumeStatus: data });\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tswitch (data.tvState.tvStatus) {\n\t\t\t\t\tcase SerialTVCommands.INITIAL_TV_POWER:\n\t\t\t\t\tcase SerialTVCommands.POWER.POWER_ON:\n\t\t\t\t\tcase SerialTVCommands.POWER.POWER_OFF:\n\t\t\t\t\t\tthis.setState({ tvStatus: data });\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SerialTVCommands.HDMI.SWITCH_HDMI1:\n\t\t\t\t\tcase SerialTVCommands.HDMI.SWITCH_HDMI2:\n\t\t\t\t\tcase SerialTVCommands.HDMI.SWITCH_HDMI3:\n\t\t\t\t\t\tthis.setState({ hdmiStatus: data });\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t})\n\t\t\t.on('initial-device-state', data => {\n\t\t\t\tif (!data) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst {\n\t\t\t\t\tcameraType,\n\t\t\t\t\tzoomLevel: cameraZoomLevel,\n\t\t\t\t\tisNightVision: nightVisionMode,\n\t\t\t\t\tisHuddleCamConnected,\n\t\t\t\t\tisCameraPrivacyOn,\n\t\t\t\t\tisMicPrivacyOn,\n\t\t\t\t\ttvHdmiPort,\n\t\t\t\t\taudioOutputDevice,\n\t\t\t\t\ttvBrand,\n\t\t\t\t} = data;\n\t\t\t\tlet hdmiStatus = null;\n\n\t\t\t\tif (tvHdmiPort) {\n\t\t\t\t\thdmiStatus = { isSuccessful: true, tvState: { isVolume: false, tvStatus: SerialTVCommands.HDMI[`SWITCH_HDMI${tvHdmiPort}`] } };\n\t\t\t\t}\n\n\t\t\t\tthis.setState({\n\t\t\t\t\tcameraType,\n\t\t\t\t\tcameraZoomLevel,\n\t\t\t\t\tnightVisionMode,\n\t\t\t\t\tisHuddleCamConnected,\n\t\t\t\t\tisCameraPrivacyOn,\n\t\t\t\t\tisMicPrivacyOn,\n\t\t\t\t\thdmiStatus,\n\t\t\t\t\taudioOutputDevice,\n\t\t\t\t\ttvBrand,\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('audio-output-changed', data => {\n\t\t\t\tthis.setState({ audioOutputDevice: data.audioOutputDevice });\n\t\t\t})\n\t\t\t.on('camera-response', this.cameraResponseListener)\n\t\t\t.on('socket-state', ({ socketState }) => {\n\t\t\t\tif (this.state.socketState.type === socketState.type) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst newState = { socketState };\n\t\t\t\tswitch (socketState.type) {\n\t\t\t\t\tcase SocketState.DISCONNECTED.type:\n\t\t\t\t\t\tObject.assign(newState, {\n\t\t\t\t\t\t\tdisableButtons: true,\n\t\t\t\t\t\t});\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SocketState.CONNECTED.type:\n\t\t\t\t\t\tObject.assign(newState, {\n\t\t\t\t\t\t\tdisableButtons: false,\n\t\t\t\t\t\t});\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tthis.setState(newState, () => {\n\t\t\t\t\tthis.setAudioSrcObject();\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('peer-connection-state', ({ peerConnectionState }) => {\n\t\t\t\tthis.setState({ peerConnectionState }, () => {\n\t\t\t\t\tthis.setAudioSrcObject();\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('participant-busy', data => {\n\t\t\t\tconst { activeConferences } = data;\n\t\t\t\tif (!activeConferences || activeConferences.length === 0) {\n\t\t\t\t\tthis.callManager.logger.warn('On participant busy - no active conference was found');\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\n\t\t\t\tconst conference = activeConferences.find(ac => ac.initialCallType === CallTypes.SECURITYCAM || ac.initialCallType === CallTypes.AUDIO);\n\t\t\t\tif (!conference) {\n\t\t\t\t\tthis.callManager.logger.warn('On participant busy - no active patient view or talk to patient conference was found');\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\n\t\t\t\t// conference participants are only the active participants(connected, connecting or reconnecting)\n\t\t\t\t// there should be only one active participant in patient view or talk to patient\n\t\t\t\tif (conference.participants.length > 1) {\n\t\t\t\t\tthis.callManager.logger.warn('On participant busy - more then one participants were found in the active conference');\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\n\t\t\t\tconst onPatientBusyNurse = conference.participants[0];\n\t\t\t\tthis.setState({ onPatientBusyNurse });\n\t\t\t})\n\t\t\t.on('local-audio-error', this.onLocalAudioError)\n\t\t\t.on('local-video-error', this.onLocalVideoError)\n\t\t\t.bindSocketEventListeners();\n\t\tthis.bindWindowListeners();\n\t\tlet isStartConference = this.props.match.params.incoming === 'start';\n\t\tif (isStartConference) {\n\t\t\tconst isVideo = this.props.match.params.callType && this.props.match.params.callType === 'video';\n\t\t\tif (isVideo) {\n\t\t\t\tthis.setState({\n\t\t\t\t\tisVideoCall: false,\n\t\t\t\t\tisPeerVideoCamActive: true,\n\t\t\t\t\tinitialCallType: CallTypes.VIDEO,\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tthis.setState({\n\t\t\t\t\tinitialCallType: CallTypes.AUDIO,\n\t\t\t\t\tisPeerVideoCamActive: false,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tconst devices = await navigator.mediaDevices.enumerateDevices();\n\t\t\tconst inputDevices = {\n\t\t\t\tdevices,\n\t\t\t\tpermissions: {\n\t\t\t\t\tcamera: this.camStatus.state,\n\t\t\t\t\tmicrophone: this.micStatus.state,\n\t\t\t\t},\n\t\t\t};\n\n\t\t\tconst fromUser = new FromUser(`${userProfile.firstName} ${userProfile.lastName}`, userProfile.jobTitle, userProfile.profilePicture.url, undefined);\n\t\t\tconst participants = [new ConferenceParticipant(parseInt(this.state.callerObjectId, 10), ObjectType.HELLO_DEVICE)];\n\t\t\tconst startConferenceInfo = new ConferenceInfo(\n\t\t\t\tisVideo ? CallTypes.VIDEO : CallTypes.AUDIO,\n\t\t\t\tv4(),\n\t\t\t\t'Videocall',\n\t\t\t\tnull,\n\t\t\t\tfromUser,\n\t\t\t\ttrue,\n\t\t\t\tfalse,\n\t\t\t\ttrue,\n\t\t\t\tfalse,\n\t\t\t\tfalse,\n\t\t\t\tfalse,\n\t\t\t\tisVideo,\n\t\t\t\tv4(),\n\t\t\t\tparticipants,\n\t\t\t\tinputDevices\n\t\t\t);\n\t\t\tthis.callManager.startConference(startConferenceInfo);\n\t\t} else {\n\t\t\tconst conferenceInfo = JSON.parse(localStorage.getItem('incomingConferenceInfo'));\n\t\t\tlocalStorage.removeItem('incomingConferenceInfo');\n\t\t\tif (!conferenceInfo) {\n\t\t\t\tthis.startCloseTabTimeout();\n\t\t\t\tthis.setState({ conferenceEndReason: ConferenceEndReason.ABORTED });\n\t\t\t} else {\n\t\t\t\tthis.callManager.joinConference(conferenceInfo);\n\t\t\t}\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.callManager.unbindSocketEventListeners();\n\t\tthis.callManager.unbindTimeouts();\n\t\tif (this.closeTabTimeout) {\n\t\t\tclearTimeout(this.closeTabTimeout);\n\t\t\tthis.closeTabTimeout = null;\n\t\t}\n\t}\n\n\tbeforeUnloadEvent = event => {\n\t\tif (this.state.conferenceId) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.returnValue = '';\n\t\t}\n\t};\n\n\tbindWindowListeners() {\n\t\twindow.addEventListener('beforeunload', this.beforeUnloadEvent);\n\n\t\twindow.addEventListener('unload', () => {\n\t\t\tif (this.state.conferenceId) {\n\t\t\t\tthis.callManager.endCall({ endReason: ConferenceEndReason.PARTICIPANT_LEFT });\n\t\t\t}\n\t\t});\n\n\t\twindow.addEventListener('message', message => {\n\t\t\tif (message.data === 'IN_CALL') {\n\t\t\t\twindow.removeEventListener('beforeunload', this.beforeUnloadEvent);\n\t\t\t\tthis.callManager.endCall({ endReason: ConferenceEndReason.PARTICIPANT_IDLE });\n\t\t\t}\n\t\t});\n\t}\n\n\tgetRoomNamePath = data => {\n\t\tlet healthSystemPath;\n\t\tlet { currentHealthSystemId, currentRegionId } = getCurrentHealthSystemInfo();\n\t\tthis.props.organization.allHealthSystems.forEach(healthSystem => {\n\t\t\tif (healthSystem.id === currentHealthSystemId) {\n\t\t\t\thealthSystemPath = `${healthSystem.name} > `;\n\n\t\t\t\thealthSystem.regions.forEach(region => {\n\t\t\t\t\tif (currentRegionId === region.id) {\n\t\t\t\t\t\thealthSystemPath = `${healthSystemPath}${region.name}`;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\tlet roomName = data.helloDeviceName.replace(/[,]/g, ' >').replace(/[-]/g, '>');\n\n\t\treturn {\n\t\t\thealthSystemPath: healthSystemPath,\n\t\t\troomName: roomName,\n\t\t};\n\t};\n\n\ttogglePeerCamera = () => {\n\t\tconst { isPeerVideoCamActive, initialCallType, isMyVideoCamActive, localSrc, activeSrc, peerSrc } = this.state;\n\t\tthis.callManager.toggleParticipantTrack(CallTypes.VIDEO, isPeerVideoCamActive);\n\n\t\tif (!isPeerVideoCamActive && initialCallType === CallTypes.AUDIO) {\n\t\t\tthis.setState({\n\t\t\t\tisPeerVideoCamActive: !isPeerVideoCamActive,\n\t\t\t\tinitialCallType: CallTypes.VIDEO,\n\t\t\t\tshowPTZ: isPeerVideoCamActive ? false : this.state.showPTZ,\n\t\t\t});\n\t\t} else if (isPeerVideoCamActive && isMyVideoCamActive) {\n\t\t\tthis.setState({\n\t\t\t\tisPeerVideoCamActive: !isPeerVideoCamActive,\n\t\t\t\tactiveSrc: localSrc,\n\t\t\t\tshowPTZ: isPeerVideoCamActive ? false : this.state.showPTZ,\n\t\t\t});\n\t\t} else {\n\t\t\tconst changeActiveSource = !!peerSrc.mediaStream.getVideoTracks().length && !isPeerVideoCamActive && localSrc.id === activeSrc.id;\n\t\t\tthis.setState({\n\t\t\t\tisPeerVideoCamActive: !isPeerVideoCamActive,\n\t\t\t\tactiveSrc: changeActiveSource ? peerSrc : localSrc,\n\t\t\t\tshowPTZ: isPeerVideoCamActive ? false : this.state.showPTZ,\n\t\t\t});\n\t\t}\n\t};\n\n\tshowTopParticipant = () => {\n\t\tconst { isMyVideoCamActive, isPeerVideoCamActive } = this.state,\n\t\t\tisMyVideoSelected = this.isMyVideoSelected();\n\n\t\tif (isMyVideoSelected && !isMyVideoCamActive) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!isMyVideoSelected && !this.isScreenSharingSelected() && !isPeerVideoCamActive) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t};\n\n\tonMicPermissionChange = res => {\n\t\tif (res.target.state === MediaPermissions.GRANTED || res.target.state === MediaPermissions.PROMPT) {\n\t\t\tthis.props.organizationActions.setStreamPermissionMessage(null);\n\t\t} else if (this.state.micActive && this.state.localSrc) {\n\t\t\tthis.callManager.toggleAudio();\n\t\t}\n\t\tthis.callManager.publishConferenceLog(`Microphone permission state is changed to ${res.target.state}.`);\n\t};\n\n\tonCamPermissionChange = res => {\n\t\tif (res.target.state === MediaPermissions.GRANTED || res.target.state === MediaPermissions.PROMPT) {\n\t\t\tthis.props.organizationActions.setStreamPermissionMessage(null);\n\t\t} else if (this.state.isMyVideoCamActive) {\n\t\t\tthis.toggleVideo();\n\t\t}\n\t\tthis.callManager.publishConferenceLog(`Camera permission state is changed to ${res.target.state}.`);\n\t};\n\n\ttoggleMyMic = async () => {\n\t\tconst pluggedDevices = await checkIfMediaDevicesPlugged();\n\n\t\tif (!pluggedDevices.microphone) {\n\t\t\tthis.props.organizationActions.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'modal',\n\t\t\t\ttype: StreamError.MICROPHONE_NOT_FOUND.type,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.micStatus.state === MediaPermissions.DENIED) {\n\t\t\tawait askForPermission({ audio: true });\n\t\t\tthis.props.organizationActions.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'popup',\n\t\t\t\ttype: StreamError.MICROPHONE_BLOCKED.type,\n\t\t\t});\n\t\t} else {\n\t\t\tconst audioStream = await this.callManager.toggleAudio();\n\t\t\tif (audioStream && audioStream.error) {\n\t\t\t\tthis.props.organizationActions.setStreamPermissionMessage({\n\t\t\t\t\tcomponent: 'modal',\n\t\t\t\t\ttype: StreamError.MICROPHONE_NOT_FOUND.type,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t};\n\n\ttoggleMyVideo = async () => {\n\t\tconst pluggedDevices = await checkIfMediaDevicesPlugged();\n\n\t\tif (!pluggedDevices.camera) {\n\t\t\tthis.props.organizationActions.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'modal',\n\t\t\t\ttype: StreamError.MICROPHONE_NOT_FOUND.type,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.camStatus.state === MediaPermissions.DENIED) {\n\t\t\tawait askForPermission({ video: true });\n\t\t\tthis.props.organizationActions.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'popup',\n\t\t\t\ttype: StreamError.CAMERA_BLOCKED.type,\n\t\t\t});\n\t\t} else if (this.camStatus.state === MediaPermissions.PROMPT) {\n\t\t\tthis.props.organizationActions.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'modal',\n\t\t\t\ttype: StreamError.CAMERA_BLOCKED.type,\n\t\t\t});\n\t\t\tconst permissionRes = await askForPermission({ video: true });\n\t\t\tthis.props.organizationActions.setStreamPermissionMessage(null);\n\t\t\tif (permissionRes.permission === MediaPermissions.GRANTED) {\n\t\t\t\tthis.toggleVideo();\n\t\t\t}\n\t\t} else {\n\t\t\tthis.toggleVideo();\n\t\t}\n\t};\n\n\ttoggleMyStream = streamType => {\n\t\tif (streamType === TrackType.VIDEO) {\n\t\t\tthis.toggleMyVideo();\n\t\t} else if (streamType === TrackType.SCREEN) {\n\t\t\tthis.toggleMyScreenSharing();\n\t\t} else {\n\t\t\tthis.toggleMyMic();\n\t\t}\n\t};\n\n\tdebouncedToggleStream = _.debounce(this.toggleMyStream, 500, {\n\t\tleading: true,\n\t\ttrailing: false,\n\t});\n\n\ttoggleVideo = async () => {\n\t\tconst videoStream = await this.callManager.toggleVideo();\n\t\tif (videoStream && videoStream.error) {\n\t\t\tthis.props.organizationActions.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'modal',\n\t\t\t\ttype: StreamError.CAMERA_NOT_FOUND.type,\n\t\t\t});\n\t\t}\n\t\treturn videoStream;\n\t};\n\n\ttoggleMyScreenSharing = () => {\n\t\tthis.callManager.screenShare();\n\t};\n\n\tendCall = () => {\n\t\tthis.callManager.endCall({ endReason: ConferenceEndReason.INITIATOR_LEFT });\n\t};\n\n\tstartCloseTabTimeout = () => {\n\t\tthis.closeTabTimeout = setTimeout(() => {\n\t\t\tclearTimeout(this.closeTabTimeout);\n\t\t\tthis.closeTabTimeout = null;\n\t\t\twindow.close();\n\t\t}, 5000);\n\t};\n\n\tactiveSrcHandle = mediaStreamId => {\n\t\tlet { activeSrc } = this.state;\n\t\tif (activeSrc !== null && activeSrc.id === mediaStreamId) return;\n\n\t\tswitch (mediaStreamId) {\n\t\t\tcase this.state.localSrc.id:\n\t\t\t\tactiveSrc = this.state.localSrc;\n\t\t\t\tbreak;\n\t\t\tcase this.state.peerSrc.id:\n\t\t\t\tactiveSrc = this.state.peerSrc;\n\t\t\t\tbreak;\n\t\t\tcase this.state.localScreenSrc.id:\n\t\t\t\tactiveSrc = this.state.localScreenSrc;\n\t\t\t\tbreak;\n\t\t\tcase this.state.isMyVideoCamActive:\n\t\t\t\tactiveSrc = this.state.peerSrc;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t\tthis.setState({ activeSrc });\n\t};\n\n\tisMyVideoSelected = () => {\n\t\tconst { localSrc, activeSrc } = this.state;\n\n\t\tif (!localSrc) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (activeSrc && activeSrc.id === localSrc.id) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t};\n\n\tisScreenSharingSelected = () => {\n\t\tconst { localScreenSrc, activeSrc } = this.state;\n\n\t\tif (!localScreenSrc) return false;\n\n\t\tif (activeSrc && activeSrc.id === localScreenSrc.id) return true;\n\n\t\treturn false;\n\t};\n\n\tbuildListFromStates = (isPeerVideoCamActive, micActive) => {\n\t\tlet lists = [\n\t\t\t{\n\t\t\t\tid: 'toggle_video',\n\t\t\t\ttitle: 'Camera Off',\n\t\t\t\ticon: 'videocam_off',\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'toggle_audio',\n\t\t\t\ttitle: 'Mute Audio',\n\t\t\t\ticon: 'volume_up',\n\t\t\t},\n\t\t];\n\t\tif (!isPeerVideoCamActive) {\n\t\t\tlists[0].title = 'Camera On';\n\t\t\tlists[0].icon = 'videocam';\n\t\t}\n\t\tif (!micActive) {\n\t\t\tlists[1].title = 'Unmute Audio';\n\t\t\tlists[1].icon = 'volume_off';\n\t\t}\n\t\treturn lists;\n\t};\n\n\tonMyMediaToggleClicked = (event, item) => {\n\t\tif (item.id === 'toggle_video') {\n\t\t\tthis.setState(\n\t\t\t\t{\n\t\t\t\t\tisMyVideoCamActive: !this.state.isMyVideoCamActive,\n\t\t\t\t},\n\t\t\t\t() => {\n\t\t\t\t\tif (!this.state.isMyVideoCamActive && this.state.isPeerVideoCamActive && this.state.peerSrc) {\n\t\t\t\t\t\tthis.activeSrcHandle(this.state.peerSrc.id);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t} else if (item.id === 'toggle_audio') {\n\t\t\tthis.setState({\n\t\t\t\tmicActive: !this.state.micActive,\n\t\t\t});\n\t\t}\n\t};\n\n\tonPeerMediaToggleClicked = (event, item) => {\n\t\tif (this.state.disableButtons) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (item.id === 'toggle_video') {\n\t\t\tthis.togglePeerCamera();\n\t\t}\n\t\tif (item.id === 'toggle_audio') {\n\t\t\tthis.callManager.toggleParticipantTrack(CallTypes.AUDIO, this.state.peerMicActive);\n\t\t\tthis.setState({\n\t\t\t\tpeerMicActive: !this.state.peerMicActive,\n\t\t\t});\n\t\t}\n\t};\n\n\ttogglePTZ = () => {\n\t\tthis.setState({\n\t\t\tshowPTZ: !this.state.showPTZ,\n\t\t});\n\t};\n\n\tshouldShowPatientCameraToggledOff = () => {\n\t\tconst { isVideoCall, isPeerVideoCamActive } = this.state;\n\n\t\tif (this.isMyVideoSelected()) return false;\n\n\t\tif (this.isScreenSharingSelected()) return false;\n\n\t\treturn isVideoCall && !isPeerVideoCamActive;\n\t};\n\n\tsetAudioSrcObject = () => {\n\t\tif (\n\t\t\tthis.state.peerConnectionState === RTCPeerConnectionEnum.CONNECTION_STATE.CONNECTED &&\n\t\t\tthis.state.socketState.type === SocketState.CONNECTED.type &&\n\t\t\tthis.audioRef\n\t\t) {\n\t\t\tthis.audioRef.srcObject = null;\n\t\t\tthis.audioRef.srcObject = this.state.peerSrc.mediaStream;\n\t\t}\n\t};\n\n\tshouldShowStateComponents = () => {\n\t\treturn (\n\t\t\tthis.state.hasActiveConference ||\n\t\t\tthis.state.anotherNursePickedUp ||\n\t\t\tthis.state.conferenceEndReason ||\n\t\t\tthis.state.streamPermission ||\n\t\t\tthis.state.peerConnectionState === RTCPeerConnectionEnum.CONNECTION_STATE.DISCONNECTED ||\n\t\t\tthis.state.peerConnectionState === RTCPeerConnectionEnum.CONNECTION_STATE.FAILED\n\t\t);\n\t};\n\n\tshouldShowConnectionStatus = () => {\n\t\treturn (\n\t\t\tthis.state.peerConnectionState === RTCPeerConnectionEnum.CONNECTION_STATE.DISCONNECTED ||\n\t\t\tthis.state.peerConnectionState === RTCPeerConnectionEnum.CONNECTION_STATE.FAILED\n\t\t);\n\t};\n\n\tsendPanTiltCameraEvent = (direction, action) => {\n\t\tconst { participantId, conferenceId, callerObjectId } = this.state;\n\t\tthis.callManager.panTiltCamera({ direction, helloDeviceId: callerObjectId, action, conferenceId, participantId });\n\t};\n\n\tcameraResponseListener = ({ event, message, isSuccessful }) => {\n\t\tswitch (event) {\n\t\t\tcase CameraEventTypes.SWITCH:\n\t\t\t\tif (isSuccessful) {\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tcameraType: message,\n\t\t\t\t\t\tcameraZoomLevel: 0,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CameraEventTypes.ZOOM:\n\t\t\t\tthis.setState({\n\t\t\t\t\tcameraZoomLevel: +message,\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase CameraEventTypes.TILT: {\n\t\t\t\tconst { disabledTiltDirections } = this.state;\n\n\t\t\t\tif (isSuccessful) {\n\t\t\t\t\tif ([CameraTiltDirection.UP, CameraTiltDirection.DOWN].includes(message)) {\n\t\t\t\t\t\tdisabledTiltDirections[CameraTiltDirection.UP] = false;\n\t\t\t\t\t\tdisabledTiltDirections[CameraTiltDirection.DOWN] = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdisabledTiltDirections[CameraTiltDirection.LEFT] = false;\n\t\t\t\t\t\tdisabledTiltDirections[CameraTiltDirection.RIGHT] = false;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tdisabledTiltDirections[message] = true;\n\t\t\t\t\tthis.sendPanTiltCameraEvent(message, CameraTiltAction.STOP);\n\t\t\t\t}\n\n\t\t\t\tthis.setState(disabledTiltDirections);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase CameraEventTypes.HUDDLE_CONNECTED_STATE:\n\t\t\t\tthis.setState({\n\t\t\t\t\tisHuddleCamConnected: isSuccessful,\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase CameraEventTypes.NIGHT_VISION:\n\t\t\t\tthis.setState({ nightVisionMode: isSuccessful });\n\t\t\t\tbreak;\n\t\t\tcase CameraEventTypes.HELLO_CAMERA_PRIVACY_STATE:\n\t\t\t\tthis.setState({ isCameraPrivacyOn: isSuccessful });\n\t\t\t\tbreak;\n\t\t\tcase CameraEventTypes.HELLO_MIC_PRIVACY_STATE:\n\t\t\t\tthis.setState({ isMicPrivacyOn: isSuccessful });\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t}\n\t};\n\n\trenderCallStates = () => {\n\t\tif (this.state.hasActiveConference) {\n\t\t\treturn ;\n\t\t}\n\n\t\tif (this.state.anotherNursePickedUp) {\n\t\t\treturn ;\n\t\t}\n\n\t\tif (this.state.conferenceEndReason) {\n\t\t\treturn ;\n\t\t}\n\n\t\tif (this.state.streamPermission) {\n\t\t\treturn ;\n\t\t}\n\n\t\tif (this.state.peerConnectionState) {\n\t\t\treturn ;\n\t\t}\n\t};\n\n\tgetPrivacyButtonsErrorMessage = () => {\n\t\tconst { isMicPrivacyOn, isCameraPrivacyOn, cameraType } = this.state;\n\n\t\tif (isMicPrivacyOn && (!isCameraPrivacyOn || !this.state.isPeerVideoCamActive || cameraType !== CameraType.HELLO)) {\n\t\t\treturn `You are not hearing the patient because the physical mic privacy button has been enabled on Banyan Bridge. This button can be disabled only manually. Please contact your administrator.`;\n\t\t}\n\n\t\tif (!isMicPrivacyOn && isCameraPrivacyOn && this.state.isPeerVideoCamActive && cameraType === CameraType.HELLO) {\n\t\t\treturn `You are not seeing the patient because the physical camera privacy button has been enabled on Banyan Bridge. This button can be disabled only manually. Please contact your administrator.`;\n\t\t}\n\n\t\tif (isMicPrivacyOn && isCameraPrivacyOn && this.state.isPeerVideoCamActive && cameraType === CameraType.HELLO) {\n\t\t\treturn `You are not seeing or hearing the patient because the physical privacy buttons have been enabled on Banyan Bridge. These buttons can be disabled only manually. Please contact your administrator.`;\n\t\t}\n\t};\n\n\tshouldShowPrivacyButtonsErrorMessage = () => {\n\t\treturn this.state.isMicPrivacyOn || (this.state.isCameraPrivacyOn && this.state.isPeerVideoCamActive && this.state.cameraType === CameraType.HELLO);\n\t};\n\n\ttoggleRightColumn = () => {\n\t\tthis.setState({\n\t\t\tshowRightColumn: !this.state.showRightColumn,\n\t\t});\n\t};\n\n\tonToggleCameraSwitch = () => {\n\t\tconst { participantId, conferenceId, callerObjectId, cameraType, isCameraPrivacyOn } = this.state;\n\n\t\tconst notAllowedToSwitchToHelloCam = cameraType === CameraType.HUDDLE && isCameraPrivacyOn;\n\t\tif (notAllowedToSwitchToHelloCam) {\n\t\t\tthis.setState({ shouldShowSwitchToHelloCamError: true });\n\t\t\treturn;\n\t\t}\n\n\t\tthis.callManager.sendCameraEvent(SocketEvents.HelloDevice.SWITCH_CAMERA, { participantId, conferenceId, helloDeviceId: callerObjectId });\n\t};\n\n\tonLocalAudioError = ({ trackDeviceNotFound, inputDevices }) => {\n\t\tif (!trackDeviceNotFound || !inputDevices.length) {\n\t\t\tthis.props.organizationActions.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'modal',\n\t\t\t\ttype: StreamError.MICROPHONE_NOT_FOUND.type,\n\t\t\t});\n\t\t}\n\n\t\tthis.setState({ micActive: false });\n\t};\n\n\tonLocalVideoError = ({ trackDeviceNotFound, inputDevices }) => {\n\t\tif (!trackDeviceNotFound || !inputDevices.length) {\n\t\t\tthis.props.organizationActions.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'modal',\n\t\t\t\ttype: StreamError.CAMERA_NOT_FOUND.type,\n\t\t\t});\n\t\t}\n\n\t\tthis.setState({ isMyVideoCamActive: false });\n\t};\n\n\trender() {\n\t\tconst {\n\t\t\tactiveSrc,\n\t\t\tpeerSrc,\n\t\t\tlocalSrc,\n\t\t\tlocalScreenSrc,\n\t\t\tpeerMicActive,\n\t\t\tmicActive,\n\t\t\tparticipantId,\n\t\t\tconferenceId,\n\t\t\tisMyVideoCamActive,\n\t\t\tisVideoCall,\n\t\t\tisPeerVideoCamActive,\n\t\t\tshowPTZ,\n\t\t\tcallerObjectId,\n\t\t\troomName,\n\t\t\ttvStatus,\n\t\t\thdmiStatus,\n\t\t\tvolumeStatus,\n\t\t\taudioOutputDevice,\n\t\t\tnightVisionMode,\n\t\t\tconferenceEndReason,\n\t\t\tstreamPermission,\n\t\t\tdisableButtons,\n\t\t\tcameraZoomLevel,\n\t\t\tcameraType,\n\t\t\tdisabledTiltDirections,\n\t\t\tisHuddleCamConnected,\n\t\t\tisCameraPrivacyOn,\n\t\t\tshowRightColumn,\n\t\t} = this.state;\n\n\t\tconst shouldShowStateComponents = this.shouldShowStateComponents();\n\t\tconst shouldShowPatientCameraToggledOff = this.shouldShowPatientCameraToggledOff();\n\n\t\treturn (\n\t\t\t\n\t\t\t\t
    \n\t\t\t\t\t{shouldShowStateComponents && this.renderCallStates()}\n\n\t\t\t\t\t{!shouldShowStateComponents && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{shouldShowPatientCameraToggledOff && (\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t

    You have toggled patient's camera off.

    \n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t{!shouldShowPatientCameraToggledOff && (\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\tthis.setState({ shouldShowSwitchToHelloCamError: false });\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tpersist={true}\n\t\t\t\t\t\t\t\tmessage={`You can't switch back to Banyan Bridge because the physical privacy buttons have been enabled. These buttons can be disabled only manually. Please contact your administrator.`}\n\t\t\t\t\t\t\t\tvariant='error'\n\t\t\t\t\t\t\t\tposition='top'\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t this.onToggleCameraSwitch()}\n\t\t\t\t\t\t\t\tonZoomCamera={direction => {\n\t\t\t\t\t\t\t\t\tconst level = direction === ZoomDirection.INCREASE ? cameraZoomLevel + 20 : cameraZoomLevel - 20;\n\t\t\t\t\t\t\t\t\tthis.callManager.sendCameraEvent(SocketEvents.HelloDevice.ZOOM_CAMERA, {\n\t\t\t\t\t\t\t\t\t\tlevel,\n\t\t\t\t\t\t\t\t\t\thelloDeviceId: callerObjectId,\n\t\t\t\t\t\t\t\t\t\tconferenceId,\n\t\t\t\t\t\t\t\t\t\tparticipantId,\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tonPanTiltCamera={this.sendPanTiltCameraEvent}\n\t\t\t\t\t\t\t\tonRebootHuddleCam={() =>\n\t\t\t\t\t\t\t\t\tthis.callManager.rebootHuddleCam({\n\t\t\t\t\t\t\t\t\t\tconferenceId,\n\t\t\t\t\t\t\t\t\t\tparticipantId,\n\t\t\t\t\t\t\t\t\t\thelloDeviceId: callerObjectId,\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{!peerSrc && (\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t

    Initiating Call

    \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t
    \n\n\t\t\t\t{peerSrc && (\n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t

    ${this.state.roomName}`} data-position='top'>\n\t\t\t\t\t\t\t\t\t{roomName}\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t{!!conferenceId && }\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t this.debouncedToggleStream(TrackType.SCREEN)}\n\t\t\t\t\t\t\t\t\ttooltip={localScreenSrc ? 'Stop screensharing' : 'Start screensharing'}\n\t\t\t\t\t\t\t\t\ttooltipPosition='top'\n\t\t\t\t\t\t\t\t\tisDisabled={disableButtons}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t this.debouncedToggleStream(TrackType.VIDEO)}\n\t\t\t\t\t\t\t\t\ttooltip={isMyVideoCamActive ? 'Turn off camera' : 'Turn on camera'}\n\t\t\t\t\t\t\t\t\ttooltipPosition='top'\n\t\t\t\t\t\t\t\t\tisDisabled={disableButtons}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t this.debouncedToggleStream(TrackType.AUDIO)}\n\t\t\t\t\t\t\t\t\ttooltip={micActive ? 'Turn off mic' : 'Turn on mic'}\n\t\t\t\t\t\t\t\t\ttooltipPosition='top'\n\t\t\t\t\t\t\t\t\tisDisabled={disableButtons}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t this.callManager.toggleNightVision(!nightVisionMode, callerObjectId, conferenceId, participantId)}\n\t\t\t\t\t\t\t\t\tisDisabled={this.state.cameraType === CameraType.HUDDLE || disableButtons}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t)}\n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t}\n}\n\nCall.contextType = SocketContext;\n\nconst mapStateToProps = state => {\n\treturn {\n\t\torganization: state.organization,\n\t};\n};\n\nconst mapDispatchToProps = dispatch => {\n\treturn {\n\t\torganizationActions: bindActionCreators(organizationActionCreators, dispatch),\n\t\tfetchNotificationCounter: () => dispatch(fetchNotificationCounter()),\n\t};\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(Call);\n","import React, { Component } from 'react';\nimport v4 from 'uuid';\nimport { SocketContext } from 'io-client/SocketContext';\nimport CallManager from 'owt/p2p/CallManager';\nimport { ConferenceInfo, ConferenceParticipant, FromUser } from 'owt/base/conference';\nimport { isChrome } from 'owt/base/utils';\nimport { Grid, CallButton, Loader, TvControls, CallEndReason, CallCorrelationInfo, ConnectionStatus, Button } from 'components';\nimport CameraControls from 'components/Common/CameraControls';\nimport NightVisionControl from 'components/Common/NightVisionControl';\nimport CallDuration from 'components/Common/CallDuration';\nimport ActiveConference from 'components/Call/ActiveConference';\nimport Alert from 'components/Alert';\nimport PeerStats from 'containers/PeerStats';\nimport {\n\tCallTypes,\n\tObjectType,\n\tConferenceEndReason,\n\tSerialTVCommands,\n\tSocketState,\n\tRTCPeerConnectionEnum,\n\tCameraType,\n\tCameraEventTypes,\n\tCameraTiltDirection,\n\tCameraTiltAction,\n\tZoomDirection,\n\tMediaPermissions,\n\tMediaTypes,\n\tStreamError,\n} from 'constants/enums';\nimport SocketEvents from 'constants/socket-events';\nimport { getCurrentHealthSystemInfo, checkForPermission, checkIfMediaDevicesPlugged, askForPermission } from 'infrastructure/helpers/commonHelpers';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { actionCreators as organizationActionCreators } from 'state/organization/actions';\nimport { fetchNotificationCounter } from 'state/notifications/actions';\nimport { APP_CONFIG } from 'constants/global-variables';\nimport { getUserProfile } from 'infrastructure/auth';\n\nclass PatientFeed extends Component {\n\tconstructor(props, context) {\n\t\tsuper(props, context);\n\n\t\tthis.state = {\n\t\t\tcallerObjectId: parseInt(props.match.params.patientId, 10),\n\t\t\troomName: decodeURIComponent(props.match.params.roomName),\n\t\t\thealthSystemPath: null,\n\t\t\tpeerSrc: null,\n\t\t\tmicActive: false,\n\t\t\tpeerAudioMuted: false,\n\t\t\tconferenceId: null,\n\t\t\tparticipantId: null,\n\t\t\tconferenceEndReason: null,\n\t\t\tsocketState: SocketState.CONNECTED,\n\t\t\ttvStatus: null,\n\t\t\thdmiStatus: null,\n\t\t\ttvBrand: null,\n\t\t\tvolumeStatus: null,\n\t\t\tnightVisionMode: false,\n\t\t\tcameraZoomLevel: 0,\n\t\t\tcameraType: CameraType.HELLO,\n\t\t\tisHuddleCamConnected: true,\n\t\t\tisCameraPrivacyOn: false,\n\t\t\tisMicPrivacyOn: false,\n\t\t\tdisabledTiltDirections: {},\n\t\t\tcallStartTime: null,\n\t\t\tsoundPermission: true,\n\t\t\tpeerConnectionState: RTCPeerConnectionEnum.CONNECTION_STATE.NEW,\n\t\t\tdisableButtons: false,\n\t\t\thasActiveConference: false,\n\t\t\tonPatientBusyNurse: null, // this is the name of the nurse that the hello is talking already when we get the busy participant event\n\t\t\tshouldShowSwitchToHelloCamError: false,\n\t\t};\n\n\t\tthis.myAvatarUrl = '';\n\t\tthis.camStatus = null;\n\t\tthis.micStatus = null;\n\n\t\tthis.callManager = new CallManager(this.context, {\n\t\t\tuseCallStats: APP_CONFIG.useCallStats,\n\t\t\tsendCallStatsInterval: APP_CONFIG.sendCallStatsInterval,\n\t\t});\n\t\tthis.videoRef = React.createRef();\n\t}\n\n\tasync componentDidMount() {\n\t\tthis.props.fetchNotificationCounter();\n\t\tthis.camStatus = await checkForPermission(MediaTypes.CAMERA);\n\t\tthis.micStatus = await checkForPermission(MediaTypes.MICROPHONE);\n\t\tthis.micStatus.onchange = this.onDevicePermissionChange;\n\t\tthis.callManager\n\t\t\t.on('call-started', data => {\n\t\t\t\tlet roomNamePath = this.getRoomNamePath(data);\n\t\t\t\tthis.setState({\n\t\t\t\t\tconferenceId: data.conferenceId,\n\t\t\t\t\tparticipantId: data.participantId,\n\t\t\t\t\t...roomNamePath,\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('feed-call', data => {\n\t\t\t\tconst { localStream } = data;\n\t\t\t\tif (!!localStream.mediaStream.getAudioTracks().length) {\n\t\t\t\t\tlocalStream.mediaStream.getAudioTracks()[0].enabled = false;\n\t\t\t\t}\n\t\t\t})\n\t\t\t.on('peer-stream', data => {\n\t\t\t\tconst { peerSrc } = data;\n\t\t\t\tlet newState = {};\n\n\t\t\t\tObject.assign(newState, { peerSrc });\n\n\t\t\t\tif (!this.state.callStartTime) {\n\t\t\t\t\tObject.assign(newState, { callStartTime: new Date() });\n\t\t\t\t}\n\n\t\t\t\tthis.setState(newState);\n\t\t\t})\n\t\t\t.on('end-call', data => {\n\t\t\t\tthis.startCloseTabTimeout();\n\t\t\t\tthis.setState({\n\t\t\t\t\tpeerSrc: null,\n\t\t\t\t\tconferenceEndReason: data.endReason,\n\t\t\t\t\thasActiveConference: data.hasActiveConference,\n\t\t\t\t\tconferenceId: null,\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('toggle-audio', () => {\n\t\t\t\tthis.setState({ micActive: !this.state.micActive });\n\t\t\t})\n\t\t\t.on('tv-commands', data => {\n\t\t\t\tif (data.tvState.isVolume) {\n\t\t\t\t\tthis.setState({ volumeStatus: data });\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tswitch (data.tvState.tvStatus) {\n\t\t\t\t\tcase SerialTVCommands.INITIAL_TV_POWER:\n\t\t\t\t\tcase SerialTVCommands.POWER.POWER_ON:\n\t\t\t\t\tcase SerialTVCommands.POWER.POWER_OFF:\n\t\t\t\t\t\tthis.setState({ tvStatus: data });\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SerialTVCommands.HDMI.SWITCH_HDMI1:\n\t\t\t\t\tcase SerialTVCommands.HDMI.SWITCH_HDMI2:\n\t\t\t\t\tcase SerialTVCommands.HDMI.SWITCH_HDMI3:\n\t\t\t\t\t\tthis.setState({ hdmiStatus: data });\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t})\n\t\t\t.on('initial-device-state', data => {\n\t\t\t\tif (!data) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst {\n\t\t\t\t\tcameraType,\n\t\t\t\t\tzoomLevel: cameraZoomLevel,\n\t\t\t\t\tisNightVision: nightVisionMode,\n\t\t\t\t\tisHuddleCamConnected,\n\t\t\t\t\tisCameraPrivacyOn,\n\t\t\t\t\tisMicPrivacyOn,\n\t\t\t\t\ttvHdmiPort,\n\t\t\t\t\ttvBrand,\n\t\t\t\t} = data;\n\t\t\t\tlet hdmiStatus = null;\n\n\t\t\t\tif (tvHdmiPort) {\n\t\t\t\t\thdmiStatus = { isSuccessful: true, tvState: { isVolume: false, tvStatus: SerialTVCommands.HDMI[`SWITCH_HDMI${tvHdmiPort}`] } };\n\t\t\t\t}\n\n\t\t\t\tthis.setState({\n\t\t\t\t\tcameraType,\n\t\t\t\t\tcameraZoomLevel,\n\t\t\t\t\tnightVisionMode,\n\t\t\t\t\tisHuddleCamConnected,\n\t\t\t\t\tisCameraPrivacyOn,\n\t\t\t\t\tisMicPrivacyOn,\n\t\t\t\t\thdmiStatus,\n\t\t\t\t\ttvBrand,\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('camera-response', this.cameraResponseListener)\n\t\t\t.on('socket-state', ({ socketState }) => {\n\t\t\t\tif (this.state.socketState.type === socketState.type) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst newState = { socketState };\n\t\t\t\tswitch (socketState.type) {\n\t\t\t\t\tcase SocketState.DISCONNECTED.type:\n\t\t\t\t\t\tObject.assign(newState, {\n\t\t\t\t\t\t\tdisableButtons: true,\n\t\t\t\t\t\t});\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SocketState.CONNECTED.type:\n\t\t\t\t\t\tObject.assign(newState, {\n\t\t\t\t\t\t\tdisableButtons: false,\n\t\t\t\t\t\t});\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tthis.setState(newState, () => {\n\t\t\t\t\tthis.playVideo();\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('peer-connection-state', ({ peerConnectionState }) => {\n\t\t\t\tthis.setState({ peerConnectionState }, () => {\n\t\t\t\t\tthis.playVideo();\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('participant-busy', data => {\n\t\t\t\tconst { activeConferences, objectId } = data;\n\t\t\t\tif (!activeConferences || activeConferences.length === 0) {\n\t\t\t\t\tthis.callManager.logger.warn('On participant busy - no active conference was found');\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\n\t\t\t\tconst conference = activeConferences.find(ac => ac.initialCallType === CallTypes.SECURITYCAM || ac.initialCallType === CallTypes.AUDIO);\n\t\t\t\tif (!conference) {\n\t\t\t\t\tthis.callManager.logger.warn('On participant busy - no active patient view or talk to patient conference was found');\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\n\t\t\t\t// only active participants\n\t\t\t\t// there should be only one active participant in patient view or talk to patient\n\t\t\t\tif (conference.participants.length > 1) {\n\t\t\t\t\tthis.callManager.logger.warn('On participant busy - more then one participants were found in the active conference');\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\n\t\t\t\tconst onPatientBusyNurse = conference.participants[0];\n\t\t\t\tthis.setState({ onPatientBusyNurse });\n\t\t\t})\n\t\t\t.on('local-audio-error', this.onLocalAudioError)\n\t\t\t.bindSocketEventListeners(false);\n\n\t\tthis.bindWindowListeners();\n\t\tthis.callManager.startConference(await this.prepareStartConferenceInfo());\n\t}\n\n\tonDevicePermissionChange = res => {\n\t\tif (res.target.state === MediaPermissions.GRANTED || res.target.state === MediaPermissions.PROMPT) {\n\t\t\tthis.props.organizationActions.setStreamPermissionMessage(null);\n\t\t} else if (this.state.micActive) {\n\t\t\tthis.toggleMyMicrophone();\n\t\t}\n\t\tthis.callManager.publishConferenceLog(`Microphone permission state is changed to ${res.target.state}.`);\n\t};\n\n\tbeforeUnloadEvent = event => {\n\t\tif (this.state.conferenceId) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.returnValue = '';\n\t\t}\n\t};\n\n\tbindWindowListeners() {\n\t\twindow.addEventListener('beforeunload', this.beforeUnloadEvent);\n\n\t\twindow.addEventListener('unload', () => {\n\t\t\tif (this.state.conferenceId) {\n\t\t\t\tthis.callManager.endCall({ endReason: ConferenceEndReason.PARTICIPANT_LEFT });\n\t\t\t}\n\t\t});\n\n\t\twindow.addEventListener('message', message => {\n\t\t\tif (message.data === 'IN_CALL') {\n\t\t\t\twindow.removeEventListener('beforeunload', this.beforeUnloadEvent);\n\t\t\t\tthis.callManager.endCall({ endReason: ConferenceEndReason.PARTICIPANT_IDLE });\n\t\t\t}\n\t\t});\n\t}\n\n\tplayVideo = () => {\n\t\tif (\n\t\t\tthis.state.peerConnectionState === RTCPeerConnectionEnum.CONNECTION_STATE.CONNECTED &&\n\t\t\tthis.state.socketState.type === SocketState.CONNECTED.type &&\n\t\t\tthis.state.peerSrc &&\n\t\t\tthis.videoRef &&\n\t\t\tthis.videoRef.current\n\t\t) {\n\t\t\tthis.videoRef.current.srcObject = null;\n\t\t\tthis.videoRef.current.srcObject = this.state.peerSrc.mediaStream;\n\t\t\t// playVideo is called from multiple places for different scenarius\n\t\t\t// make sure the promise to play the video is resolved to trigger the next play\n\t\t\tif (!this.videoPlayPromise) {\n\t\t\t\tif (this.checkVideoPlayingTimeout) {\n\t\t\t\t\tclearTimeout(this.checkVideoPlayingTimeout);\n\t\t\t\t\tthis.checkVideoPlayingTimeout = null;\n\t\t\t\t}\n\t\t\t\tthis.checkVideoPlayingTimeout = setTimeout(() => {\n\t\t\t\t\tclearTimeout(this.checkVideoPlayingTimeout);\n\t\t\t\t\tthis.checkVideoPlayingTimeout = null;\n\t\t\t\t\tif (this.videoPlayPromise) {\n\t\t\t\t\t\tconst message = `PatientFeed: playVideo: Video is taking to long to be played more then 5 sec`;\n\t\t\t\t\t\tthis.callManager.publishConferenceLog(message);\n\t\t\t\t\t}\n\t\t\t\t}, 5000);\n\n\t\t\t\tthis.videoPlayPromise = this.videoRef.current.play();\n\t\t\t\tthis.videoPlayPromise\n\t\t\t\t\t.then(() => {\n\t\t\t\t\t\tconst message = `PatientFeed: playVideo: Video is playing`;\n\t\t\t\t\t\tthis.callManager.publishConferenceLog(message);\n\t\t\t\t\t})\n\t\t\t\t\t.catch(e => {\n\t\t\t\t\t\tconst message = `PatientFeed: playVideo: Can not play video: ${e}`;\n\t\t\t\t\t\tthis.callManager.publishConferenceLog(message);\n\t\t\t\t\t\tthis.callManager.logger.error(message);\n\t\t\t\t\t\tthis.setState({ soundPermission: false });\n\t\t\t\t\t})\n\t\t\t\t\t.finally(() => {\n\t\t\t\t\t\tclearTimeout(this.checkVideoPlayingTimeout);\n\t\t\t\t\t\tthis.checkVideoPlayingTimeout = null;\n\t\t\t\t\t\tthis.videoPlayPromise = null;\n\t\t\t\t\t});\n\t\t\t}\n\t\t}\n\t};\n\n\tcomponentWillUnmount() {\n\t\tthis.callManager.unbindSocketEventListeners();\n\t\tthis.callManager.unbindTimeouts();\n\t\tif (this.closeTabTimeout) {\n\t\t\tclearTimeout(this.closeTabTimeout);\n\t\t\tthis.closeTabTimeout = null;\n\t\t}\n\t}\n\n\tgetRoomNamePath = data => {\n\t\tlet healthSystemPath;\n\t\tlet { currentHealthSystemId, currentRegionId } = getCurrentHealthSystemInfo();\n\t\tthis.props.organization.allHealthSystems.forEach(healthSystem => {\n\t\t\tif (healthSystem.id === currentHealthSystemId) {\n\t\t\t\thealthSystemPath = healthSystem.name + ' > ';\n\n\t\t\t\thealthSystem.regions.forEach(region => {\n\t\t\t\t\tif (currentRegionId === region.id) {\n\t\t\t\t\t\thealthSystemPath = healthSystemPath + region.name;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\tlet roomName = data.helloDeviceName.replace(/[,]/g, ' >').replace(/[-]/g, '>');\n\n\t\treturn {\n\t\t\thealthSystemPath: healthSystemPath,\n\t\t\troomName: roomName,\n\t\t};\n\t};\n\n\tprepareStartConferenceInfo = async () => {\n\t\tconst user = getUserProfile();\n\t\tconst fromUserInfo = new FromUser(`${user.firstName} ${user.lastName}`, user.jobTitle, user.profilePicture.url, undefined);\n\t\tconst participants = [new ConferenceParticipant(+this.state.callerObjectId, ObjectType.HELLO_DEVICE)];\n\n\t\tthis.myAvatarUrl = user.profilePicture.url;\n\t\tconst devices = await navigator.mediaDevices.enumerateDevices();\n\t\tconst inputDevices = {\n\t\t\tdevices,\n\t\t\tpermissions: {\n\t\t\t\tcamera: this.camStatus.state,\n\t\t\t\tmicrophone: this.micStatus.state,\n\t\t\t},\n\t\t};\n\n\t\treturn new ConferenceInfo(\n\t\t\tCallTypes.SECURITYCAM,\n\t\t\tv4(),\n\t\t\t'Patient Feed',\n\t\t\tnull,\n\t\t\tfromUserInfo,\n\t\t\ttrue,\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t\tv4(),\n\t\t\tparticipants,\n\t\t\tinputDevices,\n\t\t\ttrue\n\t\t);\n\t};\n\n\ttoggleAudio = async () => {\n\t\tconst pluggedDevices = await checkIfMediaDevicesPlugged();\n\n\t\tif (!pluggedDevices.microphone) {\n\t\t\tthis.props.organizationActions.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'modal',\n\t\t\t\ttype: StreamError.MICROPHONE_NOT_FOUND.type,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.micStatus.state === MediaPermissions.GRANTED) {\n\t\t\tthis.toggleMyMicrophone();\n\t\t} else if (this.micStatus.state === MediaPermissions.PROMPT) {\n\t\t\tthis.props.organizationActions.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'modal',\n\t\t\t\ttype: StreamError.MICROPHONE_BLOCKED.type,\n\t\t\t});\n\n\t\t\tawait askForPermission({ audio: true });\n\t\t\tif (this.micStatus.state === MediaPermissions.GRANTED) {\n\t\t\t\tconst audioStream = this.toggleMyMicrophone();\n\t\t\t\tif (audioStream && audioStream.error) return;\n\t\t\t}\n\n\t\t\tthis.props.organizationActions.setStreamPermissionMessage(null);\n\t\t} else {\n\t\t\tawait askForPermission({ audio: true });\n\t\t\tthis.props.organizationActions.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'popup',\n\t\t\t\ttype: StreamError.MICROPHONE_BLOCKED.type,\n\t\t\t});\n\t\t}\n\t};\n\n\ttoggleMyMicrophone = async () => {\n\t\tconst audioStream = await this.callManager.toggleAudio();\n\t\tif (audioStream && audioStream.error) {\n\t\t\tthis.props.organizationActions.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'modal',\n\t\t\t\ttype: StreamError.MICROPHONE_NOT_FOUND.type,\n\t\t\t});\n\t\t}\n\t\treturn audioStream;\n\t};\n\n\ttoggleHandler = async type => {\n\t\tswitch (type) {\n\t\t\tcase 'mic':\n\t\t\t\tthis.toggleAudio();\n\t\t\t\tbreak;\n\t\t\tcase 'peer-audio':\n\t\t\t\tconst muted = !this.state.peerAudioMuted;\n\t\t\t\tthis.setState({ peerAudioMuted: muted });\n\n\t\t\t\tthis.callManager.toggleParticipantTrack(CallTypes.AUDIO, muted);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t};\n\n\tendCall = () => {\n\t\tthis.callManager.endCall({ endReason: ConferenceEndReason.INITIATOR_LEFT });\n\t};\n\n\tstartCloseTabTimeout = () => {\n\t\tthis.closeTabTimeout = setTimeout(() => {\n\t\t\tclearTimeout(this.closeTabTimeout);\n\t\t\tthis.closeTabTimeout = null;\n\t\t\twindow.close();\n\t\t}, 5000);\n\t};\n\n\tsetCallStartTime = () => {\n\t\tif (!this.state.callStartTime) {\n\t\t\tthis.setState({ callStartTime: new Date() });\n\t\t}\n\t};\n\n\thandleSoundPermission = () => {\n\t\tthis.setState({ soundPermission: true }, () => {\n\t\t\tthis.videoRef.current.srcObject = null;\n\t\t\tthis.videoRef.current.srcObject = this.state.peerSrc.mediaStream;\n\t\t\tthis.playVideo();\n\t\t});\n\t};\n\n\tshouldShowStateComponents = () => {\n\t\treturn (\n\t\t\tthis.state.hasActiveConference ||\n\t\t\tthis.state.conferenceEndReason ||\n\t\t\tthis.state.peerConnectionState === RTCPeerConnectionEnum.CONNECTION_STATE.DISCONNECTED ||\n\t\t\tthis.state.peerConnectionState === RTCPeerConnectionEnum.CONNECTION_STATE.FAILED\n\t\t);\n\t};\n\n\tsendPanTiltCameraEvent = (direction, action) => {\n\t\tconst { participantId, conferenceId, callerObjectId } = this.state;\n\t\tthis.callManager.panTiltCamera({ direction, helloDeviceId: callerObjectId, action, conferenceId, participantId });\n\t};\n\n\ttoggleNightvision = () => {\n\t\tthis.callManager.toggleNightVision(!this.state.nightVisionMode, this.state.callerObjectId, this.state.conferenceId, this.state.participantId);\n\t};\n\n\tcameraResponseListener = ({ event, message, isSuccessful }) => {\n\t\tswitch (event) {\n\t\t\tcase CameraEventTypes.SWITCH:\n\t\t\t\tif (isSuccessful) {\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tcameraType: message,\n\t\t\t\t\t\tcameraZoomLevel: 0,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CameraEventTypes.ZOOM:\n\t\t\t\tthis.setState({\n\t\t\t\t\tcameraZoomLevel: +message,\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase CameraEventTypes.TILT: {\n\t\t\t\tconst { disabledTiltDirections } = this.state;\n\n\t\t\t\tif (isSuccessful) {\n\t\t\t\t\tif ([CameraTiltDirection.UP, CameraTiltDirection.DOWN].includes(message)) {\n\t\t\t\t\t\tdisabledTiltDirections[CameraTiltDirection.UP] = false;\n\t\t\t\t\t\tdisabledTiltDirections[CameraTiltDirection.DOWN] = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdisabledTiltDirections[CameraTiltDirection.LEFT] = false;\n\t\t\t\t\t\tdisabledTiltDirections[CameraTiltDirection.RIGHT] = false;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tdisabledTiltDirections[message] = true;\n\t\t\t\t\tthis.sendPanTiltCameraEvent(message, CameraTiltAction.STOP);\n\t\t\t\t}\n\n\t\t\t\tthis.setState(disabledTiltDirections);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase CameraEventTypes.HUDDLE_CONNECTED_STATE:\n\t\t\t\tthis.setState({ isHuddleCamConnected: isSuccessful });\n\t\t\t\tbreak;\n\t\t\tcase CameraEventTypes.NIGHT_VISION:\n\t\t\t\tthis.setState({ nightVisionMode: isSuccessful });\n\t\t\t\tbreak;\n\t\t\tcase CameraEventTypes.HELLO_CAMERA_PRIVACY_STATE:\n\t\t\t\tthis.setState({ isCameraPrivacyOn: isSuccessful });\n\t\t\t\tbreak;\n\t\t\tcase CameraEventTypes.HELLO_MIC_PRIVACY_STATE:\n\t\t\t\tthis.setState({ isMicPrivacyOn: isSuccessful });\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t}\n\t};\n\n\trenderCallStates = () => {\n\t\tif (this.state.hasActiveConference) {\n\t\t\treturn ;\n\t\t}\n\n\t\tif (this.state.conferenceEndReason) {\n\t\t\treturn ;\n\t\t}\n\n\t\tif (this.state.peerConnectionState) {\n\t\t\treturn ;\n\t\t}\n\t};\n\n\tgetPrivacyButtonsErrorMessage = () => {\n\t\tconst { isMicPrivacyOn, isCameraPrivacyOn, cameraType } = this.state;\n\n\t\tif (isMicPrivacyOn && (!isCameraPrivacyOn || cameraType !== CameraType.HELLO)) {\n\t\t\treturn `You are not hearing the patient because the physical mic privacy button has been enabled on Banyan Bridge. This button can be disabled only manually. Please contact your administrator.`;\n\t\t}\n\t\tif (!isMicPrivacyOn && isCameraPrivacyOn && cameraType === CameraType.HELLO) {\n\t\t\treturn `You are not seeing the patient because the physical camera privacy button has been enabled on Banyan Bridge. This button can be disabled only manually. Please contact your administrator.`;\n\t\t}\n\n\t\tif (isMicPrivacyOn && isCameraPrivacyOn && cameraType === CameraType.HELLO) {\n\t\t\treturn `You are not seeing or hearing the patient because the physical privacy buttons have been enabled on Banyan Bridge. These buttons can be disabled only manually. Please contact your administrator.`;\n\t\t}\n\t};\n\n\tshouldShowPrivacyButtonsErrorMessage = () => {\n\t\treturn this.state.isMicPrivacyOn || (this.state.isCameraPrivacyOn && this.state.cameraType === CameraType.HELLO);\n\t};\n\n\tonToggleCameraSwitch = () => {\n\t\tconst { participantId, conferenceId, callerObjectId, cameraType, isCameraPrivacyOn } = this.state;\n\n\t\tconst notAllowedToSwitchToHelloCam = cameraType === CameraType.HUDDLE && isCameraPrivacyOn;\n\t\tif (notAllowedToSwitchToHelloCam) {\n\t\t\tthis.setState({ shouldShowSwitchToHelloCamError: true });\n\t\t\treturn;\n\t\t}\n\n\t\tthis.callManager.sendCameraEvent(SocketEvents.HelloDevice.SWITCH_CAMERA, { participantId, conferenceId, helloDeviceId: callerObjectId });\n\t};\n\n\tonLocalAudioError = ({ trackDeviceNotFound, inputDevices }) => {\n\t\tif (!trackDeviceNotFound || !inputDevices.length) {\n\t\t\tthis.props.organizationActions.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'modal',\n\t\t\t\ttype: StreamError.MICROPHONE_NOT_FOUND.type,\n\t\t\t});\n\t\t}\n\n\t\tthis.setState({ micActive: false });\n\t};\n\n\trender() {\n\t\tconst {\n\t\t\tcallerObjectId,\n\t\t\tcameraType,\n\t\t\tcameraZoomLevel,\n\t\t\tdisabledTiltDirections,\n\t\t\tisHuddleCamConnected,\n\t\t\tdisableButtons,\n\t\t\tconferenceId,\n\t\t\tparticipantId,\n\t\t\tisCameraPrivacyOn,\n\t\t} = this.state;\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{this.shouldShowStateComponents() && this.renderCallStates()}\n\t\t\t\t{!this.shouldShowStateComponents() && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{!this.state.peerSrc && (\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t

    Initiating Call

    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{this.state.peerSrc && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{!this.state.soundPermission && (\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t\t\t\tAllow Banyan to play sound on your browser\n\t\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\tPlease allow permissions for sound so you can hear the patient.\n\t\t\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{this.state.soundPermission && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\t\tthis.setState({ shouldShowSwitchToHelloCamError: false });\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\tpersist={true}\n\t\t\t\t\t\t\t\t\t\t\t\tmessage={`You can't switch back to Banyan Bridge because the physical privacy buttons have been enabled. These buttons can be disabled only manually. Please contact your administrator.`}\n\t\t\t\t\t\t\t\t\t\t\t\tvariant='error'\n\t\t\t\t\t\t\t\t\t\t\t\tposition='top'\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t

    ${this.state.roomName}`} data-position='top'>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{this.state.roomName}\n\t\t\t\t\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.toggleHandler('mic');\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\ttooltip={this.state.micActive ? 'Turn off mic' : 'Turn on mic'}\n\t\t\t\t\t\t\t\t\t\t\t\t\ttooltipPosition='top'\n\t\t\t\t\t\t\t\t\t\t\t\t\tisDisabled={this.state.disableButtons}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.toggleHandler('peer-audio');\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\ttooltip={!this.state.peerAudioMuted ? 'Mute Audio' : 'Unmute Audio'}\n\t\t\t\t\t\t\t\t\t\t\t\t\ttooltipPosition='top'\n\t\t\t\t\t\t\t\t\t\t\t\t\tisDisabled={this.state.disableButtons}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t this.onToggleCameraSwitch()}\n\t\t\t\t\t\t\t\t\t\t\tonZoomCamera={direction => {\n\t\t\t\t\t\t\t\t\t\t\t\tconst level = direction === ZoomDirection.INCREASE ? cameraZoomLevel + 20 : cameraZoomLevel - 20;\n\t\t\t\t\t\t\t\t\t\t\t\tthis.callManager.sendCameraEvent(SocketEvents.HelloDevice.ZOOM_CAMERA, {\n\t\t\t\t\t\t\t\t\t\t\t\t\tlevel,\n\t\t\t\t\t\t\t\t\t\t\t\t\thelloDeviceId: this.state.callerObjectId,\n\t\t\t\t\t\t\t\t\t\t\t\t\tconferenceId,\n\t\t\t\t\t\t\t\t\t\t\t\t\tparticipantId,\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\tonPanTiltCamera={this.sendPanTiltCameraEvent}\n\t\t\t\t\t\t\t\t\t\t\tonRebootHuddleCam={() =>\n\t\t\t\t\t\t\t\t\t\t\t\tthis.callManager.rebootHuddleCam({\n\t\t\t\t\t\t\t\t\t\t\t\t\tconferenceId,\n\t\t\t\t\t\t\t\t\t\t\t\t\tparticipantId,\n\t\t\t\t\t\t\t\t\t\t\t\t\thelloDeviceId: callerObjectId,\n\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t
    \n\t\t);\n\t}\n}\n\nPatientFeed.contextType = SocketContext;\n\nconst mapStateToProps = state => {\n\treturn {\n\t\torganization: state.organization,\n\t};\n};\n\nconst mapDispatchToProps = dispatch => {\n\treturn {\n\t\torganizationActions: bindActionCreators(organizationActionCreators, dispatch),\n\t\tfetchNotificationCounter: () => dispatch(fetchNotificationCounter()),\n\t};\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(PatientFeed);\n","import React from 'react';\nimport classNames from 'classnames/bind';\n\nconst InputFeedback = ({ children }) => {children};\n\nconst Input = ({ field: { name, ...field }, form: { touched, errors }, ...props }) => {\n\tconst error = errors ? errors[name] : '';\n\tconst touch = touched ? touched[name] : '';\n\treturn (\n\t\t
    \n\t\t\t

    {props.label}

    \n\t\t\t

    {props.description}

    \n\t\t\t\n\t\t\t{touch && error && {error}}\n\t\t
    \n\t);\n};\n\nexport default Input;\n","import React, { Component } from 'react';\nimport { Form, Formik, Field } from 'formik';\nimport * as Yup from 'yup';\nimport Input from 'components/Common/FormElements/Input';\nimport { createInvite, checkUserAccount, checkIfCompanyMemberExists } from 'api/users';\nimport { If, Then, Else } from 'react-if';\nimport Alert from 'components/Alert';\n\nclass InviteAdmins extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.state = {\n\t\t\textraFields: 0,\n\t\t};\n\t}\n\n\taddExtraInputField = () => {\n\t\tvar updatedExtraFields = this.state.extraFields + 1;\n\t\tthis.setState({ extraFields: updatedExtraFields });\n\t};\n\n\tdisplayExtraFields = () => {\n\t\tlet table = [];\n\t\tfor (let i = 0; i < this.state.extraFields; i++) {\n\t\t\ttable.push();\n\t\t}\n\t\treturn table;\n\t};\n\n\tasync checkEmail(val) {\n\t\tif (!val) {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet response = false;\n\t\tlet schema = Yup.string()\n\t\t\t.email()\n\t\t\t.required();\n\t\tif (await schema.isValid(val)) {\n\t\t\ttry {\n\t\t\t\tawait checkIfCompanyMemberExists(val)\n\t\t\t\t\t.then(() => (response = false))\n\t\t\t\t\t.catch(() => (response = true));\n\t\t\t} catch (error) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn response;\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t
    \n\t\t\t\t {\n\t\t\t\t\t\tthis.props.onLoading();\n\t\t\t\t\t\tlet emails = Object.values(values).filter(val => {\n\t\t\t\t\t\t\treturn val !== '';\n\t\t\t\t\t\t});\n\t\t\t\t\t\tcreateInvite(emails, this.props.inviteTypeId).then(() => {\n\t\t\t\t\t\t\tthis.props.onSuccess();\n\t\t\t\t\t\t\tresetForm({\n\t\t\t\t\t\t\t\temail: '',\n\t\t\t\t\t\t\t\temail0: '',\n\t\t\t\t\t\t\t\temail1: '',\n\t\t\t\t\t\t\t\temail2: '',\n\t\t\t\t\t\t\t\temail3: '',\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t}}\n\t\t\t\t\tvalidationSchema={Yup.object().shape({\n\t\t\t\t\t\temail: Yup.string()\n\t\t\t\t\t\t\t.required('Email is required!')\n\t\t\t\t\t\t\t.email('Invalid email!')\n\t\t\t\t\t\t\t.test('existing-email', 'This user already exists!', val => this.checkEmail(val)),\n\t\t\t\t\t\temail0: Yup.string()\n\t\t\t\t\t\t\t.email('Invalid email!')\n\t\t\t\t\t\t\t.test('existing-email', 'This user already exists!', val1 => this.checkEmail(val1)),\n\t\t\t\t\t\temail1: Yup.string()\n\t\t\t\t\t\t\t.email('Invalid email!')\n\t\t\t\t\t\t\t.test('existing-email', 'This user already exists!', val => this.checkEmail(val)),\n\t\t\t\t\t\temail2: Yup.string()\n\t\t\t\t\t\t\t.email('Invalid email!')\n\t\t\t\t\t\t\t.test('existing-email', 'This user already exists!', val => this.checkEmail(val)),\n\t\t\t\t\t\temail3: Yup.string()\n\t\t\t\t\t\t\t.email('Invalid email!')\n\t\t\t\t\t\t\t.test('existing-email', 'This user already exists!', val => this.checkEmail(val)),\n\t\t\t\t\t})}>\n\t\t\t\t\t{formikProps => {\n\t\t\t\t\t\t// bind the submission handler remotely\n\t\t\t\t\t\tthis.props.bindSubmitForm(formikProps.submitForm);\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t

    Add Admin Users

    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{this.displayExtraFields()}\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tYou can only invite a maximum of 5 people at once!\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t this.addExtraInputField()}\n\t\t\t\t\t\t\t\t\t\t\t\tdata-tooltip={'Add New Field'}\n\t\t\t\t\t\t\t\t\t\t\t\tdata-position='right'>\n\t\t\t\t\t\t\t\t\t\t\t\tadd_box\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t);\n\t\t\t\t\t}}\n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default InviteAdmins;\n","import React, { Component } from 'react';\nimport Select from 'react-select';\n\nclass MultiSelect extends Component {\n\thandleChange = value => {\n\t\tconst { onChange, name } = this.props;\n\n\t\tonChange(name, value);\n\t};\n\n\thandleBlur = () => {\n\t\tconst { onBlur, name } = this.props;\n\n\t\tonBlur(name, true);\n\t};\n\n\trender() {\n\t\tconst { id, name, label, placeholder, options, value, isMulti, isDisabled, description, touched, error, isClearable, backspaceRemovesValue } = this.props;\n\t\tconst InputFeedback = ({ children }) => {children};\n\t\tconst DropdownIndicator = () => arrow_drop_down;\n\t\treturn (\n\t\t\t
    \n\t\t\t\t

    {label}

    \n\t\t\t\t

    {description}

    \n\t\t\t\t\n\t\t\t\t{touched && error && {error}}\n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default MultiSelect;\n","import React, { Component } from 'react';\nimport { Form, Formik, Field } from 'formik';\nimport * as Yup from 'yup';\nimport Input from 'components/Common/FormElements/Input';\nimport { createNurseInvite, checkIfCompanyMemberExists } from 'api/users';\n\nimport { If, Then, Else } from 'react-if';\nimport Alert from 'components/Alert';\nimport { InviteTypes } from 'constants/enums';\nimport MultiSelect from 'components/Common/FormElements/MultiSelect';\n\nclass InviteNurses extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tconst healthSystemsArr = this.props.healthSystems.map(hs => {\n\t\t\treturn { value: hs.id, label: hs.value };\n\t\t});\n\n\t\tthis.state = {\n\t\t\textraFields: 0,\n\t\t\thealthSystemsArr,\n\t\t};\n\t}\n\n\taddExtraInputField = () => {\n\t\tvar updatedExtraFields = this.state.extraFields + 1;\n\t\tthis.setState({ extraFields: updatedExtraFields });\n\t};\n\n\tdisplayExtraFields = () => {\n\t\tlet table = [];\n\t\tfor (let i = 0; i < this.state.extraFields; i++) {\n\t\t\ttable.push();\n\t\t}\n\t\treturn table;\n\t};\n\n\tasync checkEmail(val) {\n\t\tif (!val) {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet response = false;\n\t\tconst schema = Yup.string()\n\t\t\t.email()\n\t\t\t.required();\n\t\tif (await schema.isValid(val)) {\n\t\t\ttry {\n\t\t\t\tawait checkIfCompanyMemberExists(val)\n\t\t\t\t\t.then(() => (response = false))\n\t\t\t\t\t.catch(() => (response = true));\n\t\t\t} catch (error) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn response;\n\t}\n\n\tgetRole(inviteType) {\n\t\tswitch (inviteType) {\n\t\t\tcase InviteTypes.VIRTUALCAREPROVIDER.type:\n\t\t\t\treturn InviteTypes.VIRTUALCAREPROVIDER.message;\n\t\t\tcase InviteTypes.VIRTUALSITTER.type:\n\t\t\t\treturn InviteTypes.VIRTUALSITTER.message;\n\t\t\tcase InviteTypes.SUPERUSER.type:\n\t\t\t\treturn InviteTypes.SUPERUSER.message;\n\t\t\t//no default\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t
    \n\t\t\t\t {\n\t\t\t\t\t\tthis.props.onLoading();\n\t\t\t\t\t\tvar emailObjs = [];\n\t\t\t\t\t\tfor (const key of Object.keys(values)) {\n\t\t\t\t\t\t\tif (key !== 'healthSystems' && values[key] !== '') emailObjs.push(values[key]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcreateNurseInvite(emailObjs, this.props.inviteTypeId, values.healthSystems).then(() => {\n\t\t\t\t\t\t\tthis.props.onSuccess();\n\t\t\t\t\t\t\tresetForm({\n\t\t\t\t\t\t\t\thealthSystems: [],\n\t\t\t\t\t\t\t\temail: '',\n\t\t\t\t\t\t\t\temail0: '',\n\t\t\t\t\t\t\t\temail1: '',\n\t\t\t\t\t\t\t\temail2: '',\n\t\t\t\t\t\t\t\temail3: '',\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t}}\n\t\t\t\t\tvalidationSchema={Yup.object().shape({\n\t\t\t\t\t\temail: Yup.string()\n\t\t\t\t\t\t\t.required('Email is required!')\n\t\t\t\t\t\t\t.email('Invalid email!')\n\t\t\t\t\t\t\t.test('existing-email', 'This user already exists!', val => this.checkEmail(val)),\n\t\t\t\t\t\temail0: Yup.string()\n\t\t\t\t\t\t\t.email('Invalid email!')\n\t\t\t\t\t\t\t.test('existing-email', 'This user already exists!', val1 => this.checkEmail(val1)),\n\t\t\t\t\t\temail1: Yup.string()\n\t\t\t\t\t\t\t.email('Invalid email!')\n\t\t\t\t\t\t\t.test('existing-email', 'This user already exists!', val => this.checkEmail(val)),\n\t\t\t\t\t\temail2: Yup.string()\n\t\t\t\t\t\t\t.email('Invalid email!')\n\t\t\t\t\t\t\t.test('existing-email', 'This user already exists!', val => this.checkEmail(val)),\n\t\t\t\t\t\temail3: Yup.string()\n\t\t\t\t\t\t\t.email('Invalid email!')\n\t\t\t\t\t\t\t.test('existing-email', 'This user already exists!', val => this.checkEmail(val)),\n\t\t\t\t\t\thealthSystems: Yup.string()\n\t\t\t\t\t\t\t.required('Health system is required!')\n\t\t\t\t\t\t\t.nullable(),\n\t\t\t\t\t})}>\n\t\t\t\t\t{formikProps => {\n\t\t\t\t\t\tconst { values, touched, errors, setFieldValue, setFieldTouched } = formikProps;\n\t\t\t\t\t\t// bind the submission handler remotely\n\t\t\t\t\t\tthis.props.bindSubmitForm(formikProps.submitForm);\n\t\t\t\t\t\tconst role = this.getRole(this.props.inviteTypeId);\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t

    Add {role}

    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{this.displayExtraFields()}\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tYou can only invite a maximum of 5 people at once!\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t this.addExtraInputField()}\n\t\t\t\t\t\t\t\t\t\t\t\tdata-tooltip={'Add New Field'}\n\t\t\t\t\t\t\t\t\t\t\t\tdata-position='right'>\n\t\t\t\t\t\t\t\t\t\t\t\tadd_box\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t);\n\t\t\t\t\t}}\n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default InviteNurses;\n","import React, { Component } from 'react';\n\nimport Pagination from 'components/Common/Pagination';\nimport { Grid, Input, Table, Button, Badge, Modal } from 'components';\n\nimport { getInvitedMembers, updateInviteStatus, createInvite, createNurseInvite, getHealthSystemInvitedUsers } from 'api/users';\nimport { InviteStatuses, InviteTypes, UserRoles } from 'constants/enums';\nimport { formatDate } from 'infrastructure/helpers/dateHelper';\nimport { decodeHtml, getCurrentHealthSystemInfo } from 'infrastructure/helpers/commonHelpers';\nimport { getUserProfile, getUserRole } from 'infrastructure/auth';\n\nclass InvitedUsersList extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.state = {\n\t\t\tpageSize: { value: 10, label: '10' },\n\t\t\tpageIndex: 0,\n\t\t\ttotalCount: 0,\n\t\t\tinvitedMembers: [],\n\t\t\tloading: true,\n\t\t\tsearchValue: '',\n\t\t\tisCancelModalOpen: false,\n\t\t\tisResendModalOpen: false,\n\t\t\tcurrentInviteId: null,\n\t\t};\n\t}\n\n\tasync componentDidMount() {\n\t\tlet response = {};\n\t\tlet healthSystem = getCurrentHealthSystemInfo();\n\n\t\tif (getUserRole() === UserRoles.ADMIN) {\n\t\t\tresponse = await getInvitedMembers();\n\t\t} else {\n\t\t\tresponse = await getHealthSystemInvitedUsers(healthSystem.currentHealthSystemId);\n\t\t}\n\n\t\tthis.setState({\n\t\t\tloading: false,\n\t\t\ttotalCount: response.totalCount,\n\t\t\tinvitedMembers: response.companyInvites,\n\t\t\tcurrentHealthSystemId: healthSystem.currentHealthSystemId,\n\t\t});\n\t}\n\n\tasync onChange(pageSize, pageIndex) {\n\t\tthis.setState({ loading: true });\n\n\t\tlet response = {};\n\t\tif (getUserRole() === UserRoles.ADMIN) {\n\t\t\tresponse = await getInvitedMembers(pageSize.value, pageIndex, this.state.searchValue);\n\t\t} else {\n\t\t\tresponse = await getHealthSystemInvitedUsers(this.state.currentHealthSystemId, pageSize.value, pageIndex, this.state.searchValue);\n\t\t}\n\n\t\tthis.setState({\n\t\t\tloading: false,\n\t\t\tinvitedMembers: response.companyInvites,\n\t\t\tpageSize: pageSize,\n\t\t\tpageIndex: pageIndex,\n\t\t\ttotalCount: response.totalCount,\n\t\t});\n\t}\n\n\tdisplayInvitedUsers() {\n\t\tif (this.state.invitedMembers.length === 0) return [];\n\n\t\treturn this.state.invitedMembers.map(user => {\n\t\t\treturn {\n\t\t\t\temailBox: this.getEmailBox(user.email),\n\t\t\t\tdate: formatDate(new Date(user.dateCreated)),\n\t\t\t\tinvitedBy:\n\t\t\t\t\tuser.inviteTypeId === InviteTypes.ADUSER.type\n\t\t\t\t\t\t? 'AD User'\n\t\t\t\t\t\t: this.getProfileBox(\n\t\t\t\t\t\t\t\tdecodeHtml(`${user.sender.companyUser.firstName} ${user.sender.companyUser.lastName}`),\n\t\t\t\t\t\t\t\tgetUserProfile().userId === user.sender.companyUser.userId\n\t\t\t\t\t\t ),\n\t\t\t\tlocation: user.invitationInfo ? this.getLocation(user.invitationInfo) : 'N/A',\n\t\t\t\tstatus: this.getStatus(user.inviteStatusId),\n\t\t\t\trole: this.getInviteType(user.inviteTypeId),\n\t\t\t\tedit: user.inviteStatusId !== InviteStatuses.ACCEPTED.type && this.getEditButtons(user.id),\n\t\t\t};\n\t\t});\n\t}\n\n\tgetLocation(invitationInfo) {\n\t\tif (invitationInfo.channels && invitationInfo.channels.legnth !== 0) {\n\t\t\treturn invitationInfo.channels\n\t\t\t\t.map(location => {\n\t\t\t\t\treturn location.name;\n\t\t\t\t})\n\t\t\t\t.join(',');\n\t\t}\n\n\t\treturn invitationInfo.teamName;\n\t}\n\n\tgetEditButtons(inviteId) {\n\t\treturn (\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t this.openModal('isResendModalOpen', inviteId)}>\n\t\t\t\t\t\temail\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t\t \n\t\t\t\t
    \n\t\t\t\t\t this.openModal('isCancelModalOpen', inviteId)}>\n\t\t\t\t\t\tremove\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t
    \n\t\t);\n\t}\n\n\topenModal(type, inviteId) {\n\t\tthis.setState({\n\t\t\t[type]: true,\n\t\t\tcurrentInviteId: inviteId,\n\t\t});\n\t}\n\n\tgetEmailBox(email) {\n\t\treturn (\n\t\t\t
    \n\t\t\t\t{email}\n\t\t\t
    \n\t\t);\n\t}\n\n\tgetProfileBox(name, current) {\n\t\treturn (\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t{name} {current && '(You)'}\n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t}\n\n\tgetInviteType(inviteTypeId) {\n\t\tswitch (inviteTypeId) {\n\t\t\tcase InviteTypes.ADMIN.type: {\n\t\t\t\treturn InviteTypes.ADMIN.message;\n\t\t\t}\n\t\t\tcase InviteTypes.VIRTUALCAREPROVIDER.type: {\n\t\t\t\treturn InviteTypes.VIRTUALCAREPROVIDER.message;\n\t\t\t}\n\t\t\tcase InviteTypes.VIRTUALSITTER.type: {\n\t\t\t\treturn InviteTypes.VIRTUALSITTER.message;\n\t\t\t}\n\t\t\tcase InviteTypes.SUPERUSER.type: {\n\t\t\t\treturn InviteTypes.SUPERUSER.message;\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\treturn '';\n\t\t}\n\t}\n\n\tgetStatus(inviteStatusId) {\n\t\tswitch (inviteStatusId) {\n\t\t\tcase InviteStatuses.SENT.type: {\n\t\t\t\treturn ;\n\t\t\t}\n\t\t\tcase InviteStatuses.ACCEPTED.type: {\n\t\t\t\treturn ;\n\t\t\t}\n\t\t\tcase InviteStatuses.PENDING.type: {\n\t\t\t\treturn ;\n\t\t\t}\n\t\t\tcase InviteStatuses.CANCELLED.type: {\n\t\t\t\treturn ;\n\t\t\t}\n\t\t\tcase InviteStatuses.FAILED.type: {\n\t\t\t\treturn ;\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\treturn '';\n\t\t}\n\t}\n\n\thandleSearchChanges = async event => {\n\t\tlet searchValue = event.target.value;\n\t\tthis.setState({ loading: true, pageIndex: 0, searchValue: searchValue });\n\n\t\tif (this.timeout) clearTimeout(this.timeout);\n\t\tthis.timeout = setTimeout(\n\t\t\tasync function() {\n\t\t\t\tlet response = await getInvitedMembers(this.state.pageSize.value, 0, searchValue);\n\t\t\t\tthis.setState({\n\t\t\t\t\tloading: false,\n\t\t\t\t\tinvitedMembers: response.companyInvites,\n\t\t\t\t\ttotalCount: response.totalCount,\n\t\t\t\t});\n\t\t\t}.bind(this),\n\t\t\t500\n\t\t);\n\t};\n\n\thandleCancelInvite = () => {\n\t\tlet inviteIndex = this.state.invitedMembers.findIndex(invite => invite.id === this.state.currentInviteId);\n\n\t\tupdateInviteStatus(this.state.currentInviteId, InviteStatuses.CANCELLED.type).then(() => {\n\t\t\tlet items = [...this.state.invitedMembers];\n\t\t\tlet item = {\n\t\t\t\t...items[inviteIndex],\n\t\t\t\tinviteStatusId: InviteStatuses.CANCELLED.type,\n\t\t\t};\n\n\t\t\titems[inviteIndex] = item;\n\t\t\tthis.setState({ invitedMembers: items, currentInviteId: null, isCancelModalOpen: false });\n\t\t});\n\t};\n\n\thandleResendInvite = () => {\n\t\tlet inviteIndex = this.state.invitedMembers.findIndex(invite => invite.id === this.state.currentInviteId);\n\t\tlet invite = this.state.invitedMembers.find(i => i.id === this.state.currentInviteId);\n\n\t\tif (invite.inviteTypeId === InviteTypes.ADMIN.type) {\n\t\t\tcreateInvite([invite.email], invite.inviteTypeId).then(() => {\n\t\t\t\tlet items = [...this.state.invitedMembers];\n\t\t\t\tlet item = {\n\t\t\t\t\t...items[inviteIndex],\n\t\t\t\t\tinviteStatusId: InviteStatuses.SENT.type,\n\t\t\t\t};\n\n\t\t\t\titems[inviteIndex] = item;\n\t\t\t\tthis.setState({ invitedMembers: items, currentInviteId: null, isResendModalOpen: false });\n\t\t\t});\n\t\t} else {\n\t\t\tlet healthSystems =\n\t\t\t\tinvite.invitationInfo && invite.invitationInfo.channels\n\t\t\t\t\t? invite.invitationInfo.channels.map(hs => {\n\t\t\t\t\t\t\treturn { value: hs.id, label: hs.name };\n\t\t\t\t\t })\n\t\t\t\t\t: [invite.invitationInfo.teamId];\n\t\t\tcreateNurseInvite([invite.email], invite.inviteTypeId, healthSystems).then(() => {\n\t\t\t\tlet items = [...this.state.invitedMembers];\n\t\t\t\tlet item = {\n\t\t\t\t\t...items[inviteIndex],\n\t\t\t\t\tinviteStatusId: InviteStatuses.SENT.type,\n\t\t\t\t};\n\n\t\t\t\titems[inviteIndex] = item;\n\t\t\t\tthis.setState({ invitedMembers: items, currentInviteId: null, isResendModalOpen: false });\n\t\t\t});\n\t\t}\n\t};\n\n\trender() {\n\t\tconst invitedUsersTableHeaders = [\n\t\t\t{ title: 'Email' },\n\t\t\t{ title: 'Date Sent' },\n\t\t\t{ title: 'Invited By' },\n\t\t\t{ title: 'Health System' },\n\t\t\t{ title: 'Status' },\n\t\t\t{ title: 'Role' },\n\t\t\t{ title: '' },\n\t\t];\n\t\tconst userRole = getUserRole();\n\t\treturn (\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t this.props.toggleSendInvitationsModal(InviteTypes.VIRTUALSITTER.type)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t this.props.toggleSendInvitationsModal(InviteTypes.VIRTUALCAREPROVIDER.type)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{userRole === UserRoles.ADMIN && (\n\t\t\t\t\t\t\t
    \n\t\t\t\t this.onChange(pageSize, pageIndex)}\n\t\t\t\t/>\n\t\t\t\t this.handleCancelInvite()}\n\t\t\t\t\tonModalClose={() => this.setState({ isCancelModalOpen: false })}>\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    Confirmation

    \n\t\t\t\t\t\t

    Are you sure you want to cancel this invitation? The link sent to this invited user will be deactivated and cannot be used any longer.

    \n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t this.handleResendInvite()}\n\t\t\t\t\tonModalClose={() => this.setState({ isResendModalOpen: false })}>\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    Warning

    \n\t\t\t\t\t\t

    Are you sure you want to resend this invitation? The user you are inviting will receive another email asking them to join Banyan.

    \n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default InvitedUsersList;\n","import React, { Component } from 'react';\nimport classNames from 'classnames/bind';\nimport { SectorTypes } from 'constants/enums';\n\nconst OptionsList = ({ options, selectedOptions, onChange, onSelectLocation, selectedId }) => {\n\tconst toggleExpand = (selectedOptionId, isAddingSection) => {\n\t\tif (selectedOptions[selectedOptionId] && !isAddingSection) {\n\t\t\tdelete selectedOptions[selectedOptionId];\n\t\t} else {\n\t\t\tselectedOptions[selectedOptionId] = {};\n\t\t}\n\t\tonChange(selectedOptions);\n\t};\n\n\tconst handleSubOptionsListChange = (optionId, subSelections) => {\n\t\tselectedOptions[optionId] = subSelections;\n\t\tonChange(selectedOptions);\n\t};\n\n\tconst selectOption = option => {\n\t\tonSelectLocation(option);\n\t};\n\n\treturn (\n\t\t
    \n\t\t\t{options.map((option, index) => (\n\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\ttoggleExpand(option.id);\n\t\t\t\t\t\t\t\t}}>\n\t\t\t\t\t\t\t\t{selectedOptions[option.id] ? 'keyboard_arrow_down' : 'keyboard_arrow_right'}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{option.icon}\n\t\t\t\t\t\t\t selectOption(option) : undefined}>\n\t\t\t\t\t\t\t\t{option.name}\n\t\t\t\t\t\t\t\tfiber_manual_record\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t{option.subOptions && selectedOptions[option.id] && (\n\t\t\t\t\t\t handleSubOptionsListChange(option.id, subSelections)}\n\t\t\t\t\t\t\tonSelectLocation={onSelectLocation}\n\t\t\t\t\t\t\tselectedId={selectedId}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t
    \n\t\t\t))}\n\t\t
    \n\t);\n};\n\nclass AssignDropdown extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tselectedOptions: this.props.preSelected,\n\t\t};\n\t}\n\n\trender() {\n\t\tvar { selectedOptions } = this.state;\n\t\treturn (\n\t\t\t
    \n\t\t\t\t{this.props.data.length !== 0 ? (\n\t\t\t\t\t
    \n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tthis.setState({ selectedOptions });\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tselectedOptions={selectedOptions}\n\t\t\t\t\t\t\tselectedId={this.props.selectedId}\n\t\t\t\t\t\t/>\n\t\t\t\t\t
    \n\t\t\t\t) : (\n\t\t\t\t\t
    \n\t\t\t\t\t\tThis health system does not have any created hospitals. Make sure to create them before assigning nurses!\n\t\t\t\t\t
    \n\t\t\t\t)}\n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default AssignDropdown;\n","import React from 'react';\n\nconst InputFeedback = ({ children }) => {children};\n\nconst Select = ({ field: { name, onChange, ...field }, form: { touched, errors, setFieldValue }, ...props }) => {\n\tconst error = errors ? errors[name] : '';\n\tconst touch = touched ? touched[name] : '';\n\tfunction _handleChange(e) {\n\t\tsetFieldValue(name, e.target.value);\n\t\tif (props.onChange) {\n\t\t\tprops.onChange(e);\n\t\t}\n\t}\n\treturn (\n\t\t
    \n\t\t\t

    {props.label}

    \n\t\t\t

    {props.description}

    \n\t\t\t\n\t\t\t{touch && error && {error}}\n\t\t
    \n\t);\n};\n\nexport default Select;\n","import React, { Component } from 'react';\nimport Table from 'components/Table';\nimport { findSectorById, getSectorPath } from 'infrastructure/helpers/commonHelpers';\nimport SmallModal from 'components/SmallModal';\nimport AssignDropdown from 'components/UserManagement/AssignDropdown';\nimport { If, Then, Else } from 'react-if';\nimport Grid from 'components/Grid';\nimport Loader from 'components/Loader';\nimport { Form, Formik, Field } from 'formik';\nimport * as Yup from 'yup';\nimport Select from 'components/Common/FormElements/Select';\nimport Alert from 'components/Alert';\nimport classNames from 'classnames/bind';\nimport { addToHealthSystem, getNurseHealthSystems, getHealthSystemSubTree, assignMember, deleteHealthSystemMember } from 'api/users';\n\nclass ManageHealthSystems extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.state = {\n\t\t\thealthsystems: [],\n\t\t\tshowHealthSystemForm: false,\n\t\t\tloadingHealthSystems: false,\n\t\t\tcurrentHealthSystem: {},\n\t\t\tcurrentUserSubTree: [],\n\t\t\tassigningUser: false,\n\t\t};\n\t}\n\n\tasync componentDidMount() {\n\t\tthis.setState({ loadingHealthSystems: true });\n\t\tlet healthsystems = await getNurseHealthSystems(this.props.member.memberId);\n\t\tthis.setState({\n\t\t\thealthsystems: healthsystems,\n\t\t\tloadingHealthSystems: false,\n\t\t});\n\t}\n\n\tdisplayHealthSystems() {\n\t\treturn this.state.healthsystems.map(hs => {\n\t\t\treturn {\n\t\t\t\tname: hs.name,\n\t\t\t\tassignation: this.Assignation(hs),\n\t\t\t\tedit: this.getEditButtons(hs.id),\n\t\t\t};\n\t\t});\n\t}\n\n\tgetEditButtons(healthSystemId) {\n\t\treturn (\n\t\t\t
    \n\t\t\t\t this.deleteHealthSystem(healthSystemId)}>\n\t\t\t\t\tdelete\n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t}\n\n\tdeleteHealthSystem(healthSystemId) {\n\t\tdeleteHealthSystemMember(healthSystemId, this.props.member.memberId).then(() => {\n\t\t\tthis.setState({\n\t\t\t\thealthsystems: this.state.healthsystems.filter(hs => {\n\t\t\t\t\treturn hs.id !== healthSystemId;\n\t\t\t\t}),\n\t\t\t});\n\t\t});\n\t}\n\n\tAssignation = healthSystem => {\n\t\tlet sector = healthSystem.location ? findSectorById(this.state.currentUserSubTree, healthSystem.location.id) : null;\n\t\tlet preselected = !!sector ? getSectorPath(sector) : {};\n\t\treturn (\n\t\t\t
    \n\t\t\t\t
    this.getTree(healthSystem)}>\n\t\t\t\t\t{healthSystem.location ? (\n\t\t\t\t\t\thealthSystem.location.name\n\t\t\t\t\t) : (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\thow_to_regAssign Level\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t
    \n\t\t\t\t{this.state.currentHealthSystem.id === healthSystem.id && (\n\t\t\t\t\t this.setState({ currentHealthSystem: {} })}>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t this.onSelectLocation(level)}\n\t\t\t\t\t\t\t\t\tdata={this.state.currentUserSubTree}\n\t\t\t\t\t\t\t\t\tpreSelected={preselected}\n\t\t\t\t\t\t\t\t\tselectedId={healthSystem.location ? healthSystem.location.id : null}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t)}\n\t\t\t
    \n\t\t);\n\t};\n\n\tasync onSelectLocation(level) {\n\t\tthis.setState({ assigningUser: true });\n\t\tlet userId = this.props.member.userInfo.id;\n\t\tlet healthSystemIndex = this.state.healthsystems.findIndex(hs => hs.id === this.state.currentHealthSystem.id);\n\n\t\tassignMember(this.state.currentHealthSystem.id, level.id, userId)\n\t\t\t.then(() => {\n\t\t\t\tlet items = [...this.state.healthsystems];\n\t\t\t\tlet item = {\n\t\t\t\t\t...items[healthSystemIndex],\n\t\t\t\t\tlocation: {\n\t\t\t\t\t\t...items[healthSystemIndex].location,\n\t\t\t\t\t\tid: level.id,\n\t\t\t\t\t\tname: level.name,\n\t\t\t\t\t},\n\t\t\t\t};\n\n\t\t\t\titems[healthSystemIndex] = item;\n\t\t\t\tthis.setState({ healthsystems: items, currentHealthSystem: {}, assigningUser: false });\n\t\t\t})\n\t\t\t.catch(error => console.log(error));\n\t}\n\n\tasync getTree(healthSystem) {\n\t\tthis.setState({ currentHealthSystem: healthSystem, fetchingSubTree: true });\n\t\tlet subtree = await getHealthSystemSubTree(healthSystem.id);\n\t\tthis.setState({ fetchingSubTree: false, currentUserSubTree: subtree });\n\t}\n\n\tgetHealthSystems(allHealthSystems, assignedHealthSystems) {\n\t\treturn allHealthSystems.filter(function(e) {\n\t\t\tlet f = assignedHealthSystems.find(a => a.id == e.id);\n\t\t\treturn f ? false : true;\n\t\t});\n\t}\n\n\trender() {\n\t\tlet usersTableHeaders = [{ title: 'Health System' }, { title: 'Assignation' }, { edit: '' }];\n\n\t\treturn (\n\t\t\t {\n\t\t\t\t\tif (this.state.showHealthSystemForm) {\n\t\t\t\t\t\tthis.props.onLoading('healthSystemAddition');\n\t\t\t\t\t\taddToHealthSystem(values.healthSystem, this.props.member.memberId).then(res => {\n\t\t\t\t\t\t\tlet healthSystemName = this.props.healthSystems.find(hs => hs.id == values.healthSystem).value;\n\t\t\t\t\t\t\tthis.props.onSuccess('healthSystemAddition');\n\t\t\t\t\t\t\tthis.setState(prevState => ({\n\t\t\t\t\t\t\t\thealthsystems: [...prevState.healthsystems, { id: values.healthSystem, name: healthSystemName }],\n\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\tresetForm({\n\t\t\t\t\t\t\t\thealthSystem: '',\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.props.onSuccess('healthSystemAddition');\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\tvalidationSchema={() => {\n\t\t\t\t\tif (this.state.showHealthSystemForm) {\n\t\t\t\t\t\treturn Yup.object().shape({\n\t\t\t\t\t\t\thealthSystem: Yup.string().required('Health system is required'),\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}}>\n\t\t\t\t{formikProps => {\n\t\t\t\t\t// bind the submission handler remotely\n\t\t\t\t\tthis.props.bindSubmitForm(formikProps.submitForm);\n\t\t\t\t\treturn (\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t

    Manage Health Systems

    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\tthis.setState({ showHealthSystemForm: !this.state.showHealthSystemForm });\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tdata-tooltip={'Add New Health System'}\n\t\t\t\t\t\t\t\tdata-position='right'>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tadd_box\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{this.state.showHealthSystemForm && !this.state.loadingHealthSystems && (\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t this.props.onCloseAlert('healthSystemAddition')}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t this.props.onCloseAlert('healthSystemAddition')}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\n\t\t\t\t\t);\n\t\t\t\t}}\n\t\t\t\n\t\t);\n\t}\n}\n\nexport default ManageHealthSystems;\n","import React from 'react';\nimport { APP_CONFIG } from 'constants/global-variables';\n\nexport const ProfilePicture = props => {\n\treturn (\n\t\t\n\t);\n};\n","import React, { Component } from 'react';\nimport { Form, Formik, Field } from 'formik';\nimport * as Yup from 'yup';\n\nimport { updateNurse, getNurseProfileInfo } from 'api/users';\nimport { decodeHtml } from 'infrastructure/helpers/commonHelpers';\n\nimport { ProfilePicture } from 'components/ProfilePicture';\nimport { Alert, Loader } from 'components';\nimport Select from 'components/Common/FormElements/Select';\nimport Input from 'components/Common/FormElements/Input';\nimport { UserTypes, Roles } from 'constants/enums';\nimport { updateRole } from 'api/roles';\nimport MultiSelect from 'components/Common/FormElements/MultiSelect';\n\nclass UserInformation extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.state = {\n\t\t\tloading: false,\n\t\t\thealthSystemInputType: this.healthSystemInputTypes.NONE,\n\t\t\tisMemberTitleEnabled: this.props.currentMemberObj.roles[0].id === UserTypes.VIRTUALCAREPROVIDER,\n\t\t\trole: {},\n\t\t};\n\t}\n\n\thealthSystemInputTypes = {\n\t\tNONE: 0,\n\t\tSINGLE: 1,\n\t\tMULTI: 2,\n\t};\n\n\troleHealthSystemTypes = {\n\t\t[Roles.ADMIN.id]: this.healthSystemInputTypes.NONE,\n\t\t[Roles.SUPERUSER.id]: this.healthSystemInputTypes.SINGLE,\n\t\t[Roles.VIRTUALCAREPROVIDER.id]: this.healthSystemInputTypes.MULTI,\n\t\t[Roles.VIRTUALSITTER.id]: this.healthSystemInputTypes.MULTI,\n\t};\n\n\troles = [Roles.VIRTUALCAREPROVIDER, Roles.VIRTUALSITTER, Roles.ADMIN, Roles.SUPERUSER];\n\n\tcomponentDidMount = async () => {\n\t\tlet profileInfo = await getNurseProfileInfo(this.props.currentMemberObj.userInfo.userId);\n\t\tthis.setState({\n\t\t\tloading: false,\n\t\t\trole: profileInfo.workExperience.length !== 0 ? this.getBanyanRole(profileInfo.workExperience) : {},\n\t\t});\n\t};\n\n\tgetBanyanRole = workExperiences => {\n\t\treturn workExperiences.find(ex => ex.showOnBC && ex.company === 'Banyan');\n\t};\n\n\tgetSelectedHealthSystems = (values, roleId) => {\n\t\tif (roleId === UserTypes.ADMIN) return [];\n\n\t\tif (this.state.healthSystemInputType === this.healthSystemInputTypes.SINGLE) {\n\t\t\treturn [this.props.healthSystems.find(x => x.id === values.healthSystem)];\n\t\t}\n\n\t\treturn values.healthSystems.map(x => ({ id: x.value, value: x.label }));\n\t};\n\n\tonSubmit = async values => {\n\t\tthis.props.onLoading('updateNurse');\n\n\t\ttry {\n\t\t\tconst roleId = parseInt(values.role, 10);\n\t\t\tlet teamIds = null;\n\t\t\tif (this.state.healthSystemInputType === this.healthSystemInputTypes.SINGLE) {\n\t\t\t\tteamIds = [values.healthSystem];\n\t\t\t} else if (this.state.healthSystemInputType === this.healthSystemInputTypes.MULTI) {\n\t\t\t\tteamIds = values.healthSystems.map(x => x.value);\n\t\t\t}\n\n\t\t\tif (parseInt(this.props.currentMemberObj.roles[0].id, 10) !== parseInt(values.role, 10)) {\n\t\t\t\tawait updateRole(this.props.currentMemberObj.memberId, { roleId, teamIds });\n\t\t\t}\n\n\t\t\tconst updateNurseProps = {\n\t\t\t\tfirstName: values.firstName,\n\t\t\t\tlastName: values.lastName,\n\t\t\t\tjobTitle: parseInt(values.role, 10) === UserTypes.VIRTUALCAREPROVIDER ? values.jobTitle : '',\n\t\t\t\trole: values.role,\n\t\t\t};\n\t\t\tawait updateNurse(\n\t\t\t\tupdateNurseProps,\n\t\t\t\tthis.props.currentMemberObj.userInfo.userId,\n\t\t\t\tthis.props.currentMemberObj.userInfo.id,\n\t\t\t\tthis.state.role ? this.state.role.workExperienceId : 0\n\t\t\t);\n\n\t\t\tthis.props.userUpdated(\n\t\t\t\tthis.props.currentMemberObj.userInfo.userId,\n\t\t\t\tvalues.firstName,\n\t\t\t\tvalues.lastName,\n\t\t\t\tthis.roles.find(x => x.id === roleId),\n\t\t\t\tthis.getSelectedHealthSystems(values, roleId)\n\t\t\t);\n\t\t\tthis.props.onSuccess('updateNurse');\n\t\t} catch (e) {\n\t\t\tthis.props.onError('updateNurse');\n\t\t}\n\t};\n\n\tgetValidationForm = () => {\n\t\tlet validation = {\n\t\t\tfirstName: Yup.string()\n\t\t\t\t.trim()\n\t\t\t\t.required('First name cannot be empty')\n\t\t\t\t.min(2, 'First name must be at least two characters')\n\t\t\t\t.max(50, 'First name can have a maximum of 50 characters'),\n\t\t\tlastName: Yup.string()\n\t\t\t\t.trim()\n\t\t\t\t.required('Last name cannot be empty')\n\t\t\t\t.min(2, 'Last name must be at least two characters')\n\t\t\t\t.max(50, 'Last name can have a maximum of 50 characters'),\n\t\t};\n\n\t\tif (this.state.healthSystemInputType === this.healthSystemInputTypes.SINGLE) {\n\t\t\tvalidation.healthSystem = Yup.string().required();\n\t\t} else if (this.state.healthSystemInputType === this.healthSystemInputTypes.MULTI) {\n\t\t\tvalidation.healthSystems = Yup.string().required();\n\t\t}\n\n\t\treturn Yup.object().shape(validation);\n\t};\n\n\tgetRole = id => {\n\t\tswitch (id) {\n\t\t\tcase UserTypes.OWNER: {\n\t\t\t\treturn 'Owner';\n\t\t\t}\n\t\t\tcase UserTypes.ADMIN: {\n\t\t\t\treturn 'Admin';\n\t\t\t}\n\t\t\tcase UserTypes.VIRTUALCAREPROVIDER: {\n\t\t\t\treturn 'Virtual Care Provider';\n\t\t\t}\n\t\t\tcase UserTypes.VIRTUALSITTER: {\n\t\t\t\treturn 'Virtual Sitter';\n\t\t\t}\n\t\t\tcase UserTypes.SUPERUSER: {\n\t\t\t\treturn 'Super User';\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\treturn '';\n\t\t}\n\t};\n\n\trender() {\n\t\tif (this.state.loading) {\n\t\t\treturn ;\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t\t\t{formikProps => {\n\t\t\t\t\tconst { values, touched, errors, setFieldValue, setFieldTouched } = formikProps;\n\t\t\t\t\t// bind the submission handler remotely\n\t\t\t\t\tthis.props.bindSubmitForm(formikProps.submitForm);\n\t\t\t\t\treturn (\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t

    Modify {this.getRole(this.props.currentMemberObj.roles[0].id)} Information

    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t

    {decodeHtml(`${this.props.currentMemberObj.userInfo.firstName} ${this.props.currentMemberObj.userInfo.lastName}`)}

    \n\t\t\t\t\t\t\t
    \n\n\t\t\t\t\t\t\t{(this.props.currentMemberObj.roles[0].id === UserTypes.VIRTUALCAREPROVIDER ||\n\t\t\t\t\t\t\t\tthis.props.currentMemberObj.roles[0].id === UserTypes.VIRTUALSITTER) && (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\tconst value = e.target.value;\n\t\t\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\t\t\thealthSystemInputType:\n\t\t\t\t\t\t\t\t\t\t\tthis.props.currentMemberObj.roles[0].id === parseInt(value, 10) ? this.healthSystemInputTypes.NONE : this.roleHealthSystemTypes[value],\n\t\t\t\t\t\t\t\t\t\tisMemberTitleEnabled: parseInt(value, 10) === UserTypes.VIRTUALCAREPROVIDER,\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tcomponent={Select}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{this.state.healthSystemInputType === this.healthSystemInputTypes.SINGLE && (\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{this.state.healthSystemInputType === this.healthSystemInputTypes.MULTI && (\n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\treturn { value: hs.id, label: hs.value };\n\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\tvalue={values.healthSystems}\n\t\t\t\t\t\t\t\t\tisMulti={true}\n\t\t\t\t\t\t\t\t\tonChange={setFieldValue}\n\t\t\t\t\t\t\t\t\tonBlur={setFieldTouched}\n\t\t\t\t\t\t\t\t\ttouched={touched.healthSystems}\n\t\t\t\t\t\t\t\t\terror={errors.healthSystems}\n\t\t\t\t\t\t\t\t\tisClearable={true}\n\t\t\t\t\t\t\t\t\tbackspaceRemovesValue={true}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t{this.state.isMemberTitleEnabled && (\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t this.props.onCloseAlert('updateNurse')}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t this.props.onCloseAlert('updateNurse')}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\n\t\t\t\t\t);\n\t\t\t\t}}\n\t\t\t\n\t\t);\n\t}\n}\n\nexport default UserInformation;\n","import React from 'react';\nimport { Form, Formik, Field } from 'formik';\nimport * as Yup from 'yup';\n\nimport { editSuperUserHealthSystem } from 'api/users';\nimport { Alert } from 'components';\nimport Select from 'components/Common/FormElements/Select';\nimport { Roles } from 'constants/enums';\n\nconst SuperUserHealthSystem = props => (\n\t
    \n\t\t {\n\t\t\t\tprops.onLoading('healthSystemAddition');\n\t\t\t\tconst pastHealthSystem = props.member.healthSystems.length !== 0 ? props.member.healthSystems[0].id : null;\n\t\t\t\teditSuperUserHealthSystem(props.member.userInfo.id, values.healthSystem, pastHealthSystem).then(res => {\n\t\t\t\t\tprops.userUpdated(props.member.userInfo.userId, props.member.userInfo.firstName, props.member.userInfo.lastName, Roles.SUPERUSER, [\n\t\t\t\t\t\tprops.healthSystems.find(x => x.id === values.healthSystem),\n\t\t\t\t\t]);\n\t\t\t\t\tprops.onSuccess('healthSystemAddition');\n\t\t\t\t});\n\t\t\t}}\n\t\t\tvalidationSchema={Yup.object().shape({\n\t\t\t\thealthSystem: Yup.string().required('Health system is required!'),\n\t\t\t})}>\n\t\t\t{formikProps => {\n\t\t\t\t// bind the submission handler remotely\n\t\t\t\tprops.bindSubmitForm(formikProps.submitForm);\n\n\t\t\t\treturn (\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    Edit Super User's Health System

    \n\t\t\t\t\t\t\n\n\t\t\t\t\t\t props.onCloseAlert('healthSystemAddition')}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t props.onCloseAlert('healthSystemAddition')}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t);\n\t\t\t}}\n\t\t\n\t
    \n);\n\nexport default SuperUserHealthSystem;\n","import React, { Component } from 'react';\n\nimport Pagination from 'components/Common/Pagination';\nimport { Grid, Input, Table, Tabs, Button, Badge, Modal } from 'components';\n\nimport { getMembers, deleteMember, getHealthSystemMembers, sendRecoveryEmail } from 'api/users';\nimport { UserTypes, InviteTypes, UserRoles } from 'constants/enums';\nimport { decodeHtml, getCurrentHealthSystemInfo } from 'infrastructure/helpers/commonHelpers';\nimport { utcToLocalTime } from 'infrastructure/helpers/dateHelper';\nimport { getUserProfile, getUserRole, getUserId } from 'infrastructure/auth';\nimport moment from 'moment';\n\nimport ManageHealthSystems from 'components/UserManagement/Lists/EditUser/ManageHealthSystems';\nimport UserInformation from 'components/UserManagement/Lists/EditUser/UserInformation';\nimport { SocketContext } from 'io-client/SocketContext';\nimport SocketEvents from 'constants/socket-events';\nimport SuperUserHealthSystem from 'components/UserManagement/Lists/EditUser/SuperUserHealthSystem';\n\nclass UsersList extends Component {\n\tconstructor(props, context) {\n\t\tsuper(props, context);\n\n\t\tthis.state = {\n\t\t\tpageSize: { value: 10, label: '10' },\n\t\t\tpageIndex: 0,\n\t\t\ttotalCount: 0,\n\t\t\tmembers: [],\n\t\t\tloading: true,\n\t\t\tcurrentMemberObj: null,\n\t\t\tcurrentMemberId: null,\n\t\t\tsearchValue: '',\n\t\t\tisDeleteModalOpen: false,\n\t\t\tdeletingMember: false,\n\t\t\tisEditMemberModalOpen: false,\n\t\t\teditingMember: false,\n\t\t\tmanageUsersSelectedTab: 0,\n\t\t\thealthSystemAddition: {\n\t\t\t\tloading: false,\n\t\t\t\tloaded: false,\n\t\t\t\terror: false,\n\t\t\t},\n\t\t\tupdateNurse: {\n\t\t\t\tloading: false,\n\t\t\t\tloaded: false,\n\t\t\t\terror: false,\n\t\t\t},\n\t\t\tshowAccountRecoveryModal: false,\n\t\t\taccountRecoveryMailSent: false,\n\t\t\tmemberId: null,\n\t\t\taccountRecoveryMailFailed: false,\n\t\t};\n\n\t\tthis.submitMyForm = null;\n\t\tthis.socket = context;\n\t}\n\n\tasync componentDidMount() {\n\t\tlet response = {};\n\t\tlet healthSystem = getCurrentHealthSystemInfo();\n\n\t\tif (getUserRole() === UserRoles.ADMIN) {\n\t\t\tresponse = await getMembers();\n\t\t} else {\n\t\t\tresponse = await getHealthSystemMembers(healthSystem.currentHealthSystemId);\n\t\t}\n\n\t\tthis.setState({\n\t\t\tloading: false,\n\t\t\tmembers: response.members,\n\t\t\ttotalCount: response.totalCount,\n\t\t\tcurrentHealthSystemId: healthSystem.currentHealthSystemId,\n\t\t});\n\n\t\tthis.socket.on(SocketEvents.Client.ON_NOTIFY_UPDATED_USER_PRESENCE, this.handleUpdatedMemberPresence);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.socket.off(SocketEvents.Client.ON_NOTIFY_UPDATED_USER_PRESENCE, this.handleUpdatedMemberPresence);\n\t}\n\n\thandleSubmitMyForm = e => {\n\t\tif (this.submitMyForm) {\n\t\t\tthis.submitMyForm(e);\n\t\t}\n\t};\n\n\tbindSubmitForm = submitForm => {\n\t\tthis.submitMyForm = submitForm;\n\t};\n\n\thandleDeleteMember = async () => {\n\t\tthis.setState({ deletingMember: true });\n\t\tdeleteMember(this.state.currentMemberId).then(() => {\n\t\t\tthis.setState({\n\t\t\t\tmembers: this.state.members.filter(member => {\n\t\t\t\t\treturn member.memberId !== this.state.currentMemberId;\n\t\t\t\t}),\n\t\t\t\tcurrentMemberId: null,\n\t\t\t\tdeletingMember: false,\n\t\t\t\tisDeleteModalOpen: false,\n\t\t\t});\n\t\t});\n\t};\n\n\tasync onChange(pageSize, pageIndex) {\n\t\tthis.setState({ loading: true });\n\n\t\tlet members = {};\n\t\tif (getUserRole() === UserRoles.ADMIN) {\n\t\t\tmembers = await getMembers(pageSize.value, pageIndex, this.state.searchValue);\n\t\t} else {\n\t\t\tmembers = await getHealthSystemMembers(this.state.currentHealthSystemId, pageSize.value, pageIndex, this.state.searchValue);\n\t\t}\n\n\t\tthis.setState({\n\t\t\tloading: false,\n\t\t\tmembers: members.members,\n\t\t\tpageSize: pageSize,\n\t\t\tpageIndex: pageIndex,\n\t\t\ttotalCount: members.totalCount,\n\t\t});\n\t}\n\n\tgetLocations(locations) {\n\t\tif (locations.length === 0) return 'N/A';\n\n\t\treturn locations\n\t\t\t.map(location => {\n\t\t\t\treturn location.name;\n\t\t\t})\n\t\t\t.join(',');\n\t}\n\n\tgetRoles(roles) {\n\t\tif (roles.length === 1) return this.getRole(roles[0].id);\n\t\treturn roles.map(role => this.getRole(role.id)).join(', ');\n\t}\n\n\tgetRole(id) {\n\t\tswitch (id) {\n\t\t\tcase UserTypes.OWNER: {\n\t\t\t\treturn 'Owner';\n\t\t\t}\n\t\t\tcase UserTypes.ADMIN: {\n\t\t\t\treturn 'Admin';\n\t\t\t}\n\t\t\tcase UserTypes.VIRTUALCAREPROVIDER: {\n\t\t\t\treturn 'Virtual Care Provider';\n\t\t\t}\n\t\t\tcase UserTypes.VIRTUALSITTER: {\n\t\t\t\treturn 'Virtual Sitter';\n\t\t\t}\n\t\t\tcase UserTypes.SUPERUSER: {\n\t\t\t\treturn 'Super User';\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\treturn '';\n\t\t}\n\t}\n\n\tisVirtualCarer(roles) {\n\t\tconst vcp = roles.find(role => role.id === UserTypes.VIRTUALCAREPROVIDER || role.id === UserTypes.VIRTUALSITTER);\n\t\tif (typeof vcp === 'undefined') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tisAdmin(roles) {\n\t\tconst admin = roles.find(role => role.id === UserTypes.ADMIN);\n\t\tif (typeof admin === 'undefined') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tonRecoverPassword = async (email, memberId, tokenId) => {\n\t\tconst response = await sendRecoveryEmail(email, memberId, tokenId);\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\taccountRecoveryMailSent: !!response.Result,\n\t\t\t\tmemberId,\n\t\t\t\temail,\n\t\t\t\ttokenId,\n\t\t\t\taccountRecoveryMailFailed: false,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.toggleAccountRecoveryModal();\n\t\t\t}\n\t\t);\n\t};\n\n\tgetInviter = user => {\n\t\tif (user.inviteTypeId === InviteTypes.ADUSER.type) return 'AD User';\n\t\treturn user.inviter\n\t\t\t? this.getProfileBox(decodeHtml(`${user.inviter.firstName} ${user.inviter.lastName}`), getUserProfile().userId === user.inviter.userId)\n\t\t\t: 'N/A';\n\t};\n\n\tdisplayUsers() {\n\t\tif (this.state.members.length === 0) return [];\n\t\treturn this.state.members.map(user => {\n\t\t\tlet presence;\n\t\t\tlet presenceColor;\n\t\t\tif (user.userInfo.presenceStatusTypeId === 1) {\n\t\t\t\tpresence = 'Available';\n\t\t\t\tpresenceColor = 'green';\n\t\t\t} else {\n\t\t\t\tpresence = 'Unavailable';\n\t\t\t\tpresenceColor = 'red';\n\t\t\t}\n\t\t\tconst current = getUserProfile().userId === user.userInfo.userId;\n\t\t\tconst isOwner = user.roles.some(role => role.id === UserTypes.OWNER);\n\t\t\treturn {\n\t\t\t\tprofileBox: this.getProfileBox(decodeHtml(`${user.userInfo.firstName} ${user.userInfo.lastName}`), current),\n\t\t\t\temail: user.userInfo.email,\n\t\t\t\tinvitedBy: this.getInviter(user),\n\t\t\t\tdateInvited: user.dateInvited ? moment(utcToLocalTime(user.dateInvited)).format('MM/DD/YYYY-hh:mm A') : 'N/A',\n\t\t\t\tdateAdded: user.dateAdded ? moment(utcToLocalTime(user.dateAdded)).format('MM/DD/YYYY-hh:mm A') : 'N/A',\n\t\t\t\thealthsystem: user.healthSystems.length > 0 ? this.displayHealthSystems(user.healthSystems) : 'N/A',\n\t\t\t\tstatus: ,\n\t\t\t\trole: this.getRoles(user.roles),\n\t\t\t\tedit:\n\t\t\t\t\t!current &&\n\t\t\t\t\tgetUserRole() === UserRoles.ADMIN &&\n\t\t\t\t\t!isOwner &&\n\t\t\t\t\tthis.getEditButtons(user.memberId, user.roles, user.pendingRecoveryInviteToken, user.userInfo.email, user.inviteTypeId),\n\t\t\t};\n\t\t});\n\t}\n\n\tdisplayHealthSystems(healthsystems) {\n\t\treturn healthsystems.map(hs => hs.name).join(', ');\n\t}\n\n\tgetProfileBox(name, current) {\n\t\treturn (\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t{name} {current && '(You)'}\n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t}\n\n\tgetEditButtons(memberId, roles, pendingRecoveryInviteToken, email, inviteTypeId) {\n\t\tconst userId = getUserId();\n\t\treturn (\n\t\t\t
    \n\t\t\t\t{pendingRecoveryInviteToken && (\n\t\t\t\t\t this.onRecoverPassword(email, userId, pendingRecoveryInviteToken)}\n\t\t\t\t\t\tdata-tooltip='Send reset password link'\n\t\t\t\t\t\tdata-position='top'>\n\t\t\t\t\t\temail\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\t{inviteTypeId !== InviteTypes.ADUSER.type && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t this.openEditMemberModal(memberId)}>\n\t\t\t\t\t\t\tedit\n\t\t\t\t\t\t\n\t\t\t\t\t\t this.openDeleteMemberModal(memberId)}>\n\t\t\t\t\t\t\tdelete\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t
    \n\t\t);\n\t}\n\n\topenEditMemberModal(memberId) {\n\t\tlet member = this.state.members.find(m => m.memberId === memberId);\n\t\tthis.setState({\n\t\t\tisEditMemberModalOpen: true,\n\t\t\tcurrentMemberId: memberId,\n\t\t\tcurrentMemberObj: member,\n\t\t\tupdateNurse: {\n\t\t\t\tloading: false,\n\t\t\t\tloaded: false,\n\t\t\t\terror: false,\n\t\t\t},\n\t\t\thealthSystemAddition: {\n\t\t\t\tloading: false,\n\t\t\t\tloaded: false,\n\t\t\t\terror: false,\n\t\t\t},\n\t\t});\n\t}\n\n\topenDeleteMemberModal(memberId) {\n\t\tthis.setState({ isDeleteModalOpen: true, currentMemberId: memberId });\n\t}\n\n\thandleSearchChanges = async event => {\n\t\tlet searchValue = event.target.value;\n\t\tthis.setState({ loading: true, pageIndex: 0, searchValue: searchValue });\n\n\t\tif (this.timeout) clearTimeout(this.timeout);\n\t\tthis.timeout = setTimeout(\n\t\t\tasync function() {\n\t\t\t\tlet response = {};\n\t\t\t\tif (getUserRole() === UserRoles.ADMIN) {\n\t\t\t\t\tresponse = await getMembers(this.state.pageSize.value, 0, searchValue);\n\t\t\t\t} else {\n\t\t\t\t\tresponse = await getHealthSystemMembers(this.state.currentHealthSystemId, this.state.pageSize.value, 0, searchValue);\n\t\t\t\t}\n\n\t\t\t\tthis.setState({\n\t\t\t\t\tloading: false,\n\t\t\t\t\tmembers: response.members,\n\t\t\t\t\ttotalCount: response.totalCount,\n\t\t\t\t});\n\t\t\t}.bind(this),\n\t\t\t500\n\t\t);\n\t};\n\n\tonLoading = tab => {\n\t\tthis.setState({\n\t\t\t[tab]: {\n\t\t\t\t...this.state[tab],\n\t\t\t\tloading: true,\n\t\t\t},\n\t\t});\n\t};\n\n\tonSuccess = async tab => {\n\t\tthis.setState({\n\t\t\tloading: true,\n\t\t});\n\t\tlet members = {};\n\t\tif (getUserRole() === UserRoles.ADMIN) {\n\t\t\tmembers = await getMembers(this.state.pageSize.value, this.state.pageIndex, this.state.searchValue);\n\t\t} else {\n\t\t\tmembers = await getHealthSystemMembers(this.state.currentHealthSystemId, this.state.pageSize.value, this.state.pageIndex, this.state.searchValue);\n\t\t}\n\t\tthis.setState({\n\t\t\t[tab]: {\n\t\t\t\t...this.state[tab],\n\t\t\t\tloading: false,\n\t\t\t\tloaded: true,\n\t\t\t\terror: false,\n\t\t\t},\n\t\t\tloading: false,\n\t\t\tmembers: members.members,\n\t\t\ttotalCount: members.totalCount,\n\t\t\tcurrentMemberObj: this.state.members.find(m => m.memberId === this.state.currentMemberObj.memberId),\n\t\t});\n\t};\n\n\tonError = tab => {\n\t\tthis.setState({\n\t\t\t[tab]: {\n\t\t\t\t...this.state[tab],\n\t\t\t\tloading: false,\n\t\t\t\terror: true,\n\t\t\t},\n\t\t});\n\t};\n\n\tonCloseAlert = tab => {\n\t\tthis.setState({\n\t\t\t[tab]: {\n\t\t\t\t...this.state[tab],\n\t\t\t\tloading: false,\n\t\t\t\tloaded: false,\n\t\t\t\terror: false,\n\t\t\t},\n\t\t});\n\t};\n\n\tuserUpdated = (userId, firstName, lastName, role, healthSystems) => {\n\t\tlet userIndex = this.state.members.findIndex(member => member.userInfo.userId === userId);\n\n\t\tlet items = [...this.state.members];\n\t\tconst roles = [role];\n\n\t\tlet item = {\n\t\t\t...items[userIndex],\n\t\t\tuserInfo: {\n\t\t\t\t...items[userIndex].userInfo,\n\t\t\t\tfirstName: firstName,\n\t\t\t\tlastName: lastName,\n\t\t\t},\n\t\t\troles,\n\t\t\thealthSystems,\n\t\t};\n\n\t\titems[userIndex] = item;\n\t\tthis.setState({\n\t\t\tmembers: items,\n\t\t\tcurrentMemberObj: {\n\t\t\t\t...this.state.currentMemberObj,\n\t\t\t\tuserInfo: {\n\t\t\t\t\t...this.state.currentMemberObj.userInfo,\n\t\t\t\t\tfirstName: firstName,\n\t\t\t\t\tlastName: lastName,\n\t\t\t\t},\n\t\t\t\thealthSystems,\n\t\t\t},\n\t\t});\n\t};\n\n\thandleUpdatedMemberPresence = ({ objectId, presenceStatusTypeId }) => {\n\t\tconst { members } = this.state;\n\n\t\tconst member = members.find(({ userInfo }) => userInfo.userId === +objectId);\n\t\tif (!member) {\n\t\t\treturn;\n\t\t}\n\n\t\tmember.userInfo.presenceStatusTypeId = presenceStatusTypeId;\n\n\t\tthis.setState({ members });\n\t};\n\n\ttoggleAccountRecoveryModal = () => {\n\t\tthis.setState({\n\t\t\tshowAccountRecoveryModal: !this.state.showAccountRecoveryModal,\n\t\t});\n\t};\n\n\tsendNewLink = async () => {\n\t\ttry {\n\t\t\tawait sendRecoveryEmail(this.state.email, this.state.memberId, this.state.tokenId);\n\t\t\tthis.toggleAccountRecoveryModal();\n\t\t\tthis.setState({\n\t\t\t\taccountRecoveryMailFailed: false,\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tthis.setState({\n\t\t\t\taccountRecoveryMailFailed: true,\n\t\t\t});\n\t\t}\n\t};\n\n\trender() {\n\t\tconst usersTableHeaders = [\n\t\t\t{ title: 'User Name' },\n\t\t\t{ title: 'Email' },\n\t\t\t{ title: 'Invited By' },\n\t\t\t{ title: 'Date Invited' },\n\t\t\t{ title: 'Date Added' },\n\t\t\t{ title: 'Health Systems' },\n\t\t\t{ title: 'Status' },\n\t\t\t{ title: 'Role' },\n\t\t\t{ edit: '' },\n\t\t];\n\t\tconst userRole = getUserRole();\n\t\treturn (\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t this.props.toggleSendInvitationsModal(InviteTypes.VIRTUALSITTER.type)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t this.props.toggleSendInvitationsModal(InviteTypes.VIRTUALCAREPROVIDER.type)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{userRole === UserRoles.ADMIN && (\n\t\t\t\t\t\t\t
    \n\t\t\t\t this.onChange(pageSize, pageIndex)}\n\t\t\t\t/>\n\t\t\t\t this.handleDeleteMember()}\n\t\t\t\t\tonModalClose={() => this.setState({ isDeleteModalOpen: false })}>\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    Warning

    \n\t\t\t\t\t\t

    Are you sure you want to delete this member? This member will be removed from all health systems and devices associated with them.

    \n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t this.sendNewLink()}\n\t\t\t\t\tonModalClose={() => this.toggleAccountRecoveryModal()}>\n\t\t\t\t\t
    \n\t\t\t\t\t\t{this.state.accountRecoveryMailFailed && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t

    Error

    \n\t\t\t\t\t\t\t\t

    Sending the recovery link failed.

    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{this.state.accountRecoveryMailSent && !this.state.accountRecoveryMailFailed && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t

    Info

    \n\t\t\t\t\t\t\t\t

    A recovery link was already sent. Would you like to send another?

    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!this.state.accountRecoveryMailSent && !this.state.accountRecoveryMailFailed && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t

    Account recovery

    \n\t\t\t\t\t\t\t\t

    Reset password link sent successfully.

    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t this.setState({ isEditMemberModalOpen: false, currentMemberId: null, currentMemberObj: null })}\n\t\t\t\t\tonModalSubmit={this.handleSubmitMyForm}\n\t\t\t\t\tisLoading={this.state.healthSystemAddition.loading || this.state.updateNurse.loading}>\n\t\t\t\t\t{this.state.currentMemberObj !== null &&\n\t\t\t\t\t\t(this.isAdmin(this.state.currentMemberObj.roles) ? (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t this.setState({ manageUsersSelectedTab: index })}\n\t\t\t\t\t\t\t\tcomponents={[\n\t\t\t\t\t\t\t\t\t,\n\t\t\t\t\t\t\t\t\tthis.isVirtualCarer(this.state.currentMemberObj.roles) ? (\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t))}\n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t}\n}\n\nUsersList.contextType = SocketContext;\nexport default UsersList;\n","import React, { Component } from 'react';\nimport { Form, Formik, Field } from 'formik';\nimport * as Yup from 'yup';\nimport Input from 'components/Common/FormElements/Input';\nimport { createNurseInvite, checkIfCompanyMemberExists } from 'api/users';\n\nimport { If, Then, Else } from 'react-if';\nimport Select from 'components/Common/FormElements/Select';\nimport Alert from 'components/Alert';\n\nclass InviteSuperUsers extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.state = {\n\t\t\textraFields: 0,\n\t\t};\n\t}\n\n\taddExtraInputField = () => {\n\t\tconst updatedExtraFields = this.state.extraFields + 1;\n\t\tthis.setState({ extraFields: updatedExtraFields });\n\t};\n\n\tdisplayExtraFields = () => {\n\t\tconst table = [];\n\t\tfor (let i = 0; i < this.state.extraFields; i++) {\n\t\t\ttable.push();\n\t\t}\n\t\treturn table;\n\t};\n\n\tcheckEmail = async val => {\n\t\tif (!val) {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet response = false;\n\t\tconst schema = Yup.string()\n\t\t\t.email()\n\t\t\t.required();\n\t\tif (await schema.isValid(val)) {\n\t\t\ttry {\n\t\t\t\tawait checkIfCompanyMemberExists(val)\n\t\t\t\t\t.then(() => (response = false))\n\t\t\t\t\t.catch(() => (response = true));\n\t\t\t} catch (error) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn response;\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t
    \n\t\t\t\t {\n\t\t\t\t\t\tthis.props.onLoading();\n\t\t\t\t\t\tconst emailObjs = [];\n\t\t\t\t\t\tObject.keys(values).forEach(key => {\n\t\t\t\t\t\t\tif (key !== 'healthSystem' && values[key] !== '') emailObjs.push(values[key]);\n\t\t\t\t\t\t});\n\t\t\t\t\t\tconst healthSystem = this.props.healthSystems.find(hs => hs.id === values.healthSystem);\n\t\t\t\t\t\tcreateNurseInvite(emailObjs, this.props.inviteTypeId, [{ value: healthSystem.id, label: healthSystem.value }]).then(() => {\n\t\t\t\t\t\t\tthis.props.onSuccess();\n\t\t\t\t\t\t\tresetForm({\n\t\t\t\t\t\t\t\thealthSystem: '',\n\t\t\t\t\t\t\t\temail: '',\n\t\t\t\t\t\t\t\temail0: '',\n\t\t\t\t\t\t\t\temail1: '',\n\t\t\t\t\t\t\t\temail2: '',\n\t\t\t\t\t\t\t\temail3: '',\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t}}\n\t\t\t\t\tvalidationSchema={Yup.object().shape({\n\t\t\t\t\t\temail: Yup.string()\n\t\t\t\t\t\t\t.required('Email is required!')\n\t\t\t\t\t\t\t.email('Invalid email!')\n\t\t\t\t\t\t\t.test('existing-email', 'This user already exists!', val => this.checkEmail(val)),\n\t\t\t\t\t\temail0: Yup.string()\n\t\t\t\t\t\t\t.email('Invalid email!')\n\t\t\t\t\t\t\t.test('existing-email', 'This user already exists!', val1 => this.checkEmail(val1)),\n\t\t\t\t\t\temail1: Yup.string()\n\t\t\t\t\t\t\t.email('Invalid email!')\n\t\t\t\t\t\t\t.test('existing-email', 'This user already exists!', val => this.checkEmail(val)),\n\t\t\t\t\t\temail2: Yup.string()\n\t\t\t\t\t\t\t.email('Invalid email!')\n\t\t\t\t\t\t\t.test('existing-email', 'This user already exists!', val => this.checkEmail(val)),\n\t\t\t\t\t\temail3: Yup.string()\n\t\t\t\t\t\t\t.email('Invalid email!')\n\t\t\t\t\t\t\t.test('existing-email', 'This user already exists!', val => this.checkEmail(val)),\n\t\t\t\t\t\thealthSystem: Yup.string().required('Health system is required!'),\n\t\t\t\t\t})}>\n\t\t\t\t\t{formikProps => {\n\t\t\t\t\t\t// bind the submission handler remotely\n\t\t\t\t\t\tthis.props.bindSubmitForm(formikProps.submitForm);\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t

    Add Super User

    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{this.displayExtraFields()}\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tYou can only invite a maximum of 5 people at once!\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t this.addExtraInputField()}\n\t\t\t\t\t\t\t\t\t\t\t\tdata-tooltip={'Add New Field'}\n\t\t\t\t\t\t\t\t\t\t\t\tdata-position='right'>\n\t\t\t\t\t\t\t\t\t\t\t\tadd_box\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t);\n\t\t\t\t\t}}\n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default InviteSuperUsers;\n","import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { actionCreators as mainLayoutActionCreators } from 'state/mainLayout/actions';\nimport { actionCreators as organizationActionCreators } from 'state/organization/actions';\n\nimport { Grid, Tabs, Modal } from 'components';\nimport InviteAdmins from 'components/UserManagement/InviteAdmins';\nimport Layout from 'components/Common/Layout';\nimport Header from 'components/Common/Header';\nimport InviteNurses from 'components/UserManagement/InviteNurses';\nimport InvitedUsersList from 'components/UserManagement/Lists/InvitedUsersList';\nimport UsersList from 'components/UserManagement/Lists/UsersList';\n\nimport { getHealthSystems } from 'api/users';\nimport { InviteTypes } from 'constants/enums';\nimport InviteSuperUsers from 'components/UserManagement/InviteSuperUsers';\n\nclass Users extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.state = {\n\t\t\thealthSystems: [],\n\t\t\tisSendInvitationsModalOpen: false,\n\t\t\tinviteTypeId: 0,\n\t\t\tsendInvitations: {\n\t\t\t\tloading: false,\n\t\t\t\tloaded: false,\n\t\t\t\terror: false,\n\t\t\t},\n\t\t};\n\t}\n\n\tasync componentDidMount() {\n\t\tlet healthSystems = (await getHealthSystems()).map(hs => {\n\t\t\treturn { id: hs.id, value: hs.name };\n\t\t});\n\n\t\tthis.setState({ healthSystems: healthSystems });\n\t}\n\n\tsubmitMyForm = null;\n\n\thandleSubmitMyForm = e => {\n\t\tif (this.submitMyForm) {\n\t\t\tthis.submitMyForm(e);\n\t\t}\n\t};\n\n\tbindSubmitForm = submitForm => {\n\t\tthis.submitMyForm = submitForm;\n\t};\n\n\tonSuccess = () => {\n\t\tthis.setState({\n\t\t\tsendInvitations: {\n\t\t\t\t...this.state.sendInvitations,\n\t\t\t\tloading: false,\n\t\t\t\tloaded: true,\n\t\t\t},\n\t\t});\n\t};\n\n\tonCloseAlert = () => {\n\t\tthis.setState({\n\t\t\tsendInvitations: {\n\t\t\t\t...this.state.sendInvitations,\n\t\t\t\tloading: false,\n\t\t\t\tloaded: false,\n\t\t\t\terror: false,\n\t\t\t},\n\t\t});\n\t};\n\n\tonLoading = () => {\n\t\tthis.setState({\n\t\t\tsendInvitations: {\n\t\t\t\t...this.state.sendInvitations,\n\t\t\t\tloading: true,\n\t\t\t},\n\t\t});\n\t};\n\n\tonModalClose = () => {\n\t\tthis.setState({\n\t\t\tisSendInvitationsModalOpen: !this.state.isSendInvitationsModalOpen,\n\t\t\tinviteTypeId: 0,\n\t\t\tsendInvitations: {\n\t\t\t\t...this.state.sendInvitations,\n\t\t\t\tloaded: false,\n\t\t\t\terror: false,\n\t\t\t},\n\t\t});\n\t};\n\n\ttoggleSendInvitationsModal = type => {\n\t\tthis.setState({\n\t\t\tisSendInvitationsModalOpen: !this.state.isSendInvitationsModalOpen,\n\t\t\tinviteTypeId: type,\n\t\t});\n\t};\n\n\tdisplayInviteForm = () => {\n\t\tif (this.state.inviteTypeId === InviteTypes.ADMIN.type) {\n\t\t\treturn (\n\t\t\t\t\n\t\t\t);\n\t\t}\n\n\t\tif (this.state.inviteTypeId === InviteTypes.SUPERUSER.type) {\n\t\t\treturn (\n\t\t\t\t\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t);\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t\n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t

    User Management

    \n\t\t\t\t\t\t\t\t\t,\n\t\t\t\t\t\t\t\t\t\t\t,\n\t\t\t\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t
    \n\n\t\t\t\t\n\t\t\t\t\t{this.state.healthSystems.length !== 0 && this.state.inviteTypeId !== 0 && this.displayInviteForm()}\n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t}\n}\n\nconst mapStateToProps = state => {\n\treturn {\n\t\tmainLayout: state.mainLayout,\n\t\torganization: state.organization,\n\t};\n};\n\nconst mapDispatchToProps = dispatch => {\n\treturn {\n\t\tmainLayoutActions: bindActionCreators(mainLayoutActionCreators, dispatch),\n\t\torganizationActions: bindActionCreators(organizationActionCreators, dispatch),\n\t};\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(Users);\n\nexport { Users }; // Exported for unit tests only\n","import React, { Component } from 'react';\nimport Grid from 'components/Grid';\nimport Form from 'components/Form';\nimport Input from 'components/Input';\nimport Button from 'components/Button';\nimport { Redirect } from 'react-router-dom';\nimport { getUserRole } from 'infrastructure/auth';\nimport { UserRoles } from 'constants/enums';\nimport { isAuthenticated, memberExists } from '../infrastructure/auth';\n\nclass Login extends Component {\n\trender() {\n\t\tif (isAuthenticated() && memberExists) {\n\t\t\tif (getUserRole() === UserRoles.VIRTUALSITTER) return ;\n\t\t\treturn ;\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\tlogo\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tForgot password?\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default Login;\n","import React, { Component } from 'react';\nimport { If, Then, Else } from 'react-if';\n\nimport { Grid, Form, Input, Button } from 'components';\nimport { withRouter } from 'react-router-dom';\nimport { connect } from 'react-redux';\nimport { actionCreators } from 'state/organization/actions';\nimport { bindActionCreators } from 'redux';\nimport { createHealthSystem } from 'api/healthSystems';\nimport { treeSectorNameMaxCharacters } from 'constants/global-variables';\n\nclass CreateHealthSystem extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\thealthSystemName: '',\n\t\t\thealthSystemNameError: '',\n\t\t\thealthSystemRegions: [],\n\t\t\tregionNames: [''],\n\t\t\tisHealthSystemCreated: false,\n\t\t\tisLoading: false,\n\t\t\tregionError: '',\n\t\t};\n\t}\n\n\taddNewRegion = () => {\n\t\tlet newRegionNames = [...this.state.regionNames];\n\t\tnewRegionNames.push('');\n\t\tthis.setState({\n\t\t\tregionNames: newRegionNames,\n\t\t});\n\t};\n\n\tdeleteRegion = index => {\n\t\tlet healthSystemRegions = [...this.state.healthSystemRegions];\n\t\tlet regionNames = [...this.state.regionNames];\n\t\tregionNames[index] = '';\n\t\thealthSystemRegions.splice(index, 1);\n\n\t\tif (this.state.regionNames.length > 1) {\n\t\t\tregionNames.splice(index, 1);\n\t\t}\n\t\tthis.setState({\n\t\t\thealthSystemRegions: healthSystemRegions,\n\t\t\tregionNames: regionNames,\n\t\t\tregionError: '',\n\t\t});\n\t};\n\n\tsetRegions = event => {\n\t\tlet healthSystemRegions = [...this.state.healthSystemRegions];\n\t\tlet regionNames = [...this.state.regionNames];\n\n\t\thealthSystemRegions[event.target.name] = event.target.value;\n\t\tregionNames[event.target.name] = event.target.value;\n\n\t\tthis.setState({\n\t\t\thealthSystemRegions: healthSystemRegions,\n\t\t\tregionNames: regionNames,\n\t\t});\n\t};\n\n\tsetHealthSystemName = event => {\n\t\tthis.setState({\n\t\t\thealthSystemName: event.target.value,\n\t\t});\n\t};\n\n\tgetHealthSystemRegions = () => this.state.healthSystemRegions.map(value => ({ name: value }));\n\n\tcheckIfHealthSystemExists = hsName => this.props.allHealthSystems.some(healthSystem => healthSystem.name.toLowerCase() === hsName.toLowerCase());\n\n\thasDuplicate = () => this.state.healthSystemRegions.length !== new Set(this.state.healthSystemRegions).size;\n\n\thasRegionsValidLength = () => this.state.healthSystemRegions.every(region => region.length <= treeSectorNameMaxCharacters);\n\n\tcreateHealthSystem = async event => {\n\t\tevent.preventDefault();\n\t\tif (this.checkIfHealthSystemExists(this.state.healthSystemName)) {\n\t\t\tthis.setState({\n\t\t\t\thealthSystemNameError: 'Health system with this name already exists',\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.state.healthSystemName.length > treeSectorNameMaxCharacters) {\n\t\t\tthis.setState({\n\t\t\t\thealthSystemNameError: `Name can't be longer than ${treeSectorNameMaxCharacters} characters`,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.hasDuplicate()) {\n\t\t\tthis.setState({\n\t\t\t\tregionError: `Location(s) name can't be duplicated`,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this.hasRegionsValidLength()) {\n\t\t\tthis.setState({\n\t\t\t\tregionError: `Location(s) name can't be longer than ${treeSectorNameMaxCharacters} characters`,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tthis.setState({\n\t\t\tisLoading: true,\n\t\t});\n\t\tconst healthSystemRegions = this.getHealthSystemRegions();\n\t\tawait createHealthSystem(this.state.healthSystemName, healthSystemRegions);\n\t\tthis.setState({\n\t\t\tisHealthSystemCreated: true,\n\t\t\thealthSystemNameError: '',\n\t\t\tisLoading: false,\n\t\t});\n\t};\n\n\thandleCancelClick = () => {\n\t\tthis.props.history.push('/');\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t
    this.createHealthSystem(event)}>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t

    Add locations for this health system

    \n\t\t\t\t\t\t\t{this.state.regionNames.map((item, index) => (\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t this.deleteRegion(index)}>\n\t\t\t\t\t\t\t\t\t\tdelete\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t

    {this.state.regionError}

    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    \n\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\tdone\n\t\t\t\t\t\t\n\t\t\t\t\t\t

    Your health system profile has been created successfully.

    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default connect(\n\tstate => state.organization,\n\tdispatch => bindActionCreators(actionCreators, dispatch)\n)(withRouter(CreateHealthSystem));\n","import React from 'react';\nimport Grid from 'components/Grid';\nimport { getUserProfile } from 'infrastructure/auth';\nimport { decodeHtml } from 'infrastructure/helpers/commonHelpers';\nimport { Avatar } from 'components';\n\nfunction signOut() {\n\twindow.location.href = '/logout';\n}\n\nconst LogOutUser = props => (\n\t\n\t\t
    \n\t\t\t

    You are currently logged in as:

    \n\t\t\t
    \n\t\t\t\t\n\t\t\t\t

    {decodeHtml(getUserProfile().firstName + ' ' + getUserProfile().lastName)}

    \n\t\t\t
    \n\t\t\t

    Please log out from this account and go back to your email to accept this invitation.

    \n\t\t\t\n\t\t\t\t{' '}\n\t\t\t\tLog out here\n\t\t\t\n\t\t
    \n\t
    \n);\n\nexport default LogOutUser;\n","import React, { Component } from 'react';\nimport * as Yup from 'yup';\nimport { Form, Formik, Field } from 'formik';\nimport queryString from 'query-string';\n\nimport { Grid, Button, Loader } from 'components';\nimport Input from 'components/Common/FormElements/Input';\nimport { Redirect } from 'react-router-dom';\nimport { registerUser, getInvite, checkUserAccount, acceptInvite, sendPasswordRecoveredEmail } from 'api/users';\nimport { OrganizationErrorCodes, GeneralErrorCodes, ChangePasswordUseCases } from 'constants/enums';\nimport { isAuthenticated, getUserProfile } from 'infrastructure/auth';\nimport { passwordRegEx } from 'constants/global-variables';\nimport LogOutUser from './LogOutUser';\n\nclass CompleteProfile extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.state = {\n\t\t\tinviteId: 0,\n\t\t\temail: '',\n\t\t\tinviteValidation: {\n\t\t\t\tloading: false,\n\t\t\t\tsuccessResponse: {},\n\t\t\t\terror: null,\n\t\t\t},\n\t\t\tsubmitUserRegistration: {\n\t\t\t\tloading: false,\n\t\t\t\terror: false,\n\t\t\t\tsuccess: false,\n\t\t\t},\n\t\t};\n\t}\n\n\tasync componentDidMount() {\n\t\tconst params = queryString.parse(window.location.search);\n\t\tconst inviteId = params.id;\n\t\tconst email = params.e;\n\t\tconst companyId = params.cid;\n\t\tconst code = params.code ? params.code : '';\n\n\t\tthis.setState({\n\t\t\tinviteId,\n\t\t\temail,\n\t\t\tcompanyId,\n\t\t\tcode,\n\t\t\tinviteValidation: {\n\t\t\t\t...this.state.inviteValidation,\n\t\t\t\tloading: true,\n\t\t\t},\n\t\t});\n\n\t\tif (!isAuthenticated()) {\n\t\t\tgetInvite(inviteId, email)\n\t\t\t\t.then(async response => {\n\t\t\t\t\tconst accountResponse = await checkUserAccount(email);\n\t\t\t\t\tif (accountResponse.exists) {\n\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\tinviteValidation: {\n\t\t\t\t\t\t\t\t...this.state.inviteValidation,\n\t\t\t\t\t\t\t\tloading: false,\n\t\t\t\t\t\t\t\taccountExists: true,\n\t\t\t\t\t\t\t\texistingUser: accountResponse.user,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\tinviteValidation: {\n\t\t\t\t\t\t\t\t...this.state.inviteValidation,\n\t\t\t\t\t\t\t\tloading: false,\n\t\t\t\t\t\t\t\taccountExists: false,\n\t\t\t\t\t\t\t\tresponse: response,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.catch(error => {\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tinviteValidation: {\n\t\t\t\t\t\t\t...this.state.inviteValidation,\n\t\t\t\t\t\t\terror: error.code,\n\t\t\t\t\t\t\terrorMessage: error.message,\n\t\t\t\t\t\t\tloading: false,\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t}\n\t}\n\n\tasync submitForm(values) {\n\t\tthis.setState({\n\t\t\tsubmitUserRegistration: {\n\t\t\t\t...this.state.submitUserRegistration,\n\t\t\t\tloading: true,\n\t\t\t},\n\t\t});\n\n\t\tif (!this.state.inviteValidation.accountExists) {\n\t\t\tregisterUser(values, this.state.inviteId, this.state.companyId)\n\t\t\t\t.then(() => {\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tsubmitUserRegistration: {\n\t\t\t\t\t\t\t...this.state.submitUserRegistration,\n\t\t\t\t\t\t\tloading: false,\n\t\t\t\t\t\t\tsuccess: true,\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t})\n\t\t\t\t.catch(() => {\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tsubmitUserRegistration: {\n\t\t\t\t\t\t\t...this.state.submitUserRegistration,\n\t\t\t\t\t\t\tloading: false,\n\t\t\t\t\t\t\terror: true,\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t} else {\n\t\t\tawait Promise.all([acceptInvite(this.state.inviteId, this.state.email), sendPasswordRecoveredEmail(this.state.email, values.password, this.state.code)]);\n\n\t\t\tthis.setState({\n\t\t\t\tsubmitUserRegistration: {\n\t\t\t\t\t...this.state.submitUserRegistration,\n\t\t\t\t\tloading: false,\n\t\t\t\t\tsuccess: true,\n\t\t\t\t},\n\t\t\t});\n\t\t}\n\t}\n\n\tgetAppropriateErrorMessage(error) {\n\t\tswitch (error) {\n\t\t\tcase GeneralErrorCodes.BadRequest: {\n\t\t\t\treturn (\n\t\t\t\t\t

    This is not a valid invitation. Go back to your email and make sure that the link you have clicked is valid, or contact your administrator.

    \n\t\t\t\t);\n\t\t\t}\n\t\t\tcase OrganizationErrorCodes.InviteCancelled: {\n\t\t\t\treturn

    This invitation has been cancelled by the system's administrator. Ask the administrator to reinvite you.

    ;\n\t\t\t}\n\t\t\tcase OrganizationErrorCodes.InviteAlreadyAccepted: {\n\t\t\t\treturn

    This invitation has already been accepted.

    ;\n\t\t\t}\n\t\t\tcase OrganizationErrorCodes.InviteExpired: {\n\t\t\t\treturn

    This invitation has expired. Ask the system's administrator to invite you again.

    ;\n\t\t\t}\n\t\t}\n\t}\n\n\trender() {\n\t\tif (isAuthenticated() && this.state.email === getUserProfile().email) {\n\t\t\treturn ;\n\t\t}\n\n\t\tif (isAuthenticated()) {\n\t\t\treturn ;\n\t\t}\n\n\t\tif (this.state.submitUserRegistration.loading) {\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t

    Your account is being created. This may take a few minutes!

    \n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t);\n\t\t}\n\n\t\tif (this.state.inviteValidation.loading) {\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t);\n\t\t}\n\n\t\tif (this.state.submitUserRegistration.success) {\n\t\t\treturn ;\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\tbanyan-logo\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t{this.state.inviteValidation.error && (\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\twarning\n\t\t\t\t\t\t\t\t

    {this.state.inviteValidation.errorMessage}

    \n\t\t\t\t\t\t\t\t{this.getAppropriateErrorMessage(this.state.inviteValidation.error)}\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!this.state.inviteValidation.error && !this.state.inviteValidation.loading && (\n\t\t\t\t\t\t\t this.submitForm(values)}\n\t\t\t\t\t\t\t\tvalidationSchema={Yup.object().shape({\n\t\t\t\t\t\t\t\t\tfirstName: Yup.string().required('First name is required'),\n\t\t\t\t\t\t\t\t\tlastName: Yup.string().required('Last name is required'),\n\t\t\t\t\t\t\t\t\temail: Yup.string()\n\t\t\t\t\t\t\t\t\t\t.email()\n\t\t\t\t\t\t\t\t\t\t.required('Email is required'),\n\t\t\t\t\t\t\t\t\tpassword: Yup.string()\n\t\t\t\t\t\t\t\t\t\t.required('Password is required')\n\t\t\t\t\t\t\t\t\t\t.min(8, 'At least 8 characters!')\n\t\t\t\t\t\t\t\t\t\t.max(64, 'No more than 64 characters!')\n\t\t\t\t\t\t\t\t\t\t.matches(passwordRegEx, ChangePasswordUseCases.strongPasswordCheck),\n\t\t\t\t\t\t\t\t\tpasswordConfirm: Yup.string()\n\t\t\t\t\t\t\t\t\t\t.required('Password confirmation is required')\n\t\t\t\t\t\t\t\t\t\t.oneOf([Yup.ref('password')], 'Must match password')\n\t\t\t\t\t\t\t\t\t\t.matches(passwordRegEx, ChangePasswordUseCases.strongPasswordCheck),\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\trender={() => (\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default CompleteProfile;\n","import React from 'react';\n\nconst Help = () => (\n\t
    \n\t\t
    \n\t\t\tBanyan logo\n\t\t
    \n\t\t
    \n\t\t\t
    \n\t\t\t\ticon\n\t\t\t\t

    24/7 Support

    \n\t\t\t\t

    If you're encountering any issues, please contact us on the live chat or via email at support@solaborate.com

    \n\t\t\t
    \n\t\t
    \n\t
    \n);\n\nexport default Help;\n","import React, { Component } from 'react';\nimport * as Yup from 'yup';\nimport { Form, Formik, Field } from 'formik';\nimport queryString from 'query-string';\n\nimport Grid from 'components/Grid';\nimport Input from 'components/Common/FormElements/Input';\nimport Button from 'components/Button';\nimport Loader from 'components/Loader';\nimport { sendOrganizationPasswordRecoveryEmail } from 'api/users';\n\nclass Recover extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tloading: false,\n\t\t\tloaded: false,\n\t\t\terror: false,\n\t\t};\n\t}\n\n\tsubmitForm(values) {\n\t\tthis.setState({ loading: true });\n\t\tsendOrganizationPasswordRecoveryEmail(values.email)\n\t\t\t.then(response => {\n\t\t\t\tthis.setState({\n\t\t\t\t\tloading: false,\n\t\t\t\t\tloaded: true,\n\t\t\t\t});\n\t\t\t})\n\t\t\t.catch(error => {\n\t\t\t\tthis.setState({\n\t\t\t\t\tloading: false,\n\t\t\t\t\terror: true,\n\t\t\t\t});\n\t\t\t});\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\tbanyan-logo\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t{this.state.loading && !this.state.loaded && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{this.state.loaded && !this.state.loading && (\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\terror_outline\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tA message with link to reset your password was sent to your email account. Please go to your email account to reset your password.\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tIf you don't receive instructions within a minute or two, check your spam and junk filters, or try\n\t\t\t\t\t\t\t\t\t\t this.setState({ loaded: false })}>\n\t\t\t\t\t\t\t\t\t\t\t{' '}\n\t\t\t\t\t\t\t\t\t\t\tresending your request\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!this.state.loaded && !this.state.loading && (\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\terror_outline\n\t\t\t\t\t\t\t\t\tPlease enter the email address you used to create your Banyan account, and we will send you a link to reset your password.\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t this.submitForm(values)}\n\t\t\t\t\t\t\t\t\t\tvalidationSchema={Yup.object().shape({\n\t\t\t\t\t\t\t\t\t\t\temail: Yup.string()\n\t\t\t\t\t\t\t\t\t\t\t\t.email()\n\t\t\t\t\t\t\t\t\t\t\t\t.required('Email is required'),\n\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t\trender={() => (\n\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t)}\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default Recover;\n","import React, { Component } from 'react';\nimport * as Yup from 'yup';\nimport { Form, Formik, Field } from 'formik';\nimport queryString from 'query-string';\n\nimport Grid from 'components/Grid';\nimport Input from 'components/Common/FormElements/Input';\nimport Button from 'components/Button';\nimport Loader from 'components/Loader';\nimport { sendPasswordRecoveredEmail } from 'api/users';\nimport { Link } from 'react-router-dom';\nimport { passwordRegEx } from 'constants/global-variables';\nimport { ChangePasswordUseCases } from 'constants/enums';\n\nclass ResetPassword extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.state = {\n\t\t\tloading: false,\n\t\t\tloaded: false,\n\t\t\terror: false,\n\t\t\temail: '',\n\t\t\tc: '',\n\t\t};\n\t}\n\n\tcomponentDidMount() {\n\t\tconst params = queryString.parse(window.location.search);\n\t\tthis.setState({\n\t\t\tc: params.c,\n\t\t\te: params.e,\n\t\t});\n\t}\n\n\tsubmitForm(values) {\n\t\tthis.setState({ loading: true });\n\t\tsendPasswordRecoveredEmail(this.state.e, values.password, this.state.c)\n\t\t\t.then(() => {\n\t\t\t\tthis.setState({\n\t\t\t\t\tloading: false,\n\t\t\t\t\tloaded: true,\n\t\t\t\t});\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\tthis.setState({\n\t\t\t\t\tloading: false,\n\t\t\t\t\terror: true,\n\t\t\t\t});\n\t\t\t});\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\tbanyan-logo\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t{this.state.loading && !this.state.loaded && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{this.state.loaded && !this.state.loading && (\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\terror_outline\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tYour Banyan password was successfully changed. Please login again using your new password\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tClick here to go to login page\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!this.state.loaded && !this.state.loading && (\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\terror_outline\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tTo verify your new password, please enter it once in each field below. Password are case-sensitive and must be at least 8 characters long. A\n\t\t\t\t\t\t\t\t\t\tgood password should contain a mix of capital and lower-case letters, numbers and symbols.\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t this.submitForm(values)}\n\t\t\t\t\t\t\t\t\t\tvalidationSchema={Yup.object().shape({\n\t\t\t\t\t\t\t\t\t\t\tpassword: Yup.string()\n\t\t\t\t\t\t\t\t\t\t\t\t.required('Password is required')\n\t\t\t\t\t\t\t\t\t\t\t\t.min(8, 'At least 8 characters!')\n\t\t\t\t\t\t\t\t\t\t\t\t.max(64, 'No more than 64 characters!')\n\t\t\t\t\t\t\t\t\t\t\t\t.matches(passwordRegEx, ChangePasswordUseCases.strongPasswordCheck),\n\t\t\t\t\t\t\t\t\t\t\tpasswordConfirm: Yup.string()\n\t\t\t\t\t\t\t\t\t\t\t\t.required('Password confirmation is required')\n\t\t\t\t\t\t\t\t\t\t\t\t.oneOf([Yup.ref('password')], 'Must match password')\n\t\t\t\t\t\t\t\t\t\t\t\t.matches(passwordRegEx, ChangePasswordUseCases.strongPasswordCheck),\n\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t\trender={() => (\n\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t)}\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default ResetPassword;\n","import { gatewayApi, APP_CONFIG } from 'constants/global-variables';\n\nexport function getUserIdleConfigurations({ pageSize = 10, pageIndex = 0, healthSystemId = null, roleId = null }) {\n\treturn new Promise((res, rej) => {\n\t\tconst { companyId } = APP_CONFIG;\n\t\tgatewayApi\n\t\t\t.get(`v1/healthcare/organizations/${companyId}/configurations/user-idle`, {\n\t\t\t\tparams: {\n\t\t\t\t\tpageSize,\n\t\t\t\t\tpageIndex,\n\t\t\t\t\thealthSystemId,\n\t\t\t\t\troleId,\n\t\t\t\t},\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function addUserIdleConfiguration(healthSystemIds, roleId, timeoutMinutes) {\n\treturn new Promise((res, rej) => {\n\t\tconst { companyId } = APP_CONFIG;\n\t\tconst config = {\n\t\t\thealthSystemIds,\n\t\t\troleId,\n\t\t\ttimeoutMinutes,\n\t\t};\n\t\tgatewayApi\n\t\t\t.post(`v1/healthcare/organizations/${companyId}/configurations/user-idle`, config)\n\t\t\t.then(respnse => {\n\t\t\t\tres(respnse.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getUserIdleConfigurationHistory({ id, pageSize = 10, pageIndex = 0 }) {\n\treturn new Promise((res, rej) => {\n\t\tconst { companyId } = APP_CONFIG;\n\t\tgatewayApi\n\t\t\t.get(`v1/healthcare/organizations/${companyId}/configurations/user-idle/${id}/history`, {\n\t\t\t\tparams: {\n\t\t\t\t\tpageSize,\n\t\t\t\t\tpageIndex,\n\t\t\t\t},\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getUserIdleConfigurationMinutes(healthSystemId, roleId) {\n\treturn new Promise((res, rej) => {\n\t\tconst { companyId } = APP_CONFIG;\n\t\tgatewayApi\n\t\t\t.get(`/v1/healthcare/organizations/${companyId}/health-systems/${healthSystemId}/configurations/user-idle/minutes?roleId=${roleId}`)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getHealthSystemHospitals(healthSystemId) {\n\treturn new Promise((res, rej) => {\n\t\tconst { companyId } = APP_CONFIG;\n\t\tgatewayApi\n\t\t\t.get(`v1/organizations/${companyId}/healthsystems/${healthSystemId}/hospitals`)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getTeamConfigurations(params) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`v1/healthcare/organizations/${APP_CONFIG.companyId}/configurations/tv-device`, {\n\t\t\t\tparams,\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function addDeviceConfiguration(teamId, data) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.post(`v1/healthcare/organizations/${APP_CONFIG.companyId}/team/${teamId}/configurations/tv-device`, data)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getDeviceConfigurationHistory(teamId, params) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`v1/healthcare/organizations/${APP_CONFIG.companyId}/team/${teamId}/configurations/tv-device/history`, {\n\t\t\t\tparams,\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function deleteTVDeviceConfiguration(teamId, id) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.delete(`/v1/healthcare/organizations/${APP_CONFIG.companyId}/team/${teamId}/configurations/tv-device/${id}`)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getUserIdleConfigurationHealthSystems() {\n\treturn new Promise((res, rej) => {\n\t\tconst { companyId } = APP_CONFIG;\n\t\tgatewayApi\n\t\t\t.get(`/v1/healthcare/organizations/${companyId}/health-systems/configurations/user-idle`, {\n\t\t\t\tparams: {\n\t\t\t\t\tcompanyId,\n\t\t\t\t},\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n","import React from 'react';\nimport { Field, Formik } from 'formik';\nimport * as Yup from 'yup';\nimport Input from 'components/Common/FormElements/Input';\nimport Select from 'components/Common/FormElements/Select';\nimport { Form, Modal, Alert } from 'components';\nimport { addUserIdleConfiguration } from 'api/userIdleConfigurations';\n\nexport default class UserIdleForm extends React.Component {\n\tstate = {\n\t\tisSuccessfulAlertOn: false,\n\t\tisErrorsAlertOn: false,\n\t};\n\n\thandleSubmitMyForm = async (values, { resetForm, setSubmitting }) => {\n\t\tsetSubmitting(true);\n\t\ttry {\n\t\t\tconst healthSystemIds = values.healthSystem === '0' ? this.props.healthSystems.filter(x => x.id !== '0').map(x => x.id) : [values.healthSystem];\n\t\t\tconst roleId = values.role === '0' ? null : parseInt(values.role, 10);\n\t\t\tconst { minutes } = values;\n\n\t\t\tconst res = await addUserIdleConfiguration(healthSystemIds, roleId, minutes);\n\n\t\t\tif (res.hasSucceeded) {\n\t\t\t\tthis.setState({\n\t\t\t\t\tisSuccessfulAlertOn: true,\n\t\t\t\t});\n\t\t\t\tthis.props.onSucceeded();\n\n\t\t\t\tif (!this.props.initialValues) {\n\t\t\t\t\tresetForm();\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tthis.setState({\n\t\t\t\tisErrorsAlertOn: true,\n\t\t\t});\n\t\t}\n\t\tsetSubmitting(false);\n\t};\n\n\tonCloseModal = () => {\n\t\tthis.setState({\n\t\t\tisSuccessfulAlertOn: false,\n\t\t\tisErrorsAlertOn: false,\n\t\t});\n\t\tthis.props.toggleModal();\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t x.id === this.props.initialValues.healthSystem) ? this.props.initialValues.healthSystem : '',\n\t\t\t\t\t\t\t\trole: this.props.initialValues.role,\n\t\t\t\t\t\t\t\tminutes: this.props.initialValues.minutes,\n\t\t\t\t\t\t }\n\t\t\t\t\t\t: { healthSystem: this.props.isSuperUser ? this.props.healthSystems[0].id : '', role: '', minutes: '' }\n\t\t\t\t}\n\t\t\t\tvalidationSchema={Yup.object().shape({\n\t\t\t\t\thealthSystem: Yup.string().required('Health system is required'),\n\t\t\t\t\trole: Yup.string().required('Role is required'),\n\t\t\t\t\tminutes: Yup.number()\n\t\t\t\t\t\t.positive('Minutes must be greater than 0')\n\t\t\t\t\t\t.max(480)\n\t\t\t\t\t\t.required('Minutes are required'),\n\t\t\t\t})}\n\t\t\t\tonSubmit={this.handleSubmitMyForm}>\n\t\t\t\t{props => {\n\t\t\t\t\tconst { handleSubmit, isSubmitting } = props;\n\t\t\t\t\treturn (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t

    User needs to sign in again after a period of inactivity

    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t this.setState({ isSuccessfulAlertOn: false })}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t this.setState({ isErrorsAlertOn: false })}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t);\n\t\t\t\t}}\n\t\t\t\n\t\t);\n\t}\n}\n","import React from 'react';\nimport { Table, Grid, Button } from 'components';\nimport Select from 'react-select';\nimport { getUserIdleConfigurations, getUserIdleConfigurationHealthSystems } from 'api/userIdleConfigurations';\nimport moment from 'moment';\nimport { utcToLocalTime } from 'infrastructure/helpers/dateHelper';\nimport Pagination from 'components/Common/Pagination';\nimport { Link } from 'react-router-dom';\nimport { getUserRole } from 'infrastructure/auth';\nimport { ConfigHistoryTypes, Roles, UserRoles } from 'constants/enums';\nimport UserIdleForm from './UserIdleForm';\n\nexport default class UserIdleTimeout extends React.Component {\n\tstate = {\n\t\tisLoading: true,\n\t\tisModalOpen: false,\n\t\tuserIdleConfigurations: [],\n\t\ttotalUserIdleConfigs: 0,\n\t\teditConfig: null,\n\t};\n\n\ttransformTypes = {\n\t\tWithValues: 1,\n\t\tWithLabels: 2,\n\t};\n\n\tuserIdleHeaders = [\n\t\t{ title: 'Health System' },\n\t\t{ title: 'Role' },\n\t\t{ title: 'Timeout Minutes' },\n\t\t{ title: 'Created by' },\n\t\t{ title: 'Date Created' },\n\t\t{ title: '' },\n\t];\n\n\trole = null;\n\n\troles = Object.values(Roles);\n\n\tcomponentDidMount = () => {\n\t\tthis.role = getUserRole();\n\t\tthis.getConfigurations();\n\t};\n\n\tcomponentDidUpdate = prevProps => {\n\t\tif (\n\t\t\tthis.props.pageIndex !== prevProps.pageIndex ||\n\t\t\tthis.props.selectedHealthSystem !== prevProps.selectedHealthSystem ||\n\t\t\tthis.props.selectedRole !== prevProps.selectedRole\n\t\t) {\n\t\t\tthis.getConfigurations();\n\t\t}\n\t};\n\n\tonHealthSystemSelected = selectedHealthSystem => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisLoading: true,\n\t\t\t},\n\t\t\tasync () => {\n\t\t\t\tawait this.props.setSelectedHealthSystem(selectedHealthSystem);\n\t\t\t}\n\t\t);\n\t};\n\n\tonRoleSelected = selectedRole => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisLoading: true,\n\t\t\t},\n\t\t\tasync () => {\n\t\t\t\tawait this.props.setSelectedRole(selectedRole);\n\t\t\t}\n\t\t);\n\t};\n\n\tonPaginationChange = (pageSize, pageIndex) => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisLoading: true,\n\t\t\t},\n\t\t\tasync () => {\n\t\t\t\tawait this.props.onPaginationChange(pageSize, pageIndex);\n\t\t\t}\n\t\t);\n\t};\n\n\tgetConfigurations = async (isSubmitted = false) => {\n\t\tif (this.props.isLoading) {\n\t\t\treturn;\n\t\t}\n\t\tif (isSubmitted) {\n\t\t\tthis.setState({\n\t\t\t\tisLoading: true,\n\t\t\t});\n\t\t}\n\n\t\tconst { userIdleConfigurations, total } = await getUserIdleConfigurations({\n\t\t\tpageSize: this.props.pageSize.value,\n\t\t\tpageIndex: this.props.pageIndex,\n\t\t\thealthSystemId: this.props.selectedHealthSystem.value === '0' ? null : this.props.selectedHealthSystem.value,\n\t\t\troleId: this.props.selectedRole.value === '0' ? null : this.props.selectedRole.value,\n\t\t});\n\n\t\tconst newState = {\n\t\t\tuserIdleConfigurations,\n\t\t\ttotalUserIdleConfigs: total,\n\t\t\tisLoading: false,\n\t\t};\n\n\t\tif (isSubmitted) {\n\t\t\tconst result = await getUserIdleConfigurationHealthSystems();\n\t\t\tnewState.healthSystemsWithConfigs = result.healthSystems;\n\t\t}\n\n\t\tthis.setState(newState);\n\t};\n\n\ttransformArray = (array, type, isHealthSystem = false, propName = 'name') => {\n\t\tif (type === this.transformTypes.WithValues) {\n\t\t\tconst newArray = array.map(item => {\n\t\t\t\treturn { id: item.id, value: item[propName] };\n\t\t\t});\n\t\t\tif (isHealthSystem) {\n\t\t\t\tif (this.role === UserRoles.ADMIN) {\n\t\t\t\t\tnewArray.unshift({ id: '0', value: 'All' });\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnewArray.unshift({ id: '0', value: 'All' });\n\t\t\t}\n\t\t\treturn newArray;\n\t\t}\n\t\tif (type === this.transformTypes.WithLabels) {\n\t\t\tconst newArray = array.map(item => {\n\t\t\t\treturn { value: item.id, label: item[propName] };\n\t\t\t});\n\t\t\tif (isHealthSystem) {\n\t\t\t\tif (this.role === UserRoles.ADMIN) {\n\t\t\t\t\tnewArray.unshift({ value: '0', label: 'All' });\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnewArray.unshift({ value: '0', label: 'All' });\n\t\t\t}\n\t\t\treturn newArray;\n\t\t}\n\t\treturn [];\n\t};\n\n\topenEditModal = config => {\n\t\tthis.setState({\n\t\t\teditConfig: {\n\t\t\t\thealthSystem: config.team.id,\n\t\t\t\trole: config.role.id,\n\t\t\t\tminutes: config.timeoutMinutes,\n\t\t\t},\n\t\t\tisModalOpen: true,\n\t\t});\n\t};\n\n\tgetButtons = config => {\n\t\treturn (\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tlist_alt\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t this.openEditModal(config)}>\n\t\t\t\t\tcreate\n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t};\n\n\ttransformUserIdleConfigurations = () => {\n\t\treturn this.state.userIdleConfigurations.map(item => {\n\t\t\treturn {\n\t\t\t\thealthSystem: item.team.name,\n\t\t\t\trole: item.role.name,\n\t\t\t\ttimeoutMinutes: item.timeoutMinutes,\n\t\t\t\tcreatedBy: `${item.userCreated.firstName} ${item.userCreated.lastName}`,\n\t\t\t\tdateCreated: moment(utcToLocalTime(item.dateCreated)).format('MM/DD/YYYY-hh:mm A'),\n\t\t\t\tedit: this.getButtons(item),\n\t\t\t};\n\t\t});\n\t};\n\n\trender() {\n\t\tconst DropdownIndicator = () => {\n\t\t\treturn arrow_drop_down;\n\t\t};\n\n\t\treturn (\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t this.onHealthSystemSelected(hs)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t this.onRoleSelected(role)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t
    \n\t\t\t\t this.onPaginationChange(pageSize, pageIndex)}\n\t\t\t\t/>\n\t\t\t\t this.setState({ isModalOpen: !this.state.isModalOpen, editConfig: null })}\n\t\t\t\t\tonSucceeded={() => this.getConfigurations(true)}\n\t\t\t\t/>\n\t\t\t
    \n\t\t);\n\t}\n}\n","import { gatewayApi, APP_CONFIG } from 'constants/global-variables';\n\nexport function getTeamConfigurationProfiles({ pageSize = 10, pageIndex = 0, teamId = null, teamTypeId = 4 }) {\n\treturn new Promise((res, rej) => {\n\t\tconst { companyId } = APP_CONFIG;\n\t\tgatewayApi\n\t\t\t.get(`v1/healthcare/organizations/${companyId}/configurations/team-profiles`, {\n\t\t\t\tparams: {\n\t\t\t\t\tpageSize,\n\t\t\t\t\tpageIndex,\n\t\t\t\t\tteamId,\n\t\t\t\t\tteamTypeId,\n\t\t\t\t},\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function addTeamConfigurationProfile(teamId, teamType, data) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.post(`/v1/healthcare/organizations/${APP_CONFIG.companyId}/teams/${teamId}/team-types/${teamType}/configuration-profiles`, data)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function updateTeamConfigurationProfile(teamId, teamType, id, data) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.put(`/v1/healthcare/organizations/${APP_CONFIG.companyId}/teams/${teamId}/team-types/${teamType}/configuration-profiles/${id}`, data)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getTeamConfigurationProfilesHisotry({ id, pageSize = 10, pageIndex = 0 }) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.get(`/v1/healthcare/organizations/${APP_CONFIG.companyId}/configurations/team-profiles/${id}/history`, {\n\t\t\t\tparams: {\n\t\t\t\t\tpageSize,\n\t\t\t\t\tpageIndex,\n\t\t\t\t},\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function deleteTeamConfigurationProfile(teamId, teamType, id) {\n\treturn new Promise((res, rej) => {\n\t\tgatewayApi\n\t\t\t.delete(`/v1/healthcare/organizations/${APP_CONFIG.companyId}/teams/${teamId}/team-types/${teamType}/configuration-profiles/${id}`)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n","import React from 'react';\nimport { Table, Grid, Button, Modal, Form, Input, Select as SelectTag, Loader } from 'components';\nimport Select from 'react-select';\nimport Pagination from 'components/Common/Pagination';\nimport { getHealthSystemHospitals, getTeamConfigurations, addDeviceConfiguration, deleteTVDeviceConfiguration } from 'api/userIdleConfigurations';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { actionCreators } from 'state/organization/actions';\nimport { UserRoles, TeamTypes, ConfigHistoryTypes, TVs, TeamConfigurationIntegrationType, TelehealthTv } from 'constants/enums';\nimport moment from 'moment';\nimport { utcToLocalTime } from 'infrastructure/helpers/dateHelper';\nimport { If, Then, Else } from 'react-if';\nimport _ from 'lodash';\nimport { getUserRole } from 'infrastructure/auth';\nimport { Link } from 'react-router-dom';\nimport {\n\taddTeamConfigurationProfile,\n\tdeleteTeamConfigurationProfile,\n\tgetTeamConfigurationProfiles,\n\tupdateTeamConfigurationProfile,\n} from 'api/teamConfigurationProfiles';\nimport { getHopsitalDepartments } from 'api/organization';\n\nclass DeviceConfig extends React.Component {\n\tinitialConfigurationFormData = {\n\t\thealthSystems: this.props.healthSystems,\n\t\thospitals: [],\n\t\tdepartments: [],\n\t\thdmiPorts: [\n\t\t\t{ id: 1, value: 'HDMI 1' },\n\t\t\t{ id: 2, value: 'HDMI 2' },\n\t\t\t{ id: 3, value: 'HDMI 3' },\n\t\t],\n\t\tendCallSource: [\n\t\t\t{ id: 0, value: 'TV Channels' },\n\t\t\t{ id: 1, value: 'HDMI 1' },\n\t\t\t{ id: 2, value: 'HDMI 2' },\n\t\t\t{ id: 3, value: 'HDMI 3' },\n\t\t],\n\t\ttvs: [\n\t\t\t{ id: 1, value: TVs.LG },\n\t\t\t{ id: 2, value: TVs.SAMSUNG },\n\t\t\t{ id: 3, value: TelehealthTv.label },\n\t\t\t{ id: 4, value: TVs.PCARE },\n\t\t\t{ id: 5, value: TVs.CEC },\n\t\t],\n\t\tintegrationTypes: [\n\t\t\t{ id: 0, value: 'TeleHealth' },\n\t\t\t{ id: 1, value: 'pCare' },\n\t\t],\n\t\tselectedHealthSystemValue: -1,\n\t\tselectedHealthSystem: null,\n\n\t\tselectedHospitalValue: -1,\n\t\tselectedHospital: null,\n\n\t\tselectedHdmiPortValue: -1,\n\t\tselectedTVValue: -1,\n\n\t\tselectedEndCallSource: -1,\n\n\t\tselectedDepartment: null,\n\t\tselectedDepartmentValue: -1,\n\n\t\tselectedTeamProfileValue: -1,\n\t\tselectedTeamProfile: null,\n\n\t\tringtoneVolumeValue: 0,\n\t\tselectedId: null,\n\t\tselectedIntegrationTypeValue: 0,\n\t\tprofileName: '',\n\t\turl: '',\n\t\tport: '',\n\t\thsSecret: '',\n\t\tuserName: '',\n\n\t\tisEdit: false,\n\t\terrors: {\n\t\t\thealthSystemError: null,\n\t\t\thospitalError: null,\n\t\t\tdepartmentError: null,\n\t\t\thdmiPortError: null,\n\t\t\tendCallSourceError: null,\n\t\t\tringtoneVolumeError: null,\n\t\t\tprofileNameError: null,\n\t\t\turlError: null,\n\t\t\tportError: null,\n\t\t\thsSecretError: null,\n\t\t\tteamProfileError: null,\n\t\t\ttvError: null,\n\t\t},\n\n\t\tisSecretChanged: false,\n\t\tnewSecret: '',\n\t\tisHospitalLoading: false,\n\t\tisDepartmentLoading: false,\n\t};\n\n\tstate = {\n\t\tisLoading: true,\n\t\tshowConfigurationModal: false,\n\t\thospitals: [],\n\t\tdepartments: [],\n\t\tteamProfiles: [],\n\t\tisHospitalDropdownDisabled: true,\n\t\tisDepartmentDropdownDisabled: true,\n\t\tconfigurations: [],\n\t\thealthSystemConfigs: [],\n\t\tisFormLoading: false,\n\t\ttotalConfigs: null,\n\t\tisDeleteConfigModalOpen: false,\n\t\tdeleteConfig: null,\n\t\tconfigurationFormData: _.cloneDeep(this.initialConfigurationFormData),\n\t};\n\n\tdeviceConfigHeaders = [\n\t\t{ title: 'Health System' },\n\t\t{ title: 'Hospital' },\n\t\t{ title: 'Department' },\n\t\t{ title: 'HDMI Port' },\n\t\t{ title: 'Default Source' },\n\t\t{ title: 'Ringtone Volume' },\n\t\t{ title: 'TV' },\n\t\t{ title: 'Profile Name' },\n\t\t{ title: 'Created by' },\n\t\t{ title: 'Date Created' },\n\t\t{ title: '' },\n\t];\n\n\thealthSystemConfigHeaders = [\n\t\t{ title: 'Health System' },\n\t\t{ title: 'Profile Name' },\n\t\t{ title: 'URL' },\n\t\t{ title: 'Port' },\n\t\t{ title: 'Date Created' },\n\t\t{ title: '' },\n\t];\n\n\trole = null;\n\n\ttransformTypes = {\n\t\tWithValues: 1,\n\t\tWithLabels: 2,\n\t};\n\n\tactiveSubTab = {\n\t\tHealthSystem: 0,\n\t\tTV: 1,\n\t};\n\n\tendCallSource = {\n\t\t0: 'TV Channels',\n\t\t1: 'HDMI 1',\n\t\t2: 'HDMI 2',\n\t\t3: 'HDMI 3',\n\t};\n\n\tcomponentDidMount = () => {\n\t\tthis.role = getUserRole();\n\t\tthis.getTeamProfiles();\n\t\tthis.getConfigurations();\n\t};\n\n\tcomponentDidUpdate = prevProps => {\n\t\tif (\n\t\t\tthis.props.pageIndex !== prevProps.pageIndex ||\n\t\t\tthis.props.selectedHealthSystem !== prevProps.selectedHealthSystem ||\n\t\t\tthis.props.selectedHospitalId !== prevProps.selectedHospitalId ||\n\t\t\tthis.props.selectedDepartmentId !== prevProps.selectedDepartmentId ||\n\t\t\tthis.props.activeSubTab !== prevProps.activeSubTab\n\t\t) {\n\t\t\tthis.getConfigurations();\n\t\t\tthis.getTeamProfiles();\n\t\t}\n\t};\n\n\tgetTeamProfiles = async () => {\n\t\tconst response = await getTeamConfigurationProfiles({\n\t\t\tpageSize: 999, // TO DO: Apply pagination\n\t\t\tpageIndex: 0,\n\t\t\tteamTypeId: TeamTypes.HEALTHSYSTEM,\n\t\t});\n\n\t\tthis.setState({\n\t\t\tteamProfiles: response.teamConfigurationProfiles.map(config => ({ id: config.id, value: config.profileName })),\n\t\t});\n\t};\n\n\tgetHospitals = async healthSystem => {\n\t\tlet hospitals;\n\t\tif (healthSystem.value !== '0') {\n\t\t\thospitals = await this.getHealthSystemHospitals(healthSystem.value);\n\t\t\thospitals.unshift({ value: 0, label: 'All' });\n\t\t}\n\t\tthis.setState({\n\t\t\tisHospitalDropdownDisabled: healthSystem.value === '0',\n\t\t\tisDepartmentDropdownDisabled: healthSystem.value === '0' ? true : this.state.isDepartmentDropdownDisabled,\n\t\t\thospitals,\n\t\t});\n\t};\n\n\tgetDepartments = async (healthSystem, hospitalId) => {\n\t\tlet departments;\n\t\tif (healthSystem.value !== '0' && hospitalId !== 0) {\n\t\t\tconst { hospital } = await getHopsitalDepartments(healthSystem.value, hospitalId);\n\t\t\tdepartments = hospital.departments.map(department => ({ value: department.id, label: department.name }));\n\t\t\tdepartments.unshift({ value: 0, label: 'All' });\n\t\t}\n\t\tthis.setState({\n\t\t\tisDepartmentDropdownDisabled: healthSystem.value === '0' || hospitalId === 0,\n\t\t\tdepartments,\n\t\t});\n\t};\n\n\tgetConfigurations = async () => {\n\t\tif (this.props.isLoading) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { selectedHealthSystem, selectedHospitalId, selectedDepartmentId } = this.props;\n\t\tlet hsId = null;\n\t\tif (selectedHealthSystem && selectedHealthSystem.value !== '0') {\n\t\t\thsId = selectedHealthSystem.value;\n\t\t}\n\n\t\tif (this.props.activeSubTab === this.activeSubTab.TV) {\n\t\t\tconst response = await getTeamConfigurations({\n\t\t\t\thealthSystemId: hsId,\n\t\t\t\thospitalId: selectedHospitalId || null,\n\t\t\t\tdepartmentId: selectedDepartmentId || null,\n\t\t\t\tpageSize: this.props.pageSize.value,\n\t\t\t\tpageIndex: this.props.pageIndex,\n\t\t\t\tteamTypeId: TeamTypes.HOSPITAL,\n\t\t\t});\n\t\t\tif (selectedHealthSystem) {\n\t\t\t\tawait this.getHospitals(selectedHealthSystem);\n\t\t\t}\n\t\t\tif (selectedHealthSystem && selectedHospitalId) {\n\t\t\t\tawait this.getDepartments(selectedHealthSystem, selectedHospitalId);\n\t\t\t}\n\n\t\t\tthis.getDeviceConfigurations(response.deviceConfigurations);\n\t\t\tthis.setState({\n\t\t\t\ttotalConfigs: response.total,\n\t\t\t});\n\t\t} else {\n\t\t\tconst response = await getTeamConfigurationProfiles({\n\t\t\t\tpageSize: this.props.pageSize.Value,\n\t\t\t\tpageIndex: this.props.pageIndex,\n\t\t\t\tteamId: hsId,\n\t\t\t\tteamTypeId: TeamTypes.HEALTHSYSTEM,\n\t\t\t});\n\n\t\t\tthis.getHealthSystemConfigs(response.teamConfigurationProfiles);\n\t\t\tthis.setState({\n\t\t\t\ttotalConfigs: response.total,\n\t\t\t});\n\t\t}\n\t};\n\n\ttransformHealthSystemsForSelect = healthSystems => {\n\t\treturn healthSystems.map(healthSystem => {\n\t\t\treturn { label: healthSystem.name, value: healthSystem.id };\n\t\t});\n\t};\n\n\tgetHealthSystemHospitals = async healthSystemId => {\n\t\tconst firstHSHospitals = await getHealthSystemHospitals(healthSystemId);\n\t\treturn this.transformHealthSystemsForSelect(firstHSHospitals);\n\t};\n\n\tonHospitalSelect = async selection => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisLoading: true,\n\t\t\t},\n\t\t\tasync () => {\n\t\t\t\tawait this.props.setSelectedHospital(selection);\n\t\t\t}\n\t\t);\n\t};\n\n\tonDepartmentSelect = async selection => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisLoading: true,\n\t\t\t},\n\t\t\tasync () => {\n\t\t\t\tawait this.props.setSelectedDepartment(selection);\n\t\t\t}\n\t\t);\n\t};\n\n\tgetHospitalConfigurations = async (healthSystemId, hospitalId, pageSize, pageIndex = 0) => {\n\t\tconst response = await getTeamConfigurations({\n\t\t\thealthSystemId: healthSystemId,\n\t\t\tteamId: hospitalId,\n\t\t\tpageSize: pageSize || 10,\n\t\t\tpageIndex: pageIndex,\n\t\t\tteamTypeId: TeamTypes.HOSPITAL,\n\t\t});\n\t\treturn response;\n\t};\n\n\tonHealthSystemSelect = async selection => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisLoading: true,\n\t\t\t},\n\t\t\tasync () => {\n\t\t\t\tawait this.props.setSelectedHealthSystem(selection);\n\t\t\t}\n\t\t);\n\t};\n\n\tonFormHealthSystemSelect = async ({ id }) => {\n\t\tconst { configurationFormData } = this.state;\n\t\tif (configurationFormData.isEdit) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.setState({\n\t\t\tconfigurationFormData: { ...configurationFormData, isHospitalLoading: true },\n\t\t});\n\n\t\tconfigurationFormData.selectedHealthSystemValue = configurationFormData.healthSystems.findIndex(hs => id === hs.id);\n\t\tconfigurationFormData.selectedHealthSystem = configurationFormData.healthSystems.find(hs => id === hs.id);\n\t\tconfigurationFormData.isHospitalLoading = false;\n\t\tif (this.props.activeSubTab === this.activeSubTab.TV) {\n\t\t\tconst hsHospitals = await getHealthSystemHospitals(id);\n\t\t\tconfigurationFormData.hospitals = hsHospitals.map(hospital => ({ id: hospital.id, value: hospital.name }));\n\t\t\tconfigurationFormData.selectedHospital = null;\n\t\t\tconfigurationFormData.selectedHospitalValue = -1;\n\t\t\tconfigurationFormData.selectedDepartment = null;\n\t\t\tconfigurationFormData.selectedDepartmentValue = -1;\n\t\t}\n\t\tthis.setState({\n\t\t\tconfigurationFormData,\n\t\t});\n\t};\n\n\tonFormHospitalSelect = async ({ id }) => {\n\t\tconst { configurationFormData } = this.state;\n\t\tif (configurationFormData.isEdit) {\n\t\t\treturn;\n\t\t}\n\t\tthis.setState({\n\t\t\tconfigurationFormData: { ...configurationFormData, isDepartmentLoading: true },\n\t\t});\n\t\tconfigurationFormData.selectedHospitalValue = configurationFormData.hospitals.findIndex(hospital => id === hospital.id);\n\t\tconfigurationFormData.errors.hospitalError = null;\n\n\t\tconst { hospital } = await getHopsitalDepartments(configurationFormData.selectedHealthSystem.id, id);\n\n\t\tconfigurationFormData.departments = hospital.departments.map(department => ({ id: department.id, value: department.name }));\n\t\tconfigurationFormData.selectedDepartment = null;\n\t\tconfigurationFormData.selectedDepartmentValue = -1;\n\t\tconfigurationFormData.isDepartmentLoading = false;\n\t\tthis.setState({\n\t\t\tconfigurationFormData,\n\t\t});\n\t};\n\n\tonFormDepartmentSelect = ({ id }) => {\n\t\tconst { configurationFormData } = this.state;\n\t\tif (configurationFormData.isEdit) {\n\t\t\treturn;\n\t\t}\n\n\t\tconfigurationFormData.selectedDepartmentValue = configurationFormData.departments.findIndex(dep => id === dep.id);\n\t\tconfigurationFormData.selectedDepartment = configurationFormData.departments.find(hs => id === hs.id);\n\t\tconfigurationFormData.errors.departmentError = null;\n\n\t\tthis.setState({\n\t\t\tconfigurationFormData,\n\t\t});\n\t};\n\n\tonFormTeamProfileSelect = ({ id }) => {\n\t\tconst { configurationFormData, teamProfiles } = this.state;\n\t\tconfigurationFormData.selectedTeamProfileValue = teamProfiles.findIndex(profile => id === profile.id);\n\t\tconfigurationFormData.selectedTeamProfile = teamProfiles.find(profile => id === profile.id);\n\t\tconfigurationFormData.errors.teamProfileError = null;\n\n\t\tthis.setState({\n\t\t\tconfigurationFormData,\n\t\t});\n\t};\n\n\tonFormHdmiPortSelect = event => {\n\t\tconst { configurationFormData } = this.state;\n\n\t\tconfigurationFormData.selectedHdmiPortValue = +event.target.value;\n\t\tconfigurationFormData.errors.hdmiPortError = null;\n\n\t\tthis.setState({\n\t\t\tconfigurationFormData,\n\t\t});\n\t};\n\n\tonEndCallSourceSelect = event => {\n\t\tconst { configurationFormData } = this.state;\n\n\t\tconfigurationFormData.selectedEndCallSource = +event.target.value;\n\t\tconfigurationFormData.errors.endCallSourceError = null;\n\n\t\tthis.setState({\n\t\t\tconfigurationFormData,\n\t\t});\n\t};\n\n\tonFormTVSelect = ({ id }) => {\n\t\tconst { configurationFormData } = this.state;\n\n\t\tconfigurationFormData.selectedTVValue = configurationFormData.tvs.findIndex(tv => id === tv.id);\n\t\tconfigurationFormData.errors.tvError = null;\n\n\t\tthis.setState({\n\t\t\tconfigurationFormData,\n\t\t});\n\t};\n\n\tonFormRingtoneVolumeChange = event => {\n\t\tconst { configurationFormData } = this.state;\n\n\t\tconfigurationFormData.ringtoneVolumeValue = event.target.value;\n\n\t\tconfigurationFormData.errors.ringtoneVolumeError = null;\n\n\t\tthis.setState({\n\t\t\tconfigurationFormData,\n\t\t});\n\t};\n\n\taddDeviceConfiguration = async () => {\n\t\tconst { configurationFormData } = this.state;\n\t\tlet hasError = false;\n\n\t\tif (this.props.activeSubTab === this.activeSubTab.TV) {\n\t\t\tif (!configurationFormData.isEdit) {\n\t\t\t\tif (configurationFormData.selectedHospitalValue === -1 && !configurationFormData.selectedHospital) {\n\t\t\t\t\tconfigurationFormData.errors.hospitalError = 'Please select a hospital.';\n\t\t\t\t\thasError = true;\n\t\t\t\t}\n\n\t\t\t\tif (configurationFormData.selectedDepartmentValue === -1 && !configurationFormData.selectedDepartment) {\n\t\t\t\t\tconfigurationFormData.errors.departmentError = 'Please select a department.';\n\t\t\t\t\thasError = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (configurationFormData.selectedHdmiPortValue === -1) {\n\t\t\t\tconfigurationFormData.errors.hdmiPortError = 'Please select a HDMI port.';\n\t\t\t\thasError = true;\n\t\t\t}\n\n\t\t\tif (configurationFormData.selectedTVValue === -1) {\n\t\t\t\tconfigurationFormData.errors.tvError = 'Please select a TV.';\n\t\t\t\thasError = true;\n\t\t\t}\n\t\t\tconst ringtoneVolumeNumber = +configurationFormData.ringtoneVolumeValue;\n\t\t\tif (Number.isNaN(ringtoneVolumeNumber) || ringtoneVolumeNumber < 0 || ringtoneVolumeNumber > 100) {\n\t\t\t\tconfigurationFormData.errors.ringtoneVolumeError = 'Ringtone volume must be in between 0 and 100.';\n\t\t\t\thasError = true;\n\t\t\t}\n\n\t\t\tif (configurationFormData.selectedEndCallSource === -1) {\n\t\t\t\tconfigurationFormData.errors.endCallSourceError = 'Please select a TV End Call Source.';\n\t\t\t\thasError = true;\n\t\t\t}\n\n\t\t\tif (hasError) {\n\t\t\t\tthis.setState({ configurationFormData });\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst hdmiPort = configurationFormData.selectedHdmiPortValue;\n\t\t\tconst departmentId = configurationFormData.selectedDepartment.id;\n\t\t\tconst teamConfigurationProfileId = configurationFormData.selectedTeamProfile ? configurationFormData.selectedTeamProfile.id : null;\n\t\t\tconst { id: defaultSource } = configurationFormData.endCallSource[configurationFormData.selectedEndCallSource];\n\t\t\tconst tv =\n\t\t\t\tconfigurationFormData.selectedTVValue + 1 === TelehealthTv.id\n\t\t\t\t\t? TelehealthTv.value\n\t\t\t\t\t: configurationFormData.tvs[configurationFormData.selectedTVValue].value;\n\n\t\t\tthis.setState({ isFormLoading: true });\n\n\t\t\tconst { hasSucceeded } = await addDeviceConfiguration(departmentId, {\n\t\t\t\tteamTypeId: TeamTypes.DEPARTMENT,\n\t\t\t\tdefaultSource,\n\t\t\t\thdmiPort,\n\t\t\t\tringtoneVolume: ringtoneVolumeNumber,\n\t\t\t\tteamConfigurationProfileId: teamConfigurationProfileId,\n\t\t\t\ttv,\n\t\t\t});\n\n\t\t\tif (!hasSucceeded) {\n\t\t\t\tthis.setState({ isFormLoading: false });\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tawait this.resetAddConfigurationModal();\n\t\t} else {\n\t\t\tif (!configurationFormData.isEdit) {\n\t\t\t\tif (configurationFormData.selectedHealthSystemValue === -1) {\n\t\t\t\t\tconfigurationFormData.errors.healthSystemError = 'Please select a health system.';\n\t\t\t\t\thasError = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (configurationFormData.profileName === '') {\n\t\t\t\tconfigurationFormData.errors.profileNameError = 'Please set a profile name.';\n\t\t\t\thasError = true;\n\t\t\t}\n\t\t\tif (configurationFormData.userName === '' && configurationFormData.selectedIntegrationTypeValue === 1) {\n\t\t\t\tconfigurationFormData.errors.userNameError = 'Please set a username.';\n\t\t\t\thasError = true;\n\t\t\t}\n\t\t\tif (configurationFormData.url === '') {\n\t\t\t\tconfigurationFormData.errors.urlError = 'Please set a URL.';\n\t\t\t\thasError = true;\n\t\t\t}\n\n\t\t\tlet newSecretKey = configurationFormData.newSecret;\n\n\t\t\tif (!newSecretKey) {\n\t\t\t\tnewSecretKey = '';\n\t\t\t}\n\n\t\t\tconst secretKeyWoSpaces = newSecretKey.trim();\n\n\t\t\tif ((!configurationFormData.hsSecret && !secretKeyWoSpaces) || (configurationFormData.isSecretChanged && !secretKeyWoSpaces)) {\n\t\t\t\tconfigurationFormData.errors.hsSecretError = 'Please set a secret.';\n\t\t\t\thasError = true;\n\t\t\t}\n\n\t\t\tlet port = null;\n\t\t\tif (configurationFormData.port) {\n\t\t\t\tport = +configurationFormData.port;\n\t\t\t}\n\t\t\tif (!port) {\n\t\t\t\tconfigurationFormData.errors.portError = 'Port is required';\n\t\t\t\thasError = true;\n\t\t\t}\n\n\t\t\tif (hasError) {\n\t\t\t\tthis.setState({ configurationFormData });\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.setState({ isFormLoading: true });\n\n\t\t\tif (!configurationFormData.isEdit) {\n\t\t\t\tconst response = await addTeamConfigurationProfile(configurationFormData.selectedHealthSystem.id, TeamTypes.HEALTHSYSTEM, {\n\t\t\t\t\tprofileName: configurationFormData.profileName,\n\t\t\t\t\turl: configurationFormData.url,\n\t\t\t\t\tport: parseInt(configurationFormData.port, 10),\n\t\t\t\t\tsecret: window.btoa(`${configurationFormData.userName}:${configurationFormData.newSecret}`),\n\t\t\t\t\tintegrationTypeId:\n\t\t\t\t\t\tconfigurationFormData.selectedIntegrationTypeValue === 0 ? TeamConfigurationIntegrationType.TELEHEALTH : TeamConfigurationIntegrationType.PCARE,\n\t\t\t\t});\n\n\t\t\t\tif (!response.hasSucceeded || response.error) {\n\t\t\t\t\tthis.setState({ isFormLoading: false });\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst { hasSucceeded } = await updateTeamConfigurationProfile(\n\t\t\t\t\tconfigurationFormData.selectedHealthSystem.id,\n\t\t\t\t\tTeamTypes.HEALTHSYSTEM,\n\t\t\t\t\tconfigurationFormData.selectedId,\n\t\t\t\t\t{\n\t\t\t\t\t\tprofileName: configurationFormData.profileName,\n\t\t\t\t\t\turl: configurationFormData.url,\n\t\t\t\t\t\tport: parseInt(configurationFormData.port, 10),\n\t\t\t\t\t\tsecret: configurationFormData.isSecretChanged\n\t\t\t\t\t\t\t? window.btoa(`${configurationFormData.userName}:${configurationFormData.newSecret}`)\n\t\t\t\t\t\t\t: window.btoa(`${configurationFormData.userName}:${configurationFormData.hsSecret}`),\n\t\t\t\t\t\tintegrationTypeId:\n\t\t\t\t\t\t\tconfigurationFormData.selectedIntegrationTypeValue === 0 ? TeamConfigurationIntegrationType.TELEHEALTH : TeamConfigurationIntegrationType.PCARE,\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\tif (!hasSucceeded) {\n\t\t\t\t\tthis.setState({ isFormLoading: false });\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tawait this.resetAddConfigurationModal();\n\t\t}\n\t\tthis.getConfigurations();\n\t};\n\n\tresetAddConfigurationModal = () => {\n\t\treturn new Promise(res => {\n\t\t\tthis.setState(\n\t\t\t\t{\n\t\t\t\t\tconfigurationFormData: _.cloneDeep(this.initialConfigurationFormData),\n\t\t\t\t\tshowConfigurationModal: false,\n\t\t\t\t\tisFormLoading: false,\n\t\t\t\t},\n\t\t\t\t() => res()\n\t\t\t);\n\t\t});\n\t};\n\n\tgetDeviceConfigurations = configurations => {\n\t\tif (!configurations.length) {\n\t\t\tthis.setState({\n\t\t\t\tconfigurations: [],\n\t\t\t\tisLoading: false,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst transformConfigs = configurations.map(config => ({\n\t\t\thealthSystem: config.team.healthSystemName,\n\t\t\thospitalName: config.team.hospitalName,\n\t\t\thospital: config.team.name, // Department\n\t\t\thdmiPort: config.hdmiPort,\n\t\t\tdefaultSource: this.endCallSource[config.defaultSource],\n\t\t\tringtoneVolume: config.ringtoneVolume,\n\t\t\ttv: config.tv === TelehealthTv.value ? TelehealthTv.label : config.tv,\n\t\t\tprofileName: config.teamConfigurationProfile ? config.teamConfigurationProfile.profileName : '',\n\t\t\tcreatedBy: `${config.userCreated.firstName} ${config.userCreated.lastName}`,\n\t\t\tdateCreated: moment(utcToLocalTime(config.dateCreated)).format('MM/DD/YYYY-hh:mm A'),\n\t\t\tactions: (\n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tlist_alt\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t this.toggleConfigurationModal(config)}>\n\t\t\t\t\t\tcreate\n\t\t\t\t\t\n\t\t\t\t\t this.openDeleteModal(config)}>\n\t\t\t\t\t\tdelete\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t),\n\t\t}));\n\t\tthis.setState({\n\t\t\tconfigurations: transformConfigs,\n\t\t\tisLoading: false,\n\t\t});\n\t};\n\n\ttoggleConfigurationModal = async (config = null) => {\n\t\tconst { showConfigurationModal, configurationFormData, teamProfiles } = this.state;\n\t\tif (!showConfigurationModal) {\n\t\t\tthis.props.pushFiltersToQueryString();\n\t\t\tconfigurationFormData.isEdit = !!config;\n\t\t\tconfigurationFormData.healthSystems = this.props.allHealthSystems.map(hs => ({ id: hs.id, value: hs.name }));\n\t\t\tif (this.props.activeSubTab === this.activeSubTab.TV) {\n\t\t\t\tif (this.role === UserRoles.SUPERUSER) {\n\t\t\t\t\tthis.onFormHealthSystemSelect(configurationFormData.healthSystems[0]);\n\t\t\t\t}\n\n\t\t\t\tif (configurationFormData.isEdit) {\n\t\t\t\t\t//\n\t\t\t\t\tconfigurationFormData.selectedDepartment = config.team;\n\t\t\t\t\tconfigurationFormData.selectedHdmiPortValue = configurationFormData.hdmiPorts.find(port => config.hdmiPort === port.id).id;\n\t\t\t\t\tconfigurationFormData.selectedEndCallSource = configurationFormData.endCallSource.find(ds => config.defaultSource === ds.id).id;\n\t\t\t\t\tconfigurationFormData.ringtoneVolumeValue = config.ringtoneVolume;\n\t\t\t\t\tconfigurationFormData.selectedTeamProfileValue = teamProfiles.findIndex(p => config.teamConfigurationProfileId === p.id);\n\t\t\t\t\tconfigurationFormData.selectedTeamProfile = teamProfiles.find(p => config.teamConfigurationProfileId === p.id);\n\t\t\t\t\tconfigurationFormData.selectedTVValue = configurationFormData.tvs.findIndex(t =>\n\t\t\t\t\t\tconfig.tv === TelehealthTv.value ? TelehealthTv.label === t.value : config.tv === t.value\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tthis.setState({\n\t\t\t\t\tconfigurationFormData,\n\t\t\t\t\tshowConfigurationModal: !showConfigurationModal,\n\t\t\t\t});\n\t\t\t} else if (configurationFormData.isEdit) {\n\t\t\t\tconst isBase64 = /^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)?$/;\n\t\t\t\tif (config.secret.match(isBase64)) {\n\t\t\t\t\tconst decodedSecret = window.atob(config.secret);\n\t\t\t\t\tconst userData = decodedSecret.split(':');\n\t\t\t\t\tif (!userData || window.atob(config.secret).split(':').length < 2) {\n\t\t\t\t\t\tconfigurationFormData.newSecret = '';\n\t\t\t\t\t\tconfigurationFormData.hsSecret = '';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t[configurationFormData.userName, configurationFormData.hsSecret] = userData;\n\t\t\t\t\t\tconfigurationFormData.newSecret = `${userData[1].slice(0, 3)}************`;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tconfigurationFormData.hsSecret = config.secret;\n\t\t\t\t\tconfigurationFormData.newSecret = `${config.secret.slice(0, 3)}************`;\n\t\t\t\t}\n\t\t\t\tconfigurationFormData.selectedHealthSystem = config.team;\n\t\t\t\tconfigurationFormData.profileName = config.profileName;\n\t\t\t\tconfigurationFormData.port = config.port;\n\t\t\t\tconfigurationFormData.url = config.url;\n\t\t\t\tconfigurationFormData.selectedId = config.id;\n\t\t\t\tconfigurationFormData.selectedIntegrationTypeValue = config.integrationTypeId === TeamConfigurationIntegrationType.TELEHEALTH ? 0 : 1;\n\t\t\t\tthis.setState({\n\t\t\t\t\tconfigurationFormData,\n\t\t\t\t\tshowConfigurationModal: !showConfigurationModal,\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tthis.setState({\n\t\t\t\t\tshowConfigurationModal: !showConfigurationModal,\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\tthis.resetAddConfigurationModal();\n\t\t}\n\t};\n\n\tonPaginationChange = async (pageSize, pageIndex) => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisLoading: true,\n\t\t\t},\n\t\t\tasync () => {\n\t\t\t\tawait this.props.onPaginationChange(pageSize, pageIndex);\n\t\t\t}\n\t\t);\n\t};\n\n\ttransformArray = (array, type, isHealthSystem) => {\n\t\tif (type === this.transformTypes.WithValues) {\n\t\t\tconst newArray = array.map(item => {\n\t\t\t\treturn { id: item.id, value: item.name };\n\t\t\t});\n\t\t\tif (isHealthSystem) {\n\t\t\t\tif (this.role === UserRoles.ADMIN) {\n\t\t\t\t\tnewArray.unshift({ id: '0', value: 'All' });\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnewArray.unshift({ id: '0', value: 'All' });\n\t\t\t}\n\t\t\treturn newArray;\n\t\t}\n\t\tif (type === this.transformTypes.WithLabels) {\n\t\t\tconst newArray = array.map(item => {\n\t\t\t\treturn { value: item.id, label: item.name };\n\t\t\t});\n\t\t\tif (isHealthSystem) {\n\t\t\t\tif (this.role === UserRoles.ADMIN) {\n\t\t\t\t\tnewArray.unshift({ value: '0', label: 'All' });\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnewArray.unshift({ value: '0', label: 'All' });\n\t\t\t}\n\t\t\treturn newArray;\n\t\t}\n\t\treturn [];\n\t};\n\n\tonTabChange = tabIndex => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisLoading: true,\n\t\t\t},\n\t\t\tasync () => {\n\t\t\t\tawait this.props.onSubTabChange(tabIndex);\n\t\t\t}\n\t\t);\n\t};\n\n\tgetTabsConfigurations = () => {\n\t\tif (this.props.activeSubTab === this.activeSubTab.HealthSystem) {\n\t\t\treturn this.state.healthSystemConfigs;\n\t\t}\n\t\treturn this.state.configurations;\n\t};\n\n\tonFormTextChange = event => {\n\t\tconst { configurationFormData } = this.state;\n\n\t\tconfigurationFormData[event.target.name] = event.target.value;\n\t\tconfigurationFormData.errors[`${event.target.name}Error`] = null;\n\n\t\tthis.setState({\n\t\t\tconfigurationFormData,\n\t\t});\n\t};\n\n\topenDeleteModal = deleteConfig => {\n\t\tthis.props.pushFiltersToQueryString();\n\t\tthis.setState({\n\t\t\tdeleteConfig,\n\t\t\tisDeleteConfigModalOpen: true,\n\t\t});\n\t};\n\n\tgetHealthSystemConfigs = configurations => {\n\t\tif (!configurations.length) {\n\t\t\tthis.setState({\n\t\t\t\thealthSystemConfigs: [],\n\t\t\t\tisLoading: false,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst transformConfigs = configurations.map(config => ({\n\t\t\thealthSystem: config.team.name,\n\t\t\tprofileName: config.profileName,\n\t\t\turl: config.url,\n\t\t\tport: config.port,\n\t\t\tdateCreated: moment(utcToLocalTime(config.dateCreated)).format('MM/DD/YYYY-hh:mm A'),\n\t\t\tactions: (\n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tlist_alt\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t this.toggleConfigurationModal(config)}>\n\t\t\t\t\t\tcreate\n\t\t\t\t\t\n\t\t\t\t\t this.openDeleteModal(config)}>\n\t\t\t\t\t\tdelete\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t),\n\t\t}));\n\t\tthis.setState({\n\t\t\thealthSystemConfigs: transformConfigs,\n\t\t\tisLoading: false,\n\t\t});\n\t};\n\n\tdeleteTeamProfile = async () => {\n\t\tthis.setState({\n\t\t\tisLoading: true,\n\t\t\tisDeleteConfigModalOpen: false,\n\t\t});\n\n\t\tconst { deleteConfig } = this.state;\n\n\t\tif (this.props.activeSubTab === this.activeSubTab.HealthSystem) {\n\t\t\tawait deleteTeamConfigurationProfile(deleteConfig.team.id, deleteConfig.team.typeId, deleteConfig.id);\n\t\t} else if (this.props.activeSubTab === this.activeSubTab.TV) {\n\t\t\tawait deleteTVDeviceConfiguration(deleteConfig.team.id, deleteConfig.id);\n\t\t}\n\t\tthis.getConfigurations();\n\t};\n\n\tselectIntegrationType = ({ id }) => {\n\t\tconst { configurationFormData } = this.state;\n\t\tconfigurationFormData.selectedIntegrationTypeValue = id;\n\t\tthis.setState({\n\t\t\tconfigurationFormData,\n\t\t});\n\t};\n\n\trender() {\n\t\tconst DropdownIndicator = () => {\n\t\t\treturn arrow_drop_down;\n\t\t};\n\n\t\tconst { configurationFormData, isFormLoading, isLoading } = this.state;\n\n\t\treturn (\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t{this.props.activeSubTab === this.activeSubTab.TV && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t x.value === this.props.selectedHospitalId) : null}\n\t\t\t\t\t\t\t\t\tisDisabled={this.state.isHospitalDropdownDisabled}\n\t\t\t\t\t\t\t\t\tclassNamePrefix='custom-select'\n\t\t\t\t\t\t\t\t\toptions={this.state.hospitals}\n\t\t\t\t\t\t\t\t\tcomponents={{ DropdownIndicator }}\n\t\t\t\t\t\t\t\t\tonChange={this.onHospitalSelect}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t x.value === this.props.selectedDepartmentId) : null}\n\t\t\t\t\t\t\t\t\tisDisabled={this.state.isDepartmentDropdownDisabled}\n\t\t\t\t\t\t\t\t\tclassNamePrefix='custom-select'\n\t\t\t\t\t\t\t\t\toptions={this.state.departments}\n\t\t\t\t\t\t\t\t\tcomponents={{ DropdownIndicator }}\n\t\t\t\t\t\t\t\t\tonChange={this.onDepartmentSelect}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t this.toggleConfigurationModal()}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t\t this.onTabChange(this.activeSubTab.HealthSystem)}>Health System\n\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t\t this.onTabChange(this.activeSubTab.TV)}>TV \n\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t this.onPaginationChange(pageSize, pageIndex)}\n\t\t\t\t/>\n\t\t\t\t this.toggleConfigurationModal()}\n\t\t\t\t\tisLoading={isFormLoading}>\n\t\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t -1\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? configurationFormData.healthSystems[configurationFormData.selectedHealthSystemValue].value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: ''\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalidationOptions={{}}\n\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled={true}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t

    Select the HDMI port where Banyan Bridge will be plugged into.

    \n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t{configurationFormData.hdmiPorts.map(item => (\n\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t{configurationFormData.errors.hdmiPortError}\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t

    Select the option where TV will go back after call ends.

    \n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t{configurationFormData.endCallSource.map(item => (\n\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t{configurationFormData.errors.endCallSourceError}\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t

    This setting will be applied to all the devices under this hospital.

    \n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t{configurationFormData.ringtoneVolumeValue || 0}\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t{configurationFormData.errors.ringtoneVolumeError}\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t -1\n\t\t\t\t\t\t\t\t\t\t\t\t\t? configurationFormData.healthSystems[configurationFormData.selectedHealthSystemValue].value\n\t\t\t\t\t\t\t\t\t\t\t\t\t: ''\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tvalidationOptions={{}}\n\t\t\t\t\t\t\t\t\t\t\tdisabled={true}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{configurationFormData.selectedIntegrationTypeValue === 1 && (\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\tconst { value } = e.target;\n\n\t\t\t\t\t\t\t\t\t\tif (!configurationFormData.isSecretChanged) {\n\t\t\t\t\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\t\t\t\t\tconfigurationFormData: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t...configurationFormData,\n\t\t\t\t\t\t\t\t\t\t\t\t\tnewSecret: value[value.length - 1] !== '*' ? value[value.length - 1] : '',\n\t\t\t\t\t\t\t\t\t\t\t\t\tisSecretChanged: true,\n\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\t\t\t\t\tconfigurationFormData: { ...configurationFormData, newSecret: value },\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tvalidationOptions={{}}\n\t\t\t\t\t\t\t\t\terror={configurationFormData.errors.hsSecretError}\n\t\t\t\t\t\t\t\t\tbottomSpace='20px'\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t this.deleteTeamProfile()}\n\t\t\t\t\tonModalClose={() => this.setState({ isDeleteConfigModalOpen: false, deleteConfig: null })}>\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    Warning

    \n\t\t\t\t\t\t

    Are you sure you want to delete this configuration ?

    \n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default connect(\n\tstate => state.organization,\n\tdispatch => bindActionCreators(actionCreators, dispatch)\n)(DeviceConfig);\n","import { gatewayApi, APP_CONFIG } from 'constants/global-variables';\n\nexport function getActiveDirectories({ pageSize = 10, pageIndex = 0, healthSystemId = null, hospitalId = null }) {\n\treturn new Promise((res, rej) => {\n\t\tconst { companyId } = APP_CONFIG;\n\t\tgatewayApi\n\t\t\t.get(`v1/healthcare/organizations/${companyId}/configurations/active-directories`, {\n\t\t\t\tparams: {\n\t\t\t\t\tpageSize,\n\t\t\t\t\tpageIndex,\n\t\t\t\t\thealthSystemId,\n\t\t\t\t\thospitalId,\n\t\t\t\t},\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getActiveDirectoriesHistory(id, { pageSize = 10, pageIndex = 0 }) {\n\treturn new Promise((res, rej) => {\n\t\tconst { companyId } = APP_CONFIG;\n\t\tgatewayApi\n\t\t\t.get(`v1/healthcare/organizations/${companyId}/configurations/active-directories/${id}/history`, {\n\t\t\t\tparams: {\n\t\t\t\t\tpageSize,\n\t\t\t\t\tpageIndex,\n\t\t\t\t},\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function getADGroupRoles({ pageSize = 10, pageIndex = 0, healthSystemId = null, hospitalId = null }) {\n\treturn new Promise((res, rej) => {\n\t\tconst { companyId } = APP_CONFIG;\n\t\tgatewayApi\n\t\t\t.get(`v1/healthcare/organizations/${companyId}/configurations/active-directories/group-roles`, {\n\t\t\t\tparams: {\n\t\t\t\t\tpageSize,\n\t\t\t\t\tpageIndex,\n\t\t\t\t\thealthSystemId,\n\t\t\t\t\thospitalId,\n\t\t\t\t},\n\t\t\t})\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function updateActiveDirectory(id, activeDirectory) {\n\treturn new Promise((res, rej) => {\n\t\tconst { companyId } = APP_CONFIG;\n\t\tgatewayApi\n\t\t\t.put(`v1/healthcare/organizations/${companyId}/configurations/active-directories/${id}`, activeDirectory)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function addActiveDirectory(activeDirectory) {\n\treturn new Promise((res, rej) => {\n\t\tconst { companyId } = APP_CONFIG;\n\t\tgatewayApi\n\t\t\t.post(`v1/healthcare/organizations/${companyId}/configurations/active-directories`, activeDirectory)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function addGroupRole(groupRole) {\n\treturn new Promise((res, rej) => {\n\t\tconst { companyId } = APP_CONFIG;\n\n\t\tconst roleId = parseInt(groupRole.roleId, 10);\n\t\tconst data = {\n\t\t\thospitalId: groupRole.hospitalId,\n\t\t\troleId,\n\t\t\tgroup: groupRole.group,\n\t\t};\n\t\tgatewayApi\n\t\t\t.post(`v1/healthcare/organizations/${companyId}/configurations/active-directories/group-roles`, data)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function updateGroupRole(id, groupRole) {\n\treturn new Promise((res, rej) => {\n\t\tconst { companyId } = APP_CONFIG;\n\n\t\tconst roleId = parseInt(groupRole.roleId, 10);\n\t\tconst data = {\n\t\t\thospitalId: groupRole.hospitalId,\n\t\t\troleId,\n\t\t\tgroup: groupRole.group,\n\t\t};\n\t\tgatewayApi\n\t\t\t.put(`v1/healthcare/organizations/${companyId}/configurations/active-directories/group-roles/${id}`, data)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function deleteActiveDirectory(id) {\n\treturn new Promise((res, rej) => {\n\t\tconst { companyId } = APP_CONFIG;\n\t\tgatewayApi\n\t\t\t.delete(`v1/healthcare/organizations/${companyId}/configurations/active-directories/${id}`)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n\nexport function deleteGroupRole(id) {\n\treturn new Promise((res, rej) => {\n\t\tconst { companyId } = APP_CONFIG;\n\t\tgatewayApi\n\t\t\t.delete(`v1/healthcare/organizations/${companyId}/configurations/active-directories/group-roles/${id}`)\n\t\t\t.then(response => {\n\t\t\t\tres(response.data);\n\t\t\t})\n\t\t\t.catch(e => rej(e));\n\t});\n}\n","import React from 'react';\nimport { Field, Formik } from 'formik';\nimport * as Yup from 'yup';\nimport Input from 'components/Common/FormElements/Input';\nimport Select from 'components/Common/FormElements/Select';\nimport { Form, Modal, Alert } from 'components';\nimport Loader from 'components/Loader';\nimport { addActiveDirectory, addGroupRole, updateActiveDirectory, updateGroupRole } from 'api/activeDirectories';\n\nexport default class ActiveDirectoryForm extends React.Component {\n\tstate = {\n\t\tisSuccessfulAlertOn: false,\n\t\tisErrorsAlertOn: false,\n\t\tisPasswordChanged: false,\n\t};\n\n\thandleSubmitMyForm = async (values, { setSubmitting }) => {\n\t\tsetSubmitting(true);\n\t\ttry {\n\t\t\tconst hospitalIds = [values.hospital];\n\t\t\tlet res = null;\n\t\t\tif (this.props.activeTab === 0) {\n\t\t\t\tconst { domain, validGroupName, adClientSecret, adClientId } = values;\n\t\t\t\tif (this.props.initialValues) {\n\t\t\t\t\tres = await updateActiveDirectory(this.props.initialValues.id, {\n\t\t\t\t\t\tdomain,\n\t\t\t\t\t\tvalidGroupName,\n\t\t\t\t\t\tusername: adClientId,\n\t\t\t\t\t\tpassword: this.state.isPasswordChanged ? adClientSecret : this.props.initialValues.fullPassword,\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tconst [hospitalId] = hospitalIds;\n\t\t\t\t\tres = await addActiveDirectory({ hospitalId, domain, validGroupName, username: adClientId, password: adClientSecret });\n\t\t\t\t}\n\t\t\t\tif (res.hasSucceeded) {\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tisSuccessfulAlertOn: true,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst [roleId] = [values.role];\n\t\t\t\tconst { group } = values;\n\n\t\t\t\tif (this.props.initialValues) {\n\t\t\t\t\tres = await updateGroupRole(this.props.initialValues.id, { roleId, group });\n\t\t\t\t} else {\n\t\t\t\t\tconst [hospitalId] = hospitalIds;\n\t\t\t\t\tres = await addGroupRole({ hospitalId, roleId, group });\n\t\t\t\t}\n\t\t\t\tif (!res.exists) {\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tisSuccessfulAlertOn: true,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.props.onSucceeded();\n\t\t} catch (e) {\n\t\t\tthis.setState({\n\t\t\t\tisErrorsAlertOn: true,\n\t\t\t});\n\t\t}\n\t\tsetSubmitting(false);\n\t};\n\n\tonCloseModal = () => {\n\t\tthis.setState({\n\t\t\tisSuccessfulAlertOn: false,\n\t\t\tisErrorsAlertOn: false,\n\t\t\tisPasswordChanged: false,\n\t\t});\n\n\t\tthis.props.toggleModal();\n\t};\n\n\tgetValidationSchema = () => {\n\t\tconst validation = {};\n\t\tif (!this.props.initialValues) {\n\t\t\tvalidation.healthSystem = Yup.string().required('Health system is required');\n\t\t\tvalidation.hospital = Yup.string().required('Hospital is required');\n\t\t}\n\t\tif (this.props.activeTab === 0) {\n\t\t\tvalidation.domain = Yup.string().required('Domain is required');\n\t\t\tvalidation.validGroupName = Yup.string().required('Valid group name is required');\n\t\t\tvalidation.adClientId = Yup.string().required('ClientId is required');\n\t\t\tvalidation.adClientSecret = Yup.string().required('Client Secret is required');\n\t\t} else {\n\t\t\tvalidation.role = Yup.string().required('Role is required');\n\t\t\tvalidation.group = Yup.string().required('Group is required');\n\t\t}\n\n\t\treturn validation;\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t\n\t\t\t\t{props => {\n\t\t\t\t\tconst { handleSubmit, isSubmitting, setFieldValue } = props;\n\t\t\t\t\treturn (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t

    {this.props.activeTab === 0 ? 'Active directory' : 'Group roles'}

    \n\t\t\t\t\t\t\t\t{!this.props.initialValues ? (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t{this.props.isHospitalLoading ? (\n\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{this.props.activeTab === 0 ? (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\tconst { value } = e.target;\n\t\t\t\t\t\t\t\t\t\t\t\tif (!this.state.isPasswordChanged) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tisPasswordChanged: true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tsetFieldValue('adClientSecret', !this.state.isPasswordChanged ? value[value.length - 1] : value);\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t this.setState({ isSuccessfulAlertOn: false, isErrorsAlertOn: false })}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t);\n\t\t\t\t}}\n\t\t\t\n\t\t);\n\t}\n}\n","import React from 'react';\nimport { Table, Grid, Button, Modal } from 'components';\nimport Select from 'react-select';\nimport { getHealthSystemHospitals } from 'api/userIdleConfigurations';\nimport { getUserRole } from 'infrastructure/auth';\nimport { ConfigHistoryTypes, UserRoles, Roles } from 'constants/enums';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { actionCreators } from 'state/organization/actions';\nimport { getActiveDirectories, getADGroupRoles, deleteActiveDirectory, deleteGroupRole } from 'api/activeDirectories';\nimport Pagination from 'components/Common/Pagination';\nimport moment from 'moment';\nimport { utcToLocalTime } from 'infrastructure/helpers/dateHelper';\nimport { Link } from 'react-router-dom';\nimport ActiveDirectoryForm from './ActiveDirectoryForm';\n\nclass ActiveDirectory extends React.Component {\n\tstate = {\n\t\tisLoading: true,\n\t\thospitals: [],\n\t\tformHospitals: [],\n\t\tisModalHospitalsLoading: false,\n\t\tactiveDirectories: [],\n\t\ttotalADs: 0,\n\t\tgroupRoles: [],\n\t\ttotalGroupRoles: 0,\n\t\teditConfig: null,\n\t\tisModalOpen: false,\n\t\tisHospitalDisabled: true,\n\t\tisDeleteConfigModalOpen: false,\n\t};\n\n\trole = null;\n\n\tactiveSubTab = {\n\t\tADs: 0,\n\t\tGroupRoles: 1,\n\t};\n\n\ttransformTypes = {\n\t\tWithValues: 1,\n\t\tWithLabels: 2,\n\t};\n\n\tactiveDirectoriesHeaders = [\n\t\t{ title: 'Hospital' },\n\t\t{ title: 'Domain' },\n\t\t{ title: 'Valid Group Name' },\n\t\t{ title: 'Created by' },\n\t\t{ title: 'Date Created' },\n\t\t{ title: '' },\n\t];\n\n\tgroupRoleHeaders = [{ title: 'Hospital' }, { title: 'Role' }, { title: 'Group' }, { title: 'Created by' }, { title: 'Date Created' }, { title: '' }];\n\n\tcomponentDidMount = async () => {\n\t\tthis.role = getUserRole();\n\t\tthis.getConfigurations();\n\t};\n\n\tcomponentDidUpdate = prevProps => {\n\t\tif (\n\t\t\tthis.props.pageIndex !== prevProps.pageIndex ||\n\t\t\tthis.props.pageSize !== prevProps.pageSize ||\n\t\t\tthis.props.selectedHealthSystem !== prevProps.selectedHealthSystem ||\n\t\t\tthis.props.selectedHospitalId !== prevProps.selectedHospitalId ||\n\t\t\tthis.props.activeSubTab !== prevProps.activeSubTab\n\t\t) {\n\t\t\tthis.getConfigurations();\n\t\t}\n\t};\n\n\tgetHospitals = async healthSystem => {\n\t\tlet hospitals;\n\t\tif (healthSystem.value !== '0') {\n\t\t\thospitals = await this.getHealthSystemHospitals(healthSystem.value);\n\t\t\thospitals.unshift({ value: 0, label: 'All' });\n\t\t}\n\t\tthis.setState({\n\t\t\tisHospitalDisabled: healthSystem.value === '0',\n\t\t\thospitals,\n\t\t});\n\t};\n\n\tgetConfigurations = async () => {\n\t\tif (this.props.isLoading) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { selectedHealthSystem, selectedHospitalId } = this.props;\n\t\tlet hsId = null;\n\t\tif (selectedHealthSystem && selectedHealthSystem.value !== '0') {\n\t\t\thsId = selectedHealthSystem.value;\n\t\t}\n\n\t\tconst newState = {\n\t\t\tisLoading: false,\n\t\t};\n\n\t\tif (this.props.activeSubTab === this.activeSubTab.ADs) {\n\t\t\tconst { activeDirectories, total } = await getActiveDirectories({\n\t\t\t\tpageSize: this.props.pageSize.value,\n\t\t\t\tpageIndex: this.props.pageIndex,\n\t\t\t\thealthSystemId: hsId,\n\t\t\t\thospitalId: selectedHospitalId || null,\n\t\t\t});\n\t\t\tnewState.activeDirectories = activeDirectories;\n\t\t\tnewState.totalADs = total;\n\t\t} else {\n\t\t\tconst { adGroupRoles, total } = await getADGroupRoles({\n\t\t\t\tpageSize: this.props.pageSize.value,\n\t\t\t\tpageIndex: this.props.pageIndex,\n\t\t\t\thealthSystemId: hsId,\n\t\t\t\thospitalId: selectedHospitalId || null,\n\t\t\t});\n\t\t\tnewState.groupRoles = adGroupRoles;\n\t\t\tnewState.totalGroupRoles = total;\n\t\t}\n\t\tif (selectedHealthSystem) {\n\t\t\tawait this.getHospitals(selectedHealthSystem);\n\t\t}\n\t\tthis.setState(newState);\n\t};\n\n\tgetHealthSystemHospitals = async healthSystemId => {\n\t\tconst firstHSHospitals = await getHealthSystemHospitals(healthSystemId);\n\t\treturn this.transformHealthSystemsForSelect(firstHSHospitals);\n\t};\n\n\ttransformHealthSystemsForSelect = healthSystems => {\n\t\treturn healthSystems.map(healthSystem => {\n\t\t\treturn { label: healthSystem.name, value: healthSystem.id };\n\t\t});\n\t};\n\n\tonHospitalSelect = selection => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisLoading: true,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.props.setSelectedHospital(selection);\n\t\t\t}\n\t\t);\n\t};\n\n\tonHealthSystemSelect = healthSystem => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisLoading: true,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.props.setSelectedHealthSystem(healthSystem);\n\t\t\t}\n\t\t);\n\t};\n\n\tonHealthSystemChange = async e => {\n\t\tconst { value } = e.target;\n\t\tthis.setState({\n\t\t\tisModalHospitalsLoading: true,\n\t\t});\n\t\tconst hsHospitals = value !== '0' ? await getHealthSystemHospitals(value) : [];\n\t\tconst formHospitals = hsHospitals.map(hospital => ({ id: hospital.id, value: hospital.name }));\n\t\tthis.setState({\n\t\t\tformHospitals,\n\t\t\tisModalHospitalsLoading: false,\n\t\t});\n\t};\n\n\ttransformArray = (array, type, isHealthSystem, shouldAppendAll = true, propName = 'name') => {\n\t\tif (type === this.transformTypes.WithValues) {\n\t\t\tconst newArray = array.map(item => {\n\t\t\t\treturn { id: item.id, value: item[propName] };\n\t\t\t});\n\t\t\tif (shouldAppendAll) {\n\t\t\t\tif (isHealthSystem) {\n\t\t\t\t\tif (this.role === UserRoles.ADMIN) {\n\t\t\t\t\t\tnewArray.unshift({ id: '0', value: 'All' });\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tnewArray.unshift({ id: '0', value: 'All' });\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn newArray;\n\t\t}\n\t\tif (type === this.transformTypes.WithLabels) {\n\t\t\tconst newArray = array.map(item => {\n\t\t\t\treturn { value: item.id, label: item[propName] };\n\t\t\t});\n\t\t\tif (shouldAppendAll) {\n\t\t\t\tif (isHealthSystem) {\n\t\t\t\t\tif (this.role === UserRoles.ADMIN) {\n\t\t\t\t\t\tnewArray.unshift({ value: '0', label: 'All' });\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tnewArray.unshift({ value: '0', label: 'All' });\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn newArray;\n\t\t}\n\t\treturn [];\n\t};\n\n\ttoggleConfigModal = () => {\n\t\tthis.setState({\n\t\t\tisModalOpen: !this.state.isModalOpen,\n\t\t});\n\t};\n\n\topenDeleteModal = editConfig => {\n\t\tthis.setState({\n\t\t\teditConfig,\n\t\t\tisDeleteConfigModalOpen: true,\n\t\t});\n\t};\n\n\tgetADButtons = config => {\n\t\tconst password = `${config.password.slice(0, 3)}************`;\n\n\t\tconst editConfig = {\n\t\t\tid: config.id,\n\t\t\thospital: config.team.name,\n\t\t\tdomain: config.domain,\n\t\t\tvalidGroupName: config.validGroupName,\n\t\t\tadClientId: config.username,\n\t\t\tadClientSecret: password,\n\t\t\tfullPassword: config.password,\n\t\t};\n\n\t\treturn (\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tlist_alt\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t this.openEditModal(editConfig)}>\n\t\t\t\t\tcreate\n\t\t\t\t\n\t\t\t\t this.openDeleteModal(editConfig)}>\n\t\t\t\t\tdelete\n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t};\n\n\tgetGroupRoleButtons = config => {\n\t\tconst editConfig = {\n\t\t\tid: config.id,\n\t\t\thospital: config.team.name,\n\t\t\trole: config.role.id,\n\t\t\tgroup: config.group,\n\t\t};\n\n\t\treturn (\n\t\t\t
    \n\t\t\t\t this.openEditModal(editConfig)}>\n\t\t\t\t\tcreate\n\t\t\t\t\n\t\t\t\t this.openDeleteModal(editConfig)}>\n\t\t\t\t\tdelete\n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t};\n\n\topenEditModal = editConfig => {\n\t\tthis.setState({\n\t\t\teditConfig,\n\t\t\tisModalOpen: true,\n\t\t});\n\t};\n\n\tsetFormHospitals = async id => {\n\t\tthis.setState({\n\t\t\tisModalHospitalsLoading: true,\n\t\t});\n\t\tconst hsHospitals = await getHealthSystemHospitals(id);\n\t\tconst formHospitals = hsHospitals.map(hospital => ({ id: hospital.id, value: hospital.name }));\n\t\tthis.setState({\n\t\t\tformHospitals,\n\t\t\tisModalHospitalsLoading: false,\n\t\t});\n\t};\n\n\ttransformActiveDirectories = () => {\n\t\tif (this.props.activeSubTab === this.activeSubTab.ADs) {\n\t\t\treturn this.state.activeDirectories.map(item => {\n\t\t\t\treturn {\n\t\t\t\t\thospital: item.team.name,\n\t\t\t\t\tdomain: item.domain,\n\t\t\t\t\tvalidGroupName: item.validGroupName,\n\t\t\t\t\tcreatedBy: `${item.userCreated.firstName} ${item.userCreated.lastName}`,\n\t\t\t\t\tdateCreated: moment(utcToLocalTime(item.dateCreated)).format('MM/DD/YYYY-hh:mm A'),\n\t\t\t\t\tedit: this.getADButtons(item),\n\t\t\t\t};\n\t\t\t});\n\t\t}\n\t\treturn this.state.groupRoles.map(item => {\n\t\t\treturn {\n\t\t\t\thospital: item.team.name,\n\t\t\t\trole: item.role.name,\n\t\t\t\tgroup: item.group,\n\t\t\t\tcreatedBy: `${item.userCreated.firstName} ${item.userCreated.lastName}`,\n\t\t\t\tdateCreated: moment(utcToLocalTime(item.dateCreated)).format('MM/DD/YYYY-hh:mm A'),\n\t\t\t\tedit: this.getGroupRoleButtons(item),\n\t\t\t};\n\t\t});\n\t};\n\n\tonPaginationChange = (pageSize, pageIndex) => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisLoading: true,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.props.onPaginationChange(pageSize, pageIndex);\n\t\t\t}\n\t\t);\n\t};\n\n\tonTabChange = tabIndex => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisLoading: true,\n\t\t\t},\n\t\t\tasync () => {\n\t\t\t\tawait this.props.onSubTabChange(tabIndex);\n\t\t\t}\n\t\t);\n\t};\n\n\tdeleteActiveDirectory = async () => {\n\t\tthis.setState({\n\t\t\tisLoading: true,\n\t\t\tisDeleteConfigModalOpen: false,\n\t\t});\n\t\tif (this.props.activeSubTab === this.activeSubTab.ADs) {\n\t\t\tawait deleteActiveDirectory(this.state.editConfig.id);\n\t\t} else if (this.props.activeSubTab === this.activeSubTab.GroupRoles) {\n\t\t\tawait deleteGroupRole(this.state.editConfig.id);\n\t\t}\n\t\tthis.getConfigurations();\n\t};\n\n\trender() {\n\t\tconst DropdownIndicator = () => {\n\t\t\treturn arrow_drop_down;\n\t\t};\n\n\t\treturn (\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t x.value === this.props.selectedHospitalId) : null}\n\t\t\t\t\t\t\tisDisabled={this.state.isHospitalDisabled}\n\t\t\t\t\t\t\tclassNamePrefix='custom-select'\n\t\t\t\t\t\t\toptions={this.state.hospitals}\n\t\t\t\t\t\t\tcomponents={{ DropdownIndicator }}\n\t\t\t\t\t\t\tonChange={this.onHospitalSelect}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t this.toggleConfigModal()}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\n\n\t\t\t\t\t
    \n\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t\t this.onTabChange(this.activeSubTab.ADs)}>AD \n\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t\t\t this.onTabChange(this.activeSubTab.GroupRoles)}>Group roles \n\t\t\t\t\t\t\t
    • \n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t this.onPaginationChange(pageSize, pageIndex)}\n\t\t\t\t/>\n\t\t\t\t this.setState({ isModalOpen: !this.state.isModalOpen, editConfig: null })}\n\t\t\t\t\tonSucceeded={this.getConfigurations}\n\t\t\t\t\thospitals={this.state.formHospitals}\n\t\t\t\t\tisHospitalLoading={this.state.isModalHospitalsLoading}\n\t\t\t\t\tonHealthSystemChange={this.onHealthSystemChange}\n\t\t\t\t/>\n\t\t\t\t this.deleteActiveDirectory()}\n\t\t\t\t\tonModalClose={() => this.setState({ isDeleteConfigModalOpen: false, editConfig: null })}>\n\t\t\t\t\t
    \n\t\t\t\t\t\t

    Warning

    \n\t\t\t\t\t\t

    {`Are you sure you want to delete this active directory ${this.props.activeSubTab === this.activeSubTab.ADs ? '' : 'group role'} ? `}

    \n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t}\n}\n\nexport default connect(\n\tstate => state.organization,\n\tdispatch => bindActionCreators(actionCreators, dispatch)\n)(ActiveDirectory);\n","import { gatewayApi, APP_CONFIG } from 'constants/global-variables';\n\nexport const getNtpConfigurations = async ({ pageSize, pageIndex, teamId, teamType }) => {\n\ttry {\n\t\tconst { data } = await gatewayApi.get(`v1/healthcare/organizations/${APP_CONFIG.companyId}/configurations/ntp`, {\n\t\t\tparams: { pageSize, pageIndex, teamId, teamType },\n\t\t});\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n\nexport const addNtpConfiguration = async (teamId, teamType, ntpUrls) => {\n\ttry {\n\t\tconst { data } = await gatewayApi.post(`v1/healthcare/organizations/${APP_CONFIG.companyId}/teams/${teamId}/team-types/${teamType}/configurations/ntp`, {\n\t\t\tntpUrls,\n\t\t});\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n\nexport const deleteNtpConfiguration = async (teamId, teamType, id) => {\n\ttry {\n\t\tconst { data } = await gatewayApi.delete(\n\t\t\t`/v1/healthcare/organizations/${APP_CONFIG.companyId}/teams/${teamId}/team-types/${teamType}/configurations/ntp/${id}`\n\t\t);\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n\nexport const getNtpConfigurationHistory = async ({ id, pageSize = 10, pageIndex = 0 }) => {\n\ttry {\n\t\tconst { data } = await gatewayApi.get(`/v1/healthcare/organizations/${APP_CONFIG.companyId}/configurations/ntp/${id}/history`, {\n\t\t\tparams: {\n\t\t\t\tpageSize,\n\t\t\t\tpageIndex,\n\t\t\t},\n\t\t});\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n\nexport const editNtpConfiguration = async ({ teamId, teamType, id, ntpUrls }) => {\n\ttry {\n\t\tconst { data } = await gatewayApi.put(\n\t\t\t`/v1/healthcare/organizations/${APP_CONFIG.companyId}/teams/${teamId}/team-types/${teamType}/configurations/ntp/${id}`,\n\n\t\t\t{ ntpUrls }\n\t\t);\n\t\treturn data;\n\t} catch (error) {\n\t\treturn { error };\n\t}\n};\n","import React, { useCallback, useEffect, useState } from 'react';\nimport { Table, Grid, Button, Modal, Form, Input, Select as SelectTag, Alert } from 'components';\nimport Select from 'react-select';\nimport Pagination from 'components/Common/Pagination';\nimport { UserRoles, TeamTypes, ConfigHistoryTypes } from 'constants/enums';\nimport moment from 'moment';\nimport { utcToLocalTime } from 'infrastructure/helpers/dateHelper';\nimport _ from 'lodash';\nimport { getUserRole } from 'infrastructure/auth';\nimport { getHealthSystemHospitals } from 'api/organization';\nimport { addNtpConfiguration, deleteNtpConfiguration, editNtpConfiguration, getNtpConfigurations } from 'api/ntpConfig';\nimport { getPort, handleOnKeyDownNumeric } from 'infrastructure/helpers/commonHelpers';\nimport { useSelector } from 'react-redux';\nimport { Link } from 'react-router-dom';\n\nconst NetworkConfig = props => {\n\tconst defaultPortValue = '123';\n\tconst initialConfigurationFormData = {\n\t\thealthSystems: props.healthSystems,\n\t\thospitals: [],\n\t\tselectedHealthSystemValue: -1,\n\t\tselectedHospitalValue: -1,\n\t\tselectedHospital: null,\n\t\tselectedHealthSystem: null,\n\t\tselectedHospitalName: '',\n\t\tselectedHealthSystemName: '',\n\t\tisEdit: false,\n\t\tntpUrl1: '',\n\t\tntpUrl2: '',\n\t\tntpPort1: defaultPortValue,\n\t\tntpPort2: defaultPortValue,\n\t\tconfigurationId: '',\n\t\terrors: {\n\t\t\thealthSystemError: null,\n\t\t\thospitalError: null,\n\t\t\tntpUrl1: null,\n\t\t\tntpUrl2: null,\n\t\t\tntpPort1: null,\n\t\t\tntpPort2: null,\n\t\t},\n\t};\n\n\tconst [isLoading, setIsLoading] = useState(true);\n\tconst [healthSystems, setHealthSystems] = useState([{ value: '0', label: 'All' }]);\n\tconst [showConfigurationModal, setShowConfigurationModal] = useState(false);\n\tconst [hospitals, setHospitals] = useState([]);\n\tconst [isHospitalDropdownDisabled, setIsHospitalDropdownDisabled] = useState(true);\n\tconst [configurations, setConfigurations] = useState([]);\n\tconst [isFormLoading, setIsFormLoading] = useState(false);\n\tconst [totalConfigs, setTotalConfigs] = useState(null);\n\tconst [configurationFormData, setConfigurationFormData] = useState(_.cloneDeep(initialConfigurationFormData));\n\tconst [isDeleteConfigModalOpen, setIsDeleteConfigModalOpen] = useState(false);\n\tconst [deleteConfig, setDeleteConfig] = useState(null);\n\tconst [editConfig, setEditConfig] = useState(null);\n\tconst [error, setError] = useState('');\n\n\tconst ntpConfigHeaders = [{ title: 'Name' }, { title: 'Type' }, { title: 'NTP Endpoint' }, { title: 'Created By' }, { title: 'Date Created' }, { title: '' }];\n\n\tconst orgProps = useSelector(state => state.organization);\n\n\tconst role = getUserRole();\n\n\tconst transformItemsForSelect = arr => arr.map(item => ({ label: item.name, value: item.id }));\n\n\tuseEffect(() => {\n\t\tconst setHealthSystemsAndConfigs = async () => {\n\t\t\tconst healthSystemsList = transformItemsForSelect(orgProps.allHealthSystems);\n\t\t\thealthSystemsList.unshift({ value: '0', label: 'All' });\n\n\t\t\tsetHealthSystems(healthSystemsList);\n\t\t};\n\t\tsetHealthSystemsAndConfigs();\n\t}, []);\n\n\tconst getHospitalsByHealthSystemId = async healthSystemId => {\n\t\tconst response = await getHealthSystemHospitals(healthSystemId);\n\t\tif (!response.error) {\n\t\t\treturn transformItemsForSelect(response);\n\t\t}\n\t\treturn [];\n\t};\n\n\tconst openDeleteModal = config => {\n\t\tsetDeleteConfig(config);\n\t\tsetIsDeleteConfigModalOpen(true);\n\t};\n\n\tconst getActionButtons = config => (\n\t\t
    \n\t\t\t\n\t\t\t\t\n\t\t\t\t\tlist_alt\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t
    \n\t);\n\n\tuseEffect(() => {\n\t\tconst getHospitalsList = async () => {\n\t\t\tlet hospitalsList = [];\n\t\t\tif (props.selectedHealthSystem.value.toString() !== '0') {\n\t\t\t\tconst response = await getHealthSystemHospitals(props.selectedHealthSystem.value);\n\t\t\t\tif (!response.error) {\n\t\t\t\t\thospitalsList = transformItemsForSelect(response);\n\t\t\t\t\thospitalsList.unshift({ value: '0', label: 'All' });\n\t\t\t\t}\n\t\t\t}\n\t\t\tsetIsHospitalDropdownDisabled(props.selectedHealthSystem.value.toString() === '0');\n\t\t\tsetHospitals(hospitalsList);\n\t\t};\n\t\tgetHospitalsList();\n\t}, [props.selectedHealthSystem]);\n\n\tconst getConfigurations = useCallback(async () => {\n\t\tlet hsId = null;\n\t\tlet teamType = null;\n\n\t\tif (props.selectedHealthSystem && props.selectedHealthSystem.value !== '0') {\n\t\t\thsId = props.selectedHealthSystem.value;\n\t\t\tteamType = TeamTypes.HEALTHSYSTEM;\n\t\t}\n\n\t\tif (props.selectedHospitalId && props.selectedHospitalId !== '0') {\n\t\t\thsId = props.selectedHospitalId;\n\t\t\tteamType = TeamTypes.HOSPITAL;\n\t\t}\n\n\t\tconst configs = await getNtpConfigurations({\n\t\t\tpageSize: props.pageSize?.value,\n\t\t\tpageIndex: props.pageIndex,\n\t\t\tteamId: hsId,\n\t\t\tteamType,\n\t\t});\n\t\tif (configs.error) {\n\t\t\tsetError('Something went wrong!');\n\t\t\tsetIsLoading(false);\n\t\t\treturn;\n\t\t}\n\t\tif (!configs.teamNetworkNtpConfigurations.length) {\n\t\t\tsetConfigurations([]);\n\t\t\tsetIsLoading(false);\n\t\t\treturn;\n\t\t}\n\n\t\tconst transformConfigs = configs.teamNetworkNtpConfigurations.map(config => ({\n\t\t\tname: config.team.name,\n\t\t\ttype: config.team.typeId === TeamTypes.HEALTHSYSTEM ? 'Health System' : 'Hospital',\n\t\t\tntpUrl: config.ntpUrls.map(el => (\n\t\t\t\t<>\n\t\t\t\t\t{el}\n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t)),\n\t\t\tcreatedBy: `${config.userCreated.firstName} ${config.userCreated.lastName}`,\n\t\t\tdateCreated: moment(utcToLocalTime(config.dateCreated)).format('MM/DD/YYYY-hh:mm A'),\n\t\t\tactions: getActionButtons(config),\n\t\t}));\n\t\tsetTotalConfigs(configs.total);\n\t\tsetConfigurations(transformConfigs);\n\t\tsetIsLoading(false);\n\t}, [props.pageSize, props.pageIndex, props.selectedHealthSystem, props.selectedHospitalId]);\n\n\tuseEffect(() => {\n\t\tgetConfigurations();\n\t}, [getConfigurations]);\n\n\tconst onHealthSystemSelect = async selection => {\n\t\tsetIsLoading(true);\n\t\tawait props.setSelectedHealthSystem(selection);\n\t};\n\n\tconst onHospitalSelect = async selection => {\n\t\tawait props.setSelectedHospital(selection);\n\t};\n\n\tuseEffect(() => {\n\t\tif (role === UserRoles.SUPERUSER && healthSystems.length > 1) {\n\t\t\tonHealthSystemSelect(healthSystems[1]);\n\t\t}\n\t}, [healthSystems]);\n\n\tconst onFormHealthSystemSelect = async ({ id }) => {\n\t\tconst newConfigurationFormData = { ...configurationFormData };\n\t\tif (newConfigurationFormData.isEdit) {\n\t\t\treturn;\n\t\t}\n\t\tnewConfigurationFormData.errors.healthSystemError = null;\n\t\tnewConfigurationFormData.selectedHealthSystemValue = newConfigurationFormData.healthSystems.findIndex(hs => id === hs.id);\n\t\tnewConfigurationFormData.selectedHealthSystem = id;\n\t\tnewConfigurationFormData.selectedHospital = null;\n\t\tnewConfigurationFormData.selectedHospitalValue = -1;\n\n\t\tconst response = await getHospitalsByHealthSystemId(id);\n\t\tif (!response.error) {\n\t\t\tconst newArray = response.map(item => ({ id: item.value, value: item.label }));\n\t\t\tnewArray.unshift({ id: '0', value: 'All' });\n\t\t\tnewConfigurationFormData.hospitals = newArray;\n\t\t}\n\t\tsetConfigurationFormData(newConfigurationFormData);\n\t};\n\n\tconst onFormHospitalSelect = ({ id }) => {\n\t\tconst newConfigurationFormData = { ...configurationFormData };\n\t\tif (newConfigurationFormData.isEdit) {\n\t\t\treturn;\n\t\t}\n\n\t\tnewConfigurationFormData.selectedHospital = id;\n\t\tnewConfigurationFormData.selectedHospitalValue = newConfigurationFormData.hospitals.findIndex(item => id === item.id);\n\t\tnewConfigurationFormData.errors.hospitalError = null;\n\n\t\tsetConfigurationFormData(newConfigurationFormData);\n\t};\n\n\tconst resetAddConfigurationModal = async () => {\n\t\tif (editConfig) {\n\t\t\tsetEditConfig(null);\n\t\t}\n\n\t\tsetConfigurationFormData(_.cloneDeep(initialConfigurationFormData));\n\t\tsetIsFormLoading(false);\n\t};\n\n\tconst setDeviceConfiguration = async () => {\n\t\tconst maximumPortNumber = 65535;\n\t\tconst newConfigurationFormData = { ...configurationFormData };\n\t\tconst { isEdit, selectedHealthSystemValue, errors, ntpUrl1, ntpUrl2, ntpPort1, ntpPort2 } = newConfigurationFormData;\n\t\tlet hasError = false;\n\n\t\tif (!isEdit && selectedHealthSystemValue === -1) {\n\t\t\terrors.healthSystemError = 'Please select a health system.';\n\t\t\thasError = true;\n\t\t}\n\n\t\tconst URL = /^((https?|ftp):\\/\\/)?(www.)?(((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:)*@)?(((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5]))|((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.?)(:\\d*)?)(\\/((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)+(\\/(([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)*)*)?)?(\\?((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|[\\uE000-\\uF8FF]|\\/|\\?)*)?(\\#((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|\\/|\\?)*)?$/i;\n\n\t\tif (ntpUrl1 && !URL.test(ntpUrl1)) {\n\t\t\terrors.ntpUrl1 = 'Please enter valid URL.';\n\t\t\thasError = true;\n\t\t}\n\n\t\tif (ntpUrl2 && !URL.test(ntpUrl2)) {\n\t\t\terrors.ntpUrl2 = 'Please enter valid URL.';\n\t\t\thasError = true;\n\t\t}\n\n\t\tif (!ntpUrl1 && !ntpUrl2) {\n\t\t\terrors.ntpUrl1 = 'Please set at least 1 NTP Endpoint.';\n\t\t\thasError = true;\n\t\t}\n\n\t\tif (ntpUrl1 && !ntpPort1) {\n\t\t\terrors.ntpPort1 = 'Please set the NTP Port.';\n\t\t\thasError = true;\n\t\t}\n\n\t\tif (ntpPort1 && +ntpPort1 > maximumPortNumber) {\n\t\t\terrors.ntpPort1 = `Maximum port number is ${maximumPortNumber}.`;\n\t\t\thasError = true;\n\t\t}\n\n\t\tif (ntpPort1 && +ntpPort1 < 0) {\n\t\t\terrors.ntpPort1 = 'Port cannot be a negative number.';\n\t\t\thasError = true;\n\t\t}\n\n\t\tif (ntpUrl2 && !ntpPort2) {\n\t\t\terrors.ntpPort2 = 'Please set the NTP Port.';\n\t\t\thasError = true;\n\t\t}\n\n\t\tif (ntpPort2 && +ntpPort2 > maximumPortNumber) {\n\t\t\terrors.ntpPort2 = `Maximum port number is ${maximumPortNumber}.`;\n\t\t\thasError = true;\n\t\t}\n\n\t\tif (ntpPort2 && +ntpPort2 < 0) {\n\t\t\terrors.ntpPort2 = `Port cannot be a negative number.`;\n\t\t\thasError = true;\n\t\t}\n\n\t\tif (ntpUrl1 && ntpUrl2 && ntpPort1 && ntpPort2 && ntpUrl1 === ntpUrl2 && ntpPort1 === ntpPort2) {\n\t\t\terrors.ntpUrl2 = 'Endpoint + port fields should be unique';\n\t\t\thasError = true;\n\t\t}\n\n\t\tif (hasError) {\n\t\t\tsetConfigurationFormData(newConfigurationFormData);\n\t\t\treturn;\n\t\t}\n\n\t\tsetIsFormLoading(true);\n\t\tconst teamId =\n\t\t\tnewConfigurationFormData.selectedHospital && newConfigurationFormData.selectedHospital !== '0'\n\t\t\t\t? newConfigurationFormData.selectedHospital\n\t\t\t\t: newConfigurationFormData.selectedHealthSystem;\n\t\tconst teamTypeId =\n\t\t\tnewConfigurationFormData.selectedHospital && newConfigurationFormData.selectedHospital !== '0' ? TeamTypes.HOSPITAL : TeamTypes.HEALTHSYSTEM;\n\t\tconst configId = newConfigurationFormData.configurationId;\n\n\t\tconst ntpUrls = [];\n\t\tif (newConfigurationFormData.ntpUrl1) {\n\t\t\tconst firstUrlPort = `${newConfigurationFormData.ntpUrl1}:${newConfigurationFormData.ntpPort1}`;\n\t\t\tntpUrls.push(firstUrlPort);\n\t\t}\n\t\tif (newConfigurationFormData.ntpUrl2) {\n\t\t\tconst secondUrlPort = `${newConfigurationFormData.ntpUrl2}:${newConfigurationFormData.ntpPort2}`;\n\t\t\tntpUrls.push(secondUrlPort);\n\t\t}\n\n\t\tconst editParams = {\n\t\t\tteamId,\n\t\t\tteamType: teamTypeId,\n\t\t\tid: configId,\n\t\t\tntpUrls,\n\t\t};\n\n\t\tconst { hasSucceeded } = !newConfigurationFormData.isEdit ? await addNtpConfiguration(teamId, teamTypeId, ntpUrls) : await editNtpConfiguration(editParams);\n\n\t\tif (!hasSucceeded) {\n\t\t\tsetIsFormLoading(false);\n\t\t\treturn;\n\t\t}\n\n\t\tresetAddConfigurationModal();\n\t\tsetShowConfigurationModal(false);\n\t\tgetConfigurations();\n\t};\n\n\tconst toggleConfigurationModal = async (config = null) => {\n\t\tconst newConfigurationFormData = { ...configurationFormData };\n\t\tif (!showConfigurationModal) {\n\t\t\tnewConfigurationFormData.healthSystems = orgProps.allHealthSystems.map(hs => ({ id: hs.id, value: hs.name }));\n\t\t\tnewConfigurationFormData.isEdit = !!config;\n\t\t\tif (!newConfigurationFormData.isEdit) {\n\t\t\t\tsetEditConfig(null);\n\t\t\t}\n\n\t\t\tif (role === UserRoles.SUPERUSER && !newConfigurationFormData.isEdit) {\n\t\t\t\tnewConfigurationFormData.selectedHealthSystemValue = 0;\n\t\t\t\tonFormHealthSystemSelect(newConfigurationFormData.healthSystems[0]);\n\t\t\t}\n\n\t\t\tif (newConfigurationFormData.isEdit) {\n\t\t\t\tif (config.team.typeId === TeamTypes.HEALTHSYSTEM) {\n\t\t\t\t\tnewConfigurationFormData.selectedHealthSystem = config.team.id;\n\t\t\t\t\tnewConfigurationFormData.selectedHealthSystemName = config.team.name;\n\t\t\t\t}\n\t\t\t\tif (config.team.typeId === TeamTypes.HOSPITAL) {\n\t\t\t\t\tnewConfigurationFormData.selectedHospital = config.team.id;\n\t\t\t\t\tnewConfigurationFormData.selectedHospitalName = config.team.name;\n\t\t\t\t}\n\t\t\t\tnewConfigurationFormData.ntpUrl1 = config.ntpUrls[0].substr(0, config.ntpUrls[0].lastIndexOf(':'));\n\t\t\t\tnewConfigurationFormData.ntpPort1 = getPort(config.ntpUrls[0]).toString();\n\t\t\t\tnewConfigurationFormData.ntpUrl2 = config.ntpUrls.length > 1 ? config.ntpUrls[1].substr(0, config.ntpUrls[1].lastIndexOf(':')) : '';\n\t\t\t\tnewConfigurationFormData.ntpPort2 = config.ntpUrls.length > 1 ? getPort(config.ntpUrls[1]).toString() : defaultPortValue;\n\t\t\t\tnewConfigurationFormData.configurationId = config.id;\n\t\t\t}\n\n\t\t\tsetConfigurationFormData(newConfigurationFormData);\n\t\t} else {\n\t\t\tresetAddConfigurationModal();\n\t\t}\n\t\tsetShowConfigurationModal(prevState => !prevState);\n\t};\n\n\tuseEffect(() => {\n\t\tif (editConfig) {\n\t\t\ttoggleConfigurationModal(editConfig);\n\t\t}\n\t}, [editConfig]);\n\n\tconst onPaginationChange = async (size, index) => {\n\t\tsetIsLoading(true);\n\t\tawait props.onPaginationChange(size, index);\n\t};\n\n\tconst submitDeleteConfig = async () => {\n\t\tsetError('');\n\t\tsetIsLoading(true);\n\t\tsetIsDeleteConfigModalOpen(false);\n\n\t\tconst deleteRes = await deleteNtpConfiguration(deleteConfig.team.id, deleteConfig.team.typeId, deleteConfig.id);\n\n\t\tif (deleteRes.error) {\n\t\t\tsetError('Something went wrong! Please try again.');\n\t\t\tsetIsLoading(false);\n\t\t\treturn;\n\t\t}\n\n\t\tgetConfigurations();\n\t};\n\n\tconst onDeleteModal = () => {\n\t\tsetIsDeleteConfigModalOpen(false);\n\t\tsetDeleteConfig(null);\n\t};\n\n\tconst DropdownIndicator = () => {\n\t\treturn arrow_drop_down;\n\t};\n\n\tconst onInputChange = e => {\n\t\tconst newConfigurationFormData = { ...configurationFormData };\n\t\tnewConfigurationFormData[e.target.name] = e.target.value;\n\t\tnewConfigurationFormData.errors[e.target.name] = null;\n\t\tsetConfigurationFormData(newConfigurationFormData);\n\t};\n\n\treturn (\n\t\t
    \n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t x.value === props.selectedHospitalId) : null}\n\t\t\t\t\t\tisDisabled={isHospitalDropdownDisabled}\n\t\t\t\t\t\tclassNamePrefix='custom-select'\n\t\t\t\t\t\toptions={hospitals}\n\t\t\t\t\t\tcomponents={{ DropdownIndicator }}\n\t\t\t\t\t\tonChange={onHospitalSelect}\n\t\t\t\t\t/>\n\t\t\t\t\t
    \n\t\t\t onPaginationChange(size, index)} />\n\t\t\t toggleConfigurationModal()}\n\t\t\t\tisLoading={isFormLoading}>\n\t\t\t\t
    event.preventDefault()}>\n\t\t\t\t\t{!configurationFormData.isEdit && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{role === UserRoles.SUPERUSER && (\n\t\t\t\t\t\t\t\t -1\n\t\t\t\t\t\t\t\t\t\t\t? configurationFormData.healthSystems[configurationFormData.selectedHealthSystemValue].value\n\t\t\t\t\t\t\t\t\t\t\t: ''\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tvalidationOptions={{}}\n\t\t\t\t\t\t\t\t\tdisabled={true}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{role !== UserRoles.SUPERUSER && (\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t\t{configurationFormData.isEdit && (\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t
    \n\t\t\t\t\t

    Warning

    \n\t\t\t\t\t

    Are you sure you want to delete this configuration ?

    \n\t\t\t\t
    \n\t\t\t\n\t\t\t\n\t\t
    \n\t);\n};\n\nexport default NetworkConfig;\n","import React from 'react';\nimport Layout from 'components/Common/Layout';\nimport { Grid, Tabs } from 'components';\nimport Header from 'components/Common/Header';\nimport UserIdleTimeout from 'components/Configurations/UserIdleTimeout';\nimport DeviceConfig from 'components/Configurations/DeviceConfig';\nimport { getHealthSystems } from 'api/users';\nimport { getUserRole } from 'infrastructure/auth';\nimport queryString from 'query-string';\nimport ActiveDirectory from 'components/Configurations/ActiveDirectory';\nimport { Roles } from 'constants/enums';\nimport NetworkConfig from 'components/Configurations/NetworkConfig';\n\nclass Configurations extends React.Component {\n\tstate = {\n\t\tisLoading: true,\n\t\tactiveTab: 0,\n\t\thealthSystems: [],\n\t\tselectedHealthSystem: { value: '0', label: 'All' },\n\t\tselectedHospitalId: null,\n\t\tselectedDepartmentId: null,\n\t\tselectedRole: { value: '0', label: 'All' },\n\t\tpageSize: { value: 10, label: '10' },\n\t\tpageIndex: 0,\n\t\tactiveSubTab: 0,\n\t};\n\n\trole = null;\n\n\tcomponentDidMount = async () => {\n\t\tconst result = await getHealthSystems();\n\t\tthis.role = getUserRole();\n\t\tconst queryParams = queryString.parse(this.props.location.search);\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\thealthSystems: result,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.setStateFromQueryString(queryParams);\n\t\t\t}\n\t\t);\n\t};\n\n\tcomponentDidUpdate(prevProps) {\n\t\tconst currentParams = queryString.parse(this.props.location.search);\n\t\tconst prevParams = queryString.parse(prevProps.location.search);\n\t\tif (this.hasQueryChanged(currentParams, prevParams)) {\n\t\t\tthis.setStateFromQueryString(currentParams);\n\t\t}\n\t}\n\n\thasQueryChanged = (currentParams, prevParams) => {\n\t\treturn (\n\t\t\tcurrentParams.pageIndex !== prevParams.pageIndex ||\n\t\t\tcurrentParams.pageSize !== prevParams.pageSize ||\n\t\t\tcurrentParams.activeTab !== prevParams.activeTab ||\n\t\t\tcurrentParams.healthSystem !== prevParams.healthSystem ||\n\t\t\tcurrentParams.hospital !== prevParams.hospital ||\n\t\t\tcurrentParams.role !== prevParams.role\n\t\t);\n\t};\n\n\tsetStateFromQueryString = queryParams => {\n\t\tconst { pageIndex, activeTab, healthSystem, hospital, department, role, activeSubTab, pageSize } = queryParams;\n\t\tconst hs = healthSystem ? this.state.healthSystems.find(x => x.id === healthSystem) : null;\n\t\tconst selectedRole = role ? Object.values(Roles).find(x => x.id === parseInt(role, 10)) : null;\n\n\t\tconst validPageSize = { value: 10, label: '10' };\n\t\tif (pageSize === '25' || pageSize === '50') {\n\t\t\tvalidPageSize.value = parseInt(pageSize, 10);\n\t\t\tvalidPageSize.label = pageSize;\n\t\t}\n\n\t\tthis.setState({\n\t\t\tpageIndex: pageIndex ? parseInt(pageIndex, 10) : 0,\n\t\t\tpageSize: validPageSize,\n\t\t\tactiveTab: activeTab ? parseInt(activeTab, 10) : 0,\n\t\t\tselectedHealthSystem: hs ? { value: hs.id, label: hs.name } : { value: '0', label: 'All' },\n\t\t\tselectedRole: selectedRole ? { value: selectedRole.id, label: selectedRole.value } : { value: '0', label: 'All' },\n\t\t\tselectedHospitalId: hospital,\n\t\t\tselectedDepartmentId: department,\n\t\t\tactiveSubTab: activeSubTab ? parseInt(activeSubTab, 10) : 0,\n\t\t\tisLoading: false,\n\t\t});\n\t};\n\n\tonHealthSystemChange = selectedHealthSystem => {\n\t\tthis.setState({\n\t\t\tselectedHospitalId: null,\n\t\t\tselectedDepartmentId: null,\n\t\t\tselectedHealthSystem,\n\t\t\tpageIndex: 0,\n\t\t});\n\t};\n\n\tonRoleChange = selectedRole => {\n\t\tthis.setState({\n\t\t\tselectedRole,\n\t\t});\n\t};\n\n\tonPaginationChange = (pageSize, pageIndex) => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tpageSize,\n\t\t\t\tpageIndex,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.pushFiltersToQueryString();\n\t\t\t}\n\t\t);\n\t};\n\n\tonSubTabChange = activeSubTab => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tactiveSubTab,\n\t\t\t\tpageSize: { value: 10, label: '10' },\n\t\t\t\tpageIndex: 0,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.pushFiltersToQueryString();\n\t\t\t}\n\t\t);\n\t};\n\n\tonHospitalChange = selectedHospital => {\n\t\tthis.setState({\n\t\t\tselectedHospitalId: selectedHospital.value,\n\t\t\tselectedDepartmentId: null,\n\t\t\tpageIndex: 0,\n\t\t});\n\t};\n\n\tonDepartmentChange = selectedDepartment => {\n\t\tthis.setState({\n\t\t\tselectedDepartmentId: selectedDepartment.value,\n\t\t});\n\t};\n\n\tonTabChange = async index => {\n\t\tthis.setState({\n\t\t\tisLoading: true,\n\t\t});\n\t\tconst healthSystems = await getHealthSystems();\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\thealthSystems,\n\t\t\t\tselectedHospitalId: null,\n\t\t\t\tselectedDepartmentId: null,\n\t\t\t\tselectedRole: { value: '0', label: 'All' },\n\t\t\t\tpageSize: { value: 10, label: '10' },\n\t\t\t\tpageIndex: 0,\n\t\t\t\tactiveSubTab: 0,\n\t\t\t\tactiveTab: parseInt(index, 10),\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.pushFiltersToQueryString();\n\t\t\t\tthis.setState({\n\t\t\t\t\tisLoading: false,\n\t\t\t\t});\n\t\t\t}\n\t\t);\n\t};\n\n\tpushFiltersToQueryString = () => {\n\t\tconst queryParams = {};\n\t\tif (this.state.pageIndex > 0) {\n\t\t\tqueryParams.pageIndex = this.state.pageIndex.toString();\n\t\t}\n\t\tif (this.state.pageSize.value > 10) {\n\t\t\tqueryParams.pageSize = this.state.pageSize.value.toString();\n\t\t}\n\t\tif (this.state.activeTab > 0) {\n\t\t\tqueryParams.activeTab = this.state.activeTab.toString();\n\t\t}\n\t\tif (this.state.selectedHealthSystem !== null && this.state.selectedHealthSystem.value !== '0') {\n\t\t\tqueryParams.healthSystem = this.state.selectedHealthSystem.value;\n\t\t}\n\t\tif (this.state.selectedHospitalId !== null && this.state.selectedHospitalId !== '0' && this.state.selectedHospitalId !== 0) {\n\t\t\tqueryParams.hospital = this.state.selectedHospitalId;\n\t\t}\n\t\tif (this.state.selectedDepartmentId !== null && this.state.selectedDepartmentId !== '0' && this.state.selectedDepartmentId !== 0) {\n\t\t\tqueryParams.department = this.state.selectedDepartmentId;\n\t\t}\n\t\tif (this.state.selectedRole !== null && this.state.selectedRole.value !== '0') {\n\t\t\tqueryParams.role = this.state.selectedRole.value.toString();\n\t\t}\n\t\tif (this.state.activeSubTab > 0) {\n\t\t\tqueryParams.activeSubTab = this.state.activeSubTab.toString();\n\t\t}\n\t\tthis.props.history.push({ search: queryString.stringify(queryParams) });\n\t};\n\n\ttabs = {\n\t\tUSER_IDLE_TIMEOUT: 0,\n\t\tDEVICE: 1,\n\t\tACTIVE_DIRECTORY: 2,\n\t\tNETWORK: 3,\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t\n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t

    Configurations

    \n\t\t\t\t\t\t\t\t\t,\n\t\t\t\t\t\t\t\t\t\t\t,\n\t\t\t\t\t\t\t\t\t\t\t,\n\t\t\t\t\t\t\t\t\t\t\t,\n\t\t\t\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t\t\t\t\tonTabChange={this.onTabChange}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t
    \n\t\t);\n\t}\n}\nexport default Configurations;\n","import React from 'react';\nimport Layout from 'components/Common/Layout';\nimport { Grid, Table } from 'components';\nimport Header from 'components/Common/Header';\nimport Pagination from 'components/Common/Pagination';\nimport { getUserIdleConfigurationHistory, getDeviceConfigurationHistory } from 'api/userIdleConfigurations';\nimport moment from 'moment';\nimport { utcToLocalTime } from 'infrastructure/helpers/dateHelper';\nimport { ConfigHistoryTypes, TeamTypes, TelehealthTv } from 'constants/enums';\nimport { getActiveDirectoriesHistory } from 'api/activeDirectories';\nimport { getTeamConfigurationProfilesHisotry } from 'api/teamConfigurationProfiles';\nimport { getNtpConfigurationHistory } from 'api/ntpConfig';\n\nexport default class ConfigurationsHistory extends React.Component {\n\tstate = {\n\t\tisLoading: true,\n\t\tpageSize: { value: 10, label: '10' },\n\t\tpageIndex: 0,\n\t\ttotalConfigs: 0,\n\t\tconfigs: [],\n\t\ttitle: '',\n\t};\n\n\tuserIdleHeaders = [{ title: 'Health System' }, { title: 'Role' }, { title: 'Timeout Minutes' }, { title: 'Edited by' }, { title: 'Date Edited' }];\n\n\tdeviceConfigHeaders = [\n\t\t{ title: 'Department' },\n\t\t{ title: 'HDMI Port' },\n\t\t{ title: 'Default Source' },\n\t\t{ title: 'Ringtone Volume' },\n\t\t{ title: 'TV' },\n\t\t{ title: 'Profile name' },\n\t\t{ title: 'Edited by' },\n\t\t{ title: 'Date Edited' },\n\t];\n\n\tactiveDirectoriesHeaders = [{ title: 'Hospital' }, { title: 'Domain' }, { title: 'Valid Group Name' }, { title: 'Edited by' }, { title: 'Date Edited' }];\n\n\tteamProfileHeaders = [\n\t\t{ title: 'Health System' },\n\t\t{ title: 'Profile Name' },\n\t\t{ title: 'URL' },\n\t\t{ title: 'Port' },\n\t\t{ title: 'Edited by' },\n\t\t{ title: 'Date Edited' },\n\t];\n\n\tntpConfigHeaders = [{ title: 'Name' }, { title: 'Type' }, { title: 'NTP Endpoint' }, { title: 'Edited By' }, { title: 'Date Edited' }];\n\n\tendCallSource = {\n\t\t0: 'TV Channels',\n\t\t1: 'HDMI 1',\n\t\t2: 'HDMI 2',\n\t\t3: 'HDMI 3',\n\t};\n\n\tactiveDirectory = null;\n\n\tteamProfile = null;\n\n\tntpConfigurations = null;\n\n\tcomponentDidMount = () => {\n\t\tthis.getConfigurationHistory();\n\t};\n\n\tgetConfigurationHistory = async () => {\n\t\tconst { id, type } = this.props.match.params;\n\t\tconst params = { id: id, pageSize: this.state.pageSize.value, pageIndex: this.state.pageIndex };\n\n\t\tif (type === ConfigHistoryTypes.UserIdle) {\n\t\t\tconst result = await getUserIdleConfigurationHistory(params);\n\t\t\tthis.setState({\n\t\t\t\tconfigs: result.history,\n\t\t\t\ttotalConfigs: result.total,\n\t\t\t\ttitle: `History for ${result.userIdleConfiguration.team.name}, role ${result.userIdleConfiguration.role.name}`,\n\t\t\t\tisLoading: false,\n\t\t\t});\n\t\t} else if (type === ConfigHistoryTypes.Devices) {\n\t\t\tconst result = await getDeviceConfigurationHistory(id, {\n\t\t\t\tpageSize: this.state.pageSize.value,\n\t\t\t\tpageIndex: this.state.pageIndex,\n\t\t\t\tteamTypeId: TeamTypes.DEPARTMENT,\n\t\t\t});\n\n\t\t\tthis.setState({\n\t\t\t\tconfigs: result.deviceConfigurations,\n\t\t\t\ttotalConfigs: result.total,\n\t\t\t\ttitle: `History for ${result.deviceConfiguration.team.name}`,\n\t\t\t\tisLoading: false,\n\t\t\t});\n\t\t} else if (type === ConfigHistoryTypes.ADs) {\n\t\t\tconst result = await getActiveDirectoriesHistory(id, {\n\t\t\t\tpageSize: this.state.pageSize.value,\n\t\t\t\tpageIndex: this.state.pageIndex,\n\t\t\t});\n\n\t\t\tthis.activeDirectory = result.activeDirectory;\n\n\t\t\tthis.setState({\n\t\t\t\tconfigs: result.history,\n\t\t\t\ttotalConfigs: result.total,\n\t\t\t\ttitle: `History for ${result.activeDirectory.team.name}, domain: ${result.activeDirectory.domain}, valid group name: ${result.activeDirectory.validGroupName}`,\n\t\t\t\tisLoading: false,\n\t\t\t});\n\t\t} else if (type === ConfigHistoryTypes.TeamConfigurationProfiles) {\n\t\t\tconst result = await getTeamConfigurationProfilesHisotry({\n\t\t\t\tid,\n\t\t\t\tpageSize: this.state.pageSize.value,\n\t\t\t\tpageIndex: this.state.pageIndex,\n\t\t\t});\n\n\t\t\tthis.teamProfile = result.teamConfigurationProfile;\n\t\t\tthis.setState({\n\t\t\t\tconfigs: result.history,\n\t\t\t\ttotalConfigs: result.total,\n\t\t\t\ttitle: `History for ${result.teamConfigurationProfile.team.name}`,\n\t\t\t\tisLoading: false,\n\t\t\t});\n\t\t} else if (type === ConfigHistoryTypes.NtpConfiguration) {\n\t\t\tconst result = await getNtpConfigurationHistory({\n\t\t\t\tid,\n\t\t\t\tpageSize: this.state.pageSize.value,\n\t\t\t\tpageIndex: this.state.pageIndex,\n\t\t\t});\n\n\t\t\tif (!result.error) {\n\t\t\t\tthis.ntpConfigurations = result.teamNetworkNtpConfiguration;\n\t\t\t\tthis.setState({\n\t\t\t\t\tconfigs: result.history,\n\t\t\t\t\ttotalConfigs: result.total,\n\t\t\t\t\ttitle: `Ntp Configuration history for ${result.teamNetworkNtpConfiguration.team.name}`,\n\t\t\t\t});\n\t\t\t}\n\t\t\tthis.setState({\n\t\t\t\tisLoading: false,\n\t\t\t});\n\t\t}\n\t};\n\n\tonPaginationChange = (pageSize, pageIndex) => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tisLoading: true,\n\t\t\t\tpageSize,\n\t\t\t\tpageIndex,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.getConfigurationHistory();\n\t\t\t}\n\t\t);\n\t};\n\n\tgetClassName = config => {\n\t\tif (config.isActive) {\n\t\t\treturn 'active-configuration';\n\t\t}\n\t\tif (config.isDeleted) {\n\t\t\treturn 'deleted-configuration';\n\t\t}\n\t\treturn '';\n\t};\n\n\ttransformConfigurations = () => {\n\t\tconst configs = this.state.configs.map(config => {\n\t\t\tif (this.props.match.params.type === ConfigHistoryTypes.UserIdle) {\n\t\t\t\treturn {\n\t\t\t\t\thealthSystem: config.team.name,\n\t\t\t\t\trole: config.role.name,\n\t\t\t\t\ttimeoutMinutes: config.timeoutMinutes,\n\t\t\t\t\tcreatedBy: `${config.userCreated.firstName} ${config.userCreated.lastName}`,\n\t\t\t\t\tdateCreated: moment(utcToLocalTime(config.dateCreated)).format('MM/DD/YYYY-hh:mm A'),\n\t\t\t\t\tclassName: config.isActive ? 'active-configuration' : '',\n\t\t\t\t};\n\t\t\t}\n\t\t\tif (this.props.match.params.type === ConfigHistoryTypes.Devices) {\n\t\t\t\treturn {\n\t\t\t\t\thospital: config.team.name,\n\t\t\t\t\thdmiPort: config.hdmiPort,\n\t\t\t\t\tdefaultSource: this.endCallSource[config.defaultSource],\n\t\t\t\t\tringtoneVolume: config.ringtoneVolume,\n\t\t\t\t\ttv: config.tv === TelehealthTv.value ? TelehealthTv.label : config.tv,\n\t\t\t\t\tprofileName: config.teamConfigurationProfile ? config.teamConfigurationProfile.profileName : '',\n\t\t\t\t\tcreatedBy: `${config.userCreated.firstName} ${config.userCreated.lastName}`,\n\t\t\t\t\tdateCreated: moment(utcToLocalTime(config.dateCreated)).format('MM/DD/YYYY-hh:mm A'),\n\t\t\t\t\tclassName: this.getClassName(config),\n\t\t\t\t};\n\t\t\t}\n\t\t\tif (this.props.match.params.type === ConfigHistoryTypes.ADs) {\n\t\t\t\treturn {\n\t\t\t\t\thospital: config.team.name,\n\t\t\t\t\tdomain: config.domain,\n\t\t\t\t\tvalidGroupName: config.validGroupName,\n\t\t\t\t\teditedBy: config.userEdited ? `${config.userEdited.firstName} ${config.userEdited.lastName}` : '',\n\t\t\t\t\tdateEdited: moment(utcToLocalTime(config.dateEdited)).format('MM/DD/YYYY-hh:mm A'),\n\t\t\t\t\tclassName: '',\n\t\t\t\t};\n\t\t\t}\n\t\t\tif (this.props.match.params.type === ConfigHistoryTypes.TeamConfigurationProfiles) {\n\t\t\t\treturn {\n\t\t\t\t\thealthSystem: config.team.name,\n\t\t\t\t\tprofileName: config.profileName,\n\t\t\t\t\turl: config.url,\n\t\t\t\t\tport: config.port,\n\t\t\t\t\tcreatedBy: config.userEdited ? `${config.userEdited.firstName} ${config.userEdited.lastName}` : '',\n\t\t\t\t\tdateCreated: moment(utcToLocalTime(config.dateEdited)).format('MM/DD/YYYY-hh:mm A'),\n\t\t\t\t\tclassName: config.isActive ? 'active-configuration' : '',\n\t\t\t\t};\n\t\t\t}\n\t\t\tif (this.props.match.params.type === ConfigHistoryTypes.NtpConfiguration) {\n\t\t\t\treturn {\n\t\t\t\t\tname: config.team.name,\n\t\t\t\t\ttype: config.team.typeId === TeamTypes.HEALTHSYSTEM ? 'Health System' : 'Hospital',\n\t\t\t\t\tntpUrl: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{config.ntpUrls.map(el => (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t{el}\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\n\t\t\t\t\t),\n\t\t\t\t\tcreatedBy: `${config.userEdited.firstName} ${config.userEdited.lastName}`,\n\t\t\t\t\tdateCreated: moment(utcToLocalTime(config.dateEdited)).format('MM/DD/YYYY-hh:mm A'),\n\t\t\t\t\tclassName: this.getClassName(config),\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn null;\n\t\t});\n\n\t\tif (this.props.match.params.type === ConfigHistoryTypes.ADs) {\n\t\t\tconfigs.unshift({\n\t\t\t\thospital: this.activeDirectory.team.name,\n\t\t\t\tdomain: this.activeDirectory.domain,\n\t\t\t\tvalidGroupName: this.activeDirectory.validGroupName,\n\t\t\t\teditedBy: `${this.activeDirectory.userCreated.firstName} ${this.activeDirectory.userCreated.lastName}`,\n\t\t\t\tdateEdited: moment(utcToLocalTime(this.activeDirectory.dateCreated)).format('MM/DD/YYYY-hh:mm A'),\n\t\t\t\tclassName: 'active-configuration',\n\t\t\t});\n\t\t} else if (this.props.match.params.type === ConfigHistoryTypes.TeamConfigurationProfiles) {\n\t\t\tconfigs.unshift({\n\t\t\t\thealthSystem: this.teamProfile.team.name,\n\t\t\t\tprofileName: this.teamProfile.profileName,\n\t\t\t\turl: this.teamProfile.url,\n\t\t\t\tport: this.teamProfile.port,\n\t\t\t\tcreatedBy: `${this.teamProfile.userCreated.firstName} ${this.teamProfile.userCreated.lastName}`,\n\t\t\t\tdateCreated: moment(utcToLocalTime(this.teamProfile.dateCreated)).format('MM/DD/YYYY-hh:mm A'),\n\t\t\t\tclassName: 'active-configuration',\n\t\t\t});\n\t\t} else if (this.props.match.params.type === ConfigHistoryTypes.NtpConfiguration) {\n\t\t\tconfigs.unshift({\n\t\t\t\tname: this.ntpConfigurations.team.name,\n\t\t\t\ttype: this.ntpConfigurations.team.typeId === TeamTypes.HEALTHSYSTEM ? 'Health System' : 'Hospital',\n\t\t\t\tntpUrl: (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{this.ntpConfigurations.ntpUrls.map(el => (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{el}\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t))}\n\t\t\t\t\t\n\t\t\t\t),\n\t\t\t\tcreatedBy: `${this.ntpConfigurations.userCreated.firstName} ${this.ntpConfigurations.userCreated.lastName}`,\n\t\t\t\tdateCreated: moment(utcToLocalTime(this.ntpConfigurations.dateCreated)).format('MM/DD/YYYY-hh:mm A'),\n\t\t\t\tclassName: this.getClassName(this.ntpConfigurations),\n\t\t\t});\n\t\t}\n\t\treturn configs;\n\t};\n\n\tgetHeaders = () => {\n\t\tswitch (this.props.match.params.type) {\n\t\t\tcase ConfigHistoryTypes.UserIdle:\n\t\t\t\treturn this.userIdleHeaders;\n\t\t\tcase ConfigHistoryTypes.Devices:\n\t\t\t\treturn this.deviceConfigHeaders;\n\t\t\tcase ConfigHistoryTypes.ADs:\n\t\t\t\treturn this.activeDirectoriesHeaders;\n\t\t\tcase ConfigHistoryTypes.TeamConfigurationProfiles:\n\t\t\t\treturn this.teamProfileHeaders;\n\t\t\tcase ConfigHistoryTypes.NtpConfiguration:\n\t\t\t\treturn this.ntpConfigHeaders;\n\t\t\tdefault:\n\t\t\t\treturn [];\n\t\t}\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t\n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t window.history.back()}>\n\t\t\t\t\t\t\t\t\t\t\tkeyboard_arrow_left\n\t\t\t\t\t\t\t\t\t\t\tGo back to configurations\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t

    {this.state.title}

    \n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t this.onPaginationChange(pageSize, pageIndex)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n","import React from 'react';\nimport { Route } from 'react-router-dom';\nimport Loader from 'components/Loader';\nimport Grid from 'components/Grid';\nimport { memberExists } from 'infrastructure/auth';\nimport UserError from 'views/UserError';\nimport { AuthConsumer } from 'providers/authProvider';\n\nconst JWTAuthenticatedRoute = ({ component, ...rest }) => {\n\tconst renderFn = Component => props => (\n\t\t\n\t\t\t{({ isAzureAuthentication, signinRedirect }) => {\n\t\t\t\tif (!!Component && isAzureAuthentication()) {\n\t\t\t\t\tif (memberExists() || props.match.url === '/logout') {\n\t\t\t\t\t\treturn ;\n\t\t\t\t\t}\n\t\t\t\t\treturn ;\n\t\t\t\t}\n\n\t\t\t\tsigninRedirect(true);\n\t\t\t\treturn (\n\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t);\n\t\t\t}}\n\t\t
    \n\t);\n\n\treturn ;\n};\n\nexport default JWTAuthenticatedRoute;\n","import React from 'react';\nimport Grid from 'components/Grid';\n\nconst TimeError = () => (\n\t\n\t\t
    \n\t\t\t

    Invalid datetime of token.

    \n\t\t\tmember-error\n\t\t\t

    The token seems to be invalid. Please make sure your machine has the current time zone and/or Date and time and try again.

    \n\t\t\t {\n\t\t\t\t\twindow.location.href = '/logout';\n\t\t\t\t}}>\n\t\t\t\tClick here to go back to login screen.\n\t\t\t\n\t\t
    \n\t
    \n);\n\nexport default TimeError;\n","import * as React from 'react';\nimport { Route, Switch } from 'react-router-dom';\n\nimport Callback from 'components/auth/callback';\nimport { Logout } from 'components/auth/logout';\nimport { LogoutCallback } from 'components/auth/logoutCallback';\nimport { PrivateRoute } from 'routes/privateRoute';\n// import { Register } from \"components/auth/register\";\nimport { SilentRenew } from 'components/auth/silentRenew';\nimport Organization from 'views/Organization/Organization';\nimport Monitoring from 'views/Monitoring';\nimport CallLogs from 'views/CallLogs';\nimport Call from 'views/Call';\nimport PatientFeed from 'views/PatientFeed';\nimport Users from 'views/Users';\nimport Login from 'views/Login';\nimport CreateHealthSystem from 'views/CreateHealthSystem';\nimport CompleteProfile from 'views/CompleteProfile';\nimport Help from 'views/Help';\nimport Recover from 'views/Recover';\nimport ResetPassword from 'views/ResetPassword';\nimport { UserRoles } from 'constants/enums';\nimport Configurations from 'views/Configurations';\nimport ConfigurationsHistory from 'views/ConfigurationsHistory';\nimport JWTAuthenticatedRoute from 'routes/jwtAuthenticatedRoute';\nimport TimeError from 'views/TimeError';\n\n// eslint-disable-next-line import/prefer-default-export\nexport const Routes = (\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n);\n","import React from 'react';\nimport { AuthConsumer } from '../../providers/authProvider';\nimport Loader from 'components/Loader';\nimport Grid from 'components/Grid';\n\nexport const Logout = () => (\n\t\n\t\t{({ logout }) => {\n\t\t\tlogout();\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t);\n\t\t}}\n\t
    \n);\n","import React from 'react';\nimport { AuthConsumer } from '../../providers/authProvider';\nimport Loader from 'components/Loader';\nimport Grid from 'components/Grid';\n\nexport const LogoutCallback = () => (\n\t\n\t\t{({ signoutRedirectCallback }) => {\n\t\t\tsignoutRedirectCallback();\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t);\n\t\t}}\n\t
    \n);\n","import React from 'react';\nimport { AuthConsumer } from '../../providers/authProvider';\nimport Loader from 'components/Loader';\nimport Grid from 'components/Grid';\n\nexport const SilentRenew = () => (\n\t\n\t\t{({ signinSilentCallback }) => {\n\t\t\tsigninSilentCallback();\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t);\n\t\t}}\n\t
    \n);\n","import React from 'react';\nimport io from 'socket.io-client';\nimport _ from 'lodash';\nimport SocketEvents from 'constants/socket-events';\nimport { PresenceStatusType, SocketState, DeviceStatus, ParticipantState, UserRoles } from 'constants/enums';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { actionCreators as organizationActionCreators } from 'state/organization/actions';\nimport { isAuthenticated, getAccessToken, getUserId, hasUserProfile, getUserProfile, memberExists, getUserRole } from 'infrastructure/auth';\nimport { fetchNotificationCounter } from 'state/notifications/actions';\nimport { fetchUserPresence, fetchUserPresenceSucceeded, userPresenceUpdateSucceeded } from 'state/userPresence/actions';\nimport { APP_CONFIG, BanyanClientType, BanyanAppType } from 'constants/global-variables';\nimport { SocketContext } from './SocketContext';\nimport { findDeviceById } from 'infrastructure/helpers/commonHelpers';\n\nclass Socket extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.connect();\n\t}\n\n\tconnect = () => {\n\t\tif (!isAuthenticated() || !memberExists()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst signalingUrl = `${\n\t\t\tprocess.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test' ? process.env.REACT_APP_SIGNALING_URL : window.__env__.REACT_APP_SIGNALING_URL\n\t\t}banyan`;\n\n\t\tthis._socket = io.connect(signalingUrl, {\n\t\t\tsecure: true,\n\t\t\ttransports: ['websocket'],\n\t\t});\n\n\t\tthis.initSocketListeners();\n\t};\n\n\tinitSocketListeners = () => {\n\t\tconst { _socket } = this;\n\t\tlet myClientInfo = null;\n\t\tlet mySocketId = null;\n\n\t\t_socket.on(SocketEvents.Client.ON_CONNECT, () => {\n\t\t\t// change socket state to SocketState.CONNECTED only if it's from re-connection\n\t\t\tif (mySocketId) {\n\t\t\t\tthis.props.onConnectionStateChange(SocketState.CONNECTED);\n\t\t\t}\n\n\t\t\tmyClientInfo = {\n\t\t\t\ttoken: getAccessToken(),\n\t\t\t\tclearConferences: false,\n\t\t\t\tclientType: BanyanClientType,\n\t\t\t\tappType: BanyanAppType,\n\t\t\t\tversionName: APP_CONFIG.buildNumber,\n\t\t\t\toldSocketId: mySocketId,\n\t\t\t\tincomingCallsDisabled: this.props.shouldDisableIncomingCalls(),\n\t\t\t};\n\n\t\t\tmySocketId = _socket.id;\n\t\t\t_socket.emit(SocketEvents.Client.AUTHORIZE, myClientInfo, this.handleUserPresence);\n\t\t});\n\n\t\t_socket.on(SocketEvents.Client.ON_DISCONNECT, reason => {\n\t\t\tif (reason === 'io server disconnect') {\n\t\t\t\t// the disconnection was initiated by the server, you need to reconnect manually\n\t\t\t\t_socket.connect();\n\t\t\t}\n\n\t\t\tthis.props.onConnectionStateChange(SocketState.DISCONNECTED);\n\t\t});\n\n\t\t_socket.on(SocketEvents.Client.ON_RECONNECTING, () => {\n\t\t\tthis.props.onConnectionStateChange(SocketState.RECONNECTING);\n\t\t});\n\n\t\t_socket.on(SocketEvents.Client.ON_DEVICE_OFFLINE, _data => {\n\t\t\tif (!this.props.organization.treeData.tree) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.setStatusDevice(_data.helloDeviceId, false);\n\t\t});\n\n\t\t_socket.on(SocketEvents.Client.ON_DEVICE_ONLINE, _data => {\n\t\t\tif (!this.props.organization.treeData.tree) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.setStatusDevice(_data.helloDeviceId, true);\n\t\t});\n\n\t\t_socket.on(SocketEvents.Client.ON_UPDATED_USER_PRESENCE, data => {\n\t\t\tconst isCurrentUser = data.objectId === getUserProfile().userId;\n\t\t\tif (isCurrentUser) {\n\t\t\t\tthis.props.fetchUserPresenceSucceeded(data);\n\t\t\t}\n\t\t\tthis.props.userPresenceUpdateSucceeded(getUserId(), data.customMessage, data.presenceStatusTypeId);\n\t\t});\n\n\t\t_socket.on(SocketEvents.HelloDevice.ON_UPDATE, _data => {\n\t\t\tif (!this.props.organization.treeData.tree) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.setStatusDevice(_data.id, _data.status);\n\t\t});\n\n\t\t_socket.on('error', function(err) {\n\t\t\tconsole.error(`Socket.IO error: ${err}`);\n\t\t});\n\n\t\t_socket.on(SocketEvents.User.NOTIFICATIONS_UPDATED, () => {\n\t\t\tthis.props.fetchNotificationsCounter();\n\t\t});\n\n\t\t_socket.on(SocketEvents.User.ON_PASSWORD_CHANGED, () => {\n\t\t\twindow.location.href = '/logout';\n\t\t});\n\n\t\t_socket.on(SocketEvents.HelloDevice.ON_CALL_STATE_CHANGED, data => {\n\t\t\tthis.setDeviceCallState(data);\n\t\t});\n\t};\n\n\tsetStatusDevice = (deviceId, isOnline) => {\n\t\tconst newTree = JSON.parse(JSON.stringify(this.props.organization.treeData.tree));\n\t\tconst room = findDeviceById(newTree, deviceId);\n\n\t\tif (room) {\n\t\t\troom.status = isOnline ? DeviceStatus.ONLINE : DeviceStatus.OFFLINE;\n\t\t\tif (!isOnline) {\n\t\t\t\troom.deviceBusy = false;\n\t\t\t\troom.activeConferences = [];\n\t\t\t}\n\t\t\tthis.props.organizationActions.setTreeData({\n\t\t\t\ttree: newTree,\n\t\t\t\tpreSelected: this.props.organization.treeData.preSelected,\n\t\t\t});\n\t\t}\n\t};\n\n\tsetDeviceCallState = ({ deviceId, activeConferences }) => {\n\t\tconst tree = _.cloneDeep(this.props.organization.treeData.tree);\n\t\tconst room = findDeviceById(tree, deviceId);\n\n\t\tif (!room) {\n\t\t\treturn;\n\t\t}\n\n\t\troom.deviceBusy = activeConferences.length > 0;\n\t\troom.activeConferences = activeConferences;\n\t\tthis.props.organizationActions.setTreeData({\n\t\t\ttree,\n\t\t\tpreSelected: this.props.organization.treeData.preSelected,\n\t\t});\n\t};\n\n\thandleUserPresence = data => {\n\t\tconst noCallsShouldBeReceived = '2';\n\t\tif (\n\t\t\tgetUserRole() === UserRoles.NURSE &&\n\t\t\t(!localStorage.getItem('nursePoolingStatus') || localStorage.getItem('nursePoolingStatus') === noCallsShouldBeReceived)\n\t\t) {\n\t\t\tthis.changeUserPresence(PresenceStatusType.UNAVAILABLE);\n\t\t\treturn;\n\t\t}\n\t\tif (data && data.userSocketsLength === 1) {\n\t\t\tconst presenceStatusTypeId = localStorage.getItem('presenceStatusTypeId');\n\t\t\tconst notFirstConnect = sessionStorage.getItem('notFirstConnect');\n\n\t\t\tif (presenceStatusTypeId && notFirstConnect) {\n\t\t\t\tconst a = JSON.parse(presenceStatusTypeId);\n\n\t\t\t\tthis.changeUserPresence(a);\n\t\t\t} else {\n\t\t\t\tthis.changeUserPresence(PresenceStatusType.AVAILABLE);\n\t\t\t\tif (presenceStatusTypeId) {\n\t\t\t\t\tlocalStorage.removeItem('presenceStatusTypeId');\n\t\t\t\t}\n\t\t\t}\n\t\t\tsessionStorage.setItem('notFirstConnect', 'true');\n\t\t} else {\n\t\t\tthis.props.fetchUserPresence();\n\t\t}\n\t};\n\n\tchangeUserPresence = presenceStatusTypeId => {\n\t\tconst data = {\n\t\t\tuserId: getUserId(),\n\t\t\tpresenceStatusTypeId: presenceStatusTypeId,\n\t\t\tcustomMessage: null,\n\t\t};\n\t\tthis._socket.emit(SocketEvents.Client.UPDATE_USER_PRESENCE, data);\n\t};\n\n\trender() {\n\t\treturn {this.props.children};\n\t}\n}\n\nconst mapStateToProps = state => {\n\treturn {\n\t\torganization: state.organization,\n\t};\n};\n\nconst mapDispatchToProps = dispatch => {\n\treturn {\n\t\torganizationActions: bindActionCreators(organizationActionCreators, dispatch),\n\t\tfetchNotificationsCounter: () => dispatch(fetchNotificationCounter()),\n\t\tfetchUserPresence: () => dispatch(fetchUserPresence()),\n\t\tfetchUserPresenceSucceeded: () => dispatch(fetchUserPresenceSucceeded()),\n\t\tuserPresenceUpdateSucceeded: (userId, customMessage, presenceStatusTypeId) =>\n\t\t\tdispatch(userPresenceUpdateSucceeded(userId, customMessage, presenceStatusTypeId)),\n\t};\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(Socket);\n","import React, { Component } from 'react';\nimport { Grid, Button, Avatar } from 'components';\nimport { SocketContext } from 'io-client/SocketContext';\nimport SocketEvents from 'constants/socket-events';\nimport { incomingCallSound, stopIncomingCallSound, dropSound } from 'components/CallSounds';\nimport { connect } from 'react-redux';\nimport { defaultDocumentTitle } from 'constants/global-variables';\nimport { getUserProfile, setUserProfile } from 'infrastructure/auth';\nimport { MediaPermissions, StreamError, MediaTypes } from 'constants/enums';\nimport { askForPermission, checkForPermission, checkIfMediaDevicesPlugged } from 'infrastructure/helpers/commonHelpers';\n\nclass IncomingCall extends Component {\n\tconstructor(props, socket) {\n\t\tsuper(props, socket);\n\t\tthis.state = {\n\t\t\tshowSelf: false,\n\t\t};\n\t\tthis.socket = socket;\n\t\tthis.incomingConferenceInfo = null;\n\t\tthis.incomingCallNotification = null;\n\t\tthis.notificationPermission = {\n\t\t\tGRANTED: 'granted',\n\t\t\tDENIED: 'denied',\n\t\t};\n\t\tthis.micStatus = null;\n\t\tthis.incomingCallAudio = null;\n\t}\n\n\tasync componentDidMount() {\n\t\tthis.micStatus = await checkForPermission(MediaTypes.MICROPHONE);\n\t\tthis.micStatus.onchange = this.onDevicePermissionChange;\n\t\tthis.addOnUnloadEvent();\n\t\tthis.addSocketListeners();\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.removeSocketListeners();\n\t}\n\n\tcomponentDidUpdate() {\n\t\tif (this.state.showSelf) {\n\t\t\tdocument.title = `Patient is calling - ${defaultDocumentTitle}`;\n\t\t} else {\n\t\t\tdocument.title = `${this.props.notifications.notificationsCounter ? `(${this.props.notifications.notificationsCounter})` : ''} ${defaultDocumentTitle}`;\n\t\t}\n\t}\n\n\tstartIncomingCallTimer = () => {\n\t\tthis.incomingCallTimer = setTimeout(() => {\n\t\t\tif (this.incomingConferenceInfo) {\n\t\t\t\tthis.socket.emit(SocketEvents.Conference.NOT_ANSWERING, {\n\t\t\t\t\tparticipantId: this.incomingConferenceInfo.participantId,\n\t\t\t\t\tconferenceId: this.incomingConferenceInfo.conferenceId,\n\t\t\t\t});\n\t\t\t\tthis.sendMissedCallNotification();\n\t\t\t}\n\t\t\tthis.hideIncomingCall();\n\t\t}, 15000);\n\t};\n\n\taddOnUnloadEvent = () => {\n\t\twindow.addEventListener('beforeunload', () => {\n\t\t\tif (this.incomingConferenceInfo) {\n\t\t\t\tthis.socket.emit(SocketEvents.Conference.DECLINE, {\n\t\t\t\t\tconferenceId: this.incomingConferenceInfo.conferenceId,\n\t\t\t\t\tparticipantId: this.incomingConferenceInfo.participantId,\n\t\t\t\t});\n\t\t\t}\n\t\t\tthis.hideIncomingCall();\n\t\t});\n\t};\n\n\tonAnsweredElsewhere = () => {\n\t\tthis.hideIncomingCall();\n\t};\n\n\tonInitiatorLeft = async () => {\n\t\tthis.hideIncomingCall();\n\t\tawait dropSound();\n\t};\n\n\tonIncomingCall = async conferenceInfo => {\n\t\tif (!this.incomingCallAudio || !this.incomingCallAudio.paused) {\n\t\t\tthis.incomingCallAudio = await incomingCallSound();\n\t\t}\n\t\tthis.incomingConferenceInfo = conferenceInfo;\n\t\tthis.setState({ showSelf: true }, () => {\n\t\t\tthis.startIncomingCallTimer();\n\t\t\tthis.incomingCallNotification = this.sendIncomingCallNotification();\n\t\t});\n\t};\n\n\taddSocketListeners = () => {\n\t\tif (!this.socket) return;\n\n\t\tthis.socket\n\t\t\t.on(SocketEvents.Conference.ON_ANSWERED_ELSEWHERE, this.onAnsweredElsewhere)\n\t\t\t.on(SocketEvents.Conference.ON_INITIATOR_LEFT, this.onInitiatorLeft)\n\t\t\t.on(SocketEvents.Conference.ON_INCOMING, this.onIncomingCall);\n\t};\n\n\tremoveSocketListeners = () => {\n\t\tif (!this.socket) return;\n\n\t\tthis.socket\n\t\t\t.off(SocketEvents.Conference.ON_ANSWERED_ELSEWHERE, this.onAnsweredElsewhere)\n\t\t\t.off(SocketEvents.Conference.ON_INITIATOR_LEFT, this.onInitiatorLeft)\n\t\t\t.off(SocketEvents.Conference.ON_INCOMING, this.onIncomingCall);\n\t};\n\n\tonDevicePermissionChange = res => {\n\t\tif (res.target.state === MediaPermissions.GRANTED || res.target.state === MediaPermissions.PROMPT) {\n\t\t\tthis.props.setStreamPermissionMessage(null);\n\t\t}\n\t};\n\n\tdeclineIncomingCall = () => {\n\t\tif (this.incomingConferenceInfo) {\n\t\t\tthis.socket.emit(SocketEvents.Conference.DECLINE, {\n\t\t\t\tconferenceId: this.incomingConferenceInfo.conferenceId,\n\t\t\t\tparticipantId: this.incomingConferenceInfo.participantId,\n\t\t\t});\n\t\t}\n\t\tthis.hideIncomingCall();\n\t};\n\n\tacceptIncomingCall = async () => {\n\t\tconst pluggedDevices = await checkIfMediaDevicesPlugged();\n\n\t\tif (!pluggedDevices.camera || !pluggedDevices.microphone) {\n\t\t\tthis.props.setStreamPermissionMessage({\n\t\t\t\tcomponent: 'modal',\n\t\t\t\ttype: !pluggedDevices.camera ? StreamError.CAMERA_NOT_FOUND.type : StreamError.MICROPHONE_NOT_FOUND.type,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tlet permissionRes = await askForPermission({ audio: true });\n\t\tif (permissionRes.error) {\n\t\t\tif (permissionRes.error.name === 'NotReadableError') {\n\t\t\t\tif (permissionRes.error.message.includes('audio')) {\n\t\t\t\t\tthis.props.setStreamPermissionMessage({\n\t\t\t\t\t\tcomponent: 'modal',\n\t\t\t\t\t\ttype: StreamError.MICROPHONE_NOT_FOUND.type,\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tthis.openCallWindow();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.props.setStreamPermissionMessage({\n\t\t\t\t\tcomponent: 'popup',\n\t\t\t\t\ttype: StreamError.MICROPHONE_BLOCKED.type,\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (permissionRes.permission === MediaPermissions.GRANTED) {\n\t\t\tthis.openCallWindow();\n\t\t} else {\n\t\t\tif (this.micStatus.state === MediaPermissions.GRANTED) {\n\t\t\t\tthis.openCallWindow();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (this.micStatus.state === MediaPermissions.PROMPT && this.micStatus.state !== MediaPermissions.DENIED) {\n\t\t\t\tthis.props.setStreamPermissionMessage({\n\t\t\t\t\tcomponent: 'modal',\n\t\t\t\t\ttype: StreamError.MICROPHONE_BLOCKED.type,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (this.micStatus.state === MediaPermissions.PROMPT) {\n\t\t\t\tthis.props.setStreamPermissionMessage(null);\n\t\t\t}\n\t\t}\n\t};\n\n\topenCallWindow = () => {\n\t\tconst conferenceName = this.incomingConferenceInfo.conferenceName.split('-')[1].trim();\n\t\tlocalStorage.setItem('incomingConferenceInfo', JSON.stringify(this.incomingConferenceInfo));\n\n\t\tlet userInfo = getUserProfile();\n\t\tuserInfo = { ...userInfo, incomingCallsDisabled: true };\n\t\tsetUserProfile(userInfo);\n\n\t\twindow.open(`call/audio/${this.incomingConferenceInfo.from.objectId}/${encodeURIComponent(conferenceName)}/join`, '_blank');\n\t\tthis.hideIncomingCall();\n\t\tthis.incomingCallNotification.then(notification => {\n\t\t\tif (notification) {\n\t\t\t\tnotification.close();\n\t\t\t}\n\t\t});\n\t};\n\n\tgetDeviceName = () => {\n\t\treturn this.incomingConferenceInfo.from.name.replace(/[,]/g, ' >').replace(/[-]/g, '>');\n\t};\n\n\tsendIncomingCallNotification = () => {\n\t\treturn this.sendNotification({\n\t\t\ttitle: 'Incoming call',\n\t\t\tbody: this.getDeviceName(),\n\t\t\ttag: `incoming-${this.incomingConferenceInfo.conferenceId}`,\n\t\t\trenotify: true,\n\t\t});\n\t};\n\n\tsendMissedCallNotification = () => {\n\t\tthis.sendNotification(\n\t\t\t{\n\t\t\t\ttitle: 'Missed call',\n\t\t\t\tbody: this.getDeviceName(),\n\t\t\t\ttag: `missed-${this.incomingConferenceInfo.conferenceId}`,\n\t\t\t\trenotify: true,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\t//Its only a temporary solution since solution with redux requires some refactoring\n\t\t\t\tdocument.querySelector('#notifications > a').click();\n\t\t\t}\n\t\t);\n\t};\n\n\tsendNotification = async (options, onClickCallback) => {\n\t\tlet newNotification;\n\t\tif (Notification.permission !== this.notificationPermission.GRANTED) {\n\t\t\tawait Notification.requestPermission();\n\t\t}\n\t\tif (Notification.permission === this.notificationPermission.GRANTED) {\n\t\t\tnewNotification = new Notification(options.title, {\n\t\t\t\tbody: options.body,\n\t\t\t\ttag: options.tag,\n\t\t\t\trenotify: options.renotify,\n\t\t\t});\n\t\t\tnewNotification.onclick = function() {\n\t\t\t\twindow.focus();\n\t\t\t\tonClickCallback();\n\t\t\t};\n\t\t}\n\t\treturn newNotification;\n\t};\n\n\tclearIncomingCallTimer = () => {\n\t\tif (this.incomingCallTimer) {\n\t\t\tclearTimeout(this.incomingCallTimer);\n\t\t\tthis.incomingCallTimer = null;\n\t\t}\n\t};\n\n\thideIncomingCall = () => {\n\t\tif (this.incomingConferenceInfo) {\n\t\t\tthis.incomingConferenceInfo = null;\n\t\t\tthis.clearIncomingCallTimer();\n\t\t\tthis.setState({ showSelf: false });\n\t\t}\n\n\t\tstopIncomingCallSound();\n\t\tthis.incomingCallAudio = null;\n\t};\n\n\trender() {\n\t\tconst { showSelf } = this.state;\n\t\treturn (\n\t\t\t
    \n\t\t\t\t{showSelf && (\n\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t

    {this.incomingConferenceInfo.from.name}

    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t)}\n\t\t\t
    \n\t\t);\n\t}\n}\n\nIncomingCall.contextType = SocketContext;\n\nexport default connect(state => state)(IncomingCall);\n","const channel = new BroadcastChannel('userIdle');\n\nexport const postUserIdleMessage = msg => {\n\tchannel.postMessage(msg);\n};\n\nexport const onUserIdleMessage = handler => {\n\tchannel.onmessage = handler;\n};\n\nexport const closeUserIdleChannel = () => {\n\tif (channel) {\n\t\tchannel.close();\n\t}\n};\n","import React from 'react';\nimport { Modal } from 'components';\nimport { postUserIdleMessage, onUserIdleMessage, closeUserIdleChannel } from 'infrastructure/helpers/userIdleChannel';\nimport { getUserRoleId } from 'infrastructure/auth';\nimport { getUserIdleConfigurationMinutes } from 'api/userIdleConfigurations';\n\nexport default class UserIdleCheck extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tisLogoutAlertOn: false,\n\t\t\tsecondCounter: null,\n\t\t\tminutes: null,\n\t\t};\n\t}\n\n\tuserIdleTimeout = null;\n\n\talertDisplayTime = 30; // seconds\n\n\tpostMessages = {\n\t\tCONFIRMED: 'CONFIRMED',\n\t\tIN_CALL: 'IN_CALL',\n\t};\n\n\tcomponentDidMount = async () => {\n\t\tconst roleId = getUserRoleId();\n\t\tif (this.props.healthSystemId && roleId) {\n\t\t\tthis.unbindListeners();\n\t\t\tawait this.getUserIdleConfiguration(this.props.healthSystemId, roleId);\n\t\t\tthis.startTimeout();\n\t\t\tthis.bindListeners();\n\t\t}\n\t};\n\n\tcomponentDidUpdate = async prevProps => {\n\t\tif (prevProps.healthSystemId !== this.props.healthSystemId) {\n\t\t\tconst roleId = getUserRoleId();\n\t\t\tawait this.getUserIdleConfiguration(this.props.healthSystemId, roleId);\n\t\t\tthis.startTimeout();\n\t\t\tthis.resetTimeout();\n\t\t}\n\t};\n\n\tgetUserIdleConfiguration = async (healthSystemId, roleId) => {\n\t\ttry {\n\t\t\tconst result = await getUserIdleConfigurationMinutes(healthSystemId, roleId);\n\t\t\tthis.setState({\n\t\t\t\tminutes: result ? result.minutes : null,\n\t\t\t});\n\t\t} catch (e) {\n\t\t\tthis.setState({\n\t\t\t\tminutes: null,\n\t\t\t});\n\t\t}\n\t};\n\n\tcomponentWillUnmount = () => {\n\t\tthis.unbindListeners();\n\t\tclearTimeout(this.userIdleTimeout);\n\t\tclearInterval(this.logoutInterval);\n\t\tcloseUserIdleChannel();\n\t};\n\n\tsetActiveUser = () => {\n\t\tpostUserIdleMessage();\n\t\tthis.resetTimeout();\n\t};\n\n\tresetTimeout = () => {\n\t\tif (this.userIdleTimeout && !this.state.isLogoutAlertOn) {\n\t\t\tclearTimeout(this.userIdleTimeout);\n\t\t\tthis.startTimeout();\n\t\t}\n\t};\n\n\tbindListeners = () => {\n\t\twindow.addEventListener('mousemove', this.setActiveUser);\n\t\twindow.addEventListener('scroll', this.setActiveUser);\n\t\twindow.addEventListener('keydown', this.setActiveUser);\n\t\twindow.addEventListener('resize', this.setActiveUser);\n\t\twindow.addEventListener('click', this.setActiveUser);\n\t\tonUserIdleMessage(this.tabsListener);\n\t};\n\n\ttabsListener = message => {\n\t\tif (message.data === this.postMessages.CONFIRMED) {\n\t\t\tthis.resetActivity();\n\t\t} else {\n\t\t\tthis.resetTimeout();\n\t\t}\n\t};\n\n\tunbindListeners = () => {\n\t\twindow.removeEventListener('mousemove', this.setActiveUser);\n\t\twindow.removeEventListener('scroll', this.setActiveUser);\n\t\twindow.removeEventListener('keydown', this.setActiveUser);\n\t\twindow.removeEventListener('resize', this.setActiveUser);\n\t\twindow.removeEventListener('click', this.setActiveUser);\n\t};\n\n\tstartTimeout = () => {\n\t\tif (this.state.minutes) {\n\t\t\tthis.userIdleTimeout = setTimeout(() => {\n\t\t\t\tthis.openLogoutAlert();\n\t\t\t}, this.state.minutes * 60000);\n\t\t}\n\t};\n\n\topenLogoutAlert = () => {\n\t\tclearTimeout(this.userIdleTimeout);\n\t\tclearInterval(this.logoutInterval);\n\n\t\tthis.setState({ isLogoutAlertOn: true, secondCounter: this.alertDisplayTime });\n\n\t\tthis.logoutInterval = setInterval(() => {\n\t\t\tconst { secondCounter } = this.state;\n\t\t\tif (secondCounter > 0) {\n\t\t\t\tthis.setState({ secondCounter: this.state.secondCounter - 1 }, () => {\n\t\t\t\t\tif (this.state.secondCounter === 0) {\n\t\t\t\t\t\tclearInterval(this.logoutInterval);\n\t\t\t\t\t\tconst { pathname } = window.location;\n\t\t\t\t\t\tif (pathname.startsWith('/call/') || pathname.startsWith('/patient-feed/') || pathname === '/monitoring') {\n\t\t\t\t\t\t\tthis.setState({ isLogoutAlertOn: false });\n\t\t\t\t\t\t\twindow.postMessage(this.postMessages.IN_CALL, window.location.href);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twindow.location.href = '/logout';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}, 1000);\n\t};\n\n\tcloseAlert = () => {\n\t\tpostUserIdleMessage(this.postMessages.CONFIRMED);\n\t\tthis.resetActivity();\n\t};\n\n\tresetActivity = () => {\n\t\tthis.setState({\n\t\t\tisLogoutAlertOn: false,\n\t\t});\n\t\tclearInterval(this.logoutInterval);\n\t\tthis.setActiveUser();\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t\n\t\t\t\t<>\n\t\t\t\t\t

    You have been idle for {this.state.minutes} minutes

    \n\t\t\t\t\t

    You will be logged out in case you don’t confirm your presence within the next {this.state.secondCounter} seconds

    \n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n}\n","import React, { Component } from 'react';\nimport { AppInsightsContext, withAITracking } from '@microsoft/applicationinsights-react-js';\nimport { withRouter } from 'react-router-dom';\nimport { ai } from 'infrastructure/helpers/appInsightsTelemetry';\nimport { APP_CONFIG } from 'constants/global-variables';\n\nclass AppInsightsTelemetryProvider extends Component {\n\tstate = {\n\t\tinitialized: false,\n\t};\n\n\tcomponentDidMount() {\n\t\tconst { history } = this.props;\n\t\tconst { initialized } = this.state;\n\t\tconst appInsightsInstrumentationKey = APP_CONFIG.aiInstrumentationKey;\n\n\t\tif (!initialized && !!appInsightsInstrumentationKey && !!history) {\n\t\t\tai.initialize(appInsightsInstrumentationKey, history);\n\t\t\tthis.setState({ initialized: true });\n\t\t}\n\t}\n\n\trender() {\n\t\tconst { children } = this.props;\n\t\treturn {children};\n\t}\n}\n\nexport default withRouter(withAITracking(ai.reactPlugin, AppInsightsTelemetryProvider));\n","import React from 'react';\nimport Modal from 'components/Modal';\nimport { StreamError } from 'constants/enums';\nimport Form from 'components/Form';\n\nconst StreamPermissionsModal = ({ setStreamPermissionMessage, reason }) => (\n\t {\n\t\t\tsetStreamPermissionMessage(null);\n\t\t}}>\n\t\t{(reason.type === StreamError.CAMERA_BLOCKED.type ||\n\t\t\treason.type === StreamError.MICROPHONE_BLOCKED.type ||\n\t\t\treason.type === StreamError.CAM_AND_MIC_BLOCKED.type) && (\n\t\t\t\n\t\t\t\t

    \n\t\t\t\t\tBanyan needs access to your{' '}\n\t\t\t\t\t{reason.type === StreamError.CAM_AND_MIC_BLOCKED.type\n\t\t\t\t\t\t? 'camera and microphone'\n\t\t\t\t\t\t: (reason.type === StreamError.CAMERA_BLOCKED.type && 'camera') || (reason.type === StreamError.MICROPHONE_BLOCKED.type && 'microphone')}{' '}\n\t\t\t\t\tso patients can hear you. Check the top left of the screen and click Allow.\n\t\t\t\t

    \n\t\t\t\n\t\t)}\n\t\t{(reason.type === StreamError.MICROPHONE_NOT_FOUND.type || reason.type === StreamError.CAMERA_NOT_FOUND.type) && (\n\t\t\t
    \n\t\t\t\t

    \n\t\t\t\t\t{reason.type === StreamError.MICROPHONE_NOT_FOUND.type\n\t\t\t\t\t\t? 'Please check on your system if a mic has been plugged in and you have allowed mic permissions. If not, plug one in or allow permissions and restart your browser. Patients won’t be able to hear you until you do that.'\n\t\t\t\t\t\t: 'Please check on your system if a camera has been plugged in and you have allowed camera permissions. If not, plug one in or allow permissions and restart your browser. Patients won’t be able to see you until you do that.'}\n\t\t\t\t

    \n\t\t\t\n\t\t)}\n\t\n);\n\nexport default StreamPermissionsModal;\n","import React, { Component } from 'react';\nimport { AuthProvider } from 'providers/authProvider';\nimport { BrowserRouter } from 'react-router-dom';\nimport { Routes } from 'routes/routes';\nimport Socket from 'io-client/Socket';\nimport { isAuthenticated, memberExists, setUserInfo, setTokens } from 'infrastructure/auth';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { actionCreators as organizationActionCreators } from 'state/organization/actions';\nimport { Loader, Grid, Button, Alert } from 'components';\nimport { getCurrentHealthSystemInfo, findSectorById } from 'infrastructure/helpers/commonHelpers';\nimport { onMessage } from 'infrastructure/helpers/notificationsChannel';\nimport { fetchNotificationCounter } from 'state/notifications/actions';\nimport { If, Then, Else } from 'react-if';\nimport IncomingCall from 'views/IncomingCall';\nimport { APP_CONFIG } from 'constants/global-variables';\nimport { SocketState } from 'constants/enums';\nimport queryString from 'query-string';\nimport UserIdleCheck from 'containers/UserIdleCheck';\nimport AppInsightsTelemetryProvider from 'components/AppInsightsTelemetryProvider';\nimport StreamPermissions from 'components/StreamPermissions';\nimport StreamPermissionsModal from 'components/StreamPermissionsModal';\n\nclass App extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tstartApplication: false,\n\t\t\tdisplayContentUpdatedAlert: false,\n\t\t\tdisplaySocketConnectionAlert: false,\n\t\t\tsocketConnectionState: SocketState.CONNECTED,\n\t\t};\n\n\t\tthis.versionTimeout = null;\n\t\tthis.socketStateTimeout = null;\n\t}\n\n\tcomponentDidMount = async () => {\n\t\tif (isAuthenticated()) {\n\t\t\tif (memberExists()) {\n\t\t\t\tlet healthSystemExists = await this.checkIfHealthSystemExists();\n\t\t\t\tif (!healthSystemExists && this.props.organization.allHealthSystems.length !== 0) {\n\t\t\t\t\tlet currentHealthSystemInfo = {\n\t\t\t\t\t\tcurrentHealthSystemId: this.props.organization.allHealthSystems[0].id,\n\t\t\t\t\t\tcurrentRegionId: this.props.organization.allHealthSystems[0].regions[0].id,\n\t\t\t\t\t};\n\t\t\t\t\tlocalStorage.setItem('currentHealthSystemInfo', JSON.stringify(currentHealthSystemInfo));\n\t\t\t\t}\n\t\t\t}\n\t\t\tonMessage(() => {\n\t\t\t\tthis.props.fetchNotificationCounter();\n\t\t\t});\n\t\t\tthis.startVersionTimeout();\n\t\t}\n\t\t// If tokens are provided and the url contains call\n\t\t// then set tokens along with the other data on localStorage\n\t\t// in order to bypass identity auth and get directly to call\n\t\tconst authResult = this.getTokensIfCall();\n\t\tif (authResult) {\n\t\t\tsetTokens(authResult);\n\t\t\tawait setUserInfo();\n\t\t}\n\t\tthis.setState({\n\t\t\tstartApplication: true,\n\t\t});\n\t};\n\n\tcheckIfHealthSystemExists = async () => {\n\t\tawait this.props.organizationActions.getAllHealthSystems();\n\t\tlet currentHealthSystemInfo = getCurrentHealthSystemInfo();\n\t\tif (currentHealthSystemInfo) {\n\t\t\tlet { currentHealthSystemId } = getCurrentHealthSystemInfo();\n\t\t\treturn this.props.organization.allHealthSystems.some(healthSystem => {\n\t\t\t\treturn healthSystem.id === currentHealthSystemId;\n\t\t\t});\n\t\t}\n\t\treturn false;\n\t};\n\n\tstartVersionTimeout = () => {\n\t\tif (this.versionTimeout) {\n\t\t\tclearTimeout(this.versionTimeout);\n\t\t}\n\n\t\tconst versionTimeoutInterval = +APP_CONFIG.versionCheckInterval || 10;\n\t\tthis.versionTimeout = setTimeout(async () => {\n\t\t\tthis.compareVersions();\n\t\t}, 1000 * 60 * versionTimeoutInterval);\n\t};\n\n\tcompareVersions = async () => {\n\t\ttry {\n\t\t\tconst response = await fetch('/env/react-config.js');\n\t\t\tlet configText = await response.text();\n\n\t\t\tconfigText = configText.replace(/'/g, `\"`);\n\n\t\t\tconst { REACT_APP_BUILD_NUMBER } = JSON.parse(configText.substring(configText.indexOf('{'), configText.lastIndexOf('}') + 1));\n\n\t\t\tif (APP_CONFIG.buildNumber && REACT_APP_BUILD_NUMBER && APP_CONFIG.buildNumber !== REACT_APP_BUILD_NUMBER) {\n\t\t\t\tthis.setState({\n\t\t\t\t\tdisplayContentUpdatedAlert: true,\n\t\t\t\t});\n\t\t\t}\n\t\t} catch (error) {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.error(error);\n\t\t}\n\n\t\tthis.startVersionTimeout();\n\t};\n\n\tonConnectionStateChange = async newSocketConnectionState => {\n\t\tif (this.state.socketConnectionState.type === newSocketConnectionState.type) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.setState({\n\t\t\tdisplaySocketConnectionAlert: true,\n\t\t\tsocketConnectionState: newSocketConnectionState,\n\t\t});\n\t\tif (newSocketConnectionState.type === SocketState.CONNECTED.type) {\n\t\t\tif (this.socketStateTimeout) {\n\t\t\t\tclearTimeout(this.socketStateTimeout);\n\t\t\t}\n\t\t\tthis.socketStateTimeout = setTimeout(() => {\n\t\t\t\tthis.setState({\n\t\t\t\t\tdisplaySocketConnectionAlert: false,\n\t\t\t\t});\n\t\t\t}, 2000);\n\t\t\tawait this.props.organizationActions.getTreeData();\n\t\t\tthis.props.organization.activeMonitoringFeeds.forEach(({ roomId }) => {\n\t\t\t\tthis.changeRoomAddDeviceIcon(roomId);\n\t\t\t});\n\t\t\tthis.props.organizationActions.setTreeData({ ...this.props.organization.treeData });\n\t\t}\n\t};\n\n\tchangeRoomAddDeviceIcon = roomId => {\n\t\tconst sector = findSectorById(this.props.organization.treeData.tree, roomId);\n\t\tsector.customActionIcon = {\n\t\t\ticonColor: '#4cd137',\n\t\t\ticon: 'check_circle',\n\t\t};\n\t};\n\n\tshouldDisableIncomingCalls = () => {\n\t\tconst pathname = window.location.pathname.split('/');\n\t\tif (pathname.length > 1) {\n\t\t\tconst isCallView = pathname[1] === 'call';\n\n\t\t\treturn isCallView;\n\t\t}\n\n\t\treturn false;\n\t};\n\n\tgetTokensIfCall = () => {\n\t\tconst { search, pathname } = window.location;\n\t\tconst query = queryString.parse(search);\n\t\tif (query.accessToken && query.idToken && pathname.startsWith('/call/')) {\n\t\t\treturn { accessToken: query.accessToken, idToken: query.idToken };\n\t\t}\n\t\treturn undefined;\n\t};\n\n\trender() {\n\t\tconst { startApplication, socketConnectionState, displaySocketConnectionAlert, displayContentUpdatedAlert } = this.state;\n\t\tconst currentHealthSystem = getCurrentHealthSystemInfo();\n\t\tconst currentHealthSystemId = currentHealthSystem ? currentHealthSystem.currentHealthSystemId : null;\n\t\tconst { streamPermission } = this.props.organization;\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{Routes}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t{APP_CONFIG.buildNumber}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tNew version of the app is available{' '}\n\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\t\twindow.location.reload(true);\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\tsize='small'\n\t\t\t\t\t\t\t\t\t\t\t\ttext='Refresh'\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tonClose={() => {\n\t\t\t\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\t\t\t\tdisplayContentUpdatedAlert: false,\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\t\t\t\tdisplaySocketConnectionAlert: false,\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{streamPermission && streamPermission.component === 'popup' && }\n\t\t\t\t\t\t\t{streamPermission && streamPermission.component === 'modal' && (\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t);\n\t}\n}\n\nconst mapStateToProps = state => {\n\treturn {\n\t\torganization: state.organization,\n\t\tnotifications: state.notifications,\n\t};\n};\n\nconst mapDispatchToProps = dispatch => {\n\treturn {\n\t\torganizationActions: bindActionCreators(organizationActionCreators, dispatch),\n\t\tfetchNotificationCounter: () => dispatch(fetchNotificationCounter()),\n\t};\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(App);\n","// In production, we register a service worker to serve assets from local cache.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on the \"N+1\" visit to a page, since previously\n// cached resources are updated in the background.\n\n// To learn more about the benefits of this model, read https://goo.gl/KwvDNy.\n// This link also includes instructions on opting out of this behavior.\n\nimport { IDENTITY_CONFIG } from 'constants/auth-constants';\n\nconst isLocalhost = Boolean(\n\twindow.location.hostname === 'localhost' ||\n\t\t// [::1] is the IPv6 localhost address.\n\t\twindow.location.hostname === '[::1]' ||\n\t\t// 127.0.0.1/8 is considered localhost for IPv4.\n\t\twindow.location.hostname.match(/^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)\n);\n\nfunction registerValidSW(swUrl) {\n\tnavigator.serviceWorker\n\t\t.register(swUrl)\n\t\t.then(registration => {\n\t\t\tregistration.onupdatefound = () => {\n\t\t\t\tconst installingWorker = registration.installing;\n\t\t\t\tinstallingWorker.onstatechange = () => {\n\t\t\t\t\tif (installingWorker.state === 'installed') {\n\t\t\t\t\t\tif (navigator.serviceWorker.controller) {\n\t\t\t\t\t\t\t// At this point, the old content will have been purged and\n\t\t\t\t\t\t\t// the fresh content will have been added to the cache.\n\t\t\t\t\t\t\t// It's the perfect time to display a \"New content is\n\t\t\t\t\t\t\t// available; please refresh.\" message in your web app.\n\t\t\t\t\t\t\tconsole.log('New content is available; please refresh.');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// At this point, everything has been precached.\n\t\t\t\t\t\t\t// It's the perfect time to display a\n\t\t\t\t\t\t\t// \"Content is cached for offline use.\" message.\n\t\t\t\t\t\t\tconsole.log('Content is cached for offline use.');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t};\n\t\t})\n\t\t.catch(error => {\n\t\t\tconsole.error('Error during service worker registration:', error);\n\t\t});\n}\n\nfunction checkValidServiceWorker(swUrl) {\n\t// Check if the service worker can be found. If it can't reload the page.\n\tfetch(swUrl)\n\t\t.then(response => {\n\t\t\t// Ensure service worker exists, and that we really are getting a JS file.\n\t\t\tif (response.status === 404 || response.headers.get('content-type').indexOf('javascript') === -1) {\n\t\t\t\t// No service worker found. Probably a different app. Reload the page.\n\t\t\t\tnavigator.serviceWorker.ready.then(registration => {\n\t\t\t\t\tregistration.unregister().then(() => {\n\t\t\t\t\t\twindow.location.reload();\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\t// Service worker found. Proceed as normal.\n\t\t\t\tregisterValidSW(swUrl);\n\t\t\t}\n\t\t})\n\t\t.catch(() => {\n\t\t\tconsole.log('No internet connection found. App is running in offline mode.');\n\t\t});\n}\n\nexport default function register() {\n\tif (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n\t\t// The URL constructor is available in all browsers that support SW.\n\t\tconst publicUrl = new URL(IDENTITY_CONFIG.public_uri, window.location);\n\t\tif (publicUrl.origin !== window.location.origin) {\n\t\t\t// Our service worker won't work if PUBLIC_URL is on a different origin\n\t\t\t// from what our page is served on. This might happen if a CDN is used to\n\t\t\t// serve assets; see https://github.com/facebookincubator/create-react-app/issues/2374\n\t\t\treturn;\n\t\t}\n\n\t\twindow.addEventListener('load', () => {\n\t\t\tconst swUrl = `${IDENTITY_CONFIG.public_uri}service-worker.js`;\n\n\t\t\tif (isLocalhost) {\n\t\t\t\t// This is running on localhost. Lets check if a service worker still exists or not.\n\t\t\t\tcheckValidServiceWorker(swUrl);\n\t\t\t} else {\n\t\t\t\t// Is not local host. Just register service worker\n\t\t\t\tregisterValidSW(swUrl);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport function unregister() {\n\tif ('serviceWorker' in navigator) {\n\t\tnavigator.serviceWorker.ready.then(registration => {\n\t\t\tregistration.unregister();\n\t\t});\n\t}\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport configureStore from 'store/configureStore';\nimport App from './App';\nimport { unregister as unregisterServiceWorker } from './registerServiceWorker';\n\nimport 'font-awesome/css/font-awesome.min.css';\nimport 'css/reset.css';\nimport 'css/typography.css';\nimport 'css/utilities.css';\nimport 'css/components.css';\nimport 'css/main.css';\n\nconst store = configureStore();\nconst rootElement = document.getElementById('root');\n\nReactDOM.render(\n\t\n\t\t\n\t,\n\trootElement\n);\n\nunregisterServiceWorker();\n"],"sourceRoot":""}