{"version":3,"sources":["SharedLogic/accessibility/actions.js","SharedLogic/utilities/loaders.js","SharedComponents/Modals/NodeUnavailableModal.js","SharedComponents/Olamonim/Components/Preloader.js","SharedLogic/olamonim/hooks/useMapStyle.js","SharedComponents/Olamonim/Map/hooks/useUpdateWallet.js","SharedComponents/Olamonim/Map/hooks/useLoadLayout.js","SharedLogic/olamonim/hooks/useIsActiveElement.js","SharedComponents/Olamonim/Map/hooks/usePageBackground.js","SharedComponents/Olamonim/Map/hooks/useBackgroundSound.js","SharedLogic/olamonim/hooks/useCetEvents.js","SharedComponents/Olamonim/Map/hooks/useSendExitedEvent.js","SharedComponents/Olamonim/Map/hooks/useSendLaunchedEvent.js","SharedComponents/Olamonim/Map/hooks/useGetStudentState.js","SharedComponents/Olamonim/Map/hooks/useOnLoadEvent.js","SharedComponents/Olamonim/Map/hooks/useOnUnmountEvent.js","SharedLogic/olamonim/hooks/useMapElementVisibilityRules.js","SharedComponents/Olamonim/MapElement/Image.js","SharedComponents/Olamonim/MapElement/Button.js","SharedComponents/Olamonim/MapElement/ExpandableContent.js","SharedComponents/Olamonim/MapElement/PrizeStates.js","SharedComponents/Olamonim/MapElement/Dashboard.js","SharedComponents/Olamonim/MapElement/ProgressBar.js","SharedComponents/Olamonim/MapElement/Current.js","SharedComponents/Olamonim/MapElement/Score.js","SharedComponents/Olamonim/MapElement/LmsElement.js","SharedComponents/Olamonim/MapElement/Preloader.js","SharedComponents/Olamonim/MapElement/Feedback.js","SharedComponents/Olamonim/MapElement/Link.js","SharedComponents/Olamonim/MapElement/Paragraph.js","SharedComponents/Olamonim/MapElement/Container.js","SharedComponents/Olamonim/MapElement/Text.js","SharedComponents/Olamonim/MapElement/Title.js","SharedComponents/Olamonim/MapElement/Video.js","SharedComponents/Olamonim/MapElement/UserName.js","SharedComponents/Olamonim/MapElement/Audiences.js","SharedComponents/Olamonim/MapElement/BackgroundSound.js","SharedComponents/Olamonim/MapElement/ChangeSchool.js","SharedComponents/Olamonim/MapElement/LoPlayer.js","SharedComponents/Olamonim/MapElement/LoTitle.js","SharedComponents/Olamonim/MapElement/DocumentsNavigationBar.js","SharedComponents/Olamonim/MapElement/Login.js","SharedComponents/Olamonim/MapElement/Menu.js","SharedComponents/Olamonim/MapElement/index.js","SharedComponents/Olamonim/Map/Header.js","SharedComponents/Olamonim/Map/Main.js","SharedComponents/Olamonim/Map/Footer.js","SharedComponents/Olamonim/Components/TeacherButtons.js","SharedComponents/Olamonim/Map/index.js","SharedComponents/Olamonim/App/SitePlayer.js","SharedLogic/utilities/comparers.js","SharedComponents/Alerts/NodeNotFoundAlert.js","SharedComponents/Olamonim/MapElement/Animation.js","SharedLogic/accessibility/action-types.js","SharedLogic/product/actions.js","SharedComponents/Lo/index.js","SharedComponents/SvgIcon/SvgIcon.module.scss","SharedComponents/Alerts/Alert.module.scss","SharedComponents/Lo/Lo.module.scss","SharedComponents/Modals/NoSubscriptionModal.js","SharedComponents/Modals/NoEnvironmentsModal.js","SharedComponents/LoginWidget/index.js","SharedComponents/LoginWidget/LoginWidget.module.scss","SharedLogic/hooks/useWhyDidYouUpdate.js","SharedLogic/ui/actions.js","SharedComponents/SvgIcon/index.js","SharedLogic/utilities/googleAnalytics.js","SharedLogic/utilities/cetEvents.js","SharedLogic/tree/lms/actions.js","SharedLogic/tree/data/services.js","SharedComponents/Modals/StudentPreviewModal.js","SharedComponents/Olamonim/MapElement/PrizeCountable.js","SharedLogic/product/services.js","SharedLogic/user/actions.js","SharedLogic/utilities/url.js","SharedComponents/Olamonim/MapElement/MultiAnimations.js","SharedLogic/user/sso.js","SharedLogic/tree/data/actions.js","SharedLogic/creator/actions.js","SharedComponents/Alerts/Alert.js","SharedLogic/olamonim/services.js","SharedLogic/olamonim/eventHandlers.js","SharedLogic/tree/learningSystem/actions.js","SharedLogic/utilities/calculations.js","SharedLogic/app/actions.js","PC/settings/index.js","SharedLogic/utilities/enums.js","SharedLogic/utilities/routes.js","SharedLogic/olamonim/propTypes.js","SharedLogic/lo/services.js","SharedLogic/lo/actions.js","SharedLogic/creator/services.js","SharedLogic/olamonim/actions.js","SharedComponents/Olamonim/Components/TeacherButtons.module.scss"],"names":["SectionNames","MAIN_MENU_BAR","ITEMS_MENU_BAR","TOC_TREE","TOC_TREE_ITEM","LO_IFRAME","setAccessibilityFocus","sectionName","startElement","arguments","length","undefined","type","SET_ACCESSBILITY_FOCUS_SECTION","loadJson","path","fetch","concat","getStaticFileUrl","window","TOC_BUST","then","response","json","createLinkTag","id","linkTag","document","createElement","setAttribute","loadFonts","fonts","headTag","querySelector","forEach","font","fontId","Object","keys","getElementById","linkFontTag","appendChild","NodeUnavailableModal","_Component","_inherits","_super","_createSuper","_this","_classCallCheck","_len","args","Array","_key","call","apply","handleOnClose","_this$props","props","rootDocumentId","treeData","siteRoutes","onClose","location","href","TOC_PRODUCT_NAME","getParentPage","_createClass","key","value","_this$props2","this","intl","innerHTML","formatHTMLMessage","_jsx","_Fragment","children","_jsxs","Modal","isOpen","Header","subTitle","Content","Footer","justifyContent","Section","Button","view","onClick","Component","prototypes","lang","PropTypes","string","isRequired","func","injectIntl","connect","state","_product$config","_olamonim$settings","_olamonim$settings$si","product","tree","olamonim","config","data","settings","site","routes","Preloader","_ref","backgroundColor","ref","useRef","_useState","useState","_useState2","_slicedToArray","isLoading","setIsLoading","_useState3","_useState4","animationData","setAnimationData","useEffect","cache","TOC_RESOURCES","style","Lottie","isClickToPauseDisabled","width","options","loop","autoplay","rendererSettings","preserveAspectRatio","useMapStyle","positions","pageStyle","setPageStyle","mapStyle","setMapStyle","calcPageHorizontalDelta","delta","page","fullSizeWidth","innerWidth","Math","min","offsetX","calcPageVerticalDelta","fullSizeHeight","innerHeight","offsetY","initMaps","backgroundSize","minWidth","mapContainer","margin","minHeight","height","verticalDelta","backgroundPosition","horizontalDelta","y","x","initPage","top","left","fontSize","originalRatio","innerWindowRatio","position","max","initMapContainer","addEventListener","removeEventListener","useUpdateWallet","isReferredFromLo","dispatch","useDispatch","wallet","useSelector","values","updateUserWallet","code","useLoadLayout","pageId","headerSettings","setHeaderSettings","footerSettings","setFooterSettings","_useState5","_useState6","isPageReady","setIsPageReady","_useState7","_useState8","isHeaderReady","setIsHeaderReady","_useState9","_useState10","isFooterReady","setIsFooterReady","_settings$elements","elements","cssPath","onload","headerPath","headerLinkTag","footerPath","footerLinkTag","getBgImgsSrcs","doc","srcChecker","from","querySelectorAll","reduce","collection","node","prop","getComputedStyle","getPropertyValue","match","exec","add","Set","updateMapStatus","updateMapId","preloadImages","srcs","promises","currSrc","push","src","Promise","resolve","reject","img","Image","onerror","onabort","allSettled","updateMapState","_asyncToGenerator","_regeneratorRuntime","mark","_callee","imageTagsSrcs","imagesBgSrcs","imagesSrcsAll","wrap","_context","prev","next","images","map","currentSrc","naturalWidth","naturalHeight","_toConsumableArray","stop","useIsActiveElement","_useSelector","_olamonim$ui$teacherB","user","isUserAuthorized","isAuthorized","isRevealedByTeacher","ui","teacherButtons","element","environmentTasks","ignoreEngine","_element$ruleBase","_element$lms","isLocked","isActiveByEngine","scope","ruleBase","isBlocked","lms","TaskId","some","item","ItemId","FolderId","parentId","isPublished","isHidden","isDeleted","usePageBackground","isActiveElement","status","pageBackground","setPageBackground","backgrounds","_status$settings$requ","pageBinaryState","mapSettings","isDoneRequired","bit","relevantElementKeys","requiredElement","parseInt","getPageBinaryState","DONE","useBackgroundSound","_status$background_so","background_sound","PLAYING","backgroundSoundPath","userInteracted","sounds","Audio","currentTime","play","_window$TOC_RESOURCES","pause","emptyGuid","useCetEvents","constsLanguage","productId","audienceId","activeAudience","environmentId","optionalData","useMemo","contentGroupingId","contentParentId","_useCetEventsHook","useCetEventsHook","sendUiUsageEvent","sendLearningEvent","useCallback","_objectSpread","useSendExitedEvent","isReady","current","isReload","performance","getEntriesByType","contextReferrer","referrer","currentHyperlink","verbType","objectName","objectId","useSendLaunchedEvent","pathname","useLocation","setIsReferredFromLo","split","useGetStudentState","_tree$data$settings$r","relevantFolder","relevantFolderId","isAdaptiveFolder","isAdaptive","fetchStudentNextState","updateRuleBaseState","ruleBaseDefaultCurrentId","useOnLoadEvent","actions","actionEmitter","useEventHandlers","useWhyDidYouUpdate","useOnUnmountEvent","useMapElementVisibilityRules","isVisible","setIsVisible","urlKey","useParams","_olamonim$ui","_olamonim$ui$feedback","_olamonim$ui$feedback2","_olamonim$ui2","_olamonim$ui2$rendere","isAfterFix","feedback","feedbackStage","nStage","renderedUI","ids","folderId","isRuleVerified","visibilityRules","rule","Error","ruleCondition","condition","isLoggedIn","every","indexOf","alt","role","_settings$className","_ref$isFocusable","isFocusable","_ref2","currentMap","classNames","eventData","category","label","ariaLabel","ariaExpanded","Boolean","disabled","className","join","trimEnd","events","onMouseEnter","onOver","onMouseDown","onBlur","onAnimationEnd","tabIndex","image","text","ExpandableContent","_user$audiences2","_user$audiences3","defaultSettings","_olamonim$ui$expandab","expandableContent","isMapLoaded","olamonName","productLocalName","sessionKey","onToggleExpandableContent","_settings$events","updateUiElements","onContentClosed","expandableContentClassName","open","_user$audiences","_settings$events2","_settings$events3","isStartAfterPreloader","requiredType","Cache","get","method","sessionStorage","audiences","onRequired","onContentWatched","set","event","chapter","toggleButtonText","toggleButtonImage","headerChildren","childSettings","MapElement","contentChildren","PrizeStates","productName","prizeState","setPrizeState","prizeSize","setPrizeSize","prizeExtraSettings","setPrizeExtraSettings","setClassName","isActive","setIsActive","_useState11","_useState12","isSelected","setIsSelected","_useState13","_useState14","entityId","setEntityId","size","action","objectAdditionalInformation","entityItem","prizes","entityPrizePairs","items","filter","dashboard","itemSettings","prizeIndex","index","entityTitle","prizeCatalogId","prizeInfo","prizesCatalog","prize","prizeTitle","prizeCatalogName","prizeDescription","prizeCatalogMetadata","desc","states","_settings$selectedSet","_prize$code","test","getStateFromWallet","buttonOnly","selectedSettings","onKeyUp","e","onButtonEnterOrSpace","backgroundImage","thumbLarge","thumb","Dashboard","_olamonim$ui$dashboar","_olamonim$ui$dashboar2","prizesSettings","selectedTab","statesPrizes","setStatesPrizes","selectedPrize","setSelectedPrize","setFontSize","onPrizeClick","dashboardClassName","selected","prizeInitial","dashboardEntities","initial","prizeCatalogCategoryName","sort","a","b","initDashboard","tab2Children","ProgressBar","treeNode","nodeKey","for","progressValue","setProgressValue","progress","Animation","framesRange","withAnimation","Current","onLoad","framesId","Score","_defaultSettings$sett","_defaultSettings$sett2","score","_tree$data$urlKey","_tree$data$urlKey$lms","_tree$data$urlKey$lms2","_tree$data$urlKey$lms3","StudentLmsInfo","Scores","FinalScore","scoreId","getScoreAsNumberLevel","animation","LmsElement","_settings$ariaLabel","isBeforeCurrent","isBeforeCurrentElement","isAdaptiveEnabled","title","elementId","setElementId","elementType","setElementType","isActiveIgnoreEngine","setIsActiveIgnoreEngine","isGlow","setIsGlow","isCurrent","setIsCurrent","isDone","setIsDone","_useState15","_useState16","_useState17","_useState18","isMouseOver","setIsMouseOver","_useState19","_useState20","progressBarPath","setProgressBarPath","_useState21","_useState22","glowAnimation","setGlowAnimation","_useState23","_useState24","lmsIndication","setLmsIndication","_useState25","_useState26","lmsIndicationAnimation","setLmsIndicationAnimation","_useState27","_useState28","setScore","_useState29","_useState30","animationFramesRange","setAnimationFramesRange","dispatchEvent","isNewMap","currentIndicator","markerIndicator","isMouseDownOverridesClick","isCurrentElement","isGlowElement","isSubmittedTask","isSubmittedAtLeastOnce","updateLmsIndications","lmsIndications","elementData","_elementData$lms$Task","_data$flaggedInnerFol","isSelfLearning","TaskType","toLowerCase","startTime","StartTime","endTime","EndTime","now","Date","getTime","oneDay","nDaysBetweenDates","isSubmitted","isReturnedToFixTask","isReturnedToFix","flag","flaggedInnerFolder","ActivityStateModifiedTime","hideLmsIndication","_data$flaggedInnerFol2","name","scheduledInnerItems","findIndex","indication","progressBar","glow","getAnimationFramesRange","lmsElementEvents","onOverDisabled","onMouseLeave","onFocus","tooltip","dangerouslySetInnerHTML","__html","subText","frames","default","Feedback","_settings$blockerChil","blockerChildren","blockerChildSettings","Link","isDisabled","isExternalLink","startsWith","includes","isAnchorSectionLink","target","checPoint","floor","anchorTargetElement","substring","isVsible","rect","getBoundingClientRect","bottom","classList","remove","preventDefault","Paragraph","Container","isFocused","setIsFocused","Tag","tag","onContainerClick","isManageFocus","contains","relatedTarget","isFirstChild","Text","Title","level","onTitleClick","Video","videoSource","source","playerRef","onPlayerStateChange","onVideoEnded","YT","PlayerState","ENDED","_x","onPlayerReady","defaultVolume","setVolume","playVideo","initVideo","videoId","setTimeout","Player","controls","playerVars","allow","disablekb","list","rel","onReady","onStateChange","youtubeVideoID","videoURL","pos","lastIndexOf","videoID","getYoutubeID","onYouTubeIframeAPIReady","requestAnimationFrame","firstScriptTag","getElementsByTagName","parentNode","insertBefore","destroy","pop","frameBorder","allowFullScreen","UserName","displayName","Audiences","labels","i18n","_ref3","isInTeacherMode","getIsStudentPreview","allAudiences","op","nowDate","isFuture","archiveYear","calcJewishYear","isArchive","activeAudiences","compare","archiveAudiences","selectedAudience","find","ad","audiencesClassName","many","Select","btnProps","customStyle","background","borderColor","color","padding","fontFamily","fontWeight","isBoxCenteredToAnchor","isOpenOnFocus","isMultiSelect","btnLabel","additionalOptions","additionalOptionsBtnLabel","onChange","selectedOption","BackgroundSound","btnText","setBtnText","toggleBackGroundSound","updateUserStatus","texts","off","on","ChangeSchool","hasMultipleRoles","cet","accessmanagement","changeRole","viewSettings","menubarType","hideBar","hideCloseButton","hideCreateTaskButton","hideLogo","hideShareLinks","hideStudioButtons","hideViewAsMenu","showLoginButton","showLogoutButton","returnLastVisited","LoPlayer","history","useHistory","replace","_useSelector3","_ref4","nodeType","documentId","firstDocumentId","itemType","_node$lms","isHiddenByStudio","isHiddenByTeacher","nodeKeyParts","studentViewMode","groupSettings","groups","i","nodesIds","isShowPreloader","setIsShowPreloader","connectionParams","setConnectionParams","wait","ms","handleShowPrize","_ref5","itemId","onItemDone","_triggerResponse$resu","allPromises","triggerResponse","prizeAmount","prizesData","currentPrize","all","triggerEndOfNode","sent","isSucceeded","result","JSON","parse","prizeCode","amount","clearTimeout","totalValue","_x2","_x3","callFunction","_ref6","_callee3","functionObject","handleFunction","_context3","isArray","_ref7","_callee2","_context2","_x6","_x4","_x5","handleDocumentLoaded","_ref8","_callee4","_context4","updateUserProductHistory","updateUserFolderHistory","handleActivityStateChanged","_ref9","_callee5","loKey","handleOnSubmit","_ref10","onSubmit","_context5","fetchStateForItem","_x7","handleDocumentDone","_ref11","_callee8","isFix","_context8","abrupt","_ref12","_callee7","_ref13","onDocumentDone","handleOnDocumentDone","_context7","updateDocumentEvaluations","_ref14","_callee6","_context6","_x11","_x10","_x8","_x9","handleFolderDone","_ref15","_callee9","doneFolderId","nextFolderId","isEndOfCourse","_triggerResponse$resu2","addExtraDataToFunc","_ref16","onFolderDone","_context9","_func$data","_history$location","_history$location$pat","_x12","_x13","_x14","_x15","openFolderLoPlayer","_ref17","_callee10","activeKey","_context10","hideModalMessage","hideAlertMessage","resetDocument","fetchStateForFolder","getStudentCurrentDocument","documentKey","alertOnUnavailableNode","_x16","initLo","_ref18","_callee11","ruleBaseState","_context11","language","loLanguage","taskOnTheFlyType","defaultTaskType","enableDocumentsNavigation","loParams","loCallbacks","onActivityStateChanged","onDocumentLoaded","onDocumentChanged","onCourseDone","Lo","params","callbacks","preloaderAnimation","LoTitle","lo","loTitle","setLoTitle","connection","useParentTitle","DocumentsNavigationBar","_tree$folderId","folderDocumentsIds","folderDocuments","setFolderDocuments","selectedDocumentId","setSelectedDocumentId","currentView","setCurrentView","handleDocumentLinkClick","handleArrowClick","selectedIndex","newSelectedIndex","_lo$connection","currentDocumentsIds","folderDocumentsLength","nDocuments","views","slice","navigationDocuments","initDocumentsNavigationBar","curView","maxWidth","SubmittedTime","documentIndex","documentTitle","splitDocumentTitleBy","titleParts","Login","userReturnURL","getUserReturnURL","LoginWidget","purchaseURL","returnURL","onButtonClick","clearUserReturnURL","clearIsStudentPreview","Menu","isMenuOpen","setIsMenuOpen","menuRef","handleCloseMenu","handleClickOutside","menuClassName","toggleMenuButton","menuItems","menuItem","elementTypes","button","prizeCountable","prizeStates","lmsElement","preloader","multiAnimations","link","paragraph","container","video","userName","backgroundSound","changeSchool","loPlayer","documentsNavigationBar","login","menu","onBeforeLoad","isDisplayed","setIsDisplayed","isVisibleByRules","isMounted","timeout","rules","PrizeCountable","MultiAnimations","nodeId","Main","defaults","TeacherButtons","isModalOpen","setIsModalOpen","ariaLiveText","setAriaLiveText","urlData","extractDataFromURL","port","productPlayerURL","protocol","TOC_ENDPOINT_ENV","redirectPath","isRevealedByTeacherFromCache","getIsRevealedByTeacher","StudentPreviewModal","audience","isMovingToTeacherPreview","styles","btn","back_to_toc","BACK_TO_TEACHER_VIEW","SvgIcon","symbol","unlock","isRevealedByTeacherNewValue","CONTENT_IS_VISIBLE","ORIGINAL_CONTENT_IS_VISIBLE","setIsRevealedByTeacher","BACK_TO_ORIGINAL_CONTENT","UNLOCK_ALL_CONTENT","Map","_mapSettings$defaults","settingsPath","setMapSettings","assertLandscapeView","setAssertLandscapeView","isFeedbackOpen","pageClassName","feedback_open","page_not_loaded","onUnmount","_useLoadLayout","_map$cssPath","isLoPage","updateUserAsInteracted","once","MobileLandscapeView","mode","SitePlayer","_PureComponent","olamonSettings","isSsoReady","isTocPage","isLmsLoaded","isWalletLoaded","documentElement","clientHeight","preloaderId","init","olamonPrizesSettings","_yield$_this$props$in","hjSettings","addLocaleData","heLocaleData","arLocaleData","enLocaleData","setState","loadSettings","initApp","preventReload","dataset","applicationdir","direction","nagishSiteKey","initAccessibilityLang","isHotjarEnabled","hjid","hjsv","module","hotjar","initialize","isBackgroundSoundPlaying","localStorage","setUserReturnURL","loadUserStatus","loadLmsForModules","getRedirectPath","redirectOptions","byUrl","byElementStatus","pathObject","obj","exists","handleCloseModal","prevProps","prevState","isEqualUsers","loadUserWallet","_ui$modalType","_this2","_this$state$olamonSet","_this$state$olamonSet2","IntlProvider","locale","messages","CetComponentsProvider","siteKey","mobileBreakpoint","rootFontSize","isUpdateFontSizeOnResizeEnabled","Router","basename","Switch","route","Route","exact","render","redirectTimeout","Redirect","to","modalType","ModalType","NO_SCHOOL","NoSchool","sitekey","techSupportUrl","technicalSupportDocId","logoutUrl","origin","NO_ENVIRONMENTS","NoEnvironmentsModal","firstName","userRole","NO_SUBSCRIPTION","NoSubscriptionModal","PureComponent","bindActionCreators","isEqualNodes","o1","o2","isEqualTask","isEqualTaskForTeacher","TeacherLmsInfo","isEqualTaskForStudent","Trial","ManualScore","AutoScore","AutoWeight","EvaluatedWeight","State","FeedbackViewed","HideScoreFromStudents","HideFeedbackFromStudents","IsHidden","IsLocked","States","NotStarted","InProgress","Done","WaitingForCheck","Skipped","userId","schoolId","isEqualRoles","isEqualAudiences","isEqualActiveAudiences","NodeNotFoundAlert","handleCloseDialog","onHideAlertMessage","Alert","onConfirmClick","confirmLabel","formatMessage","icon","animationSettings","setAnimationSettings","isLoaded","setIsLoaded","isCompleted","initialSegment","isPausedWhenLoaded","el","_animationFramesRange","start","end","anim","playSegments","isStopped","onEnterFrame","frame","console","log","eventListeners","eventName","callback","onAnimationLoad","onStart","onAnimationStart","onComplete","onLastComplete","isLastAnimation","onAnimationComplete","fetchProductConfig","tocProductName","url","tocGlobalEndpoints","productPlayerServicesAPIURL","isOlamonByConfig","domain","redirectConfig","getItem","warn","loUiType","timeZoneOffsetInHours","getTimezoneOffset","GET_PRODUCT_CONFIG","fetchProductI18n","GET_PRODUCT_I18N","setAsAdaptive","SET_AS_ADAPTIVE","isInitialized","currentNodeId","currentTaskId","innerParams","showAnimation","adaptiveFeedback","showSystemMessages","isEnvironmentRequired","isAnyActiveAudience","showModalMessage","loadLO","isEqualLoConnection","isEqualLoViewSettings","isSameDocAndTask","_this$props2$events","taskId","gotoParams","pagesSkipped","textKey","plugin","loadDocument","goto","loWrapper","hidden","adaptiveDefaultEvents","_onDocumentDone","_args3","_onFolderDone","_args4","handleNextPageRequested","showAlertMessage","AlertType","NEXT_FOLDER_DISABLED","END_OF_COURSE","handleLoginRequest","showMoeLoginDialog","showCetLoginDialog","handleLogoutRequest","logOut","handleExtendSessionRequest","extendSession","handleChangeSchoolRequest","showChangeSchoolDialog","handleGetItemLink","hostname","linkUrl","handleBackClick","goBack","_this$props3","getUserTasks","handleHideAlertMessage","handleLoPageChange","_this$props4","hash","handleStudentLearningEvent","cetEvent","_this$props6","_this$props5","sendSuccessfully","deltaNodes","studentStateDelta","doneDocument","engineType","verb","success","triggers","buildStudentStateMap","n","fetchStudentStateSuccess","hasOwnProperty","loId","isNodeDone","error","scopeId","_this$props8","_this$props7","nextScopeId","blockedCurrentNodes","_nextScopeId","currentDocument","nextStudentItem","nextStudentState","nodes","isEndOfScope","isLastNodeInTree","findNextEnabledFolder","getBlockedCurrentNodes","extractIdFromNodeKey","endsWith","handleLastPageRequested","_this$props10","_this$props9","getStudentLastDocument","handleGoBackRequested","_this$props11","currentGotoParams","previousPageData","prevPage","pageHash","handleGoForwardRequested","_this$props12","nextPageData","nextPage","c1","c2","languageId","majorVersion","minorVersion","structureVersion","v1","v2","_v1$gotoParams$state","_v1$gotoParams$state$","_v2$gotoParams$state","_v2$gotoParams$state$","childDocumentId","courseId","currentPage","pages","isEqualLoParams","p1","p2","runtimeOptions","accessibilityDirection","useOwnLogin","editDocument","openDocumentEditor","onLoginRequest","onLogoutRequest","onExtendSessionRequest","onChangeSchoolRequest","onGetItemLink","onBack","onPagination","onSendLearningEvent","onNextPageRequested","onLastPageRequested","onGoBackRequested","onGoForwardRequested","_this3","_this$props13","searchParams","isWaitingForLogout","overrideDocumentWithId","unload","gotoHomePage","alertType","NODE_NOT_FOUND","DISABLED_NODE","task","studentId","student","contextGroupId","loadLoDocument","nextProps","nextState","isWaitingForLoading","_classNames","_this4","loWrapperClassName","_defineProperty","isMobileDevice","isLoHidden","React","Fragment","display","folder","updateNodeEvaluations","exports","GOOGLE_EVENT_CATEGORY","GoogleAnalytics","sendManagerEvent","handleOnBuy","handlePurchase","handleOnExtraInfo","userSchoolSign","purchaseConfig","userShopURL","getUserShopURL","showCetCatalogueLink","A","isBtnView","_product$config2","schoolSign","hasAudiences","handleGetStarted","_this$props2$onNext","onNext","isStudent","handleCetLoginRequest","skin","handleMoeLoginRequest","loginCSS","login__wrapper","login__moe","login__text","login__cet","login__purchase","login__purchase__text","defaultProps","NOT_MOBILE_ADAPTED","NODE_SCHEDULE_DISABLED","GENERAL_ERROR_MESSAGE","NO_CLASSES_AND_GROUPS","COURSE_CONTENT","FUTURE_ENVIRONMENT","STUDENT_PREVIEW","NODE_UNAVAILABLE_GENERAL","NODE_UNAVAILABLE_BLOCKED_BY_TEACHER","NODE_UNAVAILABLE_BLOCKED_BY_ENGINE","PURCHASE_ALLOWED_BY_MOE_USERS_ONLY","PURCHASE_ALLOWED_BY_STUDENTS_ONLY","PURCHASE_ALLOWED_BY_TEACHERS_ONLY","setTeacherMenuActiveNode","SET_TEACHER_MENU_ACTIVE_NODE","setTeacherSchedulerActiveNodes","getState","nodeKeys","teacherSchedulerActiveNodeKeys","preventScroll","SET_TEACHER_SCHEDULER_ACTIVE_NODE","setTeacherInfoActiveNodes","teacherInfoActiveNodeKeys","SET_TEACHER_INFO_ACTIVE_NODE","SHOW_ALERT_MESSAGE","HIDE_ALERT_MESSAGE","SHOW_MODAL_MESSAGE","HIDE_MODAL_MESSAGE","resetView","RESET_VIEW","setPreventScroll","PREVENT_SCROLL","symbolsUrl","iconClassName","xlinkHref","process","customDimensions","customDimensionsValues","tracker","gtag","additionalConfiguration","script","async","dataLayer","body","loadGoogleTag","gtagManager","dataLayerManager","loadGoogleTagManager","sendEvent","event_label","additionalData","setProductId","setDeviceData","deviceType","setUserData","userID","setCampaignData","campaignData","assign","BaseParams","ObjectType","getParams","baseParams","contextAdditionalInformation","sessionId","contentLanguage","CetEvents","setUser","sendPageEnter","_window$cet$microserv","microservices","bigData","enums","verbs","launched","objectTypes","webpage","sendPageExit","_window$cet$microserv2","exited","sendPressEvent","_window$cet$microserv3","pressed","inputControl","isMobile","_getState$tree","_getState$product$con","_getState$user","isLinksFolder","setStateAsLoading","fetchLmsForFolder","updatedNodes","fetchStateForFolderSuccess","LOAD_STATE","LOAD_STATE_SUCCESS","fetchStateForItemSuccess","fetchLmsForItem","fetchStateForMultipleFolders","folderIds","clearState","_getState$product$con2","_getState$user2","folderItemPairs","fetchLmsForFolderItemPairs","lmsValues","merged","st","scopes","CLEAR_STATE","setItemStateAsInProgress","noCheck","convertJsonToUserPersonalTree","convertTreeToDictionary","hideFoldersWithNoVisibleChildren","initParentsAsFlaggedFolders","isRemovedOnConvert","parentFolder","isNew","isRemovedNode","isVisibleNode","filteredTreeByType","isScheduleOptionDisabled","timingOptionConfig","isHideOptionDisabled","IsScheduled","parents","leadingItem","parentFolderId","c","child","reverse","cid","p","parent","setFoldersByInnerFlags","innerFolder","splice","setVisibilityFromParentDown","updated","setVisibilityFromChildUp","getNodeByIdAndParent","parentNodeId","getItemIdFromKey","splittedKey","getFirstLinksFolder","startIndex","treeNodes","timeoutRef","isWithCloseButton","object","_olamonim$settings2","_olamonim$settings2$p","_prizeInfo$prizeCatal","_prizeInfo$prizeCatal2","setPrizeInfo","prizeCount","setPrizeCount","_olamonim$settings$pr","_olamonim$settings$pr2","_olamonim$settings$pr3","prizeID","_olamonim$wallet$priz","getCountFromWallet","opacity","fetchAllProductsConfig","configs","getUserTasksTimeout","userData","fetchArray","checkIsUserAuthorized","fetchUserAudiences","fetchUserGroups","_values","groupsData","SET_USER","setActiveAudience","_getState","_audiences$find","getEnvironmentId","clearEnvironmentId","getAudienceId","getActiveAudience","setAudienceId","SET_ACTIVE_AUDIENCE","addAudience","ADD_AUDIENCE","updateEnvironment","removeAudience","REMOVE_AUDIENCE","defaultAudience","getDefaultAudience","getUserCourses","fetchUserCapsules","capsules","courses","currentSchoolCapsules","capsule","schoolID","currentSchoolCourses","course","capsuleForCourse","folderID","isMobileEnabled","GET_USER_COURSES","getLastVisit","fetchLastVisit","lastVisitData","lastVisit","GET_LAST_VISIT","_getState2","tasks","gradedTasks","_getState3","fetchAllEnvironmentTasks","setEnvironmentTasks","fetchUserTasks","fetchUserGrades","getUserTasksSuccess","activeFilterType","setTasksFilterType","tasksData","immediateTasksCount","activeTasksCount","overdueTasksCount","examTasksCount","evaluatedTasksCount","today","isNotScheduledExam","endDate","taskFilter","treeTaskFilterTypes","examTasks","isTodayOrTomorrow","immediateTasks","overdueTasks","isLmsInfoHidden","evaluatedTasks","activeTasks","GET_USER_TASKS","getAudienceStudents","_getState4","students","fetchAudienceStudents","SET_AUDIENCE_STUDENTS","secureShopUrlReturnUrl","shopUrl","strsrc","URL","strsrcUrl","atob","parsedUrl","URLSearchParams","search","delete","paramString","param","host","setParamWithoutEncoding","btoa","_getState5","purchaseEnabledMode","isPurchaseEnabledForMoeOnly","secureShopUrl","encodedPurchaseUrl","loginAccount","toLocaleLowerCase","MultiAnimation","isPlay","setIsPlay","animations","setAnimations","playMultiAnimations","currentTotalValue","animationsArr","playCount","handleLastAnimationComplete","animationsGap","initSSO","getSessionAsync","session","redirectUrl","loginMoe","loginCet","returnUrl","clear","logout","extendSessionAsync","isSessionAlive","loadTree","treeJson","environment","getTree","folderTree","SET_TREE","newTreeData","setNodeFlag","saveFolder","saveItem","SET_NODE_FLAG","setNodeVisibility","folders","u","SET_NODE_VISIBILITY","filterType","myTasks","none","SET_TREE_ACTIVE_FILTER_TYPE","setTaskFilterSortType","sortBy","SET_TASKS_SORT_TYPE","resetTaskFilterSortType","SET_ENVIRONMENT_TASKS","createDefaultTreeState","defaultStateStr","defaultStateJSON","s","createDefaultState","undoStartTime","setAddMenuActiveNode","isAboveNode","SET_ADD_MENU_ACTIVE_NODE","clearAddMenuActiveNode","CLEAR_ADD_MENU_ACTIVE_NODE","setDropZoneNode","SET_DROP_ZONE_NODE","clearDropZoneNode","CLEAR_DROP_ZONE_NODE","setEditMenuActiveNode","SET_EDIT_MENU_ACTIVE_NODE","clearEditMenuActiveNode","CLEAR_EDIT_MENU_ACTIVE_NODE","setEditTitleActiveNode","SET_EDIT_TITLE_ACTIVE_NODE","clearEditTitleActiveNode","CLEAR_EDIT_TITLE_ACTIVE_NODE","setDraggedNode","openFolders","dropDisabledNodesMap","enumNodeDropModes","bothDisabled","draggedNode","draggedNodeIndex","nodeAboveId","isIncompatible","nodeAbove","nodeAboveUniqueId","outerOnlyDisabled","nodeUniqueId","curNode","curNodeUniqueId","SET_DRAGGED_NODE","clearDraggedNode","CLEAR_DRAGGED_NODE","setNodeToDelete","SET_NODE_TO_DELETE","clearNodeToDelete","CLEAR_NODE_TO_DELETE","setItemsDepotSrcNode","itemKey","SET_ITEMS_DEPOT_SRC_NODE","clearItemsDepotSrcNode","CLEAR_ITEMS_DEPOT_SRC_NODE","setNodeToHide","SET_NODE_TO_HIDE","clearNodeToHide","CLEAR_NODE_TO_HIDE","updateUndoAvailability","isUndoAvailable","SET_UNDO_AVAILABILITY","setUndoPending","isPending","waitFor","SET_UNDO_PENDING","updateNewNodesMap","newNodesMapUpdate","newNodesMap","creator","updatedNewNodesMap","SET_NEW_NODES_MAP","clearBadDropProperties","CLEAR_BAD_DROP_PROPERTIES","setLastLoStudioEditedItemKey","SET_LAST_LO_STUDIO_EDITED_ITEM_KEY","clearLastLoStudioEditedItemKey","CLEAR_LAST_LO_STUDIO_EDITED_ITEM_KEY","undoLastEdit","undo","updateNodeTitle","isValidGenericString","updatedNode","functionName","getEnvironmentSaveFnc","SET_NODE_TITLE","updateNodePositionState","dragSourceNode","dropTargetNode","dragSourceNodeClone","dragSourceNodePosition","getNodePosition","nodePointingToDraggedNode","getNodePointingToRefNode","newParentFolderId","setNodePosition","isDropOnOpenFolder","dragSourceNodeNewPosition","getNodeNewPosition","nodePointingToNewPosition","previousDocumentId","previousDocumentType","getNodeDocumentType","parentFolderClone","oldIndex","formerParentId","newParentFolderClone","newIndex","getNodeChildIndex","folderMovementRecursiveParentsUpdate","unshift","updateNodePosition","addNodesFromItemsDepot","origNodesData","forceOutsideFolder","isInsideFolder","targetParentNode","childId","totalItemsCount","badItemsCount","validDroppedItems","SET_BAD_DROP_PROPERTIES","newNodesForAnimation","targetNode","newNode","TaskItem","description","summary","imageUrl","thumbnail","myBagURL","defaultIcon","emptyDocumentGuid","enumDocumentType","un","updatedNodesForServer","toString","deleteNode","isSuppressSaving","toDeleteNodesMap","deletedNode","deletedNodePosition","parentFolderChildrenIds","deletedNodeIndex","updatedToDeleteNodesMap","SET_DELETE_NODES_MAP","nodePointingToDeletedNode","duplicateItem","copyOfText","newId","newItem","changeTaskItem","newItemId","ofakimAPIURL","headers","Accept","credentials","saveEditedItem","isNewItem","studioEditedItem","loStudioItemId","externalTools","studioSrcNode","advancedOptionsItemId","newItemOnTree","shouldHandleEditedItemOnTree","getItemById","newItemData","baseItem","disableAssessment","canBeAssigned","nodeToReference","getPrevNode","addNewFolder","baseFolder","defaultTitle","updatedChildren","guid","newFolder","TaskFolder","origItemIndex","isHeaderAlert","onCancelClick","cancelLabel","_this$props$zIndex","zIndex","Snackbar","contentText","wrapper","shape","hasWorkToDo","treeArr","entries","currentElements","lastCurrentId","lastCurrentIndex","getProductBookmarkRuleBaseState","ruleBaseStateMap","productDocuments","lastDocumentKey","_args","getUserHistory","getLinksFolderLinearRuleBaseState","_folderChildren","isCurrentAlreadyFound","folderChildren","lastSubmittedDocumentIndex","_document$lms","getFolderLinearRuleBaseState","_folder$children","rbs","_folderChildren2","subFolderId","getFolderLinearFreestyleRuleBaseState","_tree$folderId2","_folderChildren3","lastDoc","lastDocumentIndex","isCurrentSelected","_document$lms2","elementSettings","mouseOver","disabledMouseOver","getCookiesApiValue","_result$0$value","_result","_result$","cookies","content","getValues","t0","updateCookiesApiValue","val","setValue","userHistory","userHistoryKey","_args5","currentDocumentId","_x17","_x18","_x19","_x20","_x21","eventHandler","which","_config$loUiType","isEventInProgress","_olamonim$currentMap","_olamonim$status$back","referrerMapRoute","isPlayingBackgroundSound","ssoLogout","goToStore","toggleAudio","playAudio","stopAudio","paused","updateElementClass","dutation","updateMode","updateClassNames","dataNew","focusOnElementById","focus","scrollToElement","checkExist","setInterval","offset","scrollTop","scrollLeft","startFrom","scrollHeight","scrollWidth","scroll","containerHeight","fixedTopOffset","offsetTop","containerWidth","fixedLefOffset","offsetLeft","behavior","scrollIntoView","scrollOptions","clearInterval","goToFolder","goToItem","goToItemStart","resetUserState","currentItem","reset","parentMapRef","goToParentMap","goToReferrerMap","previousRoute","goToHref","goToNextDocumentInFolder","_currentFolder$childr","currentFolder","currentDocumentIndex","nextDocumentIndex","isFreestyleRuleBase","nextDocument","openUrl","updateElementStatus","updateWallet","updateUi","updateUiRenderedElements","actionData","updateUiRenderedElementsAction","changeAudience","_ref20","_ref19","preventAction","alertBrowser","_ref21","alert","eventHandlers","actionSettings","fetchStudentState","studentState","firstLinksFolder","fetchStudentTreeState","referenceFolder","findNextEnabledChild","referenceFolderKey","learningApplicationId","fetchStudentNextItem","numOfSkippedPages","currentNode","subTree","_currentNode$","_currentNode$2","_currentNode$3","currentFolderChildren","currentNodeIndex","nextNodeIndex","nextNode","_currentNode$4","_currentFolderChildren","_currentNodeIndex","previousNodeIndex","previousNode","IS_OLAMON","lastNode","getStudentsStateByType","_callee12","_getState6","_getState7","_context12","studentIds","studentsState","fetchStudentsStateByType","buildStudentStateMapForTeacher","_callee14","_getState8","_context14","_callee13","documentNode","enforceCalculation","evaluations","documentEvaluation","documentScopeWithEvaluations","_context13","fetchEvaluationForNodes","evaluation","methodName","LOAD_NODE_EVALUTAIONS_SUCCESS","updateDocumentsNumOfPages","_callee16","_getState9","_context16","_callee15","documentsNumOfPages","_context15","fetchDocumentsNumOfSections","LOAD_DOCUMENTS_NUM_OF_SECTIONS","_x24","_x22","_x23","roundDown","v","getNumberAsDoubleFigure","getElementFontSize","parseFloat","civilYear","Number","units","dozens","hundreds","rest","letters","getWeekNumber","date","utcDate","UTC","getFullYear","getMonth","getDate","dayNum","getUTCDay","setUTCDate","getUTCDate","yearStart","getUTCFullYear","ceil","updateStateTimeout","LOGIN_MODAL_KEY","defaultOptions","envRedirectUrl","shouldRedirect","isMobileView","onLogout","onLoginReady","onSchoolUpdate","isSsoInitialized","campaignDataStr","_user$groups","onUserChange","isStudentPreview","setIsStudentPreview","replaceState","pathName","reload","taskManagerNodeKey","TOC_DEVICE_TYPE","setEnvironmentId","setWaitingForLogout","onUserDataChanged","googleAnalytics","showLoginModal","isTeacherEditAudienceEnable","UPDATE_STATE_TIMEOUT_INTERVAL","isAdminUser","lmsFolders","setWaitingForLoading","rootFolderId","onEditItemSave","onItemCreatedSave","hasAnyChanges","defaultTreeState","allTasks","moreTasks","myCourse","myGrades","returnToPath","getLoUrl","isCyberSquad","eventHandlerModel","oneOfType","array","bool","number","buildGotoParams","_treeData$document$pa","pagesKeys","isFolderDone","urlPageId","findPreviousPage","findNextPage","page1","findPreviousDocument","findNextDocument","includeSkippedPages","currentPageId","_currentDocument$lms","isSkippedDocument","currentPageIndex","documentIndexInParent","prevDocumentPages","versions","relevantPagesStatus","_currentDocument$lms2","nextDocumentPages","_prevDocument$lms","prevDocument","_nextDocument$lms","baseViewSettings","baseConnection","parentsIds","isLoadingLms","_viewSettings","_viewSettings$gotoPar","lottieJsonURL","loPreloaderAnimation","isAdminEditAudienceEnable","uiType","tocMain","bodyBackgroundColor","LOAD_DOCUMENT","createTaskOnTheFly","resetConnection","RESET_DOCUMENT","SET_WAITING_FOR_LOGOUT","SET_WAITING_FOR_LOADING","validationOff","innerOnlyDisabled","movedNode","newParentFolder","movedNodeClone","treeDataClone","childNode","getFolderHasChildren","getIsFirstChildIsDocument","prevChildIndex","prevId","prevNode","sourceNode","isReferenceNodeIsOpenFolder","pointingId","newNodePosition","sourceNodeType","getNextNode","nextChildIndex","nextId","toggle","_status$","LOAD_USER_STATUS","newStatus","stringify","UPDATE_USER_STATUS","UPDATE_USER_AS_INTERACTED","LOAD_SETTINGS","walletItems","UserID","ApplicationID","walletapi","LOAD_USER_WALLET","isDelta","updatedPrize","UPDATE_USER_WALLET_ITEM","walletItem","ruleBaseMethod","SET_RB_STATE","UPDATE_MAP_STATUS","mapId","UPDATE_MAP_ID","UPDATE_UI_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AACzY,GAAO,sBAAA6W,EAAAjpB,YAAAC,cAAAC,MAAK,SAAAg1D,EAAOn5D,EAAU2wC,GAAQ,IAAAqpB,EAAA7+D,EAAAqH,EAAAsiE,EAAA,OAAA5gE,cAAAM,MAAA,SAAAi1D,GAAA,cAAAA,EAAA/0D,KAAA+0D,EAAA90D,MAAA,OAAAq1D,EACzDrpB,IAATx1C,EAAI6+D,EAAJ7+D,KAEJkb,KACI7T,EAAW,OAAJrH,QAAI,IAAJA,OAAI,EAAJA,EAAMG,KAAK+a,IAElB7T,EAAKsE,SACP9G,EAAS4jC,YAAiB5G,IAAUmT,sCACd,QAAjB20B,EAAItiE,EAAK4D,gBAAQ,IAAA0+D,GAAbA,EAAez+D,UAI1BrG,EAAS4jC,YAAiB5G,IAAUkT,4BAEvC,wBAAAupB,EAAAv0D,OAAA,GAAAi0D,EAAA,KACF,gBAAAqB,EAAAC,GAAA,OAAAvtC,EAAAh1B,MAAA,KAAA7C,UAAA,EAf6C,EAe7C,C,sBCpSDglC,EAAOsT,QAAU,CAAC,IAAM,4BAA4B,YAAc,oCAAoC,OAAS,+BAA+B,UAAU,gC","file":"static/js/13.27ad1111.chunk.js","sourcesContent":["import { SET_ACCESSBILITY_FOCUS_SECTION } from './action-types';\r\n\r\nexport const SectionNames = {\r\n MAIN_MENU_BAR: 'MAIN_MENU_BAR',\r\n ITEMS_MENU_BAR: 'ITEMS_MENU_BAR',\r\n TOC_TREE: 'TOC_TREE',\r\n TOC_TREE_ITEM: 'TOC_TREE_ITEM',\r\n LO_IFRAME: 'LO_IFRAME'\r\n};\r\n\r\nexport const setAccessibilityFocus = (sectionName, startElement = null) => ({\r\n type: SET_ACCESSBILITY_FOCUS_SECTION,\r\n sectionName,\r\n startElement\r\n});\r\n","import { getStaticFileUrl } from './endpoints';\r\n\r\nexport const loadJson = (path) =>\r\n\tfetch(`${getStaticFileUrl(path)}?${window.TOC_BUST}`).then((response) => response.json());\r\n\r\nexport const createLinkTag = (id, path) => {\r\n\tconst linkTag = document.createElement('link');\r\n\tlinkTag.setAttribute('id', `${id}_css`);\r\n\tlinkTag.setAttribute('rel', 'stylesheet');\r\n\tlinkTag.setAttribute('type', 'text/css');\r\n\tlinkTag.setAttribute('href', `${getStaticFileUrl(path)}?${window.TOC_BUST}`);\r\n\treturn linkTag;\r\n};\r\n\r\nexport const loadFonts = (fonts) => {\r\n\tconst headTag = document.querySelector('head');\r\n\tfonts.forEach((font) => {\r\n\t\tconst fontId = Object.keys(font)[0];\r\n\t\tif (!document.getElementById(`${fontId}_css`)) {\r\n\t\t\tconst linkFontTag = createLinkTag(fontId, font[fontId]);\r\n\t\t\theadTag.appendChild(linkFontTag);\r\n\t\t}\r\n\t});\r\n};\r\n","import React, { Component } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { injectIntl } from 'react-intl';\r\nimport { connect } from 'react-redux';\r\n\r\nimport { getParentPage } from '../../SharedLogic/app/services';\r\n\r\nimport { Button } from 'cet-components-lib/dist/UI/Button';\r\nimport { Modal } from 'cet-components-lib/dist/Layout/Modal';\r\n\r\nimport './Modals.scss';\r\n\r\nclass NodeUnavailableModal extends Component {\r\n handleOnClose = () => {\r\n const { rootDocumentId, treeData, siteRoutes, onClose } = this.props;\r\n\r\n if (onClose && typeof onClose === 'function') {\r\n onClose();\r\n } else {\r\n window.location.href = `/${window.TOC_PRODUCT_NAME}${getParentPage(rootDocumentId, treeData, siteRoutes)}`;\r\n }\r\n };\r\n\r\n render() {\r\n const { intl, type } = this.props;\r\n const innerHTML = intl.formatHTMLMessage({ id: type });\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nNodeUnavailableModal.prototypes = {\r\n lang: PropTypes.string.isRequired,\r\n type: PropTypes.string.isRequired,\r\n onClose: PropTypes.func\r\n};\r\n\r\nconst mapStateToProps = (state, props) => {\r\n const { product, tree, olamonim } = state;\r\n\r\n return {\r\n rootDocumentId: product?.config?.rootDocumentId,\r\n treeData: tree?.data,\r\n siteRoutes: olamonim?.settings?.site?.routes\r\n };\r\n};\r\n\r\nexport default injectIntl(connect(mapStateToProps, null)(NodeUnavailableModal));\r\n","import React, { useState, useEffect, useRef } from 'react';\r\nimport Lottie from 'react-lottie';\r\n\r\nimport { getStaticFileUrl } from '../../../SharedLogic/utilities/endpoints';\r\n\r\nexport default function Preloader({ backgroundColor, path }) {\r\n const ref = useRef();\r\n const [isLoading, setIsLoading] = useState(false);\r\n const [animationData, setAnimationData] = useState();\r\n\r\n useEffect(() => {\r\n if (path && !isLoading) {\r\n setIsLoading(true);\r\n fetch(`${getStaticFileUrl(path)}?${window.TOC_BUST}`, { cache: 'force-cache' })\r\n .then(response => response.json())\r\n .then(data => {\r\n window.TOC_RESOURCES = window.TOC_RESOURCES || {};\r\n window.TOC_RESOURCES[`${getStaticFileUrl(path)}?${window.TOC_BUST}`] = data;\r\n setAnimationData(data);\r\n });\r\n }\r\n }, [path, isLoading]);\r\n\r\n if (!animationData) {\r\n return null;\r\n }\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n
\r\n );\r\n}\r\n","import { useEffect, useState } from 'react';\r\n\r\nexport const useMapStyle = ({ type, positions }) => {\r\n const [pageStyle, setPageStyle] = useState({});\r\n const [mapStyle, setMapStyle] = useState({});\r\n\r\n useEffect(() => {\r\n const calcPageHorizontalDelta = () => {\r\n let delta = 0;\r\n\r\n if (positions.page.fullSizeWidth > window.innerWidth) {\r\n delta = Math.min((positions.page.fullSizeWidth - window.innerWidth + positions.page.offsetX) / 2, positions.page.fullSizeWidth - window.innerWidth);\r\n }\r\n\r\n if (delta < 0) {\r\n delta = 0;\r\n }\r\n\r\n return delta;\r\n };\r\n\r\n const calcPageVerticalDelta = () => {\r\n let delta = 0;\r\n\r\n if (positions.page.fullSizeHeight > window.innerHeight) {\r\n delta = Math.min((positions.page.fullSizeHeight - window.innerHeight + positions.page.offsetY) / 2, positions.page.fullSizeHeight - window.innerHeight);\r\n }\r\n\r\n if (delta < 0) {\r\n delta = 0;\r\n }\r\n\r\n return delta;\r\n };\r\n\r\n const initPage = () => {\r\n let style = {\r\n backgroundSize: `${positions.page.fullSizeWidth}px ${positions.page.fullSizeHeight}px`,\r\n minWidth: `${positions.mapContainer.width + positions.page.margin}px`,\r\n minHeight: `${positions.mapContainer.height + positions.page.margin}px`\r\n };\r\n\r\n switch (type) {\r\n case 'contain':\r\n style = {};\r\n break;\r\n case 'horizontal': {\r\n const verticalDelta = calcPageVerticalDelta();\r\n\r\n style.backgroundPosition = `${0}px -${verticalDelta}px`;\r\n break;\r\n }\r\n case 'centered': {\r\n let horizontalDelta = calcPageHorizontalDelta();\r\n let verticalDelta = calcPageVerticalDelta();\r\n\r\n if (positions.mapContainer.y - verticalDelta < 0) {\r\n verticalDelta += positions.mapContainer.y - verticalDelta;\r\n }\r\n\r\n if (positions.mapContainer.x - horizontalDelta < 0) {\r\n horizontalDelta += positions.mapContainer.x - horizontalDelta;\r\n }\r\n\r\n style.backgroundPosition = `-${horizontalDelta}px -${verticalDelta}px`;\r\n break;\r\n }\r\n default:\r\n break;\r\n }\r\n\r\n setPageStyle(style);\r\n };\r\n\r\n const initMapContainer = () => {\r\n let style = {\r\n width: `${positions.mapContainer.width}px`,\r\n height: `${positions.mapContainer.height}px`\r\n };\r\n\r\n switch (type) {\r\n case 'contain':\r\n let top = 0,\r\n left = 0,\r\n height = positions.page.fullSizeHeight,\r\n width = positions.page.fullSizeWidth;\r\n let fontSize = 100;\r\n\r\n const originalRatio = positions.page.fullSizeWidth / positions.page.fullSizeHeight;\r\n const innerWindowRatio = window.innerWidth / window.innerHeight;\r\n\r\n if (originalRatio >= innerWindowRatio) {\r\n top = (window.innerHeight - window.innerWidth / originalRatio) / 2;\r\n width = window.innerWidth;\r\n height = window.innerWidth / originalRatio;\r\n } else if (originalRatio < innerWindowRatio) {\r\n left = (window.innerWidth - window.innerHeight * originalRatio) / 2;\r\n width = window.innerHeight * originalRatio;\r\n height = window.innerHeight;\r\n }\r\n\r\n fontSize = Math.min(window.innerWidth / positions.page.fullSizeWidth, window.innerHeight / positions.page.fullSizeHeight) * 100;\r\n fontSize = `${fontSize}%`;\r\n\r\n style = { top, left, width, height, fontSize };\r\n break;\r\n case 'horizontal': {\r\n const horizontalDelta = calcPageHorizontalDelta();\r\n\r\n style.left = `-${horizontalDelta}px`;\r\n style.width = positions.page.fullSizeWidth + positions.page.offsetX + 'px';\r\n style.position = 'relative';\r\n break;\r\n }\r\n case 'centered': {\r\n let horizontalDelta = calcPageHorizontalDelta();\r\n let verticalDelta = calcPageVerticalDelta();\r\n\r\n let top = Math.max(positions.mapContainer.y - verticalDelta, 0);\r\n let left = Math.max(positions.mapContainer.x - horizontalDelta, 0);\r\n style.top = `${top}px`;\r\n style.left = `${left}px`;\r\n\r\n break;\r\n }\r\n default:\r\n break;\r\n }\r\n\r\n setMapStyle(style);\r\n };\r\n\r\n const initMaps = () => {\r\n if (type) {\r\n initPage();\r\n initMapContainer();\r\n }\r\n };\r\n\r\n window.addEventListener('resize', initMaps);\r\n\r\n initMaps();\r\n\r\n return () => {\r\n window.removeEventListener('resize', initMaps);\r\n };\r\n }, [type, positions]);\r\n\r\n return { pageStyle, mapStyle };\r\n};\r\n","import { useEffect } from 'react';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { updateUserWallet } from '../../../../SharedLogic/olamonim/actions';\r\n\r\nexport const useUpdateWallet = (isReferredFromLo) => {\r\n\tconst dispatch = useDispatch();\r\n\tconst { wallet } = useSelector(({ olamonim }) => ({ wallet: olamonim.wallet }));\r\n\tuseEffect(() => {\r\n\t\tif (isReferredFromLo) {\r\n\t\t\tObject.values(wallet).forEach((value) => {\r\n\t\t\t\tif (value.delta && value.delta > 0) {\r\n\t\t\t\t\tdispatch(updateUserWallet(value.delta, value.code));\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}, [isReferredFromLo, wallet, dispatch]);\r\n};\r\n","import { useState, useEffect } from 'react';\r\nimport { useDispatch } from 'react-redux';\r\nimport { updateMapId, updateMapStatus } from '../../../../SharedLogic/olamonim/actions';\r\nimport { createLinkTag, loadJson, loadFonts } from '../../../../SharedLogic/utilities/loaders';\r\n\r\nexport const useLoadLayout = (settings, pageId) => {\r\n const dispatch = useDispatch();\r\n const [headerSettings, setHeaderSettings] = useState([]);\r\n const [footerSettings, setFooterSettings] = useState([]);\r\n const [isPageReady, setIsPageReady] = useState(false);\r\n const [isHeaderReady, setIsHeaderReady] = useState(false);\r\n const [isFooterReady, setIsFooterReady] = useState(false);\r\n\r\n const headTag = document.querySelector('head');\r\n\r\n // IsPageReady\r\n useEffect(() => {\r\n if (settings?.elements?.length) {\r\n if (settings.fonts) {\r\n loadFonts(settings.fonts);\r\n }\r\n\r\n if (!document.getElementById(`${pageId}_css`)) {\r\n const linkTag = createLinkTag(pageId, settings.cssPath);\r\n headTag.appendChild(linkTag);\r\n linkTag.onload = () => {\r\n setIsPageReady(true);\r\n };\r\n } else {\r\n setIsPageReady(true);\r\n }\r\n }\r\n }, [settings, pageId, headTag]);\r\n\r\n // IsHeaderReady\r\n useEffect(() => {\r\n let isMounted = true;\r\n if (settings && Object.keys(settings).length !== 0) {\r\n if (settings.headerPath) {\r\n loadJson(settings.headerPath).then((headerSettings) => {\r\n isMounted && setHeaderSettings(headerSettings);\r\n if (headerSettings?.id && headerSettings.cssPath) {\r\n if (!document.getElementById(`header_${headerSettings.id}_css`)) {\r\n const headerLinkTag = createLinkTag(`header_${headerSettings.id}`, headerSettings.cssPath);\r\n headTag.appendChild(headerLinkTag);\r\n headerLinkTag.onload = () => {\r\n setIsHeaderReady(true);\r\n };\r\n } else {\r\n setIsHeaderReady(true);\r\n }\r\n } else {\r\n setIsHeaderReady(true);\r\n }\r\n });\r\n } else {\r\n setIsHeaderReady(true);\r\n }\r\n }\r\n }, [settings, pageId, headTag]);\r\n\r\n // IsFooterReady\r\n useEffect(() => {\r\n let isMounted = true;\r\n if (settings && Object.keys(settings).length !== 0) {\r\n if (settings.footerPath) {\r\n loadJson(settings.footerPath).then((footerSettings) => {\r\n isMounted && setFooterSettings(footerSettings);\r\n if (footerSettings?.id && footerSettings.cssPath) {\r\n if (!document.getElementById(`footer_${footerSettings.id}_css`)) {\r\n const footerLinkTag = createLinkTag(`footer_${footerSettings.id}`, footerSettings.cssPath);\r\n headTag.appendChild(footerLinkTag);\r\n footerLinkTag.onload = () => {\r\n setIsFooterReady(true);\r\n };\r\n } else {\r\n setIsFooterReady(true);\r\n }\r\n } else {\r\n setIsFooterReady(true);\r\n }\r\n });\r\n } else {\r\n setIsFooterReady(true);\r\n }\r\n }\r\n }, [headTag, settings]);\r\n\r\n // IsMapReady\r\n useEffect(() => {\r\n dispatch(updateMapStatus(false));\r\n dispatch(updateMapId(pageId));\r\n\r\n function getImgsSrcs(doc) {\r\n return Array.from(doc.images).map(\r\n (img) =>\r\n ({\r\n src: img.currentSrc, // img.src if you want the origin\r\n width: img.naturalWidth,\r\n height: img.naturalHeight,\r\n }.src)\r\n );\r\n }\r\n\r\n function getBgImgsSrcs(doc) {\r\n const srcChecker = /url\\(\\s*?['\"]?\\s*?(\\S+?)\\s*?[\"']?\\s*?\\)/i;\r\n return Array.from(\r\n Array.from(doc.querySelectorAll('*')).reduce((collection, node) => {\r\n let prop = window.getComputedStyle(node, null).getPropertyValue('background-image');\r\n // match `url(...)`\r\n let match = srcChecker.exec(prop);\r\n if (match) {\r\n collection.add(match[1]);\r\n }\r\n return collection;\r\n }, new Set())\r\n );\r\n }\r\n\r\n const preloadImages = (srcs) => {\r\n\t\t\tconst loadImage = (src) => {\r\n return new Promise((resolve, reject) => {\r\n const img = new Image();\r\n img.onload = () => {\r\n resolve(img);\r\n };\r\n img.onerror = img.onabort = () => {\r\n reject(src);\r\n };\r\n img.src = src;\r\n });\r\n };\r\n const promises = [];\r\n srcs.forEach((currSrc) => promises.push(loadImage(currSrc)));\r\n return Promise.allSettled(promises);\r\n };\r\n\r\n const updateMapState = async () => {\r\n const imageTagsSrcs = getImgsSrcs(document);\r\n const imagesBgSrcs = getBgImgsSrcs(document);\r\n // Add srcs together and remove duplicates\r\n const imagesSrcsAll = Array.from(new Set([...imageTagsSrcs, ...imagesBgSrcs]));\r\n // Load images from srcs\r\n await preloadImages(imagesSrcsAll);\r\n // Hide PreLoader\r\n dispatch(updateMapStatus(true));\r\n };\r\n\r\n if (isPageReady && isHeaderReady && isFooterReady) {\r\n updateMapState();\r\n }\r\n }, [isPageReady, isHeaderReady, isFooterReady, dispatch, pageId]);\r\n\r\n return { isPageReady, isHeaderReady, isFooterReady, headerSettings, footerSettings };\r\n};\r\n","import { useSelector } from 'react-redux';\r\n\r\nexport const useIsActiveElement = () => {\r\n const { isUserAuthorized, isRevealedByTeacher } = useSelector(({ user, olamonim }) => ({ isUserAuthorized: user?.isAuthorized, isRevealedByTeacher: olamonim.ui.teacherButtons?.isRevealedByTeacher }));\r\n const isActiveElement = (element, environmentTasks = null, ignoreEngine = false) => {\r\n if (element) {\r\n const isLocked = element.isLocked && !isUserAuthorized;\r\n const isActiveByEngine = ignoreEngine || (element.scope !== 'disabled' && (!element.ruleBase || !element.ruleBase?.isBlocked));\r\n //differential assignment\r\n const isDADisabled = !element.lms?.TaskId && environmentTasks && environmentTasks.some( item => item.ItemId === element.id && item.FolderId === element.parentId);\r\n return (\r\n !isDADisabled &&\r\n !isLocked &&\r\n element.isPublished &&\r\n (element.type === 'link' || element.children.length > 0) &&\r\n (isRevealedByTeacher || (!element.isHidden && !element.isDeleted && isActiveByEngine))\r\n );\r\n }\r\n return false;\r\n };\r\n return isActiveElement;\r\n};\r\n","import { useEffect, useState } from 'react';\r\nimport { useSelector } from 'react-redux';\r\nimport { useIsActiveElement } from '../../../../SharedLogic/olamonim/hooks/useIsActiveElement';\r\n\r\nexport const usePageBackground = settings => {\r\n const isActiveElement = useIsActiveElement();\r\n const { tree, environmentTasks, status } = useSelector(({ tree, olamonim }) => ({\r\n tree: tree.data,\r\n environmentTasks: tree.environmentTasks,\r\n status: olamonim.status,\r\n }));\r\n const [pageBackground, setPageBackground] = useState('');\r\n\r\n useEffect(() => {\r\n const getPageBinaryState = (tree, mapSettings, isRequired, isDoneRequired) => {\r\n let bit = '';\r\n mapSettings.relevantElementKeys.forEach(key => {\r\n const element = tree[key];\r\n\r\n if (isActiveElement(element, environmentTasks) && (!isRequired || isDoneRequired || key === mapSettings.requiredElement)) {\r\n bit += '1';\r\n } else {\r\n bit += '0';\r\n }\r\n });\r\n\r\n return parseInt(bit, 2);\r\n };\r\n if (settings.backgrounds) {\r\n if (Object.keys(settings.backgrounds).length > 1) {\r\n if (tree) {\r\n const pageBinaryState = getPageBinaryState(tree, settings, settings.requiredElement, status[settings.requiredElement]?.DONE);\r\n setPageBackground(settings.backgrounds[pageBinaryState]);\r\n }\r\n } else {\r\n setPageBackground(settings.backgrounds[0]);\r\n }\r\n }\r\n }, [settings, status, tree, isActiveElement, environmentTasks]);\r\n return pageBackground;\r\n};\r\n","import { useEffect } from 'react';\r\nimport { useSelector } from 'react-redux';\r\nimport { getStaticFileUrl } from '../../../../SharedLogic/utilities/endpoints';\r\n\r\nexport const useBackgroundSound = (settings) => {\r\n const { status } = useSelector(({ olamonim }) => ({ status: olamonim.status }));\r\n\r\n useEffect(() => {\r\n if (settings && Object.keys(settings).length !== 0) {\r\n if (status.background_sound?.PLAYING && settings.backgroundSoundPath && status.userInteracted) {\r\n window.TOC_RESOURCES = window.TOC_RESOURCES || {};\r\n window.TOC_RESOURCES.sounds = window.TOC_RESOURCES.sounds || {};\r\n if (!window.TOC_RESOURCES.sounds[settings.backgroundSoundPath]) {\r\n window.TOC_RESOURCES.sounds[settings.backgroundSoundPath] = new Audio(\r\n getStaticFileUrl(settings.backgroundSoundPath)\r\n );\r\n }\r\n window.TOC_RESOURCES.sounds[settings.backgroundSoundPath].currentTime = 0;\r\n\r\n window.TOC_RESOURCES.sounds[settings.backgroundSoundPath].play();\r\n window.TOC_RESOURCES.sounds[settings.backgroundSoundPath].addEventListener(\r\n 'ended',\r\n function () {\r\n this.currentTime = 0;\r\n this.play();\r\n },\r\n false\r\n );\r\n }\r\n }\r\n return () => {\r\n if (window.TOC_RESOURCES?.sounds) {\r\n Object.keys(window.TOC_RESOURCES.sounds).forEach((key) => {\r\n window.TOC_RESOURCES.sounds[key].pause();\r\n });\r\n }\r\n };\r\n }, [settings, status.background_sound, status.userInteracted]);\r\n};\r\n","import { useCetEvents as useCetEventsHook } from 'cet-components-lib/dist/hooks';\r\nimport { useCallback, useMemo } from 'react';\r\nimport { useSelector } from 'react-redux';\r\n\r\nexport const emptyGuid = '00000000-0000-0000-0000-000000000000';\r\n\r\nexport const useCetEvents = () => {\r\n const { rootDocumentId, productId, audienceId, environmentId } = useSelector(({ product, user }) => ({\r\n lang: product.config.constsLanguage,\r\n rootDocumentId: product.config.rootDocumentId,\r\n productId: product.config.productId,\r\n audienceId: user && user.activeAudience ? user.activeAudience.audienceId : emptyGuid,\r\n environmentId: user && user.activeAudience ? user.activeAudience.id : emptyGuid\r\n }));\r\n\r\n const optionalData = useMemo(\r\n () => ({ contentGroupingId: productId, contentParentId: rootDocumentId, audienceId, environmentId }),\r\n [audienceId, environmentId, productId, rootDocumentId]\r\n );\r\n\r\n const { sendUiUsageEvent, sendLearningEvent } = useCetEventsHook();\r\n\r\n const sendInnerUiUsageEvent = useCallback(\r\n data => {\r\n data.optionalData = { ...optionalData, ...data.optionalData };\r\n sendUiUsageEvent(data);\r\n },\r\n [optionalData, sendUiUsageEvent]\r\n );\r\n\r\n const sendInnerLearningEvent = useCallback(\r\n data => {\r\n data.optionalData = { ...optionalData, ...data.optionalData };\r\n sendLearningEvent(data);\r\n },\r\n [optionalData, sendLearningEvent]\r\n );\r\n\r\n return {\r\n sendUiUsageEvent: sendInnerUiUsageEvent,\r\n sendLearningEvent: sendInnerLearningEvent\r\n };\r\n};\r\n","import { useEffect, useRef } from 'react';\r\nimport { useCetEvents } from '../../../../SharedLogic/olamonim/hooks/useCetEvents';\r\n\r\nexport const useSendExitedEvent = pageId => {\r\n let { sendLearningEvent } = useCetEvents();\r\n const isReady = useRef(false);\r\n\r\n useEffect(() => {\r\n if (isReady.current) {\r\n let isReload = window.performance && window.performance.getEntriesByType && window.performance.getEntriesByType('navigation');\r\n isReload = isReload && isReload.length > 0 && isReload[0].type && isReload[0].type === 'reload';\r\n // if page refreshed\r\n if (isReload && !window.contextReferrer) {\r\n window.contextReferrer = window.document.referrer || window.location.href;\r\n window.currentHyperlink = window.location.href;\r\n sendLearningEvent({\r\n verbType: 'exited',\r\n objectName: pageId,\r\n objectId: window.currentHyperlink\r\n });\r\n }\r\n }\r\n\r\n isReady.current = true;\r\n }, [pageId, sendLearningEvent]); //run once on init (checks for previously refreshed)\r\n};\r\n","import { useEffect, useRef, useState } from 'react';\r\nimport { useLocation } from 'react-router-dom';\r\nimport { useCetEvents } from '../../../../SharedLogic/olamonim/hooks/useCetEvents';\r\n\r\nexport const useSendLaunchedEvent = pageId => {\r\n const { pathname } = useLocation();\r\n const [isReferredFromLo, setIsReferredFromLo] = useState(false);\r\n let { sendLearningEvent } = useCetEvents();\r\n const isReady = useRef(false);\r\n\r\n useEffect(() => {\r\n if (isReady.current) {\r\n if (!window.contextReferrer) {\r\n window.contextReferrer = window.document.referrer || window.location.href;\r\n }\r\n window.currentHyperlink = window.location.href;\r\n if (window.currentHyperlink.split('_').length === 1 && window.contextReferrer.split('_').length > 1) {\r\n //if I'm not lo and I was reffered from lo\r\n setIsReferredFromLo(true);\r\n }\r\n sendLearningEvent({\r\n verbType: 'launched',\r\n objectName: pageId,\r\n objectId: window.currentHyperlink\r\n });\r\n return () => {\r\n sendLearningEvent({\r\n verbType: 'exited',\r\n objectName: pageId,\r\n objectId: window.currentHyperlink\r\n });\r\n window.contextReferrer = window.currentHyperlink;\r\n };\r\n }\r\n\tisReady.current = true;\r\n }, [pathname, pageId, sendLearningEvent]);\r\n\r\n return isReferredFromLo;\r\n};\r\n","import { useEffect } from 'react';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { updateRuleBaseState } from '../../../../SharedLogic/olamonim/actions';\r\nimport { fetchStudentNextState } from '../../../../SharedLogic/tree/learningSystem/actions';\r\n\r\nexport const useGetStudentState = (settings) => {\r\n\tconst dispatch = useDispatch();\r\n\tconst { relevantFolder, isAdaptiveFolder } = useSelector(({ tree }) => ({\r\n\t\trelevantFolder: settings?.relevantFolderId ? tree?.data[settings.relevantFolderId] : null,\r\n\t\tisAdaptiveFolder: settings?.relevantFolderId ? tree?.data[settings.relevantFolderId]?.isAdaptive : false\r\n\t}));\r\n\r\n\t// fetch Student Next State (Adaptive)\r\n\tuseEffect(() => {\r\n\t\tif (isAdaptiveFolder) {\r\n\t\t\tdispatch(fetchStudentNextState(settings.relevantFolderId));\r\n\t\t}\r\n\t}, [settings, isAdaptiveFolder, dispatch]);\r\n\r\n\t// update Rule Base State (Non-Adaptive)\r\n\tuseEffect(() => {\r\n\t\tif (settings.ruleBase) {\r\n\t\t\tdispatch(updateRuleBaseState(relevantFolder?.id, settings.ruleBase, settings.ruleBaseDefaultCurrentId));\r\n\t\t}\r\n\t}, [settings, relevantFolder, dispatch]);\r\n};\r\n","import { useEffect } from 'react';\r\nimport { useEventHandlers } from '../../../../SharedLogic/olamonim/eventHandlers';\r\nimport { useWhyDidYouUpdate } from '../../../../SharedLogic/hooks/useWhyDidYouUpdate';\r\n\r\nexport const useOnLoadEvent = (actions) => {\r\n const actionEmitter = useEventHandlers();\r\n useWhyDidYouUpdate('useOnLoadEvent', { actions, actionEmitter });\r\n useEffect(() => {\r\n actionEmitter(actions);\r\n }, [actions, actionEmitter]);\r\n};\r\n","import { useEffect } from 'react';\r\nimport { useDispatch } from 'react-redux';\r\nimport { useEventHandlers } from '../../../../SharedLogic/olamonim/eventHandlers';\r\n\r\nexport const useOnUnmountEvent = (actions) => {\r\n const dispatch = useDispatch();\r\n const actionEmitter = useEventHandlers();\r\n\r\n useEffect(() => {\r\n return () => {\r\n // dispatch(resetUiElements());\r\n actionEmitter(actions);\r\n };\r\n }, [dispatch, actions, actionEmitter]);\r\n};\r\n","import { useEffect, useState } from 'react';\r\nimport { useParams } from 'react-router-dom';\r\nimport { useSelector } from 'react-redux';\r\n\r\nexport const useMapElementVisibilityRules = (settings) => {\r\n const [isVisible, setIsVisible] = useState(true);\r\n const { urlKey } = useParams();\r\n const { isAfterFix, feedbackStage, renderedUI, user } = useSelector(({ olamonim, user }) => ({\r\n isAfterFix: olamonim.ui?.feedback?.isAfterFix || false,\r\n feedbackStage: olamonim.ui.feedback?.nStage || 0,\r\n renderedUI: olamonim.ui?.renderedUI?.ids || [],\r\n user\r\n }));\r\n\r\n useEffect(() => {\r\n const folderId = urlKey ? urlKey.split('_')[0] : null;\r\n let isRuleVerified = true;\r\n\r\n if (settings.visibilityRules) {\r\n Object.keys(settings.visibilityRules).forEach((rule) => {\r\n if (rule !== 'on' && rule !== 'off') {\r\n throw new Error('visibilityRules can only have an on/off rules');\r\n }\r\n settings.visibilityRules[rule].forEach((ruleCondition) => {\r\n const { type, condition } = ruleCondition;\r\n switch (type) {\r\n case 'isAuthorized':\r\n isRuleVerified = isRuleVerified && condition ? user.isAuthorized : !user.isLoggedIn || !user.isAuthorized;\r\n break;\r\n case 'folderIds':\r\n isRuleVerified = isRuleVerified && condition.some(id => id === folderId);\r\n break;\r\n case 'isAfterFix':\r\n isRuleVerified = isRuleVerified && condition === isAfterFix;\r\n break;\r\n case 'stage':\r\n isRuleVerified = isRuleVerified && condition === feedbackStage;\r\n break;\r\n case 'renderedUI':\r\n isRuleVerified = isRuleVerified && condition.every(element => renderedUI.indexOf(element) > -1);\r\n break;\r\n default:\r\n break;\r\n }\r\n });\r\n setIsVisible(rule === 'on' ? isRuleVerified : !isRuleVerified);\r\n });\r\n } else {\r\n setIsVisible(true);\r\n }\r\n }, [feedbackStage, isAfterFix, settings, urlKey, renderedUI, user.isAuthorized, user.isLoggedIn]);\r\n\r\n return isVisible;\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { getStaticFileUrl } from '../../../SharedLogic/utilities/endpoints';\r\nexport default function Image({ settings }) {\r\n\treturn (\r\n\t\t\r\n\t);\r\n}\r\n\r\nImage.propTypes = {\r\n\tsettings: PropTypes.shape({\r\n\t\tid: PropTypes.string,\r\n\t\tsrc: PropTypes.string.isRequired,\r\n\t\talt: PropTypes.string.isRequired,\r\n\t}).isRequired,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { useSelector } from 'react-redux';\r\n\r\nimport { useEventHandlers } from '../../../SharedLogic/olamonim/eventHandlers';\r\nimport { innerImage, eventHandlerModel } from '../../../SharedLogic/olamonim/propTypes';\r\nimport { useCetEvents } from '../../../SharedLogic/olamonim/hooks/useCetEvents';\r\n\r\nimport Image from './Image';\r\n\r\nexport default function Button({ settings, isFocusable = true }) {\r\n const actionEmitter = useEventHandlers();\r\n const { pageId, classNames } = useSelector(({ olamonim }) => ({\r\n pageId: olamonim.currentMap.id,\r\n classNames: olamonim.ui.classNames\r\n }));\r\n const { sendUiUsageEvent } = useCetEvents();\r\n const eventData = { category: pageId, label: settings.id };\r\n\r\n const onButtonClick = () => {\r\n const events = settings.events || {};\r\n const { onClick } = events;\r\n if (onClick) {\r\n sendUiUsageEvent(eventData);\r\n }\r\n actionEmitter(onClick);\r\n };\r\n\r\n const onButtonMouseDown = () => {\r\n const events = settings.events || {};\r\n const { onMouseDown } = events;\r\n if (onMouseDown) {\r\n sendUiUsageEvent(eventData);\r\n }\r\n actionEmitter(onMouseDown);\r\n };\r\n\r\n const onButtonBlur = () => {\r\n const events = settings.events || {};\r\n const { onBlur } = events;\r\n actionEmitter(onBlur);\r\n };\r\n\r\n const onButtonOver = () => {\r\n const events = settings.events || {};\r\n const { onOver } = events;\r\n actionEmitter(onOver);\r\n };\r\n\r\n const onButtonAnimationEnd = () => {\r\n const events = settings.events || {};\r\n const { onAnimationEnd } = events;\r\n actionEmitter(onAnimationEnd);\r\n };\r\n\r\n return (\r\n \r\n {settings.image && (\r\n \r\n )}\r\n {settings.text && {settings.text}}\r\n \r\n );\r\n}\r\n\r\nButton.propTypes = {\r\n settings: PropTypes.shape({\r\n id: PropTypes.string.isRequired,\r\n isBlocked: PropTypes.bool,\r\n text: PropTypes.string,\r\n image: innerImage,\r\n ariaLabel: PropTypes.string,\r\n ariaExpanded: PropTypes.bool,\r\n events: PropTypes.shape({\r\n onClick: eventHandlerModel,\r\n onMouseDown: eventHandlerModel,\r\n onBlur: eventHandlerModel,\r\n onAnimationEnd: eventHandlerModel\r\n })\r\n }).isRequired\r\n};\r\n","import React, { useEffect } from 'react';\r\nimport { useSelector, useDispatch } from 'react-redux';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\n\r\nimport { eventHandlerModel } from '../../../SharedLogic/olamonim/propTypes';\r\nimport { innerImage } from '../../../SharedLogic/olamonim/propTypes';\r\nimport { useEventHandlers } from '../../../SharedLogic/olamonim/eventHandlers';\r\nimport { useCetEvents } from '../../../SharedLogic/olamonim/hooks/useCetEvents';\r\nimport { updateUiElements } from '../../../SharedLogic/olamonim/actions';\r\nimport { Cache } from '../../../SharedLogic/utilities/cache';\r\n\r\nimport Button from './Button';\r\nimport MapElement from './';\r\n\r\nexport default function ExpandableContent({ settings, defaultSettings }) {\r\n const dispatch = useDispatch();\r\n const actionEmitter = useEventHandlers();\r\n\r\n const { status, pageId, isOpen, isMapLoaded, olamonName, user } = useSelector(({ olamonim, product, user }) => ({\r\n pageId: olamonim.currentMap.id,\r\n status: olamonim.status,\r\n isOpen: olamonim.ui.expandableContent?.isOpen,\r\n isMapLoaded: olamonim.currentMap.isMapLoaded,\r\n olamonName: product.config.productLocalName,\r\n user\r\n }));\r\n\r\n const sessionKey = `${olamonName}_expandableContent_survey`;\r\n\r\n const { sendUiUsageEvent } = useCetEvents();\r\n\r\n const onToggleExpandableContent = () => {\r\n dispatch(updateUiElements('expandableContent', 'isOpen', !isOpen));\r\n if (isOpen) {\r\n actionEmitter(settings.events?.onContentClosed);\r\n }\r\n };\r\n\r\n const onHeaderClick = event => {\r\n onToggleExpandableContent();\r\n sendUiUsageEvent({ category: pageId, label: settings.id });\r\n };\r\n\r\n const expandableContentClassName = classNames({\r\n open: isOpen,\r\n userInteracted: status.userInteracted\r\n });\r\n\r\n useEffect(() => {\r\n if (\r\n (!settings.isStartAfterPreloader || isMapLoaded) &&\r\n ((settings.requiredType === 'status' && (!status[settings.id] || !status[settings.id].DONE)) ||\r\n (settings.requiredType === 'session' && Cache.get(sessionKey, Cache.method.sessionStorage) !== 'opened' && user.isAuthorized && user.audiences?.length > 0))\r\n ) {\r\n //TODO: remove when survey is down\r\n\r\n dispatch(updateUiElements('expandableContent', 'isOpen', true));\r\n\r\n actionEmitter(settings.events?.onRequired);\r\n actionEmitter(settings.events?.onContentWatched);\r\n if (settings.requiredType === 'session') {\r\n Cache.set(sessionKey, 'opened', Cache.method.sessionStorage);\r\n }\r\n }\r\n }, [\r\n actionEmitter,\r\n dispatch,\r\n sessionKey,\r\n settings.events.onContentWatched,\r\n settings.events.onRequired,\r\n settings.id,\r\n settings.requiredType,\r\n status,\r\n isMapLoaded,\r\n settings.isStartAfterPreloader,\r\n user.isAuthorized,\r\n user.audiences?.length\r\n ]);\r\n\r\n //TODO: remove when survey is down since we want it to be for a specific survey\r\n // and not for all expandable elements that has requiredType=session\r\n // but for now the survey is the only one with this requiredType\r\n if (settings.requiredType === 'session' && (!user.isAuthorized || user.audiences?.length === 0)) {\r\n return null;\r\n }\r\n\r\n return (\r\n
\r\n {\r\n onHeaderClick(event);\r\n }}\r\n >\r\n
{settings.chapter}
\r\n
\r\n \r\n
\r\n {settings.headerChildren.map(childSettings => (\r\n \r\n ))}\r\n \r\n
\r\n
\r\n {settings.contentChildren.map(childSettings => (\r\n \r\n ))}\r\n
\r\n
\r\n
\r\n
\r\n );\r\n}\r\n\r\nExpandableContent.propTypes = {\r\n settings: PropTypes.shape({\r\n id: PropTypes.string.isRequired,\r\n key: PropTypes.string,\r\n isRequired: PropTypes.bool,\r\n chapter: PropTypes.string,\r\n headerChildren: PropTypes.arrayOf(PropTypes.object),\r\n contentChildren: PropTypes.arrayOf(PropTypes.object),\r\n toggleButtonText: PropTypes.string,\r\n toggleButtonImage: innerImage,\r\n events: PropTypes.shape({\r\n onContentClosed: eventHandlerModel,\r\n onContentWatched: eventHandlerModel,\r\n onRequired: eventHandlerModel\r\n })\r\n }).isRequired,\r\n defaultSettings: PropTypes.object\r\n};\r\n","import React, { useState, useEffect } from 'react';\r\nimport { useLocation } from 'react-router-dom';\r\nimport PropTypes from 'prop-types';\r\nimport { useSelector } from 'react-redux';\r\n\r\nimport { useEventHandlers } from '../../../SharedLogic/olamonim/eventHandlers';\r\nimport { useCetEvents } from '../../../SharedLogic/olamonim/hooks/useCetEvents';\r\nimport { useIsActiveElement } from '../../../SharedLogic/olamonim/hooks/useIsActiveElement';\r\n\r\nimport Button from './Button';\r\nimport { onButtonEnterOrSpace } from '../../../SharedLogic/olamonim/services';\r\n\r\nexport default function PrizeStates({ settings }) {\r\n const isActiveElement = useIsActiveElement();\r\n const { olamonim, tree, environmentTasks, productName } = useSelector(({ tree, olamonim, product }) => ({\r\n tree: tree.data,\r\n environmentTasks: tree.environmentTasks,\r\n olamonim,\r\n productName: product.config.productLocalName\r\n }));\r\n\r\n const location = useLocation();\r\n const [prizeState, setPrizeState] = useState(0);\r\n const [prizeSize, setPrizeSize] = useState();\r\n const [prizeExtraSettings, setPrizeExtraSettings] = useState({});\r\n const [className, setClassName] = useState('map_prize');\r\n const [isActive, setIsActive] = useState(false);\r\n const [isSelected, setIsSelected] = useState(false);\r\n const [entityId, setEntityId] = useState();\r\n const { sendUiUsageEvent } = useCetEvents();\r\n const actionEmitter = useEventHandlers();\r\n\r\n const onClick = () => {\r\n const events = settings.events || {};\r\n let { onClick } = events;\r\n if (!onClick) {\r\n if (!settings.size) {\r\n onClick = { action: 'onPrizeClick', data: { settings } };\r\n }\r\n }\r\n if (onClick) {\r\n sendUiUsageEvent({ category: olamonim.currentMap.id, label: `prize_${entityId}`, optionalData: { objectAdditionalInformation: { state: prizeState } } });\r\n }\r\n actionEmitter(onClick);\r\n };\r\n\r\n useEffect(() => {\r\n if (settings.entityId) {\r\n setEntityId(settings.entityId);\r\n } else {\r\n const id = location.pathname.split('_').length > 1 ? location.pathname.split('/')[1].split('_')[0] : null;\r\n if (id) {\r\n setEntityId(id);\r\n }\r\n }\r\n }, [location.pathname, settings.entityId]);\r\n\r\n useEffect(() => {\r\n const entityItem = olamonim.settings.prizes.entityPrizePairs.items.filter(item => item.entityId === entityId && item.dashboard);\r\n\r\n if (entityItem[0]) {\r\n const item = entityItem[0];\r\n const itemSettings = {};\r\n itemSettings.prizeIndex = item.dashboard.index;\r\n itemSettings.entityTitle = item.entityTitle;\r\n itemSettings.prizeCatalogId = item.prizeCatalogId;\r\n const prizeInfo = olamonim.settings.prizes.prizesCatalog.items.filter(prize => prize.prizeCatalogId === item.prizeCatalogId);\r\n itemSettings.prizeTitle = prizeInfo[0].prizeCatalogName;\r\n itemSettings.prizeDescription = prizeInfo[0].prizeCatalogMetadata.desc;\r\n itemSettings.states = prizeInfo[0].prizeCatalogMetadata.states;\r\n setPrizeExtraSettings(itemSettings);\r\n }\r\n }, [entityId, olamonim.settings.prizes.entityPrizePairs.items, olamonim.settings.prizes.prizesCatalog.items]);\r\n\r\n useEffect(() => {\r\n const getStateFromWallet = () => {\r\n const prize = olamonim.wallet[prizeExtraSettings.prizeCatalogId];\r\n if (prize?.code && prize.code?.split('|')[2] && /^\\d+$/.test(prize?.code.split('|')[2]))\r\n //check if number(=state) because before migration it was prize name\r\n return prize.code.split('|')[2];\r\n return 0;\r\n };\r\n\r\n setPrizeState(getStateFromWallet());\r\n if (!settings.buttonOnly) {\r\n setPrizeSize(settings.size ? settings.size + '_' : '');\r\n setIsActive(isActiveElement(tree[entityId], environmentTasks));\r\n setIsSelected(entityId === settings.selectedSettings?.entityId);\r\n }\r\n }, [entityId, isActiveElement, environmentTasks, olamonim.wallet, prizeExtraSettings.prizeCatalogId, settings.buttonOnly, settings.selectedSettings, settings.size, tree]);\r\n\r\n useEffect(() => {\r\n if (!settings.buttonOnly) {\r\n setClassName(`map_${prizeSize}prize ${isActive ? '' : 'disabled'} ${isSelected ? 'selected' : ''}`.trimEnd());\r\n }\r\n }, [isActive, isSelected, prizeSize, settings.buttonOnly]);\r\n\r\n if (!entityId) {\r\n return null;\r\n }\r\n\r\n return (\r\n <>\r\n {settings.buttonOnly && Boolean(prizeState) && \r\n )}\r\n
\r\n {folderDocuments.map(document => {\r\n const isActive = isActiveElement(document, environmentTasks);\r\n const isSelected = document.id === selectedDocumentId;\r\n const isDone = document.lms && document.lms.StudentLmsInfo && document.lms.StudentLmsInfo.SubmittedTime > 0;\r\n const documentIndex = folderDocumentsIds.indexOf(document.id) + 1;\r\n let documentTitle = document.title;\r\n if (settings.splitDocumentTitleBy) {\r\n const titleParts = document.title.split(settings.splitDocumentTitleBy);\r\n documentTitle = titleParts[titleParts.length - 1];\r\n }\r\n\r\n const onClick = () => {\r\n isActive && !isSelected && handleDocumentLinkClick(document);\r\n };\r\n\r\n if (document.isHiddenByStudio) {\r\n return null;\r\n }\r\n\r\n return (\r\n onButtonEnterOrSpace(onClick, e)}\r\n >\r\n {currentView && {isSelected || currentView === 'titles' ? documentTitle : documentIndex}}\r\n
\r\n );\r\n })}\r\n \r\n {currentView === 'arrows' && (\r\n {\r\n handleArrowClick('forwards');\r\n }\r\n }\r\n }}\r\n >\r\n )}\r\n \r\n );\r\n}\r\n\r\nDocumentsNavigationBar.propTypes = {\r\n settings: PropTypes.shape({\r\n id: PropTypes.string.isRequired,\r\n views: PropTypes.arrayOf(PropTypes.object).isRequired\r\n }).isRequired\r\n};\r\n","import React from 'react';\r\nimport { useSelector } from 'react-redux';\r\nimport PropTypes from 'prop-types';\r\nimport LoginWidget from '../../../SharedComponents/LoginWidget';\r\nimport { clearIsStudentPreview, clearUserReturnURL, getUserReturnURL } from '../../../SharedLogic/user/services';\r\n\r\nexport default function Login({ settings }) {\r\n const { productLocalName } = useSelector(({ product }) => ({ productLocalName: product.config.productLocalName }));\r\n const userReturnURL = getUserReturnURL(productLocalName);\r\n\r\n return (\r\n
\r\n {\r\n clearUserReturnURL(productLocalName);\r\n clearIsStudentPreview(productLocalName);\r\n }}\r\n />\r\n
\r\n );\r\n}\r\n\r\nLogin.propTypes = {\r\n settings: PropTypes.shape({\r\n id: PropTypes.string.isRequired,\r\n lang: PropTypes.string.isRequired,\r\n purchaseURL: PropTypes.string\r\n })\r\n};\r\n","import React, { useState, useEffect, useRef } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { innerImage } from '../../../SharedLogic/olamonim/propTypes';\r\n\r\nimport Button from './Button';\r\nimport MapElement from '.';\r\n\r\nexport default function Menu({ settings, isFocusable = true }) {\r\n const [isMenuOpen, setIsMenuOpen] = useState(false);\r\n const menuRef = useRef(null);\r\n\r\n const handleToggleMenu = () => {\r\n setIsMenuOpen(!isMenuOpen);\r\n };\r\n const handleCloseMenu = () => {\r\n setIsMenuOpen(false);\r\n };\r\n\r\n useEffect(() => {\r\n function handleClickOutside(event) {\r\n if (menuRef.current && !menuRef.current.contains(event.target)) {\r\n handleCloseMenu();\r\n }\r\n }\r\n window.addEventListener('click', handleClickOutside);\r\n window.addEventListener('keypress', handleClickOutside);\r\n window.addEventListener('blur', handleCloseMenu);\r\n return () => {\r\n window.removeEventListener('click', handleClickOutside);\r\n window.addEventListener('keypress', handleClickOutside);\r\n window.removeEventListener('blur', handleCloseMenu);\r\n };\r\n }, []);\r\n\r\n const menuClassName = classNames({\r\n open: isMenuOpen\r\n });\r\n\r\n if (!settings) {\r\n return null;\r\n }\r\n\r\n return (\r\n
\r\n {settings.toggleMenuButton && (\r\n \r\n )}\r\n {settings.menuItems && (\r\n
    \r\n {settings.menuItems.map(menuItem => {\r\n return (\r\n
  • \r\n \r\n
  • \r\n );\r\n })}\r\n
\r\n )}\r\n
\r\n );\r\n}\r\n\r\nMenu.propTypes = {\r\n settings: PropTypes.shape({\r\n id: PropTypes.string.isRequired,\r\n toggleMenuButton: PropTypes.shape({\r\n id: PropTypes.string.isRequired,\r\n text: PropTypes.string,\r\n image: innerImage\r\n }),\r\n menuItems: PropTypes.arrayOf(PropTypes.object)\r\n })\r\n};\r\n","import React, { useState, useEffect } from 'react';\r\nimport { useSelector } from 'react-redux';\r\nimport { useMapElementVisibilityRules } from '../../../SharedLogic/olamonim/hooks/useMapElementVisibilityRules';\r\n\r\nimport Button from './Button';\r\nimport ExpandableContent from './ExpandableContent';\r\nimport Dashboard from './Dashboard';\r\nimport PrizeCountable from './PrizeCountable';\r\nimport PrizeStates from './PrizeStates';\r\nimport LmsElement from './LmsElement';\r\nimport Image from './Image';\r\nimport Preloader from './Preloader';\r\nimport Feedback from './Feedback';\r\nimport Animation from './Animation';\r\nimport MultiAnimations from './MultiAnimations';\r\nimport Link from './Link';\r\nimport Paragraph from './Paragraph';\r\nimport Container from './Container';\r\nimport Text from './Text';\r\nimport Title from './Title';\r\nimport Video from './Video';\r\nimport UserName from './UserName';\r\nimport Audiences from './Audiences';\r\nimport BackgroundSound from './BackgroundSound';\r\nimport ChangeSchool from './ChangeSchool';\r\nimport LoPlayer from './LoPlayer';\r\nimport LoTitle from './LoTitle';\r\nimport DocumentsNavigationBar from './DocumentsNavigationBar';\r\nimport ProgressBar from './ProgressBar';\r\nimport Current from './Current';\r\nimport Score from './Score';\r\nimport Login from './Login';\r\nimport Menu from './Menu';\r\n\r\nexport const elementTypes = {\r\n button: 'button',\r\n prizeCountable: 'prizeCountable',\r\n prizeStates: 'prizeStates',\r\n expandableContent: 'expandableContent',\r\n dashboard: 'dashboard',\r\n lmsElement: 'lmsElement',\r\n image: 'image',\r\n preloader: 'preloader',\r\n feedback: 'feedback',\r\n animation: 'animation',\r\n multiAnimations: 'multiAnimations',\r\n link: 'link',\r\n paragraph: 'paragraph',\r\n container: 'container',\r\n text: 'text',\r\n title: 'title',\r\n video: 'video',\r\n userName: 'userName',\r\n audiences: 'audiences',\r\n backgroundSound: 'backgroundSound',\r\n changeSchool: 'changeSchool',\r\n loPlayer: 'loPlayer',\r\n loTitle: 'loTitle',\r\n documentsNavigationBar: 'documentsNavigationBar',\r\n progressBar: 'progressBar',\r\n current: 'current',\r\n score: 'score',\r\n login: 'login',\r\n menu: 'menu',\r\n};\r\n\r\nexport default function MapElement({ settings, defaultSettings, isFocusable }) {\r\n const { tree } = useSelector(({ tree }) => ({ tree: tree.data }));\r\n const data = tree[settings.id];\r\n const events = settings.events || {};\r\n let { onBeforeLoad } = events;\r\n\r\n const [isDisplayed, setIsDisplayed] = useState(\r\n onBeforeLoad && onBeforeLoad.action === 'displayElementOnTimeout' ? false : true\r\n );\r\n\r\n const isVisibleByRules = useMapElementVisibilityRules(settings);\r\n\r\n useEffect(() => {\r\n let isMounted = true;\r\n\r\n if (onBeforeLoad && onBeforeLoad.data) {\r\n setTimeout(() => {\r\n if (onBeforeLoad.action === 'displayElementOnTimeout') {\r\n isMounted && setIsDisplayed(true);\r\n } else if (onBeforeLoad.action === 'hideElementOnTimeout') {\r\n isMounted && setIsDisplayed(false);\r\n }\r\n }, onBeforeLoad.data.timeout);\r\n }\r\n\r\n return () => {\r\n isMounted = false;\r\n }; // use effect cleanup to set flag false, if unmounted\r\n }, [onBeforeLoad, settings.rules]);\r\n\r\n if (!isDisplayed || !isVisibleByRules || data?.isHiddenByStudio) {\r\n return null;\r\n }\r\n\r\n switch (settings.type) {\r\n case elementTypes.button:\r\n return \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nStudentPreviewModal.prototypes = {\r\n lang: PropTypes.string.isRequired,\r\n onClose: PropTypes.func.isRequired,\r\n audience: PropTypes.object.isRequired\r\n};\r\n\r\nexport default injectIntl(StudentPreviewModal);\r\n","import React, { useState, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { useSelector } from 'react-redux';\r\n\r\nexport default function PrizeCountable({ settings }) {\r\n const { olamonim, labels } = useSelector(({ product, olamonim }) => ({ olamonim, labels: product.i18n }));\r\n const [prizeInfo, setPrizeInfo] = useState({});\r\n const [prizeCount, setPrizeCount] = useState();\r\n\r\n useEffect(() => {\r\n const prizeInfo = olamonim.settings?.prizes?.prizesCatalog?.items?.filter(prize => prize.prizeCatalogId === settings.id);\r\n if (prizeInfo && prizeInfo[0]) {\r\n setPrizeInfo(prizeInfo[0]);\r\n }\r\n }, [olamonim.settings?.prizes?.prizesCatalog, settings.id]);\r\n\r\n useEffect(() => {\r\n const getCountFromWallet = prizeID => {\r\n if (olamonim.wallet[prizeID]?.amount) return olamonim.wallet[prizeID].amount;\r\n return 0;\r\n };\r\n\r\n setPrizeCount(getCountFromWallet(settings.id));\r\n }, [olamonim.wallet, settings.id, settings.size]);\r\n\r\n return (\r\n \r\n
\r\n {prizeCount}\r\n
{labels['COINS']}
\r\n
\r\n \r\n );\r\n}\r\n\r\nPrizeCountable.propTypes = {\r\n settings: PropTypes.shape({\r\n id: PropTypes.string.isRequired\r\n }).isRequired\r\n};\r\n","export const fetchAllProductsConfig = async () => {\r\n const url = `${window.tocGlobalEndpoints.productPlayerServicesAPIURL}GetAllProductConfigurations`;\r\n const configs = await fetch(url)\r\n .then(response => response.json())\r\n .then(json => json);\r\n return configs;\r\n};\r\n","import { ADD_AUDIENCE, GET_LAST_VISIT, GET_USER_COURSES, GET_USER_TASKS, REMOVE_AUDIENCE, SET_ACTIVE_AUDIENCE, SET_USER, SET_AUDIENCE_STUDENTS } from './action-types';\r\nimport {\r\n checkIsUserAuthorized,\r\n fetchUserAudiences,\r\n fetchUserGroups,\r\n fetchUserCapsules,\r\n fetchLastVisit,\r\n getEnvironmentId,\r\n clearEnvironmentId,\r\n getAudienceId,\r\n setAudienceId,\r\n getDefaultAudience,\r\n getActiveAudience,\r\n fetchUserTasks,\r\n fetchUserGrades,\r\n fetchAudienceStudents\r\n} from './services';\r\n\r\nimport { showMoeLoginDialog } from './sso';\r\nimport { fetchAllProductsConfig } from '../product/services';\r\nimport { setTasksFilterType, setEnvironmentTasks } from '../tree/data/actions';\r\nimport { fetchStateForFolderSuccess } from '../tree/lms/actions';\r\nimport { isNotScheduledExam, isReturnedToFix, fetchAllEnvironmentTasks } from '../tree/lms/services';\r\nimport { resetView, showModalMessage, ModalType } from '../ui/actions';\r\nimport { extractDataFromURL } from '../app/services';\r\nimport { updateEnvironment } from '../app/actions';\r\nimport { treeTaskFilterTypes } from '../utilities/enums';\r\nimport { isTodayOrTomorrow } from '../utilities/validations';\r\nimport { compare } from '../utilities/calculations';\r\nimport { setParamWithoutEncoding } from '../utilities/url';\r\nimport { getUserShopURL } from '../user/services';\r\n\r\nexport const setUserData = userData => async (dispatch, getState) => {\r\n if (userData) {\r\n const { config } = getState().product;\r\n\r\n const fetchArray = [\r\n checkIsUserAuthorized(userData.userId, userData.role, userData.schoolId, config.rootDocumentId, config.constsLanguage),\r\n fetchUserAudiences(config.productId, userData.userId, userData.schoolId),\r\n userData.role === 'teacher' || userData.role === 'coordinator' ? fetchUserGroups(userData.userId, userData.schoolId) : null\r\n ];\r\n\r\n return Promise.all(fetchArray).then(values => {\r\n let [isAuthorized, audiences, groupsData] = values;\r\n\r\n audiences = isAuthorized ? audiences : [];\r\n groupsData = isAuthorized ? groupsData : null;\r\n\r\n dispatch({ type: SET_USER, data: userData, isAuthorized, audiences, groupsData });\r\n });\r\n } else {\r\n dispatch({ type: SET_USER, data: null });\r\n return Promise.resolve();\r\n }\r\n};\r\n\r\nexport const setActiveAudience =\r\n (audienceId = '') =>\r\n async (dispatch, getState) => {\r\n let { user, product } = getState();\r\n let audience = null;\r\n\r\n if (user && user.isAuthorized) {\r\n const { audiences } = user;\r\n const environmentId = getEnvironmentId(product.config.productLocalName);\r\n\r\n if (environmentId) {\r\n audienceId = audiences.find(ad => ad.id === environmentId)?.audienceId;\r\n clearEnvironmentId(product.config.productLocalName);\r\n }\r\n\r\n audienceId = audienceId || getAudienceId(product.config.productLocalName);\r\n audience = getActiveAudience(audiences, audienceId);\r\n\r\n if (audience) {\r\n setAudienceId(product.config.productLocalName, audience.audienceId);\r\n dispatch({ type: SET_ACTIVE_AUDIENCE, audience });\r\n }\r\n }\r\n return audience;\r\n };\r\n\r\nexport const addAudience = audience => (dispatch, getState) => {\r\n dispatch({\r\n type: ADD_AUDIENCE,\r\n audience\r\n });\r\n\r\n const { audiences } = getState().user;\r\n if (audiences && audiences.length === 1) {\r\n const urlData = extractDataFromURL();\r\n dispatch(updateEnvironment(urlData.nodeKey, audience.audienceId));\r\n }\r\n};\r\n\r\nexport const removeAudience = id => (dispatch, getState) => {\r\n dispatch({\r\n type: REMOVE_AUDIENCE,\r\n id\r\n });\r\n\r\n // After we removed current audience - set new audience (prefer active one)\r\n const { audiences } = getState().user;\r\n let defaultAudience = getDefaultAudience(audiences);\r\n\r\n dispatch(updateEnvironment('', defaultAudience ? defaultAudience.audienceId : ''));\r\n dispatch(resetView());\r\n};\r\n\r\nexport const getUserCourses = user => async dispatch => {\r\n if (!user || !user.userId) {\r\n return [];\r\n }\r\n\r\n return Promise.all([fetchUserCapsules(user.userId), fetchAllProductsConfig()]).then(([capsules, courses]) => {\r\n const currentSchoolCapsules = capsules.filter(capsule => capsule.schoolID === user.schoolId);\r\n let currentSchoolCourses = [];\r\n if (currentSchoolCapsules && currentSchoolCapsules.length > 0) {\r\n currentSchoolCourses = courses\r\n .filter(course => {\r\n const capsuleForCourse = currentSchoolCapsules.filter(capsule => capsule.folderID === course.rootDocumentId);\r\n if (capsuleForCourse && capsuleForCourse.length > 0) return true;\r\n return false;\r\n })\r\n .sort((a, b) => compare(b.isMobileEnabled, a.isMobileEnabled) || compare(a.productName, b.productName));\r\n }\r\n dispatch({ type: GET_USER_COURSES, courses: currentSchoolCourses });\r\n\r\n return currentSchoolCourses;\r\n });\r\n};\r\n\r\nexport const getLastVisit = (productId, userId, audienceId) => dispatch => {\r\n fetchLastVisit(productId, userId, audienceId).then(lastVisitData => {\r\n if (lastVisitData && lastVisitData.lastVisit) {\r\n dispatch({\r\n type: GET_LAST_VISIT,\r\n lastVisit: lastVisitData.lastVisit\r\n });\r\n }\r\n });\r\n};\r\n\r\nlet getUserTasksTimeout;\r\n\r\nexport const getUserTasks = () => async (dispatch, getState) => {\r\n const { user, product } = getState();\r\n clearTimeout(getUserTasksTimeout);\r\n if (user && user.activeAudience) {\r\n Promise.all([fetchAllEnvironmentTasks(user.activeAudience.id)]).then(environmentTasks => {\r\n dispatch(setEnvironmentTasks(environmentTasks[0]));\r\n });\r\n\r\n const tasks = await fetchUserTasks(user, product.config);\r\n let gradedTasks = [];\r\n if (user.role === 'student') {\r\n gradedTasks = await fetchUserGrades(user, product.config);\r\n }\r\n\r\n if (Array.isArray(tasks)) {\r\n dispatch(fetchStateForFolderSuccess([...tasks, ...gradedTasks]));\r\n dispatch(getUserTasksSuccess(tasks, gradedTasks, user.role));\r\n\r\n const { tree } = getState();\r\n if (tree.activeFilterType !== 'none' && tree.activeFilterType !== 'my-course') {\r\n dispatch(setTasksFilterType(tree.activeFilterType));\r\n }\r\n }\r\n }\r\n\r\n getUserTasksTimeout = setTimeout(() => {\r\n dispatch(getUserTasks());\r\n }, 5 * 60 * 1000);\r\n};\r\n\r\nexport const getUserTasksSuccess = (tasksData, gradedTasks, userRole) => {\r\n let tasks = [],\r\n immediateTasksCount = 0, //tasks due by today/tomorrow\r\n activeTasksCount = 0, //tasks with active dates\r\n overdueTasksCount = 0, //tasks with past end date\r\n examTasksCount = 0,\r\n evaluatedTasksCount = 0; //tasks that has been evaluated\r\n\r\n const today = new Date();\r\n\r\n if (tasksData) {\r\n tasksData.forEach(task => {\r\n if (!isNotScheduledExam(null, task)) {\r\n const endDate = new Date(task.EndTime * 1000);\r\n\r\n // set tasks types counters\r\n task.taskFilter = [];\r\n\r\n if (task.TaskType === 'Exam') {\r\n task.taskFilter.push(treeTaskFilterTypes.examTasks);\r\n ++examTasksCount;\r\n }\r\n\r\n // active\r\n if (userRole === 'student') {\r\n // immediate\r\n if (isTodayOrTomorrow(endDate)) {\r\n task.taskFilter.push(treeTaskFilterTypes.immediateTasks);\r\n ++immediateTasksCount;\r\n }\r\n\r\n // overdue\r\n if (today.getTime() > endDate.getTime()) {\r\n task.taskFilter.push(treeTaskFilterTypes.overdueTasks);\r\n ++overdueTasksCount;\r\n }\r\n\r\n if (task.StudentLmsInfo.State === 'evaluated' || isReturnedToFix(task.StudentLmsInfo, task.TaskType)) {\r\n if (!task.isLmsInfoHidden) {\r\n task.taskFilter.push(treeTaskFilterTypes.evaluatedTasks);\r\n ++evaluatedTasksCount;\r\n }\r\n }\r\n\r\n // active\r\n\r\n if (today.getTime() < endDate.getTime() && task.StudentLmsInfo && task.StudentLmsInfo.State !== 'submitted' && task.StudentLmsInfo.State !== 'evaluated') {\r\n task.taskFilter.push(treeTaskFilterTypes.activeTasks);\r\n ++activeTasksCount;\r\n }\r\n } else {\r\n if (today.getTime() < endDate.getTime()) {\r\n task.taskFilter.push(treeTaskFilterTypes.activeTasks);\r\n ++activeTasksCount;\r\n }\r\n\r\n // overdue - late tasks - at least one student didn't submit\r\n if (today.getTime() > endDate.getTime() && (task.TeacherLmsInfo.States.NotStarted !== 0 || task.TeacherLmsInfo.States.InProgress !== 0)) {\r\n task.taskFilter.push(treeTaskFilterTypes.overdueTasks);\r\n ++overdueTasksCount;\r\n }\r\n\r\n // immediate\r\n if (task.TeacherLmsInfo && task.TeacherLmsInfo.States && (task.TaskType === 'EvalWork' || task.TaskType === 'Exam')) {\r\n if (task.TeacherLmsInfo.States.WaitingForCheck) {\r\n task.taskFilter.push(treeTaskFilterTypes.immediateTasks);\r\n immediateTasksCount += task.TeacherLmsInfo.States.WaitingForCheck;\r\n }\r\n }\r\n }\r\n\r\n tasks.push(task);\r\n }\r\n });\r\n }\r\n\r\n if (gradedTasks) {\r\n gradedTasks.forEach(task => {\r\n task.taskFilter = ['my-grades'];\r\n if (task.StudentLmsInfo.State === 'evaluated' || isReturnedToFix(task.StudentLmsInfo, task.TaskType)) {\r\n if (!task.isLmsInfoHidden) {\r\n task.taskFilter.push(treeTaskFilterTypes.evaluatedTasks);\r\n ++evaluatedTasksCount;\r\n }\r\n }\r\n });\r\n\r\n tasks.push(...gradedTasks);\r\n }\r\n\r\n return {\r\n type: GET_USER_TASKS,\r\n tasks,\r\n immediateTasksCount,\r\n activeTasksCount,\r\n overdueTasksCount,\r\n examTasksCount,\r\n evaluatedTasksCount\r\n };\r\n};\r\n\r\nexport const getAudienceStudents = audienceId => async (dispatch, getState) => {\r\n const { user } = getState();\r\n if (user && (user.role === 'teacher' || user.role === 'coordinator')) {\r\n const students = await fetchAudienceStudents(audienceId);\r\n dispatch({\r\n type: SET_AUDIENCE_STUDENTS,\r\n students\r\n });\r\n }\r\n};\r\n\r\nconst secureShopUrlReturnUrl = shopUrl => {\r\n // get strsrc from shopUrl\r\n const strsrc = new URL(shopUrl).searchParams.get('strsrc');\r\n\r\n // turn to URL and change protocol\r\n const strsrcUrl = new URL(atob(strsrc));\r\n strsrcUrl.protocol = 'https:';\r\n\r\n // update strsrc of shopUrl without the default url encoding\r\n return setParamWithoutEncoding(shopUrl, 'strsrc', btoa(strsrcUrl));\r\n};\r\n\r\nexport const handlePurchase = () => async (dispatch, getState) => {\r\n const { product, user } = getState();\r\n const { purchaseEnabledMode, isPurchaseEnabledForMoeOnly } = product?.config?.purchaseConfig || {};\r\n\r\n const userShopURL = getUserShopURL(product?.config?.purchaseConfig, user?.schoolSign);\r\n\r\n if (userShopURL) {\r\n const isPurchaseViaCetStore = userShopURL?.includes('cet.ac.il');\r\n\r\n if (isPurchaseViaCetStore) {\r\n const secureShopUrl = secureShopUrlReturnUrl(userShopURL);\r\n window.location.href = secureShopUrl;\r\n } else {\r\n const purchaseURL = new URL(window.location.href);\r\n purchaseURL.protocol = 'https:';\r\n purchaseURL.searchParams.set('purchase', '');\r\n\r\n if (user?.userId) {\r\n if (isPurchaseEnabledForMoeOnly && user.loginAccount.toLocaleLowerCase() !== 'moe') {\r\n dispatch(showModalMessage(ModalType.PURCHASE_ALLOWED_BY_MOE_USERS_ONLY));\r\n } else if (purchaseEnabledMode.toLocaleLowerCase() === 'onlystudents' && user.role !== 'student') {\r\n dispatch(showModalMessage(ModalType.PURCHASE_ALLOWED_BY_STUDENTS_ONLY));\r\n } else if (purchaseEnabledMode.toLocaleLowerCase() === 'onlyteachers' && user.role !== 'teacher') {\r\n dispatch(showModalMessage(ModalType.PURCHASE_ALLOWED_BY_TEACHERS_ONLY));\r\n } else {\r\n window.location.href = purchaseURL;\r\n }\r\n } else {\r\n if (isPurchaseEnabledForMoeOnly) {\r\n const encodedPurchaseUrl = window.btoa(purchaseURL);\r\n window.location.href = `https://school.kotar${window.TOC_ENDPOINT_ENV}cet.ac.il/KotarApp/Account/Purchase.aspx?strsrc=${encodedPurchaseUrl}`;\r\n } else {\r\n showMoeLoginDialog('toc_menuBar_purchase', 'loginMoe', purchaseURL);\r\n }\r\n }\r\n }\r\n }\r\n};\r\n","export function setParamWithoutEncoding(url, key, value) {\r\n // Parse the url\r\n let parsedUrl = new URL(url);\r\n\r\n // Get the search params\r\n let params = new URLSearchParams(parsedUrl.search);\r\n\r\n // Delete the existing param\r\n params.delete(key);\r\n\r\n // Build the new param string\r\n let paramString = [...params].map(param => `${param[0]}=${param[1]}`).join('&');\r\n\r\n // Add the new param without encoding\r\n paramString += (paramString.length > 0 ? '&' : '') + `${key}=${value}`;\r\n\r\n // Build the new url\r\n let newUrl = `${parsedUrl.protocol}//${parsedUrl.host}${parsedUrl.pathname}?${paramString}`;\r\n\r\n return newUrl;\r\n}\r\n","import React, { useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { useEventHandlers } from '../../../SharedLogic/olamonim/eventHandlers';\r\nimport { eventHandlerModel } from '../../../SharedLogic/olamonim/propTypes';\r\n\r\nimport Animation from './Animation';\r\n\r\nexport default function MultiAnimation({ settings }) {\r\n const framesId = 'default';\r\n const [isPlay, setIsPlay] = useState(false);\r\n const [animations, setAnimations] = useState([]);\r\n const actionEmitter = useEventHandlers();\r\n\r\n window.playMultiAnimations = (data) => {\r\n let currentTotalValue = data.totalValue;\r\n if (!currentTotalValue) {\r\n if (settings.events?.onLastComplete) {\r\n actionEmitter(settings.events.onLastComplete);\r\n }\r\n } else {\r\n settings.animations.sort(function (a, b) {\r\n if (a.value > b.value) return -1;\r\n if (a.value < b.value) return 1;\r\n return 0;\r\n });\r\n\r\n const animationsArr = [];\r\n settings.animations.forEach((animation) => {\r\n if (currentTotalValue !== 0) {\r\n let playCount = Math.floor(currentTotalValue / animation.value);\r\n for (let i = 0; i < playCount; i++) {\r\n animationsArr.push(animation);\r\n }\r\n currentTotalValue = currentTotalValue % animation.value;\r\n }\r\n });\r\n setAnimations(animationsArr);\r\n if (animationsArr.length > 0) {\r\n setIsPlay(true);\r\n }\r\n }\r\n };\r\n\r\n window.handleLastAnimationComplete = () => {\r\n setIsPlay(false);\r\n actionEmitter(settings.events?.onLastComplete);\r\n };\r\n\r\n return (\r\n isPlay && (\r\n
\r\n {animations.map((animation, index) => {\r\n const isLastAnimation = index === animations.length - 1;\r\n return (\r\n \r\n );\r\n })}\r\n
\r\n )\r\n );\r\n}\r\n\r\nMultiAnimation.propTypes = {\r\n id: PropTypes.string,\r\n animations: PropTypes.arrayOf(PropTypes.object),\r\n animationsGap: PropTypes.number,\r\n events: PropTypes.shape({\r\n onLastComplete: eventHandlerModel\r\n })\r\n};\r\n","import CetEvents from '../utilities/cetEvents';\r\n\r\nexport const initSSO = (options, callback) => {\r\n return new Promise(resolve => {\r\n window.cet.accessmanagement.getSessionAsync().then(session => {\r\n //console.log(session)\r\n resolve(session);\r\n });\r\n });\r\n};\r\n\r\nexport const showMoeLoginDialog = (objectId, objectName = 'loginMoe', redirectUrl = document.location) => {\r\n CetEvents.sendPressEvent(objectName, objectId);\r\n window.cet.accessmanagement.loginMoe(redirectUrl);\r\n};\r\n\r\nexport const showCetLoginDialog = (lang, skin = null, objectId, objectName = 'loginCet', redirectUrl = document.location) => {\r\n CetEvents.sendPressEvent(objectName, objectId);\r\n window.cet.accessmanagement.loginCet(redirectUrl, skin, lang);\r\n};\r\n\r\nexport const showChangeSchoolDialog = lang => {\r\n window.cet.accessmanagement.changeRole(document.location.href, null, lang);\r\n};\r\n\r\nexport const logOut = returnUrl => {\r\n if (!returnUrl) {\r\n throw new Error('user/sso.js - Cannot logout without returnUrl.');\r\n }\r\n window.sessionStorage.clear();\r\n // window.localStorage.clear()\r\n window.cet.accessmanagement.logout(returnUrl);\r\n};\r\n\r\nexport const extendSession = () => {\r\n return new Promise(resolve => {\r\n window.cet.accessmanagement.extendSessionAsync(isSessionAlive => {\r\n resolve(isSessionAlive);\r\n });\r\n });\r\n};\r\n","import {\r\n SET_TREE,\r\n SET_NODE_FLAG,\r\n SET_NODE_VISIBILITY,\r\n SET_TREE_ACTIVE_FILTER_TYPE,\r\n SET_TASKS_SORT_TYPE,\r\n SET_ENVIRONMENT_TASKS\r\n\r\n} from './action-types';\r\n\r\nimport {\r\n convertJsonToUserPersonalTree,\r\n setVisibilityFromParentDown,\r\n setVisibilityFromChildUp,\r\n setFoldersByInnerFlags,\r\n} from './services';\r\n\r\nimport { getUserTasks } from '../../user/actions';\r\nimport { resetView } from '../../ui/actions';\r\nimport { treeTaskFilterTypes } from '../../utilities/enums';\r\nimport { GoogleAnalytics } from '../../utilities/googleAnalytics';\r\nimport CetEvents from '../../utilities/cetEvents';\r\n\r\nexport const loadTree = (parentFolderId, environmentId, language) => async (dispatch, getState) => {\r\n const { user, product } = getState();\r\n const treeJson = await window.environment.getTree({ parentFolderId, environmentId, language });\r\n const data = convertJsonToUserPersonalTree(treeJson.folderTree, user, product.config.isAdaptiveEnabled);\r\n\r\n dispatch({\r\n type: SET_TREE,\r\n newTreeData: data,\r\n });\r\n\r\n return data;\r\n};\r\n\r\nexport const setNodeFlag = (node) => (dispatch, getState) => {\r\n if (node) {\r\n const { data } = getState().tree;\r\n\r\n const updated = {\r\n ...node,\r\n flag: !node.flag,\r\n parentFolderId: node.parentId,\r\n };\r\n if (node.type === 'folder') {\r\n window.environment.saveFolder([updated], false);\r\n GoogleAnalytics.sendEvent('Folder', 'click', updated.flag ? 'Flag' : 'Unflag');\r\n CetEvents.sendPressEvent('flag', 'toc_folder_flag');\r\n } else {\r\n window.environment.saveItem([updated], false);\r\n GoogleAnalytics.sendEvent('Item', 'click', updated.flag ? 'Flag' : 'Unflag');\r\n CetEvents.sendPressEvent('flag', 'toc_item_flag');\r\n }\r\n\r\n const parents = setFoldersByInnerFlags(updated, data);\r\n\r\n dispatch({\r\n type: SET_NODE_FLAG,\r\n node: updated,\r\n parents,\r\n });\r\n }\r\n};\r\n\r\nexport const setNodeVisibility = (node, isHidden) => (dispatch, getState) => {\r\n const { data } = getState().tree;\r\n\r\n const updated = [\r\n {\r\n ...node,\r\n isHidden,\r\n parentFolderId: node.parentId,\r\n },\r\n ];\r\n\r\n setVisibilityFromParentDown(node, isHidden, data, updated);\r\n\r\n if (!isHidden) {\r\n setVisibilityFromChildUp(node, isHidden, data, updated);\r\n dispatch(getUserTasks());\r\n }\r\n\r\n const folders = updated.filter((u) => u.type === 'folder');\r\n const items = updated.filter((u) => u.type === 'link');\r\n\r\n window.environment.saveFolder(folders, false);\r\n window.environment.saveItem(items, false);\r\n\r\n const nodes = updated.reduce((result, current) => ({ ...result, [current.key]: current }), {});\r\n\r\n dispatch({\r\n type: SET_NODE_VISIBILITY,\r\n nodes,\r\n });\r\n\r\n GoogleAnalytics.sendEvent(node.type === 'folder' ? 'Folder' : 'LO', 'click', isHidden ? 'Hide' : 'Show');\r\n CetEvents.sendPressEvent(\r\n 'toggleVisibility',\r\n `toc_${node.type === 'folder' ? 'folder' : 'document'}_toggleVisibility`\r\n );\r\n};\r\n\r\nexport const setTasksFilterType = (filterType) => (dispatch, getState) => {\r\n //myTasks is mobile student equivalent to active tasks\r\n filterType = filterType === treeTaskFilterTypes.myTasks ? treeTaskFilterTypes.activeTasks : filterType;\r\n\r\n const { activeFilterType } = getState().tree;\r\n\r\n if (filterType === treeTaskFilterTypes.none && activeFilterType !== filterType) {\r\n dispatch(resetView());\r\n }\r\n\r\n dispatch({\r\n type: SET_TREE_ACTIVE_FILTER_TYPE,\r\n filterType,\r\n });\r\n\r\n return filterType;\r\n};\r\n\r\nexport const setTaskFilterSortType = (sortBy) => ({\r\n type: SET_TASKS_SORT_TYPE,\r\n sortBy,\r\n});\r\n\r\nexport const resetTaskFilterSortType = () => ({\r\n type: SET_TASKS_SORT_TYPE,\r\n sortBy: 'subjects',\r\n});\r\n\r\nexport const setEnvironmentTasks = (items) => ({\r\n type: SET_ENVIRONMENT_TASKS,\r\n items,\r\n});\r\n\r\nexport const createDefaultTreeState = (defaultStateStr) => (dispatch, getState) => {\r\n let defaultStateJSON = null;\r\n\r\n try {\r\n defaultStateJSON = JSON.parse(defaultStateStr);\r\n } catch (e) {\r\n defaultStateJSON = null;\r\n }\r\n\r\n const { data } = getState().tree;\r\n\r\n if (data && defaultStateJSON && defaultStateJSON.length > 0) {\r\n const nodeKeys = defaultStateJSON.map((s) => s.id);\r\n const updated = [];\r\n\r\n for (let i = 0; i < nodeKeys.length; i++) {\r\n const node = data[nodeKeys[i]];\r\n\r\n if (node) {\r\n updated.push({\r\n ...node,\r\n isHidden: true,\r\n parentFolderId: node.parentId,\r\n });\r\n\r\n setVisibilityFromParentDown(node, true, data, updated);\r\n }\r\n }\r\n\r\n const folders = updated.filter((u) => u.type === 'folder');\r\n const items = updated.filter((u) => u.type === 'link');\r\n\r\n window.environment.createDefaultState(folders, items);\r\n\r\n const nodes = updated.reduce((result, current) => ({ ...result, [current.key]: current }), {});\r\n\r\n dispatch({ type: SET_NODE_VISIBILITY, nodes });\r\n }\r\n};\r\n","import {\r\n CLEAR_ADD_BUTTON_ACTIVE_NODE,\r\n CLEAR_ADD_MENU_ACTIVE_NODE,\r\n CLEAR_BAD_DROP_PROPERTIES,\r\n CLEAR_DRAGGED_NODE,\r\n CLEAR_DROP_ZONE_NODE,\r\n CLEAR_EDIT_MENU_ACTIVE_NODE,\r\n CLEAR_EDIT_TITLE_ACTIVE_NODE,\r\n CLEAR_ITEMS_DEPOT_SRC_NODE,\r\n CLEAR_LAST_LO_STUDIO_EDITED_ITEM_KEY,\r\n CLEAR_NODE_TO_DELETE,\r\n CLEAR_NODE_TO_HIDE,\r\n SET_ADD_BUTTON_ACTIVE_NODE,\r\n SET_ADD_MENU_ACTIVE_NODE,\r\n SET_BAD_DROP_PROPERTIES,\r\n SET_DELETE_NODES_MAP,\r\n SET_DRAGGED_NODE,\r\n SET_DROP_ZONE_NODE,\r\n SET_EDIT_MENU_ACTIVE_NODE,\r\n SET_EDIT_TITLE_ACTIVE_NODE,\r\n SET_ITEMS_DEPOT_SRC_NODE,\r\n SET_LAST_LO_STUDIO_EDITED_ITEM_KEY,\r\n SET_NEW_NODES_MAP,\r\n SET_NODE_TITLE,\r\n SET_NODE_TO_DELETE,\r\n SET_NODE_TO_HIDE,\r\n SET_UNDO_AVAILABILITY,\r\n SET_UNDO_PENDING\r\n} from './action-types';\r\n\r\nimport { SET_TREE } from '../tree/data/action-types';\r\n\r\nimport {\r\n enumDocumentType,\r\n enumNodeDropModes,\r\n emptyDocumentGuid,\r\n getNodePosition,\r\n getNodeNewPosition,\r\n getNodePointingToRefNode,\r\n setNodePosition,\r\n getNodeChildIndex,\r\n getPrevNode,\r\n getEnvironmentSaveFnc,\r\n getNodeDocumentType,\r\n folderMovementRecursiveParentsUpdate\r\n} from './services';\r\nimport { getNodeByIdAndParent, convertJsonToUserPersonalTree } from '../tree/data/services';\r\nimport { getUserTasks } from '../user/actions';\r\nimport { showAlertMessage, AlertType } from '../ui/actions';\r\nimport { isValidGenericString } from '../utilities/validations';\r\nimport { GoogleAnalytics } from '../utilities/googleAnalytics';\r\n\r\nexport const setAddButtonActiveNode = (key, isAboveNode) => ({\r\n type: SET_ADD_BUTTON_ACTIVE_NODE,\r\n key,\r\n isAboveNode\r\n});\r\n\r\nexport const clearAddButtonActiveNode = () => ({\r\n type: CLEAR_ADD_BUTTON_ACTIVE_NODE\r\n});\r\n\r\nexport const setAddMenuActiveNode = (key, isAboveNode) => ({\r\n type: SET_ADD_MENU_ACTIVE_NODE,\r\n key\r\n});\r\n\r\nexport const clearAddMenuActiveNode = () => ({\r\n type: CLEAR_ADD_MENU_ACTIVE_NODE\r\n});\r\n\r\nexport const setDropZoneNode = key => ({\r\n type: SET_DROP_ZONE_NODE,\r\n key\r\n});\r\n\r\nexport const clearDropZoneNode = () => ({\r\n type: CLEAR_DROP_ZONE_NODE\r\n});\r\n\r\nexport const setEditMenuActiveNode = key => ({\r\n type: SET_EDIT_MENU_ACTIVE_NODE,\r\n key\r\n});\r\n\r\nexport const clearEditMenuActiveNode = () => ({\r\n type: CLEAR_EDIT_MENU_ACTIVE_NODE\r\n});\r\n\r\nexport const setEditTitleActiveNode = key => ({\r\n type: SET_EDIT_TITLE_ACTIVE_NODE,\r\n key\r\n});\r\n\r\nexport const clearEditTitleActiveNode = () => ({\r\n //TODO: implement this in updateNodeTitle flow and remove native window prompt\r\n type: CLEAR_EDIT_TITLE_ACTIVE_NODE\r\n});\r\n\r\nexport const setDraggedNode = key => (dispatch, getState) => {\r\n const { data } = getState().tree;\r\n const { openFolders } = getState().folders;\r\n\r\n let dropDisabledNodesMap = {};\r\n\r\n /* Validation 1 - disable both drop modes on dragged node */\r\n dropDisabledNodesMap[key] = enumNodeDropModes.bothDisabled;\r\n\r\n /* Validation 2 - disable outer dropmode on node above - unless it is an open folder */\r\n const draggedNode = data[key];\r\n\r\n if (draggedNode.parents) {\r\n const parentFolder = data[draggedNode.parents[draggedNode.parents.length - 1]];\r\n const draggedNodeIndex = parentFolder.children.indexOf(draggedNode.id);\r\n if (draggedNodeIndex > 0) {\r\n const nodeAboveId = parentFolder.children[draggedNodeIndex - 1];\r\n if (nodeAboveId) {\r\n const nodeAbove = getNodeByIdAndParent(nodeAboveId, parentFolder.id, data);\r\n const nodeAboveUniqueId = nodeAbove.key;\r\n\r\n let isIncompatible;\r\n\r\n /* verify that the node above is not an open folder */\r\n if (nodeAbove.type === 'folder') {\r\n if (openFolders && openFolders.length && openFolders.indexOf(nodeAbove.id) > -1) {\r\n isIncompatible = true;\r\n }\r\n }\r\n\r\n if (!isIncompatible) dropDisabledNodesMap[nodeAboveUniqueId] = enumNodeDropModes.outerOnlyDisabled;\r\n }\r\n }\r\n }\r\n\r\n /* Validation 3 - for dragged folders - disable both drop modes on all inner items */\r\n\r\n if (draggedNode.type === 'folder') {\r\n Object.keys(data).forEach(nodeUniqueId => {\r\n let curNode = data[nodeUniqueId];\r\n\r\n if (curNode.parents && curNode.parents.indexOf(draggedNode.id) > -1) {\r\n const curNodeUniqueId = curNode.key;\r\n dropDisabledNodesMap[curNodeUniqueId] = enumNodeDropModes.bothDisabled;\r\n }\r\n });\r\n }\r\n\r\n dispatch({\r\n type: SET_DRAGGED_NODE,\r\n key,\r\n dropDisabledNodesMap\r\n });\r\n};\r\n\r\nexport const clearDraggedNode = () => ({\r\n type: CLEAR_DRAGGED_NODE\r\n});\r\n\r\nexport const setNodeToDelete = key => ({\r\n type: SET_NODE_TO_DELETE,\r\n key\r\n});\r\n\r\nexport const clearNodeToDelete = () => ({\r\n type: CLEAR_NODE_TO_DELETE\r\n});\r\n\r\nexport const setItemsDepotSrcNode = itemKey => {\r\n return {\r\n type: SET_ITEMS_DEPOT_SRC_NODE,\r\n itemKey\r\n };\r\n};\r\n\r\nexport const clearItemsDepotSrcNode = node => ({\r\n type: CLEAR_ITEMS_DEPOT_SRC_NODE\r\n});\r\n\r\nexport const setNodeToHide = key => ({\r\n type: SET_NODE_TO_HIDE,\r\n key\r\n});\r\n\r\nexport const clearNodeToHide = () => ({\r\n type: CLEAR_NODE_TO_HIDE\r\n});\r\n\r\nexport const updateUndoAvailability = isUndoAvailable => ({\r\n type: SET_UNDO_AVAILABILITY,\r\n isUndoAvailable\r\n});\r\n\r\nlet undoStartTime;\r\n\r\nexport const setUndoPending = isPending => (dispatch, getState) => {\r\n let waitFor = 0;\r\n\r\n if (isPending) {\r\n undoStartTime = new Date().getTime();\r\n } else if (undoStartTime) {\r\n waitFor = 1200 - (new Date().getTime() - undoStartTime);\r\n }\r\n\r\n waitFor = waitFor < 0 ? 0 : waitFor;\r\n\r\n setTimeout(() => {\r\n dispatch({ type: SET_UNDO_PENDING, isPending });\r\n }, waitFor);\r\n};\r\n\r\nexport const updateNewNodesMap = newNodesMapUpdate => (dispatch, getState) => {\r\n const { newNodesMap } = getState().creator;\r\n const updatedNewNodesMap = { ...newNodesMap, ...newNodesMapUpdate };\r\n dispatch({\r\n type: SET_NEW_NODES_MAP,\r\n newNodesMap: updatedNewNodesMap\r\n });\r\n};\r\n\r\nexport const setBadDropProperties = (totalItemsCount, badItemsCount) => ({\r\n type: SET_BAD_DROP_PROPERTIES,\r\n totalItemsCount,\r\n badItemsCount\r\n});\r\n\r\nexport const clearBadDropProperties = () => ({\r\n type: CLEAR_BAD_DROP_PROPERTIES\r\n});\r\n\r\nexport const setLastLoStudioEditedItemKey = itemKey => ({\r\n type: SET_LAST_LO_STUDIO_EDITED_ITEM_KEY,\r\n itemKey\r\n});\r\n\r\nexport const clearLastLoStudioEditedItemKey = () => ({\r\n type: CLEAR_LAST_LO_STUDIO_EDITED_ITEM_KEY\r\n});\r\n\r\nexport const undoLastEdit = () => (dispatch, getState) => {\r\n const {user, product} = getState();\r\n\r\n dispatch(setUndoPending(true));\r\n window.environment.undo().then(treeJson => {\r\n if (treeJson) {\r\n GoogleAnalytics.sendEvent('Creator', 'undo', '');\r\n const newTreeData = convertJsonToUserPersonalTree(treeJson.folderTree, user, product.config.isAdaptiveEnabled);\r\n\r\n dispatch({\r\n type: SET_TREE,\r\n newTreeData\r\n });\r\n\r\n dispatch(setUndoPending(false));\r\n dispatch(getUserTasks());\r\n }\r\n });\r\n};\r\n\r\nexport const updateNodeTitle = (node, title) => (dispatch, getState) => {\r\n if (!isValidGenericString(title) || node.title === title) {\r\n dispatch({\r\n type: SET_NODE_TITLE,\r\n node: node\r\n });\r\n } else {\r\n const updatedNode = {\r\n ...node,\r\n title\r\n };\r\n\r\n const functionName = getEnvironmentSaveFnc(node);\r\n window.environment[functionName]([updatedNode], true);\r\n\r\n GoogleAnalytics.sendEvent('Creator', 'edit', (node.type === 'folder' ? 'Folder' : 'LO') + '-title');\r\n dispatch({\r\n type: SET_NODE_TITLE,\r\n node: updatedNode\r\n });\r\n\r\n const newTreeData = { ...getState().tree.data, [node.key]: updatedNode };\r\n\r\n dispatch({\r\n type: SET_TREE,\r\n newTreeData\r\n });\r\n }\r\n};\r\n\r\nconst updateNodePositionState = (dragSourceNode, dropTargetNode) => (dispatch, getState) => {\r\n return new Promise(resolve => {\r\n const { data } = getState().tree;\r\n const { openFolders } = getState().folders;\r\n let dragSourceNodeClone = { ...dragSourceNode };\r\n let newTreeData = { ...data };\r\n const updatedNodes = [];\r\n\r\n //#region Take out\r\n\r\n // Get dragged node current position\r\n let dragSourceNodePosition = getNodePosition(dragSourceNodeClone, newTreeData);\r\n\r\n // Get node pointing to dragged node\r\n let nodePointingToDraggedNode = getNodePointingToRefNode(\r\n dragSourceNodeClone,\r\n newTreeData,\r\n openFolders.indexOf(dragSourceNodeClone.id) > -1\r\n );\r\n\r\n // Update node position by dragged node current position\r\n if (nodePointingToDraggedNode) {\r\n dragSourceNodePosition.newParentFolderId = nodePointingToDraggedNode.newParentFolderId;\r\n\r\n nodePointingToDraggedNode = setNodePosition(nodePointingToDraggedNode, dragSourceNodePosition);\r\n updatedNodes.push(nodePointingToDraggedNode);\r\n\r\n if (nodePointingToDraggedNode.type === 'link') {\r\n newTreeData[\r\n `${nodePointingToDraggedNode.parentId}_${nodePointingToDraggedNode.id}`\r\n ] = nodePointingToDraggedNode;\r\n } else {\r\n newTreeData[nodePointingToDraggedNode.id] = nodePointingToDraggedNode;\r\n }\r\n }\r\n\r\n //#endregion\r\n\r\n // Get dragged node new position\r\n const isDropOnOpenFolder =\r\n dropTargetNode.type === 'folder' && (openFolders.indexOf(dropTargetNode.id) > -1 || !dropTargetNode.parentId);\r\n\r\n const dragSourceNodeNewPosition = getNodeNewPosition(dragSourceNodeClone, dropTargetNode, isDropOnOpenFolder);\r\n\r\n // Get node (2) pointing to the new position\r\n let nodePointingToNewPosition = getNodePointingToRefNode(\r\n dropTargetNode,\r\n newTreeData,\r\n openFolders.indexOf(dropTargetNode.id) > -1 || !dropTargetNode.parentId\r\n );\r\n\r\n // Update dragged node position\r\n dragSourceNodeClone = setNodePosition(dragSourceNodeClone, dragSourceNodeNewPosition);\r\n\r\n // Update node (2) to point to dragged node\r\n if (nodePointingToNewPosition) {\r\n nodePointingToNewPosition = setNodePosition(nodePointingToNewPosition, {\r\n previousDocumentId: dragSourceNodeClone.id,\r\n previousDocumentType: getNodeDocumentType(dragSourceNodeClone),\r\n newParentFolderId: nodePointingToNewPosition.newParentFolderId\r\n });\r\n\r\n updatedNodes.push(nodePointingToNewPosition);\r\n\r\n if (nodePointingToNewPosition.type === 'link') {\r\n newTreeData[\r\n `${nodePointingToNewPosition.parentId}_${nodePointingToNewPosition.id}`\r\n ] = nodePointingToNewPosition;\r\n } else {\r\n newTreeData[nodePointingToNewPosition.id] = nodePointingToNewPosition;\r\n }\r\n }\r\n\r\n // Remove from current parent children\r\n const parentFolderClone = { ...data[dragSourceNodeClone.parentId] };\r\n\r\n const oldIndex = parentFolderClone.children ? parentFolderClone.children.indexOf(dragSourceNodeClone.id) : -1;\r\n if (oldIndex > -1) {\r\n parentFolderClone.children.splice(oldIndex, 1);\r\n }\r\n\r\n dragSourceNodeClone.formerParentId = dragSourceNodeClone.parentId;\r\n\r\n // If dragged node new parent folder !== dragged node old parent folder\r\n if (dragSourceNodeClone.parentId !== dragSourceNodeNewPosition.newParentFolderId) {\r\n const newParentFolderClone = { ...data[dragSourceNodeNewPosition.newParentFolderId] };\r\n const newIndex = getNodeChildIndex(\r\n newParentFolderClone,\r\n dragSourceNodeClone.type,\r\n dragSourceNodeNewPosition.previousDocumentId,\r\n data\r\n );\r\n dragSourceNodeClone.parentId = dragSourceNodeNewPosition.newParentFolderId;\r\n dragSourceNodeClone.key = `${dragSourceNodeClone.parentId}_${dragSourceNodeClone.id}`;\r\n dragSourceNodeClone.parents = [...newParentFolderClone.parents, dragSourceNodeClone.parentId];\r\n newParentFolderClone.children.splice(newIndex, 0, dragSourceNodeClone.id);\r\n\r\n delete newTreeData[dragSourceNode.key];\r\n\r\n newTreeData = folderMovementRecursiveParentsUpdate(dragSourceNodeClone, newParentFolderClone, newTreeData);\r\n } else {\r\n const newIndex = getNodeChildIndex(\r\n parentFolderClone,\r\n dragSourceNodeClone.type,\r\n dragSourceNodeNewPosition.previousDocumentId,\r\n data\r\n );\r\n parentFolderClone.children.splice(newIndex, 0, dragSourceNodeClone.id);\r\n }\r\n\r\n // Update both parent folders in tree\r\n if (dragSourceNodeClone.type === 'link') {\r\n dragSourceNodeClone.key = `${dragSourceNodeNewPosition.newParentFolderId}_${dragSourceNodeClone.id}`;\r\n newTreeData[dragSourceNodeClone.key] = dragSourceNodeClone;\r\n } else {\r\n newTreeData[dragSourceNodeClone.id] = dragSourceNodeClone;\r\n }\r\n\r\n updatedNodes.unshift(dragSourceNodeClone);\r\n\r\n dispatch({\r\n type: SET_TREE,\r\n newTreeData\r\n });\r\n\r\n resolve(updatedNodes);\r\n });\r\n};\r\n\r\nexport const updateNodePosition = (dragSourceNode, dropTargetNode) => (dispatch, getState) => {\r\n dispatch(updateNodePositionState(dragSourceNode, dropTargetNode)).then(updatedNodes => {\r\n const functionName = getEnvironmentSaveFnc(dragSourceNode);\r\n window.environment[functionName](updatedNodes, false);\r\n setTimeout(() => {\r\n dispatch(getUserTasks());\r\n }, 500);\r\n });\r\n};\r\n\r\nexport const addNodesFromItemsDepot = (origNodesData, dropTargetNode, forceOutsideFolder) => (dispatch, getState) => {\r\n /* for client update */\r\n const { data } = getState().tree;\r\n const { openFolders } = getState().folders;\r\n const { config } = getState().product;\r\n const newTreeData = { ...data };\r\n\r\n if (!dropTargetNode.parentId) return;\r\n\r\n let isInsideFolder = false;\r\n if (!forceOutsideFolder && dropTargetNode.type === 'folder') {\r\n // folder\r\n isInsideFolder = openFolders.indexOf(dropTargetNode.id) > -1;\r\n }\r\n\r\n const targetParentNode = newTreeData[isInsideFolder ? dropTargetNode.id : dropTargetNode.parentId];\r\n\r\n targetParentNode.children = targetParentNode.children.filter(childId => {\r\n const nodeKey = `${targetParentNode.id}_${childId}`;\r\n return newTreeData[childId] || (newTreeData[nodeKey] && !newTreeData[nodeKey].isDeleted);\r\n });\r\n\r\n const validDroppedItems = origNodesData.filter(node => targetParentNode.children.indexOf(node.id) < 0);\r\n\r\n if (validDroppedItems.length !== origNodesData.length) {\r\n dispatch(setBadDropProperties(origNodesData.length, origNodesData.length - validDroppedItems.length));\r\n }\r\n\r\n const newNodesForAnimation = {};\r\n\r\n /* animate as new */\r\n validDroppedItems.forEach(node => {\r\n const nodeKey = `${targetParentNode.id}_${node.id}`;\r\n newNodesForAnimation[nodeKey] = true;\r\n });\r\n\r\n dispatch(updateNewNodesMap(newNodesForAnimation));\r\n\r\n const updated = {};\r\n let targetNode = { ...dropTargetNode };\r\n\r\n validDroppedItems.forEach((node, index) => {\r\n const nodeKey = `${targetParentNode.id}_${node.id}`;\r\n const newNode = new window.environment.TaskItem({\r\n id: node.id,\r\n title: node.title,\r\n description: node.summary,\r\n key: nodeKey,\r\n imageUrl: node.thumbnail\r\n ? `${window.tocGlobalEndpoints.myBagURL}ImageViewer.aspx?nFileID=${node.thumbnail}`\r\n : config.defaultIcon,\r\n isHidden: false,\r\n isPublished: true,\r\n scope: undefined,\r\n lms: undefined,\r\n previousDocumentId:\r\n index === 0\r\n ? isInsideFolder || dropTargetNode.type === 'folder'\r\n ? emptyDocumentGuid\r\n : dropTargetNode.id\r\n : validDroppedItems[index - 1].id,\r\n previousDocumentType:\r\n index === 0\r\n ? isInsideFolder || dropTargetNode.type === 'folder'\r\n ? undefined\r\n : getNodeDocumentType(dropTargetNode)\r\n : enumDocumentType.item,\r\n parentId: targetParentNode.id,\r\n parentFolderId: targetParentNode.id,\r\n parents: isInsideFolder ? [...targetParentNode.parents, targetParentNode.id] : [...dropTargetNode.parents],\r\n type: 'link',\r\n isNew: true\r\n });\r\n\r\n dispatch(updateNodePositionState(newNode, targetNode)).then(updatedNodes => {\r\n updatedNodes.forEach(un => {\r\n updated[un.id] = un;\r\n });\r\n\r\n const updatedNodesForServer = [];\r\n if (index === validDroppedItems.length - 1) {\r\n Object.keys(updated).forEach(id => {\r\n updatedNodesForServer.push(updated[id]);\r\n });\r\n\r\n window.environment['saveItem'](updatedNodesForServer, false);\r\n\r\n GoogleAnalytics.sendEvent('Creator-ItemsDepot', 'add', updatedNodesForServer.length.toString());\r\n\r\n /* remove new animation */\r\n setTimeout(() => {\r\n validDroppedItems.forEach(node => {\r\n const nodeKey = `${targetParentNode.id}_${node.id}`;\r\n newNodesForAnimation[nodeKey] = false;\r\n });\r\n\r\n dispatch(updateNewNodesMap(newNodesForAnimation));\r\n }, 750);\r\n }\r\n });\r\n\r\n targetNode = newNode;\r\n });\r\n};\r\n\r\nexport const deleteNode = (node, isSuppressSaving = false) => (dispatch, getState) => {\r\n return new Promise(resolve => {\r\n const { data } = getState().tree;\r\n const { openFolders } = getState().folders;\r\n const { toDeleteNodesMap } = getState().creator;\r\n const newTreeData = { ...data };\r\n const deletedNode = {\r\n ...node,\r\n previousDocumentId: undefined,\r\n previousDocumentType: undefined,\r\n isDeleted: true\r\n };\r\n\r\n const nodeKey = deletedNode.key;\r\n let deletedNodePosition = getNodePosition(node, newTreeData);\r\n\r\n delete newTreeData[nodeKey];\r\n\r\n /* for client - update the parentFolder Children Array */\r\n const parentFolder = newTreeData[deletedNode.parentId];\r\n const parentFolderChildrenIds =\r\n parentFolder.children && parentFolder.children.length ? parentFolder.children.slice() : [];\r\n const deletedNodeIndex = parentFolderChildrenIds.indexOf(deletedNode.id);\r\n\r\n if (deletedNodeIndex > -1) {\r\n parentFolderChildrenIds.splice(deletedNodeIndex, 1);\r\n }\r\n\r\n const functionName = getEnvironmentSaveFnc(node);\r\n const updatedToDeleteNodesMap = { ...toDeleteNodesMap, [nodeKey]: true };\r\n const waitFor = isSuppressSaving === true ? 0 : 1000;\r\n\r\n /* animate the node toDelete */\r\n dispatch({\r\n type: SET_DELETE_NODES_MAP,\r\n toDeleteNodesMap: updatedToDeleteNodesMap\r\n });\r\n\r\n let nodePointingToDeletedNode = getNodePointingToRefNode(node, newTreeData, openFolders.indexOf(node.id) > -1);\r\n let updatedNodes = [deletedNode];\r\n if (nodePointingToDeletedNode) {\r\n if (newTreeData[deletedNodePosition.previousDocumentId] && nodePointingToDeletedNode.type === 'link') {\r\n deletedNodePosition = {\r\n previousDocumentId: emptyDocumentGuid,\r\n previousDocumentType: undefined,\r\n newParentFolderId: null\r\n };\r\n }\r\n\r\n //Prevent deleting an original positioned item from overriding deletedNodePosition.newParentFolderId\r\n deletedNodePosition.newParentFolderId = nodePointingToDeletedNode.newParentFolderId;\r\n\r\n nodePointingToDeletedNode = setNodePosition(nodePointingToDeletedNode, deletedNodePosition);\r\n newTreeData[nodePointingToDeletedNode.key] = nodePointingToDeletedNode;\r\n\r\n updatedNodes.push(nodePointingToDeletedNode);\r\n\r\n if (!isSuppressSaving) {\r\n window.environment[functionName](updatedNodes, false);\r\n }\r\n } else if (!isSuppressSaving) {\r\n window.environment[functionName](updatedNodes, false);\r\n }\r\n\r\n /* after animation - remove from ui */\r\n setTimeout(() => {\r\n parentFolder.children = parentFolderChildrenIds; //assign the new array\r\n dispatch({\r\n type: SET_TREE,\r\n newTreeData\r\n });\r\n\r\n /* for deleted folder - verify if was open and remove from open folders accordingly */\r\n if (node.type === 'folder') {\r\n const { openFolders } = getState().folders;\r\n\r\n if (openFolders.indexOf(node.id) > -1) {\r\n // dispatch(closeFolder(node));\r\n //alert('Need to dispatch(closeFolder(node))');\r\n }\r\n } else {\r\n dispatch(getUserTasks());\r\n }\r\n\r\n updatedToDeleteNodesMap[nodeKey] = false;\r\n dispatch({\r\n type: SET_DELETE_NODES_MAP,\r\n toDeleteNodesMap: updatedToDeleteNodesMap\r\n });\r\n\r\n resolve(updatedNodes);\r\n }, waitFor);\r\n });\r\n};\r\n\r\nexport const duplicateItem = (item, copyOfText) => (dispatch, getState) => {\r\n return new Promise(resolve => {\r\n window.environment.duplicateItem(item.id, false, item.title).then(newId => {\r\n if (newId) {\r\n const newItem = {\r\n ...item,\r\n id: newId,\r\n title: `${copyOfText} ${item.title}`,\r\n key: `${item.parentId}_${newId}`,\r\n scope: undefined,\r\n lms: undefined,\r\n previousDocumentId: item.id, //for both server and client\r\n previousDocumentType: getNodeDocumentType(item), //for both server and client\r\n isNew: true //for both server and client\r\n };\r\n \r\n dispatch(updateNodePosition(newItem, item));\r\n \r\n /* animate as new */\r\n dispatch(updateNewNodesMap({ [newItem.key]: true }));\r\n \r\n dispatch(setEditMenuActiveNode(newItem.key));\r\n \r\n resolve();\r\n \r\n GoogleAnalytics.sendEvent('Creator', 'duplicate', '');\r\n \r\n setTimeout(() => {\r\n dispatch(updateNewNodesMap({ [newItem.key]: false }));\r\n }, 750);\r\n } else {\r\n resolve();\r\n dispatch(showAlertMessage(AlertType.GENERAL_ERROR_MESSAGE));\r\n }\r\n });\r\n });\r\n};\r\n\r\nconst changeTaskItem = (taskId, newItemId) => {\r\n return new Promise(resolve => {\r\n if (taskId) {\r\n fetch(`${window.tocGlobalEndpoints.ofakimAPIURL}lms/changeTaskItem?taskId=${taskId}&itemId=${newItemId}`, {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Accept: 'application/json'\r\n },\r\n mode: 'no-cors',\r\n credentials: 'include',\r\n method: 'GET'\r\n })\r\n .then(response => response.text())\r\n .then(json => {\r\n resolve();\r\n });\r\n } else {\r\n return resolve();\r\n }\r\n });\r\n};\r\n\r\nexport const saveEditedItem = (itemId, isNewItem = false) => (dispatch, getState) => {\r\n const { data } = getState().tree;\r\n const { studioEditedItem } = getState().creator;\r\n const { openFolders } = getState().folders;\r\n\r\n const { config } = getState().product;\r\n const { loStudioItemId } = getState().externalTools;\r\n const isNew = !loStudioItemId || loStudioItemId === emptyDocumentGuid;\r\n const studioSrcNode = data[studioEditedItem] || null;\r\n\r\n if (!studioSrcNode) return;\r\n\r\n const isInsideFolder = openFolders.indexOf(studioSrcNode.id) > -1;\r\n\r\n itemId = itemId || getState().externalTools.advancedOptionsItemId;\r\n\r\n let parentFolderId = config.rootDocumentId;\r\n\r\n // If studioSrcNode is an openfolder -> add to src node\r\n if (openFolders.indexOf(studioSrcNode.id) > -1) {\r\n parentFolderId = studioSrcNode.id;\r\n } else {\r\n // No parentId -> root folder\r\n parentFolderId = studioSrcNode.parentId ? studioSrcNode.parentId : studioSrcNode.id;\r\n }\r\n\r\n const parentFolder = data[parentFolderId];\r\n const newItemOnTree = getNodeByIdAndParent(itemId, parentFolderId, data);\r\n\r\n //!newItemOnTree && --> The 'getUserTasks', might run and return the new item task, this will put the new item on the tree.\r\n const shouldHandleEditedItemOnTree = studioSrcNode && !studioSrcNode.isDeleted;\r\n\r\n Promise.all([\r\n window.environment.getItemById(itemId),\r\n changeTaskItem(!isNewItem && studioSrcNode.lms ? studioSrcNode.lms.TaskId : null, itemId)\r\n ]).then(([newItemData, changeTaskItemResult]) => {\r\n const newTreeData = { ...data };\r\n const baseItem = newItemOnTree ? newItemOnTree : isNew ? {} : studioSrcNode; //the item to build upon\r\n\r\n /* merge new item data into a duplicate of the editedItem */\r\n const newItem = new window.environment.TaskItem({\r\n ...baseItem,\r\n id: newItemData.id,\r\n title: newItemData.name,\r\n description: newItemData.summary,\r\n key: `${parentFolderId}_${newItemData.id}`,\r\n // imageUrl: newItemData.imageUrl || config.defaultIcon,\r\n isHidden: false,\r\n isPublished: true,\r\n scope: undefined,\r\n lms: undefined,\r\n noCheck: newItemData.disableAssessment,\r\n parentId: parentFolderId,\r\n parentFolderId: parentFolderId,\r\n parents: isInsideFolder ? [...parentFolder.parents, parentFolderId] : [...studioSrcNode.parents],\r\n type: 'link',\r\n canBeAssigned: false\r\n });\r\n\r\n /* animate as new */\r\n dispatch(updateNewNodesMap({ [newItem.key]: true }));\r\n\r\n if (shouldHandleEditedItemOnTree) {\r\n newItem.newParentFolderId = parentFolderId;\r\n newItem.isNew = true;\r\n\r\n if (isNew) {\r\n dispatch(updateNodePositionState(newItem, studioSrcNode)).then(updatedNodes => {\r\n window.environment.saveItem(\r\n updatedNodes,\r\n newItemOnTree && baseItem.title !== newItemOnTree.title ? true : false\r\n );\r\n });\r\n } else {\r\n let updatedNodes = [];\r\n const nodeToReference = getPrevNode(studioSrcNode, data, openFolders);\r\n dispatch(deleteNode(studioSrcNode, true))\r\n .then(deletedNode => {\r\n updatedNodes.push(...deletedNode);\r\n\r\n return dispatch(updateNodePositionState(newItem, nodeToReference));\r\n })\r\n .then(updated => {\r\n updatedNodes.push(...updated);\r\n window.environment.saveItem(\r\n updatedNodes,\r\n newItemOnTree && baseItem.title !== newItemOnTree.title ? true : false\r\n );\r\n });\r\n }\r\n } else {\r\n window.environment.saveItem(\r\n [newItemOnTree],\r\n newItemOnTree && baseItem.title !== newItemOnTree.title ? true : false\r\n );\r\n }\r\n\r\n newTreeData[newItem.key] = newItem;\r\n\r\n /* to trigger opening of the edited lo document */\r\n dispatch(setLastLoStudioEditedItemKey(newItem.key));\r\n });\r\n};\r\n\r\nexport const addNewFolder = (baseFolder, defaultTitle) => (dispatch, getState) => {\r\n const { data } = getState().tree;\r\n const { openFolders } = getState().folders;\r\n const newTreeData = { ...data };\r\n const isInsideFolder = openFolders.indexOf(baseFolder.id) > -1 || !baseFolder.parentId;\r\n const parentFolder = isInsideFolder ? baseFolder : newTreeData[baseFolder.parentId];\r\n const updatedChildren = parentFolder && parentFolder.children ? [...parentFolder.children] : [];\r\n\r\n const newId = window.environment.guid();\r\n\r\n const newFolder = new window.environment.TaskFolder({\r\n id: newId,\r\n title: defaultTitle,\r\n flag: false,\r\n isHidden: false,\r\n isDeleted: false,\r\n isPublished: true,\r\n children: [],\r\n type: 'folder',\r\n parentId: parentFolder.id,\r\n parentFolderId: parentFolder.id,\r\n parents: isInsideFolder ? [...baseFolder.parents, parentFolder.id] : [...baseFolder.parents],\r\n previousDocumentId: isInsideFolder ? emptyDocumentGuid : baseFolder.id,\r\n previousDocumentType: isInsideFolder ? undefined : enumDocumentType.folder,\r\n isNew: true\r\n });\r\n\r\n newFolder.key = newId;\r\n newFolder.scheduledInnerItems = [];\r\n\r\n if (isInsideFolder) {\r\n updatedChildren.unshift(newFolder.id);\r\n } else {\r\n let origItemIndex = parentFolder.children.indexOf(baseFolder.id);\r\n if (origItemIndex < 0)\r\n //if not found - push at end\r\n origItemIndex = parentFolder.children.length - 1;\r\n\r\n updatedChildren.splice(origItemIndex + 1, 0, newFolder.id);\r\n }\r\n\r\n newTreeData[parentFolder.id] = { ...parentFolder, children: updatedChildren };\r\n\r\n newTreeData[newFolder.id] = newFolder;\r\n\r\n dispatch(updateNodePositionState(newFolder, baseFolder)).then(updated => {\r\n /* save on server */\r\n const updatedNodes = [newFolder, ...updated];\r\n\r\n updated.forEach(node => {\r\n if (node.type === 'link') {\r\n newTreeData[node.key] = node;\r\n } else {\r\n newTreeData[node.id] = node;\r\n }\r\n });\r\n\r\n window.environment.saveFolder(updatedNodes, false);\r\n });\r\n\r\n /* inject into tree on ui */\r\n dispatch({\r\n type: SET_TREE,\r\n newTreeData\r\n });\r\n\r\n /* animate as new */\r\n dispatch(updateNewNodesMap({ [newFolder.id]: true }));\r\n\r\n /* edit title */\r\n dispatch(setEditTitleActiveNode(newFolder.id));\r\n\r\n GoogleAnalytics.sendEvent('Creator', 'add', 'Folder');\r\n};\r\n","import React, { PureComponent } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport SvgIcon from '../SvgIcon';\r\n\r\nimport { Button } from 'cet-components-lib/dist/UI/Button';\r\nimport { Modal } from 'cet-components-lib/dist/Layout/Modal';\r\nimport { Snackbar } from 'cet-components-lib/dist/UI/Snackbar';\r\n\r\nimport styles from './Alert.module.scss';\r\n\r\nexport class Alert extends PureComponent {\r\n render() {\r\n const { type, icon, isOpen, isHeaderAlert, onConfirmClick, onCancelClick, children, confirmLabel, cancelLabel, width, zIndex = undefined } = this.props;\r\n\r\n if (type === 'snackbar') {\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n return (\r\n <>\r\n \r\n {isHeaderAlert ? (\r\n {children}\r\n ) : (\r\n \r\n
\r\n {icon && }\r\n {children}\r\n
\r\n
\r\n )}\r\n \r\n \r\n {cancelLabel && onCancelClick && (\r\n \r\n )}\r\n {confirmLabel && onConfirmClick && (\r\n \r\n )}\r\n \r\n \r\n
\r\n \r\n );\r\n }\r\n}\r\n\r\nAlert.propTypes = {\r\n type: PropTypes.string,\r\n isOpen: PropTypes.bool.isRequired,\r\n icon: PropTypes.string,\r\n isHeaderAlert: PropTypes.bool,\r\n onConfirmClick: PropTypes.func.isRequired,\r\n onCancelClick: PropTypes.func,\r\n children: PropTypes.node.isRequired,\r\n confirmLabel: PropTypes.string.isRequired,\r\n cancelLabel: PropTypes.string,\r\n width: PropTypes.string\r\n};\r\n\r\nexport default Alert;\r\n","import { isSubmittedAtLeastOnce } from '../tree/lms/services';\r\n\r\nexport const isCurrentElement = element => {\r\n if (element) {\r\n return (\r\n (element.type === 'folder' && element.scope === 'current' && element.hasWorkToDo) ||\r\n (element.type === 'link' && element.scope && element.scope.status === 'current') ||\r\n (element.type === 'link' && element.ruleBase?.isCurrent === true)\r\n );\r\n }\r\n\r\n return false;\r\n};\r\n\r\nexport const isBeforeCurrentElement = (tree, element) => {\r\n if (element) {\r\n const treeArr = Object.entries(tree).map(el => el[1]);\r\n const currentElements = Object.values(tree).filter(value => value.scope === 'current');\r\n if (currentElements.length > 0) {\r\n const lastCurrentId = currentElements[currentElements.length - 1].key;\r\n const lastCurrentIndex = treeArr.findIndex(el => el.key === lastCurrentId);\r\n const elementIndex = treeArr.findIndex(el => el.key === element.key);\r\n const isBeforeCurrent = elementIndex < lastCurrentIndex;\r\n return isBeforeCurrent;\r\n }\r\n }\r\n return false;\r\n};\r\n\r\nexport const isGlowElement = (element, isBeforeCurrent) => {\r\n if (element) {\r\n return ((0 <= element.progress && element.progress < 100 && element.hasWorkToDo) || !element.progress) && isBeforeCurrent;\r\n }\r\n return false;\r\n};\r\n\r\nexport const getProductBookmarkRuleBaseState = async (tree, user, productId, ruleBaseDefaultCurrentId = null) => {\r\n const ruleBaseStateMap = {};\r\n\r\n let productDocuments = Object.values(tree).filter(item => item?.type === 'link');\r\n const lastDocumentKey = await getUserHistory(user, productId);\r\n\r\n // Build \"ruleBaseStateMap\" according to bookmark (last visted document)\r\n for (let i = 0; i < productDocuments.length; i++) {\r\n const documentKey = productDocuments[i].key;\r\n\r\n ruleBaseStateMap[documentKey] = {\r\n isCurrent: documentKey === lastDocumentKey || (!lastDocumentKey && documentKey === ruleBaseDefaultCurrentId)\r\n };\r\n }\r\n\r\n return ruleBaseStateMap;\r\n};\r\n\r\nconst getLinksFolderLinearRuleBaseState = (tree, folderId, isCurrentAlreadyFound = false) => {\r\n let folderChildren = tree[folderId]?.children;\r\n folderChildren = folderChildren.filter((item, pos) => folderChildren.indexOf(item) === pos);\r\n\r\n const ruleBaseStateMap = {};\r\n\r\n if (folderChildren?.length) {\r\n let lastSubmittedDocumentIndex = -1;\r\n\r\n // Find student's most advanced submitted document index\r\n for (let i = folderChildren.length - 1; i >= 0; i--) {\r\n const documentId = folderChildren[i];\r\n const document = tree[`${folderId}_${documentId}`];\r\n const isDocumentSubmitted = isSubmittedAtLeastOnce(document.lms?.StudentLmsInfo);\r\n\r\n if (isDocumentSubmitted) {\r\n lastSubmittedDocumentIndex = i;\r\n break;\r\n }\r\n }\r\n\r\n // Build \"ruleBaseStateMap\" according to last submitted document index\r\n for (let i = 0; i < folderChildren.length; i++) {\r\n const documentId = folderChildren[i];\r\n const document = tree[`${folderId}_${documentId}`];\r\n\r\n if (i <= lastSubmittedDocumentIndex) {\r\n ruleBaseStateMap[document.key] = {\r\n isBlocked: false,\r\n isCurrent: false\r\n };\r\n } else if (i > lastSubmittedDocumentIndex) {\r\n const isCurrent = !isCurrentAlreadyFound && i === lastSubmittedDocumentIndex + 1;\r\n\r\n ruleBaseStateMap[document.key] = {\r\n isBlocked: !isCurrent,\r\n isCurrent\r\n };\r\n }\r\n }\r\n }\r\n\r\n return ruleBaseStateMap;\r\n};\r\n\r\nexport const getFolderLinearRuleBaseState = (tree, folderId, ruleBaseStateMap = {}) => {\r\n const folder = tree?.[folderId];\r\n\r\n if (folder?.isLinksFolder) {\r\n // Check if current document already found\r\n const isCurrentAlreadyFound = Object.values(ruleBaseStateMap).some(rbs => rbs.isCurrent);\r\n ruleBaseStateMap = { ...ruleBaseStateMap, ...getLinksFolderLinearRuleBaseState(tree, folderId, isCurrentAlreadyFound) };\r\n } else if (folder?.children?.length) {\r\n // In case of folder which contains sub-folders:\r\n // Create a recursive rule-based state for all inner sub-folders and merge them into a single rule-based linear state.\r\n let folderChildren = folder.children;\r\n folderChildren = folderChildren.filter((item, pos) => folderChildren.indexOf(item) === pos);\r\n\r\n if (folderChildren?.length) {\r\n for (let i = 0; i < folderChildren.length; i++) {\r\n const subFolderId = folderChildren[i];\r\n ruleBaseStateMap = { ...ruleBaseStateMap, ...getFolderLinearRuleBaseState(tree, subFolderId, ruleBaseStateMap) };\r\n }\r\n }\r\n }\r\n\r\n return ruleBaseStateMap;\r\n};\r\n\r\nexport const getFolderLinearFreestyleRuleBaseState = async (tree, user, productId, folderId) => {\r\n let folderChildren = tree[folderId]?.children;\r\n folderChildren = folderChildren.filter((item, pos) => folderChildren.indexOf(item) === pos);\r\n\r\n const ruleBaseStateMap = {};\r\n\r\n if (folderChildren?.length) {\r\n const lastDoc = await getUserHistory(user, productId, folderId);\r\n const lastDocumentIndex = lastDoc ? folderChildren.indexOf(lastDoc) : 0;\r\n let isCurrentSelected = false;\r\n let startIndex = lastDocumentIndex;\r\n\r\n while (!isCurrentSelected) {\r\n for (let i = 0; i < folderChildren.length; i++) {\r\n const documentId = folderChildren[i];\r\n const document = tree[`${folderId}_${documentId}`];\r\n const isHidden = document.isHidden;\r\n const isSubmitted = isSubmittedAtLeastOnce(document.lms?.StudentLmsInfo);\r\n\r\n if (i >= startIndex && !isSubmitted && !isHidden && !isCurrentSelected) {\r\n ruleBaseStateMap[document.key] = { isCurrent: true };\r\n isCurrentSelected = true;\r\n } else {\r\n ruleBaseStateMap[document.key] = { isCurrent: false };\r\n }\r\n }\r\n\r\n if (!isCurrentSelected) {\r\n if (startIndex === 0) {\r\n break;\r\n }\r\n startIndex = 0;\r\n }\r\n }\r\n }\r\n\r\n return ruleBaseStateMap;\r\n};\r\n\r\nexport const getAnimationFramesRange = (elementSettings, isMouseOver, isActive) => {\r\n const animationSettings = elementSettings?.animation ? elementSettings.animation : elementSettings;\r\n\r\n if (animationSettings?.frames) {\r\n if (isMouseOver) {\r\n if (!isActive) {\r\n return animationSettings.frames.disabledMouseOver;\r\n } else {\r\n return animationSettings.frames.mouseOver;\r\n }\r\n } else {\r\n if (!isActive) {\r\n return animationSettings.frames.disabled;\r\n } else {\r\n return animationSettings.frames.default;\r\n }\r\n }\r\n } else {\r\n return null;\r\n }\r\n};\r\n\r\nexport const getCookiesApiValue = async (productId, key) => {\r\n let result = null;\r\n\r\n if (productId && key) {\r\n try {\r\n result = await window.cet.microservices.cookies.content.getValues({ productId, key });\r\n } catch (error) {\r\n console.log('getCookiesApiValue error', error);\r\n }\r\n }\r\n\r\n return result?.[0]?.value ?? null;\r\n};\r\n\r\nexport const updateCookiesApiValue = async (productId, key, val) => {\r\n let success = false;\r\n\r\n if (productId && key && val) {\r\n try {\r\n success = await window.cet.microservices.cookies.content.setValue({ productId, key, val });\r\n } catch (error) {\r\n console.log('updateCookiesApiValue error', error);\r\n }\r\n }\r\n\r\n return Boolean(success);\r\n};\r\n\r\nexport const getUserHistory = async (user, productId, folderId = null) => {\r\n let userHistory = null;\r\n\r\n if (user?.userId && user?.activeAudience) {\r\n const userHistoryKey = `${user.activeAudience.id}_${user.userId}${folderId ? '_' + folderId : ''}`;\r\n userHistory = await getCookiesApiValue(productId, userHistoryKey);\r\n }\r\n\r\n return userHistory;\r\n};\r\n\r\nexport const updateUserProductHistory = async (user, productId, currentDocumentId) => {\r\n if (user?.userId && user?.activeAudience) {\r\n await updateCookiesApiValue(productId, `${user.activeAudience.id}_${user.userId}`, currentDocumentId);\r\n }\r\n};\r\n\r\nexport const updateUserFolderHistory = async (user, productId, folderId, currentDocumentId) => {\r\n if (folderId && user && user.userId && user.activeAudience) {\r\n await updateCookiesApiValue(productId, `${user.activeAudience.id}_${user.userId}_${folderId}`, currentDocumentId);\r\n }\r\n};\r\n\r\nexport const onButtonEnterOrSpace = (eventHandler, event) => {\r\n const enterOrSpace = event.key === 'Enter' || event.key === ' ' || event.key === 'Spacebar' || event.which === 13 || event.which === 32;\r\n if (enterOrSpace) {\r\n event.preventDefault();\r\n eventHandler(event);\r\n }\r\n};\r\n\r\nexport const isOlamonByConfig = config => {\r\n return window.location.port === '83' || config?.loUiType?.includes('olamon');\r\n};\r\n","import { useCallback, useEffect, useMemo, useRef } from 'react';\r\nimport { useHistory, useLocation } from 'react-router-dom';\r\nimport { useSelector, useDispatch } from 'react-redux';\r\n\r\nimport { updateEnvironment } from '../../SharedLogic/app/actions';\r\nimport { getParentPage } from '../../SharedLogic/app/services';\r\nimport { getStaticFileUrl } from '../../SharedLogic/utilities/endpoints';\r\nimport { resetDocument } from '../../SharedLogic/lo/actions';\r\nimport { logOut as ssoLogout } from '../../SharedLogic/user/sso';\r\nimport { getUserShopURL } from '../../SharedLogic/user/services';\r\nimport { useWhyDidYouUpdate } from '../../SharedLogic/hooks/useWhyDidYouUpdate';\r\n\r\nimport {\r\n updateUserStatus,\r\n updateUserWallet,\r\n updateUiElements,\r\n updateUiRenderedElements as updateUiRenderedElementsAction,\r\n loadUserWallet,\r\n updateClassNames,\r\n updateMode\r\n} from '../../SharedLogic/olamonim/actions';\r\n\r\nexport const useEventHandlers = () => {\r\n const history = useHistory();\r\n const location = useLocation();\r\n const dispatch = useDispatch();\r\n const isEventInProgress = useRef(false);\r\n\r\n const { routes, referrerMapRoute, tree, rootDocumentId, isPlayingBackgroundSound, purchaseConfig, userSchoolSign } = useSelector(\r\n ({ olamonim, tree, product, user, renderedUI }) => ({\r\n referrerMapRoute: olamonim.currentMap?.referrerMapRoute || '',\r\n routes: olamonim.settings.site?.routes || [],\r\n isPlayingBackgroundSound: olamonim.status.background_sound?.PLAYING || false,\r\n tree: tree.data,\r\n rootDocumentId: product.config.rootDocumentId,\r\n purchaseConfig: product.config.purchaseConfig,\r\n renderedUI,\r\n userSchoolSign: user?.schoolSign\r\n })\r\n );\r\n\r\n const logout = useCallback(() => {\r\n ssoLogout(document.location.href);\r\n }, []);\r\n\r\n const goToStore = useCallback(() => {\r\n const userShopURL = getUserShopURL(purchaseConfig, userSchoolSign);\r\n window.location.href = userShopURL;\r\n }, [purchaseConfig, userSchoolSign]);\r\n\r\n /* Toggle sound */\r\n const toggleAudio = useCallback(\r\n data => {\r\n window.TOC_RESOURCES = window.TOC_RESOURCES || {};\r\n window.TOC_RESOURCES.sounds = window.TOC_RESOURCES.sounds || {};\r\n if (!window.TOC_RESOURCES.sounds[data.source]) {\r\n window.TOC_RESOURCES.sounds[data.source] = new Audio(getStaticFileUrl(data.source));\r\n window.TOC_RESOURCES.sounds[data.source].addEventListener(\r\n 'ended',\r\n function () {\r\n if (data.loop) {\r\n this.currentTime = 0;\r\n this.play();\r\n } else {\r\n if (document.getElementById(data.id)) {\r\n document.getElementById(data.id).classList.remove('on');\r\n }\r\n }\r\n },\r\n false\r\n );\r\n }\r\n\r\n const playAudio = () => {\r\n if (data.type === 'backgroundSound' && !isPlayingBackgroundSound) {\r\n return;\r\n }\r\n try {\r\n if (document.getElementById(data.id)) {\r\n document.getElementById(data.id).classList.add('on');\r\n }\r\n window.TOC_RESOURCES.sounds[data.source].currentTime = 0;\r\n window.TOC_RESOURCES.sounds[data.source].play();\r\n } catch (error) {}\r\n };\r\n\r\n const stopAudio = () => {\r\n if (document.getElementById(data.id)) {\r\n document.getElementById(data.id).classList.remove('on');\r\n }\r\n window.TOC_RESOURCES.sounds[data.source].pause();\r\n };\r\n\r\n switch (data.mode) {\r\n case 'play':\r\n playAudio();\r\n break;\r\n case 'stop':\r\n stopAudio();\r\n break;\r\n case 'toggle':\r\n if (window.TOC_RESOURCES.sounds[data.source].paused) {\r\n playAudio();\r\n } else {\r\n stopAudio();\r\n }\r\n break;\r\n default:\r\n break;\r\n }\r\n },\r\n [isPlayingBackgroundSound]\r\n );\r\n\r\n /* update element class per action*/\r\n const updateElementClass = useCallback(\r\n async data => {\r\n if (!isEventInProgress.current) {\r\n if (data.dutation > 0 && data.mode === updateMode.add) {\r\n isEventInProgress.current = true;\r\n await dispatch(updateClassNames(data));\r\n\r\n setTimeout(async () => {\r\n const dataNew = { ...data, mode: updateMode.remove };\r\n await dispatch(updateClassNames(dataNew));\r\n isEventInProgress.current = false;\r\n }, data.dutation);\r\n } else {\r\n await dispatch(updateClassNames(data));\r\n }\r\n }\r\n },\r\n [dispatch]\r\n );\r\n\r\n const focusOnElementById = useCallback(data => {\r\n console.log('focused on', data.id);\r\n document.getElementById(data.id).focus();\r\n }, []);\r\n\r\n /* Scroll to element */\r\n const scrollToElement = useCallback(data => {\r\n var checkExist = setInterval(function () {\r\n const container = data.container === 'window' ? window : document.querySelector(data.container);\r\n const element = document.querySelector(data.element);\r\n\r\n if (element) {\r\n if (container && data.offset) {\r\n let scrollTop = 0,\r\n scrollLeft = 0;\r\n\r\n if (data.startFrom === 'bottom' || data.startFrom === 'bottom-right' || data.startFrom === 'bottom-left') {\r\n container.scrollTop = container.scrollHeight;\r\n }\r\n if (data.startFrom === 'right' || data.startFrom === 'top-right' || data.startFrom === 'bottom-right') {\r\n container.scrollLeft = container.scrollWidth;\r\n }\r\n\r\n if (data.scroll === 'vertical' || data.scroll === 'both') {\r\n const containerHeight = data.container === 'window' ? window.innerHeight : container.getBoundingClientRect().height;\r\n const fixedTopOffset = data.offset === 'middle' ? containerHeight / 2 : 0;\r\n scrollTop = element.offsetTop - fixedTopOffset;\r\n }\r\n if (data.scroll === 'horizontal' || data.scroll === 'both') {\r\n const containerWidth = data.container === 'window' ? window.innerWidth : container.getBoundingClientRect().width;\r\n const fixedLefOffset = data.offset === 'middle' ? containerWidth / 2 : 0;\r\n scrollLeft = element.offsetLeft - fixedLefOffset;\r\n }\r\n\r\n container.scroll({ top: scrollTop, left: scrollLeft, behavior: 'smooth' });\r\n } else {\r\n element.scrollIntoView(data?.scrollOptions);\r\n }\r\n\r\n clearInterval(checkExist);\r\n }\r\n }, 100);\r\n }, []);\r\n\r\n /* Open folder as a link */\r\n const goToFolder = useCallback(\r\n ({ data, isActive }) => {\r\n if (isActive && data) {\r\n history.push(`/${data.key}`);\r\n }\r\n },\r\n [history]\r\n );\r\n\r\n /* Open LO as a link */\r\n const goToItem = useCallback(\r\n async ({ data, isActive }) => {\r\n if (isActive) {\r\n await dispatch(resetDocument());\r\n history.push(`/${data.key}`);\r\n }\r\n },\r\n [dispatch, history]\r\n );\r\n\r\n /* Open current LO's first page (and reset user LO state if needed) */\r\n const goToItemStart = useCallback(\r\n async ({ resetUserState }) => {\r\n const currentItem = location.pathname.split('/')[1];\r\n if (currentItem) {\r\n if (resetUserState) {\r\n await window.cet.lo.plugin.reset();\r\n }\r\n history.push(`/${currentItem}#page=first-page`);\r\n }\r\n },\r\n [history, location.pathname]\r\n );\r\n\r\n //#region calc the parent folder path in order to use in goToParentMap\r\n // Making this calculation as part of useEffect and not in goToParentMap itself,\r\n // is due to the very complicated dependency array. route + tree data are updated many times.\r\n // We can make this calculation regardless of the click, since it mostly depends on the location path\r\n // So when goToParentMap is called the path should be set.\r\n const parentMapRef = useRef();\r\n\r\n useEffect(() => {\r\n parentMapRef.current = getParentPage(rootDocumentId, tree, routes);\r\n }, [rootDocumentId, routes, tree]);\r\n\r\n //#endregion\r\n const goToParentMap = useCallback(() => {\r\n history.push(parentMapRef.current);\r\n }, [history]);\r\n\r\n const goToReferrerMap = useCallback(() => {\r\n const previousRoute = referrerMapRoute && location.pathname !== referrerMapRoute ? referrerMapRoute : '/';\r\n history.push(previousRoute);\r\n }, [history, location.pathname, referrerMapRoute]);\r\n\r\n /* Open a site link */\r\n const goToHref = useCallback(\r\n ({ href }) => {\r\n history.push(href);\r\n },\r\n [history]\r\n );\r\n\r\n /* Open next document in folder (only if LO Player is open) */\r\n const goToNextDocumentInFolder = useCallback(async () => {\r\n const loKey = history.location.pathname.split('/')[1];\r\n const currentDocument = tree[loKey];\r\n const currentFolder = currentDocument?.parentId ? tree[currentDocument.parentId] : null;\r\n\r\n if (currentFolder?.children?.length > 0) {\r\n const currentDocumentIndex = currentFolder.children.indexOf(currentDocument.id);\r\n let nextDocumentIndex = currentDocumentIndex + 1;\r\n\r\n if (nextDocumentIndex < currentFolder.children.length) {\r\n const isFreestyleRuleBase = !currentDocument.ruleBase || currentDocument.ruleBase.isBlocked !== undefined;\r\n let nextDocument = tree[`${currentFolder.id}_${currentFolder.children[nextDocumentIndex]}`];\r\n\r\n while (isFreestyleRuleBase && nextDocument.isHidden && nextDocumentIndex + 1 < currentFolder.children.length) {\r\n nextDocumentIndex++;\r\n nextDocument = tree[`${currentFolder.id}_${currentFolder.children[nextDocumentIndex]}`];\r\n }\r\n\r\n window.cet.lo.plugin.unload().then(async () => {\r\n await dispatch(resetDocument());\r\n history.push(`/${nextDocument.key}`);\r\n });\r\n } else {\r\n goToParentMap();\r\n }\r\n }\r\n }, [dispatch, goToParentMap, history, tree]);\r\n\r\n /* Open a site link */\r\n const openUrl = useCallback(data => {\r\n window.open(data.url, data.target ? data.target : '_blank ');\r\n }, []);\r\n\r\n const updateElementStatus = useCallback(\r\n async ({ id, status, value }) => {\r\n await dispatch(updateUserStatus(id, status, value));\r\n },\r\n [dispatch]\r\n );\r\n\r\n const updateWallet = useCallback(\r\n async ({ prizeAmount, prizeCode }) => {\r\n const prizeCatalogId = prizeCode?.split('|')[0];\r\n if (prizeCatalogId) {\r\n await dispatch(updateUserWallet(prizeAmount, prizeCode));\r\n }\r\n },\r\n [dispatch]\r\n );\r\n\r\n const updateUi = useCallback(\r\n async ({ element, key, value }) => {\r\n await dispatch(updateUiElements(element, key, value));\r\n },\r\n [dispatch]\r\n );\r\n\r\n const updateUiRenderedElements = useCallback(\r\n async actionData => {\r\n await dispatch(updateUiRenderedElementsAction(actionData));\r\n },\r\n [dispatch]\r\n );\r\n\r\n const changeAudience = useCallback(\r\n async ({ id }) => {\r\n if (id) {\r\n await dispatch(updateEnvironment('', id));\r\n await dispatch(loadUserWallet());\r\n }\r\n },\r\n [dispatch]\r\n );\r\n\r\n const preventAction = useCallback(() => {}, []);\r\n\r\n const alertBrowser = useCallback(({ text }) => {\r\n alert(text);\r\n }, []);\r\n\r\n const eventHandlers = useMemo(\r\n () => ({\r\n logout,\r\n goToStore,\r\n toggleAudio,\r\n updateElementClass,\r\n focusOnElementById,\r\n scrollToElement,\r\n goToFolder,\r\n goToItem,\r\n goToItemStart,\r\n goToParentMap,\r\n goToReferrerMap,\r\n goToHref,\r\n goToNextDocumentInFolder,\r\n openUrl,\r\n updateElementStatus,\r\n updateWallet,\r\n updateUi,\r\n changeAudience,\r\n preventAction,\r\n updateUiRenderedElements,\r\n alertBrowser\r\n }),\r\n [\r\n logout,\r\n goToStore,\r\n toggleAudio,\r\n updateElementClass,\r\n focusOnElementById,\r\n scrollToElement,\r\n goToFolder,\r\n goToItem,\r\n goToItemStart,\r\n goToParentMap,\r\n goToReferrerMap,\r\n goToHref,\r\n goToNextDocumentInFolder,\r\n openUrl,\r\n updateElementStatus,\r\n updateWallet,\r\n updateUi,\r\n changeAudience,\r\n preventAction,\r\n updateUiRenderedElements,\r\n alertBrowser\r\n ]\r\n );\r\n\r\n const actionEmitter = useCallback(\r\n action => {\r\n if (!action) return;\r\n\r\n if (typeof action === 'function') {\r\n action();\r\n } else {\r\n const actionsArray = Array.isArray(action) ? action : [action];\r\n\r\n actionsArray.forEach(actionSettings => {\r\n if (actionSettings && actionSettings.action) {\r\n if (eventHandlers[actionSettings.action] && typeof eventHandlers[actionSettings.action] === 'function') {\r\n eventHandlers[actionSettings.action](actionSettings.data);\r\n } else if (window[actionSettings.action] && typeof window[actionSettings.action] === 'function') {\r\n window[actionSettings.action](actionSettings.data);\r\n }\r\n }\r\n });\r\n }\r\n },\r\n [eventHandlers]\r\n );\r\n\r\n useWhyDidYouUpdate('actionEmitter', { eventHandlers, actionEmitter, history, location, dispatch, routes, rootDocumentId });\r\n\r\n return actionEmitter;\r\n};\r\n","import { LOAD_STATE_SUCCESS, LOAD_NODE_EVALUTAIONS_SUCCESS, LOAD_DOCUMENTS_NUM_OF_SECTIONS } from './action-types';\r\n\r\nimport {\r\n buildStudentStateMap,\r\n fetchStudentTreeState,\r\n fetchStudentStateByNodes,\r\n fetchStudentNextItem,\r\n fetchStudentsStateByType,\r\n fetchEvaluationForNodes,\r\n buildStudentStateMapForTeacher,\r\n fetchDocumentsNumOfSections\r\n} from './services';\r\n\r\nimport { getFirstLinksFolder } from '../data/services';\r\n\r\nexport const fetchStudentStateSuccess = scopes => {\r\n return {\r\n type: LOAD_STATE_SUCCESS,\r\n scopes\r\n };\r\n};\r\n\r\nexport const fetchStudentState = (config, user) => async (dispatch, getState) => {\r\n const { tree } = getState();\r\n const { isAdaptiveEnabled } = config;\r\n const { role, userId, activeAudience } = user;\r\n\r\n return new Promise(async resolve => {\r\n if (activeAudience && activeAudience.audienceId && isAdaptiveEnabled && role === 'student') {\r\n const studentState = await fetchStudentTreeState(userId, activeAudience.audienceId);\r\n\r\n if (studentState && Object.keys(studentState).length > 0) {\r\n await dispatch(fetchStudentStateSuccess(studentState));\r\n } else {\r\n // In case of empty state (first entrance) - define first enabled folder as \"current\"\r\n const firstLinksFolder = getFirstLinksFolder(tree.data);\r\n let nextFolderId = null;\r\n\r\n if (firstLinksFolder && (firstLinksFolder.isDeleted || firstLinksFolder.isHidden)) {\r\n nextFolderId = findNextEnabledFolder(firstLinksFolder, tree.data);\r\n } else {\r\n nextFolderId = firstLinksFolder ? firstLinksFolder.id : config.rootDocumentId;\r\n }\r\n\r\n await dispatch(fetchStudentNextState(nextFolderId));\r\n }\r\n resolve(true);\r\n } else {\r\n resolve(false);\r\n }\r\n });\r\n};\r\n\r\nexport const findNextEnabledFolder = (referenceFolder, treeData) => {\r\n const { parentId } = referenceFolder;\r\n let parentFolder = treeData[parentId];\r\n let scopeId = referenceFolder.key;\r\n\r\n while (parentFolder) {\r\n scopeId = findNextEnabledChild(parentFolder, treeData, scopeId);\r\n\r\n if (scopeId && scopeId !== referenceFolder.key) {\r\n return scopeId;\r\n } else {\r\n if (parentFolder.parentId) {\r\n scopeId = parentFolder.key;\r\n parentFolder = treeData[parentFolder.parentId];\r\n } else {\r\n scopeId = null;\r\n parentFolder = null;\r\n }\r\n }\r\n }\r\n\r\n return scopeId;\r\n};\r\n\r\nconst findNextEnabledChild = (parentFolder, treeData, referenceFolderKey) => {\r\n let scopeId;\r\n\r\n if (parentFolder && parentFolder.children && parentFolder.children.length > 0) {\r\n const referenceFolderIndex = parentFolder.children.indexOf(referenceFolderKey);\r\n\r\n for (let index = referenceFolderIndex + 1; index < parentFolder.children.length; index++) {\r\n scopeId = parentFolder.children[index];\r\n if (treeData[scopeId] && treeData[scopeId].type === 'folder') {\r\n if (treeData[scopeId].isLinksFolder) {\r\n if (!treeData[scopeId].isDeleted && !treeData[scopeId].isHidden && treeData[scopeId].scope !== 'done') {\r\n break;\r\n }\r\n } else {\r\n scopeId = findNextEnabledChild(treeData[scopeId], treeData, referenceFolderKey);\r\n if (scopeId) {\r\n break;\r\n }\r\n }\r\n }\r\n\r\n scopeId = '';\r\n }\r\n }\r\n\r\n return scopeId;\r\n};\r\n\r\nexport const fetchStudentNextState =\r\n (scopeId = '') =>\r\n async (dispatch, getState) => {\r\n const { product, user } = getState();\r\n const { engineType, learningApplicationId } = product.config;\r\n const { role, userId, activeAudience } = user;\r\n\r\n scopeId = scopeId || '';\r\n\r\n return new Promise(async resolve => {\r\n if (activeAudience && activeAudience.audienceId && learningApplicationId && role === 'student') {\r\n const nextStudentItem = await fetchStudentNextItem(userId, activeAudience.audienceId, scopeId, engineType);\r\n\r\n if (nextStudentItem && nextStudentItem.success) {\r\n const nextStudentState = buildStudentStateMap(nextStudentItem.nodes, nextStudentItem.numOfSkippedPages);\r\n await dispatch(fetchStudentStateSuccess(nextStudentState));\r\n resolve({ nextStudentItem, nextStudentState });\r\n } else {\r\n resolve(null);\r\n }\r\n } else {\r\n resolve(null);\r\n }\r\n });\r\n };\r\n\r\nexport const getBlockedCurrentNodes = (nextStudentState, treeData) => {\r\n let blockedCurrentNodes = Object.keys(nextStudentState).filter(\r\n key =>\r\n (nextStudentState[key] === 'current' || (typeof nextStudentState[key] === 'object' && nextStudentState[key].status === 'current')) &&\r\n (treeData[key].isDeleted || treeData[key].isHidden)\r\n );\r\n\r\n if (blockedCurrentNodes.length) {\r\n // Sort nodes from tree root down\r\n blockedCurrentNodes = blockedCurrentNodes.sort((a, b) => (treeData[a].parents.length < treeData[b].parents.length ? -1 : 1));\r\n }\r\n\r\n return blockedCurrentNodes;\r\n};\r\n\r\nexport const getStudentCurrentDocument =\r\n (scopeId = '') =>\r\n async (dispatch, getState) => {\r\n let { user, tree } = getState();\r\n const { activeAudience } = user;\r\n\r\n return new Promise(async resolve => {\r\n if (activeAudience && activeAudience.audienceId && tree.data) {\r\n let currentNode = null;\r\n\r\n if (scopeId && tree.data[scopeId]) {\r\n let subTree = tree.data[scopeId].children.map(childId => tree.data[`${scopeId}_${childId}`]);\r\n\r\n if (tree.data[scopeId].isAdaptive) {\r\n currentNode = subTree.filter(n => n.type === 'link' && typeof n.scope === 'object' && n.scope.status === 'current');\r\n } else if (window.IS_OLAMON) {\r\n // Olamonim Linear RB patch\r\n currentNode = subTree.filter(n => n.type === 'link' && typeof n.ruleBase === 'object' && n.ruleBase.isCurrent);\r\n\r\n const isFreestyleRuleBase = !currentNode.ruleBase || currentNode.ruleBase.isBlocked !== undefined;\r\n\r\n if (isFreestyleRuleBase) {\r\n if (!currentNode.length) {\r\n currentNode = subTree.filter(n => n.type === 'link');\r\n }\r\n\r\n if (currentNode && (currentNode[0]?.isHidden || currentNode[0]?.isHiddenByStudio || currentNode[0]?.isHiddenByTeacher)) {\r\n const currentFolderChildren = tree.data[scopeId].children;\r\n const currentNodeIndex = currentFolderChildren.indexOf(currentNode[0].id);\r\n let nextNodeIndex = currentNodeIndex + 1;\r\n let nextNode = nextNodeIndex < currentFolderChildren.length ? tree.data[`${scopeId}_${currentFolderChildren[nextNodeIndex]}`] : null;\r\n\r\n while (nextNode && nextNode.isHidden) {\r\n nextNodeIndex++;\r\n nextNode = nextNodeIndex < currentFolderChildren.length ? tree.data[`${scopeId}_${currentFolderChildren[nextNodeIndex]}`] : null;\r\n }\r\n\r\n currentNode = nextNode ? [nextNode] : null;\r\n }\r\n } else {\r\n if (currentNode && currentNode[0]?.isHidden) {\r\n const currentFolderChildren = tree.data[scopeId].children;\r\n const currentNodeIndex = currentFolderChildren.indexOf(currentNode[0].id);\r\n let previousNodeIndex = currentNodeIndex - 1;\r\n let previousNode = previousNodeIndex >= 0 ? tree.data[`${scopeId}_${currentFolderChildren[previousNodeIndex]}`] : null;\r\n\r\n while (previousNode && previousNode.isHidden) {\r\n previousNodeIndex--;\r\n previousNode = previousNodeIndex >= 0 ? tree.data[`${scopeId}_${currentFolderChildren[previousNodeIndex]}`] : null;\r\n }\r\n\r\n currentNode = previousNode ? [previousNode] : null;\r\n }\r\n }\r\n }\r\n } else {\r\n currentNode = Object.values(tree.data).filter(n => n.type === 'link' && typeof n.scope === 'object' && n.scope.status === 'current');\r\n }\r\n\r\n currentNode = currentNode ? currentNode[0] : null;\r\n\r\n if (currentNode && currentNode.key) {\r\n resolve({ documentKey: currentNode.key, documentId: currentNode.id, folderId: currentNode.parentId });\r\n } else {\r\n resolve(null);\r\n }\r\n } else {\r\n resolve(null);\r\n }\r\n });\r\n };\r\n\r\nexport const getStudentLastDocument =\r\n (scopeId = '') =>\r\n async (dispatch, getState) => {\r\n const { user, tree } = getState();\r\n const { activeAudience } = user;\r\n\r\n return new Promise(async resolve => {\r\n if (activeAudience && activeAudience.audienceId) {\r\n let lastNode = null;\r\n\r\n if (scopeId) {\r\n lastNode = Object.values(tree.data).filter(n => n.type === 'link' && typeof n.scope === 'object' && n.scope.status !== 'disabled' && n.parentId === scopeId);\r\n } else {\r\n lastNode = Object.values(tree.data).filter(n => n.type === 'link' && typeof n.scope === 'object' && n.scope.status !== 'disabled');\r\n }\r\n\r\n lastNode = lastNode && lastNode.length > 0 ? lastNode[lastNode.length - 1] : null;\r\n\r\n if (lastNode && lastNode.key) {\r\n resolve({ documentKey: lastNode.key, documentId: lastNode.id, folderId: lastNode.parentId });\r\n } else {\r\n resolve(null);\r\n }\r\n } else {\r\n resolve(null);\r\n }\r\n });\r\n };\r\n\r\nexport const getUserStateByNodes = (user, nodeIds) => async (dispatch, getState) => {\r\n const { userId, activeAudience } = user;\r\n const { product } = getState();\r\n const { isAdaptiveEnabled } = product.config;\r\n\r\n return new Promise(async resolve => {\r\n if (isAdaptiveEnabled && activeAudience && activeAudience.audienceId) {\r\n const studentState = await fetchStudentStateByNodes(\r\n userId,\r\n activeAudience.audienceId,\r\n nodeIds.map(id => id.replace('_', ':'))\r\n );\r\n\r\n dispatch(fetchStudentStateSuccess(studentState));\r\n\r\n resolve(true);\r\n } else {\r\n resolve(false);\r\n }\r\n });\r\n};\r\n\r\nexport const getStudentsStateByType = nodeType => async (dispatch, getState) => {\r\n const { user } = getState();\r\n const { activeAudience, students } = user;\r\n const { product } = getState();\r\n const { isAdaptiveEnabled } = product.config;\r\n\r\n return new Promise(async resolve => {\r\n if (isAdaptiveEnabled && activeAudience && activeAudience.audienceId) {\r\n const studentIds = Object.keys(students);\r\n const studentsState = await fetchStudentsStateByType(activeAudience.audienceId, studentIds, nodeType);\r\n const scopes = buildStudentStateMapForTeacher(studentsState, studentIds.length);\r\n\r\n dispatch(fetchStudentStateSuccess(scopes));\r\n resolve(true);\r\n } else {\r\n resolve(false);\r\n }\r\n });\r\n};\r\n\r\nexport const updateDocumentEvaluations = (documentId, isFix) => async (dispatch, getState) => {\r\n const { user, tree } = getState();\r\n const { userId, activeAudience } = user;\r\n\r\n return new Promise(async resolve => {\r\n if (documentId && userId && activeAudience) {\r\n documentId = documentId.replace('_', ':');\r\n const documentKey = documentId.replace(':', '_');\r\n const documentNode = Object.values(tree.data).filter(\r\n n => n.key === documentKey && typeof n.scope === 'object' && (n.scope.status.toLowerCase() === 'done' || n.scope.status.toLowerCase() === 'skipped')\r\n )[0];\r\n\r\n if (documentNode) {\r\n const enforceCalculation = isFix ? 'Always' : 'WhenMissing';\r\n const evaluations = await fetchEvaluationForNodes(activeAudience.audienceId, userId, [documentId], enforceCalculation);\r\n const documentEvaluation = evaluations.filter(evaluation => evaluation.nodeType === 'Document');\r\n const documentScopeWithEvaluations = Object.assign({}, documentNode.scope);\r\n //const documentScopeWithEvaluations = { ...documentNode.scope };\r\n\r\n documentEvaluation.forEach(evaluation => {\r\n if (evaluation.value >= 0) {\r\n documentScopeWithEvaluations.evaluations = documentScopeWithEvaluations.evaluations || {};\r\n documentScopeWithEvaluations.evaluations[evaluation.methodName] = evaluation.value;\r\n }\r\n });\r\n\r\n if (documentScopeWithEvaluations.evaluations) {\r\n const state = {};\r\n state[documentKey] = documentScopeWithEvaluations;\r\n dispatch(fetchStudentStateSuccess(state));\r\n }\r\n }\r\n\r\n resolve(true);\r\n } else {\r\n resolve(false);\r\n }\r\n });\r\n};\r\n\r\nexport const updateNodeEvaluations = (key, evaluations) => ({\r\n type: LOAD_NODE_EVALUTAIONS_SUCCESS,\r\n key,\r\n evaluations\r\n});\r\n\r\nexport const updateDocumentsNumOfPages = () => async (dispatch, getState) => {\r\n const { user } = getState();\r\n const { activeAudience } = user;\r\n\r\n return new Promise(async resolve => {\r\n if (activeAudience && activeAudience.audienceId) {\r\n const documentsNumOfPages = await fetchDocumentsNumOfSections(activeAudience.audienceId);\r\n\r\n dispatch({\r\n type: LOAD_DOCUMENTS_NUM_OF_SECTIONS,\r\n documentsNumOfPages\r\n });\r\n resolve(true);\r\n } else {\r\n resolve(false);\r\n }\r\n });\r\n};\r\n","export const compare = (a, b) => {\r\n if (a > b) return +1;\r\n if (a < b) return -1;\r\n return 0;\r\n};\r\n\r\nexport const roundDown = (n, v) => {\r\n return Math.floor(n / v) * v;\r\n};\r\n\r\nexport const getNumberAsDoubleFigure = n => {\r\n if(!n) return '00'\r\n return n < 10 && n.toString().length < 2 ? '0' + n : n;\r\n};\r\n\r\nexport const getElementFontSize = el => {\r\n const style = window.getComputedStyle(el, null).getPropertyValue('font-size');\r\n const fontSize = parseFloat(style);\r\n return fontSize;\r\n};\r\n\r\nexport const calcJewishYear = civilYear => {\r\n civilYear = Number(civilYear) - 1240;\r\n const letters = {\r\n 1: 'א',\r\n 2: 'ב',\r\n 3: 'ג',\r\n 4: 'ד',\r\n 5: 'ה',\r\n 6: 'ו',\r\n 7: 'ז',\r\n 8: 'ח',\r\n 9: 'ט',\r\n 10: 'י',\r\n 20: 'כ',\r\n 30: 'ל',\r\n 40: 'מ',\r\n 50: 'נ',\r\n 60: 'ס',\r\n 70: 'ע',\r\n 80: 'פ',\r\n 90: 'צ',\r\n 100: 'ק',\r\n 200: 'ר',\r\n 300: 'ש',\r\n 400: 'ת'\r\n };\r\n\r\n let units, dozens, hundreds, rest;\r\n units = civilYear % 10;\r\n civilYear -= units;\r\n dozens = civilYear % 100;\r\n civilYear -= dozens;\r\n hundreds = civilYear % 400;\r\n civilYear -= hundreds;\r\n rest = civilYear / 400;\r\n let result = '';\r\n\r\n for (let i = 0; i < rest; i++) {\r\n if (!hundreds && i === rest - 1) {\r\n result += '\"';\r\n }\r\n result += 'ת';\r\n }\r\n\r\n if (hundreds) {\r\n if (!dozens) {\r\n result += '\"';\r\n }\r\n result += letters[hundreds];\r\n }\r\n\r\n if (dozens) {\r\n if (!units) {\r\n result += '\"';\r\n }\r\n result += letters[dozens];\r\n }\r\n\r\n if (units) {\r\n result += '\"';\r\n result += letters[units];\r\n }\r\n\r\n return result;\r\n};\r\n\r\nexport const getWeekNumber = date => {\r\n const utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()));\r\n const dayNum = utcDate.getUTCDay() + 1; //keep sunday 1\r\n\r\n utcDate.setUTCDate(utcDate.getUTCDate() + 4 - dayNum);\r\n const yearStart = new Date(Date.UTC(utcDate.getUTCFullYear(), 0, 1));\r\n return Math.ceil(((utcDate - yearStart) / 86400000 + 1) / 7);\r\n};\r\n","import { fetchProductConfig, fetchProductI18n } from '../product/actions';\r\nimport { setWaitingForLoading, setWaitingForLogout } from '../lo/actions';\r\nimport { setUserData, setActiveAudience, getLastVisit, getUserTasks, getAudienceStudents } from '../user/actions';\r\nimport { initSSO } from '../user/sso';\r\nimport { setEnvironmentId, setIsStudentPreview, isAnyActiveAudience, setAudienceId } from '../user/services';\r\nimport { loadTree, createDefaultTreeState } from '../tree/data/actions';\r\nimport { getStudentsStateByType } from '../tree/learningSystem/actions';\r\nimport { fetchStateForMultipleFolders } from '../tree/lms/actions';\r\nimport { fetchStudentState, updateDocumentsNumOfPages } from '../tree/learningSystem/actions';\r\nimport { saveEditedItem } from '../creator/actions';\r\nimport { showAlertMessage, showModalMessage, resetView, AlertType, ModalType } from '../ui/actions';\r\nimport { SectionNames, setAccessibilityFocus } from '../accessibility/actions';\r\nimport { extractDataFromURL } from './services';\r\nimport { isRemovedNode } from '../tree/data/services';\r\nimport { gotoHomePage } from '../utilities/routes';\r\nimport { GoogleAnalytics } from '../utilities/googleAnalytics';\r\nimport CetEvents from '../utilities/cetEvents';\r\nimport { Cache } from '../utilities/cache';\r\nimport { LOGIN_MODAL_KEY } from '../../PC/settings';\r\n\r\nexport const initApp = options => async (dispatch, getState) => {\r\n const defaultOptions = {\r\n onUserChange: () => {}\r\n };\r\n options = { ...defaultOptions, ...options };\r\n\r\n const urlData = extractDataFromURL();\r\n\r\n // In case of studentPreview query param - save it in cache and remove from URL\r\n if (urlData.isStudentPreview) {\r\n setIsStudentPreview(urlData.productName);\r\n window.history.replaceState({}, '', `/${urlData.pathName}`);\r\n window.location.reload();\r\n }\r\n\r\n let envRedirectUrl = `/${urlData.pathName}`;\r\n let shouldRedirect = false;\r\n\r\n // In case of \"showtaskmanager\" query param - build URL according to user device and redirect if needed\r\n if (urlData.taskManagerNodeKey && urlData.folderId && urlData.documentId) {\r\n const isMobileView = window.TOC_DEVICE_TYPE === 'MOBILE';\r\n\r\n if (isMobileView) {\r\n shouldRedirect = true;\r\n envRedirectUrl = `/${urlData.productName}/${urlData.folderId}${`?showtaskmanager=${urlData.documentId}`}`;\r\n } else if (!isMobileView) {\r\n envRedirectUrl = `/${urlData.pathName}?showtaskmanager=${urlData.documentId}`;\r\n }\r\n }\r\n\r\n // In case of environmentId query param - save it in cache and remove from URL\r\n if (urlData.environmentId) {\r\n setEnvironmentId(urlData.productName, urlData.environmentId);\r\n window.history.replaceState({}, '', envRedirectUrl);\r\n window.location.reload();\r\n }\r\n\r\n // PATCH only for myofek (hopefully till they will use environmentId correctly)\r\n // In case of audienceId query param - save it in cache and remove from URL\r\n if (urlData.audienceId) {\r\n setAudienceId(urlData.productName, urlData.audienceId);\r\n window.history.replaceState({}, '', envRedirectUrl);\r\n window.location.reload();\r\n }\r\n\r\n if (shouldRedirect) {\r\n window.history.replaceState({}, '', envRedirectUrl);\r\n window.location.reload();\r\n }\r\n\r\n const config = await dispatch(fetchProductConfig(urlData.productName));\r\n\r\n const onLogout = () => {\r\n const { lo } = getState();\r\n if (lo.connection && Object.keys(lo.connection).length) {\r\n dispatch(setWaitingForLogout());\r\n } else {\r\n gotoHomePage(config.productLocalName);\r\n }\r\n };\r\n\r\n const onLoginReady = () => {\r\n if (isSsoInitialized) {\r\n if (!options.preventReload) {\r\n window.location.reload();\r\n }\r\n }\r\n };\r\n\r\n const onSchoolUpdate = options.preventReload\r\n ? async () => {\r\n const user = await window.cet.accessmanagement.getSessionAsync(); //window.cet.uiServices.authentication.getLoggedUser();\r\n //console.log('onSchoolUpdate', user);\r\n await dispatch(onUserDataChanged(user, urlData.nodeKey, options));\r\n }\r\n : null;\r\n\r\n let isSsoInitialized = false;\r\n const user = await initSSO();\r\n document.addEventListener('cet.accessmanagement.logout', onLogout);\r\n document.addEventListener('cet.accessmanagement.login', onLoginReady);\r\n document.addEventListener('cet.accessmanagement.sessionchange', onSchoolUpdate);\r\n\r\n // Prevent circular reload onLoginReady (on every page load)\r\n setTimeout(() => {\r\n isSsoInitialized = true;\r\n }, 1000);\r\n\r\n await dispatch(onUserDataChanged(user, urlData.nodeKey, options));\r\n await dispatch(fetchProductI18n(config.constsLanguage));\r\n\r\n const { ui } = getState();\r\n if (!config.isMobileEnabled && !ui.alertType) {\r\n dispatch(showAlertMessage(AlertType.NOT_MOBILE_ADAPTED));\r\n }\r\n\r\n if (urlData.documentId) {\r\n dispatch(setAccessibilityFocus(SectionNames.LO_IFRAME));\r\n } else if (urlData.folderId) {\r\n dispatch(setAccessibilityFocus(SectionNames.TOC_TREE_ITEM, urlData.folderId));\r\n }\r\n\r\n document.getElementById('root').dataset.applicationdir = config.direction;\r\n\r\n const campaignDataStr = Cache.get('campaignData', Cache.method.sessionStorage);\r\n\r\n if (campaignDataStr) {\r\n const campaignData = JSON.parse(campaignDataStr);\r\n GoogleAnalytics.setCampaignData(campaignData);\r\n }\r\n\r\n GoogleAnalytics.setProductId(config.productId);\r\n GoogleAnalytics.init({ id: config.googleAnalytics, name: config.productLocalName });\r\n CetEvents.init(user, config);\r\n\r\n if (user) {\r\n if (user.isAuthorized) {\r\n if (user.role !== 'admin' && user.role !== 'coordinator' && user.role !== 'teacher' && user.role !== 'student') {\r\n dispatch(showLoginModal(LOGIN_MODAL_KEY, ModalType.NO_SCHOOL));\r\n } else if (user.role === 'teacher' || user.role === 'coordinator') {\r\n if (config.isTeacherEditAudienceEnable) {\r\n if (user.groups?.length === 0) {\r\n dispatch(showLoginModal(LOGIN_MODAL_KEY, ModalType.NO_CLASSES_AND_GROUPS));\r\n } else if (config.isEnvironmentRequired) {\r\n if (!isAnyActiveAudience(user)) {\r\n dispatch(showLoginModal(LOGIN_MODAL_KEY, ModalType.NO_ENVIRONMENTS));\r\n } else {\r\n GoogleAnalytics.sendManagerEvent('ActiveEnvironmentLoaded');\r\n }\r\n }\r\n }\r\n } else if (user.role === 'student' && config.isEnvironmentRequired) {\r\n if (user?.isAuthorized && !isAnyActiveAudience(user)) {\r\n dispatch(showLoginModal(LOGIN_MODAL_KEY, ModalType.NO_ENVIRONMENTS));\r\n }\r\n }\r\n } else {\r\n dispatch(showLoginModal(LOGIN_MODAL_KEY, ModalType.NO_SUBSCRIPTION));\r\n }\r\n } else {\r\n Cache.remove(LOGIN_MODAL_KEY);\r\n }\r\n\r\n return {\r\n config,\r\n user: getState().user,\r\n tree: getState().tree,\r\n nodeKey: urlData.nodeKey,\r\n taskManagerNodeKey: urlData.taskManagerNodeKey\r\n };\r\n};\r\n\r\nconst onUserDataChanged = (userData, nodeKey, options) => async (dispatch, getState) => {\r\n const { userId, schoolId } = getState().user;\r\n const { config } = getState().product;\r\n\r\n if (!userData || userId !== userData.userId || schoolId !== userData.schoolId) {\r\n await dispatch(setUserData(userData));\r\n await dispatch(updateEnvironment(nodeKey));\r\n\r\n userData = getState().user;\r\n\r\n const { tree } = getState();\r\n\r\n options.onUserChange({\r\n config,\r\n userData,\r\n tree,\r\n folderId: nodeKey\r\n });\r\n }\r\n\r\n // Send user role to Google Analytics (GA)\r\n if (userData) {\r\n CetEvents.setUser(userData);\r\n GoogleAnalytics.setUserData(userData.role, userData.userId, userData.schoolSign);\r\n\r\n if (userData.activeAudience && !window.IS_OLAMON) {\r\n dispatch(getLastVisit(getState().product.config.productId, userData.userId, getState().user.activeAudience.audienceId));\r\n }\r\n } else {\r\n GoogleAnalytics.setUserData('guest');\r\n }\r\n};\r\n\r\nconst showLoginModal = (key, modalType) => async (dispatch, getState) => {\r\n if (Cache.get(key, Cache.method.sessionStorage) !== modalType) {\r\n Cache.set(key, modalType, Cache.method.sessionStorage);\r\n dispatch(showModalMessage(modalType));\r\n }\r\n};\r\n\r\nconst UPDATE_STATE_TIMEOUT_INTERVAL = 3 * 60 * 1000; //3 min\r\nlet updateStateTimeout;\r\n\r\nexport const updateEnvironment =\r\n (nodeKey = '', audienceId = '') =>\r\n async (dispatch, getState) => {\r\n const config = getState().product.config;\r\n const user = getState().user;\r\n\r\n window.clearTimeout(updateStateTimeout);\r\n await dispatch(setWaitingForLoading(true));\r\n\r\n const isAdminUser = user && user.role === 'admin';\r\n\r\n nodeKey = nodeKey || config.rootDocumentId;\r\n\r\n let activeAudience = null;\r\n\r\n if (user && user.isLoggedIn && user.isAuthorized && !isAdminUser) {\r\n activeAudience = await dispatch(setActiveAudience(audienceId));\r\n user.activeAudience = activeAudience;\r\n if (activeAudience) {\r\n await window.environment.init({\r\n environmentId: activeAudience.id,\r\n language: config.loLanguage,\r\n rootFolderId: config.rootDocumentId,\r\n ...window.tocGlobalEndpoints,\r\n onEditItemSave: itemId => {\r\n dispatch(saveEditedItem(itemId));\r\n GoogleAnalytics.sendEvent('Creator', 'edit', 'Studio');\r\n },\r\n onItemCreatedSave: itemId => {\r\n dispatch(saveEditedItem(itemId, true));\r\n GoogleAnalytics.sendEvent('Creator', 'add', 'Studio');\r\n }\r\n });\r\n }\r\n }\r\n\r\n await dispatch(loadTree(config.rootDocumentId, activeAudience ? activeAudience.id : '', config.loLanguage));\r\n\r\n if (activeAudience) {\r\n // In case of new/empty environment - init it with default tree state\r\n if ((user.role === 'teacher' || user.role === 'coordinator') && !window.environment.hasAnyChanges() && config.defaultTreeState) {\r\n await dispatch(createDefaultTreeState(config.defaultTreeState));\r\n }\r\n\r\n dispatch(getUserTasks());\r\n if (config.learningApplicationId) {\r\n if (user.role === 'student') {\r\n await dispatch(updateDocumentsNumOfPages());\r\n await dispatch(fetchStudentState(config, user));\r\n } else if (user.role === 'teacher' || user.role === 'coordinator') {\r\n await dispatch(getAudienceStudents(activeAudience.audienceId));\r\n dispatch(getStudentsStateByType('Document'));\r\n\r\n updateStateTimeout = setTimeout(() => {\r\n dispatch(getStudentsStateByType('Document'));\r\n }, UPDATE_STATE_TIMEOUT_INTERVAL);\r\n }\r\n } else if (window.IS_OLAMON) {\r\n const { olamonim } = getState();\r\n const lmsFolders = olamonim?.settings?.site?.lmsFolders || [];\r\n await dispatch(fetchStateForMultipleFolders(lmsFolders));\r\n }\r\n }\r\n\r\n const { tree } = getState();\r\n const node = tree.data[nodeKey];\r\n\r\n if ((!node || isRemovedNode(node, user)) && nodeKey !== 'key-not-valid') {\r\n dispatch(resetView());\r\n if (config.isAdaptiveEnabled && node && node.isHidden && !node.isDeleted) {\r\n dispatch(showAlertMessage(AlertType.DISABLED_NODE));\r\n } else {\r\n dispatch(showAlertMessage(AlertType.NODE_NOT_FOUND));\r\n }\r\n } else if (config.engineType && node && node.scope === 'disabled') {\r\n window.location.href = `/${config.productLocalName}`;\r\n } else if (user && user.isLoggedIn && !isAdminUser) {\r\n const { folders } = getState();\r\n if (folders) {\r\n dispatch(fetchStateForMultipleFolders(folders.openFolders));\r\n } else if (node && node.id !== config.rootDocumentId) {\r\n if (node.type === 'folder') {\r\n dispatch(fetchStateForMultipleFolders([node.id]));\r\n } else {\r\n dispatch(fetchStateForMultipleFolders([node.parentId]));\r\n }\r\n }\r\n }\r\n\r\n if (activeAudience && new Date(activeAudience.from) > new Date()) {\r\n dispatch(showModalMessage(ModalType.FUTURE_ENVIRONMENT));\r\n }\r\n\r\n await dispatch(setWaitingForLoading(false));\r\n };\r\n","export const LOGIN_MODAL_KEY = 'LOGIN_MODAL_KEY';","export const treeTaskFilterTypes = {\r\n none: 'none',\r\n activeTasks: 'active-tasks',\r\n allTasks: 'all-tasks',\r\n examTasks: 'exam-tasks',\r\n immediateTasks: 'immediate-tasks',\r\n overdueTasks: 'overdue-tasks',\r\n moreTasks: 'more-tasks',\r\n myCourse: 'my-course',\r\n myTasks: 'my-tasks',\r\n myGrades: 'my-grades',\r\n evaluatedTasks: 'evaluatedTasks'\r\n};\r\n","export const goBack = (history, productName) => {\r\n const searchParams = new URLSearchParams(history.location.search);\r\n const returnToPath = searchParams.get('returnToPath');\r\n\r\n if (returnToPath) {\r\n history.push(`/${productName}/${returnToPath}`);\r\n } else if (window.history.state) {\r\n history.goBack();\r\n } else {\r\n history.push(`/${productName}`);\r\n }\r\n};\r\n\r\nexport const gotoHomePage = productName => {\r\n window.location.href = `/${productName}`;\r\n};\r\n\r\nexport const getLoUrl = (config, loId, audienceId) => {\r\n const isCyberSquad = config.productLocalName.toLowerCase() === 'cybersquad' || config.productLocalName.toLowerCase() === 'cybersquad-he';\r\n return `${window.location.origin}/${config.productLocalName}${isCyberSquad ? '/mission' : ''}/${loId}?audience=${audienceId}`;\r\n};\r\n","import PropTypes from 'prop-types';\r\n\r\nexport const animationFrames = (props, propName, componentName) => {\r\n if (\r\n !Array.isArray(props[propName]) ||\r\n props[propName].length !== 2 ||\r\n !props[propName].every((n) => typeof n === 'number')\r\n ) {\r\n return new Error(\r\n 'Invalid prop `' +\r\n propName +\r\n '` supplied to' +\r\n ' `' +\r\n componentName +\r\n '`. Validation failed. Please pass an array of 2 numbers'\r\n );\r\n }\r\n};\r\n\r\nexport const eventHandlerModel = PropTypes.oneOfType([PropTypes.shape({\r\n action: PropTypes.string.isRequired,\r\n data: PropTypes.object,\r\n}), PropTypes.array, PropTypes.func]);\r\n\r\n\r\nexport const innerImage = PropTypes.shape({ src: PropTypes.string.isRequired, alt: PropTypes.string.isRequired })\r\n\r\nexport const animationModel = PropTypes.shape({\r\n path: PropTypes.string.isRequired,\r\n width: PropTypes.string,\r\n height: PropTypes.string,\r\n frames: PropTypes.object,\r\n framesId: PropTypes.string,\r\n framesRange: PropTypes.array,\r\n loop: PropTypes.oneOfType([PropTypes.bool, PropTypes.number]).isRequired,\r\n autoplay: PropTypes.bool.isRequired,\r\n isStopped: PropTypes.bool,\r\n isPausedWhenLoaded: PropTypes.bool,\r\n isLastAnimation: PropTypes.bool,\r\n isStartAfterPreloader: PropTypes.bool,\r\n events: PropTypes.shape({\r\n onLoad: eventHandlerModel,\r\n onStart: eventHandlerModel,\r\n onComplete: eventHandlerModel,\r\n onLastComplete: eventHandlerModel\r\n })\r\n});\r\n","export const buildGotoParams = (userRole, treeData, documentId, pageId = null, enableDocumentsNavigation = false) => {\r\n const document = treeData && documentId ? treeData[documentId] : null;\r\n const isAdaptive = document?.parentId ? Boolean(treeData[document.parentId]?.isAdaptive) : false;\r\n\r\n if (document && isAdaptive) { // Adaptive mode\r\n if (userRole === 'student' && typeof document.scope === 'object') {\r\n const gotoParams = { ...document.scope, state: { pages: {}, prevPage: null, nextPage: null } };\r\n\r\n if (document.scope.state) {\r\n const pagesKeys = [];\r\n\r\n if (typeof document.scope.state.pages === 'object') {\r\n Object.keys(document.scope.state.pages).forEach(key => {\r\n if (document.scope.state.pages[key] !== 'disabled') {\r\n pagesKeys.push(key);\r\n }\r\n });\r\n }\r\n\r\n const folderId = document.parentId;\r\n const isFolderDone = folderId && treeData[folderId].scope === 'done';\r\n gotoParams.state.isFolderDone = isFolderDone;\r\n gotoParams.state.pages = { ...document.scope.state.pages };\r\n\r\n if (pageId === 'first-page') {\r\n gotoParams.pageId = pagesKeys.length > 0 ? pagesKeys[0] : '';\r\n } else if (pageId === 'last-page') {\r\n gotoParams.pageId = pagesKeys.length > 0 ? pagesKeys[pagesKeys.length - 1] : '';\r\n } else if (pageId && document.scope.state.pages && ['current', 'done', 'skipped'].includes(document.scope.state.pages[pageId])) {\r\n gotoParams.pageId = pageId;\r\n } else if (window.location.hash && window.location.hash.includes('page=')) {\r\n const urlPageId = window.location.hash.split('page=')[1];\r\n\r\n if (urlPageId && document.scope.state.pages && ['current', 'done', 'skipped'].includes(document.scope.state.pages[urlPageId])) {\r\n gotoParams.pageId = urlPageId;\r\n } else {\r\n // Invalid URL page request -> use last valid page\r\n gotoParams.pageId = pagesKeys.length > 0 ? pagesKeys[pagesKeys.length - 1] : '';\r\n }\r\n } else if (!gotoParams.pageId && document.scope.status === 'done') {\r\n gotoParams.pageId = pagesKeys.length > 0 ? pagesKeys[0] : '';\r\n }\r\n\r\n gotoParams.state.prevPage = findPreviousPage(treeData, document, gotoParams.pageId);\r\n gotoParams.state.nextPage = findNextPage(treeData, document, gotoParams.pageId);\r\n }\r\n\r\n return gotoParams;\r\n } else if (userRole === 'teacher') { // Teacher \"viewAsStudent\" mode\r\n const gotoParams = { pageId: pageId || 'first-page', status: 'current', state: { } };\r\n\r\n gotoParams.state.isFolderDone = false; // true only if last page in folder\r\n gotoParams.state.pages = { page1: 'current' };\r\n gotoParams.state.prevPage = null;\r\n gotoParams.state.nextPage = null;\r\n\r\n return gotoParams;\r\n }\r\n } else if (document) { // Non-Adaptive mode\r\n const gotoParams = { pageId, state: { prevPage: null, nextPage: null } };\r\n\r\n if (enableDocumentsNavigation) {\r\n gotoParams.state.prevPage = findPreviousDocument(treeData, document);\r\n gotoParams.state.nextPage = findNextDocument(treeData, document);\r\n }\r\n\r\n return gotoParams;\r\n }\r\n\r\n return null;\r\n};\r\n\r\nexport const findPreviousPage = (treeData, document, pageId, includeSkippedPages = false) => {\r\n if (treeData && document && pageId) {\r\n const folderId = document.parentId;\r\n\r\n let currentDocument = document;\r\n let currentPageId = pageId;\r\n\r\n while (currentPageId && currentDocument && currentDocument.scope && currentDocument.scope.state && currentDocument.scope.state.pages) {\r\n const isSkippedDocument = currentDocument.scope === 'skipped' || currentDocument.scope.status === 'skipped';\r\n const pagesKeys = typeof currentDocument.scope.state.pages === 'object' ? Object.keys(currentDocument.scope.state.pages) : [];\r\n const currentPageIndex = pagesKeys.indexOf(currentPageId);\r\n\r\n if (currentPageIndex > 0) {\r\n currentPageId = pagesKeys[currentPageIndex - 1];\r\n } else if (currentPageIndex === 0 || isSkippedDocument) {\r\n const documentIndexInParent = treeData[folderId].children.indexOf(currentDocument.id);\r\n\r\n if (documentIndexInParent > 0) {\r\n const prevDocumentId = treeData[folderId].children[documentIndexInParent - 1];\r\n currentDocument = treeData[folderId + '_' + prevDocumentId];\r\n currentPageId = null;\r\n\r\n if (currentDocument && currentDocument.scope && currentDocument.scope.state && typeof currentDocument.scope.state.pages === 'object') {\r\n const prevDocumentPages = Object.keys(currentDocument.scope.state.pages);\r\n currentPageId = prevDocumentPages.length > 0 ? prevDocumentPages[prevDocumentPages.length - 1] : null;\r\n }\r\n } else {\r\n // No more previous pages in folder\r\n break;\r\n }\r\n } else {\r\n break;\r\n }\r\n\r\n if (currentPageId && (includeSkippedPages || currentDocument.scope.state.pages[currentPageId] !== 'skipped')) {\r\n return { folderId, documentId: currentDocument.id, pageId: currentPageId, taskId: currentDocument.lms?.TaskId, versions: currentDocument.scope.versions };\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n};\r\n\r\nexport const findNextPage = (treeData, document, pageId, includeSkippedPages = false) => {\r\n if (treeData && document && pageId) {\r\n const relevantPagesStatus = ['current', 'done'].concat(includeSkippedPages ? ['skipped'] : []);\r\n const folderId = document.parentId;\r\n\r\n let currentDocument = document;\r\n let currentPageId = pageId;\r\n\r\n while (currentPageId && currentDocument && currentDocument.scope && currentDocument.scope.state && currentDocument.scope.state.pages) {\r\n if (!relevantPagesStatus.includes(currentDocument.scope.state.pages[currentPageId])) {\r\n break; // When reach to \"current\" page or disabled page -> there is no next page\r\n }\r\n\r\n const isSkippedDocument = currentDocument.scope === 'skipped' || currentDocument.scope.status === 'skipped';\r\n const pagesKeys = typeof currentDocument.scope.state.pages === 'object' ? Object.keys(currentDocument.scope.state.pages) : [];\r\n const currentPageIndex = pagesKeys.indexOf(currentPageId);\r\n\r\n if (currentPageIndex < pagesKeys.length - 1) {\r\n currentPageId = pagesKeys[currentPageIndex + 1];\r\n } else if (currentPageIndex === pagesKeys.length - 1 || isSkippedDocument) {\r\n const documentIndexInParent = treeData[folderId].children.indexOf(currentDocument.id);\r\n\r\n if (documentIndexInParent + 1 < treeData[folderId].children.length) {\r\n const nextDocumentId = treeData[folderId].children[documentIndexInParent + 1];\r\n currentDocument = treeData[folderId + '_' + nextDocumentId];\r\n currentPageId = null;\r\n\r\n if (currentDocument && currentDocument.scope && currentDocument.scope.state && typeof currentDocument.scope.state.pages === 'object') {\r\n const nextDocumentPages = Object.keys(currentDocument.scope.state.pages);\r\n currentPageId = nextDocumentPages.length > 0 ? nextDocumentPages[0] : null;\r\n }\r\n } else {\r\n // No more next pages in folder\r\n break;\r\n }\r\n } else {\r\n break;\r\n }\r\n\r\n if (currentPageId && relevantPagesStatus.includes(currentDocument.scope.state.pages[currentPageId])) {\r\n return { folderId, documentId: currentDocument.id, pageId: currentPageId, taskId: currentDocument.lms?.TaskId, versions: currentDocument.scope.versions };\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n};\r\n\r\nexport const findPreviousDocument = (treeData, document) => {\r\n if (treeData && document) {\r\n const folderId = document.parentId;\r\n const folderChildren = folderId && treeData[folderId] ? treeData[folderId].children : null;\r\n const documentIndexInParent = folderChildren?.indexOf(document.id);\r\n\r\n if (documentIndexInParent > 0) {\r\n const prevDocument = treeData[`${folderId}_${folderChildren[documentIndexInParent - 1]}`];\r\n return { folderId, documentId: prevDocument.id, pageId: 'last-page', taskId: prevDocument.lms?.TaskId };\r\n }\r\n }\r\n\r\n return null;\r\n};\r\n\r\nexport const findNextDocument = (treeData, document) => {\r\n if (treeData && document) {\r\n const folderId = document.parentId;\r\n const folderChildren = folderId && treeData[folderId] ? treeData[folderId].children : null;\r\n const documentIndexInParent = folderChildren?.indexOf(document.id);\r\n\r\n if (0 <= documentIndexInParent && documentIndexInParent + 1 < folderChildren.length) {\r\n const nextDocument = treeData[`${folderId}_${folderChildren[documentIndexInParent + 1]}`];\r\n return { folderId, documentId: nextDocument.id, pageId: 'first-page', taskId: nextDocument.lms?.TaskId };\r\n }\r\n }\r\n\r\n return null;\r\n};\r\n","import { RESET_DOCUMENT, LOAD_DOCUMENT, SET_WAITING_FOR_LOADING, SET_WAITING_FOR_LOGOUT } from './action-types';\r\nimport { createTaskOnTheFly } from '../tree/lms/services';\r\nimport { fetchStateForItem } from '../tree/lms/actions';\r\nimport { buildGotoParams } from './services';\r\nimport { getIsStudentPreview } from '../user/services';\r\n\r\nconst baseViewSettings = {\r\n childDocumentId: null,\r\n hideBar: false,\r\n hideCloseButton: true,\r\n hideLogo: false,\r\n hideCreateTaskButton: true,\r\n hideStudioButtons: true,\r\n hideViewAsMenu: false,\r\n showLoginButton: true,\r\n showLogoutButton: true,\r\n hideShareLinks: true,\r\n gotoParams: null\r\n};\r\n\r\nconst baseConnection = {\r\n documentId: null,\r\n languageId: 'he',\r\n taskId: null,\r\n siteKey: 'ebag'\r\n};\r\n\r\nexport const loadLoDocument = params => (dispatch, getState) => {\r\n const { product, tree, user, lo } = getState();\r\n\r\n let connection = {};\r\n let viewSettings = { ...lo.viewSettings, ...params.viewSettings };\r\n\r\n let document = params.documentId && tree && tree.data && tree.data[params.documentId];\r\n\r\n if (!document) {\r\n return new Promise(resolve => {\r\n resolve({ connection, viewSettings });\r\n });\r\n }\r\n\r\n return new Promise(async resolve => {\r\n viewSettings = {\r\n ...baseViewSettings,\r\n ...lo.viewSettings,\r\n audienceId: user && user.activeAudience ? user.activeAudience.audienceId : null,\r\n environmentId: user && user.activeAudience ? user.activeAudience.id : null,\r\n courseId: product.config.productId,\r\n rootDocumentId: product.config.rootDocumentId,\r\n lottieJsonURL: product.config.loPreloaderAnimation ? product.config.loPreloaderAnimation : null,\r\n hideStudioButtons: user && user.role === 'admin' ? false : true,\r\n hideCreateTaskButton:\r\n product.config.isTeacherEditAudienceEnable ||\r\n product.config.isAdminEditAudienceEnable ||\r\n (user && user.activeAudience) ||\r\n document.isAdaptive ||\r\n (document.canBeAssigned ? !document.canBeAssigned : document.noCheck) ||\r\n document.type === 'folder'\r\n ? true\r\n : false,\r\n uiType: 'default',\r\n tocMain: `//${window.location.hostname}${window.location.port ? ':' + window.location.port : ''}/${product.config.productLocalName}`,\r\n currentPage: window.location.hash && window.location.hash.split('page=')[1],\r\n ...params.viewSettings\r\n };\r\n\r\n if (document.type === 'folder') {\r\n if (document.leadingItem && document.leadingItem.id) {\r\n connection = {\r\n ...baseConnection,\r\n documentId: document.leadingItem.id,\r\n languageId: params.language\r\n };\r\n viewSettings.bodyBackgroundColor = '#222';\r\n } else {\r\n const parentsIds = document.parents.reverse();\r\n let parent = null;\r\n\r\n parentsIds.forEach(parentId => {\r\n const p = tree.data[parentId];\r\n\r\n if (p.leadingItem && p.leadingItem.id) parent = p;\r\n });\r\n\r\n if (parent) {\r\n connection = {\r\n ...baseConnection,\r\n documentId: parent.leadingItem.id,\r\n languageId: params.language\r\n };\r\n }\r\n }\r\n\r\n if (document.isAdaptive) {\r\n viewSettings.hideCreateTaskButton = true;\r\n viewSettings.hideShareLinks = true;\r\n }\r\n\r\n await dispatch({\r\n type: LOAD_DOCUMENT,\r\n parentId: document.parentId,\r\n connection,\r\n viewSettings\r\n });\r\n resolve({ connection, viewSettings });\r\n } else {\r\n const folder = tree.data[document.parentId];\r\n\r\n viewSettings.folderId = document.parentId;\r\n\r\n // No task\r\n if (!user.userId || !user.activeAudience || !user.activeAudience.id) {\r\n connection = {\r\n ...baseConnection,\r\n documentId: document.id,\r\n taskId: null,\r\n languageId: params.language\r\n };\r\n\r\n await dispatch({\r\n type: LOAD_DOCUMENT,\r\n parentId: document.parentId,\r\n connection,\r\n viewSettings\r\n });\r\n resolve({ connection, viewSettings });\r\n } else if ((user.role === 'teacher' || user.role === 'coordinator') && params.studentId && params.contextGroupId) {\r\n // Open as a task to check\r\n connection = {\r\n ...baseConnection,\r\n documentId: document.id,\r\n taskId: params.taskId,\r\n studentId: params.studentId,\r\n contextGroupId: params.contextGroupId,\r\n languageId: params.language,\r\n majorVersion: document.scope && document.scope.versions ? document.scope.versions.majorVersion : '',\r\n minorVersion: document.scope && document.scope.versions ? document.scope.versions.minorVersion : '',\r\n structureVersion: document.scope && document.scope.versions ? document.scope.versions.structureVersion : ''\r\n };\r\n\r\n await dispatch({\r\n type: LOAD_DOCUMENT,\r\n parentId: document.parentId,\r\n connection,\r\n viewSettings\r\n });\r\n resolve({ connection, viewSettings });\r\n } else {\r\n const isLoadingLms = document.lms === 'loading';\r\n let taskId = document.lms && document.lms.TaskId ? document.lms.TaskId : null;\r\n\r\n if (!isLoadingLms && !taskId && (folder.isAdaptive || document.itemType !== 'Exam')) {\r\n // In case of differential assignment (DA) task:\r\n // if user is not part of the task - redirect to home page\r\n const isDADisabled = tree.environmentTasks.some(item => item.ItemId === document.id && item.FolderId === document.parentId);\r\n\r\n if (isDADisabled) {\r\n window.location.href = `/${product.config.productLocalName}`;\r\n } else {\r\n // Need to create a new task\r\n const task = await createTaskOnTheFly(document, folder, user, product.config, params.taskOnTheFlyType);\r\n taskId = task ? task.TaskId : null;\r\n dispatch(fetchStateForItem(product.config, document, user));\r\n }\r\n }\r\n\r\n connection = {\r\n ...baseConnection,\r\n documentId: document.id,\r\n taskId,\r\n languageId: params.language,\r\n majorVersion: document.scope && document.scope.versions ? document.scope.versions.majorVersion : '',\r\n minorVersion: document.scope && document.scope.versions ? document.scope.versions.minorVersion : '',\r\n structureVersion: document.scope && document.scope.versions ? document.scope.versions.structureVersion : ''\r\n };\r\n\r\n if (product.config.loUiType && (user.role === 'student' || getIsStudentPreview(product.config.productLocalName))) {\r\n const enableDocumentsNavigation = Boolean(params.enableDocumentsNavigation || folder.isAdaptive);\r\n\r\n viewSettings.uiType = product.config.loUiType;\r\n viewSettings.gotoParams = buildGotoParams(user.role, tree.data, document.key, params.pageId || viewSettings?.gotoParams?.pageId, enableDocumentsNavigation);\r\n\r\n if (viewSettings.gotoParams && viewSettings.gotoParams.pageId && viewSettings.gotoParams.pageId !== viewSettings.currentPage && document.itemType !== 'Exam') {\r\n viewSettings.currentPage = viewSettings.gotoParams.pageId;\r\n }\r\n\r\n if (viewSettings.currentPage) {\r\n window.location.hash = `page=${viewSettings.currentPage}`;\r\n }\r\n }\r\n\r\n await dispatch({\r\n type: LOAD_DOCUMENT,\r\n parentId: document.parentId,\r\n connection,\r\n viewSettings\r\n });\r\n resolve({ connection, viewSettings });\r\n }\r\n }\r\n });\r\n};\r\n\r\nexport const resetDocument = (resetConnection = true) => ({\r\n type: RESET_DOCUMENT,\r\n resetConnection\r\n});\r\n\r\nexport const setWaitingForLogout = () => ({\r\n type: SET_WAITING_FOR_LOGOUT\r\n});\r\n\r\nexport const setWaitingForLoading = status => ({\r\n type: SET_WAITING_FOR_LOADING,\r\n status\r\n});\r\n","export const enumDocumentType = {\r\n folder: 0,\r\n item: 1\r\n};\r\n\r\nexport const enumNodeDropModes = {\r\n validationOff: 0,\r\n bothDisabled: 1,\r\n outerOnlyDisabled: 2,\r\n innerOnlyDisabled: 3\r\n};\r\n\r\nexport const emptyDocumentGuid = '00000000-0000-0000-0000-000000000000';\r\n\r\nexport const getEnvironmentSaveFnc = node => (node.type === 'folder' ? 'saveFolder' : 'saveItem');\r\n\r\nexport const getNodeDocumentType = node => {\r\n return (node.type === 'folder') ? enumDocumentType.folder : enumDocumentType.item;\r\n};\r\n\r\nexport function folderMovementRecursiveParentsUpdate(movedNode, newParentFolder, treeData) {\r\n const movedNodeClone = { ...movedNode };\r\n let treeDataClone = { ...treeData };\r\n\r\n movedNodeClone.parents = [...newParentFolder.parents, newParentFolder.id];\r\n\r\n if (movedNodeClone.type === 'link') {\r\n treeDataClone[movedNodeClone.key] = movedNodeClone;\r\n } else {\r\n movedNodeClone.children.forEach(childId => {\r\n const childNode = treeData[childId] ? treeData[childId] : treeData[`${movedNodeClone.id}_${childId}`];\r\n treeDataClone = folderMovementRecursiveParentsUpdate(childNode, movedNodeClone, treeDataClone);\r\n });\r\n }\r\n\r\n return treeDataClone;\r\n}\r\n\r\nexport const getFolderHasChildren = node => {\r\n return Boolean(node.children && node.children.length);\r\n};\r\n\r\nexport const getIsFirstChildIsFolder = (node, treeData) => {\r\n return Boolean(getFolderHasChildren(node) && treeData[node.children[0]]);\r\n};\r\n\r\nexport const getIsFirstChildIsDocument = (node, treeData) => {\r\n return Boolean(getFolderHasChildren(node) && treeData[`${node.id}_${node.children[0]}`]);\r\n};\r\n\r\n/*export const getLastVisibleNodeIndexInFolder = (folder, treeData) => {\r\n let lastVisibleNodeIndex = folder.children.length;\r\n let isFound = false;\r\n\r\n while (lastVisibleNodeIndex > 0 && !isFound) {\r\n lastVisibleNodeIndex -= 1;\r\n let curNode = getNodeByIdAndParent(folder.children[lastVisibleNodeIndex], folder.id, treeData);\r\n isFound = isVisibleNode(curNode);\r\n }\r\n\r\n return lastVisibleNodeIndex;\r\n};\r\n\r\nexport const getLastVisibleItemInFolder = (folder, treeData) => {\r\n if (!folder.children || !folder.children.length) return;\r\n\r\n const itemId = folder.children[getLastVisibleNodeIndexInFolder(folder, treeData)];\r\n\r\n return treeData[itemId] || treeData[`${folder.id}_${itemId}`];\r\n};*/\r\n\r\nexport const getNodePosition = (node, treeData) => {\r\n let { previousDocumentId, previousDocumentType, newParentFolderId } = node;\r\n\r\n if (!previousDocumentId) {\r\n previousDocumentId = emptyDocumentGuid;\r\n previousDocumentType = undefined;\r\n\r\n const folder = treeData[node.parentId];\r\n const prevChildIndex = folder.children.indexOf(node.id) - 1;\r\n\r\n if (prevChildIndex >= 0) {\r\n const prevId = folder.children[prevChildIndex];\r\n const prevNode = treeData[prevId] || treeData[`${folder.id}_${prevId}`];\r\n\r\n if (prevNode && prevNode.type === node.type) {\r\n previousDocumentId = prevNode.id;\r\n previousDocumentType = getNodeDocumentType(prevNode);\r\n }\r\n }\r\n }\r\n\r\n return {\r\n previousDocumentId,\r\n previousDocumentType,\r\n newParentFolderId\r\n };\r\n};\r\n\r\nexport const getNodeNewPosition = (sourceNode, nodeToReference, isReferenceNodeIsOpenFolder) => {\r\n let previousDocumentId, previousDocumentType, newParentFolderId;\r\n\r\n if (isReferenceNodeIsOpenFolder) {\r\n newParentFolderId = nodeToReference.id;\r\n } else {\r\n newParentFolderId = nodeToReference.newParentFolderId\r\n ? nodeToReference.newParentFolderId\r\n : nodeToReference.parentId;\r\n }\r\n\r\n if ((sourceNode.type === 'link' && nodeToReference.type === 'folder') || isReferenceNodeIsOpenFolder) {\r\n previousDocumentId = emptyDocumentGuid;\r\n previousDocumentType = undefined;\r\n } else {\r\n previousDocumentId = nodeToReference.id;\r\n previousDocumentType = getNodeDocumentType(nodeToReference);\r\n }\r\n\r\n return {\r\n previousDocumentId,\r\n previousDocumentType,\r\n newParentFolderId\r\n };\r\n};\r\n\r\nexport const getNodePointingToRefNode = (nodeToReference, treeData, isReferenceNodeIsOpenFolder) => {\r\n const folder =\r\n isReferenceNodeIsOpenFolder || !nodeToReference.parentId\r\n ? treeData[nodeToReference.id]\r\n : treeData[nodeToReference.parentId];\r\n if (folder && folder.children) {\r\n const pointingId = folder.children.filter(childId => {\r\n let child = treeData[childId] || treeData[`${folder.id}_${childId}`];\r\n\r\n if (child && child.id !== nodeToReference.id) {\r\n if (child.previousDocumentId === nodeToReference.id) {\r\n return true;\r\n }\r\n\r\n if (\r\n child.type === 'link' &&\r\n nodeToReference.type === 'folder' &&\r\n child.previousDocumentId === emptyDocumentGuid\r\n ) {\r\n return true;\r\n }\r\n\r\n if (child.type === 'folder' && isReferenceNodeIsOpenFolder && child.previousDocumentId === emptyDocumentGuid) {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n })[0];\r\n\r\n if (pointingId) {\r\n return treeData[pointingId] || treeData[`${folder.id}_${pointingId}`];\r\n }\r\n }\r\n return undefined;\r\n};\r\n\r\nexport const setNodePosition = (node, newNodePosition) => ({ ...node, ...newNodePosition });\r\n\r\nexport const getNodeChildIndex = (folder, sourceNodeType, previousDocumentId, treeData) => {\r\n let newIndex = folder.children.indexOf(previousDocumentId) + 1;\r\n if (newIndex <= 0) {\r\n if (sourceNodeType === 'link') {\r\n const numberOfFolders = folder.children.reduce((length, childId) => (treeData[childId] ? length + 1 : length), 0);\r\n newIndex = numberOfFolders;\r\n } else {\r\n newIndex = 0;\r\n }\r\n }\r\n\r\n return newIndex;\r\n};\r\n\r\nexport const getPrevNode = (node, treeData, openFolders) => {\r\n const { previousDocumentId } = node;\r\n let prevNode;\r\n\r\n if (!previousDocumentId || previousDocumentId === emptyDocumentGuid) {\r\n const folder = treeData[node.parentId];\r\n const prevChildIndex = folder.children.indexOf(node.id) - 1;\r\n if (prevChildIndex < 0) {\r\n if (openFolders.indexOf(folder.id) > -1) {\r\n prevNode = folder;\r\n } else {\r\n prevNode = {\r\n previousDocumentId: emptyDocumentGuid,\r\n previousDocumentType: undefined,\r\n parentId: node.parentId,\r\n parentFolderId: node.parentFolderId,\r\n newParentFolderId: node.newParentFolderId\r\n };\r\n }\r\n } else {\r\n const prevId = folder.children[prevChildIndex];\r\n prevNode = treeData[prevId] || treeData[`${folder.id}_${prevId}`];\r\n }\r\n } else {\r\n prevNode = treeData[previousDocumentId] || treeData[`${node.parentId}_${previousDocumentId}`];\r\n }\r\n\r\n return prevNode;\r\n};\r\n\r\nexport const getNextNode = (node, treeData, openFolders) => {\r\n let nextNode;\r\n nextNode = getNodePointingToRefNode(node, treeData, openFolders && openFolders.indexOf(node.id) > -1)\r\n if (!nextNode && node.parentId) {\r\n const parent = treeData[node.parentId];\r\n const nextChildIndex = parent.children.indexOf(node.id) + 1;\r\n\r\n if (parent.children.length > nextChildIndex) {\r\n const nextId = parent.children[nextChildIndex];\r\n nextNode = treeData[nextId] || treeData[`${parent.id}_${nextId}`];\r\n }\r\n }\r\n\r\n return nextNode\r\n}","import {\r\n UPDATE_USER_AS_INTERACTED,\r\n LOAD_USER_STATUS,\r\n UPDATE_USER_STATUS,\r\n LOAD_SETTINGS,\r\n LOAD_USER_WALLET,\r\n UPDATE_USER_WALLET_ITEM,\r\n UPDATE_MAP_ID,\r\n UPDATE_MAP_STATUS,\r\n UPDATE_UI_ELEMENTS,\r\n UPDATE_CLASS_NAMES\r\n} from './action-types';\r\nimport { SET_RB_STATE } from '../tree/data/action-types';\r\n\r\nimport { showModalMessage, ModalType } from '../ui/actions';\r\nimport { getProductBookmarkRuleBaseState, getFolderLinearRuleBaseState, getFolderLinearFreestyleRuleBaseState } from './services';\r\n\r\nexport const updateMode = {\r\n add: 'add',\r\n remove: 'remove',\r\n toggle: 'toggle'\r\n};\r\n\r\nexport const loadUserStatus = () => async (dispatch, getState) => {\r\n const { user, product } = getState();\r\n\r\n if (user && user.userId) {\r\n try {\r\n const status = await window.cet.microservices.cookies.content.getValues({\r\n productId: product.config.productId,\r\n key: user.userId\r\n });\r\n\r\n dispatch({\r\n type: LOAD_USER_STATUS,\r\n status: status?.[0]?.value ? JSON.parse(status[0].value) : null\r\n });\r\n } catch (error) {\r\n console.log(error);\r\n }\r\n }\r\n};\r\n\r\nexport const updateUserStatus =\r\n (id, newStatus, value = true) =>\r\n async (dispatch, getState) => {\r\n return new Promise((resolve, reject) => {\r\n const { user, olamonim, product } = getState();\r\n const updated = { ...olamonim.status, [id]: { [newStatus]: value } };\r\n if (user && user.userId) {\r\n window.cet.microservices.cookies.content.setValue({\r\n productId: product.config.productId,\r\n key: user.userId,\r\n val: JSON.stringify(updated)\r\n });\r\n\r\n dispatch({\r\n type: UPDATE_USER_STATUS,\r\n status: updated\r\n });\r\n }\r\n\r\n dispatch({\r\n type: UPDATE_USER_STATUS,\r\n status: updated\r\n });\r\n\r\n resolve(updated);\r\n });\r\n };\r\n\r\nexport const updateUserAsInteracted = () => ({ type: UPDATE_USER_AS_INTERACTED });\r\n\r\nexport const loadSettings = (type, settings) => async dispatch => {\r\n dispatch({\r\n type: LOAD_SETTINGS,\r\n settings: { type, settings }\r\n });\r\n};\r\n\r\nexport const loadUserWallet = () => async (dispatch, getState) => {\r\n const { user } = getState();\r\n\r\n let data = {\r\n UserID: user.userId,\r\n ApplicationID: `${window.TOC_PRODUCT_NAME}|${user.activeAudience.audienceId}`\r\n };\r\n\r\n const wallet = await window.cet.microservices.walletapi.wallet.get(data);\r\n\r\n const walletItems = {};\r\n\r\n if (wallet?.items) {\r\n for (let i = 0; i < wallet.items.length; i++) {\r\n const item = wallet.items[i];\r\n const prizeCatalogId = item.code.split('|')[0];\r\n walletItems[prizeCatalogId] = item;\r\n }\r\n }\r\n\r\n dispatch({\r\n type: LOAD_USER_WALLET,\r\n walletItems\r\n });\r\n};\r\n\r\nexport const updateUserWallet =\r\n (prizeAmount, prizeCode, isDelta = false) =>\r\n async (dispatch, getState) => {\r\n const { olamonim } = getState();\r\n const prizeCatalogId = prizeCode?.split('|')[0];\r\n const prizeCatalogCategoryName = prizeCode?.split('|')[1];\r\n let updatedPrize = olamonim.wallet[prizeCatalogId] ? { ...olamonim.wallet[prizeCatalogId] } : null;\r\n\r\n if (updatedPrize) {\r\n switch (prizeCatalogCategoryName) {\r\n case 'countable':\r\n if (isDelta) {\r\n updatedPrize.delta = prizeAmount;\r\n } else {\r\n updatedPrize.amount += prizeAmount;\r\n updatedPrize.delta -= prizeAmount;\r\n }\r\n\r\n break;\r\n case 'states':\r\n updatedPrize.code = prizeCode;\r\n break;\r\n default:\r\n break;\r\n }\r\n } else {\r\n updatedPrize = isDelta ? { amount: 0, code: prizeCode, delta: prizeAmount } : { amount: prizeAmount, code: prizeCode };\r\n }\r\n\r\n dispatch({\r\n type: UPDATE_USER_WALLET_ITEM,\r\n walletItem: { [prizeCatalogId]: updatedPrize }\r\n });\r\n};\r\n\r\nexport const updateRuleBaseState =\r\n (folderId, ruleBaseMethod = 'linear', ruleBaseDefaultCurrentId = null) =>\r\n async (dispatch, getState) => {\r\n const { product, tree, user } = getState();\r\n\r\n let ruleBaseState = null;\r\n\r\n if (ruleBaseMethod === 'linear' && folderId) {\r\n ruleBaseState = getFolderLinearRuleBaseState(tree.data, folderId);\r\n } else if (ruleBaseMethod === 'linearFreestyle' && folderId) {\r\n ruleBaseState = await getFolderLinearFreestyleRuleBaseState(tree.data, user, product?.config?.productId, folderId);\r\n } else if (ruleBaseMethod === 'bookmark') {\r\n ruleBaseState = await getProductBookmarkRuleBaseState(tree.data, user, product?.config?.productId, ruleBaseDefaultCurrentId);\r\n }\r\n\r\n dispatch({\r\n type: SET_RB_STATE,\r\n ruleBaseState\r\n });\r\n\r\n return ruleBaseState;\r\n};\r\n\r\nexport const updateMapStatus = isMapLoaded => async (dispatch, getState) => {\r\n dispatch({\r\n type: UPDATE_MAP_STATUS,\r\n isMapLoaded\r\n });\r\n};\r\n\r\nexport const updateMapId = mapId => async dispatch => {\r\n dispatch({\r\n type: UPDATE_MAP_ID,\r\n mapId\r\n });\r\n};\r\n\r\nexport const updateUiElements = (element, key, value) => async (dispatch, getState) => {\r\n const { olamonim } = getState();\r\n const updated = { ...olamonim.ui, [element]: { ...olamonim.ui[element], [key]: value } };\r\n\r\n dispatch({\r\n type: UPDATE_UI_ELEMENTS,\r\n ui: updated\r\n });\r\n};\r\n\r\nexport const updateUiRenderedElements =\r\n ({ mode, action, id, isUnique } = { mode: updateMode.toggle, id: undefined, isUnique: false }) =>\r\n async (dispatch, getState) => {\r\n //This line is for backward compatibility with action.action\r\n //TODO: Align olamonimConfig by replacing action.action with action.mode + Remove this if\r\n if(action) {\r\n mode = action\r\n }\r\n\r\n if (!id) return;\r\n\r\n const { olamonim } = getState();\r\n let updatedElement = [];\r\n\r\n if (olamonim.ui.renderedUI && olamonim.ui.renderedUI.ids) {\r\n updatedElement = [...olamonim.ui.renderedUI.ids];\r\n }\r\n\r\n if (mode === updateMode.remove || (mode === updateMode.toggle && updatedElement.includes(id))) {\r\n updatedElement = updatedElement.filter(item => item !== id);\r\n } else if (mode === updateMode.add || mode === updateMode.toggle) {\r\n if (isUnique) {\r\n updatedElement = [id];\r\n } else {\r\n updatedElement.push(id);\r\n }\r\n }\r\n\r\n const updated = { ...olamonim.ui, renderedUI: { ...olamonim.ui.renderedUI, ids: updatedElement } };\r\n\r\n dispatch({\r\n type: UPDATE_UI_ELEMENTS,\r\n ui: updated\r\n });\r\n };\r\n\r\nexport const resetUiElements = () => async dispatch => {\r\n dispatch({\r\n type: UPDATE_UI_ELEMENTS,\r\n ui: {}\r\n });\r\n};\r\n\r\nexport const updateClassNames =\r\n ({ id, mode, action, className, isUnique } = { id: undefined, mode: updateMode.toggle, className: undefined, isUnique: false }) =>\r\n async (dispatch, getState) => {\r\n //This line is for backward compatibility with action.action\r\n //TODO: Align olamonimConfig by replacing action.action with action.mode + Remove this if\r\n if(action) {\r\n mode = action\r\n }\r\n if (!id) return;\r\n const { olamonim } = getState();\r\n const { classNames } = olamonim.ui;\r\n let prevClassNames = [];\r\n if (!classNames) {\r\n prevClassNames = {};\r\n } else {\r\n prevClassNames = { ...classNames };\r\n }\r\n if (!prevClassNames[id]) {\r\n prevClassNames[id] = [];\r\n }\r\n let updated;\r\n if (mode === updateMode.remove || (mode === updateMode.toggle && prevClassNames[id].includes(className))) {\r\n updated = prevClassNames[id].filter(currClass => currClass !== className);\r\n } else if (mode === updateMode.add || mode === updateMode.toggle) {\r\n if (!prevClassNames[id].includes(className)) {\r\n updated = [...prevClassNames[id], className];\r\n } else {\r\n updated = [...prevClassNames[id]];\r\n }\r\n }\r\n const final = isUnique\r\n ? {\r\n ...olamonim.ui,\r\n classNames: { [id]: updated }\r\n }\r\n : {\r\n ...olamonim.ui,\r\n classNames: { ...prevClassNames, [id]: updated }\r\n };\r\n\r\n dispatch({\r\n type: UPDATE_CLASS_NAMES,\r\n ui: final\r\n });\r\n };\r\n\r\n\r\nexport const alertOnUnavailableNode = (nodeKey) => async (dispatch, getState) => {\r\n const { tree } = getState();\r\n\r\n if (nodeKey) {\r\n const node = tree?.data[nodeKey];\r\n if (node) {\r\n if (node.isHidden) {\r\n dispatch(showModalMessage(ModalType.NODE_UNAVAILABLE_BLOCKED_BY_TEACHER));\r\n } else if (node.ruleBase?.isBlocked) {\r\n // dispatch(showModalMessage(ModalType.NODE_UNAVAILABLE_BLOCKED_BY_ENGINE));\r\n }\r\n } else {\r\n dispatch(showModalMessage(ModalType.NODE_UNAVAILABLE_GENERAL));\r\n }\r\n }\r\n};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"btn\":\"TeacherButtons_btn__1iQ1X\",\"back_to_toc\":\"TeacherButtons_back_to_toc__3Ttvw\",\"unlock\":\"TeacherButtons_unlock__2WOPy\",\"sr-only\":\"TeacherButtons_sr-only__3ad90\"};"],"sourceRoot":""}