{"version":3,"sources":["store/popup/actions.ts","constants/defaults.ts","store/user/types.ts","store/timer/types.ts","core/lti/lti.ts","core/lti/eventHandler.ts","core/lti/index.ts","store/modules/actions.ts","store/timer/actions.ts","assets/figures/Figure.styled.ts","store/app/selectors.ts","components/popups/closeCourse/CloseCourse.styled.ts","components/popups/closeCourse/CloseCourse.tsx","components/popups/closeCourse/index.ts","store/contents/actions.ts","core/mappers/settings.ts","store/questions/responseReducers.ts","store/rootReducer.ts","store/app/reducer.ts","store/course/reducer.ts","store/modules/reducer.ts","store/settings/reducer.ts","store/questions/reducer.ts","store/sections/reducer.ts","store/contents/reducer.ts","store/navigation/reducer.ts","store/treeOfContent/reducer.ts","store/popup/reducer.ts","store/loader/reducer.ts","store/user/reducer.ts","store/resource/reducer.ts","store/resource/checklist/reducer.ts","store/timer/reducer.ts","store/questions/multipleChoice/responseReducer.ts","store/questions/statementChoice/responseReducer.ts","store/questions/dragAndDropText/responseReducer.ts","store/questions/openQuestion/responseReducer.ts","store/questions/rankingText/responseReducer.ts","store/questions/scenario/responseReducer.ts","store/questions/fillInTheBlank/responseReducer.ts","store/questions/textMatching/responseReducer.ts","store/questions/hotspot/responseReducer.ts","store/index.ts","store/navigation/types.ts","store/contents/selectors.ts","core/events/eventEmitter.ts","components/common/Icon/Icon.styled.ts","components/common/SwitchButton/SwitchButton.styled.ts","store/contents/types.ts","store/resource/types.ts","components/common/Button/Button.styled.ts","constants/review.ts","components/mixins/placement.ts","utils/navigation.ts","store/user/actions.ts","components/mixins/media.ts","store/treeOfContent/selectors.ts","store/popup/selectors.ts","core/events/eventHandler.ts","store/loader/selectors.ts","utils/logger.ts","store/settings/types.ts","store/treeOfContent/types.ts","store/popup/types.ts","store/loader/types.ts","store/resource/selectors.ts","constants/common.ts","constants/questionTypes.ts","components/mixins/customScrollbars.ts","components/mixins/backgrounds.ts","components/shell/Layout/index.ts","components/mixins/reviewTypography.ts","store/treeOfContent/actions.ts","core/localization/localization.ts","core/localization/index.ts","store/questions/selectors.ts","store/questions/informationContent/selectors.ts","components/common/SwitchButton/SwitchButton.tsx","components/common/SwitchButton/index.ts","components/common/Collapse/Collapse.styled.ts","components/common/Collapse/Collapse.tsx","components/common/CssAnimation/CssAnimation.tsx","components/common/Delay/Delay.tsx","components/common/Loader/Loader.styled.ts","components/common/Loader/Loader.tsx","components/common/MultipleChoiceItems/MultipleChoiceItems.styled.ts","components/popups/previewGallery/PreviewGallery.styled.ts","components/popups/previewGallery/PreviewGallery.tsx","components/common/MultipleChoiceItems/MultipleChoiceItems.tsx","components/common/ProgressResult/ProgressResult.styled.ts","components/common/ProgressResult/ProgressResult.tsx","components/common/ShapedIcon/ShapedIcon.styled.ts","components/common/ShapedIcon/ShapedIcon.tsx","components/common/StatusTooltip/StatusTooltip.styled.ts","components/common/StatusTooltip/StatusTooltip.tsx","store/loader/actions.ts","components/common/MainCircleLoader/MainCircleLoader.styled.ts","components/common/MainCircleLoader/MainCircleLoader.tsx","components/common/Routes/PrivateRoute/PrivateRoute.tsx","components/common/Routes/RouteWithRedirect/RouteWithRedirect.tsx","components/common/Tooltip/Tooltip.styled.ts","components/common/Tooltip/Tooltip.tsx","components/common/CourseLogo/CourseLogo.styled.ts","components/common/CourseLogo/CourseLogo.tsx","components/common/index.ts","components/common/EditableTextarea/EditableTextarea.tsx","components/common/EditableTextarea/index.ts","assets/figures/Trophy.tsx","components/common/Popup/Popup.styled.ts","components/common/Popup/Popup.tsx","components/common/Popup/index.ts","components/common/NumericList/NumericList.styled.ts","components/common/NumericList/NumericList.tsx","components/common/NumericList/index.ts","store/questions/multipleChoice/types.ts","core/events/events.ts","store/course/selectors.ts","core/http/contentLoader.ts","core/fonts/loader.ts","components/common/EditableTextarea/EditableTextarea.styled.ts","constants/components.ts","store/navigation/selectors.ts","utils/window.ts","constants/typeAccess.ts","store/resource/checklist/types.ts","core/schemas/resource/resourceContents.ts","core/schemas/resource/resource.ts","core/mappers/resource.ts","core/analytics/Analytics.ts","core/analytics/events.ts","store/resource/actions.ts","components/hocs/withNavigation.tsx","store/course/types.ts","components/common/SkipToContent/SkipToContent.styled.ts","components/common/SkipToContent/SkipToContent.tsx","components/common/SkipToContent/index.ts","components/review/Reviewable/Reviewable.styled.ts","components/review/Reviewable/Reviewable.tsx","components/review/Reviewable/index.ts","components/common/Button/Button.tsx","components/common/Button/index.ts","components/common/DropdownInput/DropdownInput.styled.ts","components/common/DropdownInput/popover/DropdownInputPopover.styled.ts","components/common/DropdownInput/popover/DropdownInputPopover.tsx","components/common/DropdownInput/button/DropdownInputButton.styled.ts","components/common/DropdownInput/button/DropdownInputButton.tsx","components/common/DropdownInput/DropdownInput.tsx","components/common/DropdownInput/index.ts","components/common/Separator/Separator.tsx","components/common/Separator/index.ts","store/questions/multipleChoice/selectors.ts","core/configuration/reader.ts","core/configuration/translationProvider.ts","core/configuration/settingsProcessor.ts","core/connectionAlert/eventHandler.ts","core/connectionAlert/index.ts","store/app/actions.ts","store/settings/actions.ts","utils/compression.ts","core/progressStorage/storageInterface.ts","core/progressStorage/externalStorage/auth.ts","core/progressStorage/externalStorage/socialNetworks.ts","core/progressStorage/externalStorage/index.ts","core/progressStorage/idMapper/idShortener.ts","core/progressStorage/idMapper/responseMappers/DragAndDropText.ts","core/progressStorage/idMapper/responseMappers/FillInTheBlank.ts","core/progressStorage/idMapper/responseMappers/HotspotMapper.ts","core/progressStorage/idMapper/responseMappers/InformationContent.ts","core/progressStorage/idMapper/responseMappers/SingleChoice.ts","core/progressStorage/idMapper/responseMappers/MultipleChoice.ts","core/progressStorage/idMapper/responseMappers/OpenQuestion.ts","core/progressStorage/idMapper/responseMappers/StatementChoice.ts","core/progressStorage/idMapper/responseMappers/RankingText.ts","core/progressStorage/idMapper/responseMappers/Scenario.ts","core/progressStorage/idMapper/responseMappers/SingleChoiceImage.ts","core/progressStorage/idMapper/responseMappers/TextMatching.ts","core/progressStorage/idMapper/responseMappers/index.ts","core/progressStorage/idMapper/index.ts","core/progressStorage/localStorage/index.ts","core/progressStorage/progressMapper/responseMappers/ResponseMapperBase.ts","core/progressStorage/progressMapper/responseMappers/DragAndDropTextResponseMapper.ts","core/progressStorage/progressMapper/responseMappers/FillInTheBlankResponseMapper.ts","core/progressStorage/progressMapper/responseMappers/HotspotResponseMapper.ts","core/progressStorage/progressMapper/responseMappers/InformationContentResponseMapper.ts","core/progressStorage/progressMapper/responseMappers/ChoiceResponseMapperBase.ts","core/progressStorage/progressMapper/responseMappers/MultipleChoiceResponseMapper.ts","core/progressStorage/progressMapper/responseMappers/OpenQuestionResponseMapper.ts","core/progressStorage/progressMapper/responseMappers/RankingTextResponseMapper.ts","core/progressStorage/progressMapper/responseMappers/ScenarioResponseMapper.ts","core/progressStorage/progressMapper/responseMappers/SingleChoiceResponseMapper.ts","core/progressStorage/progressMapper/responseMappers/SingleChoiceImageResponseMapper.ts","core/progressStorage/progressMapper/responseMappers/StatementChoiceResponseMapper.ts","core/progressStorage/progressMapper/responseMappers/TextMatchingResponseMapper.ts","core/progressStorage/progressMapper/responseMappers/index.ts","core/progressStorage/progressMapper/responseMapper.ts","core/progressStorage/progressMapper/urlMapper.ts","core/progressStorage/progressStorage.ts","core/progressStorage/EventHandler.ts","core/progressStorage/index.ts","components/common/DragDrop/DragDrop.styled.ts","components/common/DragDrop/DragDrop.tsx","components/common/DragDrop/index.ts","components/common/ProgressBar/ProgressBar.styled.ts","components/common/ProgressBar/ProgressBar.tsx","components/common/ProgressBar/index.ts","components/common/Link/Link.styled.ts","components/common/Link/Link.tsx","components/common/Link/index.ts","components/common/TextInput/TextInput.styled.ts","components/common/TextInput/TextInput.tsx","components/common/TextInput/index.ts","components/common/embeddables/PdfDocument/PdfDocument.styled.ts","components/common/embeddables/PdfDocument/PdfDocument.tsx","components/common/embeddables/PdfDocument/index.ts","components/common/Hint/Hint.styled.ts","components/common/Hint/Hint.tsx","utils/object.ts","store/initialState.ts","store/user/selectors.ts","store/questions/statementChoice/types.ts","store/questions/openQuestion/types.ts","store/questions/rankingText/types.ts","constants/progressStatus.ts","store/questions/scenario/types.ts","store/questions/fillInTheBlank/types.ts","store/questions/dragAndDropText/types.ts","store/questions/hotspot/types.ts","store/questions/textMatching/types.ts","store/questions/statementChoice/selectors.ts","store/questions/openQuestion/selectors.ts","store/questions/rankingText/selectors.ts","store/questions/types.ts","store/questions/scenario/selectors.ts","store/questions/fillInTheBlank/selectors.ts","store/questions/textMatching/selectors.ts","store/questions/hotspot/selectors.ts","utils/questions.ts","components/common/Icon/Icon.tsx","components/common/Icon/index.ts","components/popups/nps/buttonVote/ButtonVote.styled.ts","components/popups/nps/buttonVote/ButtonVote.tsx","components/popups/nps/evaluateCourse/EvaluateCourse.styled.ts","components/popups/nps/evaluateCourse/EvaluateCourse.tsx","assets/figures/Rate.tsx","components/popups/nps/feedbackStep/FeedbackStep.styled.ts","components/popups/nps/feedbackStep/FeedbackStep.tsx","components/popups/nps/thankForFeedback/ThankForFeedback.styled.ts","components/popups/nps/thankForFeedback/ThankForFeedback.tsx","components/popups/nps/nps.tsx","components/popups/nps/index.ts","utils/getStringHash.ts","utils/sort.ts","store/questions/dragAndDropText/selectors.ts","components/popups/descriptionWithBackground/DescriptionWithBackground.styled.ts","components/popups/descriptionWithBackground/DescriptionWithBackground.tsx","components/popups/descriptionWithBackground/index.ts","store/settings/selectors.ts","components/mixins/images.ts","constants/navigation.ts","constants/timer.ts","components/mixins/interactivity.ts","components/mixins/typography.ts","store/sections/selectors.ts","constants/screenResolutions.ts","constants/progressStorage.ts","store/modules/types.ts","components/mixins/normalize.ts","core/schemas/course/content.ts","core/schemas/course/explanationBlock.ts","core/schemas/course/question.ts","core/schemas/course/section.ts","core/schemas/course/afterword.ts","core/schemas/course/introductions.ts","core/schemas/course/course.ts","core/mappers/course.ts","utils/shuffle.ts","core/dataProcessors/questionOptions.ts","store/course/actions.ts","core/http/requester.ts","store/sections/types.ts","utils/string.ts","store/modules/selectors.ts","core/http/resourceLoader.ts","store/timer/selectors.ts","constants/popups.ts","store/app/types.ts","store/questions/actions.ts","pages/errors/somethingWentWrong/SomethingWentWrongPage.styled.ts","pages/errors/somethingWentWrong/SomethingWentWrongPage.tsx","components/hocs/withScrollOnRedirect.tsx","pages/errors/ConnectionAlert/ConnectionAlert.styled.ts","assets/figures/LostConnection.tsx","pages/errors/ConnectionAlert/ConnectionAlert.tsx","components/shell/Shell.tsx","assets/styles/common.ts","assets/styles/animations.ts","assets/styles/index.ts","index.tsx","utils/color.ts","components/common/CircleLoader/CircleLoader.styled.ts","components/common/CircleLoader/CircleLoader.tsx","components/common/CircleLoader/index.ts","components/shell/Layout/Layout.styled.ts","store/sections/actions.ts","utils/comparison.ts","utils/timer.ts","store/navigation/actions.ts","components/common/Text/Text.styled.ts","components/common/Text/Text.tsx","components/common/Text/index.ts","components/timer/Analog/TimerProgressProvider.ts","components/timer/Analog/AnalogTimer.styled.ts","components/timer/Analog/AnalogTimer.tsx","components/timer/Digital/DigitalTimer.styled.ts","components/timer/Digital/DigitalTimer.tsx","components/timer/Timer.styled.ts","components/timer/TimerBlock.tsx","components/timer/useInterval.ts","components/timer/useTimeout.ts","components/timer/Timer.tsx","assets/figures/SecretLink.tsx","components/popups/continueLater/ContinueLater.styled.ts","components/popups/continueLater/ContinueLater.tsx","components/popups/continueLaterInScorm/ContinueLaterInScorm.styled.ts","components/popups/continueLaterInScorm/ContinueLaterInScorm.tsx","components/userMenu/UserMenu.styled.ts","components/userMenu/UserMenu.tsx","components/shell/Layout/Layout.tsx"],"names":["openPopup","settings","dispatch","type","ActionTypes","OPEN_POPUP","payload","closePopup","CLOSE_POPUP","DEFAULT_ALTERNATIVE_LOGO_URL","DEFAULT_BACKGROUND","header","image","url","option","coverOverlay","enabled","color","opacity","body","DEFAULT_COLORS","textColor","DEFAULT_FONTS","mainFont","fontFamily","DEFAULT_SOMETHING_WENT_WRONG_TITLE_TEXT","DEFAULT_LOGO_TEXT","DEFAULT_PLEASE_TRY_TY_REFRESH_THE_PAGE_TEXT","callbackUrl","submitResultToLti","a","async","score","requestOptions","credentials","data","headers","method","retryOptions","token","progressStorage","getToken","Authorization","requester","post","this","EventHandler","handlers","event","COURSE_FINISHED","instance","bind","lti","initialize","BaseEventHandler","eventHandler","on","off","initializeXapi","getState","state","default","xApi","getXapiSettings","isScoringOfContentPagesAllowed","defaultLrsUrl","getPublishSettings","defaultLRSUrl","defaultNpsUrl","course","getCourse","actor","username","getName","email","getEmail","account","getAccount","MODULE_XAPI_INITIALIZED","subscribeXapi","isResultsTrackingEnabled","subscribeLrs","MODULE_XAPI_LRS_ON","isNpsEnabled","subscribeNps","MODULE_XAPI_NPS_ON","unsubscribeXapi","unsubscribeAll","MODULE_XAPI_LRS_OFF","MODULE_XAPI_NPS_OFF","initializeScorm","scorm","isScorm2004Mode","MODULE_SCORM_INITIALIZED","userActions","name","userInfoProvider","getUsername","getAccountId","homePage","getAccountHomePage","eventEmitter","emit","events","APP_INITIALIZED","isScormMode","USER_AUTHENTICATED","getUser","use","progressProvider","subscribeProgressStorage","isPreviewMode","isReviewMode","subscribe","MODULE_PROGRESS_STORAGE_ON","enableReview","editorWindow","window","parent","locationProtocol","location","protocol","targetOriginUrl","getAuthoringToolUrl","postMessage","supportsNativeReview","loadReviewFont","reviewApiUrl","getValueFromUrl","authoringToolDomain","courseId","getCourseId","ENABLE_REVIEW_MODE","REVIEW_INITIALIZED","subscribeLti","MODULE_LTI_INITIALIZED","isLTI","emitTimerProgress","COURSE_TIMER_PROGRESSED","timer","status","getTimerStatus","elapsed","getTimerElapsed","startTimer","START_TIMER","setTimerStatus","SET_TIMER_STATUS","setTimerElapsed","SET_TIMER_ELAPSED","resetTimer","RESET_TIMER","RESET_TIMER_PROGRESS","updateTimerProgress","Figure","styled","svg","attrs","props","role","arialabel","isAppLoaded","app","isLoaded","isAppLoadingFailed","isLoadingFailed","isAppLoading","isLoading","isLowResolution","isOffline","TextElement","Text","theme","colors","media","mobile","ButtonsWrapper","div","Wrapper","section","CloseCourse","scormMode","navigationActions","learnServiceUrl","previewMode","isLti","appearance","localize","onClick","goToUrl","React","connect","getLearnServiceUrl","isLtiInitialized","bindActionCreators","contentsLoaded","contents","CONTENTS_LOADED","content","promises","push","loadContent","Promise","all","loadAll","value","contentLoader","loadStaticHtmlContent","CONTENT_LOADED","contentId","id","CONTENT_LOADING_FAILED","loadContents","forEach","options","publishSettings","manifest","translations","publishMode","template","mapTemplateSettings","publish","fonts","reduce","acc","item","toCamelCase","key","branding","mainLogo","logo","alternativeLogo","allowToShowMainLogo","allowToShowLogo","normalizeColorName","background","languages","saveProgressCrossDevice","loginViaSocialMedia","conductLearnerSatisfactionSurvey","allowUsersToDownloadCertificates","showContentPages","showLearningHints","resultsTracking","numberOfAttempts","allowUserToSkipTrackingAndTracing","allowScoringOfContentPages","answersFromPreviousAttempt","masteryScore","showAllQuestionAndContentItems","submitAnswers","questionPool","randomizeQuestionOrder","answerOptionsOrder","responseReducer","action","hasOwnProperty","question","questionId","response","questionResponseReducers","reducer","reduceQuestionResponse","rootReducer","combineReducers","initialState","APP_LOADED","Object","assign","APP_LOADING_FAILED","APP_RESOLUTION_CHANGED","APP_OFFLINE_OR_SERVER_ERROR","APP_ONLINE","COURSE_DATA_LOADED","COURSE_DATA_LOADING_FAILED","COURSE_PROGRESS_RESTORED","attemptId","hasBeenContinued","COURSE_LAUNCHED","isLaunched","COURSE_SUBMIT_AT_ONCE","isAttemptSubmitted","reAttemptedSubmitAtOnce","COURSE_SUBMIT_AT_ONCE_LIMITED","courseAttempt","COURSE_REATTEMPTED_SUBMIT_AT_ONCE","COURSE_SCORE_UPDATED","COURSE_CLEANUP","ProgressStatus","IN_PROGRESS","isProgressRestoreFailed","isProgressRestoreFetched","isCourseFinished","CLEAR_PREVIEW_QUESTION_ID","previewQuestionId","CERTIFICATE_DOWNLOADED","COURSE_IS_PASSED","COURSE_PROGRESS_RESTORE_FAILED","COURSE_PROGRESS_RESTORE_FETCHED","TIME_SPENT_UPDATED","COURSE_IS_FAILED","COURSE_RANDOMIZED_OPTIONS_LOADED","isRandomizedOptionsLoaded","modules","xapi","isInitialized","isLrsTrackingOn","isNpsTrackingOn","isProgressStorageOn","MODULE_PROGRESS_STORAGE_OFF","review","isReviewModeEnabled","SETTINGS_LOADED","settingsMapper","SETTINGS_LOADING_FAILED","router","routerReducer","questions","QUESTIONS_LOADED","QUESTION_PROGRESS_RESTORE","QUESTION_ANSWERED","isAnswered","isAnsweredCorrectly","attemptNumber","attempt","QUESTION_ANSWERED_BEFORE_SUBMIT","QUESTION_UPDATE_SCORE","QUESTION_OPENED","hasBeenOpened","QUESTION_PROGRESS_RESET","isPoolQuestion","getInitialQuestionResponse","QUESTION_PROGRESS_RESET_ATTEMPT","QUESTION_PROGRESS_RESET_KEEP_ANSWER","QUESTION_RESTORE_RESPONSE","QUESTION_RESTORE_SHOW_PREV_ANSWER","FEEDBACK_ANIMATING","isFeedbackAnimating","QUESTION_UPDATE_RETRY","retries","responseReducers","sections","SECTIONS_LOADED","SECTION_SCORE_UPDATED","SECTION_IS_PASSED","SECTION_ANSWERED","isSectionAnswered","SECTION_ANSWERED_SCORE","sectionProgress","navigation","SectionsActions","urls","sectionId","learningObjective","getLearningObjectiveUrl","getQuestionUrl","RESULTS_PATH","chain","NAVIGATED_INSIDE_THE_APP","prevUrl","POOL_URL_LOADED","poolQuestions","ELEMENT_ID_IN_VIEWPORT_UPDATED","elementIdInViewport","treeOfContent","TOC_TOGGLE_VISIBILITY","isExpanded","COURSE_ENABLE_SUBMIT_BUTTON","isSubmitButtonVisible","popup","loader","OPEN_LOADER","CLOSE_LOADER","user","USER_UNAUTHENTICATED","USER_AUTHENTICATION_SKIPPED","authorizationSkipped","USER_AUTHENTICATION_NOT_SKIPPED","resource","RESOURCE_DATA_LOADED","RESOURCE_DATA_LOADING_FAILED","checklist","TOGGLE_CHECK","INIT_CHECKLIST","TimerStatus","STARTED","RESET","startedAt","updatedAt","questionState","QUESTION_MULTIPLECHOICE_TOGGLE_ANSWER_IS_SELECTED","toggleArrayElement","answerId","QUESTION_MULTIPLECHOICE_SET_SINGLE_ANSWER_SELECTED","SET_SINGLE_ANSWER_SELECTED","splice","length","QUESTION_STATEMENT_ANSWER_IS_SELECTED","toggleArrayStatementElement","isCorrect","QUESTION_DRAG_AND_DROP_ANSWERS_ARE_SELECTED","answers","OPEN_QUESTION_ANSWER_IS_SELECTED","answeredText","QUESTION_RANKING_ANSWERS_ARE_SELECTED","QUESTION_SCENARIO_BRANCHTRACK_DATA","isFinished","FILL_IN_THE_BLANK_ANSWER","QUESTION_MATCHING_ANSWERS_ARE_SELECTED","HOTSPOT_QUESTION_ANSWER","history","createHashHistory","middleware","thunk","routerMiddleware","composedEnhancers","compose","applyMiddleware","store","createStore","getContents","createSelector","ids","Emmitery","eventConstants","IconElement","span","size","getColor","transition","fontSize","CheckIcon","Icon","CheckImageIcon","AnswerImage","img","alt","ButtonElement","selected","layout","SWITCH_BUTTON_LAYOUT","QUESTION","css","mainColor","transparentize","multiple","CHECKLIST","SIZES","SMALL","buttonTextColor","imageUrl","defaultBoxShadowColor","checkMarkAnimate","keyframes","ButtonWrapper","tabIndex","roleValue","ariaLabel","undefined","ariaDisabled","button","disabled","buttonDefaultStyle","textTransform","suffixIcon","MEDIA_LARGE","BUTTON","LAYOUT","PRIMARY","ctaButtonColor","solidColor","SECONDARY","inverted","coverBgOverlayTextColor","MEDIUM","ButtonLinkElement","withComponent","REVIEW_USER_EMAIL","REVIEW_USER_NAME","HINT_FOR_SPOT_COMMENT","HINT_FOR_GENERAL_COMMENT","COMMENT_SENDING_FAILED","STATUS_OK","REVIEW_COMMENT_PROPERTIES","DEFAULT_TITLE","TITLE","INTRODUCTION","LEARNING_CONTENT","VOICE_OVER","CONTENT_ITEM","TITLE_OF_THE_SECTION","GENERAL","REVIEW_COMMENT_TYPES","INFORMATION_CONTENT","COURSE","SECTION","centerAbsoluteElement","centerAbsoluteElementY","QUESTION_PATH","replace","LEARNING_OBJECTIVE_PATH","getQuestionAbsoluteUrl","getCurrentUrl","getSectionAbsoluteUrl","SECTION_PATH","getSectionUrl","getLocationParams","path","keys","match","pathToRegexp","exec","getCurrentLocationHash","index","authenticate","load","getUserFromUrl","shouldSaveCrossDevice","isPublishMode","identifyUser","authorizeUser","signInData","shortTermAccess","registerUser","signUpData","skipAuthentication","notSkipAuthentication","logout","USER_LOGOUT","courseActions","sendSecretLink","toLowerCase","sizes","xsmall","MEDIA_XSMALL","small","MEDIA_SMALL","medium","MEDIA_MEDIUM","large","xlarge","MEDIA_XLARGE","tablet","MEDIA_TABLET","smallFontRatio","MEDIA_SMALL_FONT_RATIO","MEDIA_MOBILE","label","args","getTreeOfContentVisibility","getPopupVisibility","getPopupSettings","handler","isLoaderVisibility","error","console","warn","info","log","getResourceContents","resourceContents","getResourceTitle","title","getResourceType","resourceType","getResourceId","MATERIAL_TYPES","RESOURCE_TYPE","imageResizerQueryPattern","supportedBgSizes","contain","cover","initial","CONTENT_TYPES","JSON","DEFAULT_LANGUAGE_CODE","CUSTOM_LANGUAGE_CODE","NO_SELECTED_ID","IMAGE_DEFAULT_DOMAIN","maxCountTocNavigationElements","minCountTocNavigationElements","DEFAULT_QUESTION_POOL_ID_LENGTH","LTI_CALLBACK_URL_PARAMETER_NAME","FONT_WEIGHTS","SECONDARY_FONT_KEY","MEDIA_FONT_SIZES","heading1","MAXIMUM_VALUE","MULTIPLIER","heading2","heading3","heading4","paragraph","quote","TRANSITION_TIME_DURATION_MS","CIRCLE_DEGREES","HTML_INFINITY_SYMBOL","SVG_XML_NAMESPACE","DEBOUNCE_SCROLL_WAIT_TIME_MS","RECALCULATE_LOCATION_TIME_MS","EULA_PDF_LINK","KEYS","ENTER","SPACEBAR","TAB","ESCAPE","EMAIL_REGEX","RegExp","join","PASSWORD_REGEX","SKIP_TO_CONTENT_IDS","LEARNING_OBJECTIVE_PAGE","QUESTION_PAGE","RESULT_PAGE","ONE_PAGE_COURSE","QUESTION_POOL_START_BUTTON","SINGLE_CHOICE","MULTIPLE_CHOICE","STATEMENT_CHOICE","SINGLE_CHOICE_IMAGE","OPEN_QUESTION","RANKING_TEXT","SCENARIO","FILL_IN_THE_BLANK","DRAG_AND_DROP_TEXT","TEXT_MATCHING","HOTSPOT","getCustomScrollbars","scrollColor","backgroundColor","backgroundImage","position","repeat","bodyBackground","texture","headerBackground","headerBackgroundImage","loadFontsFromGoogle","fontWeight","reviewFontText","toggleTreeOfContentVisibility","submitAllAnswerOnce","questionActions","adaptToResolution","isTocExpanded","isLowerResolution","templateData","defaultValue","getTranslations","Error","prop","pattern","regex","applyTemplateData","hasAvailableAttempt","isAttemptsLimited","getLimitedAttemptsNumber","getQuestion","getQuestionSection","getQuestions","objectToArray","getAffectProgressQuestions","isQuestionPoolEnabled","filter","affectsProgress","isAllQuestionsFailed","every","isAllQuestionsTimedOut","getTimerEnabled","STOPPED","isAttemptTimedOut","isAllSurveyQuestionsAnswered","isSurvey","getQuestionResponse","getAffectProgressQuestionsCount","hasReAnswerableQuestions","some","getAnsweredAffectProgressQuestionsCount","getAnsweredQuestionsProgress","affectProgressQuestionsCount","Math","floor","getCorrectlyAffectProgressAnsweredQuestionsCount","isQuestionAnswered","isQuestionAnsweredCorrectly","getQuestionAttempt","hasCourseBeenStarted","getLastOpenedQuestion","getScore","multipleChoiceSelectors","statementChoiceSelectors","openQuestionSelector","rankingTextSelector","scenarioSelector","fillInTheBlankSelector","dragAndDropTextSelector","textMatching","hotspot","informationContent","questionExists","includes","getPoolQuestions","getPoolQuestionIndex","questionsForPoolTemp","poolQuestionIDs","indexOf","getSectionId","isAllAffectedQuestionsAnswered","getUnansweredQuestions","hasAnyQuestionOpened","getQuestionRetries","SwitchButton","handleImageLoaded","setState","isImageLoaded","onKeyDown","text","altAnswerImage","ariaChecked","CircleLoader","src","onLoad","className","Component","defaultProps","Content","defaultOpacity","opacityDuration","Container","duration","isVisible","Collapse","containerNode","contentNode","timeout","raf","animateAppear","updateWithAnimation","update","clear","children","ref","getDefaultOpacity","setHeight","setOpacity","delayOpacityTransition","fadeOut","collapse","call","onCollapsed","expand","scrollIntoView","time","align","top","fadeIn","setTimeout","onExpanded","func","clearTimeout","cancelAnimationFrame","animateHeight","isHeightAuto","getContentHeight","requestAnimationFrame","height","current","offsetHeight","style","AnimationTypes","CssAnimation","animateLeave","CSSTransition","in","appear","exit","classNames","unmountOnExit","AnimationType","Delay","componentDidMount","isWaiting","callback","wait","componentWillUnmount","PureComponent","ContentLoader","ReactContentLoader","withTheme","width","speed","primaryColor","secondaryColor","x","y","rx","ry","ListItemsBlock","ul","isImageQuestion","ListItem","li","isTreeOfContentExpanded","TOC","EXPANDED_WIDTH","ZoomIconBg","ZoomIcon","ZoomIconButton","isShown","ImageItem","figure","Image","PreviewGalleryPopup","imageUrls","popupSettings","map","iconSize","MultipleChoiceItems","items","isOpened","selectItem","isMultiple","showPopup","actions","popupId","POPUP_ID_IMAGE_PREVIEW","popupAriaLabelKey","component","PreviewGallery","disableBottomLine","imageQuestion","nextProps","prevState","StatusIcon","correctColor","passedMark","progress","ProgressWrapper","ProgressBarMark","styles","ProgressResult","passedMarkStyles","progressColor","useState","showTooltip","setShowTooltip","toggleShowTooltip","onMouseEnter","onMouseLeave","ProgressBar","html","mustPercentSuccess","arrow","open","distance","tooltipTheme","roundFullColor","roundOutlined","roundShaded","contentBodyColor","IconShape","getShapeSize","shape","ICON","SHAPES","ROUND_FULL_COLOR","ROUND_OUTLINED","ROUND_SHADED","LARGE","hoverShape","pointerOnHover","getHoverColor","getShapeColor","shapeColor","shapeOpacity","ShapedIcon","shapeSize","getIconSize","secondaryFont","MessageContainer","ContainerMessage","TOOLTIP","INCORRECT","incorrectColor","CORRECT","PopoverButton","PopoverWrapper","StatusTooltip","refButton","popoverPosition","popoverButton","message","onRequestClose","templateTheme","trigger","interactive","font","openLoader","closeLoader","OverLayContainer","MainCircleLoader","loaderActions","isCourseProgressRestoreFetched","isCourseProgressRestoreFailed","courseAccessLimited","isCourseAccessLimited","isLoaderVisible","reviewMode","ComponentNoAccess","componentNoAccess","typeAccess","materialType","rest","Route","render","IS_NO_ACCESS","IS_NOT_AUTHORIZED","Redirect","to","LOGIN_PATH","displayComponents","materialTypeCourseComponents","shouldRedirect","routeTo","INDEX_PATH","canRedirect","pathname","TooltipContentWrapper","shake","TooltipContentArrow","TooltipElement","newProps","onMouseUp","e","stopPropagation","popperOptions","modifiers","preventOverflow","boundariesElement","computeStyle","gpuAcceleration","positionFixed","isTouchScreenDevice","useContext","stickyDuration","animateFill","Logo","altText","logoUrl","CourseLogo","EditableTextarea","textAreaNode","isAutofocus","focus","placeholder","onResize","onBlur","onChange","rows","viewBox","version","xmlns","filterUnits","stdDeviation","stroke","strokeWidth","fill","fillRule","transform","d","cx","cy","BottomLine","PopupWrapper","ariaModal","PopupContent","PopupOverlay","CloseBtnWrapper","CloseBtnIcon","CloseBtnText","PopupContainer","containerElement","focusedElementBeforeDialogOpened","handleKeyDown","evt","disablePopupClosing","keyCode","preventActions","popupContainer","document","getElementById","contains","target","activeElement","element","addEventListener","removeEventListener","enableClosePopupByTap","ComponentToRender","aria-label","ListCounter","ListCounterItem","lineHeight","NumericList","COURSE_STARTED","COURSE_FINALIZED","COURSE_EVALUATED","COURSE_PROGRESSED","SUBMIT_ONCE_COURSE_PROGRESSED","COURSE_ATTEMPT_STARTED","COURSE_QUESTION_POOL_SELECTED","COURSE_RANDOMIZED_OPTIONS_SAVED","SECTION_PROGRESSED","SUBMIT_ONCE_QUESTION_ANSWERED","SUBMIT_ONCE_QUESTION_SUBMITTED","SUBMIT_ONCE_QUESTION_ATTEMPTED","INFORMATION_CONTENT_EXPERIENCED","APP_NAVIGATED","RESET_QUESTION_PROGRESS","COMMENT_SENT","REVIEWER_AUTHORIZED","REVIEW_RESTORE_USER","UPDATE_CHECKLIST_PROGRESS","getCourseTitle","getCourseIntroductions","introductions","isPassed","comparison","isInProgress","isFailed","getTemplateId","templateId","getAttemptId","getCourseAttempt","getPreviewQuestionId","getTimeSpent","Date","getTime","timeSpent","incrementStartedAt","accumulatedValueInMilliseconds","getCourseStructure","getSections","isInformationContent","getQuestionsStructure","questionsSchema","isAnonymous","isAccessLimited","getAllowedUsers","isCertificateDownloaded","getPassedAfterwords","passedAfterwords","getFailedAfterwords","failedAfterwords","isFinalized","isCourseLaunched","isCoursePassed","getAffectProgressSections","getTimerProgressKey","COURSE_TIMER_PROGRESS_KEY","getUserId","loadMaterialData","resourceLoader","getLocalResource","json","xss","loadFonts","customFontPlace","mappedFonts","mapFonts","webFontConfig","prepareWebFontConfig","constructor","makeLoadFontRequest","presetFonts","mapPresetFont","templateFonts","find","family","place","variant","fontStyle","getTemplateFont","concat","samefont","variants","result","mapVariant","addQueryStringParameter","cacheBuster","places","config","families","fontData","placeData","mapFontName","resolve","baseConfig","active","inactive","WebFont","salt","fontVariants","fontLanguages","fontConfig","google","EditableContentWrapper","OPACITY","PERCENT_30","PERCENT_100","COLLAPSED_WIDTH","TAIL_WIDTH","Z_INDEX","SIDEBAR","COLLAPSED_TOC","TOC_TAIL","BLOCKOUT","LINK","DEFAULT","FORM","INPUT_TYPE","TEXT","PASSWORD","EMAIL","getChain","getPrevUrl","getElementIDInViewPort","resolution","innerWidth","host","hash","test","navigator","userAgent","isIE","hasQueryStringParameter","href","separator","decodeURIComponent","clearQueryString","currentHash","searchIndex","cleanHash","slice","replaceState","closeWindow","close","getFilteredQueryParams","queryKey","parsedParams","search","params","lastIndex","getObjectParsedQueryString","filteredParams","removeQueryStringParam","paramName","isIframe","self","IS_SUCCESSFUL_ACCESS","schema","Entity","processStrategy","define","normalized","normalize","resourceSchema","entities","AnalyticsPlugin","writeKey","Analytics","SegmentPlugin","analytics","plugins","timestamp","now","eventName","category","properties","integrations","Amplitude","session_id","track","err","logger","getInstance","ResourceTypesProperty","RESOURCE_DATA_LOADING_STARTED","resourcesMapper","contentsActions","reason","launch","RESOURCE_PATH","restoreProgress","resourceId","analyticsWriteKey","init","trackEvent","analyticsEvents","withNavigation","WrappedComponent","Navigation","getNextPageUrl","currentUrlIndex","checkHasPrevPage","navigateToPrevPage","navigateToUrl","navigateToNextPage","navigateToIndex","isReplace","navigatedToUrl","checkIsNextPageResults","checkIsPreviousPageResults","updateElementIdInViewPort","scrollToId","offset","scrollIntoViewElement","elementId","scrollElement","topOffset","combinedProps","SkipToContentElement","left","SkipToContent","preventDefault","onKeyPress","isVoiceOver","isCourseOnOnePage","Reviewable","renderSpot","ReviewSpot","isGeneral","context","hintName","isReviewEnabled","Button","link","onFocus","loaderIconSize","other","Element","ellipsis","Helper","isMatchingOption","isMatching","PopoverContent","typography","DropdownInputPopover","classes","baseSelected","matchingSelected","matchingSelectedCurrent","selectedAnswer","isPopoverOpen","highlightedIndex","setHighlightedIndex","getItemProps","data-test","addClasses","pulseAnimationColors","start","middle","end","PlusIcon","DropdownButton","pulse","DropdownInputButton","answeredPlaceholder","matchingAnswer","getToggleButtonProps","getLabelProps","getRootProps","isOpen","buttonAnimation","buttonClasses","base","matchingOption","animation","suppressRefError","DropdownInput","onOptionSelect","onStateChange","prevProps","selectedItem","onSelect","itemToString","getMenuProps","Separator","margin","marginBottom","getUserAnswers","randomizeAnswersEnabled","isRandomizeAnswersEnabled","randomizedOptions","answer","correctAnswerId","i","getLocalJsonResource","languageCode","loadTranslation","defaultTranslations","deepMerge","customTranslations","documentElement","setAttribute","code","processSettings","themeSettings","deepExtend","preset","Array","isArray","presets","defaultThemeSettings","processThemeSettings","templateSettings","defaultTemplateSettings","processTemplateSettings","appOfflineOrServerError","appOnline","loadMaterial","isResource","resourcesActions","connectionAlert","modulesActions","ltiCallbackUrl","materialData","createdOn","configurationReader","readManifest","readCustomization","readPublishSettings","readThemeSettings","readSettings","customization","templateThemeSettings","isPreview","isReview","isScorm","isScorm2004","RESOURCE","resolutionChanged","tocActions","launchMaterial","isCourse","compress","stringify","decompress","parse","StorageInterface","constants","ExternalStorageAuth","courseTitle","authServiceUrl","courseLink","contentType","bearerToken","getTokenFromAuthService","get","retryOn","getTokenResponse","responseData","getAuthToken","getHeaders","userInfoResponse","query","nocache","password","_setAuthenticationData","returnUrl","PASSWORD_RESET_SENDING_FAILED","IdToUuid","UNKNOWN_ERROR","EMAIL_PASSWORD_COMBINATION_NOT_EXISTS","toString","sessionStorage","setItem","removeItem","getItem","SocialNetworks","authStorageUrl","socialNetwork","isMainHost","addTokenQueryParam","encodeLocation","encodeURIComponent","ExternalStorage","_auth","_socialNetworks","getAuthServiceUrl","responseProgress","jsonProgress","CourseProgressStorageStatus","courseUrl","PASSED","FAILED","shouldSubmitAllQuestions","put","saveProgressResponse","isAuthenticated","exists","identify","userData","authorize","register","resetPassword","getAuthLink","IdShortener","translator","shortId","fromUUID","toUUID","DragAndDropTextResponseMapper","_mapId","convertToShort","_mapItems","convertToOriginal","convert","idShortener","FillInTheBlankResponseMapper","_map","userResponse","convertedId","HotspotResponseMapper","InformationContentResponseMapper","SingleChoiceResponseMapper","MultipleChoiceResponseMapper","OpenQuestionResponseMapper","StatementChoiceResponseMapper","RankingTextResponseMapper","ScenarioResponseMapper","SingleChoiceImageResponseMapper","TextMatchingResponseMapper","StatementChoice","questionTypes","DragAndDropText","FillInTheBlank","HotspotMapper","InformationContent","MultipleChoice","OpenQuestion","RankingText","Scenario","SingleChoice","SingleChoiceImage","TextMatching","questionType","responseMappers","unMap","LocalStorage","progressKey","getProgressKey","localStorage","ResponseMapperBase","mapResponse","String","hasQuestionResponse","dropspots","responseItem","itemIndex","findIndex","userAnswer","notSelectedItem","isDropDisabled","dropspot","unshift","userAnswerIndexes","answerIndex","answerValues","selectedOptionIndex","answerOption","answerGroups","answerItem","questionAnswer","isEmptyAnswer","itemAnswer","spots","spot","ChoiceResponseMapperBase","_unMapFailedResponse","questionAnswers","hasBeenSelected","shownSelectedValue","selectedKey","selectedOption","userAnswers","defaultCourseProgress","attempts","finished","allQuestionsSubmitted","courseAttemptNumber","randomizedOptionsList","defaultChecklistProgress","checklistItem","storage","questionShortIds","questionsIndexToIdSchema","isQuestionPool","questionPoolSize","shouldShowPreviousAnswers","isSubmitAllAtOnce","nonAsciiCharsSupported","timerEnabled","isNewSubsetOnEveryAttempt","getQuestionPoolSize","isAnswersFromPreviousAttemptEnabled","isEmpty","getProgress","isObject","_mapObjectAnswersToArray","decompressProgress","progressIndex","responseMapper","checkItem","isChecked","saveProgress","restoredProgress","hasNonAscii","removeProgress","_clearProgress","_clearProgressLogout","progressAnswers","progressAttempts","_getProgressedQuestion","processedAnswer","_unMapProgress","_hasFullProgressStructure","idMapper","unMapResponse","_rewriteAnswerToShortenStructure","oldStructureResponse","entity","updateQuestionProgress","userExists","getSocialNetworkAuthLink","answersToSave","courseAttempts","questionPoolToSave","originalAnswers","urlMapper","submitOnceAttempt","appInitialize","appNavigated","courseLaunched","courseQuestionPoolSelected","courseRandomizedOptionsSaved","courseProgressed","courseAttemptStarted","updateCourseProgress","updateCourseAttemptProgress","removeQuestionProgress","resetTimerProgress","userAuthorized","updateChecklistProgress","questionPoolIds","ProgressStorage","getAnswers","restoreAnswers","checkScormNonAsciiSupport","ArrowIcon","DroppableItemStyle","isMultipleList","isDragging","isPlaceholderVisible","DroppableListStyle","DroppableItemWrapper","isAreaEmpty","widthInvisible","ImageWrapper","isImageNotFound","DragDrop","customRefs","imageRefs","move","source","destination","droppableSource","droppableDestination","listsOfItems","from","removed","droppableId","reorder","list","startIndex","endIndex","getItemStyle","draggableStyle","getList","listId","setDisableDroppableArea","results","reorderElementsPosition","reorderedItems","moveItem","allowSubmit","moveElementsBetweenLists","onDragEnd","droppableWidth","onDragUpdate","setNumericListHeights","onDragStart","resultArr","draggableId","offsetWidth","setDraggableWidth","itemId","droppableWidthInvisible","resetListOfItems","getPositionDependingImageScale","getDropspotsPosition","dropspotsPosition","numericListHeights","draggableList","refsArray","previousProps","previousState","listsOfItemsArr","cloneDeep","nonSelected","shift","getDroppableElement","listItem","setRef","direction","listProvided","data-area-empty-text","innerRef","provided","snapshot","draggableProps","dragHandleProps","dangerouslySetInnerHTML","__html","ProgressContainer","Progress","LinkElement","Link","SECTIONS_PATH","restProps","input","TextInput","onChangeHandler","maxLength","DocumentContainer","Document","pdfjs","GlobalWorkerOptions","workerSrc","PdfDocument","pdfDocument","setPdfDocument","rootDomElement","useEffect","getDocument","promise","then","loadedPdfDocument","parentElement","renderPdf","pages","num","numPages","getPage","page","renderPage","canvasContainer","pageNumber","viewport","getViewport","scale","canvas","canvasWrapper","createElement","classList","add","innerHeight","ctx","getContext","renderContext","canvasContext","appendChild","popupPdf","toggle","ReactDOM","createPortal","HintWrapper","HintContainer","HintElementsContainer","HintButton","Hint","hintShowOnce","showReviewHints","closePopover","hintElements","sticky","renameProperty","obj","currPropName","newPropName","modifiedObj","guid","uuidv4","guidWithHyphens","array","s","overwriteMerge","destinationArray","sourceArray","obj1","obj2","deepmerge","arrayMerge","property","hasInternalObjectsOrArrays","destinationObj","sourceObj","getItemPositionValues","deleteNumber","object","counter","sourceKey","shouldReplaceItem","arrayToObject","accum","k","v","createdBy","hasIntroductionContent","isCompleted","NOT_STARTED","isCrossDeviceSavingEnabled","isTrackingEnabled","isMeaningfulString","isIntroduced","isAuthorized","getAvatarLetter","btoa","responseAnswer","r","userSelected","isTrue","sort","compare","prev","next","getStringHash","charCodeAt","trim","getUserResponse","getEmbedCode","embedCode","getProjectId","projectId","questionContent","newAnswer","group","matchCase","markers","correctMarkers","markIsInSpot","mark","inside","j","xi","yi","xj","yj","isMarkerInsideInSpot","shuffleAnswerOptions","answerOptions","shuffledArray","shuffle","iterationCount","TextLabel","ButtonVote","rating","ratingLabelKey","ButtonsListItem","ButtonsListWrapper","EvaluateCourse","npsScore","Trophy","renderButtonsVote","fillOpacity","strokeOpacity","promoters","textAnchor","number","FeedbackContainer","EditableTextareaContainer","FeedbackStep","onSubmit","ThankForFeedback","fromDownloadCertificateButton","backTo","closeCourse","NpsPopup","steps","updateNpsScore","goToNextStep","updateTextFeedback","textFeedback","submitNpsFeedback","evaluate","backToResult","openClosePopup","closeCourseInScormMode","finalized","currentStep","currentNameBlock","POPUP_ID_CLOSE_COURSE","CloseCoursePopup","closePopupByTap","fadeInDown","string","sortById","getBackground","answerText","article","DescriptionText","secondaryFontText","DescriptionIcon","DescriptionWithBackground","iconName","descriptionText","descriptionTextAppearance","descriptionChildren","ShowAllQuestionAndContentItemsTypes","SubmitAnswerTypes","PreviousAttemptAnswerTypes","AnswerOptionsOrderTypes","QuestionPoolRandomizationTypes","getImageResizeUrl","scaleBySmallerSide","isSettingsLoadingFailed","getFonts","isLimited","attemptsLimit","getColors","getLogo","getAlternativeLogo","isMainLogoShown","isShowContentPagesEnabled","ALL_QUESTIONS_AT_ONCE","authoringToolUrl","accessLimitation","isAllowToSkipTrackingAndTracingEnabled","isLoginViaSocialMediaEnabled","DEFAULT_AUTH_URL","DEFAULT_LEARN_URL","allowedUsers","getSelectedLanguage","isAllowedDownloadCertificate","isOverallMasteryScore","isOverall","getMasteryScoreValue","isAllQuestionsOnOnePage","ONE_PAGE","isShowLearningHintsEnabled","nonSurveyQuestions","isQuestionRandomizeEnabled","subset","SAME_ON_EVERY_ATTEMPT","DIFFERENT_ON_EVERY_ATTEMPT","RANDOMIZE","SHOW","getTimerLimit","getMillisecondsFromTime","SIGNUP_PATH","PROGRESS_STORAGE_TIMER_UPDATE_INTERVAL","APP_STORE_TIMER_UPDATE_INTERVAL","transitionProperty","transitionDuration","transitionFunction","transitionDelay","toTimeString","bounce","crossFade","animateFrom","animateDuration","animateIteration","fontFamilyWithFallback","fallback","styledColors","fontStyles","isInverted","InvertedColor","styledFonts","textDecoration","textBackgroundColor","mediaFontSize","percentage","limitSize","bold","mainFontH1","mainFontH2","mainFontH3","mainFontH4","mainFontText","mainFontSmallText","secondaryFontH1","normal","secondaryFontSmallText","highlighted","links","getSection","getQuestionIds","getQuestionCount","getCourseQuestionCount","values","getQuestionIndex","questionIds","getCourseQuestionIndex","questionSelectors","getAffectProgressSectionsCount","getSectionsPassedCount","isSectionsPassed","isSectionsFailed","getAnsweredSectionsCount","getAnsweredOnceQuestionsInSecton","isSectionFailed","getAffectProgressQuestionsCountInSection","getAnsweredSectionQuestionsCount","getSectionProgress","affectProgressQuestionsCountInSection","answeredQuestionsCountInSection","getCorrectlyAffectProgressQuestionsCountInSection","getAffectCorrectlyAnsweredQuestionsCount","ceil","getSectionScore","sectionExists","getCorrectlyAnsweredQuestionsCount","getNonInfoContentQuestions","getSectionQuestions","getAnsweredAffectProgressQuestionsCountInSection","getSectionIndex","isLearningObjective","explanationBlock","answerList","explanationBlockId","explanationBlocks","block","transferPropBetweenObj","currentList","nameOfTargetProp","targetList","instructions","hints","correctFeedback","incorrectFeedback","hasContent","learningContents","questionInstructions","questionCorrectFeedbacks","questionIncorrectFeedbacks","explanation","hasCorrectFeedback","hasIncorrectFeedback","afterword","introduction","filterCourseData","courseSchema","temp","ctr","random","truncate","shortenOptionIds","mapOrder","order","b","mapRandomizedOptionsOrder","randomizedOptionsArray","questionWithRandomizedOptions","buildRandomizedOptions","buildQuestionWithRandomizedOptions","buildQuestionPool","tempQuestion","sortedQuestions","questionPoolId","loadPoolQuestions","questionPoolObjects","getShortenedIds","idLength","maxIdLength","shortenedIds","Set","clearPreviewQuestionId","markCourseAsPassed","affectProgressSections","sectionActions","updateScorePerCourse","affectProgressQuestions","correctlyAnsweredQuestionsCount","updateScorePerSection","totalScore","sum","makeSubmitAtOnce","updateSubmitAtOnceAttemptNumber","courseAttemptedSubmitAtOnce","setTimeSpent","getClickedId","clickedId","split","setTimerProgress","timerProgress","localStorageTimerProgress","elapsedTime","elapsedTimeDelta","parseInt","courseTimerActions","max","emitCourseProgressed","courseStatus","eventToCall","xapiStatus","updateScore","updateProgress","COURSE_DATA_LOADING_STARTED","courseMapper","processPoolQuestions","inProgressQuestionPool","getQuestionPool","randomQuestionsSubset","sampleSize","loadAnswers","showPrevAnswer","sectionIds","processRandomizeAnswers","storedRandomizedAnswersList","getRandomizeAnswers","setCourseAttempt","setCourseAttemptOnTimeOut","isProgressRestored","onCourseLaunched","onCourseStarted","loadPreviouslyAnsweredQuestions","restoreStatus","previewSectionId","questionUrl","shouldInitializeXapi","cleanup","isLogout","isXapiInitialized","startNewAttempt","currentAttemptCount","certificateDownloaded","RETRY_DELAY_MILLISECONDS","lastRequestSuccess","defaultRetryOptions","retryDelay","fetchRetry","fetch","originalFetch","getRequestOptions","Requester","mode","queryString","_buildQueryString","_buildHeaders","referrerPolicy","_headers","CACHE_EXPIRATION_DATE_IN_SECONDS","Pragma","Expires","matches","toUpperCase","getShortString","str","countOfSymbols","eos","strLength","substr","getSizeString","sizeStr","toFixed","isMeaningful","isUUID","getTextContent","textElement","innerHTML","textContent","char","decodeJson","ResourceLoader","expires","relativeUrl","responseText","POPUP_ID_NPS_POPUP","POPUP_ID_CONTINUE_LATER","POPUP_ID_START_NEW_ATTEMPT","POPUP_ID_CONTINUE_LATER_IN_SCORM","POPUP_ID_CLOSE_RESOURCE","POPUP_ID_START_OVER","POPUP_ID_TIMED_OUT","questionsLoaded","scoreContentPages","answerBeforeSubmit","submitAllAtOnce","informationContentExperienced","markAsOpened","resetProgress","initialScore","cleanupKeepAnswers","loadFeedback","contentActions","CourseTypes","animateFeedback","isAnimating","updateRetries","questionRetries","PageSidebar","BasicStyledSidebar","LayoutWrapper","Layout","PageContentWrapper","PageContent","PageContentChild","PageSection","LogoSidebar","LogoSidebarWrapper","ErrorContainer","ErrorIcon","ErrorTitle","h1","ErrorDescription","h3","SomethingWentWrongPage","settingsLoadingFailed","alternativeLogoUrl","popupExpanded","isUserAuthenticated","trackingEnabled","isResourceType","withScrollOnRedirect","scrollTo","ReconnectedIcon","ReconnectionWrapper","CircleWrapper","HeaderElement","ContentWrapper","NoteWrapper","Note","x1","x2","y1","y2","stopColor","ConnectionOverlay","popupAction","popupActions","Course","Resource","Shell","windowResizeHandler","throttle","hasError","showAlert","errorInfo","hasUnhandledError","withRouter","userAccessIsLimited","commonCSS","animationsCSS","BaseStyles","createGlobalStyle","resetCss","commonCss","animationsCss","Fragment","HashRouter","querySelector","Color","g","hex","hex2rgba","white","rgba2rgb","hexColor","alpha","shorthandRegex","m","rgbBackground","rgbaColor","getBorderColor","circleRotate","strokeRotate","strokeFix","strokeLeftGrow","strokeRightGrow","getGeneralLineStyle","lineStyle","getLineStyleStrokeRight","getLineStyleStrokeLeft","generalAnimationCircle","generalAnimation","generalAnimationStroke","generalAnimationRight","generalAnimationLeft","LoaderCircle","LoaderStroke","LoaderStrokeLeft","LoaderStrokeRight","fullSizeAbsoluteBlock","LayoutContainer","BackgroundContainer","PageSidebarChild","PageContainer","PageSidebarContainer","aside","PageContentContainer","BasicStylesSidebar","settingsSelector","correctQuestions","checkSectionFailed","checkSectionFailedTimedOut","updateSection","sectionAnswered","updateSectionAnsweredProgress","courseSelectors","onSectionIsPassed","sectionsLoaded","hours","minutes","seconds","getTimeFromMilliseconds","milliSeconds","format","totalSeconds","totalMinutes","totalHours","round","calculateTimeLeft","timeLimit","currentTimeElapsed","previousTimeElapsed","calculateTimeElapsed","trunc","getElapsedTimeInPercentage","timeLeft","currentUrl","poolUrlReset","normalizeFocus","Header1","Header2","h2","Header3","Header4","h4","Span","Paragraph","p","ellipsisMixin","components","refElement","ignoreFocus","fontName","TimerProgressProvider","valueStart","valueEnd","setValue","isTimerStopped","timeElapsed","strokeLinecap","trail","DigitContainer","Digits","Digit","digit","DigitalTimer","PauseIcon","TimerBlock","showDigitalTimer","useInterval","delay","savedCallbackRef","useRef","intervalId","setInterval","clearInterval","useTimeout","timerStatus","isPageVisible","submitAllQuestionsEnabled","courseStructure","unansweredQuestions","courseScore","hasAllQuestionsFailed","timerProgressKey","timerActions","treeOfContentActions","courseQuestionActions","usePageVisibility","setShowDigitalTimer","setStartedAt","setUpdatedAt","setTimeLeft","previousTimerStatus","timeRemaining","performance","TIMED_OUT","EmailWrapper","DescriptionElement","DescriptionWrapper","TitleElement","ContinueLaterWrapper","ContinueLater","onSendSecretLink","emailSent","emailSentError","onCloseCourse","hideMessage","renderDescription","descriptionElements","renderSecretLink","tooltipType","tooltipMessageKey","ContinueLaterInScorm","courseAction","IconContainer","ItemText","ActionListContainer","AvatarLetterElement","AvatarLetterContainer","TimerContainer","ExpandableWrapper","ariaHidden","MenuContainer","closeCoursePopupSettings","npsPopupSettings","UserMenu","onLogout","onContinueLater","onContinueLaterInScorm","onSubmitResult","npsEnabled","keyDown","lastElementChild","clickAction","itemTextKey","iconSettings","additionalProps","avatarLetter","saveCrossDevice","courseIsFinalized","hasCourseLaunched","isTimerEnabled","display","renderListItem","shouldHideListItem","bgHeader","aria-hidden","shouldRenderUserMenu","Popup"],"mappings":"gHAAA,yGAGaA,EAAY,SAACC,GAAD,OAAmD,SAAAC,GAC1EA,EAAS,CAAEC,KAAMC,IAAYC,WAAYC,QAAS,CAAEL,gBAGzCM,EAAa,kBAAmB,SAAAL,GAC3CA,EAAS,CAAEC,KAAMC,IAAYI,iB,iCCR/B,8OAAO,IAAMC,EAA+B,4CAE/BC,EAAqB,CAChCC,OAAQ,CACNC,MAAO,CACLC,IAAK,wCACLC,OAAQ,cAEVC,aAAc,CACZC,SAAS,EACTC,MAAO,UACPC,QAAS,KAGbC,KAAM,CACJH,SAAS,EACTC,MAAO,YAIEG,EAAiB,CAC5BC,UAAW,WAGAC,EAAgB,CAC3BC,SAAU,CACRC,WAAY,UAIHC,EAA0C,uBAC1CC,EAAoB,OACpBC,EAA8C,kC,iCCvBpD,IAAKvB,EAAZ,kC,SAAYA,K,wCAAAA,E,4CAAAA,E,0DAAAA,E,mEAAAA,M,uCCPL,IAAKA,EAAZ,kC,SAAYA,K,0BAAAA,E,sCAAAA,E,oCAAAA,E,2BAAAA,M,oMCwCG,M,4DA9BbwB,iB,OAKAC,kBAAoB,0CAAAC,EAAAC,OAAA,uDAAOC,EAAP,+BAAe,EAC3BC,EAAiC,CACrCC,YAAa,UACbC,KAAM,CACJH,MAAOA,EAAQ,KAEjBI,QAAS,CACP,eAAgB,mCAElBC,OAAQ,OACRC,aAAc,KAGVC,EAAQC,IAAgBC,cAE5BR,EAAeG,QAAU,CACvBM,cAAc,UAAD,OAAYH,GACzB,eAAgB,oCAjBF,kBAqBXI,IAAUC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AYpM,EAAe6B,kBAAmBA,IAAqB,IAE9E7B,GAAiB,kBAAC+N,EAAA,EAAD,UAtB5B,6CA4B0B,IAAD,EAOjBpwE,KAAKiH,MALPq7D,EAFmB,EAEnBA,oBACAC,EAHmB,EAGnBA,gBACA7jC,EAJmB,EAInBA,gBACAmS,EALmB,EAKnBA,QACA2xB,EANmB,EAMnBA,eAGF,OACGF,GAAuBC,IAAoB7jC,IAAoB8jC,GAAmB3xB,MAtCzF,GAA4BvmB,aAyDbphB,iBAdf,SAAyBnI,GACvB,MAAO,CACL+K,WAAY8iD,YAAc7tD,GAC1BshE,cAAe5iD,YAAmB1e,GAClCuhE,oBAAqB5tB,YAAgB3zC,GACrCwhE,gBAAiBhZ,YAAkBxoD,GACnC29B,gBAAiB9I,YAAsB70B,GACvC80B,gBAAiBjW,YAAmB7e,GACpC8vC,QAASjtC,YAAY7C,GACrB+0B,WAAYuU,YAAgBtpC,GAC5ByhE,eAAgB5yB,YAAW7uC,MAIhBmI,CAAyBm4D,M","file":"static/js/main.50541aee.chunk.js","sourcesContent":["import { ActionTypes } from './types';\nimport { ThunkResult } from '../types';\n\nexport const openPopup = (settings: { [key: string]: any }): ThunkResult => dispatch => {\n dispatch({ type: ActionTypes.OPEN_POPUP, payload: { settings } });\n};\n\nexport const closePopup = (): ThunkResult => dispatch => {\n dispatch({ type: ActionTypes.CLOSE_POPUP });\n};\n","export const DEFAULT_ALTERNATIVE_LOGO_URL = '//cdn.easygenerator.com/white-logo-v2.png';\n\nexport const DEFAULT_BACKGROUND = {\n header: {\n image: {\n url: '//cdn.easygenerator.com/images/14.jpg',\n option: 'fullscreen'\n },\n coverOverlay: {\n enabled: false,\n color: '#EC7111',\n opacity: 0.8\n }\n },\n body: {\n enabled: true,\n color: '#FFFFFF'\n }\n};\n\nexport const DEFAULT_COLORS = {\n textColor: '#363E4E'\n};\n\nexport const DEFAULT_FONTS = {\n mainFont: {\n fontFamily: 'Arial'\n }\n};\n\nexport const DEFAULT_SOMETHING_WENT_WRONG_TITLE_TEXT = 'Something went wrong';\nexport const DEFAULT_LOGO_TEXT = 'Logo';\nexport const DEFAULT_PLEASE_TRY_TY_REFRESH_THE_PAGE_TEXT = 'Please try to refresh the page';\n","export interface UserState {\n account: any | null; //TODO: change type any\n email: string;\n name: string;\n shortTermAccess: boolean;\n authorizationSkipped: boolean;\n userId?: string;\n}\n\nexport enum ActionTypes {\n USER_AUTHENTICATED = 'USER_AUTHENTICATED',\n USER_UNAUTHENTICATED = 'USER_UNAUTHENTICATED',\n USER_AUTHENTICATION_SKIPPED = 'USER_AUTHENTICATION_SKIPPED',\n USER_AUTHENTICATION_NOT_SKIPPED = 'USER_AUTHENTICATION_NOT_SKIPPED'\n}\ntype UserAuthenticated = {\n type: ActionTypes.USER_AUTHENTICATED;\n payload: any;\n};\n\ntype UserUnauthenticated = {\n type: ActionTypes.USER_UNAUTHENTICATED;\n};\n\ntype UserUserAuthenticationSkipped = {\n type: ActionTypes.USER_AUTHENTICATION_SKIPPED;\n};\n\ntype UserUserAuthenticationNotSkipped = {\n type: ActionTypes.USER_AUTHENTICATION_NOT_SKIPPED;\n};\n\nexport type UserActionTypes =\n | UserAuthenticated\n | UserUnauthenticated\n | UserUserAuthenticationSkipped\n | UserUserAuthenticationNotSkipped;\n","import { TimerStatus } from 'constants/timer';\n\nexport enum ActionTypes {\n START_TIMER = 'START_TIMER',\n SET_TIMER_ELAPSED = 'SET_TIMER_ELAPSED',\n SET_TIMER_STATUS = 'SET_TIMER_STATUS',\n RESET_TIMER = 'RESET_TIMER'\n}\n\nexport type TimerState = {\n status: TimerStatus;\n elapsed: number;\n};\n\ntype StartTimer = {\n type: ActionTypes.START_TIMER;\n};\n\ntype setTimerElapsed = {\n type: ActionTypes.SET_TIMER_ELAPSED;\n payload: {\n elapsed: number;\n };\n};\n\ntype setTimerStatus = {\n type: ActionTypes.SET_TIMER_STATUS;\n payload: {\n status: TimerStatus;\n };\n};\n\ntype ResetTimer = {\n type: ActionTypes.RESET_TIMER;\n};\n\nexport type TimerActionTypes = StartTimer | setTimerElapsed | setTimerStatus | ResetTimer;\n","import requester from '../http/requester';\nimport progressStorage from '../progressStorage';\n\ntype RequestOptions = {\n credentials: string;\n data: { [key: string]: any };\n headers: { [key: string]: any };\n retryOptions: { [key: string]: any };\n method: string;\n}\n\nclass Lti {\n callbackUrl: any;\n initialize(callbackUrl: any) {\n this.callbackUrl = callbackUrl;\n }\n\n submitResultToLti = async (score = 0) => {\n const requestOptions: RequestOptions = {\n credentials: 'include',\n data: {\n score: score / 100\n },\n headers: {\n 'Content-Type': 'application/json; charset=utf-8'\n },\n method: 'POST',\n retryOptions: {}\n };\n\n const token = progressStorage.getToken();\n if (token) {\n requestOptions.headers = {\n Authorization: `Bearer ${token}`,\n 'Content-Type': 'application/json; charset=utf-8'\n };\n }\n\n return requester.post(this.callbackUrl, requestOptions);\n };\n}\n\nexport default new Lti();\n","import { COURSE_FINISHED } from 'core/events/events';\nimport BaseEventHandler from 'core/events/eventHandler';\nimport lti from './lti';\n\nexport default class EventHandler extends BaseEventHandler {\n handlers: any[];\n\n constructor() {\n super();\n this.handlers = [{ event: COURSE_FINISHED, instance: this.submitResultToLti.bind(this) }];\n }\n\n initialize(callbackUrl: any) {\n lti.initialize(callbackUrl);\n }\n\n submitResultToLti({ score }: { [key: string]: any }) {\n lti.submitResultToLti(score);\n }\n}\n","import EventHandler from './eventHandler';\n\nclass Lti {\n eventHandler: EventHandler;\n constructor() {\n this.eventHandler = new EventHandler();\n }\n\n subscribe(callbackUrl: any) {\n this.eventHandler.on();\n this.eventHandler.initialize(callbackUrl);\n }\n\n unsubscribe() {\n this.eventHandler.off();\n }\n}\n\nexport default new Lti();\n","import * as userActions from 'store/user/actions';\nimport { getCourse, getCourseId } from 'store/course/selectors';\nimport { getValueFromUrl } from 'utils/window';\nimport { getUser, getName, getEmail, getAccount } from 'store/user/selectors';\nimport {\n isNpsEnabled,\n getXapiSettings,\n getPublishSettings,\n isResultsTrackingEnabled,\n getAuthoringToolUrl,\n isScorm2004Mode,\n isScoringOfContentPagesAllowed\n} from 'store/settings/selectors';\nimport progressStorage from 'core/progressStorage';\nimport eventEmitter, { events } from 'core/events/eventEmitter';\nimport { loadReviewFont } from 'components/mixins/reviewTypography';\nimport { isPreviewMode, isReviewMode } from '../settings/selectors';\nimport lti from '../../core/lti';\n\nimport { ActionTypes } from './types';\nimport { ThunkResult } from '../types';\n\nexport const initializeXapi = (): ThunkResult> => async (dispatch, getState) => {\n const state = getState();\n const { default: xApi } = await import('core/xApi');\n xApi.initialize({\n settings: {\n xApi: getXapiSettings(state),\n isScoringOfContentPagesAllowed: isScoringOfContentPagesAllowed(state)\n },\n defaultLrsUrl: getPublishSettings(state).defaultLRSUrl,\n defaultNpsUrl: getPublishSettings(state).defaultNpsUrl,\n course: getCourse(state),\n actor: {\n username: getName(state),\n email: getEmail(state),\n account: getAccount(state)\n }\n });\n dispatch({ type: ActionTypes.MODULE_XAPI_INITIALIZED });\n};\n\nexport const subscribeXapi = (): ThunkResult> => async (dispatch, getState) => {\n const { default: xApi } = await import('core/xApi');\n if (isResultsTrackingEnabled(getState())) {\n xApi.subscribeLrs();\n dispatch({ type: ActionTypes.MODULE_XAPI_LRS_ON });\n }\n if (isNpsEnabled(getState())) {\n xApi.subscribeNps();\n dispatch({ type: ActionTypes.MODULE_XAPI_NPS_ON });\n }\n};\n\nexport const unsubscribeXapi = (): ThunkResult> => async (dispatch) => {\n const { default: xApi } = await import('core/xApi');\n xApi.unsubscribeAll();\n\n dispatch({ type: ActionTypes.MODULE_XAPI_LRS_OFF });\n dispatch({ type: ActionTypes.MODULE_XAPI_NPS_OFF });\n};\n\n// TODO: need refactor\nexport const initializeScorm = (): ThunkResult> => async (dispatch, getState) => {\n const { default: scorm } = await import('core/scorm');\n await scorm.initialize(isScorm2004Mode(getState()));\n dispatch({ type: ActionTypes.MODULE_SCORM_INITIALIZED });\n dispatch(\n userActions.authenticate({\n name: scorm.userInfoProvider.getUsername(),\n email: scorm.userInfoProvider.getAccountId(),\n account: {\n homePage: scorm.userInfoProvider.getAccountHomePage(),\n name: scorm.userInfoProvider.getAccountId()\n }\n })\n );\n await eventEmitter.emit(events.APP_INITIALIZED, { state: getState(), isScormMode: true });\n await eventEmitter.emit(events.USER_AUTHENTICATED, getUser(getState()));\n progressStorage.use(scorm.progressProvider);\n};\n\nexport const subscribeProgressStorage = (): ThunkResult => (dispatch, getState) => {\n if (isPreviewMode(getState()) || isReviewMode(getState())) {\n return;\n }\n\n progressStorage.subscribe();\n dispatch({ type: ActionTypes.MODULE_PROGRESS_STORAGE_ON });\n};\n\nexport const unsubscribeProgressStorage = (): ThunkResult => dispatch => {\n progressStorage.unsubscribe();\n dispatch({ type: ActionTypes.MODULE_PROGRESS_STORAGE_OFF });\n};\n\nexport const enableReview = (): ThunkResult> => async (dispatch, getState) => {\n const editorWindow = window.parent;\n const locationProtocol = window.location.protocol;\n const targetOriginUrl = `${locationProtocol}//${getAuthoringToolUrl(getState())}`;\n editorWindow.postMessage({ supportsNativeReview: true }, targetOriginUrl);\n await loadReviewFont();\n const reviewApiUrl = getValueFromUrl('reviewApiUrl');\n const authoringToolDomain = getValueFromUrl('authoringToolDomain');\n const courseId = getCourseId(getState());\n const { default: review } = await import('core/review');\n review.subscribe();\n\n dispatch({ type: ActionTypes.ENABLE_REVIEW_MODE, payload: { reviewApiUrl } as any });\n eventEmitter.emit(events.REVIEW_INITIALIZED, { reviewApiUrl, courseId, authoringToolDomain });\n};\n\nexport const subscribeLti = (callbackUrl: any): ThunkResult => dispatch => {\n lti.subscribe(callbackUrl);\n dispatch({ type: ActionTypes.MODULE_LTI_INITIALIZED, payload: { isLTI: true } });\n};\n","import eventEmitter, { events } from 'core/events/eventEmitter';\nimport { TimerStatus } from 'constants/timer';\nimport { RootAppState } from 'store/types';\nimport { ActionTypes } from './types';\nimport { ThunkResult } from '../types';\nimport { getTimerElapsed, getTimerStatus } from './selectors';\n\nconst emitTimerProgress = async (state: RootAppState) => {\n await eventEmitter.emit(events.COURSE_TIMER_PROGRESSED, {\n ...state,\n timer: {\n status: getTimerStatus(state),\n elapsed: getTimerElapsed(state)\n }\n });\n};\n\nexport const startTimer = (): ThunkResult => dispatch => {\n dispatch({\n type: ActionTypes.START_TIMER\n });\n};\n\nexport const setTimerStatus = (status: TimerStatus): ThunkResult => dispatch => {\n dispatch({\n type: ActionTypes.SET_TIMER_STATUS,\n payload: {\n status\n }\n });\n};\n\nexport const setTimerElapsed = (elapsed: number): ThunkResult => async dispatch => {\n dispatch({\n type: ActionTypes.SET_TIMER_ELAPSED,\n payload: {\n elapsed\n }\n });\n};\n\nexport const resetTimer = (): ThunkResult => async dispatch => {\n dispatch({\n type: ActionTypes.RESET_TIMER\n });\n await eventEmitter.emit(events.RESET_TIMER_PROGRESS);\n};\n\nexport const updateTimerProgress = (): ThunkResult> => async (dispatch, getState) => {\n await emitTimerProgress(getState());\n};\n","import styled from 'styled-components';\n\n/* eslint-disable import/prefer-default-export */\n\ntype FigureProps = {\n arialabel: string;\n role: string\n}\nexport const Figure = styled.svg.attrs((props: FigureProps) => ({\n role: props.role,\n 'aria-label': props.arialabel\n})) `\n max-width: 100%;\n`;\n","import { RootAppState } from '../types';\n\nexport const isAppLoaded = (state: RootAppState) => state.app.isLoaded;\nexport const isAppLoadingFailed = (state: RootAppState) => state.app.isLoadingFailed;\nexport const isAppLoading = (state: RootAppState) => state.app.isLoading;\nexport const isLowResolution = (state: RootAppState) => state.app.isLowResolution;\nexport const isOffline = (state: RootAppState) => state.app.isOffline;\n","import styled from 'styled-components';\nimport { Text } from 'components/common';\nimport media from 'components/mixins/media';\n\nexport const TextElement = styled(Text)`\n font-weight: 300;\n color: ${props => props.theme.colors.textColor};\n font-size: 24px;\n ${media.mobile`\n font-size: 20px;\n padding: 0 40px;\n text-align: center;\n `};\n`;\n\nexport const ButtonsWrapper = styled.div`\n display: inline-block;\n margin-top: 40px;\n\n & > button {\n width: 100%;\n display: block;\n margin: 0 0 20px;\n }\n`;\n\nexport const Wrapper = styled.section`\n display: flex;\n flex-direction: column;\n align-items: center;\n position: relative;\n z-index: 1;\n`;\n","import * as React from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators, Dispatch } from 'redux';\nimport { localize } from 'core/localization';\nimport { RootAppState } from 'store/types';\nimport { Button } from 'components/common';\nimport { isScormMode, getLearnServiceUrl, isPreviewMode } from 'store/settings/selectors';\nimport * as navigationActions from 'store/navigation/actions';\nimport { TextElement, Wrapper, ButtonsWrapper } from './CloseCourse.styled';\nimport { isLtiInitialized } from 'store/modules/selectors';\n\ntype CloseCourseProps = {\n scormMode: boolean;\n isLti: boolean;\n previewMode: boolean;\n learnServiceUrl?: string;\n navigationActions: { [key: string]: any };\n};\n\nexport class CloseCourse extends React.PureComponent {\n render() {\n const { scormMode, navigationActions, learnServiceUrl, previewMode, isLti } = this.props;\n return (\n \n \n {isLti ? localize('[close lti course text]') : localize('[close course text]')}\n \n {!scormMode && !previewMode && !isLti && (\n \n \n \n )}\n \n );\n }\n}\n\nfunction mapStateToProps(state: RootAppState) {\n return {\n learnServiceUrl: getLearnServiceUrl(state),\n scormMode: isScormMode(state),\n isLti: isLtiInitialized(state),\n previewMode: isPreviewMode(state)\n };\n}\n\nfunction mapDispatchToProps(dispatch: Dispatch) {\n return {\n navigationActions: bindActionCreators(navigationActions, dispatch)\n };\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(CloseCourse);\n","export { default } from './CloseCourse';\n","import contentLoader from 'core/http/contentLoader';\nimport { ActionTypes, ContentState } from './types';\nimport { ThunkResult } from '../types';\n\nexport const contentsLoaded = (contents: any): ThunkResult => dispatch => {\n dispatch({ type: ActionTypes.CONTENTS_LOADED, payload: contents });\n loadAll(contents, dispatch); // TEMPORARY SOLUTION\n};\n\nconst loadContent = async (content: ContentState, dispatch: any) => {\n if (content.value) {\n return;\n }\n try {\n const value = await contentLoader.loadStaticHtmlContent(content.url);\n dispatch({ type: ActionTypes.CONTENT_LOADED, payload: { contentId: content.id, value } });\n } catch (e) {\n dispatch({ type: ActionTypes.CONTENT_LOADING_FAILED, payload: { contentId: content.id } });\n }\n};\n\nexport const loadContents = (contents: any): ThunkResult => async dispatch => {\n const promises: any[] = [];\n contents.forEach((content: ContentState) => {\n promises.push(loadContent(content, dispatch));\n });\n\n return Promise.all(promises);\n};\n\nasync function loadAll(contents: any, dispatch: any) {\n const promises = [];\n for (const content in contents) {\n promises.push(loadContent(contents[content], dispatch));\n }\n return Promise.all(promises);\n}\n","import { normalizeColorName, toCamelCase } from 'utils/string';\n\nexport default {\n map(options: any) {\n const { settings, publishSettings, manifest, translations, publishMode } = options;\n return {\n template: mapTemplateSettings(settings),\n publish: publishSettings,\n manifest,\n translations,\n publishMode\n };\n }\n};\n\nfunction mapTemplateSettings(settings: any) {\n return {\n fonts: mapFonts(settings.fonts),\n branding: {\n mainLogo: settings.branding.logo.url,\n alternativeLogo: settings.branding.alternativeLogo.url,\n allowToShowMainLogo: settings.branding.logo.allowToShowLogo,\n colors: mapColors(settings.branding.colors)\n },\n background: settings.branding.background,\n languages: settings.languages,\n saveProgressCrossDevice: settings.saveProgressCrossDevice,\n loginViaSocialMedia: settings.loginViaSocialMedia,\n conductLearnerSatisfactionSurvey: settings.conductLearnerSatisfactionSurvey,\n allowUsersToDownloadCertificates: settings.allowUsersToDownloadCertificates,\n showContentPages: settings.showContentPages,\n showLearningHints: settings.showLearningHints,\n resultsTracking: settings.resultsTracking,\n numberOfAttempts: settings.numberOfAttempts,\n allowUserToSkipTrackingAndTracing: settings.allowUserToSkipTrackingAndTracing,\n allowScoringOfContentPages: settings.allowScoringOfContentPages,\n answersFromPreviousAttempt: settings.answersFromPreviousAttempt,\n masteryScore: settings.masteryScore,\n showAllQuestionAndContentItems: settings.showAllQuestionAndContentItems,\n submitAnswers: settings.submitAnswers,\n xApi: settings.xApi,\n questionPool: settings.questionPool,\n randomizeQuestionOrder: settings.randomizeQuestionOrder,\n timer: settings.timer,\n answerOptionsOrder: settings.answerOptionsOrder\n };\n}\n\nfunction mapFonts(fonts: any) {\n return fonts.reduce((acc: any, item: any) => {\n acc[toCamelCase(item.key)] = item;\n return acc;\n }, {});\n}\n\nfunction mapColors(colors: any) {\n return colors.reduce((acc: any, item: any) => {\n acc[normalizeColorName(item.key)] = item.value;\n return acc;\n }, {});\n}\n","import { questionResponseReducers } from 'store/rootReducer';\nimport { QuestionsState } from './types';\n\nexport default function responseReducer(state: QuestionsState, action?: any) {\n if (!action || !action.payload || !action.payload.hasOwnProperty('questionId')) {\n return state;\n }\n\n const question = state[action.payload.questionId];\n if (!question) {\n return state;\n }\n question.response = reduceQuestionResponse(question.response, action);\n\n return state;\n}\n\nfunction reduceQuestionResponse(response: any, action: any) {\n questionResponseReducers.forEach(reducer => {\n response = reducer(response, action);\n });\n\n return response;\n}\n","import { combineReducers } from 'redux';\nimport { routerReducer } from 'react-router-redux';\n\nimport app from './app/reducer';\nimport settings from './settings/reducer';\nimport navigation from './navigation/reducer';\nimport course from './course/reducer';\nimport sections from './sections/reducer';\nimport contents from './contents/reducer';\nimport modules from './modules/reducer';\nimport treeOfContent from './treeOfContent/reducer';\nimport popup from './popup/reducer';\nimport loader from './loader/reducer';\nimport questions from './questions/reducer';\nimport multipleChoice from './questions/multipleChoice/responseReducer';\nimport StatementChoice from './questions/statementChoice/responseReducer';\nimport openQuestion from './questions/openQuestion/responseReducer';\nimport rankingText from './questions/rankingText/responseReducer';\nimport scenario from './questions/scenario/responseReducer';\nimport fillInTheBlank from './questions/fillInTheBlank/responseReducer';\nimport dragAndDropText from './questions/dragAndDropText/responseReducer';\nimport hotspot from './questions/hotspot/responseReducer';\nimport user from './user/reducer';\nimport textMatching from './questions/textMatching/responseReducer';\nimport resource from './resource/reducer';\nimport checklist from './resource/checklist/reducer';\nimport timer from './timer/reducer';\n\nconst rootReducer = combineReducers({\n app,\n course,\n modules,\n settings,\n router: routerReducer,\n questions,\n sections,\n contents,\n navigation,\n treeOfContent,\n popup,\n loader,\n user,\n resource,\n checklist,\n timer\n});\n\nexport type RootState = ReturnType;\n\nexport default rootReducer;\n\nexport const questionResponseReducers = [\n multipleChoice,\n StatementChoice,\n dragAndDropText,\n openQuestion,\n rankingText,\n scenario,\n fillInTheBlank,\n textMatching,\n hotspot\n];\n","import initialState from 'store/initialState';\nimport { ActionTypes, AppActionTypes } from './types';\n\nexport default function appReducer(state = initialState.app, action: AppActionTypes) {\n switch (action.type) {\n case ActionTypes.APP_LOADED:\n return Object.assign({}, state, {\n isLoading: false,\n isLoaded: true\n });\n case ActionTypes.APP_LOADING_FAILED:\n return Object.assign({}, state, {\n isLoading: false,\n isLoadingFailed: true\n });\n case ActionTypes.APP_RESOLUTION_CHANGED:\n return Object.assign({}, state, {\n ...action.payload\n });\n case ActionTypes.APP_OFFLINE_OR_SERVER_ERROR:\n return Object.assign({}, state, {\n isOffline: true\n });\n case ActionTypes.APP_ONLINE:\n return Object.assign({}, state, {\n isOffline: false\n });\n default:\n return state;\n }\n}\n","import initialState from 'store/initialState';\nimport { ProgressStatus } from 'constants/progressStatus';\nimport { ActionTypes, CourseActionTypes } from './types';\n\nexport default function courseReducer(state = initialState.course, action: CourseActionTypes) {\n switch (action.type) {\n case ActionTypes.COURSE_DATA_LOADED:\n return { ...state, ...action.payload };\n case ActionTypes.COURSE_DATA_LOADING_FAILED:\n return { ...state, ...{ isLoadingFailed: true } };\n case ActionTypes.COURSE_PROGRESS_RESTORED:\n return { ...state, ...{ attemptId: action.payload.attemptId, hasBeenContinued: true } };\n case ActionTypes.COURSE_LAUNCHED:\n return { ...state, ...{ attemptId: action.payload.attemptId, isLaunched: true } };\n case ActionTypes.COURSE_SUBMIT_AT_ONCE:\n return {\n ...state,\n ...{ isAttemptSubmitted: true, reAttemptedSubmitAtOnce: false }\n };\n case ActionTypes.COURSE_SUBMIT_AT_ONCE_LIMITED:\n return {\n ...state,\n ...{\n courseAttempt: action.payload.courseAttempt\n }\n };\n case ActionTypes.COURSE_REATTEMPTED_SUBMIT_AT_ONCE:\n return {\n ...state,\n ...{ isAttemptSubmitted: false, reAttemptedSubmitAtOnce: true }\n };\n case ActionTypes.COURSE_SCORE_UPDATED:\n return {\n ...state,\n ...{\n score: action.payload.score,\n status: action.payload.status\n }\n };\n case ActionTypes.COURSE_CLEANUP:\n return {\n ...state,\n ...{\n score: 0,\n status: ProgressStatus.IN_PROGRESS,\n attemptId: null,\n hasBeenContinued: false,\n isLaunched: false,\n isProgressRestoreFailed: false,\n isProgressRestoreFetched: false,\n isAttemptSubmitted: false,\n reAttemptedSubmitAtOnce: false,\n courseAttempt: 0,\n isCourseFinished: false\n }\n };\n case ActionTypes.CLEAR_PREVIEW_QUESTION_ID:\n delete state.previewQuestionId;\n return state;\n case ActionTypes.CERTIFICATE_DOWNLOADED:\n return { ...state, ...action.payload };\n case ActionTypes.COURSE_IS_PASSED:\n return { ...state, ...action.payload };\n case ActionTypes.COURSE_PROGRESS_RESTORE_FAILED:\n return { ...state, ...{ isProgressRestoreFailed: true } };\n case ActionTypes.COURSE_PROGRESS_RESTORE_FETCHED:\n return { ...state, ...{ isProgressRestoreFetched: true } };\n case ActionTypes.TIME_SPENT_UPDATED:\n return { ...state, ...action.payload };\n case ActionTypes.COURSE_IS_FAILED:\n return { ...state, ...action.payload };\n case ActionTypes.COURSE_RANDOMIZED_OPTIONS_LOADED:\n return { ...state, ...{ isRandomizedOptionsLoaded: true } };\n case ActionTypes.COURSE_FINISHED:\n return { ...state, ...{ isCourseFinished: true } };\n default:\n return state;\n }\n}\n","import initialState from 'store/initialState';\nimport { ActionTypes, ModulesActionTypes} from './types';\n\nexport default function modulesReducer(state = initialState.modules, action: ModulesActionTypes) {\n switch (action.type) {\n case ActionTypes.MODULE_XAPI_INITIALIZED:\n return {\n ...state,\n xapi: { ...state.xapi, isInitialized: true }\n };\n case ActionTypes.MODULE_XAPI_LRS_ON:\n return {\n ...state,\n xapi: { ...state.xapi, isLrsTrackingOn: true }\n };\n case ActionTypes.MODULE_XAPI_LRS_OFF:\n return {\n ...state,\n xapi: { ...state.xapi, isLrsTrackingOn: false }\n };\n case ActionTypes.MODULE_XAPI_NPS_ON:\n return {\n ...state,\n xapi: { ...state.xapi, isNpsTrackingOn: true }\n };\n case ActionTypes.MODULE_XAPI_NPS_OFF:\n return {\n ...state,\n xapi: { ...state.xapi, isNpsTrackingOn: false }\n };\n case ActionTypes.MODULE_SCORM_INITIALIZED:\n return {\n ...state,\n scorm: { ...state.scorm, isInitialized: true }\n };\n case ActionTypes.MODULE_PROGRESS_STORAGE_ON:\n return {\n ...state,\n progressStorage: { ...state.progressStorage, isProgressStorageOn: true }\n };\n case ActionTypes.MODULE_PROGRESS_STORAGE_OFF:\n return {\n ...state,\n progressStorage: { ...state.progressStorage, isProgressStorageOn: false }\n };\n case ActionTypes.ENABLE_REVIEW_MODE:\n return {\n ...state,\n review: {\n ...{\n ...state.review,\n isReviewModeEnabled: true,\n reviewApiUrl: action.payload.reviewApiUrl\n }\n }\n };\n case ActionTypes.MODULE_LTI_INITIALIZED:\n return {\n ...state,\n lti: { isInitialized: true }\n };\n default:\n return state;\n }\n}\n","import initialState from 'store/initialState';\nimport settingsMapper from 'core/mappers/settings';\nimport { ActionTypes, SettingsActionTypes } from './types';\n\nexport default function settingsReducer(\n state = initialState.settings,\n action: SettingsActionTypes\n) {\n switch (action.type) {\n case ActionTypes.SETTINGS_LOADED: {\n return { ...state, ...settingsMapper.map(action.settings) };\n }\n case ActionTypes.SETTINGS_LOADING_FAILED:\n return {\n ...state,\n ...{\n isLoadingFailed: true\n }\n };\n default:\n return state;\n }\n}\n","import initialState, { getInitialQuestionResponse } from 'store/initialState';\n\nimport responseReducers from './responseReducers';\nimport { QuestionActionTypes, ActionTypes, QuestionsState } from './types';\n\nexport default function questionReducer(\n state: QuestionsState = initialState.questions,\n action: QuestionActionTypes\n) {\n switch (action.type) {\n case ActionTypes.QUESTIONS_LOADED:\n return Object.assign({}, action.payload);\n case ActionTypes.QUESTION_PROGRESS_RESTORE:\n case ActionTypes.QUESTION_ANSWERED:\n return {\n ...state,\n [action.payload.id]: {\n ...state[action.payload.id],\n isAnswered: true,\n score: action.payload.score,\n isAnsweredCorrectly: action.payload.score === 100,\n attemptNumber: action.payload.attempt\n }\n };\n case ActionTypes.QUESTION_ANSWERED_BEFORE_SUBMIT:\n return {\n ...state,\n [action.payload.id]: {\n ...state[action.payload.id],\n isAnswered: true,\n score: 0,\n isAnsweredCorrectly: false,\n attemptNumber: action.payload.attempt\n }\n };\n case ActionTypes.QUESTION_UPDATE_SCORE:\n return {\n ...state,\n [action.payload.id]: {\n ...state[action.payload.id],\n isAnswered: true,\n score: action.payload.score,\n isAnsweredCorrectly: action.payload.score === 100\n }\n };\n case ActionTypes.QUESTION_OPENED:\n return {\n ...state,\n [action.payload.questionId]: {\n ...state[action.payload.questionId],\n hasBeenOpened: action.payload.hasBeenOpened\n }\n };\n case ActionTypes.QUESTION_PROGRESS_RESET:\n return {\n ...state,\n [action.payload.id]: {\n ...state[action.payload.id],\n isAnswered: false,\n isAnsweredCorrectly: false,\n score: 0,\n isPoolQuestion: action.payload.isPoolQuestion,\n response: getInitialQuestionResponse(action.payload.type)\n }\n };\n case ActionTypes.QUESTION_PROGRESS_RESET_ATTEMPT:\n return {\n ...state,\n [action.payload.id]: {\n ...state[action.payload.id],\n attemptNumber: 0\n }\n };\n case ActionTypes.QUESTION_PROGRESS_RESET_KEEP_ANSWER:\n return {\n ...state,\n [action.payload.id]: {\n ...state[action.payload.id],\n hasBeenOpened: false,\n isAnswered: false,\n isAnsweredCorrectly: false,\n score: 0\n }\n };\n case ActionTypes.QUESTION_RESTORE_RESPONSE:\n return {\n ...state,\n [action.payload.id]: {\n ...state[action.payload.id],\n response: action.payload.response,\n hasBeenOpened: true,\n attemptNumber: action.payload.attempt\n }\n };\n case ActionTypes.QUESTION_RESTORE_SHOW_PREV_ANSWER:\n return {\n ...state,\n [action.payload.id]: {\n ...state[action.payload.id],\n response: action.payload.response\n }\n };\n case ActionTypes.FEEDBACK_ANIMATING:\n return {\n ...state,\n [action.payload.id]: {\n ...state[action.payload.id],\n isFeedbackAnimating: action.payload.isFeedbackAnimating\n }\n };\n case ActionTypes.QUESTION_UPDATE_RETRY:\n return {\n ...state,\n [action.payload.questionId]: {\n ...state[action.payload.questionId],\n retries: action.payload.retries\n }\n };\n default:\n return responseReducers(state, action);\n }\n}\n","import initialState from 'store/initialState';\nimport { ActionTypes, SectionsActionTypes } from './types';\n\nexport default function sectionsReducer(\n state = initialState.sections,\n action: SectionsActionTypes\n) {\n switch (action.type) {\n case ActionTypes.SECTIONS_LOADED:\n return { ...state, ...action.payload };\n case ActionTypes.SECTION_SCORE_UPDATED:\n state[action.payload.id] = {\n ...state[action.payload.id],\n score: action.payload.score,\n status: action.payload.status\n };\n return { ...state };\n case ActionTypes.SECTION_IS_PASSED:\n state[action.payload.id] = {\n ...state[action.payload.id],\n status: action.payload.status\n };\n return { ...state };\n case ActionTypes.SECTION_ANSWERED:\n state[action.payload.id] = {\n ...state[action.payload.id],\n isSectionAnswered: action.payload.isSectionAnswered\n };\n return { ...state };\n case ActionTypes.SECTION_ANSWERED_SCORE:\n state[action.payload.id] = {\n ...state[action.payload.id],\n sectionProgress: action.payload.sectionProgress\n };\n return { ...state };\n default:\n return state;\n }\n}\n","import initialState from 'store/initialState';\nimport { ActionTypes, ContentsActionTypes } from './types';\n\nexport default function contentReducer(state = initialState.contents, action: ContentsActionTypes) {\n switch (action.type) {\n case ActionTypes.CONTENTS_LOADED:\n return { ...state, ...action.payload };\n case ActionTypes.CONTENT_LOADED:\n return {\n ...state,\n [action.payload.contentId]: {\n ...state[action.payload.contentId],\n value: action.payload.value\n }\n };\n default:\n return state;\n }\n}\n","import initialState from 'store/initialState';\nimport { getQuestionUrl, getLearningObjectiveUrl } from 'utils/navigation';\nimport { RESULTS_PATH } from 'constants/navigation';\nimport { ActionTypes as SectionsActions, SectionsActionTypes } from 'store/sections/types';\nimport { ActionTypes, NavigationActionTypes } from './types';\n\nexport default function navigationReducer(\n state = initialState.navigation,\n action: NavigationActionTypes | SectionsActionTypes\n) {\n switch (action.type) {\n case SectionsActions.SECTIONS_LOADED: {\n const urls = [];\n for (const sectionId in action.payload) {\n if (action.payload[sectionId].learningObjective) {\n urls.push(getLearningObjectiveUrl(sectionId));\n }\n action.payload[sectionId].questions.forEach((questionId: string) => {\n urls.push(getQuestionUrl(sectionId, questionId));\n });\n }\n\n urls.push(RESULTS_PATH);\n return { ...state, ...{ chain: urls } };\n }\n case ActionTypes.NAVIGATED_INSIDE_THE_APP: {\n return { ...state, ...{ prevUrl: action.payload.prevUrl } };\n }\n case ActionTypes.POOL_URL_LOADED: {\n const urls = [];\n for (const poolQuestions in action.payload) {\n if (action.payload[poolQuestions].isPoolQuestion === true) {\n urls.push(\n getQuestionUrl(\n action.payload[poolQuestions].sectionId,\n action.payload[poolQuestions].id\n )\n );\n }\n }\n\n urls.push(RESULTS_PATH);\n return { ...state, ...{ chain: urls } };\n }\n case ActionTypes.ELEMENT_ID_IN_VIEWPORT_UPDATED: {\n return { ...state, ...{ elementIdInViewport: action.payload.elementIdInViewport } };\n }\n default:\n return state;\n }\n}\n","import initialState from 'store/initialState';\nimport { ActionTypes, TOCActionTypes } from './types';\n\nexport default function treeOfContentReducer(\n state = initialState.treeOfContent,\n action: TOCActionTypes\n) {\n switch (action.type) {\n case ActionTypes.TOC_TOGGLE_VISIBILITY:\n return { ...state, ...{ isExpanded: !state.isExpanded } };\n case ActionTypes.COURSE_ENABLE_SUBMIT_BUTTON:\n return {\n ...state,\n ...{\n isSubmitButtonVisible: action.payload.isSubmitButtonVisible\n }\n };\n default:\n return state;\n }\n}\n","import initialState from 'store/initialState';\nimport { ActionTypes, PopupActionTypes } from './types';\n\nexport default function popupReducer(state = initialState.popup, action: PopupActionTypes) {\n switch (action.type) {\n case ActionTypes.OPEN_POPUP:\n return {\n ...state,\n ...{ isExpanded: !state.isExpanded, settings: action.payload.settings }\n };\n case ActionTypes.CLOSE_POPUP:\n delete state.settings;\n return { ...state, ...{ isExpanded: !state.isExpanded } };\n default:\n return state;\n }\n}\n","import initialState from 'store/initialState';\nimport { ActionTypes, LoaderActionTypes } from './types';\n\nexport default function loaderReducer(state = initialState.loader, action: LoaderActionTypes) {\n switch (action.type) {\n case ActionTypes.OPEN_LOADER:\n return { ...state, ...{ isLoaded: true } };\n case ActionTypes.CLOSE_LOADER:\n return { ...state, ...{ isLoaded: false } };\n default:\n return state;\n }\n}\n","import initialState from 'store/initialState';\nimport { ActionTypes, UserActionTypes } from './types';\n\nexport default function loginReducer(state = initialState.user, action: UserActionTypes) {\n switch (action.type) {\n case ActionTypes.USER_AUTHENTICATED:\n return { ...state, ...action.payload };\n case ActionTypes.USER_UNAUTHENTICATED:\n return { ...state, ...initialState.user };\n case ActionTypes.USER_AUTHENTICATION_SKIPPED:\n return { ...state, ...initialState.user, ...{ authorizationSkipped: true } };\n case ActionTypes.USER_AUTHENTICATION_NOT_SKIPPED:\n return { ...state, ...initialState.user, ...{ authorizationSkipped: false } };\n default:\n return state;\n }\n}\n","import initialState from 'store/initialState';\nimport { ResourceActionTypes, ActionTypes } from './types';\n\nexport default function resourcesReducer(\n state = initialState.resource,\n action: ResourceActionTypes\n) {\n switch (action.type) {\n case ActionTypes.RESOURCE_DATA_LOADED:\n return { ...state, ...action.payload };\n case ActionTypes.RESOURCE_DATA_LOADING_FAILED:\n return { ...state, ...{ isLoadingFailed: true } };\n default:\n return state;\n }\n}\n","\nimport initialState from 'store/initialState';\nimport { ActionTypes, ChecklistActionTypes } from './types';\n\nexport default function checklistReducer(\n state= initialState.checklist,\n action: ChecklistActionTypes\n) {\n switch (action.type) {\n case ActionTypes.TOGGLE_CHECK:\n case ActionTypes.INIT_CHECKLIST:\n return { ...state, ...action.payload };\n default:\n return state;\n }\n}\n","import initialState from 'store/initialState';\nimport { TimerStatus } from 'constants/timer';\nimport { ActionTypes, TimerActionTypes } from './types';\n\nexport default function timerReducer(state = initialState.timer, action: TimerActionTypes) {\n switch (action.type) {\n case ActionTypes.START_TIMER: {\n return {\n ...state,\n status: TimerStatus.STARTED\n };\n }\n case ActionTypes.SET_TIMER_STATUS: {\n const { status } = action.payload;\n return {\n ...state,\n status\n };\n }\n case ActionTypes.SET_TIMER_ELAPSED: {\n const { elapsed } = action.payload;\n return {\n ...state,\n elapsed\n };\n }\n case ActionTypes.RESET_TIMER:\n return {\n ...state,\n status: TimerStatus.RESET,\n elapsed: 0,\n startedAt: 0,\n updatedAt: 0\n };\n default:\n return state;\n }\n}\n","import { toggleArrayElement } from 'utils/object';\nimport { ActionTypes, MultipleChoiceActionTypes } from './types';\nimport { QuestionsState } from '../types';\n\nexport default function reducer(state: QuestionsState, action: MultipleChoiceActionTypes) {\n const questionState: any = state;\n\n switch (action.type) {\n case ActionTypes.QUESTION_MULTIPLECHOICE_TOGGLE_ANSWER_IS_SELECTED:\n return toggleArrayElement(questionState, action.payload.answerId);\n case ActionTypes.QUESTION_MULTIPLECHOICE_SET_SINGLE_ANSWER_SELECTED:\n case ActionTypes.SET_SINGLE_ANSWER_SELECTED:\n questionState.splice(0, questionState.length, action.payload.answerId);\n return state;\n default:\n return state;\n }\n}\n","import { toggleArrayStatementElement } from 'utils/object';\nimport { ActionTypes, StatementChoiceActionTypes } from './types';\nimport { QuestionsState } from '../types';\n\nexport default function reducer(state: QuestionsState, action: StatementChoiceActionTypes) {\n switch (action.type) {\n case ActionTypes.QUESTION_STATEMENT_ANSWER_IS_SELECTED:\n return toggleArrayStatementElement(state as any, {\n id: action.payload.answerId,\n isCorrect: action.payload.isCorrect\n });\n default:\n return state;\n }\n}\n","import { ActionTypes, DragAndDropActionTypes } from './types';\nimport { QuestionsState } from '../types';\n\n\nexport default function reducer(state: QuestionsState, action: DragAndDropActionTypes) {\n switch (action.type) {\n case ActionTypes.QUESTION_DRAG_AND_DROP_ANSWERS_ARE_SELECTED:\n return action.payload.answers;\n default:\n return state;\n }\n}\n","import { ActionTypes, OpenQuestionActionTypes } from './types';\nimport { QuestionsState } from '../types';\n\nexport default function reducer(state: QuestionsState, action: OpenQuestionActionTypes) {\n switch (action.type) {\n case ActionTypes.OPEN_QUESTION_ANSWER_IS_SELECTED:\n return {\n id: action.payload.questionId,\n answeredText: action.payload.answeredText\n };\n default:\n return state;\n }\n}\n","import { ActionTypes, RankingTextActionTypes } from './types';\nimport { QuestionsState } from '../types';\n\nexport default function reducer(state: QuestionsState, action: RankingTextActionTypes) {\n switch (action.type) {\n case ActionTypes.QUESTION_RANKING_ANSWERS_ARE_SELECTED:\n return action.payload.answers;\n default:\n return state;\n }\n}\n","import { ActionTypes, ScenarioActionTypes } from './types';\nimport { QuestionsState } from '../types';\n\nexport default function reducer(state: QuestionsState, action: ScenarioActionTypes) {\n switch (action.type) {\n case ActionTypes.QUESTION_SCENARIO_BRANCHTRACK_DATA:\n return {\n score: action.payload.score,\n isFinished: action.payload.isFinished\n };\n default:\n return state;\n }\n}\n","import { ActionTypes, FillInTheBlankActionTypes } from './types';\nimport { QuestionsState } from '../types';\n\nexport default function reducer(state: QuestionsState, action: FillInTheBlankActionTypes) {\n switch (action.type) {\n case ActionTypes.FILL_IN_THE_BLANK_ANSWER:\n return {\n data: action.payload.data\n };\n default:\n return state;\n }\n}\n","import { ActionTypes, TextMatchingActionTypes } from './types';\nimport { QuestionsState } from '../types';\n\nexport default function reducer(state: QuestionsState, action: TextMatchingActionTypes) {\n switch (action.type) {\n case ActionTypes.QUESTION_MATCHING_ANSWERS_ARE_SELECTED:\n return action.payload.answers;\n default:\n return state;\n }\n}\n","import { ActionTypes, HotspotActionTypes } from './types';\nimport { QuestionsState } from '../types';\n\nexport default function reducer(state: QuestionsState, action: HotspotActionTypes) {\n switch (action.type) {\n case ActionTypes.HOTSPOT_QUESTION_ANSWER:\n return action.payload.data;\n default:\n return state;\n }\n}\n","import { createStore, applyMiddleware, compose } from 'redux';\nimport { routerMiddleware } from 'react-router-redux';\nimport thunk from 'redux-thunk';\nimport { createHashHistory } from 'history';\nimport rootReducer from './rootReducer';\nimport initialState, { initialize } from './initialState';\n\nexport const history = createHashHistory();\n\nconst enhancers = [];\nconst middleware = [thunk, routerMiddleware(history)];\n\nif (process.env.NODE_ENV === 'development') {\n const devToolsExtension = window.devToolsExtension; // eslint-disable-line prefer-destructuring\n\n if (typeof devToolsExtension === 'function') {\n enhancers.push(devToolsExtension());\n }\n}\n\nconst composedEnhancers = compose(applyMiddleware(...middleware), ...enhancers);\n\ninitialize();\nconst store = createStore(rootReducer, initialState, composedEnhancers);\n\nexport type AppDispatch = typeof store.dispatch;\n\nexport default store;\n","export enum ActionTypes {\n NAVIGATED_INSIDE_THE_APP = 'NAVIGATED_INSIDE_THE_APP',\n POOL_URL_LOADED = 'POOL_URL_LOADED',\n ELEMENT_ID_IN_VIEWPORT_UPDATED = 'ELEMENT_ID_IN_VIEWPORT_UPDATED'\n}\n\ntype NavigatedInsideApp = {\n type: ActionTypes.NAVIGATED_INSIDE_THE_APP;\n payload: {\n prevUrl: string;\n currentUrl: string;\n };\n};\n\ntype PoolUrlLoaded = {\n type: ActionTypes.POOL_URL_LOADED;\n payload: {\n [poolQuestions: string]: any;\n };\n};\n\ntype elementIdInViewPortUpdated = {\n type: ActionTypes.ELEMENT_ID_IN_VIEWPORT_UPDATED;\n payload: {\n elementIdInViewport: string;\n };\n};\n\nexport type NavigationActionTypes = NavigatedInsideApp | elementIdInViewPortUpdated | PoolUrlLoaded;\n","import { createSelector } from 'reselect';\nimport { RootAppState } from '../types';\n/* eslint-disable import/prefer-default-export */\nexport const getContents = createSelector(\n state => state,\n (state: RootAppState, ids: string[]) => ids,\n (state, ids) => {\n let contents: any[] = [];\n if (ids) ids.forEach(id => contents.push(state.contents[id]));\n return contents;\n }\n);\n/* eslint-enable */\n","import Emmitery from 'emittery';\nimport * as eventConstants from './events';\n\nconst eventEmitter = new Emmitery();\nexport default eventEmitter;\n\nexport const events = eventConstants;\n","import styled from 'styled-components';\nimport { transition } from 'components/mixins/interactivity';\n\ntype IconElementProps = {\n size: number;\n opacity: any;\n};\n/* eslint-disable import/prefer-default-export */\nexport const IconElement = styled.span`\n position: relative;\n font-size: ${props => `${props.size}px`};\n color: ${props => getColor(props)};\n opacity: ${props => props.opacity};\n ${transition('color')};\n`;\n\ntype TextElementProps = {\n fontSize: number;\n theme?: { [key: string]: any };\n};\nexport const TextElement = styled.span`\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n font-weight: 600;\n font-size: ${props => `${props.fontSize}px`};\n color: ${props => getColor(props)};\n ${transition('color')};\n`;\n\nfunction getColor(props: any) {\n if (props.getColor) {\n return props.getColor(props.theme.colors);\n }\n\n return props.theme.colors[props.color];\n}\n","import styled, { keyframes, css } from 'styled-components';\nimport Text from 'components/common/Text';\nimport Icon from 'components/common/Icon';\nimport { transition } from 'components/mixins/interactivity';\nimport { transparentize } from 'utils/color';\nimport { SIZES, SWITCH_BUTTON_LAYOUT } from 'constants/components';\nimport { defaultBoxShadowColor } from 'constants/common';\n\nexport const CheckIcon = styled(Icon)``;\n\nexport const CheckImageIcon = styled(Icon)`\n opacity: 0;\n transition: 0.3s;\n position: absolute;\n top: 0;\n left: 0;\n`;\n\ntype TextElement = {\n selected: boolean;\n}\nexport const TextElement = styled(Text) `\n color: ${props => props.theme.colors.textColor};\n ${transition('padding-right')};\n`;\n\nexport const AnswerImage = styled.img.attrs((props: any) => ({\n alt: props.alt\n}))`\n position: absolute;\n top: -6000px;\n bottom: -6000px;\n right: -6000px;\n left: -6000px;\n margin: auto;\n`;\n\ntype ButtonElementProps = {\n selected: boolean;\n multiple: boolean;\n size: any;\n layout: string;\n imageUrl?: string;\n}\n\nexport const ButtonElement = styled.div.attrs((props: ButtonElementProps) => ({\n 'data-test': 'button-element',\n 'data-state': (props.selected ? 'selected' : 'not-selected')\n})) `\n flex-shrink: 0;\n align-self: self-start;\n display: flex;\n justify-content: center;\n align-items: center;\n ${props =>\n props.layout === SWITCH_BUTTON_LAYOUT.QUESTION &&\n css`\n width: 30px;\n height: 30px;\n background-color: ${props.selected\n ? props.theme.colors.mainColor\n : transparentize(props.theme.colors.textColor, 0.06)};\n border-radius: ${props.multiple ? '2px' : '50%'};\n margin-right: 20px;\n `\n }\n\n ${props =>\n props.layout === SWITCH_BUTTON_LAYOUT.CHECKLIST\n ? css`\n width: 32px;\n height: 32px;\n background-color: ${props.selected\n ? props.theme.colors.mainColor\n : 'transparent'};\n border-radius: 8px;\n border: ${!props.selected\n ? `3px solid ${props.theme.colors.mainColor}`\n : `none`};\n `\n : css`\n position: absolute;\n top: 50%;\n left: 10px;\n margin-top: -15px;\n `\n }\n \n ${props =>\n props.size === SIZES.SMALL &&\n css`\n width: 15px;\n height: 15px;\n margin-right: 8px;\n\n & ${CheckIcon} {\n font-size: 5px;\n }\n `};\n\n ${props =>\n props.multiple\n ? css`\n & ${CheckIcon} {\n opacity: ${props.selected ? '1' : '0'};\n color: ${props.selected\n ? props.theme.colors.buttonTextColor\n : transparentize(props.theme.colors.textColor, 0.2)};\n\n ${props.layout === SWITCH_BUTTON_LAYOUT.CHECKLIST &&\n `\n color:${props.selected\n ? props.theme.colors.buttonTextColor\n : transparentize(props.theme.colors.mainColor, 0.3)};\n }\n &:hover {\n cursor: pointer;\n box-shadow: 0 0 8px 0 ${transparentize(props.theme.colors.mainColor, 0.3)}\n }\n `\n }\n }\n `\n : css`\n & ${CheckIcon} {\n display: none;\n }\n\n &:before {\n content: '';\n display: inline-block;\n width: 10px;\n height: 10px;\n background-color: #fff ${props.selected ? '!important' : ''};\n border-radius: 50%;\n opacity: ${props.selected ? '1' : '0'};\n }\n `};\n \n ${props =>\n props.imageUrl\n ? css`\n position: absolute;\n width: 60px;\n height: 60px;\n top: 50%;\n left: 50%;\n margin-top: -30px;\n margin-left: -30px;\n margin-right: 0;\n box-shadow: 0 2px 10px 0 ${transparentize(defaultBoxShadowColor, 0.1)};\n transition: 0.3s;\n\n ${props.selected\n ? css`\n background-color: ${props.theme.colors.mainColor};\n opacity: 1 !important;\n `\n : css`\n opacity: 0;\n background-color: transparent !important;\n `};\n\n & ${CheckIcon} {\n display: block;\n transition: 0.3s;\n ${props.selected ? 'opacity: 1 !important' : 'opacity: 0 !important'};\n font-size: 14px;\n }\n & ${CheckImageIcon} {\n ${!props.selected ? 'opacity: 1' : ''};\n }\n\n &:before {\n display: none;\n }\n `\n : css``};\n }\n`;\n\nconst checkMarkAnimate = keyframes`\n 0% {\n transform: scale(1);\n }\n 50% {\n transform: scale(0.85);\n }\n 100% {\n transform: rotate(1);\n }\n`;\n\ntype ButtonWrapperProps = {\n tabIndex: number;\n roleValue: string;\n imageUrl?: string;\n ariaLabel?: string;\n ariaDisabled: boolean;\n selected: boolean;\n ariaChecked: boolean;\n layout: string;\n}\nexport const ButtonWrapper = styled.div.attrs((props: ButtonWrapperProps) => ({\n tabIndex: props.tabIndex,\n role: props.roleValue,\n 'aria-label': (props.imageUrl ? props.ariaLabel : undefined),\n 'data-state': (props.selected ? 'selected' : 'not-selected'),\n 'aria-disabled': props.ariaDisabled,\n 'data-test': 'switch-button'\n})) `\n height: 100%;\n width: 100%;\n position: relative;\n overflow: hidden;\n display: flex;\n\n ${props =>\n props.layout === SWITCH_BUTTON_LAYOUT.QUESTION &&\n css`\n padding: 10px;\n padding-left: 60px;\n `\n }\n\n &:hover {\n & ${CheckIcon} {\n opacity: 1;\n }\n ${ButtonElement}:before {\n opacity: 1;\n background-color: ${props => transparentize(props.theme.colors.textColor, 0.2)};\n }\n }\n\n ${props =>\n props.selected && props.imageUrl\n ? css`\n ${ButtonElement} {\n animation: ${checkMarkAnimate} 0.4s linear 1 both;\n }\n `\n : css``};\n &:focus {\n .show-on-hover {\n opacity: 0.75;\n }\n`;\n","export type ContentState = {\n id: string;\n children: ContentState[];\n value: string;\n url: string;\n}\n\nexport type ContentsState = {\n [key: string]: ContentState\n}\n\nexport enum ActionTypes {\n CONTENTS_LOADED = 'CONTENTS_LOADED',\n CONTENT_LOADED = \"CONTENT_LOADED\",\n CONTENT_LOADING_FAILED = \"CONTENT_LOADING_FAILED\"\n}\n\ntype ContentsLoaded = {\n type: ActionTypes.CONTENTS_LOADED,\n payload: {\n contents: any\n }\n}\ntype ContentLoadedSuccess = {\n type: ActionTypes.CONTENT_LOADED;\n payload: {\n contentId: string;\n value: any;\n }\n}\n\ntype ContentLoadedFailed = {\n type: ActionTypes.CONTENT_LOADING_FAILED;\n payload?: {\n contentId: string;\n }\n}\n\n\nexport type ContentsActionTypes = ContentsLoaded | ContentLoadedSuccess | ContentLoadedFailed;\n","export enum ActionTypes {\n RESOURCE_DATA_LOADING_STARTED = 'RESOURCE_DATA_LOADING_STARTED',\n RESOURCE_DATA_LOADED = 'RESOURCE_DATA_LOADED',\n RESOURCE_DATA_LOADING_FAILED = 'RESOURCE_DATA_LOADING_FAILED',\n}\n\nexport type ResourceState = {\n id: string;\n resourceType: string; // enum\n title: string;\n createdBy: string;\n createdOn: Date;\n contentId: string;\n resourceContents: [];\n};\n\ninterface ResourceDataLoadingStarted {\n type: ActionTypes.RESOURCE_DATA_LOADING_STARTED;\n}\n\ninterface ResourceDataLoaded {\n type: ActionTypes.RESOURCE_DATA_LOADED;\n payload: ResourceState;\n}\n\ninterface ResourceDataLoadedFailed {\n type: ActionTypes.RESOURCE_DATA_LOADING_FAILED;\n reason: any;\n}\n\nexport type ResourceActionTypes =\n | ResourceDataLoadingStarted\n | ResourceDataLoaded\n | ResourceDataLoadedFailed;\n","import styled, { css } from 'styled-components';\nimport Text from 'components/common/Text';\nimport { BUTTON, SIZES } from 'constants/components';\nimport Icon from 'components/common/Icon';\nimport { transition } from 'components/mixins/interactivity';\nimport buttonDefaultStyle from 'components/mixins/normalize';\nimport { MEDIA_LARGE } from 'constants/screenResolutions';\nimport { transparentize } from 'utils/color';\nimport { Layout, Size } from './Button';\n\ntype TextElementProps = {\n layout: keyof Layout;\n};\nexport const TextElement = styled(Text)`\n color: ${props => props.theme.colors.buttonTextColor};\n font-size: 14px;\n font-weight: 600;\n ${transition('padding-right')};\n`;\n\nexport const IconElement = styled(Icon)`\n visibility: hidden;\n position: absolute;\n opacity: 0;\n top: 50%;\n transform: translate(0, -250%);\n right: 30px;\n transition: transform 0.1s ease-out, opacity 0.2s ease-out;\n transition-delay: 0.1s;\n`;\ntype ButtonElementProps = {\n tabIndex: number;\n 'data-test': string;\n textTransform: string;\n suffixIcon: string;\n isLoading: boolean;\n layout: keyof Layout;\n size: keyof Size;\n inverted: boolean;\n disabled: boolean;\n};\nexport const ButtonElement = styled.button.attrs((props: ButtonElementProps) => ({\n tabIndex: props.tabIndex,\n disabled: props.disabled,\n 'data-test': props['data-test']\n}))`\n ${buttonDefaultStyle};\n display: inline-flex;\n position: relative;\n overflow: hidden;\n border-radius: 30px;\n cursor: pointer;\n transition: all 0.1s ease-out, focus 0s;\n align-items: center;\n text-transform: ${props => (props.textTransform ? props.textTransform : 'none')};\n\n ${props =>\n props.disabled &&\n css`\n pointer-events: none;\n `}\n\n ${props =>\n props.suffixIcon &&\n css`\n @media (min-width: ${MEDIA_LARGE}px) {\n &:hover ${TextElement}, &:focus ${TextElement} {\n padding-right: 20px;\n }\n &:hover ${IconElement}, &:focus ${IconElement} {\n visibility: visible;\n opacity: 1;\n transform: translate(0, -50%);\n }\n }\n `};\n\n ${props =>\n props.isLoading &&\n css`\n pointer-events: none;\n ${TextElement}, ${IconElement} {\n visibility: hidden;\n }\n `};\n\n ${props =>\n props.layout === BUTTON.LAYOUT.PRIMARY &&\n css`\n background-color: ${props.theme.colors.ctaButtonColor};\n &:hover,\n &:focus {\n background-color: ${() =>\n transparentize(props.theme.colors.ctaButtonColor, 0.85, { solidColor: true })};\n }\n &:focus {\n outline: 1px solid black;\n }\n &:focus:not(:focus-visible) {\n outline: none;\n }\n ${props.isLoading &&\n css`\n background-color: ${() => transparentize(props.theme.colors.ctaButtonColor, 0.05)};\n &:hover,\n &:focus {\n background-color: ${() => transparentize(props.theme.colors.ctaButtonColor, 0.05)};\n }\n `};\n `};\n\n ${props =>\n props.layout === BUTTON.LAYOUT.SECONDARY &&\n css`\n border: 2px solid\n ${props.inverted\n ? transparentize(props.theme.colors.coverBgOverlayTextColor, 0.5)\n : transparentize(props.theme.colors.textColor, 0.5)};\n background-color: transparent;\n &:hover,\n &:focus {\n background-clip: padding-box;\n border: 2px solid\n ${props.inverted\n ? transparentize(props.theme.colors.coverBgOverlayTextColor, 0.1)\n : transparentize(props.theme.colors.textColor, 0.1)};\n }\n ${TextElement} {\n color: ${props.inverted\n ? transparentize(props.theme.colors.coverBgOverlayTextColor, 0.7)\n : transparentize(props.theme.colors.textColor, 0.7)};\n }\n &:hover,\n &:focus {\n &,\n &:active {\n background-color: ${props.inverted\n ? transparentize(props.theme.colors.coverBgOverlayTextColor, 0.1)\n : transparentize(props.theme.colors.textColor, 0.1)};\n }\n\n ${TextElement},\n ${IconElement} {\n color: ${props.inverted\n ? props.theme.colors.coverBgOverlayTextColor\n : props.theme.colors.textColor};\n }\n }\n &:active ${TextElement}, &:active ${IconElement} {\n color: ${props.inverted\n ? transparentize(props.theme.colors.coverBgOverlayTextColor, 0.6)\n : transparentize(props.theme.colors.textColor, 0.6)};\n }\n &:focus {\n background-color: ${props.inverted\n ? transparentize(props.theme.colors.coverBgOverlayTextColor, 0.1)\n : transparentize(props.theme.colors.textColor, 0.1)};\n outline: 1px solid black;\n }\n &:focus:not(:focus-visible) {\n background-color: ${props.inverted\n ? transparentize(props.theme.colors.coverBgOverlayTextColor, 0.1)\n : transparentize(props.theme.colors.textColor, 0.1)};\n outline: none;\n }\n `};\n ${props =>\n props.size === SIZES.MEDIUM &&\n css`\n height: 50px;\n padding: 0 40px;\n line-height: 14px;\n `};\n\n ${props =>\n props.size === SIZES.SMALL &&\n css`\n height: 30px;\n padding: 0 23px;\n line-height: 10px;\n `};\n`;\n\nexport const ButtonLinkElement = styled(ButtonElement.withComponent('a'))`\n text-decoration: none !important;\n\n ${TextElement} {\n margin-top: 1px;\n }\n`;\n","export const REVIEW_USER_EMAIL = 'reviewerUsermail';\nexport const REVIEW_USER_NAME = 'reviewerUsername';\nexport const HINT_FOR_SPOT_COMMENT = 'hintForSpotComment';\nexport const HINT_FOR_GENERAL_COMMENT = 'hintForGeneralComment';\n\nexport const COMMENT_SENDING_FAILED = 'commentSendingFailed';\nexport const STATUS_OK = 'statusOk';\nexport const REFERRER_POLICY = 'no-referrer-when-downgrade';\n\nexport const REVIEW_COMMENT_PROPERTIES: { [key: string]: string } = {\n DEFAULT_TITLE: 'defaultTitle',\n TITLE: 'title',\n INTRODUCTION: 'introduction',\n LEARNING_CONTENT: 'learningContent',\n QUESTION: 'question',\n VOICE_OVER: 'voiceOver',\n CONTENT_ITEM: 'contentItem',\n TITLE_OF_THE_SECTION: 'titleOfTheSection',\n GENERAL: 'general'\n};\n\nexport const REVIEW_COMMENT_TYPES: { [key: string]: string } = {\n QUESTION: 'question',\n INFORMATION_CONTENT: 'informationContent',\n COURSE: 'course',\n SECTION: 'section'\n};\n","import { css } from 'styled-components';\n\nexport const centerAbsoluteElement = css`\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n`;\n\nexport const centerAbsoluteElementY = css`\n top: 50%;\n transform: translate(0, -50%);\n`;\n","import { QUESTION_PATH, SECTION_PATH, LEARNING_OBJECTIVE_PATH } from 'constants/navigation';\nimport pathToRegexp from 'path-to-regexp';\nimport { getCurrentLocationHash, getCurrentUrl } from 'utils/window';\n\nconst SECTION_ID = ':sectionId';\n\nexport const getQuestionUrl = (sectionId: string, questionId: string) =>\n QUESTION_PATH.replace(SECTION_ID, sectionId).replace(':questionId', questionId);\n\nexport const getLearningObjectiveUrl = (sectionId: string) =>\n LEARNING_OBJECTIVE_PATH.replace(SECTION_ID, sectionId);\n\nexport const getQuestionAbsoluteUrl = (sectionId: string, questionId: string) =>\n `${getCurrentUrl()}#${getQuestionUrl(sectionId, questionId)}`;\n\nexport const getSectionUrl = (sectionId: string) => SECTION_PATH.replace(SECTION_ID, sectionId);\n\nexport const getSectionAbsoluteUrl = (sectionId: string) =>\n `${getCurrentUrl()}#${getSectionUrl(sectionId)}`;\n\nexport const getLocationParams = (path: string) => {\n const keys: any[] = [];\n const match = pathToRegexp(path, keys).exec(getCurrentLocationHash().replace('#', ''));\n return keys.reduce((acc, key, index) => {\n acc[key.name] = (match ? match[index + 1] : null) || null;\n return acc;\n }, {});\n};\n","import progressStorage from 'core/progressStorage';\nimport { getValueFromUrl } from 'utils/window';\nimport { STATUS_OK } from 'constants/progressStorage';\nimport { getUser, shouldSaveCrossDevice } from 'store/user/selectors';\nimport { isPublishMode } from 'store/settings/selectors';\nimport * as courseActions from 'store/course/actions';\nimport eventEmitter, { events } from 'core/events/eventEmitter';\n\nimport { ActionTypes } from './types';\nimport { ThunkResult } from '../types';\n\nexport const authenticate = (payload: any): ThunkResult> => async dispatch => {\n dispatch({\n type: ActionTypes.USER_AUTHENTICATED,\n payload\n });\n};\n\nexport const load = (): ThunkResult> => async (dispatch, getState) => {\n let user = getUserFromUrl();\n\n if (shouldSaveCrossDevice(getState()) && isPublishMode(getState())) {\n user = (await progressStorage.identifyUser()) || user;\n }\n\n if (user) {\n dispatch(authenticate(user));\n eventEmitter.emit(events.USER_AUTHENTICATED, getUser(getState()));\n }\n};\n\nexport const authorizeUser = (signInData: any): ThunkResult> => async (\n dispatch,\n getState\n) => {\n let status = STATUS_OK;\n if (shouldSaveCrossDevice(getState())) {\n status = await progressStorage.authorizeUser(signInData);\n if (status === STATUS_OK) {\n const user = await progressStorage.identifyUser();\n if (user) {\n signInData.name = user.name;\n eventEmitter.emit(events.USER_AUTHENTICATED, getUser(getState()));\n }\n }\n }\n\n if (status === STATUS_OK) {\n dispatch(\n authenticate({\n email: signInData.email,\n name: signInData.name,\n shortTermAccess: signInData.shortTermAccess\n })\n );\n }\n\n return status;\n};\n\nexport const registerUser = (signUpData: any): ThunkResult> => async (\n dispatch,\n getState\n) => {\n let status = await progressStorage.registerUser(signUpData);\n if (status === STATUS_OK) {\n dispatch(\n authenticate({\n email: signUpData.email,\n name: signUpData.name,\n shortTermAccess: true\n })\n );\n\n eventEmitter.emit(events.USER_AUTHENTICATED, getUser(getState()));\n }\n\n return status;\n};\n\nexport const skipAuthentication = (): ThunkResult> => async dispatch => {\n dispatch({ type: ActionTypes.USER_AUTHENTICATION_SKIPPED });\n};\n\nexport const notSkipAuthentication = (): ThunkResult> => async dispatch => {\n dispatch({ type: ActionTypes.USER_AUTHENTICATION_NOT_SKIPPED });\n};\n\nexport const logout = (): ThunkResult> => async (dispatch, getState) => {\n await eventEmitter.emit(events.USER_LOGOUT, { state: getState() });\n dispatch({ type: ActionTypes.USER_UNAUTHENTICATED });\n await dispatch(courseActions.cleanup(true));\n};\n\nexport const sendSecretLink = async () => {\n progressStorage.sendSecretLink();\n};\n\nfunction getUserFromUrl() {\n const email = getValueFromUrl('email');\n const name = getValueFromUrl('name');\n if (!email || !name) {\n return null;\n }\n\n return {\n name,\n email: email.toLowerCase()\n };\n}\n","import { css } from 'styled-components';\nimport {\n MEDIA_XSMALL,\n MEDIA_SMALL,\n MEDIA_MEDIUM,\n MEDIA_LARGE,\n MEDIA_XLARGE,\n MEDIA_SMALL_FONT_RATIO,\n MEDIA_TABLET,\n MEDIA_MOBILE\n} from 'constants/screenResolutions';\n\nconst sizes: { [key: string]: any } = {\n xsmall: MEDIA_XSMALL,\n small: MEDIA_SMALL,\n medium: MEDIA_MEDIUM,\n large: MEDIA_LARGE,\n xlarge: MEDIA_XLARGE,\n tablet: MEDIA_TABLET,\n smallFontRatio: MEDIA_SMALL_FONT_RATIO,\n mobile: MEDIA_MOBILE\n};\n\nconst media = Object.keys(sizes).reduce((acc: { [key: string]: any }, label: any) => {\n acc[label] = (...args: any) => css`\n @media (max-width: ${sizes[label]}px) {\n ${css(args[0], ...args)};\n }\n `;\n\n return acc;\n}, {});\n\nexport default media;\n","import { RootAppState } from 'store/types';\n\nexport const getTreeOfContentVisibility = (state: RootAppState) => state.treeOfContent.isExpanded; // eslint-disable-line\n","import { RootAppState } from '../types';\n\nexport const getPopupVisibility = (state: RootAppState) => state.popup.isExpanded;\n\nexport const getPopupSettings = (state: RootAppState) => state.popup.settings;\n","import eventEmitter from 'core/events/eventEmitter';\n\nexport default abstract class BaseEventHandler {\n abstract handlers: any[];\n\n on() {\n this.handlers.forEach((handler: any) => eventEmitter.on(handler.event, handler.instance));\n }\n\n off() {\n this.handlers.forEach((handler: any) => eventEmitter.off(handler.event, handler.instance));\n }\n}\n","import { RootAppState } from '../types';\n\nexport const isLoaderVisibility = (state: RootAppState) => state.loader.isLoaded;\n","/* eslint-disable prefer-destructuring */\nconst error = console.error;\nconst warn = console.warn;\nconst info = console.info;\nconst log = console.log;\n\nexport default {\n log,\n warn,\n info,\n error\n};\n","export type SettingsState = {\n isLoadingFailed: boolean;\n template: any;\n publish: any;\n manifest: any;\n translations: any;\n publishMode: any;\n materialType: string;\n}\nexport enum ActionTypes {\n SETTINGS_LOADED = 'SETTINGS_LOADED',\n SETTINGS_LOADING_FAILED = 'SETTINGS_LOADING_FAILED'\n}\n\ntype SettingsLoaded = {\n type: ActionTypes.SETTINGS_LOADED;\n settings: {\n manifest: {[key: string]: any};\n publishSettings: {[key: string]: any};\n settings: {[key: string]: any};\n customization: {[key: string]: any};\n translations: {[key: string]: any};\n publishMod: {[key: string]: any};\n }\n}\n\ntype SettingsLoadedFailed = {\n type: ActionTypes.SETTINGS_LOADING_FAILED;\n reason: any\n}\n\nexport type SettingsActionTypes = SettingsLoaded | SettingsLoadedFailed;\n","export type TreeOfContentState = {\n isExpanded: boolean;\n isSubmitButtonVisible: boolean;\n};\n\nexport enum ActionTypes {\n TOC_TOGGLE_VISIBILITY = 'TOC_TOGGLE_VISIBILITY',\n COURSE_ENABLE_SUBMIT_BUTTON = 'COURSE_ENABLE_SUBMIT_BUTTON'\n}\n\ntype ToggleTOCVisibility = {\n type: ActionTypes.TOC_TOGGLE_VISIBILITY;\n};\n\ntype EnableSubmitButton = {\n type: ActionTypes.COURSE_ENABLE_SUBMIT_BUTTON;\n payload: {\n isSubmitButtonVisible: boolean;\n };\n};\n\nexport type TOCActionTypes = ToggleTOCVisibility | EnableSubmitButton;\n","export enum ActionTypes {\n OPEN_POPUP = 'OPEN_POPUP',\n CLOSE_POPUP = 'CLOSE_POPUP'\n}\n\ntype OpenPopup = {\n type: ActionTypes.OPEN_POPUP,\n payload: {\n settings: { [key: string]: any }\n }\n}\n\ntype ClosePopup = {\n type: ActionTypes.CLOSE_POPUP\n}\n\nexport type PopupActionTypes = OpenPopup | ClosePopup;\n","export enum ActionTypes {\n OPEN_LOADER = 'OPEN_LOADER',\n CLOSE_LOADER = 'CLOSE_LOADER'\n}\n\ntype OpenLoader = {\n type: ActionTypes.OPEN_LOADER\n}\n\ntype CloseLoader = {\n type: ActionTypes.CLOSE_LOADER\n}\n\nexport type LoaderActionTypes = OpenLoader | CloseLoader;\n","import { RootAppState } from '../types';\n\nexport const getResourceContents = (state: RootAppState) => state.resource.resourceContents;\n\nexport const getResourceTitle = (state: RootAppState) => state.resource.title;\n\nexport const getResourceType = (state: RootAppState) => state.resource.resourceType;\n\nexport const getResourceId = (state: RootAppState) => state.resource.id;\n","export * from './screenResolutions';\n/* eslint-disable no-useless-escape */\nexport const imageResizerQueryPattern = /\\?width=\\d+\\&height=\\d+&scaleBySmallerSide=\\w+/;\nexport const supportedBgSizes = {\n contain: 'contain',\n cover: 'cover',\n initial: 'initial'\n};\nexport const CONTENT_TYPES = {\n JSON: 'application/json'\n};\n\nexport const DEFAULT_LANGUAGE_CODE = 'en';\nexport const CUSTOM_LANGUAGE_CODE = 'xx';\nexport const NO_SELECTED_ID = 'no-selected-elements';\nexport const IMAGE_DEFAULT_DOMAIN = 'easygenerator.com';\n\nexport const maxCountTocNavigationElements = 8;\nexport const minCountTocNavigationElements = 5;\n\nexport const DEFAULT_QUESTION_POOL_ID_LENGTH = 7;\nexport const defaultBoxShadowColor = '#000';\n\nexport const MASTERY_SCORE = 50;\n\nexport const LTI_CALLBACK_URL_PARAMETER_NAME = 'ltiResultCallbackUrl';\n\nexport const FONT_WEIGHTS = ['300', '600'];\n\nexport const SECONDARY_FONT_KEY = 'secondary-font';\n\nexport const MEDIA_FONT_SIZES = {\n heading1: {\n MAXIMUM_VALUE: 36,\n MULTIPLIER: 0.94\n },\n heading2: {\n MAXIMUM_VALUE: 30,\n MULTIPLIER: 0.93\n },\n heading3: {\n MAXIMUM_VALUE: 26,\n MULTIPLIER: 0.91\n },\n heading4: {\n MAXIMUM_VALUE: 24,\n MULTIPLIER: 0.9\n },\n paragraph: {\n MAXIMUM_VALUE: 22,\n MULTIPLIER: 1\n },\n quote: {\n MAXIMUM_VALUE: 24,\n MULTIPLIER: 0.92\n }\n};\n\nexport const TRANSITION_TIME_DURATION_MS = 300;\n\nexport enum MATERIAL_TYPES {\n RESOURCE = 'resource',\n COURSE = 'course'\n}\n\nexport enum RESOURCE_TYPE {\n CHECKLIST = 'checklist',\n HOWTO = 'howTo'\n}\n\nexport const CIRCLE_DEGREES = 360;\n\nexport const HTML_INFINITY_SYMBOL = '∞';\nexport const SVG_XML_NAMESPACE = 'http://www.w3.org/2000/svg';\n\nexport const DEBOUNCE_SCROLL_WAIT_TIME_MS = 200;\n\nexport const RECALCULATE_LOCATION_TIME_MS = 1000;\n\nexport const EULA_PDF_LINK = '//cdn.easygenerator.com/eula/Easygenerator_Eula_for_Learners.pdf';\n\nexport const KEYS: { [key: string]: string } = {\n ENTER: 'Enter',\n SPACEBAR: ' ',\n TAB: 'Tab',\n ESCAPE: 'Escape'\n};\n\nexport const EMAIL_REGEX = new RegExp(\n [\n \"(?=^[a-z0-9@.!#$%&'*+\\\\/=?^_‘{|}~-]{6,100}$)\",\n \"(?=^[a-z0-9.!#$%&'*+\\\\/=?^_‘{|}~-]{1,64}@)\",\n \"^[a-z0-9!#$%&'*+\\\\/=?^_‘{|}~-]+\",\n \"(?:\\\\.[a-z0-9!#$%&'*+\\\\/=?^_‘{|}~-]+)\",\n '*@((?!-)[a-zA-Z0-9-]{0,62}[a-zA-Z0-9]\\\\.)+',\n '[a-zA-Z]{2,63}$'\n ].join('')\n);\n\nexport const PASSWORD_REGEX = '\\\\S{7,}';\n\nexport const SKIP_TO_CONTENT_IDS = {\n LEARNING_OBJECTIVE_PAGE: 'sectionTitle',\n QUESTION_PAGE: 'questionTitleWrapper',\n RESULT_PAGE: 'resultHeader',\n ONE_PAGE_COURSE: 'stickyContainer',\n QUESTION_POOL_START_BUTTON: 'qpStart'\n};\n","export const INFORMATION_CONTENT = 'informationContent';\nexport const SINGLE_CHOICE = 'singleSelectText';\nexport const MULTIPLE_CHOICE = 'multipleSelect';\nexport const STATEMENT_CHOICE = 'statement';\nexport const SINGLE_CHOICE_IMAGE = 'singleSelectImage';\nexport const OPEN_QUESTION = 'openQuestion';\nexport const RANKING_TEXT = 'rankingText';\nexport const SCENARIO = 'scenario';\nexport const FILL_IN_THE_BLANK = 'fillInTheBlank';\nexport const DRAG_AND_DROP_TEXT = 'dragAndDropText';\nexport const TEXT_MATCHING = 'textMatching';\nexport const HOTSPOT = 'hotspot';\n\nexport default [\n INFORMATION_CONTENT,\n SINGLE_CHOICE,\n MULTIPLE_CHOICE,\n STATEMENT_CHOICE,\n SINGLE_CHOICE_IMAGE,\n OPEN_QUESTION,\n RANKING_TEXT,\n SCENARIO,\n FILL_IN_THE_BLANK,\n DRAG_AND_DROP_TEXT,\n TEXT_MATCHING,\n HOTSPOT\n];\n","import { css } from 'styled-components';\nimport { transparentize } from 'utils/color';\n\nexport function getCustomScrollbars(scrollColor?: any) {\n return css`\n overflow-y: auto;\n &::-webkit-scrollbar {\n width: 8px;\n background-color: transparent;\n }\n &::-webkit-scrollbar-thumb {\n margin-right: 8px;\n background-color: ${props =>\n transparentize(`${scrollColor || props.theme.colors.textColor}`, 0.2)};\n border-radius: 6px;\n }\n\n &:hover {\n &::-webkit-scrollbar-thumb {\n background-color: ${props =>\n transparentize(`${scrollColor || props.theme.colors.textColor}`, 0.4)};\n }\n }\n `;\n}\nexport default getCustomScrollbars;\n","import { css } from 'styled-components';\n\nconst backgroundColor = (color: any) => css`\n background-color: ${color};\n`;\n\nconst backgroundImage = (\n imageUrl: string,\n position = '0px 0px',\n size = 'auto',\n repeat = 'repeat',\n color = 'transparent'\n) => css`\n background-image: url(${imageUrl});\n background-position: ${position};\n background-size: ${size};\n background-repeat: ${repeat};\n ${backgroundColor(color)};\n`;\n\nconst headerBackgroundImage = (image: any) => {\n let position = '0px 0px';\n let size = 'auto';\n let repeat = 'no-repeat';\n\n if (image.option === 'fullscreen') {\n position = 'top center';\n size = 'cover';\n repeat = 'no-repeat';\n } else if (image.option === 'repeat') {\n repeat = 'repeat';\n }\n\n return backgroundImage(image.url, position, size, repeat);\n};\n\nexport function bodyBackground(body: any) {\n return body.color ? backgroundColor(body.color) : backgroundImage(body.texture);\n}\n\nexport function headerBackground(header: any) {\n return header.color ? backgroundColor(header.color) : headerBackgroundImage(header.image);\n}\n\nexport default {\n bodyBackground,\n headerBackground\n};\n","export { default } from './Layout';\n\nexport { PageContent } from './Layout';\nexport { PageSidebar } from './Layout';\nexport { BasicStyledSidebar } from './Layout';\nexport { Layout } from './Layout';\n","import { css } from 'styled-components';\nimport { loadFontsFromGoogle } from 'core/fonts/loader';\n\nexport const loadReviewFont = async () => {\n await loadFontsFromGoogle({\n fontFamily: 'Open Sans',\n fontWeight: [400, 600]\n });\n};\n\nexport const reviewFontText = css`\n font-family: 'Open Sans';\n font-size: 11px;\n line-height: 11px;\n color: #42515f;\n`;\n\nexport default reviewFontText;\n","import { isLowerResolution } from 'utils/window';\nimport { MEDIA_TABLET } from 'constants/screenResolutions';\nimport * as questionActions from 'store/questions/actions';\nimport { getTreeOfContentVisibility } from 'store/treeOfContent/selectors';\n\nimport { ActionTypes } from './types';\nimport { ThunkResult } from '../types';\n\nexport const toggleTreeOfContentVisibility = (): ThunkResult => dispatch => {\n dispatch({ type: ActionTypes.TOC_TOGGLE_VISIBILITY });\n};\nexport const submitAllAnswerOnce = (): ThunkResult => dispatch => {\n dispatch(questionActions.submitAllAtOnce());\n};\n\nexport const adaptToResolution = (): ThunkResult => (dispatch, getState) => {\n const isTocExpanded = getTreeOfContentVisibility(getState());\n const isLowResolution = isLowerResolution(MEDIA_TABLET);\n if ((isLowResolution && isTocExpanded) || (!isLowResolution && !isTocExpanded)) {\n dispatch({ type: ActionTypes.TOC_TOGGLE_VISIBILITY });\n }\n};\n","import store from 'store';\nimport { getTranslations } from 'store/settings/selectors';\n\nconst applyTemplateData = (value: any, templateData: any) => {\n for (let prop in templateData) {\n const pattern = `{\\\\s*${prop}\\\\s*}`;\n const regex = new RegExp(pattern, 'gmi');\n value = value.replace(regex, templateData[prop]);\n }\n return value;\n};\n\n/* eslint-disable import/prefer-default-export */\nexport const localize = (key: any, templateData?: any, defaultValue?: any) => {\n const translations = getTranslations(store.getState());\n if (process.env.NODE_ENV === 'development' && !translations) {\n return defaultValue || key;\n }\n if (!translations.hasOwnProperty(key)) {\n throw new Error(\n `Localization error appeared. Translation for key '${key}' has not been found.`\n );\n }\n const value = translations[key];\n return templateData ? applyTemplateData(value, templateData) : value;\n};\n","/* eslint-disable import/prefer-default-export */\nexport { localize } from './localization';\n","import { createSelector } from 'reselect';\nimport { objectToArray } from 'utils/object';\nimport {\n MULTIPLE_CHOICE,\n SINGLE_CHOICE,\n SINGLE_CHOICE_IMAGE,\n STATEMENT_CHOICE,\n OPEN_QUESTION,\n RANKING_TEXT,\n SCENARIO,\n FILL_IN_THE_BLANK,\n DRAG_AND_DROP_TEXT,\n TEXT_MATCHING,\n HOTSPOT,\n INFORMATION_CONTENT\n} from 'constants/questionTypes';\nimport { TimerStatus } from 'constants/timer';\nimport { getTimerStatus } from 'store/timer/selectors';\nimport * as multipleChoiceSelectors from './multipleChoice/selectors';\nimport * as statementChoiceSelectors from './statementChoice/selectors';\nimport * as openQuestionSelector from './openQuestion/selectors';\nimport * as rankingTextSelector from './rankingText/selectors';\nimport * as scenarioSelector from './scenario/selectors';\nimport * as fillInTheBlankSelector from './fillInTheBlank/selectors';\nimport * as dragAndDropTextSelector from './dragAndDropText/selectors';\nimport * as textMatching from './textMatching/selectors';\nimport * as hotspot from './hotspot/selectors';\nimport * as informationContent from './informationContent/selectors';\nimport { RootAppState } from '../types';\nimport {\n isAttemptsLimited,\n getLimitedAttemptsNumber,\n isQuestionPoolEnabled,\n getTimerEnabled\n} from '../settings/selectors';\n\nexport const hasAvailableAttempt = (state: RootAppState, question: any) =>\n isAttemptsLimited(state)\n ? question.type !== INFORMATION_CONTENT &&\n question.score < 100 &&\n question.attemptNumber < getLimitedAttemptsNumber(state)\n : true;\n\nexport const isAttemptTimedOut = (state: RootAppState, question: any) =>\n getTimerEnabled(state)\n ? question.score < 100 && getTimerStatus(state) !== TimerStatus.STOPPED\n : true;\n\nexport const getQuestion = (state: RootAppState, questionId: string) => state.questions[questionId];\n\nexport const getQuestionSection = (state: RootAppState, questionId: string) =>\n state.questions[questionId].sectionId;\n\nexport const getQuestions = createSelector(\n (state: RootAppState) => state.questions,\n questions => objectToArray(questions)\n);\n\nexport const getAffectProgressQuestions = createSelector(\n getQuestions,\n state => state,\n (questions, state) => {\n if (isQuestionPoolEnabled(state)) {\n return questions.filter(\n (question: any) => question.affectsProgress && question.isPoolQuestion\n );\n }\n return questions.filter((question: any) => question.affectsProgress);\n }\n);\n\nexport const isAllQuestionsFailed = createSelector(\n getAffectProgressQuestions,\n state => state,\n (questions, state) => questions.every((question: any) => !hasAvailableAttempt(state, question))\n);\n\nexport const isAllQuestionsTimedOut = createSelector(\n getAffectProgressQuestions,\n state => state,\n (questions, state) => questions.every((question: any) => !isAttemptTimedOut(state, question))\n);\n\nexport const isAllQuestionsAnswered = createSelector(\n getQuestions,\n questions =>\n !questions.filter((question: any) => !question.isAnswered && question.affectsProgress).length\n);\n\nexport const isAllSurveyQuestionsAnswered = createSelector(\n getQuestions,\n state => state,\n (questions, state) => {\n if (isQuestionPoolEnabled(state)) {\n return true; // When questionPool is enabled there are no survey questions\n }\n return !questions.filter((question: any) => question.isSurvey && !question.isAnswered).length;\n }\n);\n\nexport const getQuestionsCount = createSelector(getQuestions, questions => questions.length);\n\nexport const getQuestionAnswers = (state: RootAppState, questionId: string) =>\n state.questions[questionId].answers;\n\nexport const getQuestionResponse = (state: RootAppState, questionId: string) =>\n state.questions && state.questions[questionId] && state.questions[questionId].response;\n\nexport const getAffectProgressQuestionsCount = createSelector(\n getQuestions,\n state => state,\n (questions, state) => {\n if (isQuestionPoolEnabled(state)) {\n return questions.filter(\n (question: any) => question.affectsProgress && question.isPoolQuestion\n ).length;\n }\n return questions.filter((question: any) => question.affectsProgress).length;\n }\n);\n\nexport const hasReAnswerableQuestions = createSelector(\n getQuestions,\n state => state,\n (questions, state) => {\n if (!isAttemptsLimited(state)) {\n return true;\n }\n return questions.some(\n (question: any) =>\n !question.isAnsweredCorrectly &&\n question.type !== INFORMATION_CONTENT &&\n question.attemptNumber < getLimitedAttemptsNumber(state)\n );\n }\n);\n\nexport const getAnsweredAffectProgressQuestionsCount = createSelector(\n getQuestions,\n state => state,\n (questions, state) => {\n if (isQuestionPoolEnabled(state)) {\n return questions.filter(\n (question: any) =>\n question.isAnswered && question.affectsProgress && question.isPoolQuestion\n ).length;\n }\n return questions.filter((question: any) => question.isAnswered && question.affectsProgress)\n .length;\n }\n);\n\nexport const getAnsweredQuestionsCount = createSelector(\n getQuestions,\n questions => questions.filter((question: any) => question.isAnswered).length\n);\n\nexport const getAnsweredQuestionsProgress = (state: RootAppState) => {\n const affectProgressQuestionsCount = getAffectProgressQuestionsCount(state);\n return affectProgressQuestionsCount > 0\n ? Math.floor(\n (getAnsweredAffectProgressQuestionsCount(state) * 100) / affectProgressQuestionsCount\n )\n : 0;\n};\n\nexport const getCorrectlyAffectProgressAnsweredQuestionsCount = createSelector(\n getQuestions,\n questions =>\n questions.filter((question: any) => question.affectsProgress && question.isAnsweredCorrectly)\n .length\n);\n\nexport const isQuestionAnswered = createSelector(\n getQuestion,\n question => question && question.isAnswered\n);\n\nexport const isQuestionAnsweredCorrectly = createSelector(\n getQuestion,\n question => question && question.isAnsweredCorrectly\n);\n\nexport const getQuestionAttempt = createSelector(\n getQuestion,\n question => question && question.attemptNumber\n);\n\nexport const hasBeenOpened = createSelector(\n getQuestion,\n question => question && question.hasBeenOpened\n);\n\nexport const hasCourseBeenStarted = createSelector(\n getQuestions,\n questions => questions.filter((question: any) => question.hasBeenOpened).length > 0\n);\n\nexport const getLastOpenedQuestion = (questions: any[]) =>\n questions.reduce((acc, question) => (question.hasBeenOpened ? question : acc));\n\n// TODO: should be Question type\nexport const getScore = (state: RootAppState, question: any) => {\n switch (question.type) {\n case SINGLE_CHOICE_IMAGE:\n case SINGLE_CHOICE:\n case MULTIPLE_CHOICE:\n return multipleChoiceSelectors.getScore(state, question);\n case STATEMENT_CHOICE:\n return statementChoiceSelectors.getScore(state, question);\n case OPEN_QUESTION:\n return openQuestionSelector.getScore(state, question);\n case RANKING_TEXT:\n return rankingTextSelector.getScore(state, question);\n case SCENARIO:\n return scenarioSelector.getScore(state, question);\n case FILL_IN_THE_BLANK:\n return fillInTheBlankSelector.getScore(state, question);\n case DRAG_AND_DROP_TEXT:\n return dragAndDropTextSelector.getScore(state, question);\n case TEXT_MATCHING:\n return textMatching.getScore(state, question);\n case HOTSPOT:\n return hotspot.getScore(state, question);\n case INFORMATION_CONTENT:\n return informationContent.getScore(state, question);\n default:\n throw new Error(`Unable to calculate score for ${question.type} question`);\n }\n};\n\nexport const questionExists = (state: RootAppState, questionId: string) =>\n questionId && Object.keys(state.questions).includes(questionId);\n\nexport const isFeedbackAnimating = createSelector(\n getQuestion,\n question => question.isFeedbackAnimating\n);\n\nexport const getPoolQuestions = (state: RootAppState) =>\n objectToArray(state.questions).filter((question: any) => question.isPoolQuestion);\n\nexport const getPoolQuestionIndex = (state: RootAppState, questionId: string) => {\n const questionsForPoolTemp: any = getPoolQuestions(state);\n const poolQuestionIDs: any = [];\n\n for (const question of questionsForPoolTemp) {\n poolQuestionIDs.push(question.id);\n }\n return poolQuestionIDs.indexOf(questionId);\n};\nexport const getSectionId = (state: RootAppState, questionId: string) =>\n state.questions[questionId].sectionId;\n\nexport const isAllAffectedQuestionsAnswered = createSelector(\n getAffectProgressQuestions,\n state => state,\n (questions, state) => {\n if (isQuestionPoolEnabled(state)) {\n return questions.every(({ isAnswered, isPoolQuestion }: any) => isAnswered && isPoolQuestion);\n }\n return questions.every((question: any) => question.isAnswered);\n }\n);\n\nexport const getUnansweredQuestions = createSelector(\n getQuestions,\n state => state,\n (questions, state) => {\n if (isQuestionPoolEnabled(state)) {\n return questions.filter(\n ({ isAnswered, isPoolQuestion }: any) => !isAnswered && isPoolQuestion\n );\n }\n return questions.filter(({ isAnswered }: any) => !isAnswered);\n }\n);\n\nexport const hasAnyQuestionOpened = createSelector(getQuestions, questions =>\n questions.some(question => question.hasBeenOpened)\n);\n\nexport const getQuestionRetries = createSelector(getQuestion, question => question?.retries || 0);\n","import { isScoringOfContentPagesAllowed } from 'store/settings/selectors';\nimport { hasBeenOpened } from 'store/questions/selectors';\nimport { RootAppState } from '../../types';\n\n// eslint-disable-next-line import/prefer-default-export\nexport const getScore = (state: RootAppState, question: any) => {\n if (isScoringOfContentPagesAllowed(state)) {\n return hasBeenOpened(state, question.id) ? 100 : 0;\n }\n\n return 0;\n};\n","import React, { Component } from 'react';\nimport { SIZES, SWITCH_BUTTON_LAYOUT } from 'constants/components';\nimport CircleLoader from 'components/common/CircleLoader';\nimport {\n ButtonElement,\n TextElement,\n CheckIcon,\n CheckImageIcon,\n ButtonWrapper,\n AnswerImage\n} from './SwitchButton.styled';\n\ninterface Sizes {\n [SIZES.SMALL]: string;\n [SIZES.MEDIUM]: string;\n}\n\ntype SwitchButtonProps = {\n multiple: boolean;\n selected: boolean;\n type?: string;\n text?: string;\n imageUrl?: string;\n onClick(e?: any): void;\n size: keyof Sizes;\n onKeyDown(e?: any): void;\n ariaDisabled?: boolean;\n altAnswerImage?: string;\n tabIndex: number;\n layout?: string;\n id?: string\n};\n\ntype SwitchButtonState = {\n isImageLoaded: boolean;\n}\n\nexport class SwitchButton extends Component {\n constructor(props: SwitchButtonProps) {\n super(props);\n this.state = { isImageLoaded: false };\n }\n static defaultProps = {\n size: SIZES.MEDIUM\n };\n\n handleImageLoaded = () => {\n this.setState({ isImageLoaded: true });\n };\n\n render() {\n const {\n onClick,\n onKeyDown,\n text,\n selected,\n multiple,\n imageUrl,\n ariaDisabled = false,\n altAnswerImage,\n tabIndex,\n size,\n layout = SWITCH_BUTTON_LAYOUT.QUESTION,\n id\n } = this.props;\n const { isImageLoaded } = this.state;\n return (\n \n {imageUrl && !isImageLoaded && }\n {imageUrl && (\n this.handleImageLoaded()}\n />\n )}\n \n \n {imageUrl && }\n \n {text && (\n \n {text}\n \n )}\n \n );\n }\n}\n\nexport default SwitchButton;\n","export { default } from './SwitchButton';\n","import styled, { css } from 'styled-components';\nimport { transition } from 'components/mixins/interactivity';\n\ntype ContentProps = {\n defaultOpacity: number;\n opacityDuration: string;\n ref: any\n}\nexport const Content = styled.div`\n ${(props: ContentProps) =>\n css`\n opacity: ${props.defaultOpacity};\n ${transition('opacity, height', props.opacityDuration)};\n `};\n`;\n\ntype ContainerProps = {\n duration: number;\n isVisible: boolean;\n ref: any;\n}\nexport const Container = styled.div`\n height: 0px;\n overflow: hidden;\n ${(props: ContainerProps) =>\n css`\n ${transition('height, visibility', props.duration)};\n `};\n visibility: ${props => (props.isVisible ? 'visible' : 'hidden')};\n`;\n","import * as React from 'react';\nimport scrollIntoView from 'scroll-into-view';\nimport { Container, Content } from './Collapse.styled';\n\nexport type CollapseProps = {\n isExpanded: boolean,\n scrollIntoView: boolean,\n duration: number,\n opacityDuration: string,\n delayOpacityTransition?: boolean,\n children: React.ReactNode,\n onExpanded?(): void,\n onCollapsed?(): void\n animateAppear?: boolean,\n}\n\nexport class Collapse extends React.PureComponent {\n isExpanded: boolean;\n containerNode: any;\n contentNode: any;\n timeout: any;\n raf: any;\n\n constructor(props: CollapseProps) {\n super(props);\n this.isExpanded = false;\n this.containerNode = React.createRef();\n this.contentNode = React.createRef();\n }\n\n static defaultProps = {\n isExpanded: true,\n animateAppear: true,\n scrollIntoView: false,\n duration: 300,\n opacityDuration: 100,\n delayOpacityTransition: false\n }\n\n componentDidMount() {\n if (this.props.animateAppear) {\n this.updateWithAnimation();\n } else {\n this.update();\n }\n this.isExpanded = this.props.isExpanded;\n }\n\n componentDidUpdate() {\n this.updateWithAnimation();\n this.isExpanded = this.props.isExpanded;\n }\n\n componentWillUnmount() {\n this.clear();\n }\n\n render() {\n const { isExpanded, children, opacityDuration, duration } = this.props;\n return (\n \n {\n \n {children}\n \n }\n \n );\n }\n\n update() {\n const { isExpanded } = this.props;\n this.setHeight(isExpanded ? 'auto' : 0);\n this.setOpacity(isExpanded ? 1 : 0);\n }\n\n updateWithAnimation() {\n const { isExpanded, duration, delayOpacityTransition } = this.props;\n if (this.isExpanded === isExpanded) {\n return;\n }\n\n this.clear();\n if (!isExpanded) {\n this.fadeOut();\n this.collapse();\n this.call(this.props.onCollapsed);\n return;\n }\n\n this.expand();\n if (this.props.scrollIntoView) {\n scrollIntoView(this.containerNode, { time: this.props.duration, align: { top: 0 } });\n }\n\n if (!delayOpacityTransition) {\n this.fadeIn();\n }\n this.timeout = setTimeout(() => {\n this.fadeIn();\n this.setHeight('auto');\n this.call(this.props.onExpanded);\n }, duration);\n }\n\n call(func: any) {\n if (func) {\n func();\n }\n }\n\n clear() {\n if (this.timeout) {\n clearTimeout(this.timeout);\n this.timeout = null;\n }\n if (this.raf) {\n window.cancelAnimationFrame(this.raf);\n this.raf = null;\n }\n }\n\n expand() {\n this.animateHeight(true);\n }\n\n collapse() {\n this.animateHeight(false);\n }\n\n animateHeight(isExpanded: boolean) {\n if (this.raf) {\n window.cancelAnimationFrame(this.raf);\n }\n\n if (!isExpanded && this.isHeightAuto()) {\n this.setHeight(this.getContentHeight());\n }\n\n this.raf = window.requestAnimationFrame(() => {\n const height = isExpanded ? this.getContentHeight() : 0;\n this.raf = window.requestAnimationFrame(() => {\n this.raf = window.requestAnimationFrame(() => {\n this.setHeight(height);\n this.raf = null;\n });\n });\n });\n }\n\n fadeIn() {\n this.setOpacity(1);\n }\n\n fadeOut() {\n this.setOpacity(this.getDefaultOpacity());\n }\n\n getContentHeight() {\n return this.contentNode.current && this.contentNode.current.offsetHeight;\n }\n\n setHeight(height: number | string) {\n if (this.containerNode.current) {\n this.containerNode.current.style.height = typeof height === 'string' ? height : `${height}px`;\n }\n }\n\n isHeightAuto() {\n return this.containerNode.current && this.containerNode.current.style.height === 'auto';\n }\n\n setOpacity(opacity: number) {\n if (this.contentNode.current) {\n this.contentNode.current.style.opacity = opacity;\n }\n }\n\n getDefaultOpacity() {\n return this.props.delayOpacityTransition ? 0.3 : 0;\n }\n}\n\nexport default Collapse;\n","import * as React from 'react';\nimport { CSSTransition } from 'react-transition-group';\n\nexport enum AnimationTypes {\n slideInDown = 'slideInDown',\n fade = 'fade',\n fadeInDown = 'fadeInDown'\n};\n\ninterface Types {\n [AnimationTypes.slideInDown]: string;\n [AnimationTypes.fade]: string;\n [AnimationTypes.fadeInDown]: string;\n}\n\ntype CssAnimationProps = {\n isVisible?: boolean;\n type: keyof Types;\n animateAppear?: boolean;\n animateLeave?: boolean;\n timeout?: number;\n children: any;\n};\n\nclass CssAnimation extends React.Component {\n static AnimationType = AnimationTypes\n static defaultProps = {\n timeout: 300,\n isVisible: true,\n animateAppear: true,\n animateLeave: true\n }\n\n render() {\n const { isVisible, animateAppear, animateLeave, children, type, timeout = 0 } = this.props;\n\n return (\n \n {children}\n \n );\n }\n}\n\nexport default CssAnimation;\n","import { PureComponent } from 'react';\n\ntype DelayProps = {\n children?: any;\n wait?: number;\n callback?(): void;\n};\n\ntype DelayState = {\n isWaiting: boolean;\n}\nexport class Delay extends PureComponent {\n timer: any;\n constructor(props: DelayProps) {\n super(props);\n this.state = { isWaiting: true };\n this.timer = () => {};\n }\n\n static defaultProps = {\n wait: 250\n };\n\n componentDidMount = () => {\n this.timer = setTimeout(() => {\n this.setState({\n isWaiting: false\n });\n if (this.props.callback) {\n this.props.callback();\n }\n }, this.props.wait);\n };\n\n componentWillUnmount = () => {\n clearTimeout(this.timer);\n };\n\n render() {\n return this.state.isWaiting ? null : this.props.children;\n }\n}\n\nexport default Delay;\n","import styled from 'styled-components';\nimport ReactContentLoader from 'react-content-loader';\n\nexport const Container = styled.div`\n max-width: 400px;\n width: 100%;\n`;\n\nexport const ContentLoader = styled(ReactContentLoader)`\n display: flex;\n opacity: 0.3;\n`;\n","import * as React from 'react';\nimport { withTheme } from 'styled-components';\nimport { transparentize } from 'utils/color';\nimport { Container, ContentLoader } from './Loader.styled';\n\ntype LoaderProps = {\n height?: number;\n width?: number;\n speed?: number;\n theme: { [key: string]: any };\n};\n\nexport const Loader = (props: LoaderProps) => {\n const { height = 8, width = 400, speed = 2 } = props;\n const space = 16;\n return (\n \n \n \n \n \n \n );\n};\n\nexport default withTheme(Loader);\n","import styled, { css } from 'styled-components';\nimport Icon from 'components/common/Icon';\nimport { transparentize } from 'utils/color';\nimport media from 'components/mixins/media';\nimport { MEDIA_TABLET } from 'constants/screenResolutions';\nimport { TOC } from 'constants/components';\nimport buttonDefaultStyle from 'components/mixins/normalize';\n\ntype ListItemsBlockProps = {\n isImageQuestion: boolean;\n isTreeOfContentExpanded: boolean\n}\nexport const ListItemsBlock = styled.ul`\n width: 100%;\n\n ${(props) =>\n props.isImageQuestion\n ? css`\n display: flex;\n flex-wrap: wrap;\n\n ${media.small`\n justify-content: space-around;\n `};\n `\n : css``};\n`;\n\n\ntype ListItemProps = {\n selected: boolean;\n key: number;\n isImageQuestion: boolean;\n isTreeOfContentExpanded: boolean;\n}\nexport const ListItem = styled.li`\n display: flex;\n align-items: center;\n min-height: 50px;\n transition: background-color 0.2s linear;\n cursor: pointer;\n position: relative;\n\n &:hover,\n &:focus {\n background-color: ${props => transparentize(props.theme.colors.textColor, 0.06)};\n }\n\n ${(props) =>\n props.isImageQuestion &&\n css`\n width: 260px;\n height: 260px;\n background: #f1f1f1;\n margin-top: 10px;\n margin-left: 50px;\n border: solid 2px #fff;\n border-radius: 4px;\n overflow: hidden;\n\n ${\n props.selected\n ? css`\n border: solid 2px ${props.theme.colors.mainColor};\n `\n : css``\n } &:hover {\n .show-on-hover {\n opacity: 0.75;\n }\n\n .zoom-button {\n opacity: 0.5;\n }\n }\n ${media.xlarge`\n width: 224px;\n height: 224px;\n margin-left: 38px;\n `}\n\n @media (min-width: ${MEDIA_TABLET +\n (props.isTreeOfContentExpanded ? TOC.EXPANDED_WIDTH : 0)}px) {\n &:nth-child(3n + 1) {\n margin-left: 0;\n }\n }\n\n @media (max-width: ${MEDIA_TABLET +\n (props.isTreeOfContentExpanded ? TOC.EXPANDED_WIDTH : 0)}px) {\n width: 260px;\n height: 260px;\n margin-left: 40px;\n\n &:nth-child(2n + 1) {\n margin-left: 0;\n }\n }\n\n ${media.small`\n margin-left: 0;\n margin-bottom: 30px;\n `};\n `};\n`;\n\nexport const ZoomIconBg = styled(Icon)`\ncolor: #271100;\n`;\n\nexport const ZoomIcon = styled(Icon)`\ncolor: #d8d8d8;\nposition: absolute;\ntop: 0;\nleft: 0;\n`;\n\ntype ZoomIconButton = {\n className: string;\n ariaLabel: string;\n tabIndex: number;\n isShown: boolean;\n}\nexport const ZoomIconButton = styled.button.attrs((props: ZoomIconButton) => ({\n tabIndex: props.tabIndex,\n 'aria-label': props.ariaLabel,\n 'data-test': 'zoom-button'\n}))`\n${ buttonDefaultStyle};\nbackground: none;\nborder: 0;\ndisplay: none;\npadding: 0;\nposition: absolute;\nright: 5px;\nbottom: 5px;\nopacity: 0;\ntransition: 0.3s;\n\n &: hover,\n &: focus {\n opacity: 0.8!important;\n}\n\n &: focus {\n outline: none;\n}\n\n${\n media.tablet`\n opacity: 0.5;\n `};\n\n${\n (props: ZoomIconButton) =>\n props.isShown\n ? css`\n & {\n display: block;\n }\n `\n : css``\n };\n`;\n","import styled, { css } from 'styled-components';\n\nexport const ImageItem = styled.figure`\n height: 100%;\n width: 100%;\n align-items: center;\n justify-content: center;\n display: flex;\n padding: 30px;\n`;\n\ntype ImageProps = {\n alt: string;\n isImageLoaded: boolean;\n}\nexport const Image = styled.img.attrs((props: ImageProps) => ({\n alt: props.alt\n}))`\n max-width: 100%;\n max-height: 100%;\n display: block;\n z-index: 1;\n\n ${props =>\n props.isImageLoaded\n ? css`\n & {\n display: block;\n }\n `\n : css`\n display: none;\n `};\n`;\n","import * as React from 'react';\nimport { connect } from 'react-redux';\nimport CircleLoader from 'components/common/CircleLoader';\nimport { localize } from 'core/localization';\nimport { ImageItem, Image } from './PreviewGallery.styled';\n\ntype PreviewGalleryPopupProps = {\n popupSettings: { [key: string]: any };\n};\n\ntype PreviewGalleryPopupState = {\n isImageLoaded: boolean\n}\n\nexport class PreviewGalleryPopup extends React.Component {\n constructor(props: PreviewGalleryPopupProps) {\n super(props);\n this.state = {\n isImageLoaded: false\n };\n }\n\n handleImageLoaded = () => {\n this.setState({ isImageLoaded: true });\n };\n\n render() {\n const { imageUrls } = this.props.popupSettings;\n const { isImageLoaded } = this.state;\n return (\n <>\n {imageUrls.map((image: any, index: any) => (\n \n {!isImageLoaded && }\n this.handleImageLoaded()}\n isImageLoaded={isImageLoaded}\n />\n \n ))}\n \n );\n }\n}\n\nexport default connect()(PreviewGalleryPopup);\n","import * as React from 'react';\nimport { bindActionCreators, Dispatch } from 'redux';\nimport { connect } from 'react-redux';\nimport SwitchButton from 'components/common/SwitchButton';\nimport { getTreeOfContentVisibility } from 'store/treeOfContent/selectors';\nimport * as actions from 'store/popup/actions';\nimport { localize } from 'core/localization';\nimport { POPUP_ID_IMAGE_PREVIEW } from 'constants/popups';\nimport { KEYS } from 'constants/common';\nimport { RootAppState } from 'store/types';\nimport {\n ListItemsBlock,\n ListItem,\n ZoomIconButton,\n ZoomIconBg,\n ZoomIcon\n} from './MultipleChoiceItems.styled';\nimport PreviewGallery from '../../popups/previewGallery/PreviewGallery';\n\nexport type MultipleChoiceItemsProps = {\n items: any[];\n id: string;\n isMultiple: boolean;\n imageQuestion: boolean;\n selectItem(id: string, itemId?: string, isMultiple?: boolean): void;\n actions: { [key: string]: any };\n isTreeOfContentExpanded: boolean;\n ariaDisabled: boolean;\n tabIndex: number;\n};\n\nexport class MultipleChoiceItems extends React.Component {\n state = {\n items: this.props.items,\n isOpened: false,\n imageUrl: []\n };\n\n static defaultProps = {\n imageQuestion: false,\n ariaDisabled: false\n };\n\n selectItem = (item: any) => {\n const { id, isMultiple, selectItem } = this.props;\n const { items } = this.state;\n\n if (isMultiple) {\n items.forEach(a => {\n if (item.id === a.id) {\n a.selected = !a.selected;\n }\n });\n } else {\n items.forEach(a => {\n if (item.id === a.id) {\n a.selected = true;\n } else {\n a.selected = false;\n }\n });\n }\n if (typeof selectItem === 'function') {\n selectItem(id, item.id, isMultiple);\n }\n this.setState({\n items\n });\n };\n\n static getDerivedStateFromProps(\n nextProps: MultipleChoiceItemsProps,\n prevState: MultipleChoiceItemsProps\n ) {\n if (prevState.id !== nextProps.id && prevState.items !== nextProps.items) {\n return {\n items: nextProps.items\n };\n }\n return null;\n }\n\n showPopup = (imageUrl: string) => {\n this.props.actions.openPopup({\n popupId: POPUP_ID_IMAGE_PREVIEW,\n popupAriaLabelKey: '[aria label gallery popup]',\n component: PreviewGallery,\n imageUrls: [imageUrl],\n disableBottomLine: true\n });\n };\n\n render() {\n const {\n isMultiple,\n imageQuestion,\n isTreeOfContentExpanded,\n ariaDisabled,\n tabIndex\n } = this.props;\n const { items } = this.state;\n return (\n \n {items.map((item, index) => (\n \n {\n if (!ariaDisabled) {\n this.selectItem(item);\n }\n }}\n onKeyDown={(event: any) => {\n if (\n (event.key?.toLowerCase() === KEYS.SPACEBAR.toLowerCase() ||\n event.key?.toLowerCase() === KEYS.ENTER.toLowerCase()) &&\n !ariaDisabled\n ) {\n this.selectItem(item);\n }\n }}\n />\n this.showPopup(item.image)}\n tabIndex={0}\n isShown={!!item.image}\n >\n \n \n \n \n ))}\n \n );\n }\n}\n\nfunction mapStateToProps(state: RootAppState) {\n return {\n isTreeOfContentExpanded: getTreeOfContentVisibility(state)\n };\n}\n\nfunction mapDispatchToProps(dispatch: Dispatch) {\n return { actions: bindActionCreators(actions, dispatch) };\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(MultipleChoiceItems);\n","import styled, { css } from 'styled-components';\nimport { transparentize } from 'utils/color';\n\ntype StatusIconProps = {\n passedMark: any;\n progress: any;\n}\nexport const StatusIcon = styled.div`\n position: absolute;\n left: 50%;\n top: 50%;\n bottom: 5px;\n display: flex;\n justify-content: center;\n align-items: center;\n width: 16px;\n height: 16px;\n background: ${props => props.theme.colors.correctColor};\n border-radius: 50%;\n visibility: hidden;\n opacity: 0;\n transform: translate(-50%, -50%) scale(0);\n ${props =>\n props.passedMark <= props.progress &&\n css`\n visibility: visible;\n opacity: 1;\n transform: translate(-50%, -50%) scale(1);\n `}\n`;\n\nexport const ProgressWrapper = styled.div`\n padding: 10px 0 8px;\n ${StatusIcon} {\n transition: all 0.3s;\n }\n &:hover ${StatusIcon} {\n visibility: visible;\n opacity: 1;\n transform: translate(-50%, -50%) scale(1);\n }\n`;\ntype ProgressBarMarkProps = {\n top: number;\n passedMark: any;\n height: any;\n styles: any;\n}\nexport const ProgressBarMark = styled.div`\n position: absolute;\n top: ${props => (props.top ? props.top : 0)}px;\n left: ${props => (props.passedMark ? props.passedMark : 0)}%;\n height: ${props => (props.height ? props.height : 2)}px;\n width: 2px;\n border-radius: 1px;\n background-color: ${props =>\n props.styles\n ? transparentize(props.theme.colors[props.styles.color], props.styles.opacity)\n : transparentize(props.theme.colors.coverBgOverlayTextColor, 0.5)};\n`;\n","import React, { useState } from 'react';\nimport { localize } from 'core/localization';\nimport { Icon, ProgressBar, Tooltip } from 'components/common';\nimport { ProgressWrapper, ProgressBarMark, StatusIcon } from './ProgressResult.styled';\n\ntype ProgressResultProps = {\n height?: number;\n progress: number;\n className?: string;\n passedMark: number;\n passedMarkStyles?: { [key: string]: any };\n forwardedRef?: any;\n progressColor?: string;\n opacity?: any;\n};\nconst ProgressResult = ({\n height = 2,\n progress = 0,\n className = '',\n passedMark,\n passedMarkStyles,\n progressColor,\n opacity\n}: ProgressResultProps) => {\n const [showTooltip, setShowTooltip] = useState(false);\n\n const toggleShowTooltip = () => {\n setShowTooltip(!showTooltip);\n };\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default ProgressResult;\n","import styled, { css } from 'styled-components';\nimport { ICON, SIZES } from 'constants/components';\nimport { transparentize } from 'utils/color';\nimport { IconElement } from 'components/common/Icon/Icon.styled';\nimport media from 'components/mixins/media';\nimport { pointerOnHover, transition } from 'components/mixins/interactivity';\nimport { defaultBoxShadowColor } from 'constants/common';\n\nconst roundFullColor = css`\n border-radius: 50%;\n background-color: ${props => getColor(props)};\n`;\n\nconst roundOutlined = css`\n border-radius: 50%;\n border: 1px solid ${props => getColor(props)};\n`;\n\nconst roundShaded = css`\n border-radius: 50%;\n background: ${props => props.theme.colors.contentBodyColor};\n box-shadow: 0 2px 4px 0 ${transparentize(defaultBoxShadowColor, 0.15)};\n`;\n\ntype IconShapeProps = {\n size: any;\n shape?: any;\n hoverShape?: any;\n getHoverColor?: any;\n shapeColor?: any;\n shapeOpacity?: any;\n};\n/* eslint-disable import/prefer-default-export */\nexport const IconShape = styled.div`\n display: flex;\n justify-content: center;\n align-items: center;\n flex-shrink: 0;\n\n width: ${props => getShapeSize(props.size)}px;\n height: ${props => getShapeSize(props.size)}px;\n\n ${transition('border, background-color, box-shadow')};\n\n & ${IconElement} {\n ${transition('none')};\n }\n\n ${props => props.shape === ICON.SHAPES.ROUND_FULL_COLOR && roundFullColor};\n ${props => props.shape === ICON.SHAPES.ROUND_OUTLINED && roundOutlined};\n ${props => props.shape === ICON.SHAPES.ROUND_SHADED && roundShaded};\n\n ${props =>\n props.size === SIZES.LARGE &&\n media.xsmall`\n width: 20px;\n height: 20px;\n `};\n\n ${props =>\n props.hoverShape &&\n css`\n ${pointerOnHover};\n &:hover,\n &:focus {\n background-color: ${props.theme.colors.contentBodyColor};\n border: none;\n box-shadow: none;\n ${props.hoverShape === ICON.SHAPES.ROUND_SHADED && roundShaded};\n }\n `};\n\n ${props =>\n props.getHoverColor &&\n css`\n ${pointerOnHover};\n &:hover ${IconElement}, &:focus ${IconElement} {\n color: ${getHoverColor(props)};\n }\n `};\n`;\n\nfunction getHoverColor(props: any) {\n if (props.getHoverColor) {\n return props.getHoverColor(props.theme.colors);\n }\n}\n\nfunction getColor(props: any) {\n if (props.getShapeColor) {\n return props.getShapeColor(props.theme.colors);\n }\n\n return transparentize(props.theme.colors[props.shapeColor], props.shapeOpacity || 1);\n}\n\nfunction getShapeSize(size: any) {\n if (typeof size === 'number') {\n return size;\n }\n\n switch (size) {\n case SIZES.SMALL:\n return 16;\n case SIZES.MEDIUM:\n return 24;\n default:\n return 30;\n }\n}\n","import * as React from 'react';\nimport { ICON, SIZES } from 'constants/components';\nimport Icon from 'components/common/Icon';\nimport { IconShape } from './ShapedIcon.styled';\n\ninterface Size {\n [SIZES.SMALL]: string;\n [SIZES.MEDIUM]: string;\n [SIZES.LARGE]: string;\n}\n\ninterface Shape {\n [ICON.SHAPES.ROUND_FULL_COLOR]: string;\n [ICON.SHAPES.ROUND_OUTLINED]: string;\n [ICON.SHAPES.ROUND_SHADED]: string;\n}\n\ntype ShapedIconProps = {\n name: string;\n color?: string;\n getColor?(): void;\n getHoverColor?(): void;\n className?: string;\n size: keyof Size | number;\n fontSize?: number;\n shape?: keyof Shape;\n hoverShape?: keyof Shape;\n shapeColor: string;\n getShapeColor?(): void;\n};\n\nexport const ShapedIcon = (props: ShapedIconProps) => {\n const { name = 'ok', shapeColor = 'mainColor', shape = ICON.SHAPES.ROUND_FULL_COLOR, size = SIZES.SMALL, fontSize, color = 'buttonTextColor', getColor } = props;\n\n return (\n \n \n \n );\n};\n\nfunction getIconSize(fontSize: any, size: any) {\n if (typeof size === 'number' && !fontSize) {\n throw new Error('fontSize must be specified when size is set as numeric value');\n }\n\n if (fontSize) return fontSize;\n switch (size) {\n case SIZES.SMALL:\n return 6;\n case SIZES.MEDIUM:\n return 10;\n default:\n return 12;\n }\n}\n\nShapedIcon.SHAPES = ICON.SHAPES;\nShapedIcon.SIZES = SIZES;\n\nexport default ShapedIcon;\n","import styled from 'styled-components';\nimport Text from 'components/common/Text';\nimport Icon from 'components/common/Icon';\nimport { transparentize } from 'utils/color';\nimport { TOOLTIP } from 'constants/components';\nimport { secondaryFont } from 'components/mixins/typography';\nimport media from 'components/mixins/media';\nimport { LayoutType } from './StatusTooltip';\n\nexport const IconElement = styled(Icon)`\n ${secondaryFont};\n position: absolute;\n display: inline;\n top: 50%;\n left: 16px;\n transform: translateY(-50%);\n font-weight: bold;\n line-height: 1.5px;\n`;\n\nexport const MessageContainer = styled(Text)`\n && {\n color: ${props => props.theme.colors.textColor};\n font-size: 10px;\n font-weight: normal;\n line-height: 1.5;\n white-space: pre-line;\n word-break: break-word;\n word-wrap: break-word;\n }\n`;\n\ntype ContainerMessageProps = {\n layout: keyof LayoutType\n}\nexport const ContainerMessage = styled.div`\n position: relative;\n display: block;\n width: 320px;\n padding: 10px 32px 10px 37px;\n background: ${props =>\n transparentize(\n (props.layout === TOOLTIP.INCORRECT && props.theme.colors.incorrectColor) ||\n (props.layout === TOOLTIP.CORRECT && props.theme.colors.correctColor),\n 0.1\n )};\n border: 1px solid\n ${props =>\n transparentize(\n (props.layout === TOOLTIP.INCORRECT && props.theme.colors.incorrectColor) ||\n (props.layout === TOOLTIP.CORRECT && props.theme.colors.correctColor),\n 0.3\n )};\n ${media.mobile`\n width: 260px;\n `};\n`;\n\nexport const PopoverButton = styled.div`\n display: inline-block;\n`;\n\nexport const PopoverWrapper = styled.div`\n display: block;\n`;\n","import * as React from 'react';\nimport { withTheme } from 'styled-components';\nimport { TOOLTIP } from 'constants/components';\nimport { Tooltip } from 'components/common';\nimport {\n ContainerMessage,\n MessageContainer,\n IconElement,\n PopoverWrapper,\n PopoverButton\n} from './StatusTooltip.styled';\n\nexport interface LayoutType {\n [TOOLTIP.CORRECT]: string;\n [TOOLTIP.INCORRECT]: string;\n}\ntype StatusTooltipProps = {\n popoverPosition: any;\n message: string | React.ReactElement;\n popoverButton: React.ReactElement;\n layout: keyof LayoutType;\n showTooltip: boolean;\n theme?: any;\n interactive?: boolean\n};\n\nexport class StatusTooltip extends React.Component {\n refButton: any;\n constructor(props: StatusTooltipProps) {\n super(props);\n this.refButton = React.createRef();\n }\n\n render() {\n const { popoverPosition, popoverButton, message, layout, showTooltip, onRequestClose = () => {} } = this.props;\n const templateTheme = this.props.theme;\n return (\n \n onRequestClose && onRequestClose() }\n tooltipTheme={'light'}\n position={popoverPosition}\n interactive={this.props.interactive === false ? false : true}\n distance={20}\n classNames='status-theme'\n html={\n \n \n \n {message}\n \n \n }\n >\n \n {popoverButton}\n \n \n \n );\n }\n}\n\nexport default withTheme(StatusTooltip);\n","import { ActionTypes } from './types';\nimport { ThunkResult } from '../types';\n\nexport const openLoader = (): ThunkResult => dispatch => {\n dispatch({ type: ActionTypes.OPEN_LOADER });\n};\n\nexport const closeLoader = (): ThunkResult => dispatch => {\n dispatch({ type: ActionTypes.CLOSE_LOADER });\n};\n","import styled from 'styled-components';\n\nexport const OverLayContainer = styled.div`\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n overflow: hidden;\n background-color: white;\n z-index: 200;\n`;\n","import * as React from 'react';\nimport { bindActionCreators, Dispatch } from 'redux';\nimport { connect } from 'react-redux';\nimport { CircleLoader } from 'components/common';\nimport * as loaderActions from 'store/loader/actions';\nimport { OverLayContainer } from './MainCircleLoader.styled';\n\nexport class MainCircleLoader extends React.Component {\n componentDidMount() {\n this.props.actions.openLoader();\n }\n\n componentWillUnmount() {\n this.props.actions.closeLoader();\n }\n\n render() {\n return (\n \n \n \n );\n }\n}\n\nfunction mapDispatchToProps(dispatch: Dispatch): { [key: string]: any } {\n return {\n actions: bindActionCreators(loaderActions, dispatch)\n };\n}\nexport default connect(null, mapDispatchToProps)(MainCircleLoader);\n","import React from 'react';\nimport { Route, Redirect } from 'react-router-dom';\nimport { connect } from 'react-redux';\nimport { IS_NO_ACCESS, IS_NOT_AUTHORIZED } from 'constants/typeAccess';\nimport { LOGIN_PATH } from 'constants/navigation';\nimport { MATERIAL_TYPES } from 'constants/common';\nimport { RootAppState } from 'store/types';\nimport {\n isCourseAccessLimited,\n isProgressRestoreFetched,\n isProgressRestoreFailed\n} from 'store/course/selectors';\nimport { isLoaderVisibility } from 'store/loader/selectors';\nimport { isReviewMode, isPreviewMode } from 'store/settings/selectors';\nimport MainCircleLoader from 'components/common/MainCircleLoader/MainCircleLoader';\n\ntype PrivateRouteProps = {\n component: any;\n componentNoAccess: any;\n typeAccess: string;\n exact?: any;\n path: any;\n materialType?: string;\n isCourseProgressRestoreFetched?: boolean;\n isCourseProgressRestoreFailed?: boolean;\n courseAccessLimited?: boolean;\n isLoaderVisible?: boolean;\n reviewMode?: boolean;\n previewMode?: boolean;\n};\n\nconst materialTypeCourseComponents = (displayComponents = false, Component?: any, props?: any) => {\n if (displayComponents) {\n return ;\n }\n return ;\n};\n\nexport const PrivateRoute = ({\n component: Component,\n componentNoAccess: ComponentNoAccess,\n typeAccess,\n materialType,\n isCourseProgressRestoreFetched,\n isCourseProgressRestoreFailed,\n courseAccessLimited,\n isLoaderVisible,\n reviewMode,\n previewMode,\n ...rest\n}: PrivateRouteProps) => (\n {\n if (typeAccess === IS_NO_ACCESS && !isLoaderVisible) {\n return ;\n }\n if (typeAccess === IS_NOT_AUTHORIZED) {\n return ;\n }\n if (materialType === MATERIAL_TYPES.COURSE) {\n return materialTypeCourseComponents(\n courseAccessLimited ||\n reviewMode ||\n previewMode ||\n isCourseProgressRestoreFetched ||\n isCourseProgressRestoreFailed,\n Component,\n props\n );\n }\n if (!isLoaderVisible) {\n return ;\n }\n return <>;\n }}\n />\n);\n\nfunction mapStateToProps(state: RootAppState) {\n return {\n isCourseProgressRestoreFetched: isProgressRestoreFetched(state),\n isCourseProgressRestoreFailed: isProgressRestoreFailed(state),\n courseAccessLimited: isCourseAccessLimited(state),\n isLoaderVisible: isLoaderVisibility(state),\n reviewMode: isReviewMode(state),\n previewMode: isPreviewMode(state)\n };\n}\n\nexport default connect(mapStateToProps)(PrivateRoute);\n","import React from 'react';\nimport { Route, Redirect } from 'react-router-dom';\nimport { connect } from 'react-redux';\nimport progressStorage from 'core/progressStorage';\nimport { INDEX_PATH } from 'constants/navigation';\nimport { RootAppState } from 'store/types';\nimport { isLoaderVisibility } from 'store/loader/selectors';\n\ntype RouteWithRedirectProps = {\n component: any;\n shouldRedirect: boolean;\n isLoaderVisible?: boolean;\n history?: { [key: string]: any };\n exact: any;\n path: any;\n};\nexport const RouteWithRedirect = ({\n component: Component,\n shouldRedirect,\n isLoaderVisible,\n ...rest\n}: RouteWithRedirectProps) => (\n {\n const routeTo = progressStorage.url || INDEX_PATH;\n const canRedirect = props.history.location.pathname !== routeTo;\n if (shouldRedirect && canRedirect) {\n return ;\n }\n if (!isLoaderVisible) {\n return ;\n }\n return <>;\n }}\n />\n);\n\nfunction mapStateToProps(state: RootAppState) {\n return {\n isLoaderVisible: isLoaderVisibility(state)\n };\n}\nexport default connect(mapStateToProps)(RouteWithRedirect);\n","import styled from 'styled-components';\nimport { shake } from 'components/mixins/interactivity';\n\ntype TooltipContentProps = {\n templateTheme: any;\n};\nexport const TooltipContentWrapper = styled.div.attrs({\n 'data-test': 'tooltip-wrapper'\n})`\n padding: 5px 7px 7px;\n background: ${(props: any) => props.templateTheme.colors.contentBodyColor};\n outline: none;\n\n &.dropdown-theme,\n &.status-theme {\n padding: 0;\n }\n .dropdown-theme & {\n pointer-events: all;\n }\n\n .tippy-popper[x-placement^='bottom'] .hint-popover-theme &,\n .tippy-popper[x-placement^='top'] .hint-popover-theme & {\n ${shake('vertical')}\n }\n\n .tippy-popper[x-placement^='left'] .hint-popover-theme &,\n .tippy-popper[x-placement^='right'] .hint-popover-theme & {\n ${shake('horizontal')}\n }\n`;\n\nexport const TooltipContentArrow = styled.div.attrs({\n 'x-arrow': 'true'\n})`\n .tippy-popper[x-placement^='top'] .tippy-tooltip ${TooltipContentWrapper} &[x-arrow] {\n border-top-color: ${(props: any) => props.templateTheme.colors.contentBodyColor};\n }\n\n .tippy-popper[x-placement^='bottom'] .tippy-tooltip ${TooltipContentWrapper} &[x-arrow] {\n border-bottom-color: ${(props: any) => props.templateTheme.colors.contentBodyColor};\n }\n\n .tippy-popper[x-placement^='left'] .tippy-tooltip ${TooltipContentWrapper} &[x-arrow] {\n border-left-color: ${(props: any) => props.templateTheme.colors.contentBodyColor};\n }\n\n .tippy-popper[x-placement^='right'] .tippy-tooltip ${TooltipContentWrapper} &[x-arrow] {\n border-right-color: ${(props: any) => props.templateTheme.colors.contentBodyColor};\n }\n`;\n","import * as React from 'react';\nimport { isTouchScreenDevice } from 'utils/window';\nimport { withTheme } from 'styled-components';\nimport { Tooltip, TooltipProps } from 'react-tippy';\nimport 'react-tippy/dist/tippy.css';\nimport './Tooltip.css';\nimport { TooltipContentWrapper, TooltipContentArrow } from './Tooltip.styled';\n\ninterface TooltipElementProps extends TooltipProps {\n classNames?: string;\n children: React.ReactChild;\n tooltipTheme?: 'dark' | 'light' | 'transparent';\n templateTheme?: { [key: string]: any };\n}\n\nconst TooltipElement = ({ ...props }: TooltipElementProps) => {\n const newProps: TooltipElementProps = props;\n newProps.html = (\n e.stopPropagation()}\n >\n {props.html}\n {props.arrow && }\n \n );\n newProps.arrow = false;\n return (\n \n {newProps.children}\n \n );\n};\n\nTooltipElement.defaultProps = {\n popperOptions: {\n modifiers: {\n preventOverflow: {\n boundariesElement: 'viewport'\n },\n computeStyle: { gpuAcceleration: false }\n },\n positionFixed: isTouchScreenDevice()\n },\n useContext: true,\n stickyDuration: 0,\n tooltipTheme: 'light',\n animateFill: false,\n arrow: false\n};\n\nexport default withTheme(TooltipElement);\n","import styled from 'styled-components';\nimport media from 'components/mixins/media';\n\ntype LogoProps = {\n altText: string;\n logoUrl: string;\n}\nexport const Logo = styled.img.attrs((props: LogoProps) => ({\n alt: props.altText,\n src: props.logoUrl\n})) `\n display: block;\n margin-top: 24px;\n margin-bottom: 35px;\n max-width: 200px;\n max-height: 80px;\n\n ${media.mobile`\n max-width: 160px;\n max-height: 60px;\n margin-left: 10px;\n `};\n`;\n\nexport default Logo;\n","import * as React from 'react';\nimport { localize } from 'core/localization';\nimport Logo from './CourseLogo.styled';\n\ntype CourseLogoProps = {\n logoUrl: string\n};\nconst CourseLogo = (props: CourseLogoProps) => ;\n\nexport default CourseLogo;\n","export { default as Button } from './Button';\nexport { default as CircleLoader } from './CircleLoader';\nexport { default as Collapse } from './Collapse';\nexport { default as CssAnimation } from './CssAnimation';\nexport { default as Delay } from './Delay';\nexport { default as DragDrop } from './DragDrop';\nexport { default as Icon } from './Icon';\nexport { default as Loader } from './Loader';\nexport { default as MultipleChoiceItems } from './MultipleChoiceItems';\nexport { default as NumericList } from './NumericList';\nexport { default as Popup } from './Popup';\nexport { default as ProgressBar } from './ProgressBar';\nexport { default as ProgressResult } from './ProgressResult';\nexport { default as Separator } from './Separator';\nexport { default as ShapedIcon } from './ShapedIcon';\nexport { default as SwitchButton } from './SwitchButton';\nexport { default as Text } from './Text';\nexport { default as Link } from './Link';\nexport { default as TextInput } from './TextInput';\nexport { default as DropdownInput } from './DropdownInput';\nexport { default as StatusTooltip } from './StatusTooltip';\nexport { default as PrivateRoute } from './Routes/PrivateRoute';\nexport { default as RouteWithRedirect } from './Routes/RouteWithRedirect';\nexport { default as EditableTextarea } from './EditableTextarea';\nexport { default as Tooltip } from './Tooltip';\nexport { default as CourseLogo } from './CourseLogo';\nexport { default as Hint } from './Hint';\nexport { default as PdfDocument } from './embeddables/PdfDocument';\nexport { default as SkipToContent } from './SkipToContent';\n","import * as React from 'react';\nimport TextareaAutosize from 'react-autosize-textarea';\nimport EditableContentWrapper from './EditableTextarea.styled';\n\ntype EditableTextareaProps = {\n defaultValue?: string;\n onResize?(e?: any): void;\n disabled?: boolean;\n placeholder: string;\n onBlur?(e?: any): void;\n onChange(e?: any): void;\n tabIndex: number;\n rows: number;\n isAutofocus: boolean;\n};\n\nexport class EditableTextarea extends React.PureComponent {\n textAreaNode: any;\n constructor(props: EditableTextareaProps) {\n super(props);\n this.textAreaNode = React.createRef()\n }\n\n static defaultProps = {\n onResize: () => { },\n tabIndex: 0,\n defaultValue: '',\n rows: 3,\n isAutofocus: false\n };\n\n componentDidMount() {\n if (this.props.isAutofocus) {\n this.textAreaNode.current.focus();\n }\n }\n\n render() {\n const {\n placeholder,\n onResize,\n onBlur,\n onChange,\n defaultValue,\n disabled,\n tabIndex,\n rows\n } = this.props;\n return (\n \n \n \n );\n }\n}\n\nexport default EditableTextarea;\n","export { default } from './EditableTextarea';\n","import React from 'react';\nimport { withTheme } from 'styled-components';\nimport { transparentize } from 'utils/color';\nimport { localize } from 'core/localization';\nimport { Figure } from './Figure.styled';\n\ntype TrophyProps = {\n theme: { [key: string]: any };\n};\nexport const Trophy = (props: TrophyProps) => (\n \n 5F3B7156-1795-4431-B359-0884AE1D4E74\n Created with sketchtool.\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n);\n\nexport default withTheme(Trophy);\n","import styled from 'styled-components';\nimport Icon from 'components/common/Icon';\nimport buttonDefaultStyle from 'components/mixins/normalize';\nimport media from 'components/mixins/media';\nimport { transparentize } from 'utils/color';\n\nexport const BottomLine = styled.div`\n width: 60%;\n height: 2px;\n background-color: ${props => transparentize(props.theme.colors.textColor, 0.08)};\n margin: 160px auto 0;\n ${media.mobile`\n margin: 80px auto 80px;\n `};\n`;\n\ntype PopupWrapperProps = {\n ariaModal: any;\n role: string;\n tabIndex: number;\n};\nexport const PopupWrapper = styled.div.attrs((props: PopupWrapperProps) => ({\n 'aria-modal': props.ariaModal,\n 'aria-label': props.ariaModal,\n tabIndex: props.tabIndex,\n role: props.role\n}))`\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n padding: 20px;\n background: ${props => transparentize(props.theme.colors.contentBodyColor, 0.98)};\n z-index: 200;\n overflow: auto;\n`;\n\nexport const PopupContent = styled.div`\n display: flex;\n flex-direction: column;\n justify-content: center;\n min-height: max-content;\n height: 100%;\n`;\n\ntype PopupOverlayProps = {\n tabIndex: number;\n role: string;\n};\nexport const PopupOverlay = styled.div.attrs((props: PopupOverlayProps) => ({\n tabIndex: props.tabIndex,\n role: props.role\n}))`\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n`;\n\ntype CloseBtnWrapperProps = {\n tabIndex: number;\n ariaLabel: string;\n};\nexport const CloseBtnWrapper = styled.button.attrs((props: CloseBtnWrapperProps) => ({\n tabIndex: props.tabIndex,\n 'aria-label': props.ariaLabel\n}))`\n ${buttonDefaultStyle};\n position: fixed;\n top: 20px;\n right: 20px;\n color: ${props => transparentize(props.theme.colors.textColor)};\n text-align: center;\n opacity: 0.4;\n transition: opacity 0.2s linear;\n cursor: pointer;\n z-index: 2;\n\n &:hover {\n opacity: 1;\n }\n &:focus {\n outline: 1px solid black;\n background: none;\n }\n &:focus:not(:focus-visible) {\n outline: none;\n }\n`;\n\ntype CloseBtnIconProps = {\n size: number;\n name: string;\n};\nexport const CloseBtnIcon = styled(Icon)`\n color: ${props => transparentize(props.theme.colors.textColor)};\n`;\n\nexport const CloseBtnText = styled(Icon)`\n display: block;\n color: ${props => transparentize(props.theme.colors.textColor)};\n padding-top: 6px;\n ${media.medium`\n display: none;\n `};\n`;\n","import * as React from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators, Dispatch } from 'redux';\nimport * as actions from 'store/popup/actions';\nimport { getPopupSettings } from 'store/popup/selectors';\nimport { localize } from 'core/localization';\nimport {\n PopupWrapper,\n PopupContent,\n PopupOverlay,\n CloseBtnWrapper,\n CloseBtnIcon,\n CloseBtnText,\n BottomLine\n} from './Popup.styled';\nimport { RootAppState } from 'store/types';\n\ntype PopupContainerProps = {\n popupSettings: { [key: string]: any };\n actions: { [key: string]: any };\n};\nexport class PopupContainer extends React.Component {\n containerElement: any;\n focusedElementBeforeDialogOpened: any;\n constructor(props: PopupContainerProps) {\n super(props);\n this.containerElement = React.createRef();\n this.focusedElementBeforeDialogOpened = null;\n }\n\n handleKeyDown = (evt: any) => {\n const { disablePopupClosing } = this.props.popupSettings;\n if (!disablePopupClosing && (evt.key === 'Escape' || evt.keyCode === 27)) {\n this.closePopup();\n }\n };\n\n componentDidMount() {\n this.focusedElementBeforeDialogOpened = document.activeElement;\n\n const { popupId } = this.props.popupSettings;\n\n const element = document.getElementById(popupId);\n if (element) {\n setTimeout(() => element.focus(), 0);\n }\n\n window.addEventListener('keyup', this.preventActions);\n }\n\n componentWillUnmount() {\n window.removeEventListener('keyup', this.preventActions);\n }\n\n preventActions = (event: any) => {\n if (event.key === 'Tab' || event.keyCode === 9) {\n const popupContainer: any = document.getElementById(this.props.popupSettings.popupId);\n const isElementInPopup = popupContainer.contains(event.target);\n if (!isElementInPopup) {\n popupContainer.focus();\n }\n }\n };\n\n closePopup = () => {\n this.props.actions.closePopup();\n if (this.focusedElementBeforeDialogOpened) {\n this.focusedElementBeforeDialogOpened.focus();\n }\n };\n\n render() {\n const {\n popupId,\n popupAriaLabelKey,\n disablePopupClosing,\n enableClosePopupByTap,\n disableBottomLine,\n component: ComponentToRender\n } = this.props.popupSettings;\n return (\n this.handleKeyDown(event)}\n >\n {disablePopupClosing && enableClosePopupByTap && (\n this.closePopup()} />\n )}\n \n {!disablePopupClosing && (\n this.closePopup()}\n >\n \n \n \n )}\n \n {!disableBottomLine && }\n \n \n );\n }\n}\n\nfunction mapStateToProps(state: RootAppState) {\n return {\n popupSettings: getPopupSettings(state)\n };\n}\n\nfunction mapDispatchToProps(dispatch: Dispatch) {\n return { actions: bindActionCreators(actions, dispatch) };\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(PopupContainer);\n","export { default } from './Popup';\n","import styled from 'styled-components';\nimport { transparentize } from 'utils/color';\n\nexport const ListCounter = styled.ul`\n line-height: 42px;\n padding-right: 20px;\n color: ${props => transparentize(props.theme.colors.textColor, 0.2)};\n`;\n\ntype ListCounterItemProps = {\n lineHeight: number;\n}\nexport const ListCounterItem = styled.li`\n margin-bottom: 8px;\n transition: 0.3s;\n\n line-height: ${props => props.lineHeight}px !important;\n`;\n","import * as React from 'react';\nimport { ListCounter, ListCounterItem } from './NumericList.styled';\n\ntype NumericListProps = {\n items: any[];\n}\nexport class NumericList extends React.Component {\n render() {\n const { items } = this.props;\n return (\n \n {items.map((item: any, index: any) => (\n \n {index + 1}\n \n ))}\n \n );\n }\n}\n\nexport default NumericList;\n","export { default } from './NumericList';\n","export enum ActionTypes {\n QUESTION_MULTIPLECHOICE_TOGGLE_ANSWER_IS_SELECTED = 'QUESTION_MULTIPLECHOICE_TOGGLE_ANSWER_IS_SELECTED',\n QUESTION_MULTIPLECHOICE_SET_SINGLE_ANSWER_SELECTED = 'QUESTION_MULTIPLECHOICE_SET_SINGLE_ANSWER_SELECTED',\n SET_SINGLE_ANSWER_SELECTED = 'SET_SINGLE_ANSWER_SELECTED'\n}\n\ntype AnswerIsSelected = {\n type: ActionTypes.QUESTION_MULTIPLECHOICE_TOGGLE_ANSWER_IS_SELECTED,\n payload: {\n questionId: string,\n answerId: string\n }\n}\n\ntype MultipleChoiceSingleAnswerSelected = {\n type: ActionTypes.QUESTION_MULTIPLECHOICE_SET_SINGLE_ANSWER_SELECTED,\n payload: {\n questionId: string,\n answerId: string\n }\n}\n\ntype SingleAnswerSelected = {\n type: ActionTypes.SET_SINGLE_ANSWER_SELECTED,\n payload: {\n questionId: string,\n answerId: string\n }\n}\n\nexport type MultipleChoiceActionTypes = AnswerIsSelected | MultipleChoiceSingleAnswerSelected | SingleAnswerSelected;\n","export const COURSE_LAUNCHED = 'course:launched';\nexport const COURSE_STARTED = 'course:started';\nexport const COURSE_FINISHED = 'course:finished';\nexport const COURSE_FINALIZED = 'course:finalized';\nexport const COURSE_EVALUATED = 'course:evaluated';\n\nexport const COURSE_PROGRESSED = 'course:progressed';\nexport const SUBMIT_ONCE_COURSE_PROGRESSED = 'course:submitOnceProgressed';\nexport const COURSE_ATTEMPT_STARTED = 'course:attemptStarted';\nexport const COURSE_QUESTION_POOL_SELECTED = 'course:questionPoolSelected';\nexport const COURSE_RANDOMIZED_OPTIONS_SAVED = 'course:randomizedOptionsSaved';\nexport const SECTION_PROGRESSED = 'section:progressed';\nexport const QUESTION_ANSWERED = 'question:answered';\nexport const SUBMIT_ONCE_QUESTION_ANSWERED = 'question:submitOnceAnswered';\n\nexport const SUBMIT_ONCE_QUESTION_SUBMITTED = 'question:submitOnce';\nexport const SUBMIT_ONCE_QUESTION_ATTEMPTED = 'question:submitOnceAttempt';\nexport const COURSE_SUBMIT_AT_ONCE_LIMITED = 'question:submitOnceAttempted';\nexport const INFORMATION_CONTENT_EXPERIENCED = 'information-content:experienced';\n\nexport const APP_INITIALIZED = 'app:initialized';\nexport const APP_NAVIGATED = 'app:navigated';\nexport const APP_OFFLINE_OR_SERVER_ERROR = 'app:offline-or-server-error';\nexport const APP_ONLINE = 'app:online';\n\nexport const RESET_QUESTION_PROGRESS = 'progress:resetQuestionProgress';\n\nexport const USER_AUTHENTICATED = 'user:authenticated';\nexport const USER_LOGOUT = 'user:logout';\n\nexport const REVIEW_INITIALIZED = 'review:initialized';\nexport const COMMENT_SENT = 'review:comment-sent';\nexport const REVIEWER_AUTHORIZED = 'review:reviewer-authorized';\nexport const REVIEW_RESTORE_USER = 'review:review-restore-user';\n\nexport const RESET_TIMER_PROGRESS = 'progress:resetTimerProgress';\nexport const COURSE_TIMER_PROGRESSED = 'course:timerProgressed';\n\n/* Checklist */\n\nexport const UPDATE_CHECKLIST_PROGRESS = 'checklist:update';\n","import { createSelector } from 'reselect';\nimport { COURSE_TIMER_PROGRESS_KEY } from 'constants/timer';\nimport * as comparison from '../../utils/comparison';\nimport {\n getSections,\n getQuestions,\n affectsProgress,\n getAffectProgressSections\n} from '../sections/selectors';\nimport { isAccessLimited, getAllowedUsers } from '../settings/selectors';\nimport { getEmail, isAnonymous, getUserId } from '../user/selectors';\nimport { INFORMATION_CONTENT } from '../../constants/questionTypes';\nimport { RootAppState } from '../types';\n\nexport const getCourseTitle = (state: RootAppState) => state.course.title;\n\nexport const getCourseIntroductions = (state: RootAppState) => state.course.introductions;\n\nexport const getCourse = (state: RootAppState) => state.course;\n\nexport const getStatus = (state: RootAppState) => state.course.status;\n\nexport const isPassed = (state: RootAppState) => comparison.isPassed(state.course.status);\n\nexport const isInProgress = (state: RootAppState) => comparison.isInProgress(state.course.status);\n\nexport const isFailed = (state: RootAppState) => comparison.isFailed(state.course.status);\n\nexport const getCourseId = (state: RootAppState) => state.course.id;\n\nexport const getTemplateId = (state: RootAppState) => state.course.templateId;\n\nexport const getAttemptId = (state: RootAppState) => state.course.attemptId;\n\nexport const hasBeenContinued = (state: RootAppState) => state.course.hasBeenContinued;\n\nexport const getCourseAttempt = (state: RootAppState) => state.course.courseAttempt;\n\nexport const getPreviewQuestionId = (state: RootAppState) => state.course.previewQuestionId;\n\nexport const isAttemptSubmitted = (state: RootAppState) => !!state.course.isAttemptSubmitted;\n\nexport const getTimeSpent = (state: RootAppState) =>\n new Date().getTime() -\n state.course.timeSpent.incrementStartedAt.getTime() +\n state.course.timeSpent.accumulatedValueInMilliseconds;\n\nexport const getCourseStructure = createSelector(\n (state: RootAppState) => state,\n (state: RootAppState) => ({\n title: getCourseTitle(state),\n sections: getSections(state).map(section => ({\n title: section.title,\n id: section.id,\n status: section.status,\n isSectionAnswered: section.isSectionAnswered,\n sectionProgress: section.sectionProgress,\n score: section.score,\n learningObjective: section.learningObjective,\n affectsProgress: affectsProgress(state, section.id),\n questions: getQuestions(state, section.id).map((question: any) => ({\n id: question.id,\n title: question.title,\n isInformationContent: question.type === INFORMATION_CONTENT,\n isAnswered: question.isAnswered,\n isAnsweredCorrectly: question.isAnsweredCorrectly,\n affectsProgress: question.affectsProgress,\n isSurvey: question.isSurvey,\n hasBeenOpened: question.hasBeenOpened,\n type: question.type\n }))\n })),\n isAttemptSubmitted: isAttemptSubmitted(state)\n })\n);\n\nexport const getQuestionsStructure = createSelector(\n (state: RootAppState) => getCourseStructure(state),\n ({ sections }) => {\n const questionsSchema: string[] = [];\n\n sections.forEach(({ questions }) => {\n questions.forEach(({ id }: { [key: string]: any }) => {\n questionsSchema.push(id);\n });\n });\n\n return questionsSchema;\n }\n);\nexport const isCourseAllAnswered = (state: RootAppState) => {\n return getSections(state).filter((section: any) => !section.isSectionAnswered).length === 0;\n};\n\nexport const isCourseAccessLimited = (state: RootAppState) => {\n const email = getEmail(state);\n return (\n (!!email || isAnonymous(state)) &&\n isAccessLimited(state) &&\n !getAllowedUsers(state).some((item: any) => item.email === email)\n );\n};\n\nexport const getScore = (state: RootAppState) => state.course.score;\n\nexport const isCertificateDownloaded = (state: RootAppState) =>\n state.course.isCertificateDownloaded;\n\nexport const getPassedAfterwords = (state: RootAppState) => state.course.passedAfterwords;\n\nexport const getFailedAfterwords = (state: RootAppState) => state.course.failedAfterwords;\n\nexport const isFinalized = (state: RootAppState) => state.course.score === 100;\n\nexport const isCourseLaunched = (state: RootAppState) => state.course.isLaunched;\n\nexport const isProgressRestoreFailed = (state: RootAppState) =>\n state.course.isProgressRestoreFailed;\n\nexport const isProgressRestoreFetched = (state: RootAppState) =>\n state.course.isProgressRestoreFetched;\n\nexport const isCoursePassed = createSelector(getAffectProgressSections, sections =>\n sections.every(section => comparison.isPassed(section.status))\n);\n\nexport const isCourseFailed = createSelector(\n getAffectProgressSections,\n state => state,\n (sections, state) =>\n !isCoursePassed(state) && sections.every(section => !comparison.isInProgress(section.status))\n);\n\nexport const getTimerProgressKey = (state: RootAppState) =>\n `${COURSE_TIMER_PROGRESS_KEY}${getCourseId(state)}${getTemplateId(state)}${getUserId(state)}`;\n\nexport const isRandomizedOptionsLoaded = (state: RootAppState) =>\n state.course.isRandomizedOptionsLoaded;\n","import xss from '@easygenerator/xss';\nimport resourceLoader from './resourceLoader';\n\nexport default {\n async loadMaterialData() {\n let response = await resourceLoader.getLocalResource(`content/data.js`);\n return response.json();\n },\n async loadStaticHtmlContent(url: string) {\n let response = await resourceLoader.getLocalResource(`content/${url}`);\n return xss.filter(await response.text());\n }\n};\n","import WebFont from 'webfontloader';\nimport resourceLoader from 'core/http/resourceLoader';\nimport { addQueryStringParameter } from 'utils/window';\nimport { FONT_WEIGHTS, SECONDARY_FONT_KEY } from 'constants/common';\n\n/* eslint-disable import/prefer-default-export */\nexport async function loadFonts(fonts: any, customFontPlace: any) {\n const mappedFonts = mapFonts(fonts, customFontPlace);\n const webFontConfig = prepareWebFontConfig(mappedFonts);\n if (Object.keys(webFontConfig).length !== 0 && webFontConfig.constructor === Object) {\n await makeLoadFontRequest(webFontConfig);\n }\n}\n\nfunction mapFonts(fonts: any, customFontPlace: any) {\n const mappedFonts: { [key: string]: any } = {};\n const presetFonts = fonts.map(mapPresetFont);\n const templateFonts = getTemplateFont(fonts);\n const allTemplateFonts = presetFonts.concat(templateFonts);\n allTemplateFonts.forEach((font: any) => {\n if (font.place === 'none') {\n return;\n }\n const place = mappedFonts[font.place] || {};\n\n const samefont = place[font.family] || {\n variants: [],\n styles: []\n };\n\n const variant = mapVariant(font.variant, font.style);\n\n if (variant && samefont.variants.indexOf(variant) === -1) {\n samefont.variants.push(variant);\n }\n\n samefont.url = addQueryStringParameter(customFontPlace, 'v', resourceLoader.cacheBuster);\n\n place[font.family] = samefont;\n mappedFonts[font.place] = place;\n });\n\n return mappedFonts;\n}\n\nfunction prepareWebFontConfig(places: any) {\n const config: { [key: string]: any } = {};\n\n for (const place in places) {\n const families = places[place];\n\n config[place] = {};\n\n for (const family in families) {\n const fontData = families[family];\n const placeData = config[place];\n\n placeData.families = placeData.families || [];\n placeData.urls = placeData.urls || [];\n\n placeData.families.push(mapFontName(family, fontData));\n\n if (fontData.url && placeData.urls.indexOf(fontData.url) === -1) {\n placeData.urls.push(fontData.url);\n }\n }\n }\n\n return config;\n}\n\nasync function makeLoadFontRequest(config: any) {\n return new Promise(resolve => {\n const baseConfig = {\n ...config,\n active: resolve,\n inactive: resolve\n };\n\n WebFont.load(baseConfig);\n });\n}\n\nfunction mapPresetFont(font: any) {\n return {\n family: font.fontFamily,\n place: font.place,\n variant: font.fontWeight,\n style: font.fontStyle\n };\n}\n\nfunction getTemplateFont(fonts: any) {\n const templateFonts: any[] = [];\n const secondaryFont = fonts.find((font: any) => font.key === SECONDARY_FONT_KEY);\n for (const fontWeight of FONT_WEIGHTS) {\n templateFonts.push({\n family: secondaryFont.fontFamily,\n place: secondaryFont.place,\n variant: fontWeight,\n style: secondaryFont.fontStyle\n });\n }\n return templateFonts;\n}\n\nfunction mapVariant(variant: any, style: any) {\n let result = '';\n if (variant) {\n if (variant === 'normal') {\n variant = '400';\n }\n result += variant;\n }\n if (style && style !== 'normal') {\n result += style;\n }\n return result;\n}\n\nfunction mapFontName(family: any, fontData: any) {\n const salt = fontData.variants && fontData.variants.length ? `:${fontData.variants.join(',')}` : '';\n return `${family}${salt}`;\n}\n\nexport async function loadFontsFromGoogle({\n fontFamily = 'Open Sans',\n fontWeight = [400],\n fontVariants = ['normal'],\n fontLanguages = ['latin', 'cyrillic']\n}) {\n const fontConfig = `${fontFamily}:${fontWeight.join(',')}${fontVariants.join(\n ','\n )}:${fontLanguages.join(',')}`;\n\n return WebFont.load({\n google: {\n families: [fontConfig]\n }\n });\n}\n","import styled from 'styled-components';\nimport media from 'components/mixins/media';\nimport { transparentize } from 'utils/color';\nimport { getCustomScrollbars } from 'components/mixins/customScrollbars';\n\nexport const EditableContentWrapper = styled.div`\n overflow-y: auto;\n max-height: 300px;\n padding-top: 27px;\n padding-bottom: 60px;\n min-height: 120px;\n ${getCustomScrollbars()};\n \n textarea {\n width: 100%;\n height: 160px;\n background: transparent;\n border: none;\n box-sizing: border-box;\n outline: none;\n font-size: 16px;\n line-height: 39px;\n font-weight: bold;\n color: ${props => props.theme.colors.textColor};\n overflow: hidden;\n resize: none;\n\n background-image: linear-gradient(\n transparent,\n transparent 38px,\n ${props => transparentize(props.theme.colors.textColor, 0.1)} 37px\n );\n background-size: 30px 39px;\n background-attachment: local;\n\n &:disabled {\n opacity: 0.5;\n }\n\n &::placeholder {\n color: ${props => transparentize(props.theme.colors.textColor, 0.5)};\n }\n\n ${media.mobile`\n padding: 0 60px 0 70px;\n `};\n }\n`;\n\nexport default EditableContentWrapper;\n","export const ICON = {\n SHAPES: {\n ROUND_FULL_COLOR: 'round-fullColor',\n ROUND_OUTLINED: 'round-outlined',\n ROUND_SHADED: 'round-shaded'\n }\n} as const;\n\nexport const OPACITY = {\n PERCENT_30: '0.3',\n PERCENT_100: '1.0'\n} as const;\n\nexport const BUTTON = {\n LAYOUT: {\n PRIMARY: 'primary',\n SECONDARY: 'secondary'\n }\n} as const;\n\nexport const SIZES = {\n SMALL: 'small',\n MEDIUM: 'medium',\n LARGE: 'large'\n} as const;\n\nexport const TOC = { EXPANDED_WIDTH: 380, COLLAPSED_WIDTH: 56, TAIL_WIDTH: 30 };\n\nexport const Z_INDEX = {\n SIDEBAR: 10,\n TOC: 200,\n COLLAPSED_TOC: 210,\n TOC_TAIL: 220,\n BLOCKOUT: 100\n};\n\nexport const LINK = {\n LAYOUT: {\n DEFAULT: 'default',\n FORM: 'form'\n }\n};\n\nexport const INPUT_TYPE = {\n TEXT: 'text',\n PASSWORD: 'password',\n EMAIL: 'email'\n} as const;\n\nexport const TOOLTIP = {\n CORRECT: 'correct',\n INCORRECT: 'incorrect'\n} as const;\n\nexport const SWITCH_BUTTON_LAYOUT = {\n QUESTION: 'question',\n CHECKLIST: 'checklist'\n};\n","import { RootAppState } from '../types';\n\nexport const getChain = (state: RootAppState) => state.navigation.chain;\nexport const getPrevUrl = (state: RootAppState) => state.navigation.prevUrl;\nexport const getElementIDInViewPort = (state: RootAppState) => state.navigation.elementIdInViewport;\n","import { MEDIA_SMALL } from 'constants/screenResolutions';\n\nexport const isLowerResolution = (resolution: number) => window.innerWidth < resolution;\n\nexport const getCurrentUrl = () =>\n `${window.location.protocol}//${window.location.host}${window.location.pathname}`;\n\nexport const getCurrentLocationHash = () => window.location.hash;\n\n// eslint-disable-next-line\nexport const isTouchScreenDevice = () => {\n return (\n /iPhone|iPad|iPod|Android/i.test(navigator.userAgent)\n || (/Macintosh/i.test(navigator.userAgent) && 'ontouchend' in document)\n || window.innerWidth < MEDIA_SMALL\n );\n}\n\nexport const isIE = () => Object.hasOwnProperty.call(window, \"ActiveXObject\");\n\nexport const hasQueryStringParameter = (key: any) => window.location.href.indexOf(key) !== -1;\n\nexport const addQueryStringParameter = (url: string, key: any, value: any) => {\n const regex = new RegExp(`([?&])${key}=.*?(&|$)`, 'i');\n const separator = url.indexOf('?') !== -1 ? '&' : '?';\n if (url.match(regex)) {\n return url.replace(regex, `$1${key}=${value}$2`);\n }\n return `${url}${separator}${key}=${value}`;\n};\n\nexport const getValueFromUrl = (key: any) => {\n if (!key) {\n throw new Error('Parameter \"key\" should be specified');\n }\n\n const url = window.location.href;\n const regex = new RegExp(`[?&]${key}(=([^&#]*)|&|#|$)`, 'i');\n const result = regex.exec(url);\n\n if (!result || !result[2]) {\n return;\n }\n\n return decodeURIComponent(result[2].replace(/\\+/g, ' '));\n};\n\nexport const clearQueryString = () => {\n const currentHash = getCurrentLocationHash();\n const searchIndex = currentHash.indexOf('?');\n\n if (searchIndex !== -1) {\n const cleanHash = currentHash.slice(0, searchIndex);\n window.history.replaceState({}, document.title, `${getCurrentUrl()}${cleanHash}`);\n }\n};\n\nexport const closeWindow = () => {\n if (window.top) {\n window.top.close();\n return true;\n }\n return false;\n};\n\nexport const getObjectParsedQueryString = () => {\n const regex = /[?&]([^=#]+)=([^&#]*)/g;\n const url = window.location.search;\n const params = {} as any;\n let match = regex.exec(url);\n while (match && regex.lastIndex !== 0) {\n params[match[1]] = match[2];\n match = regex.exec(url);\n }\n\n return params;\n};\n\nexport const getFilteredQueryParams = (queryKey: string) => {\n const parsedParams = getObjectParsedQueryString();\n const filteredParams = Object.keys(parsedParams)\n .filter(key => key !== queryKey)\n .reduce((acc: any, key) => acc.concat([`${key}=${parsedParams[key]}`]), [])\n .join('&');\n\n return filteredParams && filteredParams.length ? `?${filteredParams}` : '';\n};\n\nexport const removeQueryStringParam = (paramName: string) => {\n if (window.location.search.indexOf(paramName) !== -1) {\n const url = `${getCurrentUrl()}${getFilteredQueryParams(paramName)}${getCurrentLocationHash()}`;\n\n window.history.replaceState({}, document.title, url);\n }\n};\n\nexport const isIframe = () => window.top !== window.self;\n","export const IS_NO_ACCESS = `NoAccess`;\nexport const IS_NOT_AUTHORIZED = `NotAuthorized`;\nexport const IS_SUCCESSFUL_ACCESS = `SuccessfulAccess`;\n","\nexport enum ActionTypes {\n TOGGLE_CHECK = 'TOGGLE_CHECK',\n INIT_CHECKLIST = 'INIT_CHECKLIST'\n}\n\nexport type ChecklistState = {\n [key: string]: {\n isChecked: boolean;\n } \n}\n\ntype ToggleCheck = {\n [key: string]: any,\n type: ActionTypes.TOGGLE_CHECK,\n payload: {\n [key: string]: {\n isChecked: boolean\n }\n }\n}\n\ntype InitChecklist = {\n [key: string]: any,\n type: ActionTypes.INIT_CHECKLIST,\n payload: {\n [key: string]: {\n isChecked: boolean\n }\n }\n}\n\nexport type ChecklistActionTypes = ToggleCheck | InitChecklist;\n","import { schema } from 'normalizr';\n\nconst resourceContents = new schema.Entity(\n 'resourceContents',\n {},\n {\n processStrategy: (value: any, parent: any, key: string) => {\n const result = {\n ...value,\n value: undefined\n };\n result.url = `resourceContent/${value.id}.html`;\n return result;\n }\n }\n);\n\nresourceContents.define({\n children: [resourceContents]\n});\n\nexport default resourceContents;\n","import { schema } from 'normalizr';\nimport resourceContents from './resourceContents';\n\nconst resource = new schema.Entity(\n 'resource',\n {\n resourceContents: [resourceContents]\n },\n {\n processStrategy: value => ({\n ...value\n })\n }\n);\n\nexport default resource;\n","import { normalize } from 'normalizr';\nimport resourceSchema from '../schemas/resource/resource';\n\nexport default {\n map: (data: any) => {\n const normalized: any = normalize(data, resourceSchema);\n const resource: any = normalized.entities.resource[normalized.result];\n const { resourceContents } = normalized.entities;\n return {\n resource,\n resourceContents\n };\n }\n};\n","import logger from 'utils/logger';\n\nclass AnalyticsPlugin {\n private static analytics: any;\n private static instance: AnalyticsPlugin;\n private static timestamp: number;\n\n\n private constructor() { }\n\n static getInstance() {\n if (!AnalyticsPlugin.instance) {\n AnalyticsPlugin.instance = new AnalyticsPlugin();\n }\n return AnalyticsPlugin.instance;\n }\n\n public async init(writeKey: string) {\n const { Analytics } = await import('analytics');\n const SegmentPlugin = await import('@analytics/segment');\n AnalyticsPlugin.analytics = Analytics({\n plugins: [\n SegmentPlugin.default({\n writeKey\n })\n ]\n })\n\n AnalyticsPlugin.timestamp = Date.now();\n }\n\n public trackEvent(eventName: string, category?: string | null, properties?: { [key: string]: string | number }) {\n const props: { [key: string]: string | number } = {};\n const integrations = {\n Amplitude: {\n session_id: AnalyticsPlugin.timestamp\n }\n }\n if (category) {\n props.category = category;\n }\n\n if (properties) {\n Object.assign(props, properties);\n }\n\n try {\n AnalyticsPlugin.analytics.track(eventName, props, { integrations })\n } catch (err) {\n logger.log(err);\n throw (err);\n }\n }\n}\n\nexport default AnalyticsPlugin.getInstance();\n","import { RESOURCE_TYPE } from 'constants/common';\n\nexport const ResourceTypesProperty: {[key: string]: string} = {\n [RESOURCE_TYPE.CHECKLIST]: 'Checklist'\n}\n\nexport default {\n OPEN_RESOURCE: 'Open resource'\n}\n","import { isPreviewMode, analyticsWriteKey } from 'store/settings/selectors';\nimport { getResourceId, getResourceType } from 'store/resource/selectors';\nimport resourcesMapper from 'core/mappers/resource';\nimport eventEmitter, { events } from 'core/events/eventEmitter';\nimport { ThunkResult } from '../types';\nimport { ActionTypes } from './types';\nimport * as contentsActions from '../contents/actions';\nimport { RESOURCE_PATH } from 'constants/navigation';\nimport { getUser } from 'store/user/selectors';\nimport Analytics from 'core/analytics/Analytics';\nimport analyticsEvents, { ResourceTypesProperty } from 'core/analytics/events';\nimport progressStorage from 'core/progressStorage';\n\nexport const load = (data: any): ThunkResult> => async (dispatch, getState) => {\n dispatch({ type: ActionTypes.RESOURCE_DATA_LOADING_STARTED });\n try {\n const { resource, resourceContents } = resourcesMapper.map(data);\n dispatch(contentsActions.contentsLoaded(resourceContents));\n dispatch({ type: ActionTypes.RESOURCE_DATA_LOADED, payload: resource });\n\n eventEmitter.emit(events.APP_INITIALIZED, {\n state: getState(),\n isScormMode: false\n });\n } catch (e) {\n dispatch({ type: ActionTypes.RESOURCE_DATA_LOADING_FAILED, reason: e });\n throw e;\n }\n};\n\nexport const launch = (): ThunkResult> => async (dispatch, getState) => {\n if (isPreviewMode(getState())) {\n return RESOURCE_PATH;\n }\n await progressStorage.restoreProgress();\n\n await eventEmitter.emit(events.USER_AUTHENTICATED, getUser(getState()));\n\n const resourceId = getResourceId(getState());\n const resourceType = getResourceType(getState());\n const writeKey = analyticsWriteKey(getState());\n await Analytics.init(writeKey);\n Analytics.trackEvent(analyticsEvents.OPEN_RESOURCE, null, {\n resourceId,\n resourceType: ResourceTypesProperty[resourceType]\n });\n\n return RESOURCE_PATH;\n};\n","import * as React from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators, Dispatch } from 'redux';\nimport { INDEX_PATH, RESULTS_PATH } from 'constants/navigation';\nimport { TRANSITION_TIME_DURATION_MS } from 'constants/common';\nimport { getChain, getPrevUrl } from 'store/navigation/selectors';\nimport * as actions from 'store/navigation/actions';\nimport { RootAppState } from 'store/types';\nimport scrollIntoView from 'scroll-into-view';\n\ntype NavigationProps = {\n chain: any[];\n prevUrl: string;\n actions: { [key: string]: any };\n history: { [key: string]: any };\n match: { [key: string]: any };\n navigateToUrl?: any;\n checkHasPrevPage?: any;\n navigateToPrevPage?: any;\n navigateToNextPage?: any;\n navigateToIndex?: any;\n checkIsNextPageResults?: any;\n scrollToId: any;\n};\n\nexport function withNavigation(WrappedComponent: React.ComponentType): any {\n class Navigation extends React.Component {\n getNextPageUrl = () => {\n const { chain, match } = this.props;\n const { url } = match;\n let currentUrlIndex = chain.indexOf(url);\n if (currentUrlIndex === chain.length - 1) {\n return INDEX_PATH;\n }\n\n return chain[++currentUrlIndex];\n };\n\n checkHasPrevPage = () => this.props.prevUrl;\n\n navigateToPrevPage = () => {\n this.navigateToUrl(this.props.prevUrl);\n };\n\n navigateToNextPage = () => {\n this.navigateToUrl(this.getNextPageUrl());\n };\n\n navigateToIndex = () => {\n this.navigateToUrl(INDEX_PATH);\n };\n\n navigateToUrl = async (url: string, isReplace = false) => {\n if (this.props.history.location.pathname === url) {\n return;\n }\n\n await this.props.actions.navigatedToUrl(this.props.history.location.pathname, url);\n if (isReplace) {\n this.props.history.replace(url);\n } else {\n this.props.history.push(url);\n }\n };\n\n checkIsNextPageResults = () => this.getNextPageUrl() === RESULTS_PATH;\n checkIsPreviousPageResults = () => this.props.prevUrl === RESULTS_PATH;\n\n updateElementIdInViewPort = async (id: string) => {\n await this.props.actions.updateElementIdInViewPort(id);\n };\n\n scrollToId = async (id: string, offset?: number) => {\n if (id === undefined) {\n await this.navigateToUrl(RESULTS_PATH);\n }\n await this.updateElementIdInViewPort(id);\n await this.scrollIntoViewElement(id, offset);\n };\n\n scrollIntoViewElement = async (elementId: any, offset = 100) => {\n const scrollElement: HTMLElement | null = document.getElementById(elementId);\n\n if (scrollElement) {\n scrollIntoView(scrollElement, {\n time: TRANSITION_TIME_DURATION_MS,\n align: { top: 0, topOffset: offset }\n });\n }\n };\n\n render() {\n const combinedProps = {\n ...this.props,\n navigateToUrl: this.navigateToUrl,\n checkHasPrevPage: this.checkHasPrevPage,\n navigateToPrevPage: this.navigateToPrevPage,\n navigateToNextPage: this.navigateToNextPage,\n navigateToIndex: this.navigateToIndex,\n checkIsNextPageResults: this.checkIsNextPageResults,\n checkIsPreviousPageResults: this.checkIsPreviousPageResults,\n scrollToId: this.scrollToId,\n updateElementIdInViewPort: this.updateElementIdInViewPort\n };\n return ;\n }\n }\n\n function mapStateToProps(state: RootAppState) {\n return {\n state,\n chain: getChain(state),\n prevUrl: getPrevUrl(state)\n };\n }\n\n function mapDispatchToProps(dispatch: Dispatch) {\n return { actions: bindActionCreators(actions, dispatch) };\n }\n\n return connect(mapStateToProps, mapDispatchToProps)(Navigation as any);\n}\n\nexport default withNavigation;\n","export type CourseState = {\n title: string;\n id: string;\n templateId: string;\n createdBy: string;\n createdOn: Date;\n hasIntroductionContent: boolean;\n isLoadingFailed: boolean;\n attemptId: string | null;\n hasBeenContinued: boolean;\n result: number;\n isCompleted: boolean;\n isCertificateDownloaded: boolean;\n score: number;\n status: number;\n sections: string[];\n introductions?: string[];\n passedAfterwords: string[];\n failedAfterwords: string[];\n previewQuestionId?: string;\n isAttemptSubmitted?: boolean;\n courseAttempt: number;\n isLaunched: boolean;\n isProgressRestoreFailed?: boolean;\n isProgressRestoreFetched?: boolean;\n timeSpent: TimeSpentState;\n isRandomizedOptionsLoaded?: boolean;\n isCourseFinished?: boolean;\n};\n\nexport type TimeSpentState = {\n accumulatedValueInMilliseconds: number;\n incrementStartedAt: Date;\n};\n\nexport enum ActionTypes {\n COURSE_DATA_LOADING_STARTED = 'COURSE_DATA_LOADING_STARTED',\n COURSE_DATA_LOADED = 'COURSE_DATA_LOADED',\n COURSE_DATA_LOADING_FAILED = 'COURSE_DATA_LOADING_FAILED',\n COURSE_SCORE_UPDATED = 'COURSE_SCORE_UPDATED',\n COURSE_LAUNCHED = 'COURSE_LAUNCHED',\n COURSE_STARTED = 'COURSE_STARTED',\n COURSE_SUBMIT_AT_ONCE = 'COURSE_SUBMIT_AT_ONCE',\n COURSE_SUBMIT_AT_ONCE_LIMITED = 'COURSE_SUBMIT_AT_ONCE_LIMITED',\n COURSE_REATTEMPTED_SUBMIT_AT_ONCE = 'COURSE_REATTEMPTED_SUBMIT_AT_ONCE',\n COURSE_PROGRESS_RESTORED = 'COURSE_PROGRESS_RESTORED',\n COURSE_PROGRESS_RESTORE_FAILED = 'COURSE_PROGRESS_RESTORE_FAILED',\n COURSE_PROGRESS_RESTORE_FETCHED = 'COURSE_PROGRESS_RESTORE_FETCHED',\n COURSE_CLEANUP = 'COURSE_CLEANUP',\n COURSE_FINISHED = 'COURSE_FINISHED',\n COURSE_FINALIZED = 'COURSE_FINALIZED',\n CLEAR_PREVIEW_QUESTION_ID = 'CLEAR_PREVIEW_QUESTION_ID',\n CERTIFICATE_DOWNLOADED = 'CERTIFICATE_DOWNLOADED',\n COURSE_IS_PASSED = 'COURSE_PASSED',\n TIME_SPENT_UPDATED = 'TIME_SPENT_UPDATED',\n COURSE_IS_FAILED = 'COURSE_FAILED',\n COURSE_RANDOMIZED_OPTIONS_LOADED = 'COURSE_RANDOMIZED_OPTIONS_LOADED'\n}\n\ninterface CourseIsPassed {\n type: ActionTypes.COURSE_IS_PASSED;\n payload: {\n status: number;\n };\n}\n\ninterface CourseIsFailed {\n type: ActionTypes.COURSE_IS_FAILED;\n payload: {\n status: number;\n };\n}\n\ninterface CourseSubmitAtOnce {\n type: ActionTypes.COURSE_SUBMIT_AT_ONCE;\n}\n\ninterface CourseSubmitAtOnceLimited {\n type: ActionTypes.COURSE_SUBMIT_AT_ONCE_LIMITED;\n payload: {\n courseAttempt: number;\n };\n}\n\ninterface CourseReAttemptedSubmitAtOnce {\n type: ActionTypes.COURSE_REATTEMPTED_SUBMIT_AT_ONCE;\n}\ninterface CourseScoreUpdate {\n type: ActionTypes.COURSE_SCORE_UPDATED;\n payload: {\n score: number;\n status: number;\n };\n}\n\ninterface CourseDataLoadingStarted {\n type: ActionTypes.COURSE_DATA_LOADING_STARTED;\n}\n\ninterface CourseDataLoaded {\n type: ActionTypes.COURSE_DATA_LOADED;\n payload: CourseState;\n}\n\ninterface CourseDataLoadedFailed {\n type: ActionTypes.COURSE_DATA_LOADING_FAILED;\n reason: any;\n}\n\ninterface CourseProgressRestored {\n type: ActionTypes.COURSE_PROGRESS_RESTORED;\n payload: {\n attemptId: string;\n };\n}\n\ninterface CourseProgressRestoreFailed {\n type: ActionTypes.COURSE_PROGRESS_RESTORE_FAILED;\n reason: any;\n}\n\ninterface CourseProgressRestoreFetched {\n type: ActionTypes.COURSE_PROGRESS_RESTORE_FETCHED;\n}\n\ninterface CourseLaunched {\n type: ActionTypes.COURSE_LAUNCHED;\n payload: {\n attemptId?: string;\n };\n}\n\ninterface CourseStarted {\n type: ActionTypes.COURSE_STARTED;\n}\n\ninterface CourseCleanUp {\n type: ActionTypes.COURSE_CLEANUP;\n}\n\ninterface CourseFinished {\n type: ActionTypes.COURSE_FINISHED;\n}\n\ninterface CourseFinalized {\n type: ActionTypes.COURSE_FINALIZED;\n}\n\ninterface ClearPreviewQuestionId {\n type: ActionTypes.CLEAR_PREVIEW_QUESTION_ID;\n}\n\ninterface CertificateDownloaded {\n type: ActionTypes.CERTIFICATE_DOWNLOADED;\n payload: any;\n}\n\ninterface TimeSpentUpdated {\n type: ActionTypes.TIME_SPENT_UPDATED;\n payload: {\n timeSpent: {\n accumulatedValueInMilliseconds: number;\n incrementStartedAt: Date;\n };\n };\n}\n\ninterface CourseRandomizedOptionsLoaded {\n type: ActionTypes.COURSE_RANDOMIZED_OPTIONS_LOADED;\n}\n\nexport type CourseActionTypes =\n | CourseIsPassed\n | CourseIsFailed\n | CourseScoreUpdate\n | CourseDataLoadingStarted\n | CourseDataLoadedFailed\n | CourseProgressRestored\n | CourseLaunched\n | CourseStarted\n | CourseCleanUp\n | CourseFinished\n | CourseFinalized\n | ClearPreviewQuestionId\n | CertificateDownloaded\n | CourseSubmitAtOnce\n | CourseSubmitAtOnceLimited\n | CourseReAttemptedSubmitAtOnce\n | CourseDataLoaded\n | CourseProgressRestoreFailed\n | CourseProgressRestoreFetched\n | TimeSpentUpdated\n | CourseRandomizedOptionsLoaded;\n","import styled from 'styled-components';\n\ntype SkipToContentProps = {\n href: string;\n top: number;\n left: number;\n tabIndex: number;\n};\nexport const SkipToContentElement = styled.a.attrs((props: SkipToContentProps) => ({\n href: props.href,\n 'data-test': 'skip-to-content-link',\n tabIndex: props.tabIndex\n}))`\n position: fixed;\n top: ${props => props.top}px;\n left: ${props => props.left}px;\n padding: 5px 15px;\n font-family: 'Qanelas-Soft', 'IowanOldSt-BT', 'PT Serif', serif;\n font-size: 18px;\n font-weight: 600;\n background: #fff;\n color: #000;\n border: solid 1px #000;\n border-radius: 5px;\n text-decoration: none;\n clip: rect(1px, 1px, 1px, 1px);\n height: 1px;\n width: 1px;\n z-index: 1999;\n\n &:focus {\n clip: auto;\n height: auto;\n width: auto;\n outline: none;\n }\n`;\n","import React from 'react';\nimport { SkipToContentElement } from './SkipToContent.styled';\nimport { localize } from 'core/localization';\n\nexport interface SkipToContentProps {\n onClick(): void;\n href?: string;\n}\nexport const SkipToContent = (props: SkipToContentProps) => {\n const { onClick, href = '#' } = props;\n return (\n {\n event.preventDefault();\n onClick();\n }}\n onKeyPress={(event: any) => {\n event.preventDefault();\n onClick();\n }}\n href={href}\n top={10}\n left={40}\n tabIndex={0}\n >\n {localize('[skip to content]')}\n \n );\n};\n\nexport default SkipToContent;\n","export { default } from './SkipToContent';\n","import styled, { css } from 'styled-components';\nimport media from 'components/mixins/media';\n\ntype WrapperProps = {\n isVoiceOver: boolean;\n isCourseOnOnePage?: boolean;\n};\nexport const Wrapper = styled.div`\n position: relative;\n height: 100%;\n width: inherit;\n ${props =>\n props.isVoiceOver &&\n !props.isCourseOnOnePage &&\n css`\n position: fixed;\n height: 84px;\n top: calc(100% - 110px);\n ${media.small`\n width: 100%;\n left: 0;\n top: 100%;\n -webkit-transform: translateY(-100%);\n transform: translateY(-100%);\n z-index: 10;\n `};\n `};\n ${props =>\n props.isVoiceOver &&\n props.isCourseOnOnePage &&\n css`\n height: 84px;\n width: 100%;\n margin-top: 20px;\n ${media.small`\n height: 57px;\n z-index: 10;\n `};\n `};\n`;\n\nexport default Wrapper;\n","import * as React from 'react';\nimport { connect } from 'react-redux';\nimport { isReviewEnabled } from 'store/modules/selectors';\nimport { Wrapper } from './Reviewable.styled';\nimport { RootAppState } from 'store/types';\n\ntype ReviewableProps = {\n isGeneral?: boolean;\n context?: { [key: string]: any };\n reviewMode?: boolean;\n isVoiceOver?: boolean;\n children?: any;\n ReviewSpot?(e?: any): void;\n hintName?: string;\n isCourseOnOnePage?: boolean;\n};\n\ntype ReviewableState = {\n ReviewSpot: any;\n};\n\nexport class Reviewable extends React.Component {\n constructor(props: ReviewableProps) {\n super(props);\n this.state = { ReviewSpot: '' };\n }\n\n renderSpot = async () => {\n const { default: ReviewSpot } = await import('components/review/ReviewSpot');\n this.setState({ ReviewSpot });\n };\n\n componentDidMount() {\n if (!this.props.reviewMode) {\n return;\n }\n this.renderSpot();\n }\n\n render() {\n const {\n reviewMode,\n isGeneral,\n context,\n children,\n hintName,\n isVoiceOver = false,\n isCourseOnOnePage = false\n } = this.props;\n const { ReviewSpot } = this.state;\n return (\n \n {children}\n {reviewMode && ReviewSpot && (\n \n )}\n \n );\n }\n}\n\nfunction mapStateToProps(state: RootAppState) {\n return {\n reviewMode: isReviewEnabled(state)\n };\n}\n\nexport default connect(mapStateToProps)(Reviewable);\n","export { default } from './Reviewable';\n","import * as React from 'react';\nimport { BUTTON, SIZES } from 'constants/components';\nimport CircleLoader from 'components/common/CircleLoader';\nimport { ButtonElement, ButtonLinkElement, TextElement, IconElement } from './Button.styled';\n\nexport interface Layout {\n [BUTTON.LAYOUT.PRIMARY]: string;\n [BUTTON.LAYOUT.SECONDARY]: string;\n}\nexport interface Size {\n [SIZES.SMALL]: string;\n [SIZES.MEDIUM]: string;\n}\ntype ButtonProps = {\n type?: string;\n suffixIcon?: string;\n disabled: boolean;\n children: React.ReactNode;\n onClick?(e?: any): void;\n layout: keyof Layout;\n size: keyof Size;\n textTransform?: string;\n tabIndex?: number;\n onBlur?(e?: any): void;\n onFocus?(e?: any): void;\n onKeyDown?(e?: any): void;\n link?: string;\n isLoading?: boolean;\n loaderIconSize: number;\n target?: string;\n inverted: boolean;\n theme?: any;\n id?: string;\n};\n\nexport const Button = (props: Readonly) => {\n const {\n disabled,\n onClick,\n children,\n type,\n layout,\n suffixIcon,\n textTransform,\n tabIndex,\n link,\n onBlur,\n onFocus,\n isLoading,\n loaderIconSize,\n target,\n ...other\n } = props;\n\n const Element: React.ReactType = link ? ButtonLinkElement : ButtonElement;\n return (\n \n \n {children}\n \n {suffixIcon && (\n \n )}\n {isLoading && }\n \n );\n};\n\nButton.defaultProps = {\n layout: BUTTON.LAYOUT.PRIMARY,\n size: SIZES.MEDIUM,\n isLoading: false,\n loaderIconSize: 24,\n disabled: false,\n tabIndex: 0,\n inverted: false\n};\n\nexport default Button;\n","export { default } from './Button';\n","import styled, { css } from 'styled-components';\nimport media from 'components/mixins/media';\n\ntype HelperProps = {\n isMatchingOption: boolean;\n isMatching: boolean;\n}\nexport const Helper = styled.div`\n display: inline-flex;\n ${props =>\n props.isMatchingOption &&\n css`\n width: 100%;\n `}\n\n ${media.xsmall`\n display: block;\n line-height: 40px;\n `};\n\n .dropdown {\n display: block;\n outline: none;\n position: relative;\n\n ${props =>\n props.isMatchingOption &&\n css`\n width: 100%;\n max-height: 100%;\n `}\n\n ${props =>\n props.isMatching &&\n media.xsmall`\n line-height: 30px;\n `};\n }\n\n ${media.xsmall`\n max-width: 100%;\n width: 100%;\n padding: ${(props: HelperProps) => (props.isMatching ? '0' : '0 30px 0 14px')};\n `};\n`;\n\nexport default Helper;\n","import styled, { css } from 'styled-components';\nimport { transparentize } from 'utils/color';\nimport media from 'components/mixins/media';\nimport * as typography from 'components/mixins/typography';\n\ntype PopoverContentProps = {\n isMatching: boolean;\n theme: any;\n}\nexport const PopoverContent = styled.div`\n position: relative;\n outline: none;\n ${props =>\n props.isMatching\n ? css`\n &:before {\n content: '';\n display: block;\n position: absolute;\n left: 5px;\n right: 5px;\n bottom: 0;\n height: 16px;\n z-index: 11;\n background: linear-gradient(\n to top,\n ${props.theme.colors.contentBodyColor},\n ${transparentize(props.theme.colors.contentBodyColor, 0)}\n );\n }\n `\n : css``};\n\n .downshift-dropdown {\n position: static;\n width: auto;\n min-width: 210px;\n max-width: 340px;\n max-height: 360px;\n padding: 10px 0;\n background-color: ${props => props.theme.colors.contentBodyColor};\n border: none;\n border-radius: 2px;\n text-align: left;\n box-sizing: border-box;\n color: ${props => props.theme.colors.textColor};\n overflow-y: auto;\n z-index: 10;\n -webkit-overflow-scrolling: touch;\n transition: all 0.3s ease-out;\n\n ${media.xsmall`\n max-height: 200px;\n max-width: 250px;\n `};\n\n ${props =>\n props.isMatching\n ? css`\n ${media.small`\n max-width: 40vw;\n `};\n ${media.mobile`\n max-height: 90vh;\n `};\n ${media.xsmall`\n max-height: 200px;\n max-width: 210px;\n `};\n transition: none;\n `\n : css``};\n\n .dropdown-item {\n font-size: 16px;\n }\n }\n\n .dropdown-item {\n box-sizing: border-box;\n color: ${props => props.theme.colors.textColor};\n cursor: pointer;\n display: block;\n padding: 12px 24px;\n white-space: normal;\n ${typography.secondaryFontText};\n line-height: 22px;\n\n &.main-color {\n color: ${props => props.theme.colors.mainColor};\n }\n\n &.selected {\n color: ${props => transparentize(props.theme.colors.textColor, 0.5)};\n text-decoration: line-through;\n }\n\n &.current-selected {\n color: ${props => props.theme.colors.mainColor};\n }\n\n &:hover {\n color: ${props => props.theme.colors.mainColor};\n background-color: ${props => transparentize(props.theme.colors.textColor, 0.05)};\n margin: auto 3px;\n padding: 12px 21px;\n\n &.selected {\n color: ${props => transparentize(props.theme.colors.textColor, 0.5)};\n }\n }\n\n &:focus {\n color: ${props => props.theme.colors.mainColor};\n background-color: ${props => transparentize(props.theme.colors.textColor, 0.05)};\n }\n }\n`;\n\nexport default PopoverContent;\n","/* eslint-disable jsx-a11y/no-noninteractive-tabindex */\nimport React from 'react';\nimport { Tooltip } from 'components/common';\nimport { withTheme } from 'styled-components';\nimport { PopoverContent } from './DropdownInputPopover.styled';\n\ntype DropdownInputPopoverProps = {\n data: any[];\n theme: { [key: string]: any };\n popoverPosition: any;\n isPopoverOpen: boolean;\n isMatching: boolean;\n getMenuProps(): void;\n getItemProps(options: any): void;\n selectedAnswer: any;\n highlightedIndex: number | null;\n setHighlightedIndex(index: any): void;\n children: any;\n};\n\nexport class DropdownInputPopover extends React.Component {\n classes: any;\n constructor(props: DropdownInputPopoverProps) {\n super(props);\n this.classes = {\n baseSelected: 'selected',\n matchingSelected: 'selected current',\n matchingSelectedCurrent: 'current-selected'\n };\n }\n\n addClasses(item: any) {\n const { isMatching, selectedAnswer } = this.props;\n const { baseSelected, matchingSelected, matchingSelectedCurrent } = this.classes;\n\n const { value, selected, current } = item;\n\n if (!isMatching) {\n if (selectedAnswer === value) {\n return baseSelected;\n }\n return '';\n }\n if (selected && selected.length) {\n if (current) {\n return matchingSelectedCurrent;\n }\n return matchingSelected;\n }\n return '';\n }\n\n render() {\n const {\n isPopoverOpen,\n isMatching,\n popoverPosition,\n data,\n highlightedIndex,\n setHighlightedIndex,\n getItemProps,\n children\n } = this.props;\n const templateTheme = this.props.theme;\n return (\n \n
\n {data.map((item: any, index: any) => (\n setHighlightedIndex(null)}\n {...getItemProps({\n key: index,\n index,\n item,\n 'aria-label': `${index + 1} of ${data.length}`\n })}\n >\n {item.value}\n
\n ))}\n \n \n }\n >\n {children}\n \n );\n }\n}\n\nexport default withTheme(DropdownInputPopover);\n","import styled, { css } from 'styled-components';\nimport { transparentize } from 'utils/color';\nimport media from 'components/mixins/media';\nimport * as typography from 'components/mixins/typography';\nimport { pulse } from 'components/mixins/interactivity';\nimport Icon from 'components/common/Icon';\nimport { centerAbsoluteElement } from 'components/mixins/placement';\nimport { defaultBoxShadowColor } from 'constants/common';\n\nconst pulseAnimationColors = {\n start: transparentize(defaultBoxShadowColor, 0.05),\n middle: transparentize(defaultBoxShadowColor, 0.03),\n end: transparentize(defaultBoxShadowColor, 0.01)\n};\n\nexport const PlusIcon = styled(Icon)`\n position: absolute;\n ${centerAbsoluteElement};\n text-indent: 0;\n color: ${props => props.theme.colors.mainColor};\n`;\n\ntype DropdownButtonProps = {\n isMatching: boolean;\n isMatchingOption: boolean;\n}\nexport const DropdownButton = styled.button`\n &.dropdown-button {\n vertical-align: top;\n position: relative;\n display: inline-block;\n max-width: 280px;\n min-width: 210px;\n min-height: 40px;\n margin: 0 8px;\n padding: 0 30px 0 14px;\n border: none;\n border-radius: 2px;\n background-color: ${props => props.theme.colors.contentBodyColor};\n box-shadow: 0 2px 10px 0 ${transparentize(defaultBoxShadowColor, 0.1)};\n color: ${props => props.theme.colors.textColor};\n ${typography.secondaryFontText};\n text-align: left;\n outline: none;\n text-overflow: ellipsis;\n overflow: hidden;\n word-break: break-word;\n white-space: nowrap;\n transition: all 0.1s ease-out;\n cursor: pointer;\n\n &::-moz-focus-inner {\n outline: none;\n border: 0;\n }\n\n .dropdown-arrow {\n content: '';\n position: absolute;\n top: 50%;\n right: 15px;\n margin-top: -4px;\n width: 6px;\n height: 6px;\n color: ${props => props.theme.colors.textColor};\n border-style: solid;\n border-width: 2px 2px 0 0;\n vertical-align: top;\n transform: rotate(135deg);\n transition: transform 0.1s ease-out;\n\n &.is-open {\n margin-top: -3px;\n transform: rotate(-45deg);\n }\n }\n\n &.pulse {\n ${pulse(pulseAnimationColors)}\n }\n\n &.empty {\n color: ${props => transparentize(props.theme.colors.textColor, 0.5)};\n }\n\n &:hover {\n box-shadow: 0 4px 8px 0 ${transparentize(defaultBoxShadowColor, 0.1)};\n }\n &:focus {\n box-shadow: 0 1px 0 0 ${transparentize(defaultBoxShadowColor, 0.1)},\n inset 0 1px 3px 0 ${transparentize(defaultBoxShadowColor, 0.1)};\n outline: 1px solid black;\n }\n\n ${props =>\n props.isMatching\n ? css`\n &.dropdown-button {\n overflow: visible;\n max-width: auto;\n min-width: auto;\n max-height: none;\n min-height: 40px;\n width: 40px;\n height: 40px;\n border-radius: 50%;\n padding: 0;\n background: ${props.theme.colors.contentBodyColor};\n box-shadow: none;\n text-indent: -999999px;\n z-index: 1;\n\n &:before {\n content: '';\n display: block;\n position: absolute;\n top: -3px;\n left: -3px;\n height: 40px;\n width: 40px;\n border-radius: 50%;\n transition: 0.3s;\n border: 3px solid ${transparentize(props.theme.colors.contentBodyColor, 0.5)};\n }\n\n &:after {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background: transparent;\n transition: 0.3s;\n border-radius: 50%;\n box-shadow: 0 2px 10px 0 ${transparentize(defaultBoxShadowColor, 0.1)};\n }\n\n &:hover {\n background: ${transparentize(props.theme.colors.contentBodyColor, 0.9)};\n\n &:after {\n background: ${transparentize(props.theme.colors.mainColor, 0.25)};\n }\n\n &:before {\n top: -11px;\n left: -11px;\n border: 11px solid ${transparentize(props.theme.colors.contentBodyColor, 0.2)};\n }\n }\n\n &:focus {\n background: ${transparentize(props.theme.colors.contentBodyColor, 0.9)};\n\n &:after {\n background: ${transparentize(props.theme.colors.mainColor, 0.25)};\n }\n }\n\n &[aria-expanded='true'] {\n background: ${props.theme.colors.mainColor};\n vertical-align: top;\n\n &:before {\n display: none;\n }\n\n &:after {\n background: transparent;\n }\n\n ${PlusIcon} {\n color: ${props.theme.colors.contentBodyColor};\n }\n }\n\n .dropdown-arrow {\n display: none;\n top: 50%;\n left: 50%;\n margin-top: -3px;\n margin-left: -3px;\n color: ${props.theme.colors.mainColor};\n\n &.is-open {\n top: 50%;\n margin-top: -2px;\n }\n }\n\n & + .chosen-value {\n background: ${props.theme.colors.contentBodyColor};\n position: absolute;\n top: 0;\n left: 45px;\n padding: 4px 30px 3px 16px;\n line-height: 32px;\n border-radius: 2px;\n ${typography.secondaryFontText};\n white-space: nowrap;\n max-width: 340px;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n ${media.xlarge`\n width: 36px;\n height: 36px;\n min-height: 36px;\n\n &:before {\n height: 36px;\n width: 36px;\n }\n `}\n\n ${media.xsmall`\n width: 30px;\n height: 30px;\n min-height: 30px;\n\n &:before {\n height: 30px;\n width: 30px;\n }\n ${css`{\n ${PlusIcon} {\n font-size: 8px;\n }\n }`\n }\n & + .chosen-value {\n left: 39px;\n }\n `};\n }\n `\n : css``};\n\n ${props =>\n props.isMatching && props.isMatchingOption\n ? css`\n &.dropdown-button {\n ${typography.secondaryFontText};\n width: 100%;\n max-width: 100%;\n height: auto;\n max-height: 100%;\n margin: 0;\n padding: 3px 15px 5px;\n border-radius: 0;\n background-color: transparent;\n box-shadow: none;\n overflow: hidden;\n text-overflow: none;\n white-space: normal;\n word-break: break-word;\n text-indent: 0;\n transition: none;\n animation: none;\n\n &.empty-matching-option {\n color: ${transparentize(props.theme.colors.textColor, 0.4)};\n text-indent: 0;\n\n &:hover,\n &:focus {\n color: ${transparentize(props.theme.colors.textColor, 0.7)};\n background: ${transparentize(props.theme.colors.mainColor, 0.25)};\n }\n }\n\n &.dropdown-button {\n &[aria-expanded='true'] {\n background: ${transparentize(props.theme.colors.textColor, 0.02)};\n vertical-align: top;\n\n &:before,\n &:after {\n display: none;\n }\n }\n\n &.empty {\n &:hover {\n color: ${props.theme.colors.textColor};\n box-shadow: none;\n }\n }\n\n &:hover,\n &:focus {\n background: ${transparentize(props.theme.colors.mainColor, 0.25)};\n box-shadow: none;\n\n &:before,\n &:after {\n display: none;\n }\n }\n }\n\n &:before,\n &:after {\n width: 100%;\n height: 100%;\n border-radius: 0;\n border-width: 0;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n }\n\n ${media.xlarge`\n height: auto;\n `};\n\n ${media.xsmall`\n width: 100%;\n height: auto;\n\n &:before {\n width: 100%;\n height: auto;\n }\n\n & + .chosen-value {\n left: 0;\n }\n `}\n\n & + .chosen-value {\n display: none;\n width: 100%;\n background: transparent;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n color: ${transparentize(props.theme.colors.textColor, 0.5)};\n text-indent: 0;\n font-size: 14px;\n line-height: 32px;\n word-break: break-word;\n }\n }\n `\n : css``}\n }\n`;\n\nexport default DropdownButton;\n","/* eslint-disable jsx-a11y/no-noninteractive-tabindex */\nimport React from 'react';\nimport { localize } from 'core/localization';\nimport { DropdownButton, PlusIcon } from './DropdownInputButton.styled';\n\ntype DropdownInputButtonProps = {\n placeholder: string;\n answeredPlaceholder: string;\n disabled: boolean;\n selectedAnswer: any;\n matchingAnswer: string;\n getToggleButtonProps(options: any): void;\n getLabelProps(): void;\n getRootProps(options1: any, options2?: any): void;\n isOpen: boolean;\n isMatching: boolean;\n isMatchingOption: boolean;\n buttonAnimation: string;\n};\n\nexport const DropdownInputButton = ({\n placeholder,\n answeredPlaceholder,\n selectedAnswer,\n matchingAnswer,\n disabled,\n getToggleButtonProps, // getToggleButtonProps, getLabelProps, getRootProps is required for correct work of Downshift.js\n getLabelProps,\n getRootProps,\n isOpen,\n isMatching,\n isMatchingOption,\n buttonAnimation\n}: DropdownInputButtonProps) => {\n const renderPlusIcon = () =>\n isMatching && !isMatchingOption && ;\n\n const buttonClasses = {\n base: `dropdown-button ${!selectedAnswer ? 'empty' : 'dropdown-button'}`,\n matchingOption: isMatchingOption && !matchingAnswer ? 'empty-matching-option' : '',\n animation: buttonAnimation || ''\n };\n\n const buttonText = () => {\n if (isMatchingOption && matchingAnswer && selectedAnswer) {\n return selectedAnswer;\n }\n if (!isMatchingOption) {\n return selectedAnswer || placeholder;\n }\n if (isOpen) {\n return localize('[choose option]');\n }\n return placeholder;\n };\n\n return (\n \n {buttonText()}\n \n {renderPlusIcon()}\n \n );\n};\n\nexport default DropdownInputButton;\n","/* eslint-disable jsx-a11y/no-noninteractive-tabindex */\nimport * as React from 'react';\nimport Downshift from 'downshift';\nimport { withTheme } from 'styled-components';\nimport { Helper } from './DropdownInput.styled';\nimport { DropdownInputPopover } from './popover/DropdownInputPopover';\nimport { DropdownInputButton } from './button/DropdownInputButton';\n\ntype DropdownInputProps = {\n data: any[];\n isMatching?: boolean;\n isMatchingOption?: boolean;\n onChange(e?: any): void;\n name: string;\n placeholder: string;\n answeredPlaceholder: string;\n matchingAnswer?: string;\n value: string;\n disabled?: boolean;\n theme?: { [key: string]: any };\n buttonAnimation?: string;\n popoverPosition: string;\n children?: any;\n};\n\ntype DropdownInputState = {\n selectedAnswer: any;\n isPopoverOpen: boolean;\n}\nclass DropdownInput extends React.Component {\n constructor(props: DropdownInputProps) {\n super(props);\n this.state = {\n selectedAnswer: this.props.value,\n isPopoverOpen: false\n }\n }\n\n onOptionSelect = (selectedAnswer: any) => {\n if (selectedAnswer) {\n this.setState({ selectedAnswer: selectedAnswer.value });\n }\n };\n\n componentDidUpdate(prevProps: DropdownInputProps) {\n if (this.props.value !== prevProps.value) {\n this.setState({ selectedAnswer: this.props.value });\n }\n }\n\n onStateChange = (state: any) => {\n if (typeof state.isOpen === 'undefined') {\n return;\n }\n this.setState({ isPopoverOpen: state.isOpen });\n };\n\n render() {\n const {\n placeholder,\n answeredPlaceholder,\n onChange,\n disabled = false,\n popoverPosition,\n buttonAnimation = '',\n isMatching = false,\n isMatchingOption = false,\n matchingAnswer = ''\n } = this.props;\n let { selectedAnswer, isPopoverOpen } = this.state;\n\n if (matchingAnswer) {\n selectedAnswer = matchingAnswer;\n }\n\n return (\n \n (data ? data.value : '')}\n onStateChange={this.onStateChange}\n >\n {({\n isOpen,\n getToggleButtonProps,\n getItemProps,\n highlightedIndex,\n getLabelProps,\n getMenuProps,\n getRootProps,\n setHighlightedIndex\n }) => {\n const renderChosenValue = () =>
{matchingAnswer}
;\n\n return (\n
\n \n \n {isMatching && matchingAnswer && renderChosenValue()}\n \n
\n );\n }}\n \n
\n );\n }\n}\n\nexport default withTheme(DropdownInput);\n","export { default } from './DropdownInput';\n","import styled from 'styled-components';\n\ntype SeparatorTypes = {\n margin?: number;\n height?: number;\n opacity?: number;\n color?: string;\n marginBottom?: number;\n};\nexport const Separator = styled.div`\n position: relative;\n width: 100%;\n height: ${({ height = 2, margin = 32, opacity = 0.08, ...rest }: SeparatorTypes) =>\n height + margin * 2}px;\n margin-bottom: ${props =>\n props.marginBottom || props.marginBottom === 0 ? props.marginBottom : 0}px;\n &:after {\n content: '';\n position: absolute;\n width: 100%;\n height: ${props => props.height}px;\n top: 50%;\n transform: translateY(-50%);\n left: 0;\n background-color: ${props =>\n props.color && props.theme.colors[props.color]\n ? props.theme.colors[props.color]\n : props.theme.colors.ctaButtonColor};\n opacity: ${props => (props.opacity || props.opacity === 0 ? props.opacity : 0.08)};\n }\n`;\n\nSeparator.defaultProps = {\n margin: 32,\n height: 2,\n opacity: 0.08\n};\n\nexport default Separator;\n","export { default } from './Separator';\n","import { getQuestion } from 'store/questions/selectors';\nimport { isRandomizeAnswersEnabled } from 'store/settings/selectors';\nimport { RootAppState } from '../../types';\n\n\nexport const getUserAnswers = (state: RootAppState, questionId: string) => {\n const question = getQuestion(state, questionId);\n const randomizeAnswersEnabled = isRandomizeAnswersEnabled(state);\n const { answers: options, randomizedOptions = [] } = question;\n const answers = randomizeAnswersEnabled ? randomizedOptions : options;\n if (question.type === 'singleSelectImage') {\n return answers.map((answer: any) => ({\n id: answer.id,\n image: answer.image,\n selected: question.response.some((a: any) => a === answer.id)\n }));\n }\n return answers.map((answer: any) => ({\n id: answer.id,\n isCorrect: answer.isCorrect,\n text: answer.text,\n selected: question.response.some((a: any) => a === answer.id)\n }));\n};\n\nexport const getScore = (state: RootAppState, question: any) => {\n if (question.type === 'singleSelectImage') {\n if (!question.response.includes(question.correctAnswerId)) {\n return 0;\n }\n } else {\n for (let i = 0; i < question.answers.length; i++) {\n const answer = question.answers[i];\n if (answer.isCorrect && !question.response.includes(answer.id)) {\n return 0;\n }\n if (!answer.isCorrect && question.response.includes(answer.id)) {\n return 0;\n }\n }\n }\n\n return 100;\n};\n","import resourceLoader from 'core/http/resourceLoader';\n\nexport const SETTINGS_LOADED = 'SETTINGS_LOADED';\nexport const SETTINGS_LOADING_FAILED = 'SETTINGS_LOADING_FAILED';\n\nclass ConfigurationReader {\n readManifest() {\n return resourceLoader.getLocalJsonResource('manifest.json');\n }\n\n readSettings() {\n return resourceLoader.getLocalJsonResource('settings.js');\n }\n\n readPublishSettings() {\n return resourceLoader.getLocalJsonResource('publishSettings.js');\n }\n\n readThemeSettings() {\n return resourceLoader.getLocalJsonResource('themeSettings.js');\n }\n\n readCustomization() {\n return resourceLoader.getLocalJsonResource('customisations.json');\n }\n}\n\nexport default new ConfigurationReader();\n","import { deepMerge } from 'utils/object';\nimport resourceLoader from 'core/http/resourceLoader';\nimport { DEFAULT_LANGUAGE_CODE, CUSTOM_LANGUAGE_CODE } from 'constants/common';\n\n// eslint-disable-next-line import/prefer-default-export\nexport const getTranslations = async function(settings: { [key: string]: any }) {\n const languageCode = settings.languages.selected.toLowerCase();\n\n if (languageCode === CUSTOM_LANGUAGE_CODE) {\n const defaultTranslations = await loadTranslation(DEFAULT_LANGUAGE_CODE);\n return deepMerge(defaultTranslations, settings.languages.customTranslations);\n }\n\n document.documentElement.setAttribute('lang', languageCode);\n\n return loadTranslation(languageCode);\n};\n\nfunction loadTranslation(code: any) {\n return resourceLoader.getLocalJsonResource(`lang/${code}.json`);\n}\n","import { deepExtend } from 'utils/object';\n\n// eslint-disable-next-line import/prefer-default-export\nexport const processSettings = function (settings: { [key: string]: any}, themeSettings: { [key: string]: any }, manifest: { [key: string]: any }) {\n return deepExtend(\n processThemeSettings(themeSettings, manifest),\n processTemplateSettings(settings, manifest)\n );\n};\n\nfunction processThemeSettings(themeSettings: any, manifest: any) {\n let preset = manifest && Array.isArray(manifest.presets) ? manifest.presets[0] : null;\n let defaultThemeSettings = preset != null ? preset.settings : {};\n\n return deepExtend(defaultThemeSettings, themeSettings);\n}\n\nfunction processTemplateSettings(templateSettings: any, manifest: any) {\n if (!manifest.defaultTemplateSettings) {\n throw new Error(\"Manifest doesn't have defaultTemplateSettings\");\n }\n return deepExtend(manifest.defaultTemplateSettings, templateSettings);\n}\n","import { events } from 'core/events/eventEmitter';\nimport BaseEventHandler from 'core/events/eventHandler';\nimport store from 'store';\nimport { ActionTypes } from 'store/app/types';\n\nexport default class EventHandler extends BaseEventHandler {\n handlers: any[];\n\n constructor() {\n super();\n this.handlers = [\n {\n event: events.APP_OFFLINE_OR_SERVER_ERROR,\n instance: this.appOfflineOrServerError.bind(this)\n },\n { event: events.APP_ONLINE, instance: this.appOnline.bind(this) }\n ];\n }\n\n appOfflineOrServerError() {\n store.dispatch({\n type: ActionTypes.APP_OFFLINE_OR_SERVER_ERROR\n });\n }\n\n appOnline() {\n store.dispatch({\n type: ActionTypes.APP_ONLINE\n });\n }\n}\n","import EventHandler from './eventHandler';\nclass ConnectionAlert {\n eventHandler: any;\n\n constructor() {\n this.eventHandler = new EventHandler();\n }\n\n subscribe() {\n this.eventHandler.on();\n }\n\n unsubscribe() {\n this.eventHandler.off();\n }\n}\n\nexport default new ConnectionAlert();\n","import * as settingsActions from 'store/settings/actions';\nimport * as modulesActions from 'store/modules/actions';\nimport * as tocActions from 'store/treeOfContent/actions';\nimport * as userActions from 'store/user/actions';\nimport { isReviewMode, isResource, isCourse } from 'store/settings/selectors';\nimport { isLowerResolution, clearQueryString, getValueFromUrl } from 'utils/window';\nimport logger from 'utils/logger';\nimport { MEDIA_TABLET } from 'constants/screenResolutions';\nimport { ThunkResult } from 'store/types';\nimport connectionAlert from 'core/connectionAlert';\nimport resourceLoader from 'core/http/resourceLoader';\nimport { isAppLoaded } from './selectors';\nimport { ActionTypes } from './types';\nimport * as resourcesActions from '../resource/actions';\nimport * as courseActions from '../course/actions';\nimport contentLoader from '../../core/http/contentLoader';\nimport { LTI_CALLBACK_URL_PARAMETER_NAME } from '../../constants/common';\n\nconst loadMaterial = (data: any): ThunkResult> => async (dispatch, getState) => {\n if (isResource(getState())) {\n await dispatch(resourcesActions.load(data));\n } else {\n connectionAlert.subscribe();\n\n await dispatch(courseActions.load(data));\n await dispatch(userActions.load());\n\n if (isReviewMode(getState())) {\n await dispatch(modulesActions.enableReview());\n }\n const ltiCallbackUrl = getValueFromUrl(LTI_CALLBACK_URL_PARAMETER_NAME);\n if (ltiCallbackUrl) {\n dispatch(modulesActions.subscribeLti(ltiCallbackUrl));\n }\n }\n};\n\nexport const load = (): ThunkResult => async (dispatch, getState) => {\n if (isAppLoaded(getState())) return;\n\n try {\n const materialData = await contentLoader.loadMaterialData();\n resourceLoader.cacheBuster = materialData.createdOn;\n\n await dispatch(settingsActions.load());\n await dispatch(modulesActions.subscribeProgressStorage());\n await dispatch(loadMaterial(materialData));\n clearQueryString();\n dispatch({ type: ActionTypes.APP_LOADED });\n } catch (e) {\n logger.error(e);\n dispatch({ type: ActionTypes.APP_LOADING_FAILED, reason: e });\n }\n};\n\nexport const resolutionChanged = (): ThunkResult => dispatch => {\n dispatch({\n type: ActionTypes.APP_RESOLUTION_CHANGED,\n payload: {\n isLowResolution: isLowerResolution(MEDIA_TABLET)\n }\n });\n dispatch(tocActions.adaptToResolution());\n};\n\nexport const launchMaterial = (): ThunkResult => (dispatch, getState) => {\n if (isResource(getState())) {\n return dispatch(resourcesActions.launch());\n }\n if (isCourse(getState())) {\n return dispatch(courseActions.launch());\n }\n\n throw new Error('The resource type is undefined');\n};\n","import logger from 'utils/logger';\nimport { hasQueryStringParameter } from 'utils/window';\nimport configurationReader from 'core/configuration/reader';\nimport { getTranslations } from 'core/configuration/translationProvider';\nimport { processSettings } from 'core/configuration/settingsProcessor';\nimport { loadFonts } from 'core/fonts/loader';\nimport { MATERIAL_TYPES } from 'constants/common';\n\nimport { ActionTypes } from './types';\nimport { ThunkResult } from 'store/types';\n\nexport const load = (): ThunkResult> => async dispatch => {\n try {\n const [\n manifest,\n customization,\n publishSettings,\n templateThemeSettings,\n templateSettings\n ]: [\n { [key: string]: any },\n { [key: string]: any },\n { [key: string]: any },\n any,\n any\n ] = await Promise.all([\n configurationReader.readManifest(),\n configurationReader.readCustomization(),\n configurationReader.readPublishSettings(),\n configurationReader.readThemeSettings(),\n configurationReader.readSettings()\n ]);\n\n const settings: { [key: string]: any } = processSettings(templateSettings, templateThemeSettings, manifest);\n const translations: { [key: string]: any } = await getTranslations(settings);\n await loadFonts(settings && settings.fonts, publishSettings.customFontPlace);\n\n const publishMode: { [key: string]: any } = {\n isPreview: publishSettings.publishMode === 'Preview',\n isReview: hasQueryStringParameter('reviewApiUrl'),\n isScorm: publishSettings.publishMode === 'Lms' || publishSettings.publishMode === 'Lms2004',\n isScorm2004: publishSettings.publishMode === 'Lms2004'\n };\n\n if (publishMode.isPreview || publishMode.isReview) {\n settings.conductLearnerSatisfactionSurvey.enabled = false;\n settings.saveProgressCrossDevice.enabled = false;\n settings.resultsTracking.enabled = false;\n }\n\n if(publishSettings.materialType === MATERIAL_TYPES.RESOURCE) {\n settings.saveProgressCrossDevice = false;\n }\n\n delete publishSettings.publishMode;\n\n dispatch({\n type: ActionTypes.SETTINGS_LOADED,\n settings: {\n manifest,\n publishSettings,\n settings,\n customization,\n translations,\n publishMode\n } as any\n });\n } catch (e) {\n logger.error(e);\n dispatch({ type: ActionTypes.SETTINGS_LOADING_FAILED, reason: e });\n throw e;\n }\n};\n","import { stringify, parse } from 'zipson';\n\nexport const compress = (data: any) => stringify(data);\nexport const decompress = (data: any) => parse(data);\n","import { RootAppState } from 'store/types';\n\nclass StorageInterface {\n async getProgress(): Promise {\n throw new Error('getProgress method in not implemented');\n }\n\n async saveProgress(options?: any, state?: RootAppState): Promise {\n throw new Error('saveProgress method in not implemented');\n }\n\n async removeProgress(): Promise {\n throw new Error('removeProgress method in not implemented');\n }\n}\n\nexport default StorageInterface;\n","import {\n hasQueryStringParameter,\n getValueFromUrl,\n getCurrentUrl,\n removeQueryStringParam\n} from 'utils/window';\nimport { LOGIN_PATH } from 'constants/navigation';\nimport requester from 'core/http/requester';\nimport {\n EMAIL_PASSWORD_COMBINATION_NOT_EXISTS,\n PASSWORD_RESET_SENDING_FAILED,\n UNKNOWN_ERROR,\n STATUS_OK\n} from 'constants/progressStorage';\n\nimport { CONTENT_TYPES } from 'constants/common';\nimport { IdToUuid } from 'utils/string';\n\nconst constants = {\n tokenKey: 'token.learn',\n shortTermAccessKey: 'shortTermAccess.auth.template'\n};\n\nclass ExternalStorageAuth {\n courseTitle: string;\n\n authServiceUrl: string;\n\n learnServiceUrl: string;\n\n courseLink: string;\n\n constructor(courseTitle: string, authServiceUrl: string, learnServiceUrl: string) {\n this.courseTitle = courseTitle;\n this.authServiceUrl = authServiceUrl;\n this.learnServiceUrl = learnServiceUrl;\n this.courseLink = `${getCurrentUrl()}#${LOGIN_PATH}`;\n }\n\n set shortTermAccess(value: any) {\n if (value.toString().length) {\n sessionStorage.setItem(constants.shortTermAccessKey, value);\n } else {\n sessionStorage.removeItem(constants.shortTermAccessKey);\n }\n }\n\n get shortTermAccess() {\n return sessionStorage.getItem(constants.shortTermAccessKey) === 'true';\n }\n\n set token(value: string | any) {\n if (value) {\n sessionStorage.setItem(constants.tokenKey, value);\n } else {\n sessionStorage.removeItem(constants.tokenKey);\n }\n }\n\n get token(): string | any {\n return sessionStorage.getItem(constants.tokenKey);\n }\n\n getHeaders({ contentType, bearerToken }: any) {\n const headers: any = {};\n if (contentType) {\n headers['Content-Type'] = contentType;\n }\n if (bearerToken) {\n headers.Authorization = `Bearer ${bearerToken}`;\n }\n\n return headers;\n }\n\n isAuthenticated() {\n return !!this.token;\n }\n\n async getAuthToken() {\n if (hasQueryStringParameter('token')) {\n const token = getValueFromUrl('token');\n removeQueryStringParam('token');\n return token;\n }\n\n return this.getTokenFromAuthService();\n }\n\n async getTokenFromAuthService() {\n try {\n const getTokenResponse: any = await requester.get(\n `${this.authServiceUrl}/api/account/token`,\n {\n credentials: 'include',\n headers: {},\n retryOptions: {\n retries: 0,\n retryOn: [503]\n }\n }\n );\n\n if (getTokenResponse.status < 400) {\n const responseData = await getTokenResponse.json();\n return responseData && responseData.token;\n }\n\n const isIframe = window.top !== window.self;\n if (isIframe) {\n return this.token;\n }\n return '';\n } catch (e) {\n return this.token;\n }\n }\n\n async identify() {\n try {\n this.token = await this.getAuthToken();\n\n const userInfoResponse: any = await requester.get(`${this.learnServiceUrl}/api/learner/me`, {\n headers: this.getHeaders({ bearerToken: this.token })\n });\n\n if (userInfoResponse.status === 401 || userInfoResponse.status === 403) {\n return this.logout();\n }\n\n return userInfoResponse.json();\n } catch (e) {\n console.error(e);\n return e;\n }\n }\n\n async logout() {\n try {\n const response = await requester.post(`${this.authServiceUrl}/api/account/logout`, {\n credentials: 'include',\n headers: {}\n });\n\n if (response.status === 201 || response.status === 200) {\n this.token = '';\n this.shortTermAccess = '';\n }\n } catch (error) {\n console.error(error);\n throw error;\n }\n }\n\n async exists(email: string) {\n const response: any = await requester.get(`${this.authServiceUrl}/api/account/exists`, {\n headers: this.getHeaders({ contentType: CONTENT_TYPES.JSON }),\n query: {\n email\n },\n nocache: true,\n credentials: 'include'\n });\n\n return response.json();\n }\n\n async authorize({ email, password, shortTermAccess = true }: { [key: string]: any }) {\n const response = await requester.post(`${this.authServiceUrl}/api/auth/credentials`, {\n data: { email, password, shortTermAccess },\n headers: this.getHeaders({ contentType: CONTENT_TYPES.JSON }),\n nocache: true,\n credentials: 'include'\n });\n return this._setAuthenticationData(response, shortTermAccess);\n }\n\n async register({ name, email, password, shortTermAccess = true }: { [key: string]: any }) {\n const response = await requester.post(`${this.authServiceUrl}/api/credentials/register`, {\n data: { email, password, name, shortTermAccess },\n headers: this.getHeaders({ contentType: CONTENT_TYPES.JSON }),\n nocache: true,\n credentials: 'include'\n });\n\n return this._setAuthenticationData(response, shortTermAccess);\n }\n\n async resetPassword(email: string) {\n const response = await requester.post(\n `${this.authServiceUrl}/api/credentials/forgot-password`,\n {\n data: { email, returnUrl: this.courseLink },\n headers: this.getHeaders({ contentType: CONTENT_TYPES.JSON }),\n nocache: true,\n credentials: 'include'\n }\n );\n\n if (response.status !== 201) {\n return PASSWORD_RESET_SENDING_FAILED;\n }\n\n return STATUS_OK;\n }\n\n async sendSecretLink(courseId: any) {\n const response = await requester.post(\n `${this.learnServiceUrl}/api/learner/me/courses/${IdToUuid(courseId)}/send-secret-link`,\n {\n data: {},\n headers: this.getHeaders({ contentType: CONTENT_TYPES.JSON, bearerToken: this.token }),\n nocache: true\n }\n );\n\n if (response.status !== 200) {\n return UNKNOWN_ERROR;\n }\n\n return STATUS_OK;\n }\n\n async _setAuthenticationData(response: any, shortTermAccess: any) {\n if (response.status === 403 || response.status === 401) {\n return EMAIL_PASSWORD_COMBINATION_NOT_EXISTS;\n }\n if (response.status >= 400) {\n return UNKNOWN_ERROR;\n }\n\n const data = await response.json();\n if (!data || (data && !data.token)) {\n return UNKNOWN_ERROR;\n }\n\n this.token = data.token;\n this.shortTermAccess = shortTermAccess;\n\n return STATUS_OK;\n }\n}\n\nexport default ExternalStorageAuth;\n","import { LOGIN_PATH } from 'constants/navigation';\nimport { getCurrentUrl } from 'utils/window';\n\nclass SocialNetworks {\n courseTitle: any;\n\n authStorageUrl: any;\n\n location: any;\n\n constructor(courseTitle: any, authStorageUrl: any) {\n this.courseTitle = courseTitle;\n this.authStorageUrl = authStorageUrl;\n this.location = `${getCurrentUrl()}#${LOGIN_PATH}`;\n }\n\n getAuthLink(socialNetwork: any) {\n const isIframe = window.top !== window.self;\n const isMainHost =\n window.location.host.indexOf('easygenerator.com') === -1 ? '&addTokenQuery=true' : '';\n\n let addTokenQueryParam = '';\n if (isIframe || !isMainHost) {\n addTokenQueryParam = '&addTokenQuery=true';\n }\n const encodeLocation = encodeURIComponent(this.location);\n\n return `${this.authStorageUrl}/api/auth/${socialNetwork}?callbackUrl=${encodeLocation}${addTokenQueryParam}`;\n }\n}\n\nexport default SocialNetworks;\n","import {\n getAuthServiceUrl,\n shouldSubmitAllQuestions,\n getLearnServiceUrl\n} from 'store/settings/selectors';\nimport {\n getCourseTitle,\n getCourseId,\n getTemplateId,\n isInProgress,\n isPassed,\n isFailed,\n getScore,\n isAttemptSubmitted,\n isCourseAccessLimited\n} from 'store/course/selectors';\nimport requester from 'core/http/requester';\nimport { CONTENT_TYPES } from 'constants/common';\nimport { IdToUuid } from 'utils/string';\nimport { getCurrentUrl } from 'utils/window';\nimport StorageInterface from '../storageInterface';\nimport ExternalStorageAuth from './auth';\nimport SocialNetworks from './socialNetworks';\nimport { RootAppState } from 'store/types';\nimport { CourseProgressStorageStatus } from 'constants/progressStatus';\n\nclass ExternalStorage extends StorageInterface {\n courseId: string;\n templateId: string;\n learnServiceUrl: string;\n authServiceUrl: string;\n private readonly _auth: any;\n private readonly _socialNetworks: any;\n\n constructor(state: RootAppState) {\n super();\n\n this.courseId = getCourseId(state);\n this.templateId = getTemplateId(state);\n this.learnServiceUrl = getLearnServiceUrl(state);\n this.authServiceUrl = getAuthServiceUrl(state);\n\n const courseTitle = getCourseTitle(state);\n\n this._auth = new ExternalStorageAuth(courseTitle, this.authServiceUrl, this.learnServiceUrl);\n this._socialNetworks = new SocialNetworks(courseTitle, this.authServiceUrl);\n }\n\n async getProgress() {\n if (!this.getToken()) {\n return;\n }\n\n const responseProgress = await requester.get(\n `${this.learnServiceUrl}/api/learner/me/courses/${IdToUuid(this.courseId)}/attempts/last`,\n {\n query: {\n templateId: this.templateId\n },\n headers: this.getHeaders({ bearerToken: this.getToken() })\n }\n );\n if (responseProgress.status === 201 || responseProgress.status === 200) {\n const data = await responseProgress.json();\n try {\n return data && data.jsonProgress && JSON.parse(data.jsonProgress);\n } catch (e) {\n console.error(e);\n return {};\n }\n }\n\n return requester.post(\n `${this.learnServiceUrl}/api/learner/me/courses/${IdToUuid(this.courseId)}/attempts`,\n {\n data: {\n templateId: this.templateId,\n jsonProgress: '{}',\n score: 0,\n status: CourseProgressStorageStatus.IN_PROGRESS,\n courseUrl: getCurrentUrl()\n },\n headers: this.getHeaders({ contentType: CONTENT_TYPES.JSON, bearerToken: this.getToken() }),\n nocache: true\n }\n );\n }\n\n async saveProgress(progress: any, state: RootAppState) {\n if (isCourseAccessLimited(state)) {\n return false;\n }\n let status = CourseProgressStorageStatus.IN_PROGRESS;\n if (isPassed(state)) {\n status = CourseProgressStorageStatus.PASSED;\n }\n if (isFailed(state)) {\n status = CourseProgressStorageStatus.FAILED;\n }\n if (isAttemptSubmitted(state) && isInProgress(state) && shouldSubmitAllQuestions(state)) {\n status = CourseProgressStorageStatus.FAILED;\n }\n\n const saveProgressResponse = await requester.put(\n `${this.learnServiceUrl}/api/learner/me/courses/${IdToUuid(this.courseId)}/attempts/last`,\n {\n data: {\n jsonProgress: progress ? JSON.stringify(progress) : '{}',\n score: getScore(state),\n status\n },\n query: {\n templateId: this.templateId\n },\n headers: this.getHeaders({ contentType: CONTENT_TYPES.JSON, bearerToken: this.getToken() }),\n nocache: true\n }\n );\n if (saveProgressResponse.status === 401 || saveProgressResponse.status === 403) {\n return this.logout();\n }\n return saveProgressResponse;\n }\n\n async removeProgress() {\n return requester.post(\n `${this.learnServiceUrl}/api/learner/me/courses/${IdToUuid(this.courseId)}/attempts`,\n {\n data: {\n templateId: this.templateId,\n jsonProgress: '{}',\n score: 0,\n status: CourseProgressStorageStatus.IN_PROGRESS,\n courseUrl: getCurrentUrl()\n },\n\n headers: this.getHeaders({ contentType: CONTENT_TYPES.JSON, bearerToken: this.getToken() }),\n nocache: true\n }\n );\n }\n\n isAuthenticated() {\n return this._auth.isAuthenticated();\n }\n\n async userExists(email: string) {\n return this._auth.exists(email);\n }\n\n async identifyUser() {\n return this._auth.identify();\n }\n\n async authorizeUser(userData: any) {\n return this._auth.authorize(userData);\n }\n\n async registerUser(userData: any) {\n return this._auth.register(userData);\n }\n\n async resetPassword(email: string) {\n return this._auth.resetPassword(email);\n }\n\n async logout() {\n return this._auth.logout();\n }\n\n getSocialNetworkAuthLink(socialNetwork: any) {\n return this._socialNetworks.getAuthLink(socialNetwork);\n }\n\n async sendSecretLink() {\n return this._auth.sendSecretLink(this.courseId);\n }\n\n getHeaders({ contentType, bearerToken }: any) {\n return this._auth.getHeaders({ contentType, bearerToken });\n }\n\n getToken() {\n return this._auth.token;\n }\n}\n\nexport default ExternalStorage;\n","import shortId from 'short-uuid';\n\nexport default class IdShortener {\n translator: any;\n constructor() {\n this.translator = shortId();\n }\n\n convertToShort(id: any) {\n return this.translator.fromUUID(id);\n }\n\n convertToOriginal(id: any) {\n return this.translator.toUUID(id).replace(/-/g, '');\n }\n}\n","import { NO_SELECTED_ID } from 'constants/common';\nimport idShortener from '../idShortener';\n\nexport default class DragAndDropTextResponseMapper extends idShortener {\n map(response: any) {\n return response.map((option: any) => ({\n ...option,\n id: this._mapId(option.id, this.convertToShort.bind(this)),\n items: this._mapItems(option.items, this.convertToShort.bind(this))\n }));\n }\n\n unMap(response: any) {\n return response.map((option: any) => ({\n ...option,\n id: this._mapId(option.id, this.convertToOriginal.bind(this)),\n items: this._mapItems(option.items, this.convertToOriginal.bind(this))\n }));\n }\n\n _mapItems(items: any, convert: any) {\n return items.map((item: any) => ({\n ...item,\n id: this._mapId(item.id, convert)\n }));\n }\n\n _mapId(id: any, convert: any) {\n return id === NO_SELECTED_ID ? id : convert(id);\n }\n}\n","import idShortener from '../idShortener';\n\nexport default class FillInTheBlankResponseMapper extends idShortener {\n map({ data }: {[key: string]: any}) {\n return this._map(data, this.convertToShort.bind(this));\n }\n\n unMap({ data }: {[key: string]: any}) {\n return this._map(data, this.convertToOriginal.bind(this));\n }\n\n _map(data: any, convert: any) {\n const ids = Object.keys(data);\n let userResponse: {[key: string]: any} = {};\n\n ids.forEach((id: any) => {\n const convertedId = convert(id);\n userResponse[convertedId] = data[id];\n });\n\n return {\n data: userResponse\n };\n }\n}\n","export default class HotspotResponseMapper {\n map(response: any) {\n return response;\n }\n\n unMap(response: any) {\n return response;\n }\n}\n","export default class InformationContentResponseMapper {\n map(response: any) {\n return response;\n }\n\n unMap(response: any) {\n return response;\n }\n}\n","import idShortener from '../idShortener';\n\nexport default class SingleChoiceResponseMapper extends idShortener {\n map(response: any) {\n return response.map((id: any) => this.convertToShort(id));\n }\n\n unMap(response: any) {\n return response.map((id: any) => this.convertToOriginal(id));\n }\n}\n","import SingleChoiceResponseMapper from './SingleChoice';\n\nexport default class MultipleChoiceResponseMapper extends SingleChoiceResponseMapper {\n map(response: any) {\n return super.map(response);\n }\n\n unMap(response: any) {\n return super.unMap(response);\n }\n}\n","import idShortener from '../idShortener';\n\nexport default class OpenQuestionResponseMapper extends idShortener {\n map(response: any) {\n return { ...response, id: this.convertToShort(response.id) };\n }\n\n unMap(response: any) {\n return { ...response, id: this.convertToOriginal(response.id) };\n }\n}\n","import idShortener from '../idShortener';\n\nexport default class StatementChoiceResponseMapper extends idShortener {\n map(response: any) {\n return this._map(response, this.convertToShort.bind(this));\n }\n\n unMap(response: any) {\n return this._map(response, this.convertToOriginal.bind(this));\n }\n\n _map(response: any, convert: any) {\n return response.map((option: any) => ({ ...option, id: convert(option.id) }));\n }\n}\n","import StatementChoiceResponseMapper from './StatementChoice';\n\nexport default class RankingTextResponseMapper extends StatementChoiceResponseMapper {\n map(response: any) {\n return super.map(response);\n }\n\n unMap(response: any) {\n return super.unMap(response);\n }\n}\n","export default class ScenarioResponseMapper {\n map(response: any) {\n return response;\n }\n\n unMap(response: any) {\n return response;\n }\n}\n","import SingleChoiceResponseMapper from './SingleChoice';\n\nexport default class SingleChoiceImageResponseMapper extends SingleChoiceResponseMapper {\n map(response: any) {\n return super.map(response);\n }\n\n unMap(response: any) {\n return super.unMap(response);\n }\n}\n","import StatementChoice from './StatementChoice';\n\nexport default class TextMatchingResponseMapper extends StatementChoice {\n map(response: any) {\n return super.map(response);\n }\n\n unMap(response: any) {\n return super.unMap(response);\n }\n}\n","import * as questionTypes from 'constants/questionTypes';\n\nimport DragAndDropText from './DragAndDropText';\nimport FillInTheBlank from './FillInTheBlank';\nimport HotspotMapper from './HotspotMapper';\nimport InformationContent from './InformationContent';\nimport MultipleChoice from './MultipleChoice';\nimport OpenQuestion from './OpenQuestion';\nimport RankingText from './RankingText';\nimport Scenario from './Scenario';\nimport SingleChoice from './SingleChoice';\nimport SingleChoiceImage from './SingleChoiceImage';\nimport StatementChoice from './StatementChoice';\nimport TextMatching from './TextMatching';\n\n\nconst questions: { [key: string]: any } = {\n [questionTypes.DRAG_AND_DROP_TEXT]: new DragAndDropText(),\n [questionTypes.FILL_IN_THE_BLANK]: new FillInTheBlank(),\n [questionTypes.HOTSPOT]: new HotspotMapper(),\n [questionTypes.INFORMATION_CONTENT]: new InformationContent(),\n [questionTypes.MULTIPLE_CHOICE]: new MultipleChoice(),\n [questionTypes.OPEN_QUESTION]: new OpenQuestion(),\n [questionTypes.RANKING_TEXT]: new RankingText(),\n [questionTypes.SCENARIO]: new Scenario(),\n [questionTypes.SINGLE_CHOICE]: new SingleChoice(),\n [questionTypes.SINGLE_CHOICE_IMAGE]: new SingleChoiceImage(),\n [questionTypes.STATEMENT_CHOICE]: new StatementChoice(),\n [questionTypes.TEXT_MATCHING]: new TextMatching()\n};\nexport default questions;\n","import idShortener from './idShortener';\nimport responseMappers from './responseMappers';\n\nclass IdMapper extends idShortener {\n map(id: any) {\n return this.convertToShort(id);\n }\n\n unMap(id: any) {\n return this.convertToOriginal(id);\n }\n\n mapResponse(questionType: string, response: any) {\n return responseMappers[questionType].map(response);\n }\n\n unMapResponse(questionType: any, response: any) {\n return responseMappers[questionType].unMap(response);\n }\n}\n\nexport default new IdMapper();\n","import { getCourseId, getTemplateId } from 'store/course/selectors';\nimport { isCourse, isResource } from 'store/settings/selectors';\nimport { getResourceId } from 'store/resource/selectors';\nimport StorageInterface from '../storageInterface';\nimport { RootAppState } from 'store/types';\n\nconst constants = {\n courseProgressKey: 'course_progress',\n resourceProgressKey: 'resource_progress'\n};\n\nclass LocalStorage extends StorageInterface {\n progressKey: string;\n constructor(state: any) {\n super();\n\n this.progressKey = this.getProgressKey(state);\n }\n\n async getProgress() {\n return new Promise(resolve => {\n const result = localStorage.getItem(this.progressKey) || '{}';\n resolve(JSON.parse(result));\n });\n }\n\n async saveProgress(progress: any) {\n return new Promise(resolve => {\n localStorage.setItem(this.progressKey, JSON.stringify(progress));\n resolve();\n });\n }\n\n async removeProgress() {\n return new Promise(resolve => {\n localStorage.removeItem(this.progressKey);\n resolve();\n });\n }\n\n private getProgressKey(state: RootAppState): string {\n let result = '';\n if (isCourse(state)) {\n const courseId = getCourseId(state);\n const templateId = getTemplateId(state);\n result = `${constants.courseProgressKey}${courseId}${templateId}`;\n } else if (isResource(state)) {\n const resourceId = getResourceId(state);\n result = `${constants.resourceProgressKey}${resourceId}`;\n }\n return result;\n }\n}\n\nexport default LocalStorage;\n","class ResponseMapperBase {\n map(question: any) {\n if (question.isAnsweredCorrectly) {\n return 100;\n }\n\n if (!question.isAnswered) {\n return undefined;\n }\n\n return this.mapResponse(question);\n }\n\n mapResponse(question?: any) {\n throw new Error('Not implemented');\n }\n\n hasQuestionResponse(question: any) {\n return question.response !== null;\n }\n\n isAnsweredCorrectly(answer: any) {\n return answer === 100;\n }\n\n isEmptyAnswer(answer: any) {\n if (Array.isArray(answer) || typeof answer === 'string' || answer instanceof String) {\n return answer.length === 0;\n }\n\n if (answer.constructor === Object) {\n return Object.keys(answer).length === 0;\n }\n\n return false;\n }\n}\n\nexport default ResponseMapperBase;\n","import { NO_SELECTED_ID } from 'constants/common';\nimport ResponseMapperBase from './ResponseMapperBase';\n\nexport default class DragAndDropTextResponseMapper extends ResponseMapperBase {\n mapResponse(question: any) {\n if (!this.hasQuestionResponse(question)) {\n return {};\n }\n\n const result: { [key: string]: any } = {};\n question.dropspots.forEach((answer: any) => {\n const responseItem = question.response.find((e: any) => e.id === answer.id);\n if (responseItem && responseItem.items.length) {\n const item = responseItem.items[0];\n const itemIndex = question.dropspots.findIndex((e: any) => e.id === item.id);\n result[itemIndex] = {\n x: answer.x,\n y: answer.y\n };\n }\n });\n\n return result;\n }\n\n /**\n * @param {object} userAnswer\n * @param {object} question\n */\n unMap(userAnswer: any, { dropspots }: any) {\n const notSelectedItem: { [key: string]: any } = {\n id: NO_SELECTED_ID,\n items: [],\n isDropDisabled: false\n };\n\n if (this.isAnsweredCorrectly(userAnswer)) {\n const result = dropspots.map((dropspot: any) => ({\n id: dropspot.id,\n items: [dropspot],\n position: {\n x: dropspot.x,\n y: dropspot.y\n },\n isDropDisabled: true\n }));\n\n result.unshift(notSelectedItem);\n return result;\n }\n\n const userAnswerIndexes = Object.keys(userAnswer);\n dropspots.forEach((dropspot: any, index: any) => {\n if (!userAnswerIndexes.find(answerIndex => answerIndex === index.toString())) {\n notSelectedItem.items.push(dropspot);\n }\n });\n\n let answerValues: any[] = [];\n Object.keys(userAnswer).forEach((answerIndex: any) => {\n answerValues[answerIndex] = userAnswer[answerIndex];\n });\n\n const result = dropspots.map((dropspot: any) => {\n const selectedOptionIndex = answerValues.findIndex(\n answerOption =>\n answerOption && answerOption.x === dropspot.x && answerOption.y === dropspot.y\n );\n const isAnswered = selectedOptionIndex !== -1;\n return {\n id: dropspot.id,\n items: isAnswered ? [dropspots[selectedOptionIndex]] : [],\n position: {\n x: dropspot.x,\n y: dropspot.y\n },\n isDropDisabled: isAnswered\n };\n });\n\n result.unshift(notSelectedItem);\n return result;\n }\n}\n","import ResponseMapperBase from './ResponseMapperBase';\n\nexport default class FillInTheBlankResponseMapper extends ResponseMapperBase {\n mapResponse(question: any) {\n if (!this.hasQuestionResponse(question)) {\n return {};\n }\n\n const result: { [key: string]: any } = {};\n if (question.response.data) {\n Object.keys(question.response.data).forEach(id => {\n const index = question.answerGroups.findIndex((e: any) => e.id === id);\n result[index] = question.response.data[id];\n });\n }\n return result;\n }\n\n /**\n * @param {object} userAnswer\n * @param {object} question\n */\n unMap(userAnswer: any, { answerGroups }: any) {\n const data: { [key: string]: any } = {};\n if (this.isAnsweredCorrectly(userAnswer)) {\n answerGroups.forEach(({ id, answers }: any) => {\n const answerItem = answers.find(({ isCorrect }: any) => isCorrect);\n data[id] = answerItem.text;\n });\n return { data };\n }\n\n let questionAnswer = this.isEmptyAnswer(userAnswer) ? {} : userAnswer;\n answerGroups.forEach(({ id }: any, index: any) => {\n const itemAnswer = questionAnswer[index.toString()];\n data[id] = itemAnswer == null ? '' : itemAnswer;\n });\n\n return { data };\n }\n}\n","import ResponseMapperBase from './ResponseMapperBase';\n\nexport default class HotspotResponseMapper extends ResponseMapperBase {\n map(question: any) {\n if (!question.isAnswered) {\n return undefined;\n }\n\n return this.mapResponse(question);\n }\n\n mapResponse(question: any) {\n if (!this.hasQuestionResponse(question)) {\n return [];\n }\n\n return question.response;\n }\n\n /**\n * @param {object} userAnswer\n * @param {object} question\n */\n unMap(userAnswer: any, { spots }: any) {\n if (this.isAnsweredCorrectly(userAnswer)) {\n return spots.map((spot: any) => spot[0]);\n }\n\n if (this.isEmptyAnswer(userAnswer)) {\n return [];\n }\n\n return userAnswer;\n }\n}\n","import ResponseMapperBase from './ResponseMapperBase';\n\nexport default class InformationContentResponseMapper extends ResponseMapperBase {\n mapResponse() {\n return 100;\n }\n\n /**\n * @param {object} userAnswer\n */\n unMap(userAnswer: any) {\n return this.isAnsweredCorrectly(userAnswer) ? 100 : undefined;\n }\n}\n","import ResponseMapperBase from './ResponseMapperBase';\n\nexport default class ChoiceResponseMapperBase extends ResponseMapperBase {\n mapResponse(question: any) {\n if (!this.hasQuestionResponse(question)) {\n return [];\n }\n\n const result: any[] = [];\n question.answers.forEach((answer: any, index: any) => {\n if (question.response.find((e: any) => e === answer.id)) {\n result.push(index);\n }\n });\n\n return result;\n }\n\n /**\n * @param {object} userAnswer\n * @param {object} question\n */\n unMap(userAnswer: any, { answers }: { [key: string]: any }) {\n if (this.isAnsweredCorrectly(userAnswer)) {\n return answers.filter(({ isCorrect }: { [key: string]: any }) => isCorrect).map(({ id }: { [key: string]: any }) => id);\n }\n\n if (this.isEmptyAnswer(userAnswer)) {\n return [];\n }\n\n return this._unMapFailedResponse(userAnswer, answers);\n }\n\n _unMapFailedResponse(userAnswer?: any, answers?: any) {\n throw new Error('Not implemented');\n }\n}\n","import ChoiceResponseMapperBase from './ChoiceResponseMapperBase';\n\nexport default class MultipleChoiceResponseMapper extends ChoiceResponseMapperBase {\n _unMapFailedResponse(userAnswer: any, answers: any) {\n return userAnswer.map((answer: any) => answers[answer].id);\n }\n}\n","import ResponseMapperBase from './ResponseMapperBase';\n\nexport default class OpenQuestionResponseMapper extends ResponseMapperBase {\n /**\n * @param {object} question\n */\n map({ isAnswered, response }: any) {\n return isAnswered ? response.answeredText : undefined;\n }\n\n /**\n * @param {object} userAnswer\n * @param {object} question\n */\n unMap(userAnswer: any, { id }: any) {\n return {\n id,\n answeredText: userAnswer\n };\n }\n}\n","import ResponseMapperBase from './ResponseMapperBase';\n\nexport default class RankingTextResponseMapper extends ResponseMapperBase {\n mapResponse(question: any) {\n if (!this.hasQuestionResponse(question)) {\n return [];\n }\n\n return question.response.map((item: any) => item.text);\n }\n\n /**\n * @param {object} userAnswer\n * @param {object} question\n */\n unMap(userAnswer: any, { answers }: any) {\n if (userAnswer === 100) {\n return answers;\n }\n\n if (this.isEmptyAnswer(userAnswer)) {\n return [];\n }\n\n const questionAnswers = answers.map(({ id, text }: any) => ({\n id,\n text,\n hasBeenSelected: false\n }));\n\n return userAnswer.map((text: any) => {\n const answerItem = questionAnswers.find(\n (questionAnswer: any) => questionAnswer.text === text && !questionAnswer.hasBeenSelected\n );\n\n if (!answerItem) {\n throw new Error(`Ranking text: text answer wan not found: '${text}'`);\n }\n\n answerItem.hasBeenSelected = true; // ???????\n return {\n id: answerItem.id,\n text\n };\n });\n }\n}\n","import ResponseMapperBase from './ResponseMapperBase';\n\nexport default class ScenarioResponseMapper extends ResponseMapperBase {\n mapResponse(question: any) {\n if (!this.hasQuestionResponse(question)) {\n return 0;\n }\n\n return question.response.score;\n }\n\n /**\n * @param {object} userAnswer\n */\n unMap(userAnswer: any) {\n return { score: userAnswer, isFinished: userAnswer === 100 };\n }\n}\n","import ChoiceResponseMapperBase from './ChoiceResponseMapperBase';\n\nexport default class SingleChoiceResponseMapper extends ChoiceResponseMapperBase {\n _unMapFailedResponse(userAnswer: any, answers: any) {\n return [answers[userAnswer[0]].id];\n }\n}\n","import ResponseMapperBase from './ResponseMapperBase';\n\nexport default class SingleChoiceImageResponseMapper extends ResponseMapperBase {\n mapResponse(question: any) {\n if (!this.hasQuestionResponse(question)) {\n return [];\n }\n\n const result: any[] = [];\n question.answers.forEach((answer: any, index: any) => {\n if (question.response.find((e: any) => e === answer.id)) {\n result.push(index);\n }\n });\n\n return result;\n }\n\n /**\n * @param {object} userAnswer\n * @param {object} question\n */\n unMap(userAnswer: any, { answers, correctAnswerId }: any) {\n if (this.isAnsweredCorrectly(userAnswer)) {\n return answers.filter(({ id }: any) => id === correctAnswerId).map(({ id }: any) => id);\n }\n\n if (this.isEmptyAnswer(userAnswer)) {\n return [];\n }\n\n return [answers[userAnswer].id];\n }\n}\n","import ResponseMapperBase from './ResponseMapperBase';\n\nexport default class StatementChoiceResponseMapper extends ResponseMapperBase {\n /**\n * @param {object} question\n */\n mapResponse({ answers, response }: any) {\n let result: { [key: string]: any } = {};\n\n response.forEach(({ id, isCorrect }: any) => {\n const answerIndex = answers.findIndex((answer: any) => answer.id === id);\n result[answerIndex] = +isCorrect;\n });\n\n return result;\n }\n\n /**\n * @param {object} userAnswer\n * @param {object} question\n */\n unMap(userAnswer: any, { answers }: any) {\n if (this.isAnsweredCorrectly(userAnswer)) {\n return answers.map(({ id, isCorrect }: any) => ({\n id,\n isCorrect\n }));\n }\n\n if (this.isEmptyAnswer(userAnswer)) {\n return [];\n }\n\n let result: any[] = [];\n const userAnswerKeys = Object.keys(userAnswer);\n userAnswerKeys.forEach(key => {\n const option = userAnswer[key];\n const { id } = answers[key];\n\n result.push({\n id,\n isCorrect: option === 1\n });\n });\n\n return result;\n }\n}\n","import ResponseMapperBase from './ResponseMapperBase';\n\nexport default class TextMatchingResponseMapper extends ResponseMapperBase {\n /**\n * @param {object} question\n */\n mapResponse({ answers, response }: any) {\n let result: { [key: string]: any } = {};\n\n response.forEach(({ id, shownSelectedValue }: any) => {\n const answerIndex = answers.findIndex((answer: any) => answer.id === id);\n result[answerIndex] = shownSelectedValue;\n });\n\n return result;\n }\n\n /**\n * @param {object} userAnswer\n * @param {object} question\n */\n unMap(userAnswer: any, { answers }: any) {\n if (this.isAnsweredCorrectly(userAnswer)) {\n return answers.map(({ id, key, value }: any) => ({\n id,\n key,\n value,\n selectedKey: key,\n shownSelectedValue: value\n }));\n }\n\n if (this.isEmptyAnswer(userAnswer)) {\n return [];\n }\n\n return answers.map(({ id, key, value }: any, index: any) => {\n const selectedOption = userAnswer[index];\n const selectedKey = answers.find((answer: any) => answer.value === selectedOption);\n\n return {\n id,\n key,\n value,\n selectedKey: selectedKey ? selectedKey.key : null,\n shownSelectedValue: selectedOption\n };\n });\n }\n}\n","import * as questionTypes from 'constants/questionTypes';\n\nimport DragAndDropTextResponseMapper from './DragAndDropTextResponseMapper';\nimport FillInTheBlankResponseMapper from './FillInTheBlankResponseMapper';\nimport HotspotResponseMapper from './HotspotResponseMapper';\nimport InformationContentResponseMapper from './InformationContentResponseMapper';\nimport MultipleChoiceResponseMapper from './MultipleChoiceResponseMapper';\nimport OpenQuestionResponseMapper from './OpenQuestionResponseMapper';\nimport RankingTextResponseMapper from './RankingTextResponseMapper';\nimport ScenarioResponseMapper from './ScenarioResponseMapper';\nimport SingleChoiceResponseMapper from './SingleChoiceResponseMapper';\nimport SingleChoiceImageResponseMapper from './SingleChoiceImageResponseMapper';\nimport StatementChoiceResponseMapper from './StatementChoiceResponseMapper';\nimport TextMatchingResponseMapper from './TextMatchingResponseMapper';\n\nconst questions: { [key: string]: any } = {\n [questionTypes.DRAG_AND_DROP_TEXT]: new DragAndDropTextResponseMapper(),\n [questionTypes.FILL_IN_THE_BLANK]: new FillInTheBlankResponseMapper(),\n [questionTypes.HOTSPOT]: new HotspotResponseMapper(),\n [questionTypes.INFORMATION_CONTENT]: new InformationContentResponseMapper(),\n [questionTypes.MULTIPLE_CHOICE]: new MultipleChoiceResponseMapper(),\n [questionTypes.OPEN_QUESTION]: new OpenQuestionResponseMapper(),\n [questionTypes.RANKING_TEXT]: new RankingTextResponseMapper(),\n [questionTypes.SCENARIO]: new ScenarioResponseMapper(),\n [questionTypes.SINGLE_CHOICE]: new SingleChoiceResponseMapper(),\n [questionTypes.SINGLE_CHOICE_IMAGE]: new SingleChoiceImageResponseMapper(),\n [questionTypes.STATEMENT_CHOICE]: new StatementChoiceResponseMapper(),\n [questionTypes.TEXT_MATCHING]: new TextMatchingResponseMapper()\n};\n\nexport default questions;\n","import responseMappers from './responseMappers';\n\nclass ResponseMapper {\n map(question: any) {\n return responseMappers[question.type].map(question);\n }\n\n unMap(userAnswers: any, question: any) {\n return responseMappers[question.type].unMap(userAnswers, question);\n }\n}\n\nexport default new ResponseMapper();\n","class UrlMapper {\n unMap(url: string) {\n switch (url) {\n case 'finish':\n return 'results';\n case 'sections':\n return 'sections';\n default:\n return url\n .replace('signin', 'login')\n .replace(/section\\//, 'sections/')\n .replace(/question\\//, 'questions/');\n }\n }\n}\n\nexport default new UrlMapper();\n","import { STATUS_OK } from 'constants/progressStorage';\nimport { getQuestionsStructure, getTimeSpent } from 'store/course/selectors';\nimport {\n isPublishMode,\n isCourse,\n isAnswersFromPreviousAttemptEnabled,\n shouldSubmitAllQuestions,\n getTimerEnabled,\n isQuestionPoolEnabled,\n getQuestionPoolSize,\n isRandomizeAnswersEnabled,\n isNewSubsetOnEveryAttempt\n} from 'store/settings/selectors';\nimport { RootAppState } from 'store/types';\nimport { shouldSaveCrossDevice } from 'store/user/selectors';\nimport { compress, decompress } from 'utils/compression';\nimport { isObject } from 'utils/object';\nimport isEmpty from 'lodash.isempty';\nimport { hasNonAscii } from 'utils/string';\nimport ExternalStorage from './externalStorage';\nimport idMapper from './idMapper';\nimport LocalStorage from './localStorage';\nimport { responseMapper, urlMapper } from './progressMapper';\nimport StorageInterface from './storageInterface';\nimport { getTimerElapsed, getTimerStatus } from '../../store/timer/selectors';\n\nconst defaultCourseProgress = {\n url: null,\n user: null,\n answers: [],\n questionPool: [],\n attempts: [],\n finished: false,\n allQuestionsSubmitted: false,\n courseAttemptNumber: 0,\n randomizedOptionsList: []\n};\n\nconst defaultChecklistProgress = {\n user: {\n email: '',\n name: '',\n authorizationSkipped: false,\n account: null\n },\n checklistItem: {}\n};\n\nclass ProgressStorage extends StorageInterface {\n progress: any;\n\n storage: any;\n\n isScormMode: any;\n\n questionShortIds: any;\n\n questionsIndexToIdSchema: any;\n\n isQuestionPool: boolean;\n\n questionPoolSize: number;\n\n shouldShowPreviousAnswers: boolean;\n\n isSubmitAllAtOnce: boolean;\n\n nonAsciiCharsSupported: any;\n\n timerEnabled: boolean;\n\n isRandomizeAnswersEnabled: boolean;\n\n isNewSubsetOnEveryAttempt: boolean;\n\n constructor() {\n super();\n this.progress = {};\n this.storage = null;\n this.isScormMode = false;\n this.questionShortIds = null;\n this.questionsIndexToIdSchema = null;\n this.isQuestionPool = false;\n this.questionPoolSize = 0;\n this.isSubmitAllAtOnce = false;\n this.shouldShowPreviousAnswers = false;\n this.nonAsciiCharsSupported = true;\n this.timerEnabled = false;\n this.isRandomizeAnswersEnabled = false;\n this.isNewSubsetOnEveryAttempt = false;\n }\n\n initialize({ state, isScormMode }: any) {\n if (isCourse(state)) {\n this.progress = Object.assign({}, defaultCourseProgress);\n this.questionsIndexToIdSchema = getQuestionsStructure(state);\n this.isScormMode = isScormMode;\n this.isQuestionPool = isQuestionPoolEnabled(state);\n this.questionPoolSize = getQuestionPoolSize(state);\n this.shouldShowPreviousAnswers = isAnswersFromPreviousAttemptEnabled(state);\n this.isSubmitAllAtOnce = shouldSubmitAllQuestions(state);\n this.timerEnabled = getTimerEnabled(state);\n this.isRandomizeAnswersEnabled = isRandomizeAnswersEnabled(state);\n this.isNewSubsetOnEveryAttempt = isNewSubsetOnEveryAttempt(state);\n\n if (shouldSaveCrossDevice(state) && isPublishMode(state)) {\n this.storage = new ExternalStorage(state);\n } else {\n this.storage = new LocalStorage(state);\n }\n } else {\n this.progress = Object.assign({}, defaultChecklistProgress);\n this.progress.checklistItem = {};\n this.storage = new LocalStorage(state);\n }\n }\n\n get user() {\n return this.progress.user;\n }\n\n set user(user: any) {\n delete user.password;\n this.progress.user = user;\n }\n\n get checklistItem() {\n return this.progress.checklistItem;\n }\n\n get timeSpent() {\n return this.progress.timeSpent;\n }\n\n get url() {\n const { url } = this.progress;\n return url ? urlMapper.unMap(url) : url;\n }\n\n set url(url: any) {\n this.progress.url = url;\n }\n\n get attemptId() {\n return this.progress.attemptId;\n }\n\n set attemptId(attemptId: any) {\n this.progress.attemptId = attemptId;\n }\n\n get questionPool() {\n return this.progress.questionPool;\n }\n\n set questionPool(questionPool) {\n this.progress.questionPool = questionPool;\n }\n\n async restoreAnswers() {\n if (!isEmpty(this.progress?.answers)) {\n return true;\n }\n const progress = await this.storage?.getProgress();\n if (progress?.answers) {\n if (isObject(progress.answers)) {\n progress.answers = this._mapObjectAnswersToArray(progress.answers);\n }\n this.progress = progress;\n return true;\n }\n return false;\n }\n\n async decompressProgress(progress: any) {\n if (this.isScormMode && this.nonAsciiCharsSupported) {\n return decompress(progress);\n }\n return progress;\n }\n\n async restoreProgress() {\n let progress = await this.storage?.getProgress();\n progress = await this.decompressProgress(progress);\n if (progress && progress.user && progress.user.email === this.progress.user.email) {\n if (isObject(progress.answers)) {\n progress.answers = this._mapObjectAnswersToArray(progress.answers);\n }\n if (!progress.questionPool) {\n progress.questionPool = [];\n }\n\n if (this.isQuestionPool && this.questionPoolSize !== progress.questionPool.length) {\n throw new Error('Question Pool size changed.');\n }\n\n if (!progress.attempts) {\n progress.attempts = [];\n }\n\n if (!progress.randomizedOptionsList) {\n progress.randomizedOptionsList = [];\n }\n\n if (!this.timerEnabled) {\n delete progress.timer;\n }\n\n this.progress = progress;\n return true;\n }\n return false;\n }\n\n updateQuestionProgress(question: any) {\n const progressIndex = this.questionsIndexToIdSchema.findIndex((id: any) => id === question.id);\n if (progressIndex === undefined) {\n throw new Error('Question does not exist.');\n }\n this.progress.attempts[progressIndex] = question.attemptNumber || 0;\n this.progress.answers[progressIndex] = responseMapper.map(question);\n }\n\n updateCourseAttemptProgress(courseAttemptNumber: any) {\n this.progress.courseAttemptNumber = courseAttemptNumber;\n }\n\n updateCourseProgress(allQuestionsSubmitted: any) {\n this.progress.allQuestionsSubmitted = allQuestionsSubmitted;\n }\n\n removeQuestionProgress(questionId: any) {\n const progressIndex = this.questionsIndexToIdSchema.findIndex((id: any) => id === questionId);\n if (progressIndex === undefined) {\n throw new Error('Question does not exist.');\n }\n\n this.progress.answers.slice(progressIndex, 0);\n this.progress.attempts.slice(progressIndex, 0);\n }\n\n resetTimerProgress() {\n this.progress.timer = {\n elapsed: 0,\n status: 'RESET'\n };\n }\n\n updateChecklistProgress(checkItem: { id: string; isChecked: boolean }) {\n this.progress.checklistItem[checkItem.id] = checkItem.isChecked;\n }\n\n async saveProgress(state: RootAppState) {\n if (this.storage && this.storage.saveProgress) {\n this.progress.timeSpent = getTimeSpent(state);\n if (this.timerEnabled) {\n this.progress.timer = {\n elapsed: getTimerElapsed(state),\n status: getTimerStatus(state)\n };\n }\n const progress =\n this.isScormMode && this.nonAsciiCharsSupported ? compress(this.progress) : this.progress;\n await this.storage.saveProgress(progress, state);\n }\n }\n\n async checkScormNonAsciiSupport() {\n const restoredProgress = await this.storage?.getProgress();\n if (isEmpty(restoredProgress)) {\n await this.storage.saveProgress(compress(this.progress));\n const progress = await this.storage?.getProgress();\n try {\n decompress(progress);\n } catch (e) {\n this.nonAsciiCharsSupported = false;\n }\n await this.storage.saveProgress(restoredProgress);\n } else {\n this.nonAsciiCharsSupported = hasNonAscii(JSON.stringify(restoredProgress));\n }\n }\n\n async removeProgress() {\n await this.storage.removeProgress();\n this._clearProgress();\n }\n\n async authorizeUser(userData: any) {\n if (this.storage && this.storage.authorizeUser) {\n return this.storage.authorizeUser(userData);\n }\n\n return null;\n }\n\n async registerUser(userData: any) {\n if (this.storage && this.storage.registerUser) {\n return this.storage.registerUser(userData);\n }\n\n return null;\n }\n\n async resetPassword(email: any) {\n if (this.storage && this.storage.resetPassword) {\n return this.storage.resetPassword(email);\n }\n\n return STATUS_OK;\n }\n\n async logout() {\n if (this.storage && this.storage.logout) {\n await this.storage.logout();\n }\n\n this._clearProgressLogout();\n }\n\n async sendSecretLink() {\n if (this.storage && this.storage.sendSecretLink) {\n return this.storage.sendSecretLink();\n }\n\n return STATUS_OK;\n }\n\n use(storage: any) {\n this.storage = storage;\n }\n\n get randomizedOptionsList() {\n return this.progress.randomizedOptionsList;\n }\n\n set randomizedOptionsList(randomizedOptionsList: any) {\n this.progress.randomizedOptionsList = randomizedOptionsList;\n }\n\n get courseAttemptNumber() {\n return this.progress.courseAttemptNumber;\n }\n\n set courseAttemptNumber(courseAttemptNumber: any) {\n this.progress.courseAttemptNumber = courseAttemptNumber;\n }\n\n get allQuestionsSubmitted() {\n return this.progress.allQuestionsSubmitted;\n }\n\n set allQuestionsSubmitted(allQuestionsSubmitted: any) {\n this.progress.allQuestionsSubmitted = allQuestionsSubmitted;\n }\n\n get submitOnceAttempt() {\n return this.progress.submitOnceAttempt;\n }\n\n set submitOnceAttempt(submitOnceAttempt: any) {\n this.progress.submitOnceAttempt = submitOnceAttempt;\n }\n\n get timer() {\n return this.progress.timer;\n }\n\n getAnswers(questions: any) {\n const progressAnswers = this.progress.answers;\n const progressAttempts = this.progress.attempts;\n\n const answers: any[] = [];\n progressAnswers.forEach((answer: any, index: any) => {\n const question = this._getProgressedQuestion({ questions, answer, answerIndex: index });\n const attempt = progressAttempts[index] || 0;\n\n if (isEmpty(answer) && answer !== 100 && attempt === 0) {\n return;\n }\n\n if (!question) {\n return;\n }\n\n const processedAnswer = this._unMapProgress(question, answer);\n Object.assign(processedAnswer, { attempt });\n answers.push(processedAnswer);\n });\n\n return answers;\n }\n\n _getProgressedQuestion({ questions, answer, answerIndex }: { [key: string]: any }) {\n let questionId: string;\n if (this._hasFullProgressStructure(answer)) {\n questionId = this.isScormMode ? idMapper.unMap(answer.id) : answer.id;\n } else {\n questionId = this.questionsIndexToIdSchema[answerIndex];\n }\n\n return questions.find(({ id }: { [key: string]: any }) => id === questionId);\n }\n\n _unMapProgress(question: any, answer: any) {\n let userResponse;\n if (this._hasFullProgressStructure(answer)) {\n const { type, response } = answer;\n userResponse = this.isScormMode ? idMapper.unMapResponse(type, response) : response;\n this._rewriteAnswerToShortenStructure(question, userResponse);\n } else {\n userResponse = responseMapper.unMap(answer, question);\n }\n\n return {\n id: question.id,\n response: userResponse\n };\n }\n\n _hasFullProgressStructure(answer: any) {\n return answer && isObject(answer) && answer.id !== undefined;\n }\n\n _rewriteAnswerToShortenStructure(question: any, oldStructureResponse: any) {\n const entity = Object.assign({}, question);\n entity.response = oldStructureResponse;\n entity.isAnswered = true;\n\n this.updateQuestionProgress(entity);\n }\n\n async identifyUser() {\n if (this.storage && this.storage.identifyUser) {\n return this.storage.identifyUser();\n }\n\n return null;\n }\n\n async userExists(email: any) {\n if (this.storage && this.storage.userExists) {\n return this.storage.userExists(email);\n }\n\n return STATUS_OK;\n }\n\n getSocialNetworkAuthLink(socialNetwork: any) {\n if (this.storage && this.storage.getSocialNetworkAuthLink) {\n return this.storage.getSocialNetworkAuthLink(socialNetwork);\n }\n\n return '#';\n }\n\n isAuthenticated() {\n if (this.storage && this.storage.isAuthenticated) {\n return this.storage.isAuthenticated();\n }\n\n return null;\n }\n\n getHeaders({ contentType, bearerToken }: any) {\n if (this.storage && this.storage.getHeaders) {\n return this.storage.getHeaders({ contentType, bearerToken });\n }\n return {};\n }\n\n _clearProgressLogout() {\n this.progress = Object.assign(defaultCourseProgress, { answers: [] });\n }\n\n _clearProgress() {\n const answersToSave =\n this.shouldShowPreviousAnswers && this.isSubmitAllAtOnce && !this.isNewSubsetOnEveryAttempt\n ? [...this.progress.answers]\n : [];\n\n const courseAttempts =\n this.isSubmitAllAtOnce && this.progress.courseAttemptNumber\n ? this.progress.courseAttemptNumber\n : 0;\n\n const randomizedOptionsList =\n this.isRandomizeAnswersEnabled && this.progress.randomizedOptionsList?.length > 0\n ? this.progress.randomizedOptionsList\n : [];\n\n const questionPoolToSave =\n this.isQuestionPool && !this.isNewSubsetOnEveryAttempt && this.questionPool?.length > 0\n ? [...this.questionPool]\n : [];\n\n this.progress = Object.assign(defaultCourseProgress, {\n answers: answersToSave,\n questionPool: questionPoolToSave,\n courseAttemptNumber: courseAttempts,\n randomizedOptionsList\n });\n }\n\n getToken() {\n if (this.storage && this.storage.getToken) {\n return this.storage.getToken();\n }\n return '';\n }\n\n _mapObjectAnswersToArray(originalAnswers: any) {\n const answers: any[] = [];\n Object.keys(originalAnswers).forEach((answerIndex: any) => {\n answers[answerIndex] = originalAnswers[answerIndex];\n });\n\n return answers;\n }\n}\n\nexport default new ProgressStorage();\n","import { events } from 'core/events/eventEmitter';\nimport BaseEventHandler from 'core/events/eventHandler';\nimport progressStorage from './progressStorage';\n\nexport default class EventHandler extends BaseEventHandler {\n handlers: any[];\n\n constructor() {\n super();\n this.handlers = [\n { event: events.APP_INITIALIZED, instance: this.appInitialize.bind(this) },\n { event: events.APP_NAVIGATED, instance: this.appNavigated.bind(this) },\n\n { event: events.COURSE_LAUNCHED, instance: this.courseLaunched.bind(this) },\n {\n event: events.COURSE_QUESTION_POOL_SELECTED,\n instance: this.courseQuestionPoolSelected.bind(this)\n },\n {\n event: events.COURSE_RANDOMIZED_OPTIONS_SAVED,\n instance: this.courseRandomizedOptionsSaved.bind(this)\n },\n {\n event: events.COURSE_PROGRESSED,\n instance: this.courseProgressed.bind(this)\n },\n {\n event: events.SUBMIT_ONCE_COURSE_PROGRESSED,\n instance: this.courseProgressed.bind(this)\n },\n {\n event: events.COURSE_ATTEMPT_STARTED,\n instance: this.courseAttemptStarted.bind(this)\n },\n {\n event: events.QUESTION_ANSWERED,\n instance: this.updateQuestionProgress.bind(this)\n },\n {\n event: events.SUBMIT_ONCE_QUESTION_ANSWERED,\n instance: this.updateQuestionProgress.bind(this)\n },\n {\n event: events.SUBMIT_ONCE_QUESTION_SUBMITTED,\n instance: this.updateCourseProgress.bind(this)\n },\n {\n event: events.COURSE_SUBMIT_AT_ONCE_LIMITED,\n instance: this.updateCourseAttemptProgress.bind(this)\n },\n {\n event: events.SUBMIT_ONCE_QUESTION_ATTEMPTED,\n instance: this.updateCourseProgress.bind(this)\n },\n {\n event: events.INFORMATION_CONTENT_EXPERIENCED,\n instance: this.updateQuestionProgress.bind(this)\n },\n {\n event: events.RESET_QUESTION_PROGRESS,\n instance: this.removeQuestionProgress.bind(this)\n },\n {\n event: events.RESET_TIMER_PROGRESS,\n instance: this.resetTimerProgress.bind(this)\n },\n {\n event: events.COURSE_TIMER_PROGRESSED,\n instance: this.courseProgressed.bind(this)\n },\n\n { event: events.USER_AUTHENTICATED, instance: this.userAuthorized.bind(this) },\n { event: events.USER_LOGOUT, instance: this.logout.bind(this) },\n\n {event: events.UPDATE_CHECKLIST_PROGRESS, instance: this.updateChecklistProgress.bind(this)}\n ];\n }\n\n appInitialize({ state, isScormMode }: any) {\n progressStorage.initialize({ state, isScormMode });\n }\n\n appNavigated({ url, state }: { [key: string]: any }) {\n // fix for browser back button\n if (progressStorage.url === url || url === '/') {\n return;\n }\n\n progressStorage.url = url;\n progressStorage.saveProgress(state);\n }\n\n courseLaunched(attemptId: any) {\n progressStorage.attemptId = attemptId;\n }\n\n courseQuestionPoolSelected({\n questionPoolIds,\n state\n }: {\n questionPoolIds: string[];\n state: any;\n }) {\n progressStorage.questionPool = questionPoolIds;\n progressStorage.saveProgress(state);\n }\n\n courseProgressed(state: any) {\n progressStorage.saveProgress(state);\n }\n\n courseAttemptStarted(state: any) {\n progressStorage.saveProgress(state);\n }\n\n courseRandomizedOptionsSaved({\n randomizedOptionsList,\n state\n }: {\n randomizedOptionsList: string[];\n state: any;\n }) {\n progressStorage.randomizedOptionsList = randomizedOptionsList;\n progressStorage.saveProgress(state);\n }\n\n updateQuestionProgress([question]: any) {\n progressStorage.updateQuestionProgress(question);\n }\n\n updateCourseProgress([allQuestionsSubmitted]: any) {\n progressStorage.updateCourseProgress(allQuestionsSubmitted);\n }\n\n updateCourseAttemptProgress(courseAttemptNumber: any) {\n progressStorage.updateCourseAttemptProgress(courseAttemptNumber);\n }\n removeQuestionProgress(questionId: any) {\n progressStorage.removeQuestionProgress(questionId);\n }\n\n resetTimerProgress() {\n progressStorage.resetTimerProgress();\n }\n\n userAuthorized(user: any) {\n progressStorage.user = user;\n }\n\n updateChecklistProgress( data: any) {\n progressStorage.updateChecklistProgress({id: data.id, isChecked: data.isChecked});\n progressStorage.saveProgress(data.state);\n }\n\n async logout({ state }: any) {\n await progressStorage.logout();\n this.appInitialize({ state });\n }\n}\n","import EventHandler from './EventHandler';\nimport progressStorage from './progressStorage';\n\nclass ProgressStorage {\n eventHandler: any;\n\n constructor() {\n this.eventHandler = new EventHandler();\n }\n\n subscribe() {\n this.eventHandler.on();\n }\n\n unsubscribe() {\n this.eventHandler.off();\n }\n\n use(storage: any) {\n progressStorage.use(storage);\n }\n\n get url() {\n return progressStorage.url;\n }\n\n get attemptId() {\n return progressStorage.attemptId;\n }\n\n get allQuestionsSubmitted() {\n return progressStorage.allQuestionsSubmitted;\n }\n\n get courseAttemptNumber() {\n return progressStorage.courseAttemptNumber;\n }\n\n get submitOnceAttempt() {\n return progressStorage.submitOnceAttempt;\n }\n\n get checklistItem() {\n return progressStorage.checklistItem;\n }\n\n get timeSpent() {\n return progressStorage.timeSpent;\n }\n\n get timer() {\n return progressStorage.timer;\n }\n\n getAnswers(questions: any) {\n return progressStorage.getAnswers(questions);\n }\n\n getRandomizeAnswers() {\n return progressStorage.randomizedOptionsList;\n }\n\n getQuestionPool() {\n return progressStorage.questionPool;\n }\n\n restoreProgress() {\n return progressStorage.restoreProgress();\n }\n\n restoreAnswers() {\n return progressStorage.restoreAnswers();\n }\n\n checkScormNonAsciiSupport() {\n return progressStorage.checkScormNonAsciiSupport();\n }\n\n identifyUser() {\n return progressStorage.identifyUser();\n }\n\n userExists(email: any) {\n return progressStorage.userExists(email);\n }\n\n resetPassword(email: any) {\n return progressStorage.resetPassword(email);\n }\n\n authorizeUser(userData: any) {\n return progressStorage.authorizeUser(userData);\n }\n\n registerUser(userData: any) {\n return progressStorage.registerUser(userData);\n }\n\n removeProgress() {\n return progressStorage.removeProgress();\n }\n\n sendSecretLink() {\n return progressStorage.sendSecretLink();\n }\n\n getSocialNetworkAuthLink(socialNetwork: any) {\n return progressStorage.getSocialNetworkAuthLink(socialNetwork);\n }\n\n isAuthenticated() {\n return progressStorage.isAuthenticated();\n }\n\n getHeaders({ contentType, bearerToken }: any) {\n return progressStorage.getHeaders({ contentType, bearerToken });\n }\n\n getToken() {\n return progressStorage.getToken();\n }\n}\n\nexport default new ProgressStorage();\n","import styled, { css } from 'styled-components';\nimport Icon from 'components/common/Icon';\nimport { transparentize } from 'utils/color';\nimport * as typography from 'components/mixins/typography';\nimport { centerAbsoluteElement } from 'components/mixins/placement';\nimport { defaultBoxShadowColor } from 'constants/common';\n\nexport const ArrowIcon = styled(Icon)`\n color: ${props => props.theme.colors.mainColor};\n position: absolute;\n ${centerAbsoluteElement};\n`;\n\ntype DroppableItemStyleProps = {\n isMultipleList: boolean;\n isDragging: boolean;\n isPlaceholderVisible: boolean;\n}\nexport const DroppableItemStyle = styled.div.attrs({\n 'data-test': 'draggable-item'\n})`\n padding: 5px 30px 5px 40px;\n userselect: 'none';\n margin: 0 0 8px 0;\n position: relative;\n border-radius: 2px;\n color: ${props => props.theme.colors.textColor};\n width: 100%;\n cursor: move;\n user-select: none;\n transform: ${props => (props.isMultipleList && !props.isDragging ? 'none !important' : '')};\n ${props => (props.isMultipleList ? 'vertical-align: middle;' : '')};\n\n &:before {\n content: '';\n display: block;\n position: absolute;\n top: 50%;\n left: 15px;\n width: 12px;\n height: 2px;\n border-top: 2px solid ${props => transparentize(props.theme.colors.textColor, 0.2)};\n border-bottom: 2px solid ${props => transparentize(props.theme.colors.textColor, 0.2)};\n margin-top: -3px;\n transition: 0.2s;\n }\n\n &:hover {\n box-shadow: 0 1px 4px 0 ${transparentize(defaultBoxShadowColor, 0.1)};\n\n &:before {\n border-color: ${props => props.theme.colors.mainColor};\n }\n }\n\n ${props =>\n props.isDragging\n ? css`\n background: ${props.theme.colors.contentBodyColor};\n box-shadow: 0 2px 10px 0 ${transparentize(defaultBoxShadowColor, 0.1)};\n\n &:before {\n border-color: ${props.theme.colors.mainColor};\n }\n\n & + div {\n background: ${props.isPlaceholderVisible\n ? transparentize(props.theme.colors.textColor, 0.02)\n : 'transparent'};\n border-radius: 2px;\n vertical-align: middle;\n ${props.isMultipleList ? 'vertical-align: middle;' : ''};\n }\n `\n : css`\n background: ${transparentize(props.theme.colors.textColor, 0.06)};\n `};\n`;\n\nexport const DroppableListStyle = styled.div.attrs({\n 'data-test': 'droppable-area'\n})`\n width: 100%;\n`;\n\ntype DroppableItemWrapperProps = {\n isMultipleList: boolean;\n isAreaEmpty: boolean;\n position: any;\n isImageLoaded: boolean;\n isDropDisabled: boolean;\n width: number;\n widthInvisible: number;\n}\nexport const DroppableItemWrapper = styled.div`\n display: flex;\n align-items: center;\n font-weight: bold;\n ${typography.secondaryFontText};\n\n ${props =>\n props.isMultipleList &&\n css`\n ${DroppableListStyle} {\n min-height: 40px;\n margin-bottom: 15px;\n width: 100%;\n\n & + div {\n display: none !important;\n }\n\n ${props.isAreaEmpty &&\n css`\n & {\n margin-bottom: 30px;\n background-color: ${transparentize(props.theme.colors.textColor, 0.04)};\n }\n\n &::after {\n display: block;\n content: attr(data-area-empty-text);\n ${typography.secondaryFont}\n font-weight: normal;\n font-size: 14px;\n text-align: center;\n line-height: 40px;\n color: ${transparentize(props.theme.colors.textColor, 0.4)};\n }\n `}\n }\n\n ${DroppableItemStyle} {\n padding: 0;\n white-space: nowrap;\n display: inline-block;\n width: auto !important;\n margin-right: 15px;\n margin-bottom: 15px;\n max-width: 360px;\n\n & > div {\n overflow: hidden;\n text-overflow: ellipsis;\n line-height: 1.5;\n padding: 9px 30px 8px 40px;\n }\n }\n `};\n ${props =>\n props.position &&\n css`\n position: absolute;\n top: ${props.position.y}%;\n left: ${props.position.x}%;\n min-width: ${props.isDropDisabled ? '44' : props.width}px;\n background: ${transparentize(props.theme.colors.contentBodyColor, 0.9)};\n box-shadow: inset 0 2px 0 0 ${transparentize(defaultBoxShadowColor, 0.1)};\n border-radius: 2px;\n transition: 0.3s;\n transform: ${!props.isImageLoaded ? 'scale(0)' : ''};\n opacity: ${!props.isImageLoaded ? '0.8' : '1'};\n\n ${!props.isDropDisabled &&\n css`\n &:after {\n content: '0';\n display: block;\n ${typography.secondaryFontText};\n line-height: 1.5;\n padding: 9px 0 8px;\n color: transparent;\n }\n `}\n\n &:before {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background: ${props.width === 44\n ? 'transparent'\n : transparentize(props.theme.colors.mainColor, 0.25)};\n transition: 0.3s;\n }\n\n & > div {\n top: 0;\n ${props.isDropDisabled ? '' : 'position: absolute'};\n transition: 0.3s;\n min-width: ${props.isDropDisabled ? '44' : props.widthInvisible}px;\n height: 100%;\n\n & + div {\n display: none !important;\n }\n }\n\n & ${DroppableItemStyle} {\n background: ${props.theme.colors.contentBodyColor};\n margin-bottom: 0;\n box-shadow: 0 1px 3px 0 ${transparentize(defaultBoxShadowColor, 0.04)};\n }\n `};\n`;\n\ntype ImageWrapperProps = {\n isImageLoaded?: boolean;\n isImageNotFound?: boolean;\n}\nexport const ImageWrapper = styled.div.attrs({\n 'data-test': 'image-wrapper'\n})`\n position: relative;\n display: inline-block;\n height: ${props => (props.isImageLoaded ? 'auto' : '182px')};\n width: max-content;\n max-width: 100%;\n background: ${props =>\n props.isImageNotFound || !props.isImageLoaded\n ? transparentize(props.theme.colors.textColor, 0.02)\n : 'transparent'};\n padding: ${props => (props.isImageNotFound ? '16px 0' : '0')};\n\n ${DroppableListStyle} {\n min-height: auto;\n margin-right: 0;\n margin-bottom: 0;\n }\n\n ${DroppableItemStyle} {\n margin-right: 0;\n }\n\n img {\n display: block;\n opacity: ${props => (props.isImageLoaded ? '1' : '0')};\n max-width: 100%;\n margin: ${props => (props.isImageNotFound ? '0 auto' : '0')};\n }\n`;\n","import * as React from 'react';\nimport { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';\nimport cloneDeep from 'lodash.clonedeep';\nimport { localize } from 'core/localization';\nimport NumericList from 'components/common/NumericList';\nimport { NO_SELECTED_ID } from 'constants/common';\nimport CircleLoader from 'components/common/CircleLoader';\nimport {\n DroppableListStyle,\n DroppableItemStyle,\n DroppableItemWrapper,\n ArrowIcon,\n ImageWrapper\n} from './DragDrop.styled';\n\nconst DROPPABLE_WIDTH = 44;\n\ntype DragDropProps = {\n id: string;\n listsOfItems: any[];\n moveItem(arg1: any, arg2: any, arg3: any, arg4: boolean, arg5: any, arg6?: any): void;\n isMultipleList: boolean;\n actions?: { [key: string]: any };\n imageUrl?: string;\n getDragActions?(): void;\n background?: string;\n setPositionDependingImageScale?(): void;\n getPositionDependingImageScale?(arg1: any, arg2: any, arg3: any): void;\n handleImageLoaded?(arg1: any, arg2: any): void;\n isImageLoaded?: boolean;\n allowSubmit: boolean;\n questionActions?: { [key: string]: any };\n isImageNotFound?: boolean;\n dropspots?: any[];\n retries?: number;\n isAnswered: boolean;\n};\n\ntype DragDropState = {\n listsOfItems: any;\n isPlaceholderVisible: boolean;\n numericListHeights: any[];\n droppableWidth: any;\n droppableWidthInvisible: any;\n isAnswered: boolean;\n retries: number;\n};\nexport class DragDrop extends React.Component {\n customRefs: any;\n imageRefs: any;\n\n constructor(props: DragDropProps) {\n super(props);\n this.customRefs = {};\n this.imageRefs = {};\n this.state = {\n listsOfItems: props.listsOfItems,\n isPlaceholderVisible: true,\n numericListHeights: [],\n droppableWidth: DROPPABLE_WIDTH,\n droppableWidthInvisible: DROPPABLE_WIDTH,\n isAnswered: props.isAnswered || false,\n retries: props.retries || 0\n };\n\n if (!props.isMultipleList) {\n props.moveItem(\n this.state.listsOfItems[0].items,\n props.listsOfItems[0].id,\n props.actions,\n props.allowSubmit,\n props.questionActions,\n true\n );\n } else {\n props.moveItem(\n this.state.listsOfItems,\n props.id,\n props.actions,\n props.allowSubmit,\n props.questionActions,\n true\n );\n }\n }\n\n static getDerivedStateFromProps(nextProps: DragDropProps, prevState: DragDropState) {\n if (nextProps.retries !== prevState.retries) {\n return {\n retries: nextProps.retries\n };\n }\n if (nextProps.isAnswered !== prevState.isAnswered) {\n return {\n isAnswered: nextProps.isAnswered\n };\n }\n return null;\n }\n\n move = (source: any, destination: any, droppableSource: any, droppableDestination: any) => {\n const { listsOfItems } = this.state;\n const result: any[] = Array.from(listsOfItems);\n\n const [removed] = source.splice(droppableSource.index, 1);\n\n destination.splice(droppableDestination.index, 0, removed);\n\n listsOfItems.forEach((element: any, index: any) => {\n if (droppableSource.droppableId === element.id) {\n result[index].items = source;\n }\n\n if (droppableDestination.droppableId === element.id) {\n result[index].items = destination;\n }\n\n if (result[index].items.length && result[index].id !== NO_SELECTED_ID) {\n result[index].isDropDisabled = true;\n }\n });\n\n return result;\n };\n\n reorder = (list: any, startIndex: any, endIndex: any) => {\n const result = Array.from(list);\n const [removed] = result.splice(startIndex, 1);\n result.splice(endIndex, 0, removed);\n\n return result;\n };\n\n getItemStyle = (draggableStyle: any) => ({\n // styles we need to apply on draggables\n ...draggableStyle\n });\n\n getList = (listId: any) => {\n const { listsOfItems } = this.state;\n const list = listsOfItems.find((element: any) => element.id === listId);\n return list.items;\n };\n\n setDisableDroppableArea = (droppableId: any) => {\n const { listsOfItems } = this.state;\n const results: any[] = Array.from(listsOfItems);\n listsOfItems.forEach((element: any, index: any) => {\n if (results[index].id === droppableId && droppableId !== NO_SELECTED_ID) {\n results[index].isDropDisabled = true;\n }\n });\n this.setState({\n listsOfItems: results\n });\n };\n\n reorderElementsPosition = (result: any) => {\n const { listsOfItems } = this.state;\n const { destination, source } = result;\n listsOfItems.forEach((element: any) => {\n if (destination.droppableId === element.id) {\n const reorderedItems = this.reorder(element.items, source.index, destination.index);\n element.items = reorderedItems;\n this.props.moveItem(\n reorderedItems,\n this.props.id,\n this.props.actions,\n this.props.allowSubmit,\n this.props.questionActions\n );\n }\n });\n this.setState({\n listsOfItems,\n isPlaceholderVisible: true\n });\n };\n\n moveElementsBetweenLists = (source: any, destination: any) => {\n const results = this.move(\n this.getList(source.droppableId),\n this.getList(destination.droppableId),\n source,\n destination\n );\n\n this.setState({\n listsOfItems: results\n });\n\n this.props.moveItem(\n this.state.listsOfItems,\n this.props.id,\n this.props.actions,\n this.props.allowSubmit,\n this.props.questionActions\n );\n };\n\n onDragEnd = (result: any) => {\n // dropped outside the list\n const { isMultipleList } = this.props;\n const { destination, source } = result;\n this.setState({\n droppableWidth: DROPPABLE_WIDTH\n });\n if (!destination) {\n if (isMultipleList) {\n this.setDisableDroppableArea(source.droppableId);\n }\n return;\n }\n if (source.droppableId === destination.droppableId) {\n if (!isMultipleList) {\n this.reorderElementsPosition(result);\n }\n } else {\n this.moveElementsBetweenLists(source, destination);\n }\n };\n\n onDragUpdate = (result: any) => {\n const { destination, source } = result;\n\n this.setState({\n isPlaceholderVisible: !destination || destination.index === source.index\n });\n\n if (!this.props.isMultipleList) {\n this.setNumericListHeights(destination, source);\n }\n };\n\n onDragStart = (result: any) => {\n const { source } = result;\n const resultArr: any[] = Array.from(this.state.listsOfItems);\n\n resultArr.forEach((list: any, index: any) => {\n if (list.id === source.droppableId) {\n resultArr[index].isDropDisabled = false;\n }\n });\n\n this.setState({\n listsOfItems: resultArr,\n droppableWidth: this.customRefs[result.draggableId].offsetWidth\n });\n };\n\n setDraggableWidth = (itemId: any) => {\n if (this.customRefs[itemId]) {\n this.setState({\n droppableWidthInvisible: this.customRefs[itemId].offsetWidth\n });\n }\n };\n\n setNumericListHeights(destination: any, source?: any) {\n const { listsOfItems } = this.state;\n const draggableList = listsOfItems[0].items.slice();\n const numericListHeights: any[] = [];\n const reorderedItems = !destination\n ? draggableList\n : this.reorder(draggableList, source.index, destination.index);\n\n reorderedItems.forEach((item: any) => {\n numericListHeights.push(this.customRefs[item.id].offsetHeight + 10);\n });\n this.setState({\n numericListHeights\n });\n }\n\n setRef(itemId: any, ref: any, refsArray: any) {\n refsArray[itemId] = ref;\n }\n\n resetListOfItems = () => {\n const { getPositionDependingImageScale } = this.props;\n if (getPositionDependingImageScale) {\n this.setState({\n listsOfItems: getPositionDependingImageScale(\n this.imageRefs.background,\n this.getDropspotsPosition(),\n this.props.listsOfItems\n )\n });\n }\n };\n\n getDropspotsPosition = () => {\n const { dropspots = [] } = this.props;\n return dropspots.reduce((dropspotsPosition, dropspot) => {\n dropspotsPosition[dropspot.id] = { y: dropspot.y, x: dropspot.x };\n return dropspotsPosition;\n }, []);\n };\n\n componentDidUpdate(previousProps: DragDropProps, previousState: DragDropState) {\n if (!this.state.numericListHeights.length && !this.props.isMultipleList) {\n this.setNumericListHeights(false);\n }\n if (previousState.retries !== this.state.retries && this.props.isMultipleList) {\n this.resetListOfItems();\n }\n if (previousState.isAnswered !== this.state.isAnswered) {\n this.setState({\n listsOfItems: this.props.listsOfItems\n });\n }\n }\n\n render() {\n const {\n listsOfItems,\n isPlaceholderVisible,\n numericListHeights,\n droppableWidth,\n droppableWidthInvisible\n } = this.state;\n const {\n isMultipleList,\n background = '',\n isImageLoaded = false,\n isImageNotFound = false\n } = this.props;\n const listsOfItemsArr = Array.from(cloneDeep(listsOfItems));\n const nonSelected = listsOfItemsArr.shift();\n const props = {\n nonSelected,\n isMultipleList,\n droppableWidth,\n droppableWidthInvisible,\n isImageLoaded,\n isImageNotFound,\n numericListHeights,\n isPlaceholderVisible\n };\n return (\n \n
{this.getDroppableElement(nonSelected, props)}
\n {isMultipleList && (\n \n {!isImageNotFound &&\n listsOfItemsArr.map(listItem => this.getDroppableElement(listItem, props))}\n {background && !isImageLoaded && }\n this.setRef('background', ref, this.imageRefs)}\n onLoad={() =>\n this.props.handleImageLoaded &&\n this.props.handleImageLoaded(this.imageRefs.background, this.state.listsOfItems)\n }\n alt={localize('[drag and drop question image]')}\n />\n \n )}\n \n );\n }\n\n getDroppableElement(listItem: any, props: any) {\n return (\n \n {(listProvided: any) => (\n \n {listItem.position && }\n {!props.isMultipleList && }\n \n {listItem.items.map((item: any, index: any) => (\n \n {(provided, snapshot) => (\n this.setDraggableWidth(item.id)}\n isMultipleList={props.isMultipleList}\n isPlaceholderVisible={props.isPlaceholderVisible}\n isDragging={snapshot.isDragging}\n ref={provided.innerRef}\n {...provided.draggableProps}\n {...provided.dragHandleProps}\n style={this.getItemStyle(provided.draggableProps.style)}\n tabIndex={0}\n title={item.text}\n >\n this.setRef(item.id, ref, this.customRefs)}\n dangerouslySetInnerHTML={{ __html: item.text ? item.text : ` ` }}\n />\n \n )}\n \n ))}\n \n {listProvided.placeholder}\n \n )}\n \n );\n }\n}\n\nexport default DragDrop;\n","export { default } from './DragDrop';\n","import styled from 'styled-components';\nimport { transparentize } from 'utils/color';\n\ntype ProgressContainerProps = {\n height: number;\n};\nexport const ProgressContainer = styled.div`\n position: relative;\n width: 100%;\n height: ${props => (props.height ? props.height : 2)}px;\n`;\n\ntype ProgressProps = {\n progress: number;\n progressColor: string;\n opacity: any;\n};\nexport const Progress = styled.div`\n height: 100%;\n width: ${props => (props.progress ? props.progress : 0)}%;\n background-color: ${props =>\n transparentize(props.theme.colors[props.progressColor], props.opacity)};\n border-radius: inherit;\n transition: width 0.2s;\n`;\n","import React from 'react';\nimport { ProgressContainer, Progress } from './ProgressBar.styled';\n\nexport const MAX_PROGRESS = 100;\n\ntype ProgressBarProps = {\n height?: number;\n progress?: number;\n className?: string;\n children?: any;\n progressColor?: string;\n opacity?: any;\n};\n\nexport const ProgressBar = ({\n height = 2,\n progress = 0,\n className = '',\n opacity = 1,\n children,\n progressColor = 'correctColor'\n}: ProgressBarProps) => (\n \n MAX_PROGRESS ? MAX_PROGRESS : progress}\n opacity={opacity}\n />\n {children}\n \n);\n\nexport default ProgressBar;\n","export { default } from './ProgressBar';\n","import styled, { css } from 'styled-components';\nimport { transparentize } from 'utils/color';\nimport { LINK } from 'constants/components';\nimport buttonDefaultStyle from 'components/mixins/normalize';\nimport { secondaryFont } from 'components/mixins/typography';\n\ntype LinkElementProps = {\n 'data-test': string;\n href: string;\n layout: string;\n size: number;\n theme: any;\n opacity: number;\n tabIndex: number;\n};\n\nconst LinkElement = styled.a.attrs((props: LinkElementProps) => ({\n href: props.href,\n tabIndex: props.tabIndex,\n 'data-test': props['data-test']\n}))`\n ${buttonDefaultStyle};\n text-decoration: underline;\n padding: 0;\n &:focus {\n outline: none;\n }\n ${(props: LinkElementProps) =>\n props.layout === LINK.LAYOUT.FORM &&\n css`\n ${secondaryFont};\n color: ${transparentize(props.theme.colors.textColor, props.opacity)};\n font-weight: normal;\n font-size: ${props.size}px;\n &:hover {\n color: ${props.theme.colors.textColor};\n }\n &:focus {\n color: ${props.theme.colors.textColor};\n outline: 1px solid black;\n }\n &:focus:not(:focus-visible) {\n outline: none;\n }\n `};\n ${props =>\n props.layout === LINK.LAYOUT.DEFAULT &&\n css`\n color: ${props.theme.colors.textColor};\n `};\n`;\n\nexport default LinkElement;\n","import * as React from 'react';\nimport { LINK } from 'constants/components';\nimport { SECTIONS_PATH } from 'constants/navigation';\nimport LinkElement from './Link.styled';\n\nexport interface LinkProps {\n text?: string;\n size?: number;\n layout?: string;\n onClick(): void;\n onBlur?(): void;\n href?: string;\n opacity?: number;\n tabIndex?: number;\n}\n\nexport const Link = (props: LinkProps) => {\n const {\n onClick,\n onBlur,\n text,\n layout = LINK.LAYOUT.DEFAULT,\n href = `#${SECTIONS_PATH}`,\n size = 13,\n opacity = 0.4,\n tabIndex = 0,\n ...restProps\n } = props;\n return (\n {\n event.preventDefault();\n onClick();\n }}\n onKeyPress={(event: any) => {\n event.preventDefault();\n onClick();\n }}\n layout={layout}\n href={href}\n size={size}\n opacity={opacity}\n tabIndex={tabIndex}\n {...restProps}\n >\n {text}\n \n );\n};\n\nexport default Link;\n","export { default } from './Link';\n","import styled from 'styled-components';\nimport { transparentize } from 'utils/color';\nimport * as typography from 'components/mixins/typography';\nimport media from 'components/mixins/media';\n\nexport default styled.input`\n min-width: 210px;\n max-width: 280px;\n min-height: 40px;\n padding: 0 20px 0 13px;\n margin: 0 8px;\n border: 1px solid transparent;\n border-radius: 2px;\n box-shadow: inset 0 2px 0 0 ${props => transparentize(props.theme.colors.textColor, 0.08)};\n background-color: ${props => transparentize(props.theme.colors.textColor, 0.02)};\n color: ${props => props.theme.colors.textColor};\n ${typography.secondaryFontText};\n white-space: nowrap;\n word-wrap: normal;\n outline: none;\n overflow: hidden;\n text-overflow: ellipsis;\n text-overflow: ellipsis ellipsis; // fix for firefox\n transition: all 0.1s ease-out;\n \n &:hover,\n &:focus {\n box-shadow: inset 0 2px 0 0 ${props => transparentize(props.theme.colors.textColor, 0.05)};\n border: 1px solid ${props => transparentize(props.theme.colors.mainColor, 0.7)};\n background-color: ${props => props.theme.colors.contentBodyColor};\n outline: none;\n }\n &:active {\n box-shadow: inset 0 2px 0 0 ${props => transparentize(props.theme.colors.textColor, 0.05)};\n border: 1px solid ${props => transparentize(props.theme.colors.mainColor, 0.7)};\n background-color: ${props => props.theme.colors.contentBodyColor};\n }\n\n &::placeholder {\n color: ${props => transparentize(props.theme.colors.textColor, 0.5)};\n }\n\n ${media.xsmall`\n max-width: 100%;\n width: 100%;\n `};\n}`;\n","import * as React from 'react';\nimport Input from './TextInput.styled';\n\ntype TextInputProps = {\n name: string,\n maxLength: number,\n value: string,\n tabIndex: number,\n alt: string,\n placeholder: string,\n onChange?(e?: any): void;\n onBlur?(e?: any): void;\n disabled: boolean;\n};\n\ntype TextInputState = {\n value: any;\n}\nexport class TextInput extends React.Component {\n\n constructor(props: TextInputProps) {\n super(props);\n this.state = {\n value: this.props.value\n };\n }\n\n static defaultProps = {\n alt: 'Input value please',\n placeholder: 'Type your answer',\n maxLength: 255\n };\n\n onChangeHandler = (event: any) => {\n this.setState({ value: event.target.value });\n };\n\n componentDidUpdate(prevProps: TextInputProps) {\n if (this.props.value !== prevProps.value) {\n this.setState({ value: this.props.value });\n }\n }\n\n render() {\n const { maxLength, alt, placeholder, tabIndex, onBlur, name, disabled } = this.props;\n const { value } = this.state;\n\n return (\n \n );\n }\n}\n\nexport default TextInput;\n","export { default } from './TextInput';\n","import styled from 'styled-components';\nimport media from 'components/mixins/media';\nimport { transparentize } from 'utils/color';\nimport Text from 'components/common/Text';\nimport Icon from 'components/common/Icon';\n\nimport buttonDefaultStyle from 'components/mixins/normalize';\n\ntype CloseBtnWrapperProps = {\n tabIndex: number;\n ariaLabel: string;\n};\n\nexport const CloseBtnWrapper = styled.button.attrs((props: CloseBtnWrapperProps) => ({\n tabIndex: props.tabIndex,\n 'aria-label': props.ariaLabel\n}))`\n ${buttonDefaultStyle};\n position: absolute;\n top: 10px;\n right: 10px;\n border-radius: 100%;\n text-align: center;\n height: 70px;\n width: 70px;\n transition: background-color 0.2s linear;\n cursor: pointer;\n z-index: 2;\n color: #73899e;\n font-family: none;\n &:hover {\n background-color: ${props => transparentize(props.theme.colors.textColor, 0.1)};\n color: ${props => transparentize(props.theme.colors.textColor)};\n }\n`;\n\ntype CloseBtnIconProps = {\n size: number;\n name: string;\n};\n\nexport const CloseBtnIcon = styled(Icon)`\n font-size: 24px;\n`;\n\nexport const CloseBtnText = styled(Text)`\n display: block;\n padding-top: 6px;\n ${media.medium`\n display: none;\n `};\n color: #73899e;\n`;\n\nexport const DocumentContainer = styled.div`\n position: fixed;\n height: 100%;\n width: 100%;\n left: 0;\n top: 0;\n background-color: white;\n opacity: 0.99;\n z-index: 300;\n padding-bottom: 5%;\n ${media.mobile`\n padding-top: 20%;\n `};\n`;\n\nexport const Document = styled.div.attrs({\n 'data-test': 'pdf-document',\n tabIndex: 0\n})`\n height: 100%;\n width: 70%;\n margin-left: 15%;\n margin-top: 3%;\n overflow-y: scroll;\n overflow-x: hidden;\n\n .canvas-wrapper {\n border: 15px solid;\n border-top: 7.5px solid;\n border-bottom: 7.5px solid;\n border-color: ${props => transparentize(props.theme.colors.textColor)};\n ${media.mobile`\n border: 5px solid;\n border-top: 5px solid;\n border-bottom: 2.5px solid;\n `};\n }\n`;\n","import React, { useState, useEffect } from 'react';\nimport ReactDOM from 'react-dom';\nimport pdfjs from '@bundled-es-modules/pdfjs-dist';\nimport {\n CloseBtnIcon,\n CloseBtnText,\n CloseBtnWrapper,\n DocumentContainer,\n Document\n} from './PdfDocument.styled';\n\npdfjs.GlobalWorkerOptions.workerSrc = `//cdnjs.cloudflare.com/ajax/libs/pdf.js/${pdfjs.version}/pdf.worker.js`;\n\ntype PdfDocumentProps = {\n url: string;\n toggle(any: boolean): any;\n};\n\nexport const PdfDocument = (props: PdfDocumentProps) => {\n const onClick = () => {\n props.toggle(false);\n };\n\n const [pdfDocument, setPdfDocument] = useState();\n const rootDomElement: any = document.getElementById('root');\n\n useEffect(() => {\n pdfjs\n .getDocument({ url: props.url })\n .promise.then((loadedPdfDocument: any) => setPdfDocument(loadedPdfDocument));\n document.getElementById('the-canvas')?.parentElement?.focus();\n }, [props.url]);\n\n const renderPdf = async () => {\n const pages: any = [];\n for (let num = 1; num <= pdfDocument?.numPages; num++) {\n const page = await pdfDocument.getPage(num);\n pages.push(renderPage(page, num));\n }\n return Promise.all(pages);\n };\n\n (async () => {\n await renderPdf();\n })();\n\n const canvasContainer = document.getElementById('the-canvas');\n\n async function renderPage(page: any, pageNumber: number) {\n const viewport = page.getViewport({ scale: 3 });\n let canvas: any = document.getElementById(`canvas-${pageNumber}`);\n\n const canvasWrapper =\n document.getElementById(`canvas-wrapper-${pageNumber}`) || document.createElement('div');\n\n if (!canvas) {\n canvasWrapper.setAttribute('id', `canvas-wrapper-${pageNumber}`);\n canvasWrapper.classList.add('canvas-wrapper');\n canvas = document.createElement('canvas');\n canvas.setAttribute('id', `canvas-${pageNumber}`);\n }\n\n canvas.style.height = window.innerHeight;\n canvas.style.width = `${window.innerWidth * 0.66}px`;\n\n const ctx = canvas.getContext('2d');\n const renderContext = {\n canvasContext: ctx,\n viewport\n };\n canvas.height = viewport.height;\n canvas.width = viewport.width;\n canvasWrapper.appendChild(canvas);\n if (canvasContainer) {\n canvasContainer.appendChild(canvasWrapper);\n }\n return page.render(renderContext);\n }\n\n const popupPdf = (\n \n \n
\n
\n \n \n Esc \n \n
\n );\n\n return ReactDOM.createPortal(popupPdf, rootDomElement);\n};\n\nexport default PdfDocument;\n","export { default } from './PdfDocument';\n","import styled from 'styled-components';\nimport { transparentize } from 'utils/color';\nimport { reviewFontText } from 'components/mixins/reviewTypography';\nimport { transition } from 'components/mixins/interactivity';\nimport buttonDefaultStyle from 'components/mixins/normalize';\nimport media from 'components/mixins/media';\n\nexport const HintWrapper = styled.div`\n ${reviewFontText}\n`;\n\nexport const HintContainer = styled.div`\n display: flex;\n align-items: center;\n width: 315px;\n padding: 19px 17px 17px 21px;\n\n ${media.mobile`\n width: 300px;\n `}\n`;\n\nexport const HintElementsContainer = styled.div`\n width: 164px;\n margin-right: 24px;\n font-size: 12px;\n font-weight: 600;\n line-height: 1.42;\n text-align: left;\n`;\n\nexport const HintButton = styled.button`\n ${buttonDefaultStyle};\n justify-self: flex-end;\n max-height: 32px;\n background: #4caf50;\n border-radius: 16px;\n padding: 11px 24px;\n color: #fff;\n font-size: 11px;\n line-height: 11px;\n cursor: pointer;\n box-shadow: 0 2px 8px 0 ${transparentize('#000000', 0.2)};\n ${transition(0.3)};\n\n &:hover {\n background: #46a14a;\n }\n`;\n","import * as React from 'react';\nimport { localize } from 'core/localization';\nimport { Tooltip } from 'components/common';\nimport { HINT_FOR_SPOT_COMMENT, HINT_FOR_GENERAL_COMMENT } from 'constants/review';\nimport { HintWrapper, HintContainer, HintButton, HintElementsContainer } from './Hint.styled';\n\ntype HintProps = {\n children: any;\n isExpanded: boolean;\n hintElements: any;\n hintName: string;\n position: any;\n};\n\ntype HintState = {\n isExpanded: boolean;\n}\n\nexport class Hint extends React.PureComponent {\n constructor(props: HintProps) {\n super(props);\n this.state = {\n isExpanded: this.props.isExpanded\n };\n }\n\n static defaultProps = {\n children: null,\n isExpanded: true,\n hintElements: null,\n hintName: ''\n };\n\n componentWillMount() {\n const { hintName } = this.props;\n if (hintName) {\n this.setState({\n isExpanded: !localStorage.getItem(hintName) || false\n });\n }\n this.showReviewHints(hintName);\n }\n\n componentDidUpdate(prevProps: HintProps) {\n const { isExpanded, hintName } = this.props;\n if (isExpanded !== prevProps.isExpanded) {\n this.setState({\n isExpanded\n });\n }\n this.hintShowOnce(hintName);\n }\n\n hintShowOnce = (hintName: any) => {\n if (hintName) {\n localStorage.setItem(hintName, true as any);\n this.setState({\n isExpanded: !localStorage.getItem(hintName)\n });\n }\n };\n\n showReviewHints = (hintName: any) => {\n if (hintName === HINT_FOR_GENERAL_COMMENT) {\n this.setState({\n isExpanded: false\n });\n if (\n localStorage.getItem(HINT_FOR_SPOT_COMMENT) &&\n !localStorage.getItem(HINT_FOR_GENERAL_COMMENT)\n ) {\n this.setState({\n isExpanded: true\n });\n }\n }\n };\n\n closePopover = (event: any) => {\n event.preventDefault();\n const { isExpanded } = this.state;\n const { hintName } = this.props;\n this.setState({\n isExpanded: !isExpanded\n });\n\n this.hintShowOnce(hintName);\n };\n\n render() {\n const { isExpanded } = this.state;\n const { hintElements, children, position } = this.props;\n return (\n \n \n {hintElements}\n {localize('[got it]')}\n \n \n }\n >\n {children}\n \n );\n }\n}\n\nexport default Hint;\n","import uuidv4 from 'uuid/v4';\nimport deepmerge from 'deepmerge';\n\ntype ObjType = { [key: string]: any };\n\nexport function renameProperty(obj: ObjType, currPropName: string, newPropName: string) {\n const modifiedObj: ObjType = obj || {};\n\n modifiedObj[newPropName] = modifiedObj[currPropName];\n delete modifiedObj[currPropName];\n}\n\nexport function guid() {\n return uuidv4().replace(/[-]/g, '');\n}\n\nexport function guidWithHyphens() {\n return uuidv4();\n}\n\nexport function toggleArrayElement(array: any[], element: any): any[] {\n const index = array.indexOf(element);\n if (index !== -1) {\n array.splice(index, 1);\n } else {\n array.push(element);\n }\n return array;\n}\n\nexport function toggleArrayStatementElement(array: any[], element: any): any[] {\n const index = array.indexOf(element);\n if (index !== -1) {\n array.splice(index, 1);\n }\n if (\n array.some(e => e.id === element.id) &&\n array.find(s => s.id === element.id).hasOwnProperty('isCorrect')\n ) {\n array.find(s => s.id === element.id).isCorrect = element.isCorrect;\n } else {\n array.push(element);\n }\n return array;\n}\n\nexport function objectToArray(value: ObjType): any[] {\n return Object.keys(value).reduce((acc: any[], item: string) => {\n acc.push(value[item]);\n return acc;\n }, []);\n}\n\nfunction overwriteMerge(destinationArray: any[], sourceArray: any[]): any[] {\n return sourceArray.filter((item: any) => item != null);\n}\n\nexport function deepMerge(obj1: ObjType, obj2: ObjType): object {\n if (Object.keys(obj2).length === 0) {\n return obj1;\n }\n return deepmerge(obj1, obj2, {\n arrayMerge: overwriteMerge\n });\n}\n\nexport function isArray(item: any): boolean {\n return item && item.constructor && item.constructor === Array;\n}\n\nexport function isObject(item: any): boolean {\n return item && item.constructor && item.constructor === Object;\n}\n\nexport function isEmptyObject(item: any): boolean {\n return isObject(item) && Object.keys(item).length === 0;\n}\n\nexport function deepExtend(destination: any, source: any): any {\n if (destination === null || destination === undefined) {\n return source;\n }\n\n for (const property in source) {\n if (source[property] && (isObject(source[property]) || isArray(source[property]))) {\n if (\n (destination.hasOwnProperty(property) && hasInternalObjectsOrArrays(source[property])) ||\n (!isArray(destination) &&\n !isArray(source) &&\n isObject(destination[property]) &&\n isObject(source[property]) &&\n !hasSameNumbersOfKeys(destination[property], source[property]))\n ) {\n deepExtend(destination[property], source[property]);\n } else {\n if (isArray(destination)) {\n const { index, deleteNumber } = getItemPositionValues(destination, source[property].key);\n destination.splice(index, deleteNumber, source[property]);\n continue;\n }\n\n destination[property] = source[property];\n }\n } else {\n destination[property] = source.hasOwnProperty(property)\n ? source[property]\n : destination[property];\n }\n }\n return destination;\n}\n\nexport function hasInternalObjectsOrArrays(object: ObjType): boolean {\n let counter = 0;\n for (const property in object) {\n if (object[property] && (isObject(object[property]) || isArray(object[property]))) {\n counter++;\n }\n }\n return counter > 0;\n}\n\nexport function hasSameNumbersOfKeys(destinationObj: ObjType, sourceObj: ObjType): boolean {\n return Object.keys(destinationObj).length === Object.keys(sourceObj).length;\n}\n\ntype ReplacedItem = {\n index: number;\n deleteNumber: number;\n};\n\nfunction getItemPositionValues(destination: any, sourceKey: any): ReplacedItem {\n const index = destination.findIndex((item: any) => item.key === sourceKey);\n const shouldReplaceItem = index !== -1;\n\n return {\n index: shouldReplaceItem ? index : destination.length,\n deleteNumber: shouldReplaceItem ? 1 : 0\n };\n}\n\nexport function arrayToObject(array: any[]): ObjType {\n return array.reduce((accum: ObjType, [k, v]: [string, any]) => {\n accum[k] = v;\n return accum;\n }, {});\n}\n","import {\n MULTIPLE_CHOICE,\n SINGLE_CHOICE,\n SINGLE_CHOICE_IMAGE,\n STATEMENT_CHOICE,\n OPEN_QUESTION,\n RANKING_TEXT,\n SCENARIO,\n FILL_IN_THE_BLANK,\n DRAG_AND_DROP_TEXT,\n TEXT_MATCHING,\n HOTSPOT\n} from 'constants/questionTypes';\nimport { MEDIA_TABLET } from 'constants/screenResolutions';\nimport { isLowerResolution } from 'utils/window';\nimport { ProgressStatus } from 'constants/progressStatus';\nimport { RootAppState } from './types';\nimport { TimerStatus } from 'constants/timer';\n\nconst state: RootAppState = {\n app: {\n isLoading: true,\n isLoaded: false,\n isLoadingFailed: false,\n isLowResolution: false,\n isOffline: false\n },\n course: {\n sections: [],\n title: '',\n id: '',\n templateId: '',\n createdBy: '',\n createdOn: new Date(),\n hasIntroductionContent: false,\n isLoadingFailed: false,\n attemptId: null,\n hasBeenContinued: false,\n result: 0,\n isCompleted: false,\n isCertificateDownloaded: false,\n score: 0,\n status: ProgressStatus.IN_PROGRESS,\n passedAfterwords: [],\n failedAfterwords: [],\n isAttemptSubmitted: false,\n courseAttempt: 0,\n isLaunched: false,\n isProgressRestoreFailed: false,\n isProgressRestoreFetched: false,\n timeSpent: {\n accumulatedValueInMilliseconds: 0,\n incrementStartedAt: new Date()\n },\n isRandomizedOptionsLoaded: false,\n isCourseFinished: false\n },\n timer: {\n status: TimerStatus.NOT_STARTED,\n elapsed: 0\n },\n modules: {\n xapi: {\n isInitialized: false,\n isLrsTrackingOn: false,\n isNpsTrackingOn: false\n },\n scorm: {\n isInitialized: false\n },\n progressStorage: {\n isProgressStorageOn: false\n },\n review: {\n isReviewModeEnabled: false,\n reviewApiUrl: ''\n },\n lti: {\n isInitialized: false\n }\n },\n sections: {},\n questions: {},\n contents: {},\n settings: {\n isLoadingFailed: false,\n template: {},\n publish: {},\n manifest: {},\n translations: {},\n publishMode: {},\n materialType: ''\n },\n navigation: {\n chain: [],\n prevUrl: null,\n elementIdInViewport: ''\n },\n treeOfContent: {\n isExpanded: true,\n isSubmitButtonVisible: false\n },\n popup: {\n isExpanded: false,\n settings: {}\n },\n loader: {\n isLoaded: false\n },\n user: {\n account: null,\n email: '',\n name: '',\n shortTermAccess: true,\n authorizationSkipped: false\n },\n resource: {\n id: '',\n resourceType: '',\n title: '',\n createdBy: '',\n createdOn: new Date(),\n contentId: '',\n resourceContents: []\n },\n checklist: {}\n};\n\nexport default state;\n\nexport function initialize() {\n if (isLowerResolution(MEDIA_TABLET)) {\n state.treeOfContent.isExpanded = false;\n }\n}\n\nexport function getInitialQuestionResponse(questionType: string) {\n switch (questionType) {\n case SINGLE_CHOICE:\n case SINGLE_CHOICE_IMAGE:\n case MULTIPLE_CHOICE:\n case STATEMENT_CHOICE:\n case OPEN_QUESTION:\n case RANKING_TEXT:\n case SCENARIO:\n case FILL_IN_THE_BLANK:\n case DRAG_AND_DROP_TEXT:\n case TEXT_MATCHING:\n case HOTSPOT:\n return [];\n default:\n return null;\n }\n}\n","import progressStorage from 'core/progressStorage';\nimport { isMeaningful as isMeaningfulString } from 'utils/string';\nimport {\n isCrossDeviceSavingEnabled,\n isTrackingEnabled,\n isPublishMode\n} from '../settings/selectors';\nimport { RootAppState } from 'store/types';\n\nexport const getUser = (state: RootAppState) => state.user;\n\nexport const getEmail = (state: RootAppState) => state.user.email;\n\nexport const getName = (state: RootAppState) => state.user.name;\n\nexport const getAccount = (state: RootAppState) => state.user.account;\n\nexport const isAnonymous = (state: RootAppState) => !!state.user.authorizationSkipped;\n\nexport const isIntroduced = (state: RootAppState) => isMeaningfulString(getEmail(state));\n\nexport const shouldSaveCrossDevice = (state: RootAppState) =>\n isCrossDeviceSavingEnabled(state) && !isAnonymous(state);\n\nexport const isAuthenticated = (state: RootAppState) =>\n progressStorage.isAuthenticated() ||\n (!isCrossDeviceSavingEnabled(state) && isAnonymous(state)) ||\n (!isCrossDeviceSavingEnabled(state) && isTrackingEnabled(state) && isIntroduced(state)) ||\n isAnonymous(state) ||\n !isPublishMode(state) ||\n !isTrackingEnabled(state);\n\nexport const isAuthorized = (state: RootAppState) => isAuthenticated(state) && !isAnonymous(state);\n\nexport const getAvatarLetter = (state: RootAppState) =>\n (state.user.name && state.user.name[0]) || (state.user.email && state.user.email[0]);\n\nexport const getUserId = (state: RootAppState) => btoa(state.user?.email || '');\n","export enum ActionTypes {\n QUESTION_STATEMENT_ANSWER_IS_SELECTED = 'QUESTION_STATEMENT_ANSWER_IS_SELECTED'\n}\n\ntype AnswerIsSelected = {\n type: ActionTypes.QUESTION_STATEMENT_ANSWER_IS_SELECTED,\n payload: {\n questionId: string,\n answerId: string,\n isCorrect: boolean\n }\n}\n\nexport type StatementChoiceActionTypes = AnswerIsSelected;\n","export enum ActionTypes {\n OPEN_QUESTION_ANSWER_IS_SELECTED = 'OPEN_QUESTION_ANSWER_IS_SELECTED'\n}\n\ntype AnswerIsSelected = {\n type: ActionTypes.OPEN_QUESTION_ANSWER_IS_SELECTED,\n payload: {\n questionId: string,\n answeredText: string\n }\n}\n\nexport type OpenQuestionActionTypes = AnswerIsSelected;\n","export enum ActionTypes {\n QUESTION_RANKING_ANSWERS_ARE_SELECTED = 'QUESTION_RANKING_ANSWERS_ARE_SELECTED'\n}\n\ntype AnswersSelected = {\n type: ActionTypes.QUESTION_RANKING_ANSWERS_ARE_SELECTED,\n payload: {\n answers: any,\n questionId: string\n }\n}\n\nexport type RankingTextActionTypes = AnswersSelected;\n","export enum ProgressStatus {\n IN_PROGRESS = 0,\n PASSED = 1,\n FAILED = 2\n}\n\nexport enum CourseProgressStorageStatus {\n IN_PROGRESS = 'IN_PROGRESS',\n PASSED = 'PASSED',\n FAILED = 'FAILED'\n}\n","export enum ActionTypes {\n QUESTION_SCENARIO_BRANCHTRACK_DATA = 'QUESTION_SCENARIO_BRANCHTRACK_DATA'\n}\n\ntype ScenarioBranchTrackData = {\n type: ActionTypes.QUESTION_SCENARIO_BRANCHTRACK_DATA,\n payload: {\n score: number,\n isFinished: boolean,\n questionId: string\n }\n}\n\nexport type ScenarioActionTypes = ScenarioBranchTrackData;\n","export enum ActionTypes {\n FILL_IN_THE_BLANK_ANSWER = 'FILL_IN_THE_BLANK_ANSWER'\n}\n\ntype QuestionAnswer = {\n type: ActionTypes.FILL_IN_THE_BLANK_ANSWER,\n payload: {\n questionId: string,\n data: any\n }\n}\n\nexport type FillInTheBlankActionTypes = QuestionAnswer;\n","export enum ActionTypes {\n QUESTION_DRAG_AND_DROP_ANSWERS_ARE_SELECTED = 'QUESTION_DRAG_AND_DROP_ANSWERS_ARE_SELECTED'\n}\n\ntype AnswerSelected = {\n type: ActionTypes.QUESTION_DRAG_AND_DROP_ANSWERS_ARE_SELECTED,\n payload: {\n answers: any,\n questionId: string\n }\n}\n\nexport type DragAndDropActionTypes = AnswerSelected;\n","export enum ActionTypes {\n HOTSPOT_QUESTION_ANSWER = 'HOTSPOT_QUESTION_ANSWER'\n}\n\ntype QuestionAnswer = {\n type: ActionTypes.HOTSPOT_QUESTION_ANSWER,\n payload: {\n data: any,\n questionId: string\n }\n}\n\nexport type HotspotActionTypes = QuestionAnswer;\n","export enum ActionTypes {\n QUESTION_MATCHING_ANSWERS_ARE_SELECTED = 'QUESTION_MATCHING_ANSWERS_ARE_SELECTED'\n}\n\ntype AnswersSelected = {\n type: ActionTypes.QUESTION_MATCHING_ANSWERS_ARE_SELECTED,\n payload: {\n answers: any,\n questionId: string\n }\n}\n\nexport type TextMatchingActionTypes = AnswersSelected;\n","import { getQuestion } from 'store/questions/selectors';\nimport { isRandomizeAnswersEnabled } from 'store/settings/selectors';\nimport { RootAppState } from 'store/types';\n\nexport const getUserAnswers = (state: RootAppState, questionId: string) => {\n const question = getQuestion(state, questionId);\n const randomizeAnswersEnabled = isRandomizeAnswersEnabled(state);\n const { answers: options, randomizedOptions = [] } = question;\n const answers = randomizeAnswersEnabled ? randomizedOptions : options;\n\n return answers.map((answer: any) => {\n const responseAnswer = question.response.find((r: any) => r.id === answer.id);\n return {\n id: answer.id,\n isCorrect: answer.isCorrect,\n text: answer.text,\n userSelected: !!responseAnswer, // Fix for undefined\n isTrue: responseAnswer ? responseAnswer.isCorrect : false\n };\n });\n};\n\nexport const getScore = (state: RootAppState, question: any) => {\n const originalAnswers = question.answers.map((answer: any) => ({\n id: answer.id,\n isCorrect: answer.isCorrect\n }));\n const userAnswers = question.response.map((answer: any) => ({\n id: answer.id,\n isCorrect: answer.isCorrect\n }));\n\n originalAnswers.sort(compare);\n userAnswers.sort(compare);\n\n if (JSON.stringify(originalAnswers) === JSON.stringify(userAnswers)) {\n return 100;\n }\n return 0;\n};\n\nfunction compare(prev: any, next: any) {\n if (getStringHash(prev.id) > getStringHash(next.id)) {\n return -1;\n }\n return 1;\n}\n\nfunction getStringHash(text: string) {\n let hash = 0;\n let chr;\n if (text.length === 0) {\n return hash;\n }\n for (let index = 0; index < text.length; index++) {\n chr = text.charCodeAt(index);\n // eslint-disable-next-line\n hash = (hash << 5) - hash + chr;\n // eslint-disable-next-line\n hash |= 0; // Convert to 32bit integer\n }\n return hash;\n}\n","import { getQuestion } from 'store/questions/selectors';\nimport { RootAppState } from 'store/types';\n\nexport const getUserAnswers = (state: RootAppState, questionId: string) => {\n let question = getQuestion(state, questionId);\n const responseAnswer = question.response !== null ? question.response : '';\n return {\n id: question.id,\n answeredText: !responseAnswer ? '' : responseAnswer.answeredText // Fix for undefined\n };\n};\n\nexport const getScore = (state: RootAppState, question: any) => {\n const responseAnswer = question.response !== null ? question.response : ' ';\n if (responseAnswer && responseAnswer.answeredText) {\n return responseAnswer.answeredText.trim() ? 100 : 0;\n }\n return 0;\n};\n","import { getQuestion } from 'store/questions/selectors';\nimport { isRandomizeAnswersEnabled } from 'store/settings/selectors';\nimport { RootAppState } from 'store/types';\n\nexport const getUserAnswers = (state: RootAppState, questionId: string) => {\n const question = getQuestion(state, questionId);\n const randomizeAnswersEnabled = isRandomizeAnswersEnabled(state);\n const { answers: options, randomizedOptions = [] } = question;\n const answers = randomizeAnswersEnabled ? randomizedOptions : options;\n return answers.map((answer: any) => ({\n id: answer.id,\n text: answer.text\n }));\n};\n\nexport const getUserResponse = (state: RootAppState, questionId: string) => {\n const question = getQuestion(state, questionId);\n return question.response;\n};\n\nexport const getScore = (state: RootAppState, question: any) => {\n if (JSON.stringify(question.answers) === JSON.stringify(question.response)) {\n return 100;\n }\n return 0;\n};\n","export type QuestionsState = {\n [key: string]: any;\n};\nexport enum ActionTypes {\n QUESTIONS_LOADED = 'QUESTIONS_LOADED',\n QUESTION_UPDATE_SCORE = 'QUESTION_UPDATE_SCORE',\n QUESTION_ANSWERED = 'QUESTION_ANSWERED',\n QUESTION_ANSWERED_BEFORE_SUBMIT = 'QUESTION_ANSWERED_BEFORE_SUBMIT',\n QUESTION_PROGRESS_RESET = 'QUESTION_PROGRESS_RESET',\n QUESTION_PROGRESS_RESET_KEEP_ANSWER = 'QUESTION_PROGRESS_RESET_KEEP_ANSWER',\n QUESTION_PROGRESS_RESET_ATTEMPT = 'QUESTION_PROGRESS_RESET_ATTEMPT',\n QUESTION_OPENED = 'QUESTION_OPENED',\n QUESTION_PROGRESS_RESTORE = 'QUESTION_PROGRESS_RESTORE',\n QUESTION_RESTORE_RESPONSE = 'QUESTION_RESTORE_RESPONSE',\n QUESTION_RESTORE_SHOW_PREV_ANSWER = 'QUESTION_RESTORE_SHOW_PREV_ANSWER',\n FEEDBACK_ANIMATING = 'FEEDBACK_ANIMATING',\n QUESTION_UPDATE_RETRY = 'QUESTION_UPDATE_RETRY'\n}\n\ntype QuestionLoaded = {\n type: ActionTypes.QUESTIONS_LOADED;\n payload: {\n questions: any; // TODO: add type\n };\n};\n\ntype QuestionAnswered = {\n type: ActionTypes.QUESTION_ANSWERED;\n payload: {\n id: string;\n score: number;\n attempt: number;\n };\n};\n\ntype QuestionAnsweredBeforeSubmit = {\n type: ActionTypes.QUESTION_ANSWERED_BEFORE_SUBMIT;\n payload: {\n id: string;\n attempt: number;\n };\n};\n\ntype QuestionUpdateScore = {\n type: ActionTypes.QUESTION_UPDATE_SCORE;\n payload: {\n id: string;\n score: number;\n };\n};\n\ntype QuestionOpened = {\n type: ActionTypes.QUESTION_OPENED;\n payload: {\n hasBeenOpened: boolean;\n questionId: string;\n };\n};\n\ntype QuestionProgressReset = {\n type: ActionTypes.QUESTION_PROGRESS_RESET;\n payload: {\n id: string;\n isPoolQuestion: boolean;\n type: string;\n };\n};\n\ntype QuestionProgressResetKeepAnswer = {\n type: ActionTypes.QUESTION_PROGRESS_RESET_KEEP_ANSWER;\n payload: {\n id: string;\n };\n};\n\ntype QuestionProgressResetAttempt = {\n type: ActionTypes.QUESTION_PROGRESS_RESET_ATTEMPT;\n payload: {\n id: string;\n };\n};\n\ntype QuestionRestoreResponse = {\n type: ActionTypes.QUESTION_RESTORE_RESPONSE;\n payload: {\n id: string;\n response: any;\n attempt: number;\n };\n};\n\ntype QuestionRestoreShowPrevAnswer = {\n type: ActionTypes.QUESTION_RESTORE_SHOW_PREV_ANSWER;\n payload: {\n id: string;\n response: any;\n };\n};\n\ntype QuestionProgressRestore = {\n type: ActionTypes.QUESTION_PROGRESS_RESTORE;\n payload: {\n id: string;\n score: number;\n attempt: number;\n };\n};\n\ntype FeedbackAnimating = {\n type: ActionTypes.FEEDBACK_ANIMATING;\n payload: {\n id: string;\n isFeedbackAnimating: boolean;\n };\n};\n\ntype QuestionUpdateRetry = {\n type: ActionTypes.QUESTION_UPDATE_RETRY;\n payload: {\n questionId: string;\n retries: number;\n };\n};\n\nexport type QuestionActionTypes =\n | FeedbackAnimating\n | QuestionOpened\n | QuestionLoaded\n | QuestionAnswered\n | QuestionUpdateScore\n | QuestionAnsweredBeforeSubmit\n | QuestionProgressReset\n | QuestionProgressResetKeepAnswer\n | QuestionProgressResetAttempt\n | QuestionRestoreResponse\n | QuestionRestoreShowPrevAnswer\n | QuestionProgressRestore\n | QuestionUpdateRetry;\n","import { getQuestion } from 'store/questions/selectors';\nimport { RootAppState } from 'store/types';\n\nexport const getEmbedCode = (state: RootAppState, questionId: string) => {\n const question = getQuestion(state, questionId);\n return question.embedCode;\n};\n\nexport const getProjectId = (state: RootAppState, questionId: string) => {\n const question = getQuestion(state, questionId);\n return question.projectId;\n};\n\nexport const getUserAnswers = (state: RootAppState, questionId: string) => {\n let question = getQuestion(state, questionId);\n const responseAnswer = question.response !== null ? question.response : '';\n return {\n score: !responseAnswer ? '' : responseAnswer.score,\n isFinished: !responseAnswer ? '' : responseAnswer.isFinished\n };\n};\n\nexport const getScore = (state: RootAppState, question: any) => {\n if (question.response.score >= question.masteryScore && question.response.isFinished) {\n return 100;\n }\n return 0;\n};\n","import { getQuestion } from 'store/questions/selectors';\nimport { objectToArray } from 'utils/object';\nimport { RootAppState } from '../../types';\n\nexport const getUserAnswers = (state: RootAppState, questionId: string) => {\n const question = getQuestion(state, questionId);\n const questionContent = objectToArray(state.contents).find(\n content => content.id === question.questionContent[0]\n );\n const userAnswers: { [key: string]: any } = {};\n const responseAnswer = question.response !== null ? question.response : [];\n question.answerGroups.forEach((answer: any) => {\n userAnswers[answer.id] =\n responseAnswer && responseAnswer.data ? responseAnswer.data[answer.id] : '';\n });\n return {\n id: question.id,\n questionContent,\n userAnswers\n };\n};\n\nexport const getScore = (state: RootAppState, question: any) => {\n const responseAnswer = question.response !== null ? question.response : [];\n const newAnswer = objectToArray(question.answerGroups).map(group =>\n responseAnswer.data\n ? responseAnswer.data.hasOwnProperty(group.id)\n ? group.answers.find((answer: any) =>\n answer.matchCase === true\n ? answer.text === responseAnswer.data[group.id] && answer.isCorrect === true\n : answer.text.toLowerCase() === responseAnswer.data[group.id].toLowerCase() &&\n answer.isCorrect === true\n )\n : null\n : 0\n );\n\n if (responseAnswer && responseAnswer.data) {\n if (newAnswer && !newAnswer.includes(undefined)) {\n return 100;\n }\n return 0;\n }\n return 0;\n};\n","import { getQuestion } from 'store/questions/selectors';\nimport { isRandomizeAnswersEnabled } from 'store/settings/selectors';\nimport { RootAppState } from 'store/types';\n\nexport const getUserAnswers = (state: RootAppState, questionId: string) => {\n const question = getQuestion(state, questionId);\n const randomizeAnswersEnabled = isRandomizeAnswersEnabled(state);\n const { answers: options, randomizedOptions = [] } = question;\n const answers = randomizeAnswersEnabled ? randomizedOptions : options;\n return answers.map((answer: any) => ({\n id: answer.id,\n key: answer.key,\n value: answer.value,\n selectedKey: ''\n }));\n};\n\nexport const getUserResponse = (state: RootAppState, questionId: string) => getQuestion(state, questionId).response;\n\nexport const getScore = (state: RootAppState, question: any) => {\n if (!question.response.length) return 0;\n for (let i = 0; i < question.response.length; i++) {\n const item = question.response[i];\n if (item.value !== item.shownSelectedValue) {\n return 0;\n }\n }\n\n return 100;\n};\n","import { getQuestion } from 'store/questions/selectors';\nimport { RootAppState } from '../../types';\n\nexport const getUserAnswers = (state: RootAppState, questionId: string) => {\n const question = getQuestion(state, questionId);\n const responseAnswer = question.response ? question.response : [];\n return {\n id: question.id,\n background: question.background,\n isMultiple: question.isMultiple,\n spots: question.spots.map((spot: any) => spot),\n markers: !responseAnswer.length ? [] : responseAnswer\n };\n};\n\nexport const getScore = (state: RootAppState, question: any) => {\n const responseAnswer = question.response !== null ? question.response : [];\n const answers: any[] = [];\n const correctMarkers: any[] = [];\n const { spots } = question;\n\n if (!question.spots.length) {\n return 100;\n }\n\n if (!responseAnswer.length) {\n return 0;\n }\n\n function markIsInSpot(mark: any, spot: any) {\n const { x } = mark;\n const { y } = mark;\n\n let inside = false;\n for (let i = 0, j = spot.length - 1; i < spot.length; j = i, i++) {\n const xi = spot[i].x;\n const yi = spot[i].y;\n const xj = spot[j].x;\n const yj = spot[j].y;\n\n // eslint-disable-next-line\n const intersect = yi > y !== yj > y && x < ((xj - xi) * (y - yi)) / (yj - yi) + xi;\n if (intersect) {\n inside = !inside;\n }\n }\n\n return inside;\n }\n\n for (let i = 0; i < spots.length; i++) {\n let isMarkerInsideInSpot = false;\n\n for (let k = 0; k < responseAnswer.length; k++) {\n if (markIsInSpot(responseAnswer[k], spots[i])) {\n if (!isMarkerInsideInSpot) {\n isMarkerInsideInSpot = true;\n answers.push(true);\n }\n correctMarkers.push(responseAnswer[k]);\n }\n }\n if (isMarkerInsideInSpot) {\n continue;\n }\n answers.push(false);\n }\n\n if (correctMarkers.length === responseAnswer.length) {\n if (question.isMultiple && answers.some(element => element === false)) {\n return 0;\n }\n return 100;\n }\n\n if (!question.background && !spots.length) {\n return 100;\n }\n\n return 0;\n};\n","import shuffle from 'lodash.shuffle';\n\nexport const shuffleAnswerOptions = (answerOptions: any[]): any[] => {\n if (answerOptions.length <= 1) {\n return answerOptions;\n }\n\n let shuffledArray = shuffle(answerOptions);\n let iterationCount = 0;\n\n const MAX_RETRIES = 10;\n\n while (\n JSON.stringify(shuffledArray) === JSON.stringify(answerOptions) &&\n iterationCount < MAX_RETRIES\n ) {\n iterationCount++;\n shuffledArray = shuffle(shuffledArray);\n }\n\n return shuffledArray;\n};\n\nexport default shuffleAnswerOptions;\n","import React from 'react';\nimport { IconElement, TextElement } from './Icon.styled';\n\ntype IconProps = {\n name: string;\n color?: any;\n opacity?: any;\n getColor?(): void;\n className?: string;\n size?: number;\n text?: string;\n fontSize?: number;\n shapeSize?: any;\n role?: string;\n ariaLabel?: string;\n tabIndex?: number;\n onKeyDown?: any;\n onClick?: any;\n theme?: { [key: string]: any };\n isBlur?: boolean;\n};\nexport const Icon = (props: IconProps) => {\n const {\n name = 'ok',\n className = 'buttonTextColor',\n text = '',\n fontSize = 2,\n size = 8,\n opacity = 1,\n ...other\n } = props;\n return (\n \n \n {text}\n \n
\n );\n};\n\nexport default Icon;\n","export { default } from './Icon';\n","import styled from 'styled-components';\nimport { Text } from 'components/common';\nimport buttonDefaultStyle from 'components/mixins/normalize';\nimport media from 'components/mixins/media';\nimport { transparentize } from 'utils/color';\n\nexport const TextElement = styled(Text)`\n && {\n font-weight: 300;\n font-size: 16px;\n color: ${props => props.theme.colors.buttonTextColor};\n }\n`;\n\nexport const Button = styled.button.attrs(props => ({\n tabIndex: props.tabIndex,\n 'data-test': 'button-vote'\n}))`\n ${buttonDefaultStyle};\n background-color: ${props => props.theme.colors.correctColor};\n border-radius: 2px;\n position: relative;\n display: flex;\n flex-flow: column nowrap;\n align-items: center;\n padding: 10px;\n width: 40px;\n height: 40px;\n cursor: pointer;\n overflow: visible;\n ${media.mobile`\n border-radius: 30px;\n width: 160px;\n height: 44px;\n flex-flow: row nowrap;\n justify-content: center;\n `};\n\n &::before {\n content: '';\n display: block;\n position: absolute;\n width: inherit;\n height: inherit;\n top: 0;\n left: 0;\n }\n &:hover::before {\n background: rgba(255, 255, 255, 0.1);\n }\n &:active::before {\n background: rgba(0, 0, 0, 0.1);\n }\n &:focus {\n outline: 1px solid black;\n background-color: ${props => props.theme.colors.correctColor};\n }\n &:focus:not(:focus-visible) {\n outline: none;\n }\n`;\n\nexport const TextLabel = styled(Text)`\n font-weight: normal;\n color: ${props => transparentize(props.theme.colors.textColor, 0.4)};\n position: relative;\n top: 30px;\n ${media.mobile`\n top: 0;\n color: ${(props: any) => props.theme.colors.buttonTextColor};\n font-weight: 600;\n margin-left: 10px;\n `};\n`;\n","import * as React from 'react';\nimport { localize } from 'core/localization';\nimport { TextElement, Button, TextLabel } from './ButtonVote.styled';\n\ntype ButtonVoteProps = {\n rating: number;\n ratingLabelKey: string;\n tabIndex: number;\n onClick(): void;\n};\n\nconst ButtonVote = ({ rating, ratingLabelKey, tabIndex, onClick }: ButtonVoteProps) => (\n \n);\n\nexport default ButtonVote;\n","import styled from 'styled-components';\nimport { Text } from 'components/common';\nimport media from 'components/mixins/media';\n\nexport const Figure = styled.div`\n margin: 200px 0 40px;\n text-align: center;\n ${media.mobile`\n display: none;\n `};\n`;\n\nexport const TextElement = styled(Text)`\n font-weight: bold;\n color: ${props => props.theme.colors.textColor};\n text-align: center;\n ${media.mobile`\n padding: 80px 35px 30px;\n`};\n`;\n\nexport const ButtonsListItem = styled.li`\n box-sizing: border-box;\n margin-right: 15px;\n &:last-child {\n margin-right: 0;\n }\n ${media.mobile`\n margin-right: 0;\n margin-bottom: 12px;\n `};\n`;\n\nexport const ButtonsListWrapper = styled.ul`\n display: flex;\n flex-flow: row nowrap;\n justify-content: center;\n margin-top: 30px;\n z-index: 1;\n ${media.mobile`\n flex-flow: column-reverse nowrap;\n align-items: center;\n `};\n`;\n\nexport const Wrapper = styled.div`\n flex-grow: 1;\n`;\n","import * as React from 'react';\nimport { localize } from 'core/localization';\nimport Trophy from 'assets/figures/Trophy';\nimport ButtonVote from '../buttonVote';\nimport {\n Figure,\n TextElement,\n ButtonsListItem,\n ButtonsListWrapper,\n Wrapper\n} from './EvaluateCourse.styled';\n\ntype EvaluateCourseProps = {\n onClick(data: any): void;\n};\n\ntype EvaluateCourseState = {\n npsScore: number;\n}\n\nexport class EvaluateCourse extends React.PureComponent {\n constructor(props: EvaluateCourseProps) {\n super(props);\n this.state = {\n npsScore: 0\n };\n }\n\n renderButtonsVote() {\n let items = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n return (\n \n {items.map(item => (\n \n this.props.onClick(item)}\n />\n \n ))}\n \n );\n }\n\n render() {\n return (\n \n
\n \n
\n \n {localize('[rate the course]')}\n \n {this.renderButtonsVote()}\n
\n );\n }\n}\n\n\nexport default EvaluateCourse;\n","import React from 'react';\nimport { withTheme } from 'styled-components';\nimport { transparentize } from 'utils/color';\nimport { localize } from 'core/localization';\nimport { Figure } from './Figure.styled';\n\ntype RateProps = {\n theme: {[key: string]: any};\n number: number;\n promoters: boolean;\n};\n\nexport const Rate = (props: RateProps) => (\n \n F19AC1D1-78C9-451F-BAEC-6A87EB3B013B\n Created with sketchtool.\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {props.number}\n \n \n \n \n \n \n);\n\nexport default withTheme(Rate);\n","import styled from 'styled-components';\nimport { Text } from 'components/common';\nimport media from 'components/mixins/media';\nimport { transparentize } from 'utils/color';\nimport { EditableContentWrapper } from 'components/common/EditableTextarea/EditableTextarea.styled'\n\nexport const Figure = styled.div`\n margin: 45px 0;\n`;\n\nexport const TextElement = styled(Text)`\n font-weight: bold;\n color: ${props => props.theme.colors.textColor};\n text-align: center;\n`;\n\nexport const FeedbackContainer = styled.div`\n margin-bottom: 40px;\n & ${TextElement} {\n margin: 0 25px 20px;\n }\n`;\n\nexport const EditableTextareaContainer = styled.div`\n background-color: ${props => transparentize(props.theme.colors.textColor, 0.02)};\n box-shadow: inset 0 2px 0 0 rgba(39, 17, 0, 0.06);\n padding: 10px 23px 45px;\n ${EditableContentWrapper} {\n padding: 0;\n }\n & textarea {\n min-height: 160px;\n font-size: 14px;\n font-family: ${props => props.theme.fonts.secondaryFont};\n }\n ${media.mobile`\n padding: 10px 10px 45px;\n textarea {\n padding: 4px 5px 29px;\n }\n`};\n`;\n\nexport const Wrapper = styled.section`\n display: flex;\n flex-direction: column;\n align-items: center;\n position: relative;\n margin-top: 40px;\n z-index: 1;\n ${media.mobile`\n margin-top: 70px;\n `};\n`;\n","import * as React from 'react';\n\nimport { localize } from 'core/localization';\nimport Rate from 'assets/figures/Rate';\nimport { Button } from 'components/common';\nimport EditableTextarea from 'components/common/EditableTextarea';\nimport {\n Figure,\n TextElement,\n FeedbackContainer,\n EditableTextareaContainer,\n Wrapper\n} from './FeedbackStep.styled';\n\ntype FeedbackStepProps = {\n onChange(e: any): void;\n onSubmit(): void;\n npsScore: number;\n};\n\nexport class FeedbackStep extends React.PureComponent {\n\n render() {\n const { npsScore, onChange, onSubmit } = this.props;\n let score = npsScore / 10;\n return (\n \n {localize('[you gave a rate of]')}\n
\n 6} />\n
\n \n \n {localize('[course score reason]')}\n \n \n onChange(e)}\n rows={1}\n isAutofocus={true}\n />\n \n \n \n
\n );\n }\n}\n\nexport default FeedbackStep;\n","import styled from 'styled-components';\nimport { Text } from 'components/common';\nimport media from 'components/mixins/media';\n\nexport const Figure = styled.div`\n margin-bottom: 55px;\n text-align: center;\n`;\n\nexport const TextElement = styled(Text)`\n font-weight: normal;\n color: ${props => props.theme.colors.textColor};\n text-align: center;\n ${media.mobile`\n padding: 0 65px;\n`};\n`;\n\nexport const ButtonsWrapper = styled.div`\n display: inline-block;\n margin-top: 40px;\n\n & > button {\n width: 100%;\n display: block;\n margin: 0 0 20px;\n &:focus {\n outline: 1px solid black;\n }\n &:focus:not(:focus-visible) {\n outline: none;\n }\n }\n`;\n\nexport const Wrapper = styled.div`\n text-align: center;\n z-index: 1;\n`;\n","import * as React from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators, Dispatch } from 'redux';\nimport { localize } from 'core/localization';\nimport { RootAppState } from 'store/types';\nimport Trophy from 'assets/figures/Trophy';\nimport { Text, Button } from 'components/common';\nimport { getLearnServiceUrl, isPreviewMode } from 'store/settings/selectors';\nimport * as navigationActions from 'store/navigation/actions';\nimport { Figure, TextElement, ButtonsWrapper, Wrapper } from './ThankForFeedback.styled';\nimport { isLtiInitialized } from 'store/modules/selectors';\n\ntype ThankForFeedbackProps = {\n backTo(): void;\n closeCourse(): void;\n fromDownloadCertificateButton: boolean;\n isScormMode: boolean;\n isLti: boolean;\n previewMode: boolean;\n learnServiceUrl?: string;\n navigationActions: { [key: string]: any };\n};\n\nexport class ThankForFeedback extends React.PureComponent {\n static defaultProps = {\n fromDownloadCertificateButton: false,\n isScormMode: false,\n previewMode: false\n };\n\n render() {\n const {\n fromDownloadCertificateButton,\n backTo,\n closeCourse,\n isScormMode,\n isLti,\n previewMode,\n navigationActions,\n learnServiceUrl\n } = this.props;\n\n return (\n \n
\n \n
\n {localize('[thank for feedback]')}\n {!isScormMode && !previewMode && !fromDownloadCertificateButton && (\n \n \n {isLti ? localize('[close lti course text]') : localize('[close course text]')}\n \n {!isLti && (\n \n navigationActions.goToUrl(learnServiceUrl)}\n layout=\"primary\"\n tabIndex={1}\n >\n {localize('[my courses]')}\n \n \n )}\n \n )}\n\n {isScormMode && (\n \n )}\n\n {fromDownloadCertificateButton && (\n \n {!isLti && (\n navigationActions.goToUrl(learnServiceUrl)}\n layout=\"primary\"\n tabIndex={1}\n >\n {localize('[my courses]')}\n \n )}\n \n \n \n )}\n
\n );\n }\n}\n\nfunction mapStateToProps(state: RootAppState) {\n return {\n learnServiceUrl: getLearnServiceUrl(state),\n previewMode: isPreviewMode(state),\n isLti: isLtiInitialized(state)\n };\n}\n\nfunction mapDispatchToProps(dispatch: Dispatch) {\n return {\n navigationActions: bindActionCreators(navigationActions, dispatch)\n };\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(ThankForFeedback);\n","import * as React from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators, Dispatch } from 'redux';\nimport * as courseActions from 'store/course/actions';\nimport { isScormMode } from 'store/settings/selectors';\nimport { CssAnimation } from 'components/common';\nimport { closeWindow } from 'utils/window';\nimport { POPUP_ID_CLOSE_COURSE } from 'constants/popups';\nimport EvaluateCourse from './evaluateCourse';\nimport FeedbackStep from './feedbackStep';\nimport ThankForFeedback from './thankForFeedback';\nimport CloseCoursePopup from '../closeCourse';\nimport { RootAppState } from 'store/types';\n\nconst EVALUATE_COURSE_BLOCK = 'EVALUATE_COURSE_BLOCK';\nconst FEEDBACK_STEP_BLOCK = 'FEEDBACK_STEP_BLOCK';\nconst THANK_FOR_FEEDBACK_BLOCK = 'THANK_FOR_FEEDBACK_BLOCK';\n\ninterface NPSSteps {\n EVALUATE_COURSE_BLOCK: string;\n FEEDBACK_STEP_BLOCK: string;\n THANK_FOR_FEEDBACK_BLOCK: string;\n}\n\ntype NpsPopupProps = {\n courseActions: { [key: string]: any };\n actions: { [key: string]: any };\n closePopup(): void;\n popupSettings: { [key: string]: any };\n scormMode: boolean;\n};\n\ntype NpsPopupState = {\n npsScore: number;\n textFeedback: string;\n currentStep: keyof NPSSteps;\n}\n\nexport class NpsPopup extends React.PureComponent {\n steps: Array;\n constructor(props: NpsPopupProps) {\n super(props);\n this.state = {\n npsScore: 0,\n textFeedback: '',\n currentStep: EVALUATE_COURSE_BLOCK\n };\n this.steps = [EVALUATE_COURSE_BLOCK, FEEDBACK_STEP_BLOCK, THANK_FOR_FEEDBACK_BLOCK];\n }\n\n updateNpsScore = (score: number) => {\n this.setState({ npsScore: score * 10 });\n this.goToNextStep();\n };\n\n updateTextFeedback = (e: { [key: string]: any }) => {\n this.setState({ textFeedback: e.target.value });\n };\n\n submitNpsFeedback = async () => {\n await this.props.courseActions.evaluate({\n score: this.state.npsScore,\n response: this.state.textFeedback\n });\n\n this.goToNextStep();\n };\n\n goToNextStep() {\n let currentNameBlock = this.steps.indexOf(this.state.currentStep);\n if (currentNameBlock < this.steps.length) {\n ++currentNameBlock;\n this.setState({ currentStep: this.steps[currentNameBlock] });\n }\n }\n\n backToResult = () => {\n this.props.closePopup();\n };\n\n openClosePopup() {\n this.props.actions.openPopup({\n popupId: POPUP_ID_CLOSE_COURSE,\n popupAriaLabelKey: '[aria label close course popup]',\n component: CloseCoursePopup,\n disablePopupClosing: true,\n closePopupByTap: false\n });\n }\n\n closeCourse = () => {\n this.props.closePopup();\n if (!closeWindow()) {\n this.openClosePopup();\n } else {\n closeWindow();\n }\n };\n\n closeCourseInScormMode = () => {\n this.props.closePopup();\n this.openClosePopup();\n this.props.courseActions.finalized();\n };\n\n render() {\n const { fromDownloadCertificateButton } = this.props.popupSettings;\n const { scormMode } = this.props;\n return (\n \n {this.state.currentStep === EVALUATE_COURSE_BLOCK && (\n \n \n \n )}\n {this.state.currentStep === FEEDBACK_STEP_BLOCK && (\n \n \n \n )}\n {this.state.currentStep === THANK_FOR_FEEDBACK_BLOCK && (\n \n \n \n )}\n \n );\n }\n}\n\nfunction mapStateToProps(state: RootAppState) {\n return {\n scormMode: isScormMode(state)\n };\n}\n\nfunction mapDispatchToProps(dispatch: Dispatch) {\n return {\n courseActions: bindActionCreators(courseActions, dispatch)\n };\n}\n\nexport default connect(\n mapStateToProps,\n mapDispatchToProps\n)(NpsPopup);\n","export { default } from './nps';\n","export const getStringHash = (string: string) => {\n let hash = 0;\n let chr;\n if (string.length === 0) {\n return hash;\n }\n for (let index = 0; index < string.length; index++) {\n chr = string.charCodeAt(index);\n // eslint-disable-next-line\n hash = (hash << 5) - hash + chr;\n // eslint-disable-next-line\n hash |= 0; // Convert to 32bit integer\n }\n return hash;\n};\n\nexport default getStringHash;\n","import getStringHash from 'utils/getStringHash';\n\nexport const sortById = (prev: any, next: any) => {\n if (getStringHash(prev.id) > getStringHash(next.id)) {\n return -1;\n }\n return 1;\n};\n\nexport default sortById;\n","import { getQuestion } from 'store/questions/selectors';\nimport { isRandomizeAnswersEnabled } from 'store/settings/selectors';\nimport { NO_SELECTED_ID } from 'constants/common';\nimport { sortById } from 'utils/sort';\nimport { RootAppState } from '../../types';\n\nexport const getUserAnswers = (state: RootAppState, questionId: string) => {\n const question = getQuestion(state, questionId);\n const randomizeAnswersEnabled = isRandomizeAnswersEnabled(state);\n const { dropspots: options, randomizedOptions = [] } = question;\n const dropspots = randomizeAnswersEnabled ? randomizedOptions : options;\n return dropspots.map((dropspot: any) => ({\n id: dropspot.id,\n text: dropspot.text,\n x: dropspot.x,\n y: dropspot.y\n }));\n};\n\nexport const getBackground = (state: RootAppState, questionId: string) => getQuestion(state, questionId).background;\n\nexport const getUserResponse = (state: RootAppState, questionId: string) => getQuestion(state, questionId).response;\n\nexport const getScore = (state: RootAppState, question: any) => {\n const userAnswers: { [key: string]: any }[] = [];\n const originalAnswers = question.dropspots.map((answer: any) => ({\n id: answer.id,\n text: answer.text\n }));\n\n if (question.response.length && !question.response[0].items.length) {\n question.response.forEach((list: any) => {\n if (list.id !== NO_SELECTED_ID) {\n const answerId = list.id;\n const answerText = list.items[0].text;\n userAnswers.push({\n id: answerId,\n text: answerText\n });\n }\n });\n }\n\n originalAnswers.sort(sortById);\n userAnswers.sort(sortById);\n\n if (JSON.stringify(originalAnswers) === JSON.stringify(userAnswers)) {\n return 100;\n }\n\n return 0;\n};\n","import styled from 'styled-components';\nimport { Text, Icon } from 'components/common';\nimport { transparentize } from 'utils/color';\nimport { secondaryFontText } from 'components/mixins/typography';\nimport media from 'components/mixins/media';\n\nexport const Wrapper = styled.article`\n display: flex;\n max-width: 368px;\n padding: 36px 24px 32px;\n background-color: ${props => transparentize(props.theme.colors.mainColor, 0.05)};\n border-top: 4px solid ${props => transparentize(props.theme.colors.mainColor, 0.3)};\n\n ${media.small`\n padding: 32px 16px 32px;\n `};\n`;\n\nexport const DescriptionText = styled(Text)`\n ${secondaryFontText};\n padding-left: 13px;\n`;\n\nexport const DescriptionIcon = styled(Icon)`\n &:before {\n color: ${props => props.theme.colors.mainColor};\n line-height: 2;\n }\n`;\n","import * as React from 'react';\nimport { Wrapper, DescriptionIcon, DescriptionText } from './DescriptionWithBackground.styled';\n\ntype DescriptionWithBackgroundProps = {\n iconName: string;\n iconSize: number;\n descriptionText: string | null;\n descriptionTextAppearance?: any;\n descriptionChildren?: any;\n};\n\nexport const DescriptionWithBackground = ({\n iconName = 'info',\n iconSize = 2,\n descriptionText = null,\n descriptionTextAppearance = 'p',\n descriptionChildren = null\n}: DescriptionWithBackgroundProps) => (\n \n \n \n {descriptionText}\n {descriptionChildren}\n \n \n );\n\nexport default DescriptionWithBackground;\n","export { default } from './DescriptionWithBackground';\n","import { DEFAULT_AUTH_URL, DEFAULT_LEARN_URL } from 'constants/progressStorage';\nimport {\n DEFAULT_ALTERNATIVE_LOGO_URL,\n DEFAULT_BACKGROUND,\n DEFAULT_COLORS,\n DEFAULT_FONTS\n} from 'constants/defaults';\nimport getImageResizeUrl from 'components/mixins/images';\nimport { RootAppState } from 'store/types';\nimport { MATERIAL_TYPES } from '../../constants/common';\nimport { getMillisecondsFromTime } from 'utils/timer';\nimport { objectToArray } from 'utils/object';\n\nexport enum ShowAllQuestionAndContentItemsTypes {\n SEPARATE_PAGES = 'separatePages',\n ONE_PAGE = 'onePage'\n}\n\nexport enum SubmitAnswerTypes {\n AFTER_EVERY_QUESTION = 'afterEveryQuestion',\n ALL_QUESTIONS_AT_ONCE = 'allQuestionsAtOnce'\n}\n\nexport enum PreviousAttemptAnswerTypes {\n SHOW = 'show',\n RESET = 'reset'\n}\n\nexport enum AnswerOptionsOrderTypes {\n SET_BY_AUTHOR = 'setByAuthor',\n RANDOMIZE = 'randomize'\n}\n\nexport enum QuestionPoolRandomizationTypes {\n SAME_ON_EVERY_ATTEMPT = 'sameOnEveryAttempt',\n DIFFERENT_ON_EVERY_ATTEMPT = 'differentOnEveryAttempt'\n}\n\nexport const isSettingsLoadingFailed = (state: RootAppState) => state.settings.isLoadingFailed;\n\nexport const getFonts = (state: RootAppState) => state.settings.template?.fonts || DEFAULT_FONTS;\n\nexport const isAttemptsLimited = (state: RootAppState) =>\n state.settings.template &&\n state.settings.template.numberOfAttempts &&\n state.settings.template.numberOfAttempts.isLimited;\n\nexport const getLimitedAttemptsNumber = (state: RootAppState) =>\n state.settings.template &&\n state.settings.template.numberOfAttempts &&\n state.settings.template.numberOfAttempts.attemptsLimit\n ? state.settings.template.numberOfAttempts.attemptsLimit\n : 0;\n\nexport const getColors = (state: RootAppState) =>\n state.settings.template.branding?.colors || DEFAULT_COLORS;\n\nexport const getLogo = (state: RootAppState) =>\n state.settings.template && getImageResizeUrl(state.settings.template.branding.mainLogo, 400, 160);\n\nexport const getAlternativeLogo = (state: RootAppState) =>\n getImageResizeUrl(\n state.settings.template?.branding?.alternativeLogo || DEFAULT_ALTERNATIVE_LOGO_URL,\n 720,\n 400\n );\n\nexport const isMainLogoShown = (state: RootAppState) =>\n state.settings.template && state.settings.template.branding.allowToShowMainLogo;\n\nexport const getBackground = (state: RootAppState) =>\n state.settings.template?.background || DEFAULT_BACKGROUND;\n\nexport const getTranslations = (state: RootAppState) => state.settings.translations;\n\nexport const isResultsTrackingEnabled = (state: RootAppState) =>\n state.settings.template.resultsTracking && state.settings.template.resultsTracking.enabled;\n\nexport const getXapiSettings = (state: RootAppState) =>\n state.settings.template && state.settings.template.xApi;\n\nexport const isScoringOfContentPagesAllowed = (state: RootAppState) =>\n state.settings.template.allowScoringOfContentPages &&\n state.settings.template.allowScoringOfContentPages.enabled;\n\nexport const isShowContentPagesEnabled = (state: RootAppState) =>\n state.settings.template.showContentPages.enabled;\n\nexport const shouldSubmitEachQuestions = (state: RootAppState) =>\n state.settings.template.submitAnswers &&\n state.settings.template.submitAnswers.selected &&\n state.settings.template.submitAnswers.selected === SubmitAnswerTypes.AFTER_EVERY_QUESTION;\n\nexport const shouldSubmitAllQuestions = (state: RootAppState) =>\n state.settings.template.submitAnswers &&\n state.settings.template.submitAnswers.selected &&\n state.settings.template.submitAnswers.selected === SubmitAnswerTypes.ALL_QUESTIONS_AT_ONCE;\n\nexport const getPublishSettings = (state: RootAppState) =>\n state.settings.template && state.settings.publish;\n\nexport const getAuthoringToolUrl = (state: RootAppState) =>\n state.settings.publish.hasOwnProperty('authoringToolUrl') &&\n state.settings.publish.authoringToolUrl;\n\nexport const isCrossDeviceSavingEnabled = (state: RootAppState) =>\n state.settings.template.saveProgressCrossDevice &&\n state.settings.template.saveProgressCrossDevice.enabled;\n\nexport const isNpsEnabled = (state: RootAppState) =>\n state.settings.template.conductLearnerSatisfactionSurvey &&\n state.settings.template.conductLearnerSatisfactionSurvey.enabled;\n\nexport const isAccessLimited = (state: RootAppState) =>\n (state.settings.publish &&\n state.settings.publish.accessLimitation &&\n state.settings.publish.accessLimitation.enabled) ||\n false;\n\nexport const isAllowToSkipTrackingAndTracingEnabled = (state: RootAppState) =>\n state.settings.template.allowUserToSkipTrackingAndTracing &&\n state.settings.template.allowUserToSkipTrackingAndTracing.enabled;\n\nexport const isTrackingEnabled = (state: RootAppState) =>\n isCrossDeviceSavingEnabled(state) ||\n isResultsTrackingEnabled(state) ||\n isNpsEnabled(state) ||\n isAccessLimited(state);\n\nexport const isLoginViaSocialMediaEnabled = (state: RootAppState) =>\n state.settings.template.loginViaSocialMedia &&\n state.settings.template.loginViaSocialMedia.enabled;\n\nexport const isScormMode = (state: RootAppState) =>\n state.settings.template && state.settings.publishMode && state.settings.publishMode.isScorm;\nexport const isScorm2004Mode = (state: RootAppState) =>\n state.settings.template && state.settings.publishMode && state.settings.publishMode.isScorm2004;\nexport const isPreviewMode = (state: RootAppState) =>\n state.settings.template && state.settings.publishMode && state.settings.publishMode.isPreview;\nexport const isReviewMode = (state: RootAppState) =>\n state.settings.template && state.settings.publishMode && state.settings.publishMode.isReview;\nexport const isPublishMode = (state: RootAppState) =>\n !(isScormMode(state) || isPreviewMode(state) || isReviewMode(state));\n\nexport const getAuthServiceUrl = (state: RootAppState) =>\n state.settings.publish && state.settings.publish.authServiceUrl\n ? `${state.settings.publish.authServiceUrl}`\n : DEFAULT_AUTH_URL;\n\nexport const getLearnServiceUrl = (state: RootAppState) =>\n state.settings.publish && state.settings.publish.learnServiceUrl\n ? `${state.settings.publish.learnServiceUrl}`\n : DEFAULT_LEARN_URL;\n\nexport const getAllowedUsers = (state: RootAppState) =>\n isAccessLimited(state) ? state.settings.publish.accessLimitation.allowedUsers : [];\n\nexport const getQuestionShortIds = (state: RootAppState) =>\n isScormMode(state) ? state.settings.publish.questionShortIds : [];\n\nexport const getSelectedLanguage = (state: RootAppState) =>\n state.settings.template.languages && state.settings.template.languages.selected;\n\nexport const isAllowedDownloadCertificate = (state: RootAppState) =>\n state.settings.template.allowUsersToDownloadCertificates &&\n state.settings.template.allowUsersToDownloadCertificates.enabled;\n\nexport const isOverallMasteryScore = (state: RootAppState) =>\n state.settings.template.masteryScore && state.settings.template.masteryScore.isOverall;\n\nexport const getMasteryScoreValue = (state: RootAppState) =>\n state.settings.template.masteryScore && state.settings.template.masteryScore.score;\n\nexport const isAllQuestionsOnOnePage = (state: RootAppState) =>\n state.settings.template.showAllQuestionAndContentItems &&\n state.settings.template.showAllQuestionAndContentItems.selected &&\n state.settings.template.showAllQuestionAndContentItems.selected ===\n ShowAllQuestionAndContentItemsTypes.ONE_PAGE;\n\nexport const isResource = (state: RootAppState) =>\n state.settings.publish.materialType === MATERIAL_TYPES.RESOURCE;\n\nexport const isCourse = (state: RootAppState) =>\n state.settings.publish.materialType === MATERIAL_TYPES.COURSE;\n\nexport const analyticsWriteKey = (state: RootAppState) => state.settings.publish.analyticsWriteKey;\n\nexport const isShowLearningHintsEnabled = (state: RootAppState) =>\n state.settings.template.showLearningHints && state.settings.template.showLearningHints.enabled;\n\nexport const isQuestionPoolEnabled = (state: RootAppState) =>\n state.settings.template.questionPool && state.settings.template.questionPool.enabled;\n\nexport const getQuestionPoolSize = (state: RootAppState) => {\n let questionPoolSize =\n state.settings.template.questionPool && state.settings.template.questionPool.size\n ? state.settings.template.questionPool.size\n : 0;\n\n const nonSurveyQuestions = objectToArray(state.questions).filter( question => !question.isSurvey)\n if (questionPoolSize && nonSurveyQuestions.length < questionPoolSize) {\n questionPoolSize = nonSurveyQuestions.length;\n }\n\n return questionPoolSize;\n};\n\nexport const isQuestionRandomizeEnabled = (status: RootAppState) =>\n status.settings.template.questionPool &&\n status.settings.template.questionPool.subset &&\n status.settings.template.questionPool.subset.type ===\n QuestionPoolRandomizationTypes.SAME_ON_EVERY_ATTEMPT &&\n status.settings.template.questionPool.subset.randomizeQuestionOrder;\n\nexport const isNewSubsetOnEveryAttempt = (status: RootAppState) =>\n status.settings.template.questionPool &&\n status.settings.template.questionPool.subset &&\n status.settings.template.questionPool.subset.type ===\n QuestionPoolRandomizationTypes.DIFFERENT_ON_EVERY_ATTEMPT;\n\nexport const isRandomizeAnswersEnabled = (state: RootAppState) =>\n state.settings.template.answerOptionsOrder?.selected === AnswerOptionsOrderTypes.RANDOMIZE;\n\nexport const isAnswersFromPreviousAttemptEnabled = (state: RootAppState) =>\n state.settings.template.answersFromPreviousAttempt &&\n state.settings.template.answersFromPreviousAttempt.selected === PreviousAttemptAnswerTypes.SHOW;\n\nexport const getTimerEnabled = (state: RootAppState) => state.settings.template.timer.enabled;\n\nexport const getTimerLimit = (state: RootAppState) =>\n getMillisecondsFromTime(state.settings.template.timer?.time);\n","const getImageResizeUrl = (url: any, width: any, height: any, scaleBySmallerSide = true) =>\n `${url}?height=${height}&width=${width}&scaleBySmallerSide=${scaleBySmallerSide}`;\n\nexport default getImageResizeUrl;\n","export const INDEX_PATH = '/';\nexport const SECTIONS_PATH = `/sections`;\nexport const SECTION_PATH = `${SECTIONS_PATH}/:sectionId`;\nexport const RESULTS_PATH = '/results';\nexport const QUESTION_PATH = `${SECTION_PATH}/questions/:questionId`;\nexport const SIGNUP_PATH = `/signup`;\nexport const LOGIN_PATH = `/login`;\nexport const LEARNING_OBJECTIVE_PATH = `${SECTION_PATH}/learning-objective`;\nexport const RESOURCE_PATH = '/resource';\n","export enum TimerStatus {\n NOT_STARTED = 'NOT_STARTED',\n STARTED = 'STARTED',\n STOPPED = 'STOPPED',\n TIMED_OUT = 'TIMED_OUT',\n RESET = 'RESET'\n}\nexport const COURSE_TIMER_PROGRESS_KEY = 'course_timer_progress';\nexport const PROGRESS_STORAGE_TIMER_UPDATE_INTERVAL = 60000;\nexport const APP_STORE_TIMER_UPDATE_INTERVAL = 5000;\n","import { css } from 'styled-components';\n\nexport const TRANSITION_DURATION = '0.2s';\n\nexport const transition = (\n transitionProperty: any,\n transitionDuration: string | number = TRANSITION_DURATION,\n transitionFunction = 'ease-in-out',\n transitionDelay = 0\n) => css`\n transition-property: ${transitionProperty};\n transition-timing-function: ${transitionFunction};\n transition-duration: ${toTimeString(transitionDuration)};\n transition-delay: ${toTimeString(transitionDelay)};\n`;\n\nfunction toTimeString(value: string | number) {\n return typeof value === 'string' ? value : `${value}ms`;\n}\n\nexport const pointerOnHover = () => css`\n &:hover {\n cursor: pointer;\n }\n`;\n\nexport const bounce = () => `\nanimation: bounce 0.5s linear;\n@keyframes bounce{\n 0%{\n transform-origin: center center;\n transform: scale(0, 0) translate(0,0,0);\n }\n 30%{\n transform: scale(1.01, 1.01);\n }\n 45%{\n transform: scale(0.95, 0.95);\n }\n 60%{\n transform: scale(1.01, 1.01);\n }\n 75%{\n transform: scale(0.95, 0.95);\n }\n 100%{\n transform: scale(1, 1) translate(0,0,0);\n }\n}`;\n\nexport const crossFade = (animateFrom: string) => {\n let position = '';\n if (animateFrom === 'fromTop') {\n position = '0, -16px';\n }\n if (animateFrom === 'fromRight') {\n position = '16px, 0';\n }\n if (animateFrom === 'fromBottom') {\n position = '0, 16px';\n }\n if (animateFrom === 'fromLeft') {\n position = '-16px, 0';\n }\n return `\n animation: crossFade${animateFrom} 0.2s ease-in-out;\n @keyframes crossFade${animateFrom}{\n 0%{\n transform: translate(${position});\n opacity: 0;\n }\n 100%{\n transform: translate(0, 0);\n opacity: 1;\n }\n }`;\n};\n\nexport const shake = (animateFrom: string, animateDuration = 1, animateIteration = 'infinite') => {\n let position = '';\n if (animateFrom === 'horizontal') {\n position = '3px, 0';\n }\n if (animateFrom === 'vertical') {\n position = '0, -3px';\n }\n return `\n animation: shake${animateFrom} ${animateDuration}s ${animateIteration} ease-in-out;\n @keyframes shake${animateFrom}{\n 0% {\n transform: translate(0, 0);\n }\n 50% {\n transform: translate(${position});\n }\n 100% {\n transform: translate(0, 0);\n }\n }\n `;\n};\n\nexport const pulse = (color: any) => {\n const start = color.start || 'rgba(255,255,255, 0.5)';\n const middle = color.middle || 'rgba(255,255,255, 0.3)';\n const end = color.end || 'rgba(255,255,255, 0.05)';\n return `\n animation: pulse 1s infinite;\n @keyframes pulse {\n 0% {\n box-shadow: 0 0 0 0 ${start};\n }\n 50% {\n box-shadow: 0 0 0 6px ${middle};\n }\n 100% {\n box-shadow: 0 0 0 8px ${end};\n }\n }\n `;\n};\n","import { css } from 'styled-components';\nimport { transparentize } from 'utils/color';\nimport { MEDIA_FONT_SIZES } from 'constants/common';\nimport media from './media';\n\nconst defaultMainFont = 'PT Serif, Serif';\nconst defaultSecondaryFont = 'Arial, Sans-Serif';\n\nexport const fontFamilyWithFallback = (fontFamily: any, fallback: any) =>\n `${fontFamily || 'Arial'}, ${fallback}`;\n\nexport const mainFont = css`\n font-family: ${props =>\n fontFamilyWithFallback(props.theme.fonts.mainFont.fontFamily, defaultMainFont)};\n`;\n\nexport const secondaryFont = css`\n font-family: ${props =>\n fontFamilyWithFallback(props.theme.fonts.secondaryFont.fontFamily, defaultSecondaryFont)};\n`;\n\nconst styledColors = (fontStyles: any, isInverted: any, InvertedColor: any) => css`\n color: ${isInverted ? InvertedColor : fontStyles.color};\n`;\n\nconst styledFonts = (fontStyles: any) => css`\n font-family: ${fontFamilyWithFallback(fontStyles.fontFamily, defaultMainFont)};\n font-size: ${fontStyles.size}px;\n font-style: ${fontStyles.fontStyle};\n font-weight: ${fontStyles.fontWeight};\n text-decoration: ${fontStyles.textDecoration};\n background-color: ${fontStyles.textBackgroundColor};\n`;\n\nconst mediaFontSize = (fontSize: any, percentage: any, limitSize: any = null) => {\n let result = fontSize * percentage;\n\n if (limitSize && result > limitSize) {\n result = limitSize;\n }\n\n return css`\n font-size: ${result}px;\n `;\n};\n\nexport const bold = css`\n font-weight: 600;\n`;\n\nexport const mainFontH1 = css`\n ${(props: any) => styledFonts(props.theme.fonts.heading1)};\n line-height: 1.4;\n ${(props: any) =>\n styledColors(\n props.theme.fonts.heading1,\n props.inverted,\n props.theme.colors.coverBgOverlayTextColor\n )};\n ${media.smallFontRatio`\n ${(props: any) =>\n mediaFontSize(props.theme.fonts.heading1.size, MEDIA_FONT_SIZES.heading1.MULTIPLIER)};\n `}\n ${media.tablet`${(props: any) =>\n mediaFontSize(\n props.theme.fonts.heading1.size,\n MEDIA_FONT_SIZES.heading1.MULTIPLIER,\n MEDIA_FONT_SIZES.heading1.MAXIMUM_VALUE\n )}`}\n`;\n\nexport const mainFontH2 = css`\n ${(props: any) => styledFonts(props.theme.fonts.heading2)};\n line-height: 1.4;\n ${(props: any) =>\n styledColors(\n props.theme.fonts.heading2,\n props.inverted,\n props.theme.colors.coverBgOverlayTextColor\n )};\n ${media.large`\n ${(props: any) =>\n mediaFontSize(props.theme.fonts.heading2.size, MEDIA_FONT_SIZES.heading2.MULTIPLIER)};\n ${media.tablet`${(props: any) =>\n mediaFontSize(\n props.theme.fonts.heading2.size,\n MEDIA_FONT_SIZES.heading2.MULTIPLIER,\n MEDIA_FONT_SIZES.heading2.MAXIMUM_VALUE\n )}`}\n `};\n`;\n\nexport const mainFontH3 = css`\n ${(props: any) => styledFonts(props.theme.fonts.heading3)};\n line-height: 1.4;\n ${(props: any) =>\n styledColors(\n props.theme.fonts.heading3,\n props.inverted,\n props.theme.colors.coverBgOverlayTextColor\n )};\n ${media.large`\n ${(props: any) =>\n mediaFontSize(props.theme.fonts.heading3.size, MEDIA_FONT_SIZES.heading3.MULTIPLIER)};\n `};\n ${media.tablet`${(props: any) =>\n mediaFontSize(\n props.theme.fonts.heading3.size,\n MEDIA_FONT_SIZES.heading3.MULTIPLIER,\n MEDIA_FONT_SIZES.heading3.MAXIMUM_VALUE\n )}`};\n`;\n\nexport const mainFontH4 = css`\n ${(props: any) => styledFonts(props.theme.fonts.heading4)};\n line-height: 1.4;\n ${(props: any) =>\n styledColors(\n props.theme.fonts.heading4,\n props.inverted,\n props.theme.colors.coverBgOverlayTextColor\n )};\n ${media.large`\n ${(props: any) =>\n mediaFontSize(props.theme.fonts.heading4.size, MEDIA_FONT_SIZES.heading4.MULTIPLIER)};\n `};\n ${media.tablet`${(props: any) =>\n mediaFontSize(\n props.theme.fonts.heading4.size,\n MEDIA_FONT_SIZES.heading4.MULTIPLIER,\n MEDIA_FONT_SIZES.heading4.MAXIMUM_VALUE\n )}`};\n`;\n\nexport const mainFontText = css`\n ${mainFont};\n font-size: 18px;\n ${bold};\n line-height: 1.6;\n`;\n\nexport const mainFontSmallText = css`\n ${mainFont};\n font-size: 14px;\n ${bold};\n line-height: 28px;\n ${media.xlarge`\n font-size: 12px;\n `};\n`;\n\nexport const secondaryFontH1 = css`\n ${secondaryFont};\n font-size: 36px;\n font-weight: 100;\n line-height: 54px;\n ${media.mobile`\n font-size: 32px;\n line-height: 48px;\n `};\n`;\n\nexport const secondaryFontText = css`\n ${(props: any) => styledFonts(props.theme.fonts.normal)};\n line-height: 1.6;\n ${(props: any) =>\n styledColors(\n props.theme.fonts.normal,\n props.inverted,\n props.theme.colors.coverBgOverlayTextColor\n )};\n ${media.large`\n ${(props: any) =>\n mediaFontSize(props.theme.fonts.normal.size, MEDIA_FONT_SIZES.paragraph.MULTIPLIER)};\n `};\n ${media.tablet`${(props: any) =>\n mediaFontSize(\n props.theme.fonts.normal.size,\n MEDIA_FONT_SIZES.paragraph.MULTIPLIER,\n MEDIA_FONT_SIZES.paragraph.MAXIMUM_VALUE\n )}`};\n`;\n\nexport const secondaryFontSmallText = css`\n ${secondaryFont};\n font-size: 14px;\n line-height: 28px;\n ${media.xlarge`\n font-size: 12px;\n `};\n ${media.mobile`\n font-size: 11px;\n line-height: 26px;\n `};\n`;\n\nexport const quote = css`\n ${(props: any) => styledFonts(props.theme.fonts.quote)};\n line-height: 1.6;\n ${(props: any) =>\n styledColors(\n props.theme.fonts.quote,\n props.inverted,\n props.theme.colors.coverBgOverlayTextColor\n )};\n ${media.large`\n ${(props: any) =>\n mediaFontSize(props.theme.fonts.quote.size, MEDIA_FONT_SIZES.quote.MULTIPLIER)};\n `};\n ${media.tablet`${(props: any) =>\n mediaFontSize(\n props.theme.fonts.quote.size,\n MEDIA_FONT_SIZES.quote.MULTIPLIER,\n MEDIA_FONT_SIZES.quote.MAXIMUM_VALUE\n )}`};\n`;\n\nexport const highlighted = css`\n ${(props: any) => styledFonts(props.theme.fonts.highlighted)};\n line-height: 2;\n ${(props: any) =>\n styledColors(\n props.theme.fonts.highlighted,\n props.inverted,\n props.theme.colors.coverBgOverlayTextColor\n )};\n background-color: ${(props: any) => props.theme.fonts.highlighted.textBackgroundColor};\n ${media.xlarge`\n ${(props: any) => mediaFontSize(props.theme.fonts.highlighted.size, 0.88)};\n `};\n ${media.mobile`\n ${(props: any) => mediaFontSize(props.theme.fonts.highlighted.size, 0.82)};\n `};\n`;\n\nexport const code = css`\n color: #000;\n font-family: 'PT-Mono', Courier, monospace;\n padding: 8px;\n border-color: #cccccc;\n border-radius: 2px;\n background-clip: padding-box;\n background-color: #f5f5f5;\n`;\n\nexport const links = css`\n ${(props: any) => styledFonts(props.theme.fonts.links)};\n line-height: 2;\n color: ${(props: any) =>\n props.inverted\n ? transparentize(props.theme.colors.coverBgOverlayTextColor, 0.7)\n : transparentize(props.theme.fonts.links.color, 0.7)};\n ${media.xlarge`\n ${(props: any) => mediaFontSize(props.theme.fonts.links.size, 1)};\n `};\n ${media.medium`\n ${(props: any) => mediaFontSize(props.theme.fonts.links.size, 0.88)};\n `};\n\n &:hover {\n ${(props: any) =>\n styledColors(\n props.theme.fonts.links,\n props.inverted,\n props.theme.colors.coverBgOverlayTextColor\n )};\n }\n`;\n","import { createSelector } from 'reselect';\nimport { isPassed, isInProgress } from 'utils/comparison';\nimport * as questionSelectors from 'store/questions/selectors';\nimport {\n getMasteryScoreValue,\n isOverallMasteryScore,\n isQuestionPoolEnabled\n} from 'store/settings/selectors';\nimport { objectToArray } from 'utils/object';\nimport { RootAppState } from 'store/types';\nimport { INFORMATION_CONTENT } from 'constants/questionTypes';\n\nexport const getSectionQuestions = (state: RootAppState, sectionId: string) =>\n objectToArray(state.questions).filter(question => question.sectionId === sectionId);\n\nexport const getSection = (state: RootAppState, sectionId: string) => state.sections[sectionId];\n\nexport const getSections = createSelector(\n (state: RootAppState) => state.sections,\n sections => objectToArray(sections)\n);\n\nconst getQuestionIds = createSelector(getSection, section => (section && section.questions) || []);\n\nexport const getQuestionCount = createSelector(\n getSection,\n section => section && section.questions.length\n);\n\nexport const getCourseQuestionCount = (state: RootAppState) => {\n if (isQuestionPoolEnabled(state)) {\n return (\n state &&\n Object.values(state.questions).filter((question: any) => question.isPoolQuestion).length\n );\n }\n return state && state.questions && Object.keys(state.questions).length;\n};\n\nexport const getQuestionIndex = createSelector(\n getQuestionIds,\n (state, sectionId, questionId) => questionId,\n (questionIds, questionId) => questionIds.indexOf(questionId)\n);\n\nexport const getCourseQuestionIndex = (state: RootAppState, questionId: any) =>\n questionId && Object.keys(state.questions).indexOf(questionId);\n\nexport const affectsProgress = createSelector(\n getQuestionIds,\n state => state,\n (questionIds, state) =>\n questionIds.find(\n (questionId: string) => questionSelectors.getQuestion(state, questionId).affectsProgress\n ) !== undefined\n);\n\nexport const getAffectProgressSections = createSelector(\n getSections,\n state => state,\n (sections, state) => sections.filter(section => affectsProgress(state, section.id))\n);\n\nexport const getAffectProgressSectionsCount = (state: RootAppState) =>\n getAffectProgressSections(state).length;\n\nexport const getSectionsPassedCount = createSelector(\n getSections,\n sections => sections.filter(section => isPassed(section.status)).length\n);\n\nexport const isSectionsPassed = createSelector(getAffectProgressSections, sections =>\n sections.every(section => isPassed(section.status))\n);\n\nexport const isSectionsFailed = createSelector(\n getAffectProgressSections,\n state => state,\n (sections, state) =>\n !isSectionsPassed(state) && sections.every(section => !isInProgress(section.status))\n);\n\nexport const getAnsweredSectionsCount = createSelector(\n getAffectProgressSections,\n sections => sections.filter(section => isPassed(section.status)).length\n);\n\nexport const getQuestions = createSelector(\n getQuestionIds,\n state => state,\n (questionIds, state) =>\n questionIds.reduce((result: any, questionId: string) => {\n result.push(questionSelectors.getQuestion(state, questionId));\n return result;\n }, [])\n);\n\nexport const getAffectProgressQuestions = createSelector(getQuestions, questions =>\n questions.filter((question: any) => question.affectsProgress)\n);\n\nexport const getAnsweredOnceQuestionsInSecton = createSelector(\n getAffectProgressQuestions,\n questions => questions.filter((question: any) => question.isAnswered)\n);\n\nexport const isSectionFailed = createSelector(\n getAffectProgressQuestions,\n state => state,\n (questions, state) =>\n questions.every((question: any) => !questionSelectors.hasAvailableAttempt(state, question))\n);\n\nexport const getSectionScore = (state: RootAppState) =>\n isOverallMasteryScore(state) ? 100 : getMasteryScoreValue(state);\n\nexport const getAffectProgressQuestionsCountInSection = (state: RootAppState, sectionId: string) =>\n getAffectProgressQuestions(state, sectionId).length;\n\nexport const getAnsweredSectionQuestionsCount = (state: RootAppState, sectionId: string) =>\n getAnsweredOnceQuestionsInSecton(state, sectionId).length;\n\nexport const getSectionProgress = (state: RootAppState, sectionId: string) => {\n const affectProgressQuestionsCountInSection = getAffectProgressQuestionsCountInSection(\n state,\n sectionId\n );\n const answeredQuestionsCountInSection = getAnsweredSectionQuestionsCount(state, sectionId);\n return affectProgressQuestionsCountInSection > 0\n ? Math.floor((answeredQuestionsCountInSection * 100) / affectProgressQuestionsCountInSection)\n : 0;\n};\n\nexport const getCorrectlyAffectProgressQuestionsCountInSection = createSelector(\n getQuestions,\n questions =>\n questions.filter((question: any) => question.isAnsweredCorrectly && question.affectsProgress)\n .length\n);\n\nexport const getAffectCorrectlyAnsweredQuestionsCount = (state: RootAppState, sectionId: string) =>\n Math.ceil(\n getSectionScore(state) / (100 / getAffectProgressQuestionsCountInSection(state, sectionId))\n );\n\nexport const sectionExists = (state: RootAppState, sectionId: string) =>\n sectionId && Object.keys(state.sections).includes(sectionId);\n\nexport const getCorrectlyAnsweredQuestionsCount = (state: RootAppState) =>\n objectToArray(state.questions).filter((question: any) => question.isAnsweredCorrectly).length;\n\nexport const getNonInfoContentQuestions = (state: RootAppState, sectionId: string) => {\n const questions = getSectionQuestions(state, sectionId) || [];\n return questions\n .filter((question: any) => question.type !== INFORMATION_CONTENT)\n .map((question: any) => question.id);\n};\n\nexport const getAnsweredAffectProgressQuestionsCountInSection = createSelector(\n getQuestions,\n questions =>\n questions.filter((question: any) => question.isAnswered && question.affectsProgress).length\n);\n\nexport const getSectionIndex = createSelector(\n getSections,\n (state: RootAppState, sectionId: string) => sectionId,\n (sections, sectionId) => sections.map(section => section.id).indexOf(sectionId)\n);\n\nexport const isSectionAnswered = (state: RootAppState, sectionId: string) => {\n const affectProgressQuestionsCountInSection = getAffectProgressQuestionsCountInSection(\n state,\n sectionId\n );\n const answeredQuestionsCountInSection = getAnsweredSectionQuestionsCount(state, sectionId);\n return affectProgressQuestionsCountInSection === answeredQuestionsCountInSection;\n};\n\nexport const isLearningObjective = createSelector(\n getSections,\n (state: RootAppState, sectionId: string) => sectionId,\n (sections, sectionId) => sections.map(section => section.id).indexOf(sectionId) >= 0\n);\n","export const MEDIA_XSMALL = 376;\nexport const MEDIA_SMALL = 768;\nexport const MEDIA_MEDIUM = 1024;\nexport const MEDIA_LARGE = 1280;\nexport const MEDIA_XLARGE = 1440;\n\nexport const MEDIA_SMALL_FONT_RATIO = 1200;\nexport const MEDIA_TABLET = 1000;\nexport const MEDIA_MOBILE = 580;\n","export const DEFAULT_AUTH_URL = 'https://auth-staging.easygenerator.com';\nexport const DEFAULT_LEARN_URL = 'https://learn-staging.easygenerator.com/';\nexport const USER_ALREADY_EXISTS = 'userAlreadyExists';\nexport const EMAIL_PASSWORD_COMBINATION_NOT_EXISTS = 'emailPasswordCombinationNotExists';\nexport const PASSWORD_RESET_SENDING_FAILED = 'passwordResetSendingFailed';\nexport const UNKNOWN_ERROR = 'unknownError';\nexport const STATUS_OK = 'statusOk';\n","export type ModulesState = {\n xapi: {\n isInitialized: boolean;\n isLrsTrackingOn: boolean;\n isNpsTrackingOn: boolean;\n },\n scorm: {\n isInitialized: boolean\n };\n progressStorage: {\n isProgressStorageOn: boolean;\n };\n review: {\n isReviewModeEnabled: boolean;\n reviewApiUrl: string;\n };\n lti: {\n isInitialized: boolean;\n }\n}\nexport enum ActionTypes {\n MODULE_XAPI_INITIALIZED = 'MODULE_XAPI_INITIALIZED',\n MODULE_XAPI_LRS_ON = 'MODULE_XAPI_LRS_ON',\n MODULE_XAPI_LRS_OFF = 'MODULE_XAPI_LRS_OFF',\n MODULE_XAPI_NPS_ON = 'MODULE_XAPI_NPS_ON',\n MODULE_XAPI_NPS_OFF = 'MODULE_XAPI_NPS_OFF',\n MODULE_SCORM_INITIALIZED = 'MODULE_SCORM_INITIALIZED',\n MODULE_PROGRESS_STORAGE_ON = 'MODULE_PROGRESS_STORAGE_ON',\n MODULE_PROGRESS_STORAGE_OFF = 'MODULE_PROGRESS_STORAGE_OFF',\n ENABLE_REVIEW_MODE = 'ENABLE_REVIEW_MODE',\n MODULE_LTI_INITIALIZED = 'MODULE_LTI_INITIALIZED'\n}\n\ntype InitializeXApi = {\n type: ActionTypes.MODULE_XAPI_INITIALIZED \n}\n\ntype SubscribeLRS = {\n type: ActionTypes.MODULE_XAPI_LRS_ON\n}\n\ntype SubscribeNPS = {\n type: ActionTypes.MODULE_XAPI_NPS_ON\n}\n\ntype SubscribePS = {\n type: ActionTypes.MODULE_PROGRESS_STORAGE_ON\n}\n\ntype SubscribeLTI = {\n type: ActionTypes.MODULE_LTI_INITIALIZED\n}\n\ntype UnsubscribeLrs = {\n type: ActionTypes.MODULE_XAPI_LRS_OFF\n}\n\ntype UnsubscribeNPS = {\n type: ActionTypes.MODULE_XAPI_NPS_OFF\n}\n\ntype UnsubscribePS = {\n type: ActionTypes.MODULE_PROGRESS_STORAGE_OFF\n}\n\ntype ScrormInitialize = {\n type: ActionTypes.MODULE_SCORM_INITIALIZED\n}\n\ntype EnableReview = {\n type: ActionTypes.ENABLE_REVIEW_MODE,\n payload: {\n reviewApiUrl: string\n }\n}\n\nexport type ModulesActionTypes = InitializeXApi | SubscribeLRS | SubscribeNPS | SubscribePS | SubscribeLTI | UnsubscribeLrs | UnsubscribeNPS | UnsubscribePS | ScrormInitialize | EnableReview;\n\n","import { css } from 'styled-components';\n\nconst buttonDefaultStyle = () => css`\n background: none;\n border: none;\n outline: none;\n &:focus,\n &::-moz-focus-inner {\n border: none;\n outline: 2px solid black;\n outline-offset: 2px;\n }\n`;\nexport default buttonDefaultStyle;\n","import { schema } from 'normalizr';\nimport { QuestionChildren } from './question';\n\nconst content = new schema.Entity(\n 'contents',\n {},\n {\n processStrategy: (value: any, parent: any, key: string) => {\n const result = {\n ...value,\n value: undefined\n }\n\n if (result.children as QuestionChildren) {\n result.children = result.children.map((item: any) => item.id) as Array;\n }\n\n switch (key) {\n case 'instructions':\n case 'hints':\n case 'correctFeedback':\n case 'incorrectFeedback':\n case 'children':\n result.url = `${parent.sectionId}/${parent.id}/${value.id}.html`;\n break;\n case 'questionContent':\n result.url = `${parent.sectionId}/${parent.id}/content.html`;\n break;\n default:\n throw new Error('Content entity key is not supported');\n }\n return result;\n }\n }\n);\n\nexport default content;\n","import { schema } from 'normalizr';\n\nfunction getAnswerId(answerList: any, explanationBlockId: any) {\n const answer = answerList.find(\n (item: any) => item.explanationBlocks.findIndex((block: any) => block.id === explanationBlockId) >= 0\n );\n return answer.id;\n}\n\nconst explanationBlock = new schema.Entity(\n 'contents',\n {},\n {\n processStrategy: (value: any, parent: any, key: string) => {\n let answerId;\n const result = {\n ...value,\n value: undefined\n };\n switch (key) {\n case 'explanationBlocks':\n answerId = getAnswerId(parent.answers, value.id);\n result.url = `${parent.sectionId}/${parent.id}/${answerId}/${value.id}.html`;\n result.sectionId = parent.sectionId;\n result.questionId = parent.id;\n result.answerId = answerId;\n break;\n case 'children':\n result.url = `${parent.sectionId}/${parent.questionId}/${parent.answerId}/${value.id}.html`;\n break;\n default:\n throw new Error('Content entity key is not supported');\n }\n return result;\n }\n }\n);\n\nexplanationBlock.define({\n children: [explanationBlock]\n});\n\nexport default explanationBlock;\n","import { schema } from 'normalizr';\nimport { renameProperty, guid } from 'utils/object';\nimport { INFORMATION_CONTENT } from 'constants/questionTypes';\nimport { getInitialQuestionResponse } from 'store/initialState';\nimport content from './content';\nimport explanationBlock from './explanationBlock';\n\nexport type QuestionChildren = Array\n\nexport function transferPropBetweenObj(currentList: [{ [key: string]: any }], nameOfTargetProp: string, targetList: [{ [key: string]: any }]) {\n if (currentList) {\n currentList.forEach((prop: any) => {\n if (prop[nameOfTargetProp] && prop[nameOfTargetProp].length) {\n prop[nameOfTargetProp].forEach((item: any) => {\n targetList.push({ id: item.id });\n });\n }\n });\n }\n}\n\nexport function transferExplanationBlocks(answerList: [{ [key: string]: any }], targetList: [{ [key: string]: any }]) {\n if (answerList) {\n answerList.forEach((answer: any) => {\n if (answer.explanationBlocks && answer.explanationBlocks.length) {\n answer.explanationBlocks.forEach((explanation: any) => {\n const entity: { [key: string]: any } = {\n id: explanation.id\n };\n if (explanation.children && explanation.children.length) {\n entity.children = explanation.children;\n }\n targetList.push(entity);\n });\n }\n });\n }\n}\n\nconst question = new schema.Entity(\n 'questions',\n {\n children: [content],\n instructions: [content],\n hints: [content],\n correctFeedback: [content],\n incorrectFeedback: [content],\n questionContent: [content],\n explanationBlocks: [explanationBlock],\n },\n {\n processStrategy: (value, parent) => {\n const result = {\n ...value,\n questionContent: [],\n children: [] as QuestionChildren,\n explanationBlocks: [],\n sectionId: parent.id,\n score: 0,\n hasBeenOpened: false,\n isAnswered: false,\n isAnsweredCorrectly: false,\n response: getInitialQuestionResponse(value.type),\n affectsProgress: value.type !== INFORMATION_CONTENT\n };\n\n if (result.hasOwnProperty('isSurvey') && result.affectsProgress) {\n result.affectsProgress = !result.isSurvey;\n }\n\n\n if (result.hasContent) {\n result.questionContent.push({ id: guid() });\n }\n\n transferPropBetweenObj(result.learningContents, 'children', result.children);\n transferPropBetweenObj(result.questionInstructions, 'children', result.children);\n transferPropBetweenObj(result.questionCorrectFeedbacks, 'children', result.children);\n transferPropBetweenObj(result.questionIncorrectFeedbacks, 'children', result.children);\n\n transferExplanationBlocks(result.answers, result.explanationBlocks);\n\n renameProperty(result, 'questionInstructions', 'instructions');\n renameProperty(result, 'learningContents', 'hints');\n renameProperty(result, 'questionCorrectFeedbacks', 'correctFeedback');\n renameProperty(result, 'questionIncorrectFeedbacks', 'incorrectFeedback');\n delete result.hasCorrectFeedback;\n delete result.hasIncorrectFeedback;\n delete result.hasContent;\n return result;\n }\n }\n);\n\nexport default question;\n","import { schema } from 'normalizr';\nimport question from './question';\nimport { ProgressStatus } from 'constants/progressStatus';\n\nconst section = new schema.Entity(\n 'sections',\n {\n questions: [question]\n },\n {\n processStrategy: (value: any) => ({\n ...value,\n score: 0,\n status: ProgressStatus.IN_PROGRESS\n })\n }\n);\n\nexport default section;\n","import { schema } from 'normalizr';\n\nconst afterword = new schema.Entity(\n 'contents',\n {},\n {\n processStrategy: (value: any, parent: any, key: string) => {\n const result = {\n ...value,\n value: undefined\n };\n switch (key) {\n case 'children':\n result.url = `afterword/${value.id}.html`;\n break;\n case 'passedAfterwords':\n result.url = `afterword/${value.id}.html`;\n break;\n case 'failedAfterwords':\n result.url = `afterword/${value.id}.html`;\n break;\n default:\n throw new Error('Content entity key is not supported');\n }\n return result;\n }\n }\n);\n\nafterword.define({\n children: [afterword]\n});\n\nexport default afterword;\n","import { schema } from 'normalizr';\n\nconst introduction = new schema.Entity(\n 'contents',\n {},\n {\n processStrategy: (value: any, parent: any, key: string) => {\n const result = {\n ...value,\n value: undefined\n };\n switch (key) {\n case 'children':\n result.url = `introduction/${value.id}.html`;\n break;\n case 'introductions':\n result.url = `introduction/${value.id}.html`;\n break;\n default:\n throw new Error('Content entity key is not supported');\n }\n return result;\n }\n }\n);\n\nintroduction.define({\n children: [introduction]\n});\n\nexport default introduction;\n","import { schema } from 'normalizr';\nimport section from './section';\nimport afterword from './afterword';\nimport introduction from './introductions';\nimport { ProgressStatus } from 'constants/progressStatus';\n\nconst course = new schema.Entity(\n 'course',\n {\n sections: [section],\n introductions: [introduction],\n passedAfterwords: [afterword],\n failedAfterwords: [afterword]\n },\n {\n processStrategy: value => ({\n ...value,\n score: 0,\n status: ProgressStatus.IN_PROGRESS\n })\n }\n);\n\nexport default course;\n","import { normalize } from 'normalizr';\nimport questionTypes, { INFORMATION_CONTENT } from 'constants/questionTypes';\nimport courseSchema from '../schemas/course/course';\n\n/* eslint-disable import/prefer-default-export */\nexport default {\n map: (data: any, showContentPages: boolean) => {\n const normalized: any = normalize(filterCourseData(data, showContentPages), courseSchema);\n const course: any = normalized.entities.course[normalized.result];\n const { sections, questions, contents } = normalized.entities;\n\n return {\n course,\n sections,\n questions,\n contents\n };\n }\n};\n\nfunction filterCourseData(data: any, showContentPages: boolean) {\n data.sections = data.sections.filter((section: any) => {\n section.questions = section.questions.filter((question: any) => {\n question.attemptNumber = 0;\n return questionTypes.includes(question.type);\n });\n if (!showContentPages) {\n section.questions = section.questions.filter(\n (question: any) => question.type !== INFORMATION_CONTENT\n );\n }\n return section.questions.length > 0;\n });\n\n return data;\n}\n","export const shuffle = (obj: any) => {\n let ctr = obj.length;\n let temp;\n let index;\n while (ctr > 0) {\n index = Math.floor(Math.random() * ctr);\n ctr--;\n temp = obj[ctr];\n obj[ctr] = obj[index];\n obj[index] = temp;\n }\n return obj;\n};\n\nexport default shuffle;\n","import {\n SINGLE_CHOICE,\n MULTIPLE_CHOICE,\n STATEMENT_CHOICE,\n SINGLE_CHOICE_IMAGE,\n RANKING_TEXT,\n DRAG_AND_DROP_TEXT,\n TEXT_MATCHING\n} from 'constants/questionTypes';\nimport shuffle from 'lodash.shuffle';\nimport { objectToArray, arrayToObject } from 'utils/object';\nimport shuffleAnswerOptions from 'utils/questions';\n\nconst OPTION_ID_LENGTH = 6;\nconst OPTION_MAP_ORDER_KEY = 'id';\n\nconst truncate = (id: string, maxLength: number) =>\n id.length > maxLength ? id.slice(0, maxLength) : id;\n\nconst shortenOptionIds = (options: any[]) =>\n options.map((option: { id: string }) => truncate(option.id, OPTION_ID_LENGTH));\n\nconst mapOrder = (array: any[] = [], order: any[] = []) =>\n [...array].sort((a, b) =>\n order.indexOf(truncate(a[OPTION_MAP_ORDER_KEY], OPTION_ID_LENGTH)) >\n order.indexOf(truncate(b[OPTION_MAP_ORDER_KEY], OPTION_ID_LENGTH))\n ? 1\n : -1\n );\n\nexport const mapRandomizedOptionsOrder = (\n questions: any = {},\n randomizedOptionsArray: any[][] = []\n) =>\n objectToArray(questions).map((question, index) => {\n let questionWithRandomizedOptions;\n switch (question.type) {\n case DRAG_AND_DROP_TEXT:\n questionWithRandomizedOptions = {\n ...question,\n ...{ randomizedOptions: mapOrder(question.dropspots, randomizedOptionsArray[index]) }\n };\n break;\n case SINGLE_CHOICE:\n case MULTIPLE_CHOICE:\n case STATEMENT_CHOICE:\n case SINGLE_CHOICE_IMAGE:\n case TEXT_MATCHING:\n case RANKING_TEXT:\n questionWithRandomizedOptions = {\n ...question,\n ...{ randomizedOptions: mapOrder(question.answers, randomizedOptionsArray[index]) }\n };\n break;\n default:\n questionWithRandomizedOptions = { ...question };\n }\n return questionWithRandomizedOptions;\n });\n\nexport const buildRandomizedOptions = (questions: any) =>\n objectToArray(questions).reduce((randomizedOptionsArray, question) => {\n switch (question.type) {\n case DRAG_AND_DROP_TEXT:\n randomizedOptionsArray.push(shuffle(shortenOptionIds([...question.dropspots])));\n break;\n case SINGLE_CHOICE:\n case MULTIPLE_CHOICE:\n case STATEMENT_CHOICE:\n case SINGLE_CHOICE_IMAGE:\n case TEXT_MATCHING:\n randomizedOptionsArray.push(shuffle(shortenOptionIds([...question.answers])));\n break;\n case RANKING_TEXT:\n randomizedOptionsArray.push(shuffleAnswerOptions(shortenOptionIds([...question.answers])));\n break;\n default:\n randomizedOptionsArray.push([]);\n }\n return randomizedOptionsArray;\n }, []);\n\nexport const buildQuestionWithRandomizedOptions = (\n questions: any = {},\n randomizedOptionsArray: any[][] = []\n) =>\n arrayToObject(\n mapRandomizedOptionsOrder(questions, randomizedOptionsArray).map(question => [\n question.id,\n { ...question }\n ])\n );\n","import courseMapper from 'core/mappers/course';\nimport { guidWithHyphens } from 'utils/object';\nimport * as questionActions from 'store/questions/actions';\nimport * as contentsActions from 'store/contents/actions';\nimport * as sectionActions from 'store/sections/actions';\nimport {\n initializeXapi,\n subscribeXapi,\n unsubscribeXapi,\n initializeScorm\n} from 'store/modules/actions';\nimport * as navigationActions from 'store/navigation/actions';\nimport { isXapiInitialized, shouldInitializeXapi } from 'store/modules/selectors';\nimport {\n getAffectProgressSections,\n getSections,\n isSectionsPassed,\n isSectionsFailed\n} from 'store/sections/selectors';\nimport { getValueFromUrl } from 'utils/window';\nimport {\n getCourse,\n getAttemptId,\n hasBeenContinued,\n isCourseAccessLimited,\n getCourseAttempt,\n getPreviewQuestionId,\n getTimeSpent,\n isAttemptSubmitted,\n isInProgress,\n getTimerProgressKey\n} from 'store/course/selectors';\nimport eventEmitter, { events } from 'core/events/eventEmitter';\nimport { getUser, isAnonymous } from 'store/user/selectors';\nimport {\n getQuestions,\n getQuestion,\n getAffectProgressQuestions,\n getQuestionSection,\n isAllQuestionsFailed,\n getCorrectlyAffectProgressAnsweredQuestionsCount,\n isAllQuestionsTimedOut,\n hasAnyQuestionOpened\n} from 'store/questions/selectors';\n\nimport sampleSize from 'lodash.samplesize';\nimport shuffle from 'utils/shuffle';\nimport progressStorage from 'core/progressStorage';\nimport { INDEX_PATH } from 'constants/navigation';\nimport { DEFAULT_QUESTION_POOL_ID_LENGTH } from 'constants/common';\nimport { getQuestionUrl } from 'utils/navigation';\nimport { ProgressStatus } from 'constants/progressStatus';\nimport { TimerStatus, PROGRESS_STORAGE_TIMER_UPDATE_INTERVAL } from 'constants/timer';\nimport * as courseTimerActions from 'store/timer/actions';\nimport { TimerState } from 'store/timer/types';\nimport {\n buildRandomizedOptions,\n buildQuestionWithRandomizedOptions\n} from 'core/dataProcessors/questionOptions';\nimport {\n isShowContentPagesEnabled,\n isReviewMode,\n isPreviewMode,\n isScormMode,\n isOverallMasteryScore,\n getMasteryScoreValue,\n shouldSubmitAllQuestions,\n isQuestionPoolEnabled,\n getQuestionPoolSize,\n isQuestionRandomizeEnabled,\n isAnswersFromPreviousAttemptEnabled,\n getTimerEnabled,\n isAllQuestionsOnOnePage,\n isRandomizeAnswersEnabled\n} from '../settings/selectors';\n\nimport { ActionTypes } from './types';\nimport { ThunkResult } from '../types';\nimport { arrayToObject } from '../../utils/object';\n\nconst buildQuestionPool = (questions: any[], questionPoolIds: string[]): any[] => {\n let tempQuestion;\n const sortedQuestions = [];\n sortedQuestions.push(\n ...questionPoolIds.map(questionPoolId => {\n tempQuestion = questions.find(\n question => question.id.slice(0, questionPoolId.length) === questionPoolId\n );\n if (tempQuestion === -1) {\n throw new Error('Question not found');\n }\n tempQuestion.isPoolQuestion = true;\n return tempQuestion;\n })\n );\n\n sortedQuestions.push(\n ...questions.filter(question => {\n if (!questionPoolIds.includes(question.id.slice(0, questionPoolIds[0].length))) {\n question.isPoolQuestion = false;\n return question;\n }\n return false;\n })\n );\n\n return sortedQuestions;\n};\n\nexport const loadPoolQuestions = (\n questions: any[],\n questionPoolIds: string[]\n): ThunkResult> => async dispatch => {\n let questionPool = [...buildQuestionPool(questions, questionPoolIds)];\n\n questionPool = questionPool.map(question => [question.id, { ...question }]);\n const questionPoolObjects = arrayToObject(questionPool);\n dispatch(questionActions.questionsLoaded(questionPoolObjects));\n dispatch(navigationActions.poolUrlReset(questionPoolObjects));\n};\n\nconst getShortenedIds = (questions: any[], idLength = DEFAULT_QUESTION_POOL_ID_LENGTH): any => {\n const maxIdLength = questions[0]?.id.length;\n let shortenedIds: string[] = [];\n\n idLength = idLength > maxIdLength ? maxIdLength : idLength;\n for (let i = idLength; i <= maxIdLength; i++) {\n const uniqueShortenedIds = new Set(shortenedIds);\n if (uniqueShortenedIds.size === questions.length) {\n return shortenedIds;\n }\n shortenedIds = questions.map(question => question.id.slice(0, i));\n }\n\n return shortenedIds;\n};\n\nexport const clearPreviewQuestionId = (): ThunkResult => dispatch => {\n dispatch({ type: ActionTypes.CLEAR_PREVIEW_QUESTION_ID });\n};\n\nexport const markCourseAsPassed = (): ThunkResult> => async (dispatch, getState) => {\n const affectProgressSections = getAffectProgressSections(getState());\n const isCoursePassed =\n getMasteryScoreValue(getState()) === 0 || affectProgressSections.length === 0;\n\n if (isCoursePassed) {\n affectProgressSections.forEach(section =>\n dispatch(sectionActions.onSectionIsPassed(section.id))\n );\n\n await dispatch({\n type: ActionTypes.COURSE_IS_PASSED,\n payload: {\n status: ProgressStatus.PASSED\n }\n });\n }\n};\n\nexport const updateScorePerCourse = (): ThunkResult> => async (\n dispatch,\n getState\n) => {\n const affectProgressQuestions = getAffectProgressQuestions(getState());\n const masteryScore = getMasteryScoreValue(getState());\n\n const correctlyAnsweredQuestionsCount = getCorrectlyAffectProgressAnsweredQuestionsCount(\n getState()\n );\n\n const score =\n affectProgressQuestions.length > 0\n ? Math.floor((correctlyAnsweredQuestionsCount * 100) / affectProgressQuestions.length)\n : 100;\n\n let status = ProgressStatus.IN_PROGRESS;\n\n if (isAllQuestionsFailed(getState()) || isAllQuestionsTimedOut(getState())) {\n status = ProgressStatus.FAILED;\n }\n\n if (score >= masteryScore) {\n status = ProgressStatus.PASSED;\n }\n\n dispatch({\n type: ActionTypes.COURSE_SCORE_UPDATED,\n payload: {\n score,\n status\n }\n });\n};\n\nexport const updateScorePerSection = (): ThunkResult> => async (\n dispatch,\n getState\n) => {\n const sections = getAffectProgressSections(getState());\n const totalScore = sections.reduce((sum, section) => sum + section.score, 0);\n const score = sections.length > 0 ? Math.floor(totalScore / sections.length) : 100;\n let status = ProgressStatus.IN_PROGRESS;\n\n if (isSectionsFailed(getState())) {\n status = ProgressStatus.FAILED;\n }\n if (isSectionsPassed(getState())) {\n status = ProgressStatus.PASSED;\n }\n\n dispatch({\n type: ActionTypes.COURSE_SCORE_UPDATED,\n payload: {\n score,\n status\n }\n });\n};\n\nexport const makeSubmitAtOnce = (): ThunkResult> => async dispatch => {\n dispatch({\n type: ActionTypes.COURSE_SUBMIT_AT_ONCE\n });\n};\n\nexport const updateSubmitAtOnceAttemptNumber = (): ThunkResult> => async (\n dispatch,\n getState\n) => {\n const courseAttempt = getCourseAttempt(getState()) ? getCourseAttempt(getState()) + 1 : 1;\n dispatch({\n type: ActionTypes.COURSE_SUBMIT_AT_ONCE_LIMITED,\n payload: {\n courseAttempt\n }\n });\n await eventEmitter.emit(events.COURSE_SUBMIT_AT_ONCE_LIMITED, courseAttempt);\n};\n\nexport const courseAttemptedSubmitAtOnce = (): ThunkResult> => async dispatch => {\n dispatch({\n type: ActionTypes.COURSE_REATTEMPTED_SUBMIT_AT_ONCE\n });\n};\n\nconst setTimeSpent = (value: number): ThunkResult> => async dispatch => {\n await dispatch({\n type: ActionTypes.TIME_SPENT_UPDATED,\n payload: {\n timeSpent: {\n accumulatedValueInMilliseconds: value,\n incrementStartedAt: new Date()\n }\n }\n });\n};\n\nconst getClickedId = (url: any) => {\n const clickedId = url.split('/');\n if (clickedId[clickedId.length - 1] === 'learning-objective') {\n return clickedId.slice(-2, -1)[0];\n }\n return clickedId.slice(-1)[0];\n};\n\nexport const setTimerProgress = (\n timerProgress: TimerState = { elapsed: 0, status: TimerStatus.NOT_STARTED }\n): ThunkResult> => async (dispatch, getState) => {\n if (timerProgress.status === TimerStatus.RESET) {\n localStorage.setItem(getTimerProgressKey(getState()), '0');\n }\n\n const localStorageTimerProgress = localStorage.getItem(getTimerProgressKey(getState())) || '0';\n const elapsedTime = timerProgress.elapsed || 0;\n const elapsedTimeDelta = parseInt(localStorageTimerProgress, 10) - elapsedTime;\n\n if (\n elapsedTime > 0 ||\n (elapsedTimeDelta > 0 && elapsedTimeDelta < PROGRESS_STORAGE_TIMER_UPDATE_INTERVAL) ||\n hasAnyQuestionOpened(getState())\n ) {\n dispatch(\n courseTimerActions.setTimerStatus(\n timerProgress.status === TimerStatus.NOT_STARTED\n ? TimerStatus.STARTED\n : timerProgress.status\n )\n );\n dispatch(\n courseTimerActions.setTimerElapsed(\n Math.max(timerProgress.elapsed, parseInt(localStorageTimerProgress, 10))\n )\n );\n localStorage.setItem(\n getTimerProgressKey(getState()),\n `${Math.max(timerProgress.elapsed, parseInt(localStorageTimerProgress, 10))}`\n );\n } else if (timerProgress.status === TimerStatus.STARTED) {\n dispatch(courseTimerActions.setTimerStatus(timerProgress.status));\n dispatch(courseTimerActions.setTimerElapsed(timerProgress.elapsed));\n }\n};\n\nconst emitCourseProgressed = async (state: any) => {\n const course = getCourse(state);\n let courseStatus = course.status;\n if (isAttemptSubmitted(state) && isInProgress(state) && shouldSubmitAllQuestions(state)) {\n courseStatus = ProgressStatus.FAILED;\n }\n\n let eventToCall = events.COURSE_PROGRESSED;\n if (shouldSubmitAllQuestions(state) && !isAttemptSubmitted(state)) {\n eventToCall = events.SUBMIT_ONCE_COURSE_PROGRESSED;\n }\n\n return eventEmitter.emit(eventToCall, {\n ...state,\n course,\n timeSpent: getTimeSpent(state),\n xapiStatus: courseStatus\n });\n};\n\nexport const updateScore = (): ThunkResult> => async (dispatch, getState) => {\n const masteryScorePerCourse = isOverallMasteryScore(getState());\n\n if (masteryScorePerCourse) {\n dispatch(updateScorePerCourse());\n } else {\n const isQuestionPoolAllowed = isQuestionPoolEnabled(getState());\n if (!isQuestionPoolAllowed) {\n dispatch(updateScorePerSection());\n }\n }\n};\n\nexport const updateProgress = (): ThunkResult> => async (dispatch, getState) => {\n dispatch(updateScore());\n emitCourseProgressed(getState());\n};\n\nexport const load = (data: any): ThunkResult> => async (dispatch, getState) => {\n dispatch({ type: ActionTypes.COURSE_DATA_LOADING_STARTED });\n try {\n const showContentPages = isShowContentPagesEnabled(getState());\n const { course, sections, questions, contents } = courseMapper.map(data, showContentPages);\n\n if (getValueFromUrl('questionId')) {\n course.previewQuestionId = getValueFromUrl('questionId');\n }\n dispatch(questionActions.questionsLoaded(questions));\n dispatch(sectionActions.sectionsLoaded(sections));\n dispatch(contentsActions.contentsLoaded(contents));\n await dispatch({ type: ActionTypes.COURSE_DATA_LOADED, payload: course });\n eventEmitter.emit(events.APP_INITIALIZED, {\n state: getState(),\n isScormMode: isScormMode(getState())\n });\n } catch (e) {\n dispatch({ type: ActionTypes.COURSE_DATA_LOADING_FAILED, reason: e });\n throw e;\n }\n};\n\nexport const processPoolQuestions = (): ThunkResult> => async (\n dispatch,\n getState\n) => {\n const inProgressQuestionPool = progressStorage.getQuestionPool();\n const questions = getQuestions(getState());\n const questionPoolSize = getQuestionPoolSize(getState());\n const nonSurveyQuestions = questions.filter(question => !question.isSurvey);\n if (inProgressQuestionPool && inProgressQuestionPool.length > 0) {\n await dispatch(loadPoolQuestions(questions, inProgressQuestionPool));\n } else {\n const randomQuestionsSubset = sampleSize(nonSurveyQuestions, questionPoolSize);\n // shortening ids to save on the storage space(4Kb) for suspend_data in scorm enabled lms\n const questionPoolIds = getShortenedIds(randomQuestionsSubset);\n await dispatch(loadPoolQuestions(questions, questionPoolIds));\n await eventEmitter.emit(events.COURSE_QUESTION_POOL_SELECTED, {\n questionPoolIds,\n state: getState()\n });\n }\n};\n\nexport const loadAnswers = (showPrevAnswer: boolean): ThunkResult> => async (\n dispatch,\n getState\n) => {\n const questions = getQuestions(getState());\n const answers = progressStorage.getAnswers(questions);\n const sectionIds = new Set();\n for (const { id, response, attempt } of answers) {\n const question = getQuestion(getState(), id);\n sectionIds.add(question.sectionId);\n dispatch(questionActions.restoreProgress(id, response, attempt, showPrevAnswer));\n }\n\n if (getTimerEnabled(getState())) {\n await dispatch(setTimerProgress(progressStorage.timer));\n }\n\n if (!isQuestionPoolEnabled(getState())) {\n for (const sectionId of sectionIds) {\n dispatch(sectionActions.updateSection(sectionId as string));\n }\n }\n await dispatch(updateScore());\n};\n\nexport const processRandomizeAnswers = (): ThunkResult> => async (\n dispatch,\n getState\n) => {\n const storedRandomizedAnswersList = progressStorage.getRandomizeAnswers();\n const questions = getQuestions(getState());\n if (storedRandomizedAnswersList?.length > 0) {\n dispatch(\n questionActions.questionsLoaded(\n buildQuestionWithRandomizedOptions(getQuestions(getState()), storedRandomizedAnswersList)\n )\n );\n } else {\n const randomizedOptionsList = buildRandomizedOptions(questions);\n dispatch(\n questionActions.questionsLoaded(\n buildQuestionWithRandomizedOptions(getQuestions(getState()), randomizedOptionsList)\n )\n );\n await eventEmitter.emit(events.COURSE_RANDOMIZED_OPTIONS_SAVED, {\n randomizedOptionsList,\n state: getState()\n });\n }\n dispatch({\n type: ActionTypes.COURSE_RANDOMIZED_OPTIONS_LOADED\n });\n};\n\nexport const setCourseAttempt = (attempt: number): ThunkResult> => async dispatch => {\n dispatch({\n type: ActionTypes.COURSE_SUBMIT_AT_ONCE_LIMITED,\n payload: {\n courseAttempt: attempt\n }\n });\n};\n\nexport const setCourseAttemptOnTimeOut = (): ThunkResult> => async dispatch => {\n try {\n await progressStorage.restoreProgress();\n if (progressStorage?.courseAttemptNumber) {\n dispatch(setCourseAttempt(progressStorage.courseAttemptNumber));\n }\n } catch (e) {\n console.error(e);\n }\n};\n\nexport const restoreProgress = (): ThunkResult> => async (\n dispatch,\n getState\n): Promise => {\n try {\n const isProgressRestored = await progressStorage.restoreProgress();\n dispatch({ type: ActionTypes.COURSE_PROGRESS_RESTORE_FETCHED });\n\n const isQuestionPoolAllowed = isQuestionPoolEnabled(getState());\n\n if (isQuestionPoolAllowed) {\n await dispatch(processPoolQuestions());\n }\n\n const randomizeAnswersEnabled = isRandomizeAnswersEnabled(getState());\n\n if (randomizeAnswersEnabled) {\n await dispatch(processRandomizeAnswers());\n }\n\n if (!isProgressRestored) {\n return false;\n }\n\n const isSubmitAllAtOnce = shouldSubmitAllQuestions(getState());\n const isCourseOnOnePage = isAllQuestionsOnOnePage(getState());\n await dispatch(loadAnswers(false));\n\n if (isSubmitAllAtOnce) {\n const { allQuestionsSubmitted } = progressStorage;\n const { courseAttemptNumber } = progressStorage;\n await dispatch(setCourseAttempt(courseAttemptNumber));\n\n if (allQuestionsSubmitted) {\n await dispatch(makeSubmitAtOnce());\n }\n }\n\n if (progressStorage.timeSpent) {\n await dispatch(setTimeSpent(progressStorage.timeSpent));\n }\n\n if (isCourseOnOnePage) {\n await dispatch(\n navigationActions.updateElementIdInViewPort(getClickedId(progressStorage.url))\n );\n }\n\n dispatch({\n type: ActionTypes.COURSE_PROGRESS_RESTORED,\n payload: { attemptId: progressStorage.attemptId }\n });\n return true;\n } catch (e) {\n dispatch({ type: ActionTypes.COURSE_PROGRESS_RESTORE_FAILED, reason: e });\n return false;\n }\n};\n\nexport const onCourseLaunched = (attemptId?: string): ThunkResult => dispatch => {\n dispatch({\n type: ActionTypes.COURSE_LAUNCHED,\n payload: { attemptId }\n });\n eventEmitter.emit(events.COURSE_LAUNCHED, attemptId);\n};\n\nexport const onCourseStarted = (): ThunkResult> => async dispatch => {\n await dispatch({\n type: ActionTypes.COURSE_STARTED\n });\n\n await dispatch(setTimeSpent(0));\n await eventEmitter.emit(events.COURSE_STARTED);\n};\n\nconst loadScormMode = (): ThunkResult> => async (dispatch, getState) => {\n if (isScormMode(getState())) {\n await dispatch(initializeScorm());\n await progressStorage.checkScormNonAsciiSupport();\n } else {\n if (isAnonymous(getState())) {\n await eventEmitter.emit(events.APP_INITIALIZED, {\n state: getState(),\n isScormMode: isScormMode(getState())\n });\n }\n await eventEmitter.emit(events.USER_AUTHENTICATED, getUser(getState()));\n }\n};\n\nconst loadPreviewMode = (): ThunkResult> => async (dispatch, getState) => {\n const isQuestionPoolAllowed = isQuestionPoolEnabled(getState());\n if (isQuestionPoolAllowed) {\n await dispatch(processPoolQuestions());\n }\n dispatch(onCourseLaunched());\n dispatch(onCourseStarted());\n const previewQuestionId = getPreviewQuestionId(getState());\n const randomizeAnswersEnabled = isRandomizeAnswersEnabled(getState());\n if (randomizeAnswersEnabled) {\n await dispatch(processRandomizeAnswers());\n }\n if (previewQuestionId) {\n const previewSectionId = getQuestionSection(getState(), previewQuestionId);\n const questionUrl = getQuestionUrl(previewSectionId, previewQuestionId);\n dispatch(clearPreviewQuestionId());\n return questionUrl;\n }\n return INDEX_PATH;\n};\n\nconst loadPreviouslyAnsweredQuestions = (\n restoreStatus: boolean\n): ThunkResult> => async (dispatch, getState) => {\n if (\n !restoreStatus &&\n isAnswersFromPreviousAttemptEnabled(getState()) &&\n shouldSubmitAllQuestions(getState())\n ) {\n const isAnswersInProgress = await progressStorage.restoreAnswers();\n if (isAnswersInProgress) {\n await dispatch(loadAnswers(true));\n }\n }\n};\n\nexport const launch = (): ThunkResult> => async (dispatch, getState) => {\n if (isCourseAccessLimited(getState())) {\n dispatch(onCourseLaunched());\n return INDEX_PATH;\n }\n\n await dispatch(markCourseAsPassed());\n\n if (isPreviewMode(getState()) || isReviewMode(getState())) {\n return dispatch(loadPreviewMode());\n }\n\n await dispatch(loadScormMode());\n\n const restoreStatus = await dispatch(restoreProgress());\n\n let attemptId = getAttemptId(getState());\n if (!attemptId) {\n attemptId = guidWithHyphens();\n }\n\n // TODO: events\n dispatch(onCourseLaunched(attemptId));\n\n if (!restoreStatus) {\n await eventEmitter.emit(events.COURSE_ATTEMPT_STARTED, getState());\n }\n\n dispatch(loadPreviouslyAnsweredQuestions(restoreStatus));\n\n const state = getState();\n if (shouldInitializeXapi(state)) {\n await dispatch(initializeXapi());\n await dispatch(subscribeXapi());\n }\n\n if (hasBeenContinued(getState())) {\n return progressStorage.url || INDEX_PATH;\n }\n\n await dispatch(onCourseStarted());\n\n if (\n getMasteryScoreValue(getState()) === 0 ||\n getAffectProgressSections(getState()).length === 0\n ) {\n await emitCourseProgressed(getState());\n }\n\n return INDEX_PATH;\n};\n\nexport const cleanup = (isLogout: boolean): ThunkResult> => async (\n dispatch,\n getState\n) => {\n dispatch({\n type: ActionTypes.COURSE_CLEANUP\n });\n\n dispatch(courseTimerActions.resetTimer());\n localStorage.setItem(getTimerProgressKey(getState()), '0');\n\n const sections = getSections(getState());\n sections.forEach(section => {\n dispatch(sectionActions.cleanup(section.id));\n });\n const questions = getQuestions(getState());\n\n if (\n shouldSubmitAllQuestions(getState()) &&\n isAnswersFromPreviousAttemptEnabled(getState()) &&\n !isLogout\n ) {\n questions.forEach(question => {\n dispatch(questionActions.cleanupKeepAnswers(question.id));\n });\n } else {\n questions.forEach(question => {\n dispatch(questionActions.cleanup(question.id));\n });\n }\n\n if (isXapiInitialized(getState())) {\n await dispatch(unsubscribeXapi());\n }\n};\n\nexport const finished = (): ThunkResult> => async (dispatch, getState) => {\n dispatch({\n type: ActionTypes.COURSE_FINISHED\n });\n eventEmitter.emit(events.COURSE_FINISHED, getCourse(getState()));\n};\n\nexport const finalized = (): ThunkResult> => async (dispatch, getState) => {\n dispatch({\n type: ActionTypes.COURSE_FINALIZED\n });\n eventEmitter.emit(events.COURSE_FINALIZED, getCourse(getState()));\n};\n\nexport const startNewAttempt = (): ThunkResult> => async (dispatch, getState) => {\n const currentAttemptCount = getCourseAttempt(getState());\n await dispatch(cleanup(false));\n await progressStorage.removeProgress();\n if (shouldSubmitAllQuestions(getState())) {\n await dispatch(courseAttemptedSubmitAtOnce());\n await dispatch(setCourseAttempt(currentAttemptCount));\n }\n\n if (isQuestionRandomizeEnabled(getState())) {\n let inProgressQuestionPool = progressStorage.getQuestionPool();\n if (inProgressQuestionPool && inProgressQuestionPool.length > 0) {\n inProgressQuestionPool = shuffle(inProgressQuestionPool);\n await eventEmitter.emit(events.COURSE_QUESTION_POOL_SELECTED, {\n questionPoolIds: inProgressQuestionPool,\n state: getState()\n });\n }\n }\n await dispatch(launch());\n};\n\nexport const certificateDownloaded = (\n isCertificateDownloaded: boolean\n): ThunkResult => dispatch => {\n dispatch({\n type: ActionTypes.CERTIFICATE_DOWNLOADED,\n payload: { isCertificateDownloaded }\n });\n};\n\nexport const evaluate = (data: { score: number; response: any }) => () => {\n const { score, response } = data;\n eventEmitter.emit(events.COURSE_EVALUATED, {\n score,\n response\n });\n};\n","import eventEmitter, { events } from 'core/events/eventEmitter';\nimport fetch from 'fetch-retry';\nimport originalFetch from 'isomorphic-fetch';\n\nexport const RETRY_DELAY_MILLISECONDS = 3000;\ntype RequestData = { [key: string]: any };\nlet lastRequestSuccess = true;\nconst defaultCredentials = 'same-origin';\nconst defaultRetryOptions = {\n retryDelay: RETRY_DELAY_MILLISECONDS,\n retryOn(attempt: number, error: any, response: any) {\n if (error !== null || response.status >= 500) {\n lastRequestSuccess && eventEmitter.emit(events.APP_OFFLINE_OR_SERVER_ERROR);\n lastRequestSuccess = false;\n return true;\n }\n\n !lastRequestSuccess && eventEmitter.emit(events.APP_ONLINE);\n lastRequestSuccess = true;\n return false;\n }\n};\n\nconst fetchRetry = fetch(originalFetch, defaultRetryOptions);\n\nconst getRequestOptions = (requestOptions: any, retryOptions: any) => ({\n ...retryOptions,\n ...requestOptions\n});\n\nexport class Requester {\n public async get(\n url: string,\n {\n headers,\n cacheBuster,\n credentials = defaultCredentials,\n mode,\n query,\n retryOptions\n }: RequestData\n ) {\n const queryString = this._buildQueryString(query, cacheBuster);\n const requestOptions = {\n method: 'GET',\n headers: this._buildHeaders(headers, cacheBuster),\n credentials,\n mode\n };\n\n return fetchRetry(url + queryString, getRequestOptions(requestOptions, retryOptions));\n }\n\n public async post(\n url: string,\n {\n headers,\n cacheBuster,\n credentials = defaultCredentials,\n data,\n retryOptions,\n referrerPolicy\n }: RequestData\n ) {\n const body = JSON.stringify(data);\n\n if ('Content-Type' in headers) {\n headers['Content-Length'] = body.length;\n }\n\n const requestOptions = {\n method: 'POST',\n headers: this._buildHeaders(headers, cacheBuster),\n body,\n credentials,\n referrerPolicy\n };\n\n return fetchRetry(url, getRequestOptions(requestOptions, retryOptions));\n }\n\n public async put(\n url: string,\n {\n headers,\n cacheBuster,\n credentials = defaultCredentials,\n data,\n query,\n retryOptions\n }: RequestData\n ) {\n const queryString = this._buildQueryString(query, cacheBuster);\n const body = JSON.stringify(data);\n if ('Content-Type' in headers) {\n headers['Content-Length'] = body.length;\n }\n\n const requestOptions = {\n method: 'PUT',\n headers: this._buildHeaders(headers, cacheBuster),\n body,\n credentials\n };\n\n return fetchRetry(url + queryString, getRequestOptions(requestOptions, retryOptions));\n }\n\n private _buildQueryString(query: any, cacheBuster: any) {\n if (!query) {\n query = {};\n }\n let queryString = '';\n\n query.v = cacheBuster || +new Date();\n for (let key of Object.keys(query)) {\n queryString += `&${encodeURIComponent(key)}=${encodeURIComponent(query[key])}`;\n }\n if (queryString) {\n queryString = queryString.replace('&', '?');\n }\n\n return queryString;\n }\n\n private _buildHeaders(headers: { [key: string]: any } = {}, cacheBuster = '') {\n const _headers = Object.assign({}, headers);\n const CACHE_EXPIRATION_DATE_IN_SECONDS = 2678400;\n if (cacheBuster) {\n _headers['Cache-Control'] = 'public';\n _headers.Pragma = 'public';\n _headers.Expires = CACHE_EXPIRATION_DATE_IN_SECONDS;\n } else {\n _headers['Cache-Control'] = 'no-cache';\n _headers.Pragma = 'no-cache';\n _headers.Expires = 0;\n }\n\n return _headers;\n }\n}\n\nexport default new Requester();\n","export type SectionsState = {\n [key: string]: {\n [key: string]: any;\n };\n};\n\nexport enum ActionTypes {\n SECTIONS_LOADED = 'SECTIONS_LOADED',\n SECTION_SCORE_UPDATED = 'SECTION_SCORE_UPDATED',\n SECTION_IS_PASSED = 'SECTION_PASSED',\n SECTION_ANSWERED = 'SECTION_ANSWERED',\n SECTION_ANSWERED_SCORE = 'SECTION_ANSWERED_SCORE'\n}\n\ntype SectionScoreUpdated = {\n [key: string]: any;\n type: ActionTypes.SECTION_SCORE_UPDATED;\n payload: {\n id: string;\n score: number;\n status: number;\n };\n};\n\ntype SectionPassed = {\n [key: string]: any;\n type: ActionTypes.SECTION_IS_PASSED;\n payload: {\n id: string;\n status: number;\n };\n};\n\ntype SectionAnswered = {\n [key: string]: any;\n type: ActionTypes.SECTION_ANSWERED;\n payload: {\n id: string;\n isSectionAnswered: boolean;\n };\n};\n\ntype SectionAnsweredProgress = {\n [key: string]: any;\n type: ActionTypes.SECTION_ANSWERED_SCORE;\n payload: {\n id: string;\n sectionProgress: number;\n };\n};\n\ntype SectionLoaded = {\n type: ActionTypes.SECTIONS_LOADED;\n payload: {\n [sections: string]: any;\n };\n};\n\nexport type SectionsActionTypes =\n | SectionLoaded\n | SectionPassed\n | SectionScoreUpdated\n | SectionAnsweredProgress\n | SectionAnswered;\n","/* eslint-disable no-useless-escape */\n\nexport const toCamelCase = (value: string) =>\n value.toLowerCase().replace(/(\\-\\w)/g, matches => matches[1].toUpperCase());\n\nexport const normalizeColorName = (color: any) => toCamelCase(color.replace('@', ''));\n\nexport const getShortString = (str: any, countOfSymbols = 0) => {\n const eos = '...';\n if (typeof str !== 'string') {\n return str;\n }\n let strLength = str.length;\n if (strLength <= countOfSymbols) {\n return str;\n }\n return `${str.substr(0, countOfSymbols)}${eos}`;\n};\n\nexport const getSizeString = (size: number) => {\n var sizeStr = '';\n if (!size || size < 1024) {\n return '0 Kb';\n }\n if (size < 1024 * 1024) {\n sizeStr = (size / 1024).toFixed(2);\n return `${sizeStr} Kb`;\n }\n sizeStr = (size / (1024 * 1024)).toFixed(2);\n return `${sizeStr} MB`;\n};\n\nexport const isMeaningful = (value: string) => !!(value && value.trim().length > 0);\n\nexport const isUUID = (id: string) => {\n const regex = new RegExp(\n /^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/i\n );\n return regex.test(id);\n};\n\n// temporary for learnServiceUrl courseId`s, delete after migration\nexport const IdToUuid = (id: string) => {\n if (isUUID(id)) {\n return id;\n }\n return `${id.slice(0, 8)}-${id.slice(8, 12)}-${id.slice(12, 16)}-${id.slice(16, 20)}-${id.slice(\n 20,\n 32\n )}`;\n};\n\nexport const getTextContent = (value: string) => {\n const textElement = document.createElement('div');\n textElement.innerHTML = value;\n return textElement.textContent;\n};\n\nexport const hasNonAscii = (value: string) => [...value].some(char => char.charCodeAt(0) > 127);\n\nexport const decodeJson = (value: string) =>\n value && !/[{}]/gm.test(value) ? decodeURIComponent(value) : value;\n","import { isAuthorized } from 'store/user/selectors';\nimport { isResultsTrackingEnabled, isNpsEnabled } from 'store/settings/selectors';\nimport { RootAppState } from '../types';\n\n// eslint-disable-next-line import/prefer-default-export\nexport const isXapiInitialized = (state: RootAppState) => state.modules.xapi.isInitialized;\n\nexport const shouldInitializeXapi = (state: RootAppState) =>\n isAuthorized(state) && (isResultsTrackingEnabled(state) || isNpsEnabled(state));\n\nexport const isReviewEnabled = (state: RootAppState) => state.modules.review.isReviewModeEnabled;\n\nexport const getReviewApiUrl = (state: RootAppState) => state.modules.review.reviewApiUrl;\n\nexport const isLtiInitialized = (state: RootAppState) => state.modules.lti.isInitialized;\n","import requester from './requester';\n\nclass ResourceLoader {\n expires: any;\n\n constructor() {\n this.expires = +new Date();\n }\n\n set cacheBuster(cacheBuster) {\n if (!cacheBuster) {\n return;\n }\n this.expires = +Date.parse(cacheBuster);\n }\n\n get cacheBuster() {\n return this.expires;\n }\n\n getLocalResource(relativeUrl: string) {\n let { expires } = this;\n return requester.get(`${relativeUrl}`, {\n cacheBuster: expires\n });\n }\n\n async getLocalJsonResource(relativeUrl: string) {\n const response = await this.getLocalResource(relativeUrl);\n const responseText = await response.text(); // fix for preview\n if (!responseText || responseText.length === 0) {\n return {};\n }\n\n return JSON.parse(responseText);\n }\n}\n\nexport default new ResourceLoader();\n","import { RootAppState } from 'store/types';\n\nexport const getTimerStatus = (state: RootAppState) => state.timer?.status;\n\nexport const getTimerElapsed = (state: RootAppState) => state.timer?.elapsed;\n","export const POPUP_ID_IMAGE_PREVIEW = 'image-preview';\nexport const POPUP_ID_CLOSE_COURSE = 'close-course';\nexport const POPUP_ID_NPS_POPUP = 'nps-popup';\nexport const POPUP_ID_CONTINUE_LATER = 'continue-later';\nexport const POPUP_ID_START_NEW_ATTEMPT = 'start-new-attempt';\nexport const POPUP_ID_CONTINUE_LATER_IN_SCORM = 'continue-later-in-scorm';\nexport const POPUP_ID_CLOSE_RESOURCE = 'close-resource-popup';\nexport const POPUP_ID_START_OVER = 'start-over';\nexport const POPUP_ID_TIMED_OUT = 'timed-out';\n","export type AppState = {\n isLoading: boolean;\n isLoaded: boolean;\n isLoadingFailed: boolean;\n isLowResolution: boolean;\n isOffline: boolean;\n};\n\nexport enum ActionTypes {\n APP_LOADED = 'APP_LOADED',\n APP_LOADING_FAILED = 'APP_LOADING_FAILED',\n APP_RESOLUTION_CHANGED = 'APP_RESOLUTION_CHANGED',\n APP_OFFLINE_OR_SERVER_ERROR = 'APP_OFFLINE_OR_SERVER_ERROR',\n APP_ONLINE = 'APP_ONLINE'\n}\n\ntype AppLoadedAction = {\n type: ActionTypes.APP_LOADED;\n payload?: { [key: string]: any };\n};\n\ntype AppResolutionChangedAction = {\n type: ActionTypes.APP_RESOLUTION_CHANGED;\n payload: {\n isLowResolution: boolean;\n };\n};\n\ntype AppLoadingFailed = {\n type: ActionTypes.APP_LOADING_FAILED;\n reason: any;\n payload?: { [key: string]: any };\n};\n\ntype AppOfflineOrServerError = {\n type: ActionTypes.APP_OFFLINE_OR_SERVER_ERROR;\n payload?: {\n isOffline: boolean;\n };\n};\n\ntype AppOnline = {\n type: ActionTypes.APP_ONLINE;\n payload?: {\n isOffline: boolean;\n };\n};\n\nexport type AppActionTypes =\n | AppLoadedAction\n | AppResolutionChangedAction\n | AppLoadingFailed\n | AppOfflineOrServerError\n | AppOnline;\n","import * as courseActions from 'store/course/actions';\nimport * as sectionActions from 'store/sections/actions';\nimport * as contentActions from 'store/contents/actions';\nimport { getContents } from 'store/contents/selectors';\nimport eventEmitter, { events } from 'core/events/eventEmitter';\nimport { getSection } from 'store/sections/selectors';\nimport { INFORMATION_CONTENT } from 'constants/questionTypes';\nimport {\n isQuestionPoolEnabled,\n isScoringOfContentPagesAllowed,\n isAnswersFromPreviousAttemptEnabled,\n shouldSubmitAllQuestions\n} from '../settings/selectors';\nimport {\n getQuestion,\n getScore,\n hasBeenOpened,\n getQuestionAttempt,\n getQuestions,\n getQuestionRetries,\n getPoolQuestions\n} from './selectors';\nimport { getCourseAttempt } from '../course/selectors';\nimport * as CourseTypes from '../course/types';\nimport { ActionTypes } from './types';\nimport { ThunkResult } from '../types';\n\nexport const questionsLoaded = (questions: any): ThunkResult => (dispatch, getState) => {\n const scoreContentPages = isScoringOfContentPagesAllowed(getState());\n if (scoreContentPages && questions) {\n Object.keys(questions).forEach(key => {\n const question = questions[key];\n if (question.type === INFORMATION_CONTENT) {\n question.affectsProgress = scoreContentPages;\n }\n question.attemptNumber = question.attemptNumber ? question.attemptNumber : 0;\n });\n }\n dispatch({\n type: ActionTypes.QUESTIONS_LOADED,\n payload: questions\n });\n};\n\nexport const answer = (questionId: string): ThunkResult> => async (\n dispatch,\n getState\n) => {\n const question = getQuestion(getState(), questionId);\n const score = getScore(getState(), question);\n const attempt = getQuestionAttempt(getState(), questionId) + 1;\n dispatch({\n type: ActionTypes.QUESTION_ANSWERED,\n payload: { id: question.id, score, attempt }\n });\n\n const questionContent = getContents(getState(), question.questionContent);\n eventEmitter.emit(events.QUESTION_ANSWERED, [\n getQuestion(getState(), questionId),\n getSection(getState(), question.sectionId),\n questionContent,\n attempt\n ]);\n\n dispatch(sectionActions.updateProgress(question.sectionId));\n await dispatch(courseActions.updateProgress());\n};\n\nexport const answerBeforeSubmit = (questionId: string): ThunkResult> => async (\n dispatch,\n getState\n) => {\n const question = getQuestion(getState(), questionId);\n const attempt = getCourseAttempt(getState());\n dispatch({\n type: ActionTypes.QUESTION_ANSWERED_BEFORE_SUBMIT,\n payload: { id: question.id, attempt }\n });\n\n const questionContent = getContents(getState(), question.questionContent);\n eventEmitter.emit(events.SUBMIT_ONCE_QUESTION_ANSWERED, [\n getQuestion(getState(), questionId),\n getSection(getState(), question.sectionId),\n questionContent,\n attempt\n ]);\n\n dispatch(sectionActions.updateSection(question.sectionId));\n await dispatch(courseActions.updateProgress());\n};\n\nexport const updateScore = (questionId: string): ThunkResult> => async (\n dispatch,\n getState\n) => {\n const question = getQuestion(getState(), questionId);\n const score = getScore(getState(), question);\n const attempt = getCourseAttempt(getState());\n dispatch({\n type: ActionTypes.QUESTION_ANSWERED,\n payload: { id: question.id, score, attempt }\n });\n\n const questionContent = getContents(getState(), question.questionContent);\n eventEmitter.emit(events.QUESTION_ANSWERED, [\n getQuestion(getState(), questionId),\n getSection(getState(), question.sectionId),\n questionContent,\n attempt\n ]);\n\n if (question.type === INFORMATION_CONTENT && isScoringOfContentPagesAllowed(getState())) {\n const section = getSection(getState(), question.sectionId);\n eventEmitter.emit(events.INFORMATION_CONTENT_EXPERIENCED, [question, section]);\n }\n\n dispatch(sectionActions.updateProgress(question.sectionId));\n};\n\nexport const submitAllAtOnce = (): ThunkResult => (dispatch, getState) => {\n dispatch(courseActions.makeSubmitAtOnce());\n dispatch(courseActions.updateSubmitAtOnceAttemptNumber());\n const questions = isQuestionPoolEnabled(getState())\n ? getPoolQuestions(getState())\n : getQuestions(getState());\n questions.forEach(({ id }: any) => {\n dispatch(updateScore(id));\n });\n dispatch(courseActions.updateProgress());\n\n eventEmitter.emit(events.SUBMIT_ONCE_QUESTION_SUBMITTED, [true]);\n return true;\n};\n\nexport const informationContentExperienced = (\n questionId: string\n): ThunkResult> => async (dispatch, getState) => {\n if (!isScoringOfContentPagesAllowed(getState())) {\n return;\n }\n\n dispatch({\n type: ActionTypes.QUESTION_ANSWERED,\n payload: { id: questionId, score: 100, attempt: 1 }\n });\n\n const question = getQuestion(getState(), questionId);\n\n if (shouldSubmitAllQuestions(getState())) {\n dispatch(sectionActions.updateSection(question.sectionId));\n } else {\n const section = getSection(getState(), question.sectionId);\n eventEmitter.emit(events.INFORMATION_CONTENT_EXPERIENCED, [question, section]);\n dispatch(sectionActions.updateProgress(question.sectionId));\n }\n\n await dispatch(courseActions.updateProgress());\n};\n\nexport const markAsOpened = (questionId: string): ThunkResult> => async (\n dispatch,\n getState\n) => {\n if (hasBeenOpened(getState(), questionId)) {\n return;\n }\n\n dispatch({\n type: ActionTypes.QUESTION_OPENED,\n payload: { questionId, hasBeenOpened: true }\n });\n\n const questionType = getQuestion(getState(), questionId).type;\n if (questionType === INFORMATION_CONTENT) {\n dispatch(informationContentExperienced(questionId));\n }\n};\n\nexport const resetProgress = (question: any): ThunkResult => (dispatch, getState) => {\n const initialScore = question.score;\n if (!isAnswersFromPreviousAttemptEnabled(getState())) {\n const isPoolQuestion = () => !!question.isPoolQuestion;\n dispatch({\n type: ActionTypes.QUESTION_PROGRESS_RESET,\n payload: { id: question.id, isPoolQuestion: isPoolQuestion(), type: question.type }\n });\n eventEmitter.emit(events.RESET_QUESTION_PROGRESS, question.id);\n } else {\n dispatch({\n type: ActionTypes.QUESTION_PROGRESS_RESET_KEEP_ANSWER,\n payload: { id: question.id }\n });\n }\n\n if (initialScore === 0) {\n return;\n }\n\n dispatch(sectionActions.updateProgress(question.sectionId));\n dispatch(courseActions.updateProgress());\n};\n\nexport const cleanup = (questionId: string): ThunkResult => (dispatch, getState) => {\n const question = getQuestion(getState(), questionId);\n const isPoolQuestion = () => !!question.isPoolQuestion;\n dispatch({\n type: ActionTypes.QUESTION_PROGRESS_RESET,\n payload: { id: question.id, isPoolQuestion: isPoolQuestion(), type: question.type }\n });\n\n dispatch({\n type: ActionTypes.QUESTION_PROGRESS_RESET_ATTEMPT,\n payload: { id: question.id }\n });\n\n dispatch({\n type: ActionTypes.QUESTION_OPENED,\n payload: { questionId, hasBeenOpened: false }\n });\n};\n\nexport const cleanupKeepAnswers = (questionId: string): ThunkResult => (dispatch, getState) => {\n const question = getQuestion(getState(), questionId);\n\n dispatch({\n type: ActionTypes.QUESTION_PROGRESS_RESET_KEEP_ANSWER,\n payload: { id: question.id }\n });\n\n dispatch({\n type: ActionTypes.QUESTION_OPENED,\n payload: { questionId, hasBeenOpened: false }\n });\n};\n\nexport const loadFeedback = (questionId: string): ThunkResult => (dispatch, getState) => {\n const state = getState();\n const question = getQuestion(state, questionId);\n if (question.correctFeedback.length) {\n dispatch(contentActions.loadContents(getContents(state, question.correctFeedback)));\n }\n if (question.incorrectFeedback.length) {\n dispatch(contentActions.loadContents(getContents(state, question.incorrectFeedback)));\n }\n if (question.explanationBlocks.length) {\n dispatch(contentActions.loadContents(getContents(state, question.explanationBlocks)));\n }\n};\n\nexport const restoreProgress = (\n questionId: string,\n questionAnswers: any,\n attempt: number,\n showPrevAnswer: boolean\n): ThunkResult> => async (dispatch, getState) => {\n try {\n if (!showPrevAnswer) {\n dispatch({\n type: ActionTypes.QUESTION_RESTORE_RESPONSE,\n payload: { id: questionId, response: questionAnswers, attempt }\n });\n } else {\n dispatch({\n type: ActionTypes.QUESTION_RESTORE_SHOW_PREV_ANSWER,\n payload: { id: questionId, response: questionAnswers }\n });\n }\n\n const question = getQuestion(getState(), questionId);\n const score = getScore(getState(), question);\n dispatch({\n type: ActionTypes.QUESTION_PROGRESS_RESTORE,\n payload: { id: questionId, score, attempt }\n });\n } catch (e) {\n console.error(e);\n dispatch({ type: CourseTypes.ActionTypes.COURSE_PROGRESS_RESTORE_FAILED, reason: e });\n }\n};\n\nexport const animateFeedback = (data: {\n questionId: string;\n isAnimating: boolean;\n}): ThunkResult => dispatch => {\n const { questionId, isAnimating } = data;\n dispatch({\n type: ActionTypes.FEEDBACK_ANIMATING,\n payload: { id: questionId, isFeedbackAnimating: isAnimating }\n });\n};\n\nexport const updateRetries = (questionId: string): ThunkResult => (dispatch, getState) => {\n const questionRetries = getQuestionRetries(getState(), questionId);\n dispatch({\n type: ActionTypes.QUESTION_UPDATE_RETRY,\n payload: { questionId, retries: questionRetries + 1 }\n });\n};\n","import styled from 'styled-components';\nimport media from 'components/mixins/media';\nimport { bodyBackground } from 'components/mixins/backgrounds';\nimport { Layout, BasicStyledSidebar, PageContent } from 'components/shell/Layout';\nimport { PageContentChild } from 'components/shell/Layout/Layout.styled'\nimport { centerAbsoluteElement } from 'components/mixins/placement';\nimport Icon from 'components/common/Icon';\nimport { getCustomScrollbars } from 'components/mixins/customScrollbars';\nimport { transparentize } from 'utils/color';\n\nexport const PageSidebar = styled(BasicStyledSidebar)``;\n\nexport const LayoutWrapper = styled(Layout)``;\n\ntype PageContentWrapperProps = {\n background: any\n}\nexport const PageContentWrapper = styled(PageContent)`\n position: absolute;\n top: 0;\n left: 50%;\n height: 100%;\n width: 50%;\n z-index: 100;\n overflow-y: auto;\n ${getCustomScrollbars()}\n ${props => bodyBackground(props.background.body)};\n ${media.tablet`\n position: relative;\n width: 100%;\n left: 0;\n `}\n ${PageContentChild} {\n ${media.tablet`\n height: 100%;\n `}\n }\n`;\n\nexport const PageSection = styled.section`\n display: flex;\n flex-flow: column nowrap;\n justify-content: center;\n align-items: center;\n height: 100%;\n`;\n\ntype LogoProps = {\n altText: string;\n logoUrl: string;\n}\nexport const LogoSidebar = styled.img.attrs((props: LogoProps) => ({\n alt: props.altText,\n src: props.logoUrl\n})) `\n display: block;\n max-width: 100%;\n max-height: 100%;\n margin: 0 auto;\n`;\n\nexport const LogoSidebarWrapper = styled.div`\n width: 360px;\n height: 200px;\n position: absolute;\n ${centerAbsoluteElement};\n`;\n\nexport const ErrorContainer = styled.div`\n width: 440px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n border-bottom: 1px solid ${props => transparentize(props.theme.colors.textColor, 0.1)};\n ${media.mobile`\n & {\n width: 100%;\n padding: 0 20px;\n }\n `};\n`;\n\nexport const ErrorIcon = styled(Icon)`\n opacity: 0.5;\n`;\n\nexport const ErrorTitle = styled.h1`\n word-wrap: break-word;\n font-size: 32px;\n text-align: center;\n line-height: 1.4;\n margin: 40px 0 16px;\n width: 100%;\n font-family: ${props => props.theme.fonts.mainFont.fontFamily};\n color: ${props => props.theme.colors.textColor};\n ${media.medium`\n & {\n font-size: 28px;\n }\n `};\n ${media.mobile`\n & {\n font-size: 22px;\n }\n `};\n`;\n\nexport const ErrorDescription = styled.h3`\n width: 100%;\n opacity: 0.7;\n font-size: 16px;\n line-height: 1.4;\n text-align: center;\n margin-bottom: 82px;\n font-family: ${props => props.theme.fonts.mainFont.fontFamily};\n color: ${props => props.theme.colors.textColor};\n ${media.medium`\n & {\n font-size: 14px;\n }\n `};\n ${media.mobile`\n & {\n font-size: 12px;\n }\n `};\n`;\n\n","import React, { Fragment, PureComponent } from 'react';\nimport { connect } from 'react-redux';\nimport { localize } from 'core/localization';\nimport { ThemeProvider } from 'styled-components';\nimport {\n isSettingsLoadingFailed,\n getBackground,\n getAlternativeLogo,\n getColors,\n getFonts,\n isTrackingEnabled,\n isScormMode,\n isResource\n} from 'store/settings/selectors';\nimport { getPopupVisibility } from 'store/popup/selectors';\nimport { isAuthenticated } from 'store/user/selectors';\nimport { isReviewEnabled } from 'store/modules/selectors';\nimport { isCourseAccessLimited } from 'store/course/selectors';\nimport {\n LayoutWrapper,\n PageSidebar,\n PageContentWrapper,\n LogoSidebar,\n LogoSidebarWrapper,\n PageSection,\n ErrorContainer,\n ErrorIcon,\n ErrorTitle,\n ErrorDescription\n} from './SomethingWentWrongPage.styled';\nimport { RootAppState } from 'store/types';\nimport {\n DEFAULT_SOMETHING_WENT_WRONG_TITLE_TEXT,\n DEFAULT_LOGO_TEXT,\n DEFAULT_PLEASE_TRY_TY_REFRESH_THE_PAGE_TEXT\n} from 'constants/defaults';\n\ntype SomethingWentWrongPageProps = {\n settingsLoadingFailed: boolean;\n background: { [key: string]: any };\n alternativeLogoUrl: string;\n colors: any;\n fonts: any;\n isUserAuthenticated: boolean;\n popupExpanded: boolean;\n trackingEnabled: boolean;\n isAccessLimited: boolean;\n isScorm: boolean;\n reviewMode: boolean;\n hasUnhandledError: boolean;\n isResourceType: boolean;\n};\n\nexport class SomethingWentWrongPage extends PureComponent {\n componentDidMount() {\n document.title = !this.props.settingsLoadingFailed\n ? localize('[something went wrong title]')\n : DEFAULT_SOMETHING_WENT_WRONG_TITLE_TEXT;\n }\n\n render() {\n const { settingsLoadingFailed, background, alternativeLogoUrl, colors, fonts } = this.props;\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n {!settingsLoadingFailed\n ? localize('[something went wrong title]')\n : DEFAULT_SOMETHING_WENT_WRONG_TITLE_TEXT}\n \n \n {!settingsLoadingFailed\n ? localize('[please try to refresh the page]')\n : DEFAULT_PLEASE_TRY_TY_REFRESH_THE_PAGE_TEXT}\n \n \n \n \n \n \n \n );\n }\n}\n\nfunction mapStateToProps(state: RootAppState) {\n return {\n settingsLoadingFailed: isSettingsLoadingFailed(state),\n background: getBackground(state),\n alternativeLogoUrl: getAlternativeLogo(state),\n colors: getColors(state),\n fonts: getFonts(state),\n popupExpanded: getPopupVisibility(state),\n isUserAuthenticated: isAuthenticated(state),\n trackingEnabled: isTrackingEnabled(state),\n isAccessLimited: isCourseAccessLimited(state),\n isScorm: isScormMode(state),\n reviewMode: isReviewEnabled(state),\n isResourceType: isResource(state)\n };\n}\n\nexport default connect(mapStateToProps)(SomethingWentWrongPage);\n","import * as React from 'react';\n\ntype Props = {\n location: { [key: string]: any }\n}\n\nfunction withScrollOnRedirect(WrappedComponent: React.ComponentType): any {\n return class ScrollToTop extends React.Component {\n componentDidUpdate(prevProps: Props & T) {\n if (this.props.location !== prevProps.location) {\n window.scrollTo(0, 0);\n }\n }\n\n render() {\n return ;\n }\n\n static propTypes: Props;\n };\n}\n\nexport default withScrollOnRedirect;\n","import styled, { css } from 'styled-components';\nimport media from 'components/mixins/media';\nimport { ShapedIcon, Text } from 'components/common';\nimport { transparentize } from 'utils/color';\n\ntype IconProps = {\n ariaLabel?: string;\n name: string;\n size: any;\n shape: any;\n shapeColor: any;\n};\n\nexport const Figure = styled.div`\n margin: 40px 0 55px 0;\n text-align: center;\n ${media.mobile`\n ${css`\n margin: 40px 0 30px;\n `}\n `}\n`;\n\nexport const ReconnectedIcon = styled(ShapedIcon).attrs((props: IconProps) => ({\n 'aria-label': props.ariaLabel\n}))`\n flex-shrink: 0;\n margin-right: 9px;\n`;\n\nexport const TextElement = styled(Text)`\n max-width: 475px;\n padding: 24px 0 0;\n text-align: center;\n`;\n\nexport const ReconnectionWrapper = styled.div`\n position: fixed;\n top: 40px;\n left: 0;\n width: 100%;\n display: flex;\n justify-content: center;\n justify-items: center;\n text-align: center;\n\n ${media.mobile`\n ${css`\n top: 0;\n background-color: ${props => props.theme.colors.contentBodyColor};\n `}\n `}\n`;\n\nexport const CircleWrapper = styled.div`\n width: 100%;\n max-width: 560px;\n min-height: 50px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 15px;\n background: ${props => transparentize(props.theme.colors.incorrectColor, 0.1)};\n border: 1px solid ${props => transparentize(props.theme.colors.incorrectColor, 0.3)};\n\n &.Online {\n background: ${props => transparentize(props.theme.colors.correctColor, 0.1)};\n border: 1px solid ${props => transparentize(props.theme.colors.correctColor, 0.3)};\n }\n\n ${TextElement} {\n padding: 0;\n }\n\n > div {\n position: relative;\n left: auto;\n top: auto;\n margin: 0 20px 0 0;\n }\n`;\n\nexport const HeaderElement = styled(Text)`\n color: ${props => props.theme.colors.textColor};\n font-weight: normal !important;\n text-align: center;\n\n ${media.mobile`\n ${css`\n text-align: center;\n `}\n `}\n`;\n\nexport const ButtonsWrapper = styled.div`\n display: inline-block;\n margin-top: 40px;\n\n & > button {\n width: 100%;\n display: block;\n margin: 0 0 20px;\n }\n`;\n\nexport const Container = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n min-height: max-content;\n height: 100%;\n\n ${media.mobile`\n ${css`\n height: auto;\n `}`}\n`;\n\nexport const ContentWrapper = styled.section`\n display: flex;\n flex-direction: column;\n align-items: center;\n position: relative;\n z-index: 1;\n\n ${media.mobile`\n ${css`\n &::before {\n content: '';\n width: 100%;\n height: 40px;\n }\n\n &::after {\n content: '';\n width: 100%;\n height: 110px;\n }\n `}\n `}\n`;\n\nexport const NoteWrapper = styled.div`\n position: fixed;\n bottom: 28px;\n left: 0;\n width: 100%;\n display: flex;\n justify-content: center;\n justify-items: center;\n text-align: center;\n color: ${props => transparentize(props.theme.colors.textColor, 0.7)};\n\n ${media.mobile`\n ${(props: any) =>\n css`\n background-color: ${props.theme.colors.contentBodyColor};\n bottom: 0;\n padding: 24px 0;\n\n &::after {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background-color: ${transparentize(props.theme.colors.textColor, 0.1)};\n z-index: -1;\n }\n `}\n `}\n`;\n\nexport const Note = styled(Text)`\n width: 100%;\n\n b {\n font-weight: bold;\n }\n\n ${media.mobile`\n ${css`\n max-width: 260px;\n `}\n `}\n`;\n","import React from 'react';\nimport { withTheme } from 'styled-components';\nimport { localize } from 'core/localization';\nimport { Figure } from './Figure.styled';\n\ntype LostConnectionProps = {\n theme: { [key: string]: any };\n};\nexport const LostConnection = (props: LostConnectionProps) => (\n \n 2F4B8814-1795-4431-B359-0884AE1D4E74\n Created with sketchtool.\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n);\n\nexport default withTheme(LostConnection);\n","import React, { Fragment, PureComponent } from 'react';\nimport { bindActionCreators, Dispatch } from 'redux';\nimport { connect } from 'react-redux';\nimport { localize } from 'core/localization';\nimport { Button } from 'components/common';\nimport {\n TextElement,\n HeaderElement,\n Container,\n ContentWrapper,\n ButtonsWrapper,\n Figure,\n NoteWrapper,\n Note,\n CircleWrapper,\n ReconnectionWrapper,\n ReconnectedIcon\n} from './ConnectionAlert.styled';\nimport { getColors, getFonts } from 'store/settings/selectors';\nimport CircleLoader from 'components/common/CircleLoader';\nimport LostConnection from 'assets/figures/LostConnection';\nimport { BUTTON, ICON, SIZES } from 'constants/components';\nimport { RootAppState } from 'store/types';\nimport * as popupActions from 'store/popup/actions';\nimport { ThemeProvider } from 'styled-components';\n\ntype ConnectionAlertProps = {\n popupAction: { [key: string]: any };\n isOffline: boolean;\n colors: any;\n fonts: any;\n};\n\nexport class ConnectionOverlay extends PureComponent {\n static defaultProps = {\n isOffline: false\n };\n\n state = {\n closeCourse: false\n };\n\n closeCourse = () => {\n this.setState({\n closeCourse: true\n });\n };\n\n render() {\n const { isOffline, colors, fonts } = this.props;\n const { closeCourse } = this.state;\n\n return (\n \n \n \n {closeCourse && (\n \n {localize('[close course text]')}\n \n )}\n {!closeCourse && (\n \n \n \n {isOffline ? (\n \n ) : (\n \n )}\n \n {isOffline\n ? localize('[trying to reconnect]')\n : localize('[reconnected successfully]')}\n \n \n \n\n
\n \n
\n\n {localize('[check connection]')}\n \n {localize('[close course connection lost]')}\n \n\n \n \n \n\n \n \n {localize('[connection note]')} \n {localize('[note use same course]')}\n \n \n
\n )}\n
\n
\n
\n );\n }\n}\n\nfunction mapStateToProps(state: RootAppState) {\n return {\n colors: getColors(state),\n fonts: getFonts(state)\n };\n}\n\nfunction mapDispatchToProps(dispatch: Dispatch) {\n return {\n popupAction: bindActionCreators(popupActions, dispatch)\n };\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(ConnectionOverlay);\n","import * as React from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators, Dispatch } from 'redux';\nimport throttle from 'lodash.throttle';\nimport { getColors, getFonts, getBackground, isResource } from 'store/settings/selectors';\nimport SomethingWentWrong from 'pages/errors/somethingWentWrong';\nimport { withRouter } from 'react-router-dom';\nimport * as actions from 'store/app/actions';\nimport { isAppLoading, isAppLoadingFailed, isOffline } from 'store/app/selectors';\nimport withScrollOnRedirect from 'components/hocs/withScrollOnRedirect';\nimport { getTreeOfContentVisibility } from 'store/treeOfContent/selectors';\nimport { isAuthenticated } from 'store/user/selectors';\nimport { isCourseAccessLimited } from 'store/course/selectors';\nimport withNavigation from 'components/hocs/withNavigation';\nimport { RootAppState } from 'store/types';\nimport ConnectionOverlay from 'pages/errors/ConnectionAlert';\nimport { CircleLoader } from '../common';\n\nconst Course = React.lazy(() => import('../../pages/course/Course'));\nconst Resource = React.lazy(() => import('../../pages/resource/Resource'));\n\ntype ShellProps = {\n colors: { [key: string]: any };\n fonts: { [key: string]: any };\n background: { [key: string]: any };\n actions: { [key: string]: any };\n isLoading: boolean;\n isLoadingFailed: boolean;\n isOffline: boolean;\n isLowResolution: boolean;\n isTocExpanded: boolean;\n isUserAuthenticated: boolean;\n location: { [key: string]: any };\n userAccessIsLimited: boolean;\n navigateToUrl(url: string): void;\n resources: { [key: string]: any };\n isResource: { [key: string]: any };\n courseLaunched: boolean;\n popupActions: { [key: string]: any };\n isCourseProgressRestoreFailed: boolean;\n navigateToIndex(): void;\n};\n\ntype ShellState = {\n hasError: boolean;\n showAlert: boolean;\n};\n\nexport class Shell extends React.Component {\n constructor(props: ShellProps) {\n super(props);\n this.state = {\n hasError: false,\n showAlert: false\n };\n }\n\n windowResizeHandler = throttle(() => {\n this.props.actions.resolutionChanged();\n }, 500);\n\n componentWillUnmount() {\n window.removeEventListener('resize', this.windowResizeHandler);\n }\n\n async componentDidMount() {\n window.addEventListener('resize', this.windowResizeHandler);\n this.props.actions.resolutionChanged();\n\n await this.props.actions.load();\n }\n\n componentDidUpdate(prevProps: ShellProps): void {\n if (this.props.isOffline && prevProps.isOffline !== this.props.isOffline) {\n this.setState({ showAlert: true });\n }\n\n if (prevProps.isOffline && prevProps.isOffline !== this.props.isOffline) {\n setTimeout(() => {\n this.setState({\n showAlert: false\n });\n }, 2000);\n }\n }\n\n componentDidCatch(error: any, errorInfo: any) {\n console.error(`Component did catch: ${error}, ${errorInfo}`);\n this.setState({ hasError: true });\n }\n\n render() {\n const { isLoading, isLoadingFailed, isOffline } = this.props;\n const { hasError, showAlert } = this.state;\n\n if (showAlert) {\n return ;\n }\n\n if (isLoading) {\n return ;\n }\n\n if (isLoadingFailed || hasError) {\n return ;\n }\n\n return (\n }>\n {this.props.isResource ? : }\n \n );\n }\n}\n\nfunction mapStateToProps(state: RootAppState) {\n return {\n colors: getColors(state),\n fonts: getFonts(state),\n isOffline: isOffline(state),\n isLoading: isAppLoading(state),\n isLoadingFailed: isAppLoadingFailed(state),\n isLowResolution: state.app.isLowResolution,\n isTocExpanded: getTreeOfContentVisibility(state),\n background: getBackground(state),\n isUserAuthenticated: isAuthenticated(state),\n userAccessIsLimited: isCourseAccessLimited(state),\n isResource: isResource(state)\n };\n}\n\nfunction mapDispatchToProps(dispatch: Dispatch) {\n return {\n actions: bindActionCreators(actions, dispatch)\n };\n}\n\nexport default withRouter(\n withNavigation(connect(mapStateToProps, mapDispatchToProps)(withScrollOnRedirect(Shell)))\n);\n","import { css } from 'styled-components';\nimport media from 'components/mixins/media';\nimport 'focus-visible';\n\nconst commonCSS = css`\n * {\n box-sizing: border-box;\n word-wrap: break-word;\n -webkit-overflow-scrolling: touch; /* smooth scrolling on safari */\n hyphens: auto;\n }\n html,\n body,\n #root {\n width: 100%;\n height: 100%;\n font-size: 16px;\n line-height: 32px;\n }\n\n &:focus {\n outline: 1px solid black;\n }\n\n &.js-focus-visible :focus:not(.focus-visible) {\n outline: none;\n }\n\n div.resource-layout-offset {\n margin-top: 76px;\n height: calc(100% - 76px);\n }\n\n ${media.small`\n div.resource-layout-offset {\n margin-top: 62px;\n height: calc(100% - 62px);\n }\n `}\n`;\n\nexport default commonCSS;\n","import { css } from 'styled-components';\nimport { transition } from 'components/mixins/interactivity';\n\nconst animationsCSS = css`\n /*fade*/\n .fade-enter,\n .fade-appear {\n opacity: 0;\n }\n\n .fade-enter.fade-enter-active,\n .fade-appear.fade-appear-active {\n ${transition('opacity', '0.4s')};\n opacity: 1;\n }\n\n .fade-exit {\n opacity: 1;\n }\n\n .fade-exit.fade-exit-active {\n ${transition('opacity', '0.4s')};\n opacity: 0.01;\n }\n\n /*slideInDown*/\n .slideInDown-enter,\n .slideInDown-appear {\n transform: translateY(-10px);\n }\n\n .slideInDown-enter.slideInDown-enter-active,\n .slideInDown-appear.slideInDown-appear-active {\n ${transition('transform', '0.4s')};\n transform: translateY(0px);\n }\n\n .slideInDown-exit {\n transform: translateY(0px);\n }\n\n .slideInDown-exit.slideInDown-exit-active {\n ${transition('transform', '0.4s')};\n transform: translateY(-10px);\n }\n\n /*fadeInDown*/\n .fadeInDown-enter,\n .fadeInDown-appear {\n opacity: 0;\n transform: translateY(-10px);\n }\n\n .fadeInDown-enter.fadeInDown-enter-active,\n .fadeInDown-appear.fadeInDown-appear-active {\n ${transition('all', '0.3s')};\n opacity: 1;\n transform: translateY(0px);\n }\n\n .fadeInDown-exit {\n opacity: 1;\n transform: translateY(0px);\n }\n\n .fadeInDown-exit.fadeInDown-exit-active {\n ${transition('all', '0.3s')};\n opacity: 0.01;\n transform: translateY(-10px);\n }\n`;\n\nexport default animationsCSS;\n","import { createGlobalStyle } from 'styled-components';\nimport resetCss from 'styled-reset';\nimport commonCss from './common';\nimport animationsCss from './animations';\nimport './icons';\n\nconst BaseStyles = createGlobalStyle`\n ${resetCss};\n ${commonCss};\n ${animationsCss};\n`;\n\nexport default BaseStyles;\n","import 'babel-polyfill';\nimport 'react-app-polyfill/ie11';\nimport 'webfontloader';\nimport 'react-hot-loader/patch';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { ConnectedRouter } from 'react-router-redux';\nimport { HashRouter } from 'react-router-dom';\nimport { AppContainer } from 'react-hot-loader';\nimport Shell from './components/shell';\nimport store, { history } from './store';\nimport 'react-circular-progressbar/dist/styles.css';\n\nimport BaseStyles from './assets/styles';\n\nconst render = (Component: any) => {\n ReactDOM.render(\n \n \n \n \n \n \n \n \n \n \n \n ,\n document.querySelector('#root')\n );\n};\n\nrender(Shell);\n\nif (module.hot) {\n module.hot.accept('components/shell', () => {\n /* eslint-disable global-require */\n const NextShell = require('components/shell').default;\n render(NextShell);\n });\n}\n\nif (process.env.NODE_ENV !== 'production') {\n const axe = require('react-axe');\n const config = {\n rules: [\n {\n id: 'heading-order',\n enabled: false\n },\n {\n id: 'tabindex',\n enabled: false\n },\n {\n id: 'button-name',\n enabled: false\n },\n {\n id: 'color-contrast',\n enabled: false\n }\n ]\n };\n axe(React, ReactDOM, 1000, config);\n}\n","class Color {\n r: number;\n g: number;\n b: number;\n a: number | undefined;\n\n constructor(r: number, g: number, b: number, a?: number) {\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n }\n\n toString() {\n return this.a !== undefined\n ? `rgba(${this.r}, ${this.g}, ${this.b}, ${this.a})`\n : `rgb(${this.r}, ${this.g}, ${this.b})`;\n }\n}\n\n/* eslint-disable import/prefer-default-export */\nexport const transparentize = (hex: string, opacity?: number, options: { [key: string]: any } = { solidColor: false }): string => {\n let color = hex2rgba(hex, opacity);\n if (!color) {\n return '';\n }\n if (options.solidColor) {\n const white = new Color(255, 255, 255);\n color = rgba2rgb(white, color);\n }\n\n return color.toString();\n};\n\nfunction hex2rgba(hexColor: string, alpha = 1) {\n // Expand shorthand form (e.g. \"03F\") to full form (e.g. \"0033FF\")\n const shorthandRegex = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\n const hex = hexColor.replace(shorthandRegex, (m, r, g, b) => r + r + g + g + b + b);\n\n const result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n if (!result) {\n return null;\n }\n return new Color(\n parseInt(result[1], 16),\n parseInt(result[2], 16),\n parseInt(result[3], 16),\n alpha\n );\n}\n\nfunction rgba2rgb(rgbBackground: any, rgbaColor: any) {\n const alpha = rgbaColor.a;\n\n return new Color(\n parseInt(((1 - alpha) * rgbBackground.r + alpha * rgbaColor.r).toString(), 10),\n parseInt(((1 - alpha) * rgbBackground.g + alpha * rgbaColor.g).toString(), 10),\n parseInt(((1 - alpha) * rgbBackground.b + alpha * rgbaColor.b).toString(), 10)\n );\n}\n","import styled, { keyframes, css } from 'styled-components';\n\nconst defaultBorderColor = '#F6842C';\n\nconst getBorderColor = (theme: any) =>\n (theme && theme.colors && theme.colors.mainColor) || defaultBorderColor;\n\nconst circleRotate = keyframes`\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n`;\n\nconst strokeRotate = keyframes`\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(1080deg);\n }\n`;\n\nconst strokeFix = keyframes`\n 0% {\n transform: rotate(0deg);\n }\n 50% {\n transform: rotate(135deg);\n }\n 100% {\n transform: rotate(270deg);\n }\n`;\n\nconst strokeLeftGrow = keyframes`\n 0% {\n transform: rotate(-5deg);\n }\n 50% {\n transform: rotate(-140deg);\n }\n 100% {\n transform: rotate(-5deg);\n }\n`;\n\nconst strokeRightGrow = keyframes`\n 0% {\n transform: rotate(5deg);\n }\n 50% {\n transform: rotate(140deg);\n }\n 100% {\n transform: rotate(5deg);\n }\n`;\n\nexport const getGeneralLineStyle = (width?: number, height?: number) => css`\n width: ${width || 24}px;\n height: ${height || 24}px;\n box-sizing: border-box;\n border-radius: 50%;\n position: absolute;\n top: 50%;\n left: 50%;\n margin-top: -${width ? width / 2 : 12}px;\n margin-left: -${width ? width / 2 : 12}px;\n z-index: 300;\n`;\n\nexport const lineStyle = css`\n content: '';\n display: block;\n border-style: solid;\n border-width: 3px;\n`;\n\nexport const getLineStyleStrokeRight = (iconSize?: number) => css`\n position: absolute;\n clip: rect(${iconSize ? `0 ${iconSize}px ${iconSize}px ${iconSize / 2}px` : `0 24px 24px 12px`});\n`;\n\nexport const getLineStyleStrokeLeft = (iconSize?: number) => css`\n position: absolute;\n clip: rect(${iconSize ? `0 ${iconSize / 2}px ${iconSize}px 0` : `0 12px 24px 0`});\n`;\n\nexport const getLineStyleStroke = (iconSize?: number) => css`\n position: absolute;\n clip: rect(\n ${iconSize ? `0 ${iconSize / 2}px ${iconSize / 2}px ${iconSize / 2}px` : `0 12px 12px 12px`}\n );\n`;\n\nexport const generalAnimationCircle = css`\n animation: ${circleRotate} 1200ms linear infinite both;\n`;\n\nexport const generalAnimation = css`\n animation: ${strokeFix} 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both;\n`;\n\nexport const generalAnimationStroke = css`\n animation: ${strokeRotate} 5332ms steps(4) infinite both;\n`;\n\nexport const generalAnimationRight = css`\n animation: ${strokeRightGrow} 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both;\n`;\n\nexport const generalAnimationLeft = css`\n animation: ${strokeLeftGrow} 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both;\n`;\n\ninterface LoaderProps {\n iconSize?: number\n}\n\nexport const LoaderCircle = styled.div.attrs(() => ({\n 'data-test': 'circle-loader'\n}))`\n ${(props: LoaderProps) => getGeneralLineStyle(props.iconSize, props.iconSize)} ${generalAnimationCircle};\n`;\n\nexport const LoaderStroke = styled.div`\n ${props => getGeneralLineStyle(props.iconSize, props.iconSize)}\n ${generalAnimationStroke}\n \n &:before{\n ${props => getGeneralLineStyle(props.iconSize, props.iconSize)}\n ${lineStyle}\n ${props => getLineStyleStroke(props.iconSize)}\n ${generalAnimation}\n border-color: ${props => getBorderColor(props.theme)}\n`;\n\nexport const LoaderStrokeLeft = styled.div`\n ${props => getGeneralLineStyle(props.iconSize, props.iconSize)}\n ${props => getLineStyleStrokeLeft(props.iconSize)}\n ${generalAnimation}\n \n &:before{\n ${props => getGeneralLineStyle(props.iconSize, props.iconSize)}\n ${lineStyle}\n ${props => getLineStyleStrokeRight(props.iconSize)}\n ${generalAnimationLeft}\n border-color: ${props => getBorderColor(props.theme)}\n }\n`;\n\nexport const LoaderStrokeRight = styled.div`\n ${props => getGeneralLineStyle(props.iconSize, props.iconSize)}\n ${props => getLineStyleStrokeRight(props.iconSize)}\n ${generalAnimation}\n \n &:before{\n ${props => getGeneralLineStyle(props.iconSize, props.iconSize)}\n ${lineStyle}\n ${props => getLineStyleStrokeLeft(props.iconSize)}\n ${generalAnimationRight}\n border-color: ${props => getBorderColor(props.theme)}\n`;\n","import * as React from 'react';\nimport {\n LoaderCircle,\n LoaderStroke,\n LoaderStrokeLeft,\n LoaderStrokeRight\n} from './CircleLoader.styled';\n\nexport interface CircleLoader {\n iconSize?: number\n}\n\nexport const CircleLoader = (props: Readonly) => {\n const { iconSize } = props;\n return (\n \n \n \n \n \n \n );\n};\n\n\nexport default CircleLoader;\n","export { default } from './CircleLoader';\n","import styled, { css } from 'styled-components';\nimport media from 'components/mixins/media';\nimport { headerBackground } from 'components/mixins/backgrounds';\nimport { transparentize } from 'utils/color';\n\nexport const fullSizeAbsoluteBlock = css`\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n`;\n\nexport const LayoutContainer = styled.div`\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100vh;\n z-index: 10;\n ${media.small`\n position: fixed;\n width: 100vw;\n height: 100%;\n `};\n\n & > .reviewable-container {\n display: flex;\n }\n`;\n\ntype BackgroundContainerProps = {\n background: any;\n}\nexport const BackgroundContainer = styled.div`\n position: relative;\n flex: 0 0 50%;\n height: 100vh;\n ${props => headerBackground(props.background)};\n ${media.tablet`\n flex: 1 1 100%;\n `};\n`;\n\nexport const PageSidebarChild = styled.div.attrs({\n 'data-sidebar-child': true\n})`\n ${fullSizeAbsoluteBlock};\n ${media.tablet`\n position: relative;\n width: 100%;\n height: auto;\n `};\n`;\n\nexport const PageContentChild = styled.div.attrs({\n 'data-content-child': true\n})`\n ${fullSizeAbsoluteBlock};\n ${media.tablet`\n position: relative;\n width: 100%;\n height: auto;\n `};\n`;\n\nexport const PageContainer = styled.div`\n ${fullSizeAbsoluteBlock};\n overflow: hidden;\n`;\n\nexport const PageSidebarContainer = styled.aside.attrs({ 'data-sidebar': true })``;\n\nexport const PageContentContainer = styled.div.attrs({\n 'data-content': true\n})``;\n\ntype BasicStylesSidebarProps = {\n background?: any;\n}\nexport const BasicStylesSidebar = styled.aside.attrs({ 'data-sidebar': true }) `\n position: absolute;\n top: 0;\n left: 0;\n width: 50%;\n height: 100%;\n overflow-y: auto;\n background-color: ${props =>\n props.background.header.coverOverlay.enabled\n ? transparentize(\n props.background.header.coverOverlay.color,\n props.background.header.coverOverlay.opacity\n )\n : null};\n`;\n","import eventEmitter, { events } from 'core/events/eventEmitter';\nimport { INFORMATION_CONTENT } from 'constants/questionTypes';\nimport { ProgressStatus } from 'constants/progressStatus';\nimport * as courseSelectors from 'store/course/selectors';\nimport { getTimerStatus } from 'store/timer/selectors';\nimport { TimerStatus } from 'constants/timer';\nimport {\n getAffectProgressQuestions,\n getSection,\n getSectionProgress,\n isSectionAnswered,\n isSectionFailed\n} from './selectors';\nimport * as settingsSelector from '../settings/selectors';\nimport { isAttemptSubmitted, getCourseAttempt } from '../course/selectors';\n\nimport { ActionTypes } from './types';\nimport { RootAppState, ThunkResult } from '../types';\n\nconst checkSectionFailed = (state: RootAppState, sectionId: string) => {\n if (settingsSelector.shouldSubmitAllQuestions(state)) {\n return (\n settingsSelector.isAttemptsLimited(state) &&\n isAttemptSubmitted(state) &&\n getCourseAttempt(state) >= settingsSelector.getLimitedAttemptsNumber(state)\n );\n }\n return isSectionFailed(state, sectionId);\n};\n\nconst checkSectionFailedTimedOut = (state: RootAppState, score: number) => {\n const isOverallMasteryScore = settingsSelector.isOverallMasteryScore(state);\n const masteryScore = settingsSelector.getMasteryScoreValue(state);\n if (settingsSelector.getTimerEnabled(state)) {\n return (\n ((isOverallMasteryScore && score < 100) ||\n (!isOverallMasteryScore && score < masteryScore)) &&\n getTimerStatus(state) === TimerStatus.STOPPED\n );\n }\n return false;\n};\n\nexport const updateScore = (sectionId: string): ThunkResult => (dispatch, getState) => {\n const isOverallMasteryScore = settingsSelector.isOverallMasteryScore(getState());\n const masteryScore = settingsSelector.getMasteryScoreValue(getState());\n const questions = getAffectProgressQuestions(getState(), sectionId);\n\n const correctQuestions = questions.filter((question: any) =>\n question.type === INFORMATION_CONTENT ? question.hasBeenOpened : question.isAnsweredCorrectly\n );\n const score = questions.length\n ? Math.floor((correctQuestions.length * 100) / questions.length)\n : 100;\n\n let status = ProgressStatus.IN_PROGRESS;\n\n if (\n (isOverallMasteryScore && score === 100) ||\n (!isOverallMasteryScore && score >= masteryScore)\n ) {\n status = ProgressStatus.PASSED;\n } else if (\n checkSectionFailed(getState(), sectionId) ||\n checkSectionFailedTimedOut(getState(), score)\n ) {\n status = ProgressStatus.FAILED;\n }\n dispatch({\n type: ActionTypes.SECTION_SCORE_UPDATED,\n payload: {\n id: sectionId,\n score,\n status\n }\n });\n};\n\nexport const updateSectionAnsweredProgress = (sectionId: string): ThunkResult => (\n dispatch,\n getState\n) => {\n const sectionProgress = getSectionProgress(getState(), sectionId);\n\n dispatch({\n type: ActionTypes.SECTION_ANSWERED_SCORE,\n payload: {\n id: sectionId,\n sectionProgress\n }\n });\n};\n\nexport const sectionAnswered = (sectionId: string): ThunkResult => (dispatch, getState) => {\n dispatch({\n type: ActionTypes.SECTION_ANSWERED,\n payload: {\n id: sectionId,\n isSectionAnswered: isSectionAnswered(getState(), sectionId)\n }\n });\n};\n\nexport const updateSection = (sectionId: string): ThunkResult => dispatch => {\n dispatch(updateScore(sectionId));\n dispatch(sectionAnswered(sectionId));\n dispatch(updateSectionAnsweredProgress(sectionId));\n};\n\nexport const updateProgress = (sectionId: string): ThunkResult> => async (\n dispatch,\n getState\n) => {\n await dispatch(updateSection(sectionId));\n const section = getSection(getState(), sectionId);\n let xapiStatus = section.status;\n if (\n isAttemptSubmitted(getState()) &&\n courseSelectors.isInProgress(getState()) &&\n settingsSelector.shouldSubmitAllQuestions(getState())\n ) {\n xapiStatus = ProgressStatus.FAILED;\n }\n await eventEmitter.emit(events.SECTION_PROGRESSED, { section, xapiStatus });\n};\n\nexport const onSectionIsPassed = (sectionId: string): ThunkResult => dispatch => {\n dispatch({\n type: ActionTypes.SECTION_IS_PASSED,\n payload: {\n id: sectionId,\n status: ProgressStatus.PASSED\n }\n });\n};\n\nexport const sectionsLoaded = (sections: any): ThunkResult => dispatch => {\n dispatch({ type: ActionTypes.SECTIONS_LOADED, payload: sections });\n};\n\nexport const cleanup = (sectionId: string): ThunkResult => dispatch => {\n dispatch({\n type: ActionTypes.SECTION_SCORE_UPDATED,\n payload: {\n id: sectionId,\n score: 0,\n status: ProgressStatus.IN_PROGRESS\n }\n });\n\n dispatch({\n type: ActionTypes.SECTION_ANSWERED,\n payload: {\n id: sectionId,\n isSectionAnswered: false\n }\n });\n\n dispatch({\n type: ActionTypes.SECTION_ANSWERED_SCORE,\n payload: {\n id: sectionId,\n sectionProgress: 0\n }\n });\n};\n","import { ProgressStatus } from 'constants/progressStatus';\n\nexport const isPassed = (status: number) => status === ProgressStatus.PASSED;\n\nexport const isFailed = (status: number) => status === ProgressStatus.FAILED;\n\nexport const isInProgress = (status: number) => status === ProgressStatus.IN_PROGRESS;\n","export type SettingsTime = {\n hours: number;\n minutes: number;\n seconds: number;\n};\n\nexport type TimeLimitFormat = 'hr' | 'min' | 'sec';\n\nconst truncate = (x: number) => {\n if (!Math.trunc) {\n return x < 0 ? Math.ceil(x) : Math.floor(x);\n }\n return Math.trunc(x);\n};\n\nexport const getMillisecondsFromTime = (\n { hours, minutes, seconds }: SettingsTime = { hours: 0, minutes: 0, seconds: 0 }\n) => (hours * 60 * 60 + minutes * 60 + seconds) * 1000;\n\nexport const getTimeFromMilliseconds = (\n milliSeconds: number,\n format?: TimeLimitFormat\n): SettingsTime | number => {\n const totalSeconds = Math.floor(milliSeconds / 1000);\n const totalMinutes = totalSeconds / 60;\n const totalHours = totalMinutes / 60;\n\n if (milliSeconds < 0) {\n return 0;\n }\n\n switch (format) {\n case 'sec':\n return totalSeconds;\n case 'min':\n return Math.round(totalMinutes * 10) / 10;\n case 'hr':\n return totalHours;\n default:\n return {\n hours: Math.floor(totalHours % 60),\n minutes: Math.floor(totalMinutes % 60),\n seconds: Math.floor(totalSeconds % 60)\n };\n }\n};\n\nexport const calculateTimeLeft = (\n timeLimit: number,\n currentTimeElapsed: number,\n previousTimeElapsed: number\n) => timeLimit - (currentTimeElapsed + previousTimeElapsed);\n\nexport const calculateTimeElapsed = (startedAt: number, updatedAt: number) =>\n truncate((updatedAt - startedAt) / 100) * 100;\n\nexport const getElapsedTimeInPercentage = (timeLeft: number, timeLimit: number) =>\n Math.ceil(((timeLimit - timeLeft) / timeLimit) * 100);\n","import eventEmitter, { events } from 'core/events/eventEmitter';\n\nimport { ActionTypes } from './types';\nimport { ThunkResult } from '../types';\n\nexport const navigatedToUrl = (\n prevUrl: string,\n currentUrl: string\n): ThunkResult> => async (dispatch, getState) => {\n await eventEmitter.emit(events.APP_NAVIGATED, { url: currentUrl, state: getState() });\n dispatch({ type: ActionTypes.NAVIGATED_INSIDE_THE_APP, payload: { prevUrl, currentUrl } });\n};\n\nexport const goToUrl = (url: string): ThunkResult => () => {\n window.open(url, '_self');\n};\n\nexport const poolUrlReset = (questions: any): ThunkResult => dispatch => {\n dispatch({ type: ActionTypes.POOL_URL_LOADED, payload: questions });\n}\n\nexport const updateElementIdInViewPort = (\n elementIdInViewport: string\n): ThunkResult> => async dispatch => {\n dispatch({ type: ActionTypes.ELEMENT_ID_IN_VIEWPORT_UPDATED, payload: { elementIdInViewport } });\n};\n","import styled, { css } from 'styled-components';\nimport * as typography from 'components/mixins/typography';\n\nconst normalizeFocus = () => css`\n &:focus {\n outline: none;\n border: none;\n }\n`;\n\ntype HeadersProps = {\n title: string;\n tabIndex: string | number;\n};\nexport const Header1 = styled.h1.attrs(({ tabIndex = 1, title }: HeadersProps) => ({\n title,\n tabIndex\n}))`\n ${normalizeFocus};\n ${typography.mainFontH1};\n`;\n\nexport const Header2 = styled.h2.attrs(() => ({\n tabIndex: 0\n}))`\n ${normalizeFocus};\n ${typography.mainFontH2};\n`;\n\nexport const Header3 = styled.h3.attrs(() => ({\n tabIndex: 0\n}))`\n ${normalizeFocus};\n ${typography.mainFontH3};\n`;\n\nexport const Header4 = styled.h4`\n ${typography.mainFontH4};\n ${normalizeFocus};\n`;\n\nexport const Span = styled.span`\n ${typography.secondaryFontSmallText};\n line-height: normal;\n`;\n\nexport const Paragraph = styled.p`\n ${typography.secondaryFontText};\n`;\n\nexport const ellipsisMixin = css`\n display: inline-block;\n width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n`;\n\nexport const sizeMixin = (size: number) => css`\n font-size: ${size}px;\n`;\n\nexport const fontMixin = (fontName: string) => css`\n font-family: ${props => props.theme.fonts[fontName].fontFamily};\n`;\n","import * as React from 'react';\nimport styled from 'styled-components';\nimport { getShortString } from 'utils/string';\nimport { isIframe } from 'utils/window';\nimport {\n Header1,\n Header2,\n Header3,\n Header4,\n Span,\n Paragraph,\n ellipsisMixin,\n sizeMixin,\n fontMixin\n} from './Text.styled';\n\nconst components = {\n h1: Header1,\n h2: Header2,\n h3: Header3,\n h4: Header4,\n p: Paragraph,\n span: Span\n};\n\ninterface TextAppearance {\n h1: string;\n h2: string;\n h3: string;\n h4: string;\n span: string;\n p: string;\n}\n\ntype TextProps = {\n appearance: keyof TextAppearance;\n ellipsis?: boolean;\n children: React.ReactNode;\n maxLength?: number;\n size?: number;\n font?: string;\n title?: string;\n inverted?: any;\n theme?: any;\n className?: string;\n tabIndex?: number;\n ignoreFocus?: boolean;\n id?: string;\n};\n\nexport class Text extends React.PureComponent {\n refElement: any;\n children: string;\n\n constructor(props: TextProps) {\n super(props);\n this.refElement = React.createRef();\n this.children = '';\n }\n\n static defaultProps = {\n appearance: 'span',\n ignoreFocus: false\n };\n\n componentDidMount() {\n if (\n !this.props.ignoreFocus &&\n (this.props.appearance === 'h1' ||\n this.props.appearance === 'h2' ||\n this.props.appearance === 'h3')\n ) {\n !isIframe() && this.refElement.current.focus();\n }\n }\n\n render() {\n const { appearance, children, maxLength, font, ...other } = this.props;\n if (maxLength && typeof children === 'string') {\n this.children = getShortString(children, maxLength);\n }\n let Wrapper = styled(components[appearance])`\n ${font && fontMixin(font)};\n ${(p: any) => p.ellipsis && ellipsisMixin};\n ${(p: any) => p.size && sizeMixin(p.size)};\n `;\n return (\n \n {children}\n \n );\n }\n}\n\nexport default Text;\n","export { default } from './Text';\n","import { useState, useEffect } from 'react';\n\ntype TimerProgressProviderProps = {\n valueStart: number;\n valueEnd: number;\n children(url: number): JSX.Element;\n};\n\nconst TimerProgressProvider = ({\n valueStart = 0,\n valueEnd = 0,\n children\n}: TimerProgressProviderProps) => {\n const [value, setValue] = useState(valueStart);\n useEffect(() => {\n setValue(valueEnd);\n }, [valueEnd]);\n\n return children(value);\n};\n\nexport default TimerProgressProvider;\n","import styled from 'styled-components';\nimport { transparentize } from 'utils/color';\n\ntype ContainerProps = {\n isTimerStopped: boolean;\n};\nexport const Container = styled.div`\n width: 22px;\n height: 22px;\n margin: ${props => props.isTimerStopped ? '9px 7px 9px 8px' : '9px 11px 11px 16px'};\n`;\n\nexport const ProgressContainer = styled.div`\n position: relative;\n width: 100%;\n height: 100%;\n`;\n\nexport const Progress = styled.div`\n position: absolute;\n width: 100%;\n height: 100%;\n`;\n\nexport const Content = styled.div`\n position: absolute;\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n color: ${props => transparentize(props.theme.colors.textColor, 0.5)};\n`;\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport { RootAppState } from 'store/types';\nimport { getColors } from 'store/settings/selectors';\nimport CircularProgressbar from 'react-circular-progressbar';\nimport Icon from 'components/common/Icon';\nimport TimerProgressProvider from './TimerProgressProvider';\nimport { Container, ProgressContainer, Progress, Content } from './AnalogTimer.styled';\n\ntype AnalogTimerProps = {\n timeElapsed: number;\n isTimerStopped: boolean;\n colors: { [key: string]: any };\n onClick(): void;\n};\n\nexport const AnalogTimer: React.FunctionComponent = ({ timeElapsed, isTimerStopped, colors, onClick }: AnalogTimerProps) => {\n return (\n \n \n \n \n {(value: number) => (\n \n )}\n \n \n \n \n \n \n \n );\n}\n\nfunction mapStateToProps(state: RootAppState) {\n return {\n colors: getColors(state)\n };\n}\n\nexport default connect(mapStateToProps)(AnalogTimer);\n","import styled from 'styled-components';\nimport { transparentize } from 'utils/color';\n\ntype ContainerProps = {\n isTimerStopped: boolean;\n};\nexport const Container = styled.div`\n display: flex;\n margin: ${props => (props.isTimerStopped ? '8px 20px 8px 8px' : '8px 20px')};\n`;\n\nexport const DigitContainer = styled.div`\n display: flex;\n width: 21px;\n height: 24px;\n border-radius: 4px;\n background-color: ${props => transparentize(props.theme.colors.textColor, 0.1)};\n align-items: center;\n justify-content: center;\n`;\n\nexport const Digits = styled.span.attrs({\n 'data-test': 'digital-timer-value'\n})`\n display: flex;\n height: 100%;\n font-size: 12px;\n font-weight: 700;\n font-family: ${props => props.theme.fonts.secondaryFont.fontFamily};\n color: ${props => props.theme.colors.textColor};\n align-items: center;\n justify-content: center;\n`;\n\nexport const Separator = styled.span`\n display: flex;\n height: 24px;\n content: ':';\n font-size: 12px;\n font-weight: 700;\n font-family: ${props => props.theme.fonts.secondaryFont.fontFamily};\n color: ${props => transparentize(props.theme.colors.textColor, 0.5)};\n align-items: center;\n justify-content: center;\n margin: 0 4px;\n`;\n","import * as React from 'react';\nimport { getTimeFromMilliseconds, SettingsTime } from 'utils/timer';\nimport { DigitContainer, Digits, Container, Separator } from './DigitalTimer.styled';\n\ntype DigitProps = {\n value: number;\n};\n\nconst Digit: React.FunctionComponent = ({ value }: DigitProps) => {\n const digit = value >= 10 ? value.toString() : `0${value}`;\n return (\n \n {digit}\n \n );\n}\n\ntype DigitalTimerProps = {\n timeLeft: number;\n isTimerStopped: boolean;\n};\n\nexport const DigitalTimer: React.FunctionComponent = ({\n timeLeft,\n isTimerStopped\n}: DigitalTimerProps) => {\n const { hours = 0 , minutes = 0, seconds = 0 } = getTimeFromMilliseconds(timeLeft) as SettingsTime;\n return (\n \n \n :\n \n :\n \n \n );\n}\n\nexport default DigitalTimer;\n","import styled from 'styled-components';\nimport Icon from 'components/common/Icon';\n\nexport const Container = styled.div`\n margin-left: 8px;\n`;\n\nexport const PauseIcon = styled(Icon)`\n margin-left: 8px;\n font-size: 8px;\n`;\n","import * as React from 'react';\nimport AnalogTimer from 'components/timer/Analog';\nimport DigitalTimer from 'components/timer/Digital';\nimport { getElapsedTimeInPercentage } from 'utils/timer';\nimport { PauseIcon } from './Timer.styled';\nimport { TimerBlockProps } from './types';\n\nexport const TimerBlock: React.FunctionComponent = ({\n isTimerStopped,\n isLowResolution,\n showDigitalTimer,\n timeLeft,\n timeLimit,\n onClick\n}: TimerBlockProps) => (\n <>\n {isTimerStopped && }\n {!isLowResolution || showDigitalTimer ? (\n \n ) : (\n \n )}\n \n);\n\nexport default TimerBlock;\n","import { useEffect, useRef } from 'react';\n\ntype Delay = number;\ntype TimerHandler = () => void;\n\nconst noop = () => {\n // do nothing\n};\n\nconst useInterval = (callback: TimerHandler, delay: Delay) => {\n const savedCallbackRef = useRef();\n\n useEffect(() => {\n savedCallbackRef.current = callback;\n }, [callback]);\n\n useEffect(() => {\n const handler = () => {\n if (savedCallbackRef.current) {\n return savedCallbackRef.current();\n }\n return noop();\n };\n const intervalId = setInterval(handler, delay);\n return () => clearInterval(intervalId);\n }, [delay]);\n};\n\nexport default useInterval;\n","import { useEffect, useRef } from 'react';\nimport { TimerStatus } from 'constants/timer';\n\ntype Delay = number;\ntype TimerHandler = () => void;\n\nconst noop = () => {\n // do nothing\n};\n\nconst useTimeout = (\n callback: TimerHandler,\n delay: Delay,\n timerStatus: TimerStatus,\n updatedAt: number,\n isPageVisible: boolean\n) => {\n const savedCallbackRef = useRef();\n\n useEffect(() => {\n savedCallbackRef.current = callback;\n }, [callback]);\n\n useEffect(() => {\n const handler = () => {\n if (savedCallbackRef.current) {\n return savedCallbackRef.current();\n }\n return noop();\n };\n const intervalId = setTimeout(handler, delay);\n return () => clearInterval(intervalId);\n }, [delay, timerStatus, updatedAt]);\n};\n\nexport default useTimeout;\n","import React, { useState, useEffect } from 'react';\nimport { connect } from 'react-redux';\nimport { usePageVisibility } from 'react-page-visibility';\nimport { RootAppState } from 'store/types';\nimport { getTimerLimit, shouldSubmitAllQuestions } from 'store/settings/selectors';\nimport { getTimerElapsed, getTimerStatus } from 'store/timer/selectors';\nimport { getCourseStructure, getScore, getTimerProgressKey } from 'store/course/selectors';\nimport {\n getUnansweredQuestions,\n isAllQuestionsFailed,\n isAllSurveyQuestionsAnswered\n} from 'store/questions/selectors';\nimport * as courseTimerActions from 'store/timer/actions';\nimport * as courseQuestionActions from 'store/questions/actions';\nimport { bindActionCreators, Dispatch } from 'redux';\nimport { getTimeFromMilliseconds, calculateTimeLeft, calculateTimeElapsed } from 'utils/timer';\nimport {\n TimerStatus,\n PROGRESS_STORAGE_TIMER_UPDATE_INTERVAL,\n APP_STORE_TIMER_UPDATE_INTERVAL\n} from 'constants/timer';\nimport * as treeOfContentActions from 'store/treeOfContent/actions';\nimport { TimerProps } from './types';\nimport TimerBlock from './TimerBlock';\nimport useInterval from './useInterval';\nimport useTimeout from './useTimeout';\n\nexport const Timer: React.FunctionComponent = ({\n timeLimit,\n timerStatus,\n timeElapsed,\n isLowResolution,\n timerActions,\n courseScore,\n hasAllQuestionsFailed,\n timerProgressKey,\n isAllSurveyQuestionsAnswered\n}: TimerProps) => {\n const isPageVisible = usePageVisibility();\n const [showDigitalTimer, setShowDigitalTimer] = useState(false);\n const onClick = () => setShowDigitalTimer(true);\n const [startedAt, setStartedAt] = useState(0);\n const [updatedAt, setUpdatedAt] = useState(0);\n const [timeLeft, setTimeLeft] = useState(calculateTimeLeft(timeLimit, timeElapsed, 0));\n const [previousTimeElapsed] = useState(timeElapsed);\n const [previousTimerStatus] = useState(timerStatus);\n const isTimerStopped = timerStatus === TimerStatus.STOPPED;\n\n useInterval(() => {\n if (timerStatus === TimerStatus.STARTED) {\n timerActions.setTimerElapsed(timeLimit - timeLeft);\n timerActions.updateTimerProgress();\n }\n }, PROGRESS_STORAGE_TIMER_UPDATE_INTERVAL);\n\n useInterval(() => {\n if (timerStatus === TimerStatus.STARTED) {\n timerActions.setTimerElapsed(timeLimit - timeLeft);\n }\n }, APP_STORE_TIMER_UPDATE_INTERVAL);\n\n useTimeout(\n () => {\n const currentTimeElapsed = calculateTimeElapsed(startedAt, updatedAt);\n const timeRemaining = calculateTimeLeft(timeLimit, currentTimeElapsed, previousTimeElapsed);\n if (timerStatus === TimerStatus.STARTED) {\n if (timeRemaining > 0) {\n const now = Math.ceil(performance.now());\n if (!startedAt) {\n setStartedAt(now);\n }\n setUpdatedAt(now);\n setTimeLeft(timeRemaining);\n localStorage.setItem(timerProgressKey, `${timeLimit - timeRemaining}`);\n } else {\n setTimeLeft(0);\n localStorage.setItem(timerProgressKey, `${timeLimit}`);\n }\n }\n },\n 1000,\n timerStatus,\n updatedAt,\n isPageVisible\n );\n\n useEffect(() => {\n if (timerStatus === TimerStatus.STARTED && getTimeFromMilliseconds(timeLeft, 'sec') <= 1) {\n timerActions.setTimerStatus(TimerStatus.TIMED_OUT);\n timerActions.setTimerElapsed(timeLimit);\n setTimeLeft(0);\n timerActions.updateTimerProgress();\n }\n }, [timerStatus, timeLeft, timeLimit, timerActions]);\n\n useEffect(() => {\n if (previousTimerStatus !== TimerStatus.STOPPED && timerStatus === TimerStatus.STOPPED) {\n timerActions.setTimerElapsed(timeLimit - timeLeft);\n timerActions.updateTimerProgress();\n }\n }, [timerStatus]); // eslint-disable-line react-hooks/exhaustive-deps\n\n useEffect(() => {\n if (\n timerStatus === TimerStatus.STARTED &&\n (courseScore === 100 || hasAllQuestionsFailed) &&\n isAllSurveyQuestionsAnswered\n ) {\n timerActions.setTimerStatus(TimerStatus.STOPPED);\n timerActions.updateTimerProgress();\n }\n }, [timerStatus, courseScore, hasAllQuestionsFailed, timerActions, isAllSurveyQuestionsAnswered]);\n\n return (\n \n );\n};\n\nfunction mapStateToProps(state: RootAppState) {\n return {\n timeLimit: getTimerLimit(state),\n timerStatus: getTimerStatus(state),\n timeElapsed: getTimerElapsed(state),\n submitAllQuestionsEnabled: shouldSubmitAllQuestions(state),\n courseStructure: getCourseStructure(state),\n isLowResolution: state.app.isLowResolution,\n unansweredQuestions: getUnansweredQuestions(state),\n courseScore: getScore(state),\n hasAllQuestionsFailed: isAllQuestionsFailed(state),\n timerProgressKey: getTimerProgressKey(state),\n isAllSurveyQuestionsAnswered: isAllSurveyQuestionsAnswered(state)\n };\n}\n\nfunction mapDispatchToProps(dispatch: Dispatch) {\n return {\n timerActions: bindActionCreators(courseTimerActions, dispatch),\n tocActions: bindActionCreators(treeOfContentActions, dispatch),\n questionActions: bindActionCreators(courseQuestionActions, dispatch)\n };\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(Timer);\n","import React from 'react';\nimport { withTheme } from 'styled-components';\nimport { transparentize } from 'utils/color';\nimport { localize } from 'core/localization';\nimport { Figure } from './Figure.styled';\n\ntype SecretLinkProps = {\n theme: { [key: string]: any }\n};\nexport const SecretLink = (props: SecretLinkProps) => (\n \n D18580DD-1FBB-400C-AF63-2F51E37FA0CF\n Created with sketchtool.\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n);\n\nexport default withTheme(SecretLink);\n","import styled from 'styled-components';\nimport { Button, Text } from 'components/common';\nimport buttonDefaultStyle from 'components/mixins/normalize';\nimport { transparentize } from 'utils/color';\n\nexport const ButtonElement = styled(Button)`\n ${buttonDefaultStyle};\n flex: 0 0 auto;\n min-width: 200px;\n background-color: ${props => props.theme.colors.mainColor};\n font-size: 14px;\n margin-bottom: 24px;\n &:hover,\n &:focus {\n outline: 1px solid black;\n background-color: ${props => transparentize(props.theme.colors.mainColor, 0.9)};\n }\n &:focus:not(:focus-visible) {\n outline: none;\n }\n`;\n\nexport const EmailWrapper = styled.span`\n color: ${props => props.theme.colors.mainColor};\n`;\n\nexport const DescriptionElement = styled(Text)`\n font-weight: normal;\n line-height: 1.71;\n text-align: center;\n color: ${props => props.theme.colors.textColor};\n`;\n\nexport const DescriptionWrapper = styled(Text)`\n display: flex;\n flex-direction: column;\n flex: 0 0 auto;\n line-height: 1.71;\n margin-bottom: 40px;\n`;\n\nexport const TitleElement = styled(Text)`\n font-weight: 300;\n line-height: 1.03;\n text-align: center;\n margin-bottom: 32px;\n color: ${props => transparentize(props.theme.colors.textColor, 0.5)};\n`;\n\nexport const Figure = styled.div`\n margin-bottom: 54px;\n`;\n\nexport const ContinueLaterWrapper = styled.section`\n display: flex;\n flex-direction: column;\n align-items: center;\n position: relative;\n z-index: 1;\n`;\n","import * as React from 'react';\nimport { connect } from 'react-redux';\nimport { localize } from 'core/localization';\nimport SecretLink from 'assets/figures/SecretLink';\nimport { Link, StatusTooltip } from 'components/common';\nimport { BUTTON, LINK, TOOLTIP } from 'constants/components';\nimport { POPUP_ID_CLOSE_COURSE } from 'constants/popups';\nimport { getEmail } from 'store/user/selectors';\nimport progressStorage from 'core/progressStorage';\nimport { STATUS_OK } from 'constants/progressStorage';\nimport { RootAppState } from 'store/types';\nimport CloseCoursePopup from '../closeCourse';\nimport {\n ButtonElement,\n EmailWrapper,\n DescriptionElement,\n DescriptionWrapper,\n TitleElement,\n Figure,\n ContinueLaterWrapper\n} from './ContinueLater.styled';\n\nconst constants = {\n emailSeparator: '{email}'\n};\n\ntype ContinueLaterProps = {\n actions: { [key: string]: any };\n closePopup(): void;\n email: string;\n};\n\ntype ContinueLaterState = {\n emailSent: boolean;\n emailSentError: boolean;\n};\n\nexport class ContinueLater extends React.Component {\n constructor(props: ContinueLaterProps) {\n super(props);\n\n this.state = {\n emailSent: false,\n emailSentError: false\n };\n }\n\n onSendSecretLink = async () => {\n this.setState({ emailSent: false, emailSentError: false });\n\n const status = await progressStorage.sendSecretLink();\n const emailSent = status === STATUS_OK;\n\n this.setState({\n emailSent,\n emailSentError: !emailSent\n });\n };\n\n onCloseCourse = () => {\n this.props.closePopup();\n this.props.actions.openPopup({\n popupId: POPUP_ID_CLOSE_COURSE,\n popupAriaLabelKey: '[aria label close course popup]',\n component: CloseCoursePopup,\n disablePopupClosing: true\n });\n };\n\n hideMessage = () => {\n this.setState({\n emailSent: false,\n emailSentError: false\n });\n };\n\n render() {\n return (\n \n
\n \n
\n \n {localize('[continue on this device]')}\n \n {this.renderDescription()}\n {this.renderSecretLink()}\n \n
\n );\n }\n\n renderDescription = () => {\n const { email } = this.props;\n\n const localizedText = localize('[get secret link to]');\n const descriptionElements = localizedText.split(constants.emailSeparator);\n descriptionElements.splice(1, 0, {email});\n\n return (\n \n \n {descriptionElements}\n \n \n {localize('[get a secret link to explanation]')}\n \n \n );\n };\n\n renderSecretLink = () => {\n const { emailSent, emailSentError } = this.state;\n\n const showTooltip = emailSent || emailSentError;\n let tooltipType: any = TOOLTIP.CORRECT;\n let tooltipMessageKey = '[secret link email sent success]';\n\n if (emailSentError) {\n tooltipType = TOOLTIP.INCORRECT;\n tooltipMessageKey = '[error secret link email sending]';\n }\n\n return (\n this.hideMessage()}\n popoverButton={\n \n {localize('[send me the link]')}\n \n }\n />\n );\n };\n}\n\nfunction mapStateToProps(state: RootAppState) {\n return {\n email: getEmail(state)\n };\n}\n\nexport default connect(mapStateToProps)(ContinueLater);\n","import styled from 'styled-components';\nimport { Text, Button } from 'components/common';\nimport { transparentize } from 'utils/color';\n\nexport const TitleElement = styled(Text)`\n font-weight: 300;\n line-height: 1.43;\n text-align: center;\n margin-bottom: 48px;\n color: ${props => props.theme.colors.textColor};\n`;\n\nexport const ButtonElement = styled(Button)`\n background-color: ${props => props.theme.colors.mainColor};\n margin: 48px 0 32px 0;\n &:hover,\n &:focus {\n background-color: ${props => transparentize(props.theme.colors.mainColor, 0.9)};\n }\n`;\n\nexport const ContinueLaterWrapper = styled.section`\n display: flex;\n flex-direction: column;\n align-items: center;\n position: relative;\n z-index: 1;\n`;\n","import * as React from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators, Dispatch } from 'redux';\nimport { POPUP_ID_CLOSE_COURSE } from 'constants/popups';\nimport { localize } from 'core/localization';\nimport { Link } from 'components/common';\nimport { LINK } from 'constants/components';\nimport * as popupActions from 'store/popup/actions';\nimport * as courseActions from 'store/course/actions';\nimport { closeWindow } from 'utils/window';\nimport CloseCoursePopup from '../closeCourse';\nimport DescriptionWithBackground from '../descriptionWithBackground';\nimport { TitleElement, ButtonElement, ContinueLaterWrapper } from './ContinueLaterInScorm.styled';\n\ntype ContinueLaterInScormProps = {\n popupAction: { [key: string]: any };\n courseAction: { [key: string]: any };\n closePopup(): void;\n};\n\nexport class ContinueLaterInScorm extends React.PureComponent {\n closeCourse = async () => {\n const { courseAction, popupAction } = this.props;\n this.props.closePopup();\n popupAction.openPopup({\n popupId: POPUP_ID_CLOSE_COURSE,\n popupAriaLabelKey: '[aria label close course popup]',\n component: CloseCoursePopup,\n disablePopupClosing: true\n });\n\n await courseAction.finalized();\n closeWindow();\n };\n\n render() {\n return (\n \n \n {localize('[note that]')}\n \n \n \n {localize('[ok close course]')}\n \n this.props.closePopup()}\n text={localize('[cancel go back to the course]')}\n layout={LINK.LAYOUT.FORM}\n />\n \n );\n }\n}\n\nfunction mapDispatchToProps(dispatch: Dispatch) {\n return {\n courseAction: bindActionCreators(courseActions, dispatch),\n popupAction: bindActionCreators(popupActions, dispatch)\n };\n}\n\nexport default connect(null, mapDispatchToProps)(ContinueLaterInScorm);\n","import styled from 'styled-components';\nimport media from 'components/mixins/media';\nimport { Button, Text } from 'components/common';\nimport { TextElement } from 'components/common/Button/Button.styled';\nimport { secondaryFont } from 'components/mixins/typography';\nimport { transparentize } from 'utils/color';\nimport buttonDefaultStyle from 'components/mixins/normalize';\nimport { defaultBoxShadowColor } from 'constants/common';\n\nexport const IconContainer = styled.div`\n display: flex;\n width: 15px;\n height: 100%;\n align-items: center;\n padding: 3px;\n opacity: 0.3;\n transition: opacity 0.2s linear;\n`;\n\nexport const ItemText = styled(Text)`\n text-align: left;\n color: ${props => transparentize(props.theme.colors.textColor, 0.7)};\n`;\n\ntype ListItemProps = {\n tabIndex: string;\n};\n\nexport const ListItem = styled(Button).attrs((props: ListItemProps) => ({\n tabIndex: props.tabIndex\n}))`\n ${buttonDefaultStyle};\n display: flex;\n align-items: center;\n width: 100%;\n height: auto;\n padding: 16px;\n border-radius: 0;\n line-height: 0;\n cursor: pointer;\n\n ${TextElement} {\n display: flex;\n align-items: center;\n font-weight: normal;\n }\n\n ${IconContainer} {\n opacity: 0.5;\n margin-right: 8px;\n }\n\n &:hover,\n &:focus {\n background-color: ${props => transparentize(props.theme.colors.textColor, 0.05)};\n ${IconContainer} {\n opacity: 1;\n }\n\n ${ItemText} {\n color: ${props => transparentize(props.theme.colors.textColor, 1)};\n }\n }\n &:focus {\n background-color: ${props => transparentize(props.theme.colors.textColor, 0.05)};\n outline: 1px solid black;\n ${IconContainer} {\n opacity: 1;\n }\n\n ${ItemText} {\n color: ${props => transparentize(props.theme.colors.textColor, 1)};\n }\n }\n &:focus:not(:focus-visible) {\n outline: none;\n }\n`;\n\nexport const ActionListContainer = styled.div.attrs({\n 'data-test': 'action-list-container'\n})`\n position: relative;\n width: 225px;\n border-radius: 2px;\n padding: 0;\n background-color: ${props => props.theme.colors.contentBodyColor};\n`;\n\nexport const AvatarLetterElement = styled.span`\n font-size: 12px;\n ${secondaryFont};\n font-weight: bold;\n color: ${props => props.theme.colors.buttonTextColor};\n`;\n\nexport const AvatarLetterContainer = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n width: 34px;\n height: 34px;\n margin-right: 4px;\n background-color: ${props => props.theme.colors.mainColor};\n border-radius: 20px;\n`;\n\nexport const TimerContainer = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\ntype ExpandableWrapperProps = {\n ariaHidden?: any;\n tabIndex?: number;\n};\nexport const ExpandableWrapper = styled.button.attrs((props: ExpandableWrapperProps) => ({\n 'aria-hidden': props.ariaHidden,\n 'data-test': 'user-menu-dropdown-toggler',\n tabIndex: props.tabIndex\n}))`\n ${buttonDefaultStyle};\n display: flex;\n padding: 0;\n align-items: center;\n border-radius: 20px;\n cursor: pointer;\n transition: all 0.1s ease-out, focus 0s;\n\n &:hover,\n &:active {\n outline: none;\n ${IconContainer} {\n opacity: 0.7;\n }\n }\n &:focus {\n outline: 1px solid black;\n background: none;\n ${IconContainer} {\n opacity: 0.7;\n }\n }\n &:focus:not(:focus-visible) {\n outline: none;\n }\n`;\n\ntype MenuContainerProps = {\n ariaHidden?: any;\n};\nexport const MenuContainer = styled.div.attrs((props: MenuContainerProps) => ({\n 'aria-hidden': props.ariaHidden\n}))`\n display: flex;\n align-items: center;\n height: 40px;\n padding: 3px;\n position: absolute;\n background-color: ${props => props.theme.colors.contentBodyColor};\n box-shadow: 0 2px 10px 0 ${transparentize(defaultBoxShadowColor, 0.1)};\n border-radius: 20px;\n top: 20px;\n right: 30px;\n z-index: 105;\n\n ${media.mobile`\n top: 10px;\n right: 10px;\n `};\n`;\n","import * as React from 'react';\nimport { connect } from 'react-redux';\nimport { withTheme } from 'styled-components';\nimport { bindActionCreators, Dispatch } from 'redux';\nimport * as userActions from 'store/user/actions';\nimport { isAppLoadingFailed } from 'store/app/selectors';\nimport { shouldSaveCrossDevice } from 'store/user/selectors';\nimport {\n isScormMode,\n isNpsEnabled,\n getLearnServiceUrl,\n isPreviewMode,\n getTimerEnabled\n} from 'store/settings/selectors';\nimport { isFinalized, isCourseLaunched } from 'store/course/selectors';\nimport * as popupActions from 'store/popup/actions';\nimport * as courseActions from 'store/course/actions';\nimport * as navigationActions from 'store/navigation/actions';\nimport Icon from 'components/common/Icon';\nimport { localize } from 'core/localization';\nimport {\n POPUP_ID_CONTINUE_LATER,\n POPUP_ID_CONTINUE_LATER_IN_SCORM,\n POPUP_ID_CLOSE_COURSE,\n POPUP_ID_NPS_POPUP\n} from 'constants/popups';\nimport { Tooltip } from 'components/common';\nimport Timer from 'components/timer';\nimport { RootAppState } from 'store/types';\nimport { isLtiInitialized } from 'store/modules/selectors';\nimport { KEYS } from 'constants/common';\nimport ContinueLater from '../popups/continueLater';\nimport ContinueLaterInScorm from '../popups/continueLaterInScorm';\nimport CloseCoursePopup from '../popups/closeCourse';\nimport NpsPopup from '../popups/nps';\n\nimport {\n MenuContainer,\n ExpandableWrapper,\n AvatarLetterContainer,\n AvatarLetterElement,\n IconContainer,\n ActionListContainer,\n ListItem,\n ItemText,\n TimerContainer\n} from './UserMenu.styled';\nimport { getAvatarLetter } from '../../store/user/selectors';\n\nconst constants = {\n defaultAvatarLetter: 'A'\n};\n\nconst closeCoursePopupSettings = {\n popupId: POPUP_ID_CLOSE_COURSE,\n popupAriaLabelKey: '[aria label close course popup]',\n component: CloseCoursePopup,\n disablePopupClosing: true\n};\n\nconst npsPopupSettings = {\n popupId: POPUP_ID_NPS_POPUP,\n popupAriaLabelKey: '[aria label close nps popup]',\n component: NpsPopup,\n fromDownloadCertificateButton: false,\n disablePopupClosing: true,\n disableBottomLine: true\n};\n\ntype UserMenuProps = {\n actions: { [key: string]: any };\n courseAction: { [key: string]: any };\n saveCrossDevice: boolean;\n avatarLetter: string;\n isScorm: boolean;\n isLti: boolean;\n previewMode: boolean;\n courseIsFinalized: boolean;\n npsEnabled: boolean;\n popupActions: { [key: string]: any };\n navigationActions: { [key: string]: any };\n theme?: any;\n ariaHidden?: any;\n learnServiceUrl?: string;\n isLoadingFailed: boolean;\n hasUnhandledError: boolean;\n hasCourseLaunched: boolean;\n isTimerEnabled: boolean;\n};\n\ntype UserMenuState = {\n isExpanded: boolean;\n};\n\nexport class UserMenu extends React.Component {\n templateTheme: any;\n\n constructor(props: UserMenuProps) {\n super(props);\n this.templateTheme = props.theme;\n this.state = {\n isExpanded: false\n };\n this.keyDown = this.keyDown.bind(this);\n }\n\n componentDidMount() {\n document.addEventListener('keydown', this.keyDown, false);\n }\n\n componentWillUnmount() {\n document.removeEventListener('keydown', this.keyDown, false);\n }\n\n toggle = () => {\n this.setState({\n isExpanded: !this.state.isExpanded\n });\n };\n\n closePopup = () => {\n this.setState({\n isExpanded: false\n });\n };\n\n keyDown(event: any) {\n if (\n event.key?.toLowerCase() === KEYS.ESCAPE.toLowerCase() ||\n (event.key?.toLowerCase() === KEYS.TAB.toLowerCase() &&\n this.state.isExpanded &&\n document\n .getElementById('action-list')\n ?.lastElementChild?.classList.contains('focus-visible'))\n ) {\n this.closePopup();\n }\n }\n\n onLogout = async () => {\n this.props.actions.notSkipAuthentication();\n await this.props.actions.logout();\n this.toggle();\n };\n\n onContinueLater = () => {\n this.props.popupActions.openPopup({\n popupId: POPUP_ID_CONTINUE_LATER,\n popupAriaLabelKey: '[continue later aria label]',\n component: ContinueLater\n });\n this.toggle();\n };\n\n onContinueLaterInScorm = () => {\n this.props.popupActions.openPopup({\n popupId: POPUP_ID_CONTINUE_LATER_IN_SCORM,\n popupAriaLabelKey: '[continue later aria label]',\n component: ContinueLaterInScorm\n });\n this.toggle();\n };\n\n onSubmitResult = async () => {\n const { npsEnabled } = this.props;\n await this.props.courseAction.finished();\n\n this.props.popupActions.openPopup(npsEnabled ? npsPopupSettings : closeCoursePopupSettings);\n\n if (!npsEnabled) {\n await this.props.courseAction.finalized();\n }\n this.toggle();\n };\n\n renderListItem(clickAction: any, itemTextKey: any, iconSettings?: any, additionalProps?: any) {\n return (\n \n {iconSettings && (\n \n \n \n )}\n \n {localize(itemTextKey)}\n \n \n );\n }\n\n render() {\n const {\n avatarLetter,\n saveCrossDevice,\n isScorm,\n isLti,\n previewMode,\n courseIsFinalized,\n ariaHidden,\n navigationActions,\n learnServiceUrl,\n hasCourseLaunched,\n isTimerEnabled\n } = this.props;\n const { isExpanded } = this.state;\n\n return (\n \n {isTimerEnabled && hasCourseLaunched && (\n \n \n \n )}\n \n {!isScorm &&\n !previewMode &&\n !isLti &&\n this.renderListItem(\n () => navigationActions.goToUrl(learnServiceUrl),\n '[my courses]',\n null,\n {\n 'data-test': 'my-courses-button'\n }\n )}\n {!this.shouldHideListItem() &&\n !isScorm &&\n saveCrossDevice &&\n this.renderListItem(this.onContinueLater, '[continue later with link]', null, {\n 'data-test': 'continue-later-button'\n })}\n\n {!isScorm &&\n this.renderListItem(\n this.onLogout,\n '[logout]',\n {\n name: 'logout',\n size: 10,\n color: 'textColor'\n },\n {\n 'data-test': 'logout-button'\n }\n )}\n\n {!this.shouldHideListItem() &&\n isScorm &&\n (courseIsFinalized\n ? this.renderListItem(this.onSubmitResult, '[user menu submit result]')\n : this.renderListItem(this.onContinueLaterInScorm, '[continue course later]'))}\n \n }\n >\n \n \n \n {avatarLetter || constants.defaultAvatarLetter}\n \n \n \n \n \n \n \n \n );\n }\n\n shouldHideListItem() {\n return this.props.isLoadingFailed || this.props.hasUnhandledError;\n }\n}\n\nfunction mapStateToProps(state: RootAppState) {\n return {\n avatarLetter: getAvatarLetter(state),\n saveCrossDevice: shouldSaveCrossDevice(state),\n isScorm: isScormMode(state),\n isLti: isLtiInitialized(state),\n courseIsFinalized: isFinalized(state),\n npsEnabled: isNpsEnabled(state),\n learnServiceUrl: getLearnServiceUrl(state),\n previewMode: isPreviewMode(state),\n isLoadingFailed: isAppLoadingFailed(state),\n hasCourseLaunched: isCourseLaunched(state),\n isTimerEnabled: getTimerEnabled(state)\n };\n}\n\nfunction mapDispatchToProps(dispatch: Dispatch) {\n return {\n actions: bindActionCreators(userActions, dispatch),\n courseAction: bindActionCreators(courseActions, dispatch),\n navigationActions: bindActionCreators(navigationActions, dispatch),\n popupActions: bindActionCreators(popupActions, dispatch)\n };\n}\n\nexport default withTheme(connect(mapStateToProps, mapDispatchToProps)(UserMenu));\n","import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport Popup from 'components/common/Popup';\nimport { getPopupVisibility } from 'store/popup/selectors';\nimport {\n getBackground,\n isTrackingEnabled,\n isScormMode,\n isResource\n} from 'store/settings/selectors';\nimport { isAuthenticated } from 'store/user/selectors';\nimport { isReviewEnabled } from 'store/modules/selectors';\nimport { isCourseAccessLimited } from 'store/course/selectors';\nimport { isLoaderVisibility } from 'store/loader/selectors';\nimport Reviewable from 'components/review/Reviewable';\nimport { HINT_FOR_GENERAL_COMMENT } from 'constants/review';\nimport { RootAppState } from 'store/types';\nimport UserMenu from '../../userMenu';\nimport {\n LayoutContainer,\n BackgroundContainer,\n PageContainer,\n PageContentContainer,\n PageContentChild,\n PageSidebarContainer,\n PageSidebarChild,\n BasicStylesSidebar\n} from './Layout.styled';\n\ntype PageSidebarProps = {\n children: any;\n className?: string;\n props?: any;\n};\nexport const PageSidebar = ({ children, className, ...props }: PageSidebarProps) => (\n \n {children}\n \n);\n\ntype BasicStyledSidebarProps = {\n children?: any;\n className?: string;\n background?: any;\n};\nexport const BasicStyledSidebar = ({\n children,\n className = '',\n ...props\n}: BasicStyledSidebarProps) => (\n \n {children}\n \n);\n\ntype PageContentProps = {\n children: any;\n className?: string;\n props?: any;\n};\nexport const PageContent = ({ children, ...props }: PageContentProps) => (\n \n {children}\n \n);\n\ntype LayoutProps = {\n children: any;\n background: { [key: string]: any };\n isUserAuthenticated: boolean;\n popupExpanded: boolean;\n trackingEnabled: boolean;\n isAccessLimited: boolean;\n isLoaderVisible?: boolean;\n isScorm: boolean;\n reviewMode: boolean;\n isResourceType: boolean;\n className?: string;\n hasUnhandledError?: boolean;\n};\n\nexport class Layout extends Component {\n render() {\n const {\n background,\n children,\n popupExpanded,\n className,\n hasUnhandledError,\n isLoaderVisible,\n isResourceType\n } = this.props;\n const bgHeader = background.header;\n return (\n \n \n {!isLoaderVisible && !isResourceType && (\n \n )}\n {children}\n {this.shouldRenderUserMenu() && !isLoaderVisible && (\n \n )}\n {popupExpanded && }\n \n \n );\n }\n\n shouldRenderUserMenu() {\n const {\n isUserAuthenticated,\n trackingEnabled,\n isAccessLimited,\n isScorm,\n isResourceType\n } = this.props;\n\n return (\n (isUserAuthenticated && trackingEnabled && !isAccessLimited && !isResourceType) || isScorm\n );\n }\n}\n\nfunction mapStateToProps(state: RootAppState) {\n return {\n background: getBackground(state),\n popupExpanded: getPopupVisibility(state),\n isUserAuthenticated: isAuthenticated(state),\n trackingEnabled: isTrackingEnabled(state),\n isAccessLimited: isCourseAccessLimited(state),\n isLoaderVisible: isLoaderVisibility(state),\n isScorm: isScormMode(state),\n reviewMode: isReviewEnabled(state),\n isResourceType: isResource(state)\n };\n}\n\nexport default connect(mapStateToProps)(Layout);\n"],"sourceRoot":""}