Your IP : 3.145.77.68


Current Path : /var/www/www-root/data/www/www.monolith-realty.ru/bitrix/js/ui/tutor/dist/
Upload File :
Current File : /var/www/www-root/data/www/www.monolith-realty.ru/bitrix/js/ui/tutor/dist/tutor.bundle.js.map

{"version":3,"file":"tutor.bundle.js","sources":["../src/step.js","../src/manager.js","../src/scenario.js"],"sourcesContent":["import { Type, Event } from 'main.core';\n\nexport class Step extends Event.EventEmitter\n{\n\tconstructor(options)\n\t{\n\t\tsuper();\n\t\tthis.setEventNamespace('BX.UI.Tutor.Step');\n\t\toptions = Type.isPlainObject(options) ? options : {};\n\n\t\tthis.id = options.id || null;\n\t\tthis.title = options.title || null;\n\t\tthis.description = options.description || null;\n\t\tthis.url = options.url || '';\n\t\tthis.isCompleted = options.isCompleted || false;\n\t\tthis.video = options.video || null;\n\t\tthis.helpLink = options.helpLink || null;\n\t\tthis.highlight = options.highlight || null;\n\t\tthis.isActive = options.isActive === true;\n\t\tthis.isShownForSlider = options.isShownForSlider || false;\n\t\tthis.initOptions = options;\n\n\t\tthis.videoObj = null;\n\t}\n\n\t/**\n\t * @public\n\t * @returns {string}\n\t */\n\tgetTitle()\n\t{\n\t\treturn this.title;\n\t}\n\n\t/**\n\t * @public\n\t * @returns {Object}\n\t */\n\tgetVideoObj()\n\t{\n\t\treturn this.videoObj;\n\t}\n\n\t/**\n\t * @public\n\t */\n\tgetHighlightOptions()\n\t{\n\t\treturn this.highlight;\n\t}\n\n\t/**\n\t * @public\n\t * @returns {string}\n\t */\n\tgetDescription()\n\t{\n\t\treturn this.description;\n\t}\n\n\t/**\n\t * @public\n\t * @returns {string}\n\t */\n\tgetUrl()\n\t{\n\t\treturn this.url;\n\t}\n\n\t/**\n\t * @public\n\t * @returns {Boolean}\n\t */\n\tgetCompleted()\n\t{\n\t\treturn this.isCompleted;\n\t}\n\n\tgetVideo()\n\t{\n\t\treturn this.video;\n\t}\n\n\tgetHelpLink()\n\t{\n\t\treturn this.helpLink;\n\t}\n\n\t/**\n\t * @public\n\t * @returns {string}\n\t */\n\tgetId()\n\t{\n\t\treturn this.id;\n\t}\n\n\t/**\n\t * @public\n\t * @returns {Object}\n\t */\n\tgetInitOptions()\n\t{\n\t\treturn this.initOptions;\n\t}\n\n\t/**\n\t * @public\n\t */\n\tactivate()\n\t{\n\t\tthis.isActive = true;\n\t}\n\n\t/**\n\t * @public\n\t */\n\tgetShownForSlider()\n\t{\n\t\treturn this.isShownForSlider;\n\t}\n\n\t/**\n\t * @public\n\t */\n\tdeactivate()\n\t{\n\t\tthis.isActive = false;\n\t}\n\n\t/**\n\t * @private\n\t */\n\tstatic getFullEventName(shortName)\n\t{\n\t\treturn shortName;\n\t}\n}","import { Dom, Event, Tag, Loc, Type } from 'main.core';\nimport { Scenario } from './scenario';\nimport { Step } from './step';\nimport { Guide } from 'ui.tour';\nimport { Loader } from \"main.loader\";\nimport 'ui.feedback.form';\n\nexport class Manager extends Event.EventEmitter\n{\n\tconstructor()\n\t{\n\t\tsuper();\n\t\tthis.setEventNamespace('BX.UI.Tutor.Manager');\n\t}\n\n\tsetOptions(options, domain, feedbackFormId)\n\t{\n\t\toptions = options || {};\n\n\t\tthis.tutorialData = options.tutorialData || {};\n\t\tthis.eventService = options.eventService || {};\n\t\tthis.lastCheckTime = options.lastCheckTime || 0;\n\t\tthis.domain = options.domain || '';\n\t\tthis.feedbackFormId = options.feedbackFormId || '';\n\t\tif(Type.isString(domain) && domain.length > 0)\n\t\t{\n\t\t\tthis.domain = domain;\n\t\t}\n\t\tif(Type.isString(feedbackFormId) && feedbackFormId.length > 0)\n\t\t{\n\t\t\tthis.feedbackFormId = feedbackFormId;\n\t\t}\n\t}\n\n\tgetDomain()\n\t{\n\t\treturn this.domain;\n\t}\n\n\tgetCurrentTutorialData()\n\t{\n\t\treturn this.tutorialData;\n\t}\n\n\tgetCurrentEventService()\n\t{\n\t\treturn this.eventService;\n\t}\n\n\tgetCurrentLastCheckTime()\n\t{\n\t\treturn this.lastCheckTime;\n\t}\n\n\t/**\n\t * @return {Manager}\n\t */\n\tstatic getInstance()\n\t{\n\t\treturn this.instance;\n\t}\n\n\t/**\n\t * @return {Scenario}\n\t */\n\tstatic getScenarioInstance()\n\t{\n\t\treturn this.scenarioInstance;\n\t}\n\n\tstatic init(options, domain, feedbackFormId)\n\t{\n\t\tlet instance = this.getInstance();\n\t\tif (!(instance instanceof Manager))\n\t\t{\n\t\t\tthis.instance = new Manager();\n\t\t\tinstance = this.getInstance();\n\t\t\tthis.emit('onInitManager');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tinstance = this.getInstance();\n\t\t}\n\t\tinstance.setOptions(options, domain, feedbackFormId);\n\n\t\treturn instance;\n\t}\n\n\tstatic initScenario(options)\n\t{\n\t\tlet instance = this.getScenarioInstance();\n\t\tif (!(instance instanceof Scenario))\n\t\t{\n\t\t\tthis.scenarioInstance = new Scenario();\n\t\t\tinstance = this.getScenarioInstance();\n\t\t\tthis.emit('onInitScenario');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tinstance = this.getScenarioInstance();\n\t\t}\n\t\tinstance.setOptions(options);\n\n\t\treturn instance;\n\t}\n\n\tstatic showButton(animation)\n\t{\n\t\treturn this.getImButton(animation);\n\t}\n\n\tstatic getRootImButton()\n\t{\n\t\treturn document.getElementById('ui-tutor-btn-wrap');\n\t}\n\n\tstatic hasImButton()\n\t{\n\t\treturn !!this.getRootImButton();\n\t}\n\n\tstatic getImButton(animation)\n\t{\n\t\tif(!this.layout.imButton)\n\t\t{\n\t\t\tlet buttonWrapper = this.getRootImButton();\n\t\t\tif(buttonWrapper)\n\t\t\t{\n\t\t\t\tlet buttonInner = Tag.render`\n\t\t\t\t\t<div class=\"ui-tutor-btn\"></div>\n\t\t\t\t`;\n\t\t\t\tif (animation)\n\t\t\t\t{\n\t\t\t\t\tDom.addClass(buttonWrapper, 'ui-tutor-btn-wrap-animate');\n\t\t\t\t}\n\t\t\t\tDom.append(buttonInner, buttonWrapper);\n\t\t\t\tDom.addClass(buttonWrapper, 'ui-tutor-btn-wrap-show');\n\t\t\t\tthis.layout.imButton = buttonWrapper;\n\t\t\t\tEvent.bind(this.layout.imButton, \"click\", () => {\n\t\t\t\t\tthis.emit('clickImButton');\n\t\t\t\t});\n\n\t\t\t\tlet usersPanel = document.querySelector('.bx-im-users-wrap');\n\t\t\t\tif (document.querySelector('#bx-im-btn-call'))\n\t\t\t\t{\n\t\t\t\t\tusersPanel.style.bottom = '175px';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tusersPanel.style.bottom = '120px';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this.layout.imButton;\n\t}\n\n\tstatic showSmallPopup(text)\n\t{\n\t\tthis.smallPopupText = text;\n\t\tthis.getSmallPopup().style.display = 'block';\n\t\tthis.smallPopupText = '';\n\n\t\tif (Dom.hasClass(this.getSmallPopup(), 'ui-tutor-popup-welcome-hide'))\n\t\t{\n\t\t\tDom.removeClass(this.getSmallPopup(), 'ui-tutor-popup-welcome-hide');\n\t\t}\n\t}\n\n\tstatic hideSmallPopup(skipAnimation)\n\t{\n\t\tskipAnimation = skipAnimation === true;\n\t\tconst removeHandler = function() {\n\t\t\tDom.remove(this.getSmallPopup());\n\t\t\tif(this.hasOwnProperty('smallPopup'))\n\t\t\t{\n\t\t\t\tdelete this.smallPopup;\n\t\t\t}\n\t\t\tthis.emit('onCompleteHideSmallPopup');\n\t\t}.bind(this);\n\t\tDom.removeClass(this.getSmallPopup(), 'ui-tutor-popup-welcome-show');\n\t\tDom.addClass(this.getSmallPopup(), 'ui-tutor-popup-welcome-hide');\n\t\tif(skipAnimation)\n\t\t{\n\t\t\tremoveHandler();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tsetTimeout(removeHandler, 300);\n\t\t}\n\t}\n\n\tstatic showWelcomePopup(text)\n\t{\n\t\tthis.emit('onShowWelcomePopup');\n\t\tthis.showSmallPopup(text);\n\t}\n\n\tstatic hideWelcomePopup()\n\t{\n\t\tthis.emit('onBeforeHideWelcomePopup');\n\t\tthis.hideSmallPopup();\n\t\tthis.emit('onAfterHideWelcomePopup');\n\t}\n\n\tstatic showNoticePopup(text)\n\t{\n\t\tthis.emit('onShowNoticePopup');\n\t\tthis.showSmallPopup(text);\n\t}\n\n\tstatic hideNoticePopup()\n\t{\n\t\tthis.emit('onBeforeHideNoticePopup');\n\t\tthis.hideSmallPopup();\n\t\tthis.emit('onAfterHideNoticePopup');\n\t}\n\n\tstatic getSmallPopup()\n\t{\n\t\tconst clickSmallPopupHandler = () => {\n\t\t\tthis.emit('onClickSmallPopupBtn');\n\t\t};\n\t\tif (!this.smallPopup)\n\t\t{\n\t\t\tthis.smallPopup =\n\t\t\t\tTag.render`\n\t\t\t\t\t<div class=\"ui-tutor-popup\" onclick=\"${clickSmallPopupHandler.bind(this)}\">\n\t\t\t\t\t\t<div class=\"ui-tutor-popup-header\">\n\t\t\t\t\t\t\t<span class=\"ui-tutor-popup-header-icon\"></span>\n\t\t\t\t\t\t\t<span class=\"ui-tutor-popup-header-title-wrap\">\n\t\t\t\t\t\t\t\t<span class=\"ui-tutor-popup-header-title\">${Loc.getMessage('JS_UI_TUTOR_TITLE')}</span> \n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"ui-tutor-popup-content\">\n\t\t\t\t\t\t\t<div class=\"ui-tutor-popup-text\">${this.smallPopupText}</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"ui-tutor-popup-icon-angle\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t`;\n\t\t\tthis.emit('onCreateSmallPopupNode');\n\t\t\tDom.addClass(this.smallPopup, 'ui-tutor-popup-welcome-show');\n\t\t\tthis.emit('onBeforeAppendSmallPopupNode');\n\t\t\tDom.append(this.smallPopup, document.body);\n\t\t\tthis.emit('onAfterAppendSmallPopupNode');\n\t\t}\n\n\t\treturn this.smallPopup;\n\t}\n\n\tstatic showStartPopup(title, text)\n\t{\n\t\tthis.emit('onShowStartPopup');\n\t\tthis.startTitle = title;\n\t\tthis.startText = text;\n\t\tDom.addClass(this.getStartPopup(), 'ui-tutor-popup-show');\n\t\tthis.startPopup.style.display = 'flex';\n\t\tthis.startTitle = '';\n\t\tthis.startText = '';\n\t};\n\n\tstatic closeStartPopup()\n\t{\n\t\tDom.remove(this.getStartPopup());\n\t\tdelete this.startPopup;\n\t}\n\n\tstatic getStartPopup()\n\t{\n\t\tif (!this.startPopup)\n\t\t{\n\t\t\tthis.startPopup =\n\t\t\t\tTag.render`\n\t\t\t\t\t<div class=\"ui-tutor-popup ui-tutor-popup-start\">\n\t\t\t\t\t\t<div class=\"ui-tutor-popup-header\">\n\t\t\t\t\t\t\t<span class=\"ui-tutor-popup-header-icon\"></span>\n\t\t\t\t\t\t\t<span class=\"ui-tutor-popup-header-title-wrap\">\n\t\t\t\t\t\t\t\t<span class=\"ui-tutor-popup-header-title\">${Loc.getMessage('JS_UI_TUTOR_TITLE')}</span>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"ui-tutor-popup-content\">\n\t\t\t\t\t\t\t<div class=\"ui-tutor-popup-title\">${this.startTitle}</div>\n\t\t\t\t\t\t\t<div class=\"ui-tutor-popup-text\">${this.startText}</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"ui-tutor-popup-footer\">\n\t\t\t\t\t\t\t<div class=\"ui-tutor-popup-btn\">\n\t\t\t\t\t\t\t\t${this.getBeginBtn()}\n\t\t\t\t\t\t\t\t${this.getDeferBtn()}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"ui-tutor-popup-icon-angle\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t`;\n\t\t\tthis.emit('onCreateStartPopupNode');\n\t\t\tDom.append(this.startPopup, document.body);\n\t\t\tthis.emit('onAfterAppendStartPopupNode');\n\t\t}\n\n\t\treturn this.startPopup;\n\t}\n\n\tstatic getBeginBtn()\n\t{\n\t\tif (!this.beginBtn)\n\t\t{\n\t\t\tthis.beginBtn =\n\t\t\t\tTag.render`\n\t\t\t\t\t<button class=\"ui-btn ui-btn-primary ui-btn-round\">\n\t\t\t\t\t\t${Loc.getMessage('JS_UI_TUTOR_BTN_BEGIN')}\n\t\t\t\t\t</button>\n\t\t\t\t`;\n\n\t\t\tEvent.bind(this.beginBtn, \"click\", ()=> {\n\t\t\t\tthis.emit('clickBeginBtn');\n\t\t\t});\n\t\t}\n\n\t\treturn this.beginBtn;\n\t}\n\n\tstatic getDeferBtn()\n\t{\n\t\tif (!this.deferBtn)\n\t\t{\n\t\t\tthis.deferBtn =\n\t\t\t\tTag.render`\n\t\t\t\t\t<button class=\"ui-btn ui-btn-link\">\n\t\t\t\t\t\t${Loc.getMessage('JS_UI_TUTOR_CLOSE_POPUP_BTN')}\n\t\t\t\t\t</button>\n\t\t\t\t`;\n\n\t\t\tEvent.bind(this.deferBtn, \"click\", () => {\n\t\t\t\tthis.emit('clickDeferBtn');\n\t\t\t});\n\t\t}\n\n\t\treturn this.deferBtn;\n\t}\n\n\t/**\n\t * @private\n\t */\n\tstatic getFullEventName(shortName)\n\t{\n\t\treturn shortName;\n\t}\n\n\t/**\n\t * @public\n\t */\n\tstatic getInformer()\n\t{\n\t\tif (!this.informer)\n\t\t{\n\t\t\tthis.informer =\n\t\t\t\tTag.render`\n\t\t\t\t\t<div class=\"ui-tutor-informer\" id=\"ui-tutor-informer\"></div>\n\t\t\t\t`;\n\t\t\tlet informerParentNode = this.getImButton();\n\t\t\tif(this.isCollapsedShow)\n\t\t\t{\n\t\t\t\tinformerParentNode = this.getCollapseBlock();\n\t\t\t}\n\t\t\tif(informerParentNode)\n\t\t\t{\n\t\t\t\tDom.append(this.informer, informerParentNode);\n\t\t\t}\n\t\t}\n\n\t\treturn this.informer;\n\t}\n\n\tstatic setCount(num)\n\t{\n\t\tthis.emit('onBeforeSetCount');\n\t\tif (num < 1)\n\t\t{\n\t\t\tthis.removeInformer();\n\t\t\tdelete this.informer;\n\t\t\tthis.isInformerShow = false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.getInformer().textContent = num;\n\t\t\tthis.isInformerShow = true;\n\t\t}\n\t\tthis.emit('onAfterSetCount');\n\t}\n\n\t/**\n\t * @private\n\t */\n\tstatic removeInformer()\n\t{\n\t\tif(this.isInformerShow)\n\t\t{\n\t\t\tDom.remove(this.getInformer());\n\t\t}\n\t}\n\n\t/**\n\t * @public\n\t * @returns {HTMLElement}\n\t */\n\tstatic showCollapsedBlock(step, withGuide, showAfterAnimation)\n\t{\n\t\twithGuide = withGuide !== false;\n\t\tshowAfterAnimation = showAfterAnimation !== false;\n\t\tthis.emit('onBeforeShowCollapsedBlock');\n\t\tif(!this.isCollapsedShow)\n\t\t{\n\t\t\tthis.emit('onStartShowCollapsedBlock');\n\t\t\tif(!(step instanceof Step))\n\t\t\t{\n\t\t\t\tstep = new Step(step);\n\t\t\t}\n\t\t\tthis.collapsedStep = step;\n\n\t\t\tlet collapsedBlock = this.getCollapseBlock();\n\t\t\tlet showFunction = function() {\n\t\t\t\tcollapsedBlock.style.display = 'flex';\n\t\t\t};\n\t\t\tif(showAfterAnimation)\n\t\t\t{\n\t\t\t\tsetTimeout(showFunction.bind(this), 300);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tshowFunction.call(this);\n\t\t\t}\n\t\t\tthis.getCollapseTitle().innerHTML = step.getTitle();\n\t\t\tif(this.isInformerShow)\n\t\t\t{\n\t\t\t\tDom.append(this.getInformer(), collapsedBlock);\n\t\t\t}\n\t\t\tthis.isCollapsedShow = true;\n\t\t\tthis.emit('onShowCollapsedBlock');\n\t\t}\n\n\t\tif (withGuide)\n\t\t{\n\t\t\tthis.showGuide();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.checkButtonsState();\n\t\t}\n\t}\n\n\tstatic setCollapsedInvisible()\n\t{\n\t\tthis.hideNode(this.getCollapseBlock());\n\t}\n\n\tstatic setCollapsedVisible()\n\t{\n\t\tthis.showNode(this.getCollapseBlock());\n\t}\n\n\tstatic checkButtonsState()\n\t{\n\t\tthis.emit('onCheckButtonsState');\n\t\tlet step = this.collapsedStep;\n\t\tif(!step)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif(step.getCompleted())\n\t\t{\n\t\t\tif(this.activeGuide)\n\t\t\t{\n\t\t\t\tthis.hideNode(this.getRepeatBtn());\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.showNode(this.getRepeatBtn());\n\t\t\t}\n\t\t\tthis.hideNode(this.getCompletedBtn());\n\t\t\tthis.hideNode(this.getStartBtn());\n\t\t}\n\t\telse if(step.isActive)\n\t\t{\n\t\t\tthis.showNode(this.getCompletedBtn());\n\t\t\tif(this.activeGuide || !this.isShowRepeatWithCompleted)\n\t\t\t{\n\t\t\t\tthis.hideNode(this.getRepeatBtn());\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.showNode(this.getRepeatBtn());\n\t\t\t}\n\t\t\tthis.hideNode(this.getStartBtn());\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.showNode(this.getStartBtn());\n\t\t\tthis.hideNode(this.getRepeatBtn());\n\t\t\tthis.hideNode(this.getCompletedBtn());\n\t\t}\n\t}\n\n\tstatic showGuide()\n\t{\n\t\tthis.emit('onBeforeShowGuide');\n\t\tlet step = this.collapsedStep;\n\t\tif (!this.activeGuide && step)\n\t\t{\n\t\t\tthis.emit('onStartShowGuide');\n\t\t\tthis.activeGuide = new Guide({\n\t\t\t\tsimpleMode: true,\n\t\t\t\tsteps: [\n\t\t\t\t\tstep.getHighlightOptions()\n\t\t\t\t],\n\t\t\t});\n\t\t\tthis.activeGuide.subscribe(Guide.getFullEventName(\"onFinish\"), this.finishGuide.bind(this));\n\t\t\tthis.activeGuide.start();\n\t\t\tDom.remove(this.activeGuide.getPopup().closeIcon);\n\t\t\tthis.emit('showCollapseWithGuide');\n\t\t\tthis.checkButtonsState();\n\t\t}\n\t}\n\n\tstatic closeGuide()\n\t{\n\t\tif(this.activeGuide instanceof Guide)\n\t\t{\n\t\t\tthis.activeGuide.close();\n\t\t\tthis.emit('onAfterGuide');\n\t\t}\n\t}\n\n\t/**\n\t * @public\n\t * @returns {HTMLElement}\n\t */\n\tstatic getCollapseBlock()\n\t{\n\t\tif (!this.layout.collapseBlock)\n\t\t{\n\t\t\tthis.layout.collapseBlock =\n\t\t\t\tTag.render`\n\t\t\t\t\t<div class=\"ui-tutor-popup ui-tutor-popup-collapse\" onclick=\"${this.clickCollapseBlockHandler.bind(this)}\">\n\t\t\t\t\t\t<div class=\"ui-tutor-popup-content\">\n\t\t\t\t\t\t\t<div class=\"ui-tutor-popup-step-subject\">${Loc.getMessage('JS_UI_TUTOR_STEP_TITLE')}</div>\n\t\t\t\t\t\t\t${this.getCollapseTitle()}\n\t\t\t\t\t\t\t<div class=\"ui-tutor-popup-collapse-btn\">\n\t\t\t\t\t\t\t\t${this.getStartBtn()}\n\t\t\t\t\t\t\t\t${this.getRepeatBtn()}\n\t\t\t\t\t\t\t\t${this.getCompletedBtn()}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t`;\n\t\t\tthis.emit('onCreateCollapsedBlockNode');\n\t\t\tDom.append(this.layout.collapseBlock, document.body);\n\t\t\tthis.emit('onAfterAppendCollapsedBlockNode');\n\t\t}\n\n\t\treturn this.layout.collapseBlock;\n\t}\n\n\t/**\n\t * @public\n\t * @returns {HTMLElement}\n\t */\n\tstatic getStartBtn()\n\t{\n\t\tif (!this.startBtn)\n\t\t{\n\t\t\tthis.startBtn =\n\t\t\t\tTag.render`\n\t\t\t\t\t<button class=\"ui-btn ui-btn-primary ui-btn-round ui-btn-xs\">\n\t\t\t\t\t\t${Loc.getMessage('JS_UI_TUTOR_BTN_START')}\n\t\t\t\t\t</button>\n\t\t\t\t`;\n\n\t\t\tEvent.bind(this.startBtn, \"click\", (event) => {\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tthis.emit('clickStartBtn');\n\t\t\t});\n\t\t}\n\n\t\treturn this.startBtn;\n\t}\n\n\t/**\n\t * @public\n\t * @returns {HTMLElement}\n\t */\n\tstatic getRepeatBtn()\n\t{\n\t\tif (!this.repeatBtn)\n\t\t{\n\t\t\tthis.repeatBtn =\n\t\t\t\tTag.render`\n\t\t\t\t\t<button class=\"ui-btn ui-btn-primary ui-btn-round ui-btn-xs\">\n\t\t\t\t\t\t${Loc.getMessage('JS_UI_TUTOR_BTN_REPEAT')}\n\t\t\t\t\t</button>\n\t\t\t\t`;\n\n\t\t\tEvent.bind(this.repeatBtn, \"click\", (event) => {\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tthis.emit('clickRepeatBtn');\n\t\t\t});\n\t\t}\n\n\t\treturn this.repeatBtn;\n\t}\n\n\t/**\n\t * @public\n\t * @returns {HTMLElement}\n\t */\n\tstatic getCompletedBtn()\n\t{\n\t\tif (!this.completedBtn)\n\t\t{\n\t\t\tthis.completedBtn =\n\t\t\t\tTag.render`\n\t\t\t\t\t<button class=\"ui-btn ui-btn-success ui-btn-round ui-btn-xs\">\n\t\t\t\t\t\t${Loc.getMessage('JS_UI_TUTOR_BTN_COMPLETED_SHORT')}\n\t\t\t\t\t</button>\n\t\t\t\t`;\n\n\t\t\tEvent.bind(this.completedBtn, \"click\", (event) => {\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tthis.emit('clickCompletedBtn');\n\t\t\t});\n\t\t}\n\n\t\treturn this.completedBtn;\n\t}\n\n\t/**\n\t * @public\n\t * @returns {HTMLElement}\n\t */\n\tstatic getCollapseTitle()\n\t{\n\t\tif (!this.layout.collapseTitle)\n\t\t{\n\t\t\tthis.layout.collapseTitle =\n\t\t\t\tTag.render`\n\t\t\t\t\t<div class=\"ui-tutor-popup-step-title\"></div>\n\t\t\t\t`;\n\t\t}\n\n\t\treturn this.layout.collapseTitle;\n\t}\n\n\t/**\n\t * @public\n\t * @returns {HTMLElement}\n\t */\n\tstatic closeCollapsePopup(event)\n\t{\n\t\tthis.closeCollapseEntity();\n\t\tthis.emit('clickCloseCollapseBlock');\n\t}\n\n\t/**\n\t * @private\n\t */\n\tstatic clickCollapseBlockHandler()\n\t{\n\t\tthis.emit('clickCollapseBlock');\n\t}\n\n\tstatic finishGuide()\n\t{\n\t\tdelete this.activeGuide;\n\t\tthis.checkButtonsState();\n\t\tthis.emit('completeCloseGuide');\n\t}\n\n\tstatic closeCollapseEntity()\n\t{\n\t\tthis.emit('onBeforeHideCollapsedBlock');\n\t\tthis.getCollapseBlock().style.display = 'none';\n\t\tthis.getImButton().style.display = 'block';\n\t\tif(this.activeGuide instanceof Guide)\n\t\t{\n\t\t\tthis.activeGuide.close();\n\t\t}\n\t\tif(this.isInformerShow)\n\t\t{\n\t\t\tDom.append(this.getInformer(), this.getImButton());\n\t\t}\n\t\tdelete this.collapsedStep;\n\t\tthis.isCollapsedShow = false;\n\t\tthis.emit('onHideCollapsedBlock');\n\t}\n\n\tstatic showLoader()\n\t{\n\t\tthis.emit('onBeforeShowLoader');\n\t\tthis.startTitle = '';\n\t\tthis.startText = '';\n\t\tthis.layout.loader = new Loader({\n\t\t\ttarget: this.getStartPopup(),\n\t\t\tsize: 85\n\t\t});\n\t\tthis.layout.loader.show();\n\t\tthis.getStartPopup().style.display = 'flex';\n\t\tDom.addClass(this.getStartPopup(), \"ui-tutor-popup-load\");\n\t\tthis.emit('onAfterShowLoader');\n\t}\n\n\tstatic hideLoader()\n\t{\n\t\tif (this.layout.loader)\n\t\t{\n\t\t\tthis.layout.loader.destroy();\n\t\t\tthis.getStartPopup().style.display = 'none';\n\t\t}\n\t}\n\n\tstatic showCollapsedLoader()\n\t{\n\t\tthis.emit('onBeforeShowCollapsedLoader');\n\t\tthis.layout.collapseLoader = new Loader({\n\t\t\ttarget: this.getCollapseBlock(),\n\t\t\tsize: 34\n\t\t});\n\t\tthis.layout.collapseLoader.show();\n\t\tthis.getCollapseBlock().style.display = 'flex';\n\t\tDom.addClass(this.getCollapseBlock(), \"ui-tutor-popup-collapse-load\");\n\t\tthis.emit('onAfterShowCollapsedLoader');\n\t}\n\n\tstatic hideCollapsedLoader()\n\t{\n\t\tthis.emit('onBeforeHideCollapsedLoader');\n\t\tif (this.layout.collapseLoader)\n\t\t{\n\t\t\tthis.layout.collapseLoader.destroy();\n\t\t\tDom.removeClass(this.getCollapseBlock(), \"ui-tutor-popup-collapse-load\");\n\t\t\tthis.getCollapseBlock().style.display = 'none';\n\t\t}\n\t\tthis.emit('onAfterHideCollapsedLoader');\n\t}\n\n\tstatic showNode (node)\n\t{\n\t\tnode.style.display = 'block';\n\t}\n\n\tstatic hideNode (node)\n\t{\n\t\tnode.style.display = 'none';\n\t}\n\n\tstatic checkFollowLink(step, scenario)\n\t{\n\t\tthis.emit('onStartCheckFollowLink');\n\t\tstep = step || this.collapsedStep;\n\t\tif(step instanceof Step)\n\t\t{\n\t\t\tscenario = scenario || {};\n\t\t\tif (!(window.location.pathname === step.getUrl()))\n\t\t\t{\n\t\t\t\tlet beforeEvent = 'onBeforeRedirectToActionPage';\n\t\t\t\tif(scenario instanceof Scenario)\n\t\t\t\t{\n\t\t\t\t\tDom.addClass(scenario.getStartBtn(), 'ui-btn-wait');\n\t\t\t\t\tscenario.fireCurrentStepEvent(beforeEvent);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tDom.addClass(this.getStartBtn(), 'ui-btn-wait');\n\t\t\t\t\tthis.emit(beforeEvent, {step});\n\t\t\t\t}\n\t\t\t\twindow.location = step.getUrl();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(scenario instanceof Scenario)\n\t\t\t\t{\n\t\t\t\t\tscenario.showCollapseBlock(step);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tstep.activate();\n\t\t\t\t\tthis.showCollapsedBlock(step);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.emit('onFinishCheckFollowLink');\n\t}\n\n\tstatic fireEvent(eventName)\n\t{\n\t\tthis.emit(eventName);\n\t}\n}\n\n/**\n * @private\n */\nManager.instance = null;\nManager.scenarioInstance = null;\nManager.activeGuide = null;\nManager.isShowRepeatWithCompleted = true;\nManager.layout = {\n\timButton: null,\n\tcollapseBlock: null,\n\tcollapseTitle: null,\n};","import { Type, Dom, Event, Tag, Loc } from 'main.core';\nimport {Step} from './step.js';\nimport {Manager} from './manager.js';\n\nexport class Scenario extends Event.EventEmitter {\n\tconstructor(options = {}) {\n\t\tsuper();\n\t\tthis.setEventNamespace('BX.UI.Tutor.Scenario');\n\n\t\tthis.stepPopup = null;\n\t\tthis.arrowTimer = null;\n\t\tthis.guide = null;\n\t\tthis.loader = null;\n\n\t\tthis.arrowWrap = null;\n\t\tthis.prevArrow = null;\n\t\tthis.nextArrow = null;\n\n\t\tthis.currentStepIndex = 0;\n\t\tthis.currentStep = null;\n\t\tthis.isAddedSteps = false;\n\t\tthis.hasArrows = false;\n\n\t\tthis.isLoading = true;\n\n\t\tthis.setOptions(options);\n\n\t\tthis.btn = document.getElementById('ui-tutor-btn-wrap');\n\t\tthis.informer = document.getElementById('ui-tutor-informer');\n\n\t\tthis.layout = {\n\t\t\tstepBlock: null,\n\t\t\tprogress: null,\n\t\t\tcounter: null,\n\t\t\tcounterContainer: null,\n\t\t\ttitle: null,\n\t\t\tdescription: null,\n\t\t\tcollapseBlock: null,\n\t\t\tcollapseTitle: null,\n\t\t\tcollapseDescription: null,\n\t\t\tcontent: null,\n\t\t\tcontentInner: null,\n\t\t\tcontentBlock: null,\n\t\t\turl: null,\n\t\t\ttarget: null,\n\t\t\tstartBtn: null,\n\t\t\tnextBtn: null,\n\t\t\trepeatBtn: null,\n\t\t\tdeferBtn: null,\n\t\t\thelp: null,\n\t\t\tcompletedBtn: null,\n\t\t\tcompletedBlock: null,\n\t\t\tfinishedBlock: null,\n\t\t\tsupportLink: null\n\t\t};\n\n\t\tthis.sections = [\n\t\t\t'settings',\n\t\t\t'scenario',\n\t\t\t'work'\n\t\t];\n\n\t\tthis.loadYoutubeApiScript();\n\n\t\tthis.subscribe(\"onYouTubeReady\", () => {\n\t\t\tthis.setVideoItems();\n\t\t});\n\t}\n\n\tloadYoutubeApiScript()\n\t{\n\t\tconst onYouTubeReadyEvent = function() {\n\t\t\tthis.emit(\"onYouTubeReady\", { scenario: this});\n\t\t}.bind(this);\n\n\t\tif (!window.YT)\n\t\t{\n\t\t\tlet isNeedCheckYT = true;\n\t\t\tconst tag = document.createElement('script');\n\t\t\ttag.src = \"https://www.youtube.com/iframe_api\";\n\t\t\tconst firstScriptTag = document.getElementsByTagName('script')[0];\n\t\t\tfirstScriptTag.parentNode.insertBefore(tag, firstScriptTag);\n\n\t\t\tlet ytCheckerTimer = setInterval(function() {\n\t\t\t\tif (isNeedCheckYT)\n\t\t\t\t{\n\t\t\t\t\tif (window.YT && Type.isFunction(window.YT.Player))\n\t\t\t\t\t{\n\t\t\t\t\t\tclearInterval(ytCheckerTimer);\n\t\t\t\t\t\tonYouTubeReadyEvent();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, 200);\n\n\t\t\tsetTimeout(function() {\n\t\t\t\tclearInterval(ytCheckerTimer);\n\t\t\t\tisNeedCheckYT = false;\n\t\t\t}, 2000);\n\t\t}\n\t\telse {\n\t\t\tsetTimeout(function() {\n\t\t\t\tonYouTubeReadyEvent();\n\t\t\t}.bind(this), 100);\n\t\t}\n\n\t}\n\n\tsetOptions (options)\n\t{\n\t\tthis.fireCurrentStepEvent('onBeforeSetOptions', false);\n\t\toptions = Type.isPlainObject(options) ? options : {};\n\t\tlet currentStep = this.getCurrentStep();\n\n\t\t/** @var {Step[]} */\n\t\tthis.steps = [];\n\t\tif (Array.isArray(options.steps))\n\t\t{\n\t\t\toptions.steps.forEach(step => {\n\t\t\t\tthis.steps.push(new Step(step));\n\t\t\t});\n\t\t}\n\t\tif (currentStep instanceof Step)\n\t\t{\n\t\t\tlet stepInList = this.findStepById(currentStep.getId());\n\t\t\tif (stepInList)\n\t\t\t{\n\t\t\t\tcurrentStep = stepInList;\n\t\t\t}\n\t\t}\n\t\telse if (Type.isString(options.currentStepId) && options.currentStepId.length > 0)\n\t\t{\n\t\t\tlet stepInList = this.findStepById(options.currentStepId);\n\t\t\tif (stepInList)\n\t\t\t{\n\t\t\t\tcurrentStep = stepInList;\n\t\t\t\tif(options.currentStepIsActive === true)\n\t\t\t\t{\n\t\t\t\t\tcurrentStep.activate();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!currentStep)\n\t\t{\n\t\t\tlet uncompletedStep = this.getFirstUncompletedStep();\n\t\t\tif (uncompletedStep)\n\t\t\t{\n\t\t\t\tcurrentStep = uncompletedStep;\n\t\t\t}\n\t\t}\n\t\tif (!currentStep && this.steps && this.steps[0])\n\t\t{\n\t\t\tcurrentStep = this.steps[0];\n\t\t}\n\t\tthis.setCurrentStep(currentStep);\n\n\t\tif (options)\n\t\t{\n\t\t\tthis.isLoading = false;\n\t\t}\n\n\t\tthis.title = options.title || '';\n\t\tthis.supportLink = options.supportLink || '';\n\t\tthis.isFinished = options.isFinished || false;\n\t\tthis.fireCurrentStepEvent('onAfterSetOptions', false);\n\t}\n\n\t/**\n\t * @param {Step} step\n\t */\n\tsetCurrentStep(step)\n\t{\n\t\tif (step instanceof Step)\n\t\t{\n\t\t\tthis.currentStep = step;\n\t\t\tlet steps = this.steps;\n\n\t\t\tif (Type.isArray(steps))\n\t\t\t{\n\t\t\t\tthis.currentStepIndex = steps.indexOf(step);\n\t\t\t}\n\t\t\tthis.fireCurrentStepEvent('onStartStep');\n\t\t}\n\t}\n\n\t/**\n\t * @public\n\t */\n\tstart(complexAnimation)\n\t{\n\t\tthis.emit(\"onStart\", { scenario: this});\n\n\t\tif (complexAnimation) // animate transition from collapsed popup to step popup\n\t\t{\n\t\t\tthis.complexAnimation = true;\n\t\t}\n\t\tthis.showPopup(this.getStepPopup());\n\t\tthis.toggleCompletedState();\n\t\tthis.toggleNavBtn();\n\t\tthis.setPopupData();\n\n\t\tif (this.isAddedSteps)\n\t\t{\n\t\t\tthis.hideFinalState();\n\t\t}\n\n\t\tif (!this.hasArrows)\n\t\t{\n\t\t\tthis.initArrows();\n\t\t}\n\n\t\tthis.complexAnimation = false;\n\t\tthis.fireCurrentStepEvent('onShowComplete');\n\t}\n\n\tfindStepById(stepId)\n\t{\n\t\tfor (let i = 0; i < this.steps.length; i++)\n\t\t{\n\t\t\tconst step = this.steps[i];\n\t\t\tif (step.getId() === stepId)\n\t\t\t{\n\t\t\t\treturn step;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * @public\n\t * @returns {HTMLElement}\n\t */\n\tgetStepPopup()\n\t{\n\t\tconst clickOnCloseIcon = () => {\n\t\t\tthis.emit(\"onClickOnCloseIcon\", { scenario: this});\n\t\t};\n\n\t\tif (!this.stepPopup)\n\t\t{\n\t\t\tthis.stepPopup =\n\t\t\t\tTag.render`\n\t\t\t\t\t<div class=\"ui-tutor-popup ui-tutor-popup-step\">\n\t\t\t\t\t\t<div class=\"ui-tutor-popup-header\">\n\t\t\t\t\t\t\t<span class=\"ui-tutor-popup-header-icon\"></span>\n\t\t\t\t\t\t\t<span class=\"ui-tutor-popup-header-title\">\n\t\t\t\t\t\t\t\t<span class=\"ui-tutor-popup-header-counter\">\n\t\t\t\t\t\t\t\t\t${Loc.getMessage('JS_UI_TUTOR_TITLE')}.\n\t\t\t\t\t\t\t\t\t${this.getCounterContainer()}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<span class=\"ui-tutor-popup-header-subtitle\">${this.title}</span>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t${this.getDeferLink()}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"ui-tutor-popup-content\">\n\t\t\t\t\t\t\t${this.getContentBlock()}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"ui-tutor-popup-step-wrap\">\n\t\t\t\t\t\t\t<div class=\"ui-tutor-popup-step-inner\">\n\t\t\t\t\t\t\t\t<div class=\"ui-tutor-popup-arrow-wrap\"></div>\n\t\t\t\t\t\t\t\t<div class=\"ui-tutor-popup-step-list-wrap\">\n\t\t\t\t\t\t\t\t\t${this.getStepBlock()}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"ui-tutor-popup-icon-close\" onclick=\"${clickOnCloseIcon.bind(this)}\"></div>\n\t\t\t\t\t\t<div class=\"ui-tutor-popup-icon-angle\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t`;\n\t\t\tthis.fireCurrentStepEvent('onCreateStepPopupNode');\n\t\t\tDom.append(this.stepPopup, document.body);\n\t\t\tthis.fireCurrentStepEvent('onAfterAppendStepPopupNode');\n\t\t}\n\n\t\treturn this.stepPopup;\n\t}\n\n\t/**\n\t * @public\n\t * @returns {HTMLElement}\n\t */\n\tgetContentBlock()\n\t{\n\t\tif (!this.layout.contentBlock)\n\t\t{\n\t\t\tthis.layout.contentBlock =\n\t\t\t\tTag.render`\n\t\t\t\t\t<div class=\"ui-tutor-popup-content-block\">\n\t\t\t\t\t\t${this.getContentInner()}\n\t\t\t\t\t\t${this.getFooter()}\n\t\t\t\t\t</div>\n\t\t\t\t`;\n\t\t}\n\n\t\treturn this.layout.contentBlock;\n\t}\n\n\t/**\n\t * @public\n\t * @returns {HTMLElement}\n\t */\n\tgetFooter()\n\t{\n\t\tif (!this.layout.footer)\n\t\t{\n\t\t\tthis.layout.footer =\n\t\t\t\tTag.render`\n\t\t\t\t\t<div class=\"ui-tutor-popup-footer\">\n\t\t\t\t\t\t${this.getNavigation()}\n\t\t\t\t\t\t${this.getBtnContainer()}\n\t\t\t\t\t</div>\n\t\t\t\t`;\n\n\t\t\tif (Manager.getInstance() && Manager.getInstance().feedbackFormId) {\n\t\t\t\tDom.append(this.getSupportLink(), this.layout.footer);\n\t\t\t}\n\n\t\t}\n\n\t\treturn this.layout.footer;\n\t}\n\n\t/**\n\t * @public\n\t * @returns {HTMLElement}\n\t */\n\tgetContentInner()\n\t{\n\t\tif (!this.layout.contentInner)\n\t\t{\n\t\t\tthis.layout.contentInner =\n\t\t\t\tTag.render`\n\t\t\t\t\t<div class=\"ui-tutor-popup-content-inner\">\n\t\t\t\t\t\t${this.getTitle()}\n\t\t\t\t\t\t${this.getDescription()}\n\t\t\t\t\t\t${this.getHelpBlock()}\n\t\t\t\t\t</div>\n\t\t\t\t`;\n\t\t}\n\n\t\treturn this.layout.contentInner;\n\t}\n\n\t/**\n\t * @public\n\t * @returns {HTMLElement}\n\t */\n\tgetBtnContainer()\n\t{\n\t\tif (!this.layout.btnContainer)\n\t\t{\n\t\t\tthis.layout.btnContainer =\n\t\t\t\tTag.render`\n\t\t\t\t\t<div class=\"ui-tutor-popup-btn\">\n\t\t\t\t\t\t${this.getStartBtn()}\n\t\t\t\t\t\t${this.getRepeatBtn()}\n\t\t\t\t\t\t${this.getCompletedBtn()}\n\t\t\t\t\t</div>\n\t\t\t\t`;\n\t\t}\n\n\t\treturn this.layout.btnContainer;\n\t}\n\n\t/**\n\t * @public\n\t * @returns {HTMLElement}\n\t */\n\tgetNavigation()\n\t{\n\t\tif (!this.layout.navigation)\n\t\t{\n\t\t\tthis.layout.navigation =\n\t\t\t\tTag.render`\n\t\t\t\t\t<div class=\"ui-tutor-popup-nav\"></div>\n\t\t\t\t`;\n\n\t\t\tthis.layout.backBtn =\n\t\t\t\tTag.render`\n\t\t\t\t\t<span class=\"ui-tutor-popup-nav-item ui-tutor-popup-nav-item-prev\" onclick=\"${this.clickOnBackBtn.bind(this)}\"></span>\n\t\t\t\t`;\n\n\t\t\tthis.layout.nextBtn =\n\t\t\t\tTag.render`\n\t\t\t\t\t<span class=\"ui-tutor-popup-nav-item ui-tutor-popup-nav-item-next\" onclick=\"${this.clickOnNextBtn.bind(this)}\"></span>\n\t\t\t\t`;\n\n\t\t\tDom.append(this.layout.backBtn, this.layout.navigation);\n\t\t\tDom.append(this.layout.nextBtn, this.layout.navigation);\n\t\t}\n\n\t\treturn this.layout.navigation;\n\t}\n\n\t/**\n\t * @private\n\t * @param {HTMLElement} node\n\t */\n\tsetInformer(node)\n\t{\n\t\tthis.setInformerCount(this.steps.length - this.getCompletedSteps());\n\t}\n\n\t/**\n\t * @public\n\t * @param {Number} num\n\t */\n\tsetInformerExternal(num)\n\t{\n\t\tthis.setInformerCount(num);\n\t}\n\n\t/**\n\t * @private\n\t */\n\tsetInformerCount(num)\n\t{\n\t\tManager.setCount(num);\n\t}\n\n\t/**\n\t * @public\n\t * @param {Event} event\n\t * @param {Boolean} complexAnimation\n\t */\n\tcloseStepPopup(event, complexAnimation)\n\t{\n\t\tif (!this.stepPopup)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tif (event)\n\t\t{\n\t\t\tevent.stopPropagation();\n\t\t}\n\t\tthis.fireCurrentStepEvent('onCloseStepPopup');\n\t\tif (complexAnimation) // animate transition from collapsed popup to step popup\n\t\t{\n\t\t\tthis.complexAnimation = true;\n\t\t}\n\t\tthis.fadeAnimation(this.getStepPopup());\n\t\tsetTimeout(function () {\n\t\t\tthis.hideNode(this.getStepPopup());\n\t\t}.bind(this), 310);\n\t\tthis.complexAnimation = false;\n\t}\n\n\t/**\n\t * @public\n\t * @returns {number}\n\t */\n\tgetCompletedSteps()\n\t{\n\t\tlet total = 0;\n\t\tfor (let i = 0; i < this.steps.length; i += 1)\n\t\t{\n\t\t\tif (this.steps[i].isCompleted)\n\t\t\t{\n\t\t\t\ttotal += 1;\n\t\t\t}\n\t\t}\n\t\treturn total;\n\t}\n\n\t/**\n\t * @private\n\t */\n\tsetStepCounter()\n\t{\n\t\tthis.getCounter().textContent = Loc.getMessage('JS_UI_TUTOR_COUNTER_NUMBER')\n\t\t\t.replace('#NUMBER#', this.steps.indexOf(this.getCurrentStep()) + 1)\n\t\t\t.replace('#NUMBER_TOTAL#', this.steps.length);\n\t}\n\n\t/**\n\t * @public\n\t * @returns {HTMLElement}\n\t */\n\tgetCounterContainer()\n\t{\n\t\tif (!this.layout.counterContainer)\n\t\t{\n\t\t\tthis.layout.counterContainer =\n\t\t\t\tTag.render`\n\t\t\t\t\t<span class=\"ui-tutor-popup-header-counter-step\">\n\t\t\t\t\t\t${this.getCounter()}\n\t\t\t\t\t</span>\n\t\t\t\t`;\n\t\t}\n\n\t\treturn this.layout.counterContainer;\n\t}\n\t/**\n\t * @public\n\t * @returns {HTMLElement}\n\t */\n\tgetCounter()\n\t{\n\t\tif (!this.layout.counter)\n\t\t{\n\t\t\tthis.layout.counter =\n\t\t\t\tTag.render`\n\t\t\t\t\t<span class=\"ui-tutor-popup-header-counter-number\"></span>\n\t\t\t\t`;\n\t\t}\n\n\t\treturn this.layout.counter;\n\t}\n\n\t/**\n\t * @public\n\t * @returns {HTMLElement}\n\t */\n\tgetDeferLink()\n\t{\n\t\tif (!this.layout.deferLink)\n\t\t{\n\t\t\tthis.layout.deferLink =\n\t\t\t\tTag.render`\n\t\t\t\t\t<span class=\"ui-tutor-popup-defer-link\">\n\t\t\t\t\t\t${Loc.getMessage('JS_UI_TUTOR_BTN_DEFER')}\n\t\t\t\t\t</span>\n\t\t\t\t`;\n\n\t\t\tconst deferMenu = new BX.PopupMenuWindow({\n\t\t\t\tangle: true,\n\t\t\t\toffsetLeft: 15,\n\t\t\t\tclassName: 'ui-tutor-popup-defer-menu',\n\t\t\t\tbindElement: this.layout.deferLink,\n\t\t\t\titems: [\n\t\t\t\t\t{ text: Loc.getMessage('JS_UI_TUTOR_DEFER_MENU_HOUR'),\n\t\t\t\t\t\tonclick: function() {\n\t\t\t\t\t\t\tthis.emit(\"onDeferOneHour\", { scenario: this});\n\t\t\t\t\t\t\tdeferMenu.close();\n\t\t\t\t\t\t}.bind(this)\n\t\t\t\t\t},\n\t\t\t\t\t{ text: Loc.getMessage('JS_UI_TUTOR_DEFER_MENU_TOMORROW'),\n\t\t\t\t\t\tonclick: function() {\n\t\t\t\t\t\t\tthis.emit(\"onDeferTomorrow\", { scenario: this});\n\t\t\t\t\t\t\tdeferMenu.close();\n\t\t\t\t\t\t}.bind(this)\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: Loc.getMessage('JS_UI_TUTOR_DEFER_MENU_WEEK'),\n\t\t\t\t\t\tonclick: function() {\n\t\t\t\t\t\t\tthis.emit(\"onDeferWeek\", { scenario: this});\n\t\t\t\t\t\t\tdeferMenu.close();\n\t\t\t\t\t\t}.bind(this)\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: Loc.getMessage('JS_UI_TUTOR_DEFER_MENU_FOREVER'),\n\t\t\t\t\t\tonclick: function() {\n\t\t\t\t\t\t\tthis.emit(\"onDeferForever\", { scenario: this});\n\t\t\t\t\t\t\tdeferMenu.close();\n\t\t\t\t\t\t}.bind(this)\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t});\n\n\t\t\tEvent.bind(this.layout.deferLink, \"click\", () => {\n\t\t\t\tdeferMenu.show();\n\t\t\t});\n\t\t}\n\n\t\treturn this.layout.deferLink;\n\t}\n\n\t/**\n\t * @public\n\t * @returns {HTMLElement}\n\t */\n\tgetStartBtn()\n\t{\n\t\tif (!this.layout.startBtn)\n\t\t{\n\t\t\tthis.layout.startBtn =\n\t\t\t\tTag.render`\n\t\t\t\t\t<button class=\"ui-btn ui-btn-primary ui-btn-round\" onclick=\"${this.clickStartHandler.bind(this)}\">\n\t\t\t\t\t\t${Loc.getMessage('JS_UI_TUTOR_BTN_START')}\n\t\t\t\t\t</button>\n\t\t\t\t`;\n\t\t}\n\n\t\treturn this.layout.startBtn;\n\t}\n\n\t/**\n\t * @public\n\t * @returns {HTMLElement}\n\t */\n\tgetCompletedBtn()\n\t{\n\t\tif (!this.layout.completedBtn)\n\t\t{\n\t\t\tthis.layout.completedBtn =\n\t\t\t\tTag.render`\n\t\t\t\t\t<button class=\"ui-btn ui-btn-success ui-btn-round\" onclick=\"${this.showSuccessState.bind(this)}\">\n\t\t\t\t\t\t${Loc.getMessage('JS_UI_TUTOR_BTN_COMPLETED')}\n\t\t\t\t\t</button>\n\t\t\t\t`;\n\t\t}\n\n\t\treturn this.layout.completedBtn;\n\t}\n\n\t/**\n\t * @public\n\t * @returns {HTMLElement}\n\t */\n\tgetRepeatBtn()\n\t{\n\t\tif (!this.layout.repeatBtn)\n\t\t{\n\t\t\tthis.layout.repeatBtn =\n\t\t\t\tTag.render`\n\t\t\t\t\t<button class=\"ui-btn ui-btn-primary ui-btn-round\" onclick=\"${this.repeatStep.bind(this)}\">\n\t\t\t\t\t\t${Loc.getMessage('JS_UI_TUTOR_BTN_REPEAT')}\n\t\t\t\t\t</button>\n\t\t\t\t`;\n\t\t}\n\n\t\treturn this.layout.repeatBtn;\n\t}\n\n\t/**\n\t * @public\n\t * @returns {HTMLElement}\n\t */\n\tgetDeferBtn()\n\t{\n\t\tif (!this.layout.deferBtn)\n\t\t{\n\t\t\tthis.layout.deferBtn =\n\t\t\t\tTag.render`\n\t\t\t\t\t<button class=\"ui-btn ui-btn-link ui-btn-round\" onclick=\"${this.closeStepPopup.bind(this)}\">\n\t\t\t\t\t\t${Loc.getMessage('JS_UI_TUTOR_BTN_DEFER')}\n\t\t\t\t\t</button>\n\t\t\t\t`;\n\t\t}\n\n\t\treturn this.layout.deferBtn;\n\t}\n\n\t/**\n\t * @public\n\t * @returns {HTMLElement}\n\t */\n\tgetCompletedBLock()\n\t{\n\t\tif (!this.layout.completedBlock)\n\t\t{\n\t\t\tthis.layout.completedBlock =\n\t\t\t\tTag.render`\n\t\t\t\t\t<div class=\"ui-tutor-popup-completed\">\n\t\t\t\t\t\t<div class=\"ui-tutor-popup-completed-icon\"></div>\n\t\t\t\t\t\t<div class=\"ui-tutor-popup-completed-text\">${Loc.getMessage('JS_UI_TUTOR_STEP_COMPLETED')}</div>\n\t\t\t\t\t</div>\n\t\t\t\t`;\n\t\t}\n\n\t\treturn this.layout.completedBlock;\n\t}\n\n\t/**\n\t * @public\n\t * @returns {HTMLElement}\n\t */\n\tgetTitle()\n\t{\n\t\tif (!this.layout.title)\n\t\t{\n\t\t\tthis.layout.title =\n\t\t\t\tTag.render`\n\t\t\t\t\t<div class=\"ui-tutor-popup-step-title\"></div>\n\t\t\t\t`;\n\t\t}\n\n\t\treturn this.layout.title;\n\t}\n\n\t/**\n\t * @public\n\t * @returns {HTMLElement}\n\t */\n\tgetDescription()\n\t{\n\t\tif (!this.layout.description)\n\t\t{\n\t\t\tthis.layout.description =\n\t\t\t\tTag.render`\n\t\t\t\t\t<div class=\"ui-tutor-popup-step-decs\"></div>\n\t\t\t\t`;\n\t\t}\n\n\t\treturn this.layout.description;\n\t}\n\n\t/**\n\t * @public\n\t * @returns {HTMLElement}\n\t */\n\tgetSupportLink()\n\t{\n\t\tif (!this.layout.supportLink)\n\t\t{\n\t\t\tthis.layout.supportLink =\n\t\t\t\tTag.render`\n\t\t\t\t\t<a class=\"ui-tutor-popup-support-link\" onclick=\"${this.supportLinkHandler.bind(this)}\">\n\t\t\t\t\t\t${Loc.getMessage('JS_UI_TUTOR_BTN_SUPPORT')}\n\t\t\t\t\t</a>\n\t\t\t\t`;\n\t\t}\n\n\t\treturn this.layout.supportLink;\n\t}\n\n\tsetInvisible()\n\t{\n\t\tthis.hideNode(this.getStepPopup());\n\t}\n\n\tsetVisible()\n\t{\n\t\tthis.showNode(this.getStepPopup());\n\t}\n\n\tsupportLinkHandler()\n\t{\n\t\tthis.emit('supportLinkClick');\n\t}\n\n\t/**\n\t * @public\n\t * @returns {HTMLElement}\n\t */\n\tgetStepBlock()\n\t{\n\t\tif (!this.layout.stepBlock)\n\t\t{\n\t\t\tthis.layout.stepBlock =\n\t\t\t\tTag.render`\n\t\t\t\t\t<div class=\"ui-tutor-popup-step-list\"></div>\n\t\t\t\t`;\n\n\t\t\tthis.layout.stepItems = [];\n\n\t\t\tfor (let i = 0; i < this.steps.length; i += 1)\n\t\t\t{\n\t\t\t\tconst currentStepIndex =\n\t\t\t\t\tTag.render`\n\t\t\t\t\t\t<span class=\"ui-tutor-popup-step-item\" data-step=${i} onclick=\"${this.switchStep.bind(this)}\">\n\t\t\t\t\t\t\t<span class=\"ui-tutor-popup-step-item-number\">${i + 1}</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t`;\n\n\t\t\t\tthis.layout.stepItems.push(currentStepIndex);\n\t\t\t\tDom.append(currentStepIndex, this.layout.stepBlock);\n\t\t\t}\n\t\t\tthis.setStepItems();\n\t\t}\n\n\t\treturn this.layout.stepBlock;\n\t}\n\n\t/**\n\t * @private\n\t */\n\tsetStepItems()\n\t{\n\t\tif (this.layout && this.layout.stepItems)\n\t\t{\n\t\t\tfor (let i = 0; i < this.steps.length; i += 1)\n\t\t\t{\n\t\t\t\tif (this.layout.stepItems[i])\n\t\t\t\t{\n\t\t\t\t\tDom.removeClass(this.layout.stepItems[i], 'ui-tutor-popup-step-item-current');\n\t\t\t\t\tif (i === this.currentStepIndex)\n\t\t\t\t\t{\n\t\t\t\t\t\tDom.addClass(this.layout.stepItems[i], 'ui-tutor-popup-step-item-current');\n\t\t\t\t\t}\n\t\t\t\t\tif (this.steps[i].isCompleted)\n\t\t\t\t\t{\n\t\t\t\t\t\tDom.addClass(this.layout.stepItems[i], 'ui-tutor-popup-step-item-completed');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}\n\n\t/**\n\t * @public\n\t * @returns {HTMLElement}\n\t */\n\tgetHelpBlock()\n\t{\n\t\tif (!this.layout.help)\n\t\t{\n\t\t\tthis.layout.help =\n\t\t\t\tTag.render`\n\t\t\t\t\t<div class=\"ui-tutor-popup-help\">\n\t\t\t\t\t\t${this.getHelpLink()}\n\t\t\t\t\t</div>\n\t\t\t\t`;\n\t\t}\n\n\t\treturn this.layout.help;\n\t}\n\n\tsetVideoItems()\n\t{\n\t\tfor (let i = 0; i < this.steps.length; i += 1)\n\t\t{\n\t\t\tconst currentVideo =\n\t\t\t\tTag.render`\n\t\t\t\t\t<div class=\"ui-tutor-popup-video\" data-step=${i}></div>\n\t\t\t\t`;\n\t\t\tDom.prepend(currentVideo, this.getHelpBlock());\n\n\t\t\tif (window.YT && Type.isObject(window.YT) && Type.isFunction(window.YT.Player) && this.steps[i].video !== null)\n\t\t\t{\n\t\t\t\tconst playerData = {\n\t\t\t\t\tvideoId: this.steps[i].video,\n\t\t\t\t\tevents: {\n\t\t\t\t\t\t'onReady': function(event) {\n\t\t\t\t\t\t\tevent.target.mute();\n\t\t\t\t\t\t\tevent.target.pauseVideo();\n\t\t\t\t\t\t\tevent.target.setPlaybackQuality('hd720');\n\n\t\t\t\t\t\t\tif (+event.target.getIframe().getAttribute('data-step') === this.currentStepIndex)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tDom.addClass(event.target.getIframe(), 'ui-tutor-popup-video-show');\n\t\t\t\t\t\t\t\tevent.target.playVideo();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}.bind(this)\n\t\t\t\t\t},\n\t\t\t\t\tplayerVars: {\n\t\t\t\t\t\tcc_load_policy: 1,\n\t\t\t\t\t\tcc_lang_pref: 'ru',\n\t\t\t\t\t\trel: 0\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t\tthis.fireCurrentStepEvent('onBeforeCreateVideo', true, {\n\t\t\t\t\tplayerData\n\t\t\t\t});\n\t\t\t\tthis.steps[i].videoObj = new YT.Player(currentVideo, playerData);\n\t\t\t\tthis.fireCurrentStepEvent('onAfterCreateVideo');\n\t\t\t}\n\t\t}\n\t}\n\n\tpauseCurrentVideo()\n\t{\n\t\tlet step = this.getCurrentStep();\n\n\t\tif (window.YT && step instanceof Step)\n\t\t{\n\t\t\tlet video = step.getVideoObj();\n\t\t\tif (Type.isObject(video) && video.pauseVideo)\n\t\t\t{\n\t\t\t\tvideo.pauseVideo();\n\t\t\t}\n\t\t}\n\t}\n\n\tplayCurrentVideo()\n\t{\n\t\tlet step = this.getCurrentStep();\n\n\t\tif (window.YT && step instanceof Step)\n\t\t{\n\t\t\tlet video = step.getVideoObj();\n\t\t\tif (Type.isObject(video) && video.playVideo)\n\t\t\t{\n\t\t\t\tvideo.playVideo();\n\t\t\t}\n\t\t}\n\t}\n\n\tgetHelpLink()\n\t{\n\t\tif (!this.layout.link)\n\t\t{\n\t\t\tthis.layout.link =\n\t\t\t\tTag.render`\n\t\t\t\t\t<span class=\"ui-tutor-popup-help-link\" onclick=\"${this.handleClickLinkHandler.bind(this)}\">\n\t\t\t\t\t\t<span class=\"ui-tutor-popup-help-link-text\">${Loc.getMessage('JS_UI_TUTOR_ARTICLE_HELP_TOPIC')}</span>\n\t\t\t\t\t</span>\n\t\t\t\t`;\n\t\t}\n\n\t\treturn this.layout.link;\n\t}\n\n\t/**\n\t * @private\n\t */\n\thandleClickLinkHandler()\n\t{\n\t\tthis.emit('helpLinkClick');\n\t}\n\n\t/**\n\t * @public\n\t * @param {HTMLElement} node\n\t */\n\tshowPopup(node)\n\t{\n\t\tthis.showAnimation(node);\n\t\tnode.style.display = 'block';\n\t}\n\n\t/**\n\t * @public\n\t * @param {HTMLElement} node\n\t */\n\tshowNode (node)\n\t{\n\t\tnode.style.display = 'block';\n\t}\n\n\t/**\n\t * @public\n\t * @param {HTMLElement} node\n\t */\n\thideNode (node)\n\t{\n\t\tnode.style.display = 'none';\n\t}\n\n\t/**\n\t * @public\n\t * @param {HTMLElement} node\n\t */\n\tremovePopup(node)\n\t{\n\t\tDom.remove(node);\n\t}\n\n\t/**\n\t * @private\n\t */\n\tclickOnNextBtn()\n\t{\n\t\tthis.fireCurrentStepEvent('onBeforeClickNavNextBtn');\n\t\tif (this.getCompletedSteps() === this.steps.length && !this.isFinished)\n\t\t{\n\t\t\tthis.isAddedSteps = false;\n\t\t\tDom.remove(this.getNewStepsSection());\n\t\t\tDom.removeClass(this.getFinishedBlock(), 'ui-tutor-popup-finished-new');\n\t\t\tthis.showFinalState();\n\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.getCompletedSteps() === this.steps.length && this.currentStepIndex + 1 === this.steps.length)\n\t\t{\n\t\t\tthis.currentStepIndex = -1;\n\t\t}\n\n\t\tDom.removeClass(this.getStartBtn(), 'ui-btn-wait');\n\t\tthis.increaseCurrentIndex();\n\t\tthis.showStep();\n\t\tthis.toggleNavBtn();\n\t\tthis.fireCurrentStepEvent('onAfterClickNavNextBtn');\n\t}\n\n\tclickOnBackBtn()\n\t{\n\t\tthis.fireCurrentStepEvent('onBeforeClickNavBackBtn');\n\t\tthis.reduceCurrentIndex();\n\t\tthis.toggleNavBtn();\n\t\tthis.showStep();\n\t\tthis.fireCurrentStepEvent('onAfterClickNavBackBtn');\n\t}\n\n\ttoggleNavBtn()\n\t{\n\t\tDom.removeClass(this.layout.backBtn, 'ui-tutor-popup-nav-item-disabled');\n\t\tDom.removeClass(this.layout.nextBtn, 'ui-tutor-popup-nav-item-disabled');\n\n\t\tif (this.currentStepIndex === 0)\n\t\t{\n\t\t\tDom.addClass(this.layout.backBtn, 'ui-tutor-popup-nav-item-disabled');\n\t\t}\n\t\tif (this.currentStepIndex + 1 === this.steps.length)\n\t\t{\n\t\t\tDom.addClass(this.layout.nextBtn, 'ui-tutor-popup-nav-item-disabled');\n\t\t}\n\t}\n\n\tshowStep()\n\t{\n\t\t// when last step is completed, but some steps are not\n\t\tif (this.clickOnCompletedBtn && this.currentStepIndex === this.steps.length)\n\t\t{\n\t\t\tlet nextUncompletedStep = this.getFirstUncompletedStep();\n\t\t\tif (nextUncompletedStep)\n\t\t\t{\n\t\t\t\tthis.setCurrentStep(nextUncompletedStep);\n\t\t\t}\n\t\t}\n\n\t\tthis.scrollToStep();\n\t\tthis.toggleCompletedState();\n\t\tthis.setPopupData();\n\n\t\tthis.clickOnCompletedBtn = false;\n\t\tthis.fireCurrentStepEvent('onAfterShowStep');\n\t}\n\n\n\t/**\n\t * @private\n\t */\n\tswitchStep()\n\t{\n\t\tthis.fireCurrentStepEvent('onBeforeSwitchStep');\n\t\tthis.setCurrentStep(this.steps[+window.event.target.getAttribute('data-step')]);\n\t\tthis.fireCurrentStepEvent('onAfterSwitchStep');\n\n\t\tif (this.layout.finishedBlock)\n\t\t{\n\t\t\tthis.hideFinalState();\n\t\t}\n\n\t\tthis.showStep();\n\t\tthis.toggleNavBtn();\n\t\tthis.fireCurrentStepEvent('onEndSwitchStep');\n\t}\n\n\t/**\n\t * @private\n\t */\n\tgetFirstUncompletedStep()\n\t{\n\t\tfor (let i = 0; i < this.steps.length; i += 1)\n\t\t{\n\t\t\tif (!this.steps[i].isCompleted)\n\t\t\t{\n\t\t\t\treturn this.steps[i];\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * @private\n\t */\n\ttoggleCompletedState()\n\t{\n\t\tconst currentStep = this.getCurrentStep();\n\t\tif (currentStep)\n\t\t{\n\t\t\tif (currentStep.getCompleted())\n\t\t\t{\n\t\t\t\tthis.showNode(this.getRepeatBtn());\n\t\t\t\tthis.hideNode(this.getStartBtn());\n\t\t\t\tthis.hideNode(this.getCompletedBtn());\n\t\t\t}\n\t\t\telse if (currentStep.isActive)\n\t\t\t{\n\t\t\t\tthis.showNode(this.getCompletedBtn());\n\t\t\t\tthis.hideNode(this.getStartBtn());\n\t\t\t\tthis.showNode(this.getRepeatBtn());\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.showNode(this.getStartBtn());\n\t\t\t\tthis.hideNode(this.getCompletedBtn());\n\t\t\t\tthis.hideNode(this.getRepeatBtn());\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @private\n\t */\n\tsetPopupData()\n\t{\n\t\tthis.fireCurrentStepEvent('onBeforeSetPopupData');\n\t\tconst currentStep = this.getCurrentStep();\n\t\tif (currentStep)\n\t\t{\n\t\t\tthis.getTitle().innerHTML = currentStep.getTitle();\n\t\t\tthis.getDescription().innerHTML = currentStep.getDescription();\n\t\t\tManager.getCollapseTitle().innerHTML = currentStep.getTitle();\n\n\t\t\tif (this.getCurrentStep().getVideo() && window.YT)\n\t\t\t{\n\t\t\t\tthis.setCurrentVideo();\n\t\t\t}\n\n\t\t\tthis.setStepCounter();\n\t\t\tthis.setStepItems();\n\t\t}\n\t\tthis.fireCurrentStepEvent('onAfterSetPopupData');\n\t}\n\n\tsetCurrentVideo()\n\t{\n\t\tthis.fireCurrentStepEvent('onSetCurrentVideo');\n\t\tfor (let i = 0; i < this.steps.length; i += 1)\n\t\t{\n\t\t\tlet video = this.steps[i].getVideoObj();\n\t\t\tif (window.YT && i === this.currentStepIndex && video && video.playVideo)\n\t\t\t{\n\t\t\t\tDom.addClass(video.getIframe(), 'ui-tutor-popup-video-show');\n\t\t\t\tvideo.playVideo();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (video) {\n\t\t\t\t\tDom.removeClass(video.getIframe(), 'ui-tutor-popup-video-show');\n\n\t\t\t\t\tif (video.pauseVideo)\n\t\t\t\t\t{\n\t\t\t\t\t\tvideo.pauseVideo();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @public\n\t * @returns {Step}\n\t */\n\tgetCurrentStep()\n\t{\n\t\treturn this.currentStep;\n\t}\n\n\t/**\n\t * @private\n\t */\n\tincreaseCurrentIndex()\n\t{\n\t\tif (this.currentStepIndex === this.steps.length)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tthis.currentStepIndex += 1;\n\t\tthis.setCurrentStep(this.steps[this.currentStepIndex]);\n\t}\n\n\t/**\n\t * @private\n\t */\n\treduceCurrentIndex()\n\t{\n\t\tif (this.currentStepIndex === 0)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tthis.currentStepIndex -= 1;\n\t\tthis.setCurrentStep(this.steps[this.currentStepIndex]);\n\t}\n\n\t/**\n\t * @private\n\t */\n\tshowCollapseBlock(step, withGuide)\n\t{\n\t\twithGuide = withGuide !== false;\n\t\tthis.closeStepPopup(null, true);\n\t\tManager.showCollapsedBlock(step, withGuide);\n\t}\n\n\t/**\n\t * @private\n\t */\n\tminimize()\n\t{\n\t\tthis.pauseCurrentVideo();\n\t\tthis.fireCurrentStepEvent('onMinimize');\n\t\tthis.showCollapseBlock(this.getCurrentStep(), false);\n\t}\n\n\trepeatStep()\n\t{\n\t\tthis.followLink();\n\t}\n\n\tclickStartHandler()\n\t{\n\t\tthis.followLink();\n\t}\n\t/**\n\t * @private\n\t */\n\tfollowLink(step)\n\t{\n\t\tlet currentStep = this.getCurrentStep();\n\t\tif (step instanceof Step)\n\t\t{\n\t\t\tcurrentStep = step;\n\t\t}\n\t\tthis.pauseCurrentVideo();\n\n\t\tthis.setActiveStep(currentStep);\n\t\tManager.checkFollowLink(currentStep, this);\n\t}\n\n\tsetActiveStep(step)\n\t{\n\t\tthis.fireCurrentStepEvent('onBeforeSetActiveStep');\n\t\tif (this.currentActiveStep instanceof Step)\n\t\t{\n\t\t\tthis.currentActiveStep.deactivate();\n\t\t}\n\t\tstep.activate();\n\t\tthis.currentActiveStep = step;\n\t\tthis.fireCurrentStepEvent('onAfterSetActiveStep');\n\t}\n\n\t/**\n\t * @private\n\t */\n\tshowSuccessState()\n\t{\n\t\tconst currentStep = this.getCurrentStep();\n\t\tthis.clickOnCompletedBtn = true;\n\t\tcurrentStep.isCompleted = true;\n\t\tthis.fireCurrentStepEvent('onFinishStep');\n\n\t\tif (currentStep.getCompleted())\n\t\t{\n\t\t\tDom.addClass(this.layout.stepItems[this.currentStepIndex], 'ui-tutor-popup-step-item-completed');\n\t\t}\n\t\tDom.addClass(this.getContentBlock(), 'ui-tutor-popup-content-block-animate');\n\n\t\tsetTimeout(function () {\n\t\t\tDom.replace(this.getHelpBlock(), this.getCompletedBLock());\n\t\t\tthis.getFooter().style.display = \"none\";\n\t\t\tthis.getDescription().style.display = \"none\";\n\t\t\tthis.getTitle().style.display = \"none\";\n\t\t}.bind(this), 300);\n\n\t\tsetTimeout(function () {\n\t\t\tDom.addClass(this.getCompletedBLock(), 'ui-tutor-popup-completed-animate')\n\t\t}.bind(this), 800);\n\n\t\tsetTimeout(function () {\n\t\t\tDom.replace(this.getCompletedBLock(), this.getHelpBlock());\n\t\t\tthis.getTitle().style.display = \"block\";\n\t\t\tthis.getDescription().style.display = \"block\";\n\t\t\tthis.getFooter().style.display = \"flex\";\n\n\t\t\tthis.clickOnNextBtn();\n\t\t}.bind(this), 1500);\n\n\t\tsetTimeout(function () {\n\t\t\tDom.removeClass(this.getCompletedBLock(), 'ui-tutor-popup-completed-animate');\n\t\t\tDom.removeClass(this.getContentBlock(), 'ui-tutor-popup-content-block-animate');\n\n\t\t\tlet counter = this.stepPopup.querySelector(\".ui-tutor-popup-header-counter-number\");\n\t\t\tcounter.innerHTML = Loc.getMessage('JS_UI_TUTOR_COUNTER_NUMBER')\n\t\t\t\t.replace('#NUMBER#', this.steps.indexOf(this.getCurrentStep()) + 1)\n\t\t\t\t.replace('#NUMBER_TOTAL#', this.steps.length);\n\t\t\tthis.fireCurrentStepEvent('onAfterShowSuccessState');\n\t\t}.bind(this), 1700);\n\n\t}\n\n\tfireCurrentStepEvent(eventName, fireStepEvent, extra)\n\t{\n\t\tfireStepEvent = fireStepEvent !== false;\n\t\tconst currentStep = this.getCurrentStep();\n\n\t\tconst data = {\n\t\t\tstep : currentStep,\n\t\t\tscenario: this\n\t\t};\n\t\tif (extra)\n\t\t{\n\t\t\tdata.extra = extra;\n\t\t}\n\t\tif (currentStep && fireStepEvent)\n\t\t{\n\t\t\tcurrentStep.emit(eventName, data);\n\t\t}\n\t\tthis.emit(eventName, data);\n\t}\n\n\t/**\n\t * @private\n\t */\n\tshowFinalState()\n\t{\n\t\tthis.fireCurrentStepEvent('onFinalState');\n\n\t\tif (this.layout.stepItems)\n\t\t{\n\t\t\tDom.removeClass(this.layout.stepItems[this.currentStepIndex], 'ui-tutor-popup-step-item-current');\n\t\t}\n\n\t\tDom.append(this.getFinishedBlock(), this.getContentInner());\n\t\tDom.replace(this.getStartBtn(), this.getFinishedNotice());\n\t\tDom.remove(this.getCompletedBtn());\n\n\t\tDom.remove(this.getSupportLink());\n\t\tDom.remove(this.getNavigation());\n\t\tDom.remove(this.getHelpBlock());\n\n\t\tDom.remove(this.getRepeatBtn());\n\t\tDom.remove(this.getTitle());\n\t\tDom.remove(this.getDescription());\n\t\tDom.remove(this.getDeferLink());\n\n\t\tthis.isFinished = true;\n\t\tthis.fireCurrentStepEvent('onAfterFinalState');\n\t}\n\n\t/**\n\t * @private\n\t */\n\thideFinalState()\n\t{\n\t\tthis.fireCurrentStepEvent('onBeforeHideFinalState');\n\t\tif (this.getCurrentStep().getCompleted())\n\t\t{\n\t\t\tDom.replace(this.getFinishedNotice(), this.getRepeatBtn());\n\t\t}\n\t\telse\n\t\t{\n\t\t\tDom.replace(this.getFinishedNotice(), this.getStartBtn());\n\t\t}\n\n\t\tDom.replace(this.getFinishedBlock(), this.getHelpBlock());\n\n\t\tif (Manager.getInstance().feedbackFormId) {\n\t\t\tDom.append(this.getSupportLink(), this.getFooter());\n\t\t}\n\t\tDom.prepend(this.getNavigation(), this.getFooter());\n\t\tDom.prepend(this.getDescription(), this.getContentInner());\n\t\tDom.prepend(this.getTitle(), this.getContentInner());\n\n\t\tif (this.layout.deferBtn)\n\t\t{\n\t\t\tDom.remove(this.getDeferBtn());\n\t\t\tDom.prepend(this.getStartBtn(), this.getBtnContainer());\n\t\t}\n\n\t\tconst header = this.getStepPopup().querySelector('.ui-tutor-popup-header');\n\t\tDom.append(this.getDeferLink(), header);\n\t\tthis.fireCurrentStepEvent('onAfterHideFinalState');\n\t}\n\n\t/**\n\t * @public\n\t * @returns {HTMLElement}\n\t */\n\tgetFinishedBlock()\n\t{\n\t\tif (!this.layout.finishedBlock)\n\t\t{\n\t\t\tthis.layout.finishedBlock =\n\t\t\t\tTag.render`\n\t\t\t\t\t<div class=\"ui-tutor-popup-finished\">\n\t\t\t\t\t\t<div class=\"ui-tutor-popup-finished-title\">${Loc.getMessage('JS_UI_TUTOR_FINAL_CONGRATULATIONS')}</div>\n\t\t\t\t\t\t<div class=\"ui-tutor-popup-finished-icon\"></div>\n\t\t\t\t\t\t<div class=\"ui-tutor-popup-finished-text\">${Loc.getMessage('JS_UI_TUTOR_FINAL_TEXT')}</div>\n\t\t\t\t\t</div>\n\t\t\t\t`;\n\t\t}\n\n\t\treturn this.layout.finishedBlock;\n\t}\n\n\t/**\n\t * @public\n\t * @returns {HTMLElement}\n\t */\n\tgetFinishedNotice()\n\t{\n\t\tif (!this.layout.finishedNotice)\n\t\t{\n\t\t\tthis.layout.finishedNotice =\n\t\t\t\tTag.render`\n\t\t\t\t\t<div class=\"ui-tutor-popup-finished-notice\">${Loc.getMessage('JS_UI_TUTOR_FINAL_NOTICE')}</div>\n\t\t\t\t`;\n\t\t}\n\n\t\treturn this.layout.finishedNotice;\n\t}\n\n\t/**\n\t * @public\n\t * @returns {HTMLElement}\n\t */\n\tgetNewStepsSection()\n\t{\n\t\tif (!this.layout.newStepsSection)\n\t\t{\n\t\t\tthis.layout.newStepsSection =\n\t\t\t\tTag.render`\n\t\t\t\t\t<div class=\"ui-tutor-popup-new-text\">${Loc.getMessage('JS_UI_TUTOR_STEP_NEW')}</div>\n\t\t\t\t`;\n\t\t}\n\n\t\treturn this.layout.newStepsSection;\n\t}\n\n\t/**\n\t * @public\n\t */\n\tshowNewSteps()\n\t{\n\t\tDom.addClass(this.getFinishedBlock(), 'ui-tutor-popup-finished-new');\n\t\tthis.showPopup(this.getStepPopup());\n\t\tthis.showFinalState();\n\n\t\tDom.append(this.getNewStepsSection(), this.getFinishedBlock());\n\t\tDom.replace(this.getFinishedNotice(), Manager.getBeginBtn());\n\t\tDom.append(this.getDeferBtn(), this.getBtnContainer());\n\n\t\tthis.setStepCounter();\n\t\tthis.initArrows();\n\t\tthis.scrollToStep();\n\n\t\tthis.isAddedSteps = true;\n\t\tthis.isFinished = false;\n\t}\n\n\t/**\n\t * @private\n\t */\n\tinitArrows()\n\t{\n\t\tthis.stepListWrap = document.querySelector('.ui-tutor-popup-step-list-wrap');\n\t\tthis.arrowWrap = document.querySelector('.ui-tutor-popup-arrow-wrap');\n\n\t\tif (this.stepListWrap && this.stepListWrap.scrollWidth > this.stepListWrap.offsetWidth)\n\t\t{\n\t\t\tDom.append(this.getPrevArrow(), this.arrowWrap);\n\t\t\tDom.append(this.getNextArrow(), this.arrowWrap);\n\n\t\t\tthis.stepListWrap.addEventListener('scroll', this.toggleArrows.bind(this));\n\n\t\t\tthis.prevArrow.addEventListener('mouseenter', this.scrollToLeft.bind(this));\n\t\t\tthis.prevArrow.addEventListener('mouseleave', this.stopAutoScroll.bind(this));\n\t\t\tthis.nextArrow.addEventListener('mouseenter', this.scrollToRight.bind(this));\n\t\t\tthis.nextArrow.addEventListener('mouseleave', this.stopAutoScroll.bind(this));\n\n\t\t\tthis.toggleNextArrow();\n\t\t\tthis.getStepBlock().classList.add(\"ui-tutor-popup-step-list-wide\");\n\n\t\t\tthis.hasArrows = true;\n\t\t}\n\t}\n\n\tgetPrevArrow()\n\t{\n\t\tif (!this.prevArrow)\n\t\t{\n\t\t\tthis.prevArrow =\n\t\t\t\tTag.render`\n\t\t\t\t\t<div class=\"ui-tutor-popup-arrow ui-tutor-popup-arrow-prev\"></div>\n\t\t\t\t`;\n\t\t}\n\n\t\treturn this.prevArrow;\n\t}\n\n\tgetNextArrow()\n\t{\n\t\tif (!this.nextArrow)\n\t\t{\n\t\t\tthis.nextArrow =\n\t\t\t\tTag.render`\n\t\t\t\t\t<div class=\"ui-tutor-popup-arrow ui-tutor-popup-arrow-next\"></div>\n\t\t\t\t`;\n\t\t}\n\n\t\treturn this.nextArrow;\n\t}\n\n\t/**\n\t * @private\n\t */\n\tscrollToLeft()\n\t{\n\t\tthis.arrowTimer = setInterval(function() {\n\t\t\tthis.stepListWrap.scrollLeft -= 5;\n\t\t}.bind(this), 20);\n\t}\n\n\t/**\n\t * @private\n\t */\n\tscrollToRight()\n\t{\n\t\tthis.arrowTimer = setInterval(function() {\n\t\t\tthis.stepListWrap.scrollLeft += 5;\n\t\t}.bind(this), 20);\n\t}\n\n\t/**\n\t * @private\n\t */\n\tstopAutoScroll()\n\t{\n\t\tclearInterval(this.arrowTimer);\n\t}\n\n\t/**\n\t * @private\n\t */\n\ttoggleArrows()\n\t{\n\t\tthis.togglePrevArrow();\n\t\tthis.toggleNextArrow();\n\t}\n\n\t/**\n\t * @private\n\t */\n\ttoggleNextArrow()\n\t{\n\t\tif (this.stepListWrap.scrollWidth > this.stepListWrap.offsetWidth\n\t\t\t&& (this.stepListWrap.offsetWidth + this.stepListWrap.scrollLeft) < this.stepListWrap.scrollWidth)\n\t\t{\n\t\t\tDom.addClass(this.nextArrow, 'ui-tutor-popup-arrow-show');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tDom.removeClass(this.nextArrow, 'ui-tutor-popup-arrow-show');\n\t\t}\n\t}\n\n\t/**\n\t * @private\n\t */\n\ttogglePrevArrow()\n\t{\n\t\tif (this.stepListWrap.scrollLeft > 0)\n\t\t{\n\t\t\tDom.addClass(this.prevArrow, 'ui-tutor-popup-arrow-show');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tDom.removeClass(this.prevArrow, 'ui-tutor-popup-arrow-show');\n\t\t}\n\t}\n\n\t/**\n\t * @private\n\t */\n\tshowAnimation(popup)\n\t{\n\t\tDom.removeClass(popup, 'ui-tutor-popup-hide-complex');\n\t\tDom.removeClass(popup, 'ui-tutor-popup-hide');\n\n\t\tif (this.complexAnimation)\n\t\t{\n\t\t\tDom.addClass(popup, 'ui-tutor-popup-show-complex');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tDom.addClass(popup, 'ui-tutor-popup-show');\n\t\t}\n\n\t}\n\n\t/**\n\t * @private\n\t */\n\tfadeAnimation(popup)\n\t{\n\t\tDom.removeClass(popup, 'ui-tutor-popup-show-complex');\n\t\tDom.removeClass(popup, 'ui-tutor-popup-show');\n\n\t\tif (this.complexAnimation)\n\t\t{\n\t\t\tDom.addClass(popup, 'ui-tutor-popup-hide-complex');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tDom.addClass(popup, 'ui-tutor-popup-hide');\n\t\t}\n\t}\n\n\t/**\n\t * @private\n\t */\n\tscrollToStep()\n\t{\n\t\tlet posList = null;\n\t\tlet posStep = null;\n\t\tif (this.stepListWrap)\n\t\t{\n\t\t\tposList = Dom.getPosition(this.stepListWrap);\n\t\t\tposStep = Dom.getPosition(this.stepListWrap.querySelector('[data-step=\"' + this.currentStepIndex + '\"]'));\n\t\t}\n\t\tconst offset = 7; // padding 2px and margin 5px\n\n\t\tif (!Type.isNull(posStep) && posStep.left + posStep.width > posList.left + posList.width )\n\t\t{\n\t\t\tthis.stepListWrap.scrollLeft += posStep.left - (posList.left + posList.width) + posStep.width + offset;\n\t\t}\n\n\t\tif (!Type.isNull(posStep) && posStep.left < posList.left)\n\t\t{\n\t\t\tthis.stepListWrap.scrollLeft -= posList.left - posStep.left + offset;\n\t\t}\n\t}\n\n\t/**\n\t * @private\n\t */\n\tstatic getFullEventName(shortName)\n\t{\n\t\treturn shortName;\n\t}\n\n\tstatic getInstance()\n\t{\n\t\treturn Manager.getScenarioInstance();\n\t}\n\n\tstatic init(options)\n\t{\n\t\treturn Manager.initScenario(options);\n\t}\n}"],"names":["Step","Event","EventEmitter","constructor","options","setEventNamespace","Type","isPlainObject","id","title","description","url","isCompleted","video","helpLink","highlight","isActive","isShownForSlider","initOptions","videoObj","getTitle","getVideoObj","getHighlightOptions","getDescription","getUrl","getCompleted","getVideo","getHelpLink","getId","getInitOptions","activate","getShownForSlider","deactivate","getFullEventName","shortName","Manager","setOptions","domain","feedbackFormId","tutorialData","eventService","lastCheckTime","isString","length","getDomain","getCurrentTutorialData","getCurrentEventService","getCurrentLastCheckTime","getInstance","instance","getScenarioInstance","scenarioInstance","init","emit","initScenario","Scenario","showButton","animation","getImButton","getRootImButton","document","getElementById","hasImButton","layout","imButton","buttonWrapper","buttonInner","Tag","render","Dom","addClass","append","bind","usersPanel","querySelector","style","bottom","showSmallPopup","text","smallPopupText","getSmallPopup","display","hasClass","removeClass","hideSmallPopup","skipAnimation","removeHandler","remove","hasOwnProperty","smallPopup","setTimeout","showWelcomePopup","hideWelcomePopup","showNoticePopup","hideNoticePopup","clickSmallPopupHandler","Loc","getMessage","body","showStartPopup","startTitle","startText","getStartPopup","startPopup","closeStartPopup","getBeginBtn","getDeferBtn","beginBtn","deferBtn","getInformer","informer","informerParentNode","isCollapsedShow","getCollapseBlock","setCount","num","removeInformer","isInformerShow","textContent","showCollapsedBlock","step","withGuide","showAfterAnimation","collapsedStep","collapsedBlock","showFunction","call","getCollapseTitle","innerHTML","showGuide","checkButtonsState","setCollapsedInvisible","hideNode","setCollapsedVisible","showNode","activeGuide","getRepeatBtn","getCompletedBtn","getStartBtn","isShowRepeatWithCompleted","Guide","simpleMode","steps","subscribe","finishGuide","start","getPopup","closeIcon","closeGuide","close","collapseBlock","clickCollapseBlockHandler","startBtn","event","stopPropagation","repeatBtn","completedBtn","collapseTitle","closeCollapsePopup","closeCollapseEntity","showLoader","loader","Loader","target","size","show","hideLoader","destroy","showCollapsedLoader","collapseLoader","hideCollapsedLoader","node","checkFollowLink","scenario","window","location","pathname","beforeEvent","fireCurrentStepEvent","showCollapseBlock","fireEvent","eventName","stepPopup","arrowTimer","guide","arrowWrap","prevArrow","nextArrow","currentStepIndex","currentStep","isAddedSteps","hasArrows","isLoading","btn","stepBlock","progress","counter","counterContainer","collapseDescription","content","contentInner","contentBlock","nextBtn","help","completedBlock","finishedBlock","supportLink","sections","loadYoutubeApiScript","setVideoItems","onYouTubeReadyEvent","YT","isNeedCheckYT","tag","createElement","src","firstScriptTag","getElementsByTagName","parentNode","insertBefore","ytCheckerTimer","setInterval","isFunction","Player","clearInterval","getCurrentStep","Array","isArray","forEach","push","stepInList","findStepById","currentStepId","currentStepIsActive","uncompletedStep","getFirstUncompletedStep","setCurrentStep","isFinished","indexOf","complexAnimation","showPopup","getStepPopup","toggleCompletedState","toggleNavBtn","setPopupData","hideFinalState","initArrows","stepId","i","clickOnCloseIcon","getCounterContainer","getDeferLink","getContentBlock","getStepBlock","getContentInner","getFooter","footer","getNavigation","getBtnContainer","getSupportLink","getHelpBlock","btnContainer","navigation","backBtn","clickOnBackBtn","clickOnNextBtn","setInformer","setInformerCount","getCompletedSteps","setInformerExternal","closeStepPopup","fadeAnimation","total","setStepCounter","getCounter","replace","deferLink","deferMenu","BX","PopupMenuWindow","angle","offsetLeft","className","bindElement","items","onclick","clickStartHandler","showSuccessState","repeatStep","getCompletedBLock","supportLinkHandler","setInvisible","setVisible","stepItems","switchStep","setStepItems","currentVideo","prepend","isObject","playerData","videoId","events","mute","pauseVideo","setPlaybackQuality","getIframe","getAttribute","playVideo","playerVars","cc_load_policy","cc_lang_pref","rel","pauseCurrentVideo","playCurrentVideo","link","handleClickLinkHandler","showAnimation","removePopup","getNewStepsSection","getFinishedBlock","showFinalState","increaseCurrentIndex","showStep","reduceCurrentIndex","clickOnCompletedBtn","nextUncompletedStep","scrollToStep","setCurrentVideo","minimize","followLink","setActiveStep","currentActiveStep","fireStepEvent","extra","data","getFinishedNotice","header","finishedNotice","newStepsSection","showNewSteps","stepListWrap","scrollWidth","offsetWidth","getPrevArrow","getNextArrow","addEventListener","toggleArrows","scrollToLeft","stopAutoScroll","scrollToRight","toggleNextArrow","classList","add","scrollLeft","togglePrevArrow","popup","posList","posStep","getPosition","offset","isNull","left","width"],"mappings":";;;;;;CAEO,MAAMA,IAAI,SAASC,eAAK,CAACC,YAAY,CAC5C;GACCC,WAAW,CAACC,OAAO,EACnB;KACC,KAAK,EAAE;KACP,IAAI,CAACC,iBAAiB,CAAC,kBAAkB,CAAC;KAC1CD,OAAO,GAAGE,cAAI,CAACC,aAAa,CAACH,OAAO,CAAC,GAAGA,OAAO,GAAG,EAAE;KAEpD,IAAI,CAACI,EAAE,GAAGJ,OAAO,CAACI,EAAE,IAAI,IAAI;KAC5B,IAAI,CAACC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