Current Path : /var/www/www-root/data/www/www.monolith-realty.ru/bitrix/js/ui/tour/dist/ |
Current File : /var/www/www-root/data/www/www.monolith-realty.ru/bitrix/js/ui/tour/dist/tour.bundle.js.map |
{"version":3,"file":"tour.bundle.js","sources":["../src/guide-condition-color.js","../src/step.js","../src/guide.js","../src/manager.js"],"sourcesContent":["/**\n * @namespace {BX.UI}\n */\nexport default class GuideConditionColor\n{\n\tstatic WARNING = '--condition-warning';\n\tstatic ALERT = '--condition-alert';\n\tstatic PRIMARY = '--condition-primary';\n\n}","import { Dom, Event, Reflection, Type } from 'main.core';\n\nexport class Step extends Event.EventEmitter\n{\n\tconstructor(options)\n\t{\n\t\tsuper(options);\n\t\tthis.target = null;\n\t\tif (\n\t\t\tType.isString(options.target) && options.target !== '' ||\n\t\t\tType.isFunction(options.target) ||\n\t\t\tType.isDomNode(options.target)\n\t\t)\n\t\t{\n\t\t\tthis.target = options.target;\n\t\t}\n\n\t\tthis.id = options.id || null;\n\t\tthis.text = options.text;\n\t\tthis.areaPadding = options.areaPadding;\n\t\tthis.link = options.link || \"\";\n\t\tthis.linkTitle = options.linkTitle || null;\n\t\tthis.rounded = options.rounded || false;\n\t\tthis.title = options.title || null;\n\t\tthis.iconSrc = options.iconSrc || null;\n\t\tthis.article = options.article || null;\n\t\tthis.position = options.position || null;\n\t\tthis.cursorMode = options.cursorMode || false;\n\t\tthis.targetEvent = options.targetEvent || null;\n\t\tthis.buttons = options.buttons || [];\n\t\tthis.condition = options.condition || null;\n\n\t\tconst events = Type.isPlainObject(options.events) ? options.events : {};\n\n\t\tfor (let eventName in events)\n\t\t{\n\t\t\tconst callback = Type.isFunction(events[eventName]) ? events[eventName] : Reflection.getClass(events[eventName]);\n\t\t\tif (callback)\n\t\t\t{\n\t\t\t\tthis.subscribe(this.constructor.getFullEventName(eventName), () => {\n\t\t\t\t\tcallback();\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tgetCondition()\n\t{\n\t\treturn this.condition;\n\t}\n\n\tgetTarget()\n\t{\n\t\tif (Type.isString(this.target) && this.target !== '')\n\t\t{\n\t\t\treturn document.querySelector(this.target);\n\t\t}\n\n\t\tif (Type.isFunction(this.target))\n\t\t{\n\t\t\treturn this.target();\n\t\t}\n\n\t\treturn this.target;\n\t}\n\n\tgetTargetPos()\n\t{\n\t\tif (Type.isDomNode(this.target))\n\t\t{\n\t\t\treturn Dom.getPosition(this.target);\n\t\t}\n\t}\n\n\tgetId()\n\t{\n\t\treturn this.id;\n\t}\n\n\tgetButtons()\n\t{\n\t\treturn this.buttons;\n\t}\n\n\tgetAreaPadding()\n\t{\n\t\treturn this.areaPadding;\n\t}\n\n\tgetRounded()\n\t{\n\t\treturn this.rounded;\n\t}\n\n\tgetText()\n\t{\n\t\treturn this.text;\n\t}\n\n\tgetLink()\n\t{\n\t\treturn this.link;\n\t}\n\n\tgetLinkTitle(): ?string\n\t{\n\t\treturn this.linkTitle;\n\t}\n\n\tgetTitle()\n\t{\n\t\treturn this.title;\n\t}\n\n\tgetIconSrc(): ?string\n\t{\n\t\treturn this.iconSrc;\n\t}\n\n\tgetPosition()\n\t{\n\t\treturn this.position;\n\t}\n\n\tgetArticle()\n\t{\n\t\treturn this.article;\n\t}\n\n\tgetCursorMode()\n\t{\n\t\treturn this.cursorMode;\n\t}\n\n\tgetTargetEvent()\n\t{\n\t\treturn this.targetEvent;\n\t}\n\n\tstatic getFullEventName(shortName)\n\t{\n\t\treturn \"Step:\" + shortName;\n\t}\n\n\tsetTarget(target)\n\t{\n\t\tthis.target = target;\n\t}\n\n\tinitTargetEvent()\n\t{\n\t\tif(Type.isFunction(this.targetEvent))\n\t\t{\n\t\t\tthis.targetEvent();\n\t\t\treturn;\n\t\t}\n\n\t\tthis.getTarget().dispatchEvent(new MouseEvent(this.targetEvent))\n\t}\n}\n","import { Dom, Event, Loc, Reflection, Tag, Text, Type, userOptions } from 'main.core';\nimport { EventEmitter } from 'main.core.events';\nimport { Popup, PopupWindowButton } from 'main.popup';\n\nimport 'ui.design-tokens';\nimport GuideConditionColor from './guide-condition-color';\nimport { Step } from './step.js';\n\nexport class Guide extends Event.EventEmitter\n{\n\tstatic ConditionColor = GuideConditionColor;\n\n\tconstructor(options = {})\n\t{\n\t\tsuper(options);\n\t\toptions = Type.isPlainObject(options) ? options : {};\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\n\t\tif (this.steps.length < 1)\n\t\t{\n\t\t\tthrow new Error(\"BX.UI.Tour.Guide: 'steps' argument is required.\");\n\t\t}\n\n\t\tthis.id = \"ui-tour-guide-\" + Text.getRandom();\n\t\tthis.setId(options.id);\n\n\t\tthis.autoSave = false;\n\n\t\tthis.popup = null;\n\t\tthis.layout = {\n\t\t\toverlay: null,\n\t\t\telement: null,\n\t\t\ttitle: null,\n\t\t\ttext: null,\n\t\t\tlink: null,\n\t\t\tcloseIcon: { right : '0', top : '0' },\n\t\t\tbtnContainer: null,\n\t\t\tnextBtn: null,\n\t\t\tbackBtn: null,\n\t\t\tcontent: null,\n\t\t\tfinalContent: null,\n\t\t\tcounter: null,\n\t\t\tcurrentCounter: null,\n\t\t\tcounterItems: []\n\t\t};\n\t\tthis.buttons = options.buttons || \"\";\n\t\tthis.onEvents = options.onEvents || false;\n\t\tthis.currentStepIndex = 0;\n\t\tthis.targetPos = null;\n\t\tthis.clickOnBackBtn = false;\n\t\tthis.helper = top.BX.Helper;\n\t\tthis.targetContainer = Type.isDomNode(options.targetContainer) ? options.targetContainer : null;\n\t\tthis.overlay = Type.isBoolean(options.overlay) ? options.overlay : true;\n\n\t\tthis.finalStep = options.finalStep || false;\n\t\tthis.finalText = options.finalText || \"\";\n\t\tthis.finalTitle = options.finalTitle || \"\";\n\n\t\tthis.simpleMode = options.simpleMode || false;\n\n\t\tthis.setAutoSave(options.autoSave);\n\n\t\tconst events = Type.isPlainObject(options.events) ? options.events : {};\n\t\tfor (let eventName in events)\n\t\t{\n\t\t\tlet cb = Type.isFunction(events[eventName]) ? events[eventName] : Reflection.getClass(events[eventName]);\n\t\t\tif (cb)\n\t\t\t{\n\t\t\t\tthis.subscribe(this.constructor.getFullEventName(eventName), () => {\n\t\t\t\t\tcb();\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tEvent.bind(window, \"resize\", this.handleResizeWindow.bind(this));\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\tsetId(id)\n\t{\n\t\tif (Type.isString(id) && id !== '')\n\t\t{\n\t\t\tthis.id = id;\n\t\t}\n\t}\n\n\t/**\n\t * @public\n\t * @returns {Boolean}\n\t */\n\tgetAutoSave()\n\t{\n\t\treturn this.autoSave;\n\t}\n\n\tsetAutoSave(mode)\n\t{\n\t\tif (Type.isBoolean(mode))\n\t\t{\n\t\t\tthis.autoSave = mode;\n\t\t}\n\t}\n\n\tsave()\n\t{\n\t\tconst optionName = \"view_date_\" + this.getId();\n\t\tuserOptions.save(\"ui-tour\", optionName, null, Math.floor(Date.now() / 1000));\n\t\tuserOptions.send(null);\n\t}\n\n\t/**\n\t * @public\n\t */\n\tstart()\n\t{\n\t\tthis.emit(this.constructor.getFullEventName(\"onStart\"), {guide: this});\n\n\t\tif (this.getAutoSave())\n\t\t{\n\t\t\tthis.save();\n\t\t}\n\n\t\tif (this.overlay)\n\t\t{\n\t\t\tthis.setOverlay();\n\t\t}\n\n\t\tconst popup = this.getPopup();\n\t\tpopup.show();\n\n\t\tif (this.popup.getPopupContainer())\n\t\t{\n\t\t\tDom.removeClass(this.popup.getPopupContainer(), \"popup-window-ui-tour-opacity\");\n\t\t}\n\n\n\t\tthis.showStep();\n\n\t\tDom.addClass(this.layout.backBtn, \"ui-tour-popup-btn-hidden\");\n\n\t\tif (this.getCurrentStep().getTarget())\n\t\t{\n\t\t\tDom.addClass(this.getCurrentStep().getTarget(), \"ui-tour-selector\");\n\t\t}\n\n\t}\n\n\t/**\n\t * @public\n\t */\n\tclose()\n\t{\n\t\tif (this.currentStepIndex === this.steps.length && this.onEvents)\n\t\t\treturn;\n\n\t\tthis.closeStep();\n\n\t\tthis.emit(this.constructor.getFullEventName(\"onFinish\"), { guide: this});\n\n\t\tif (this.popup)\n\t\t{\n\t\t\tthis.popup.destroy();\n\t\t}\n\n\t\tif (this.layout.cursor)\n\t\t{\n\t\t\tDom.remove(this.layout.cursor);\n\t\t\tthis.layout.cursor = null;\n\t\t}\n\n\t\tif (this.onEvents)\n\t\t{\n\t\t\tthis.increaseCurrentStepIndex();\n\t\t}\n\n\t\tDom.remove(this.layout.overlay);\n\t\tDom.removeClass(document.body, \"ui-tour-body-overflow\");\n\n\t\tif (this.getCurrentStep() && this.getCurrentStep().getTarget())\n\t\t{\n\t\t\tthis.getCurrentStep().getTarget().classList.remove(\"ui-tour-selector\");\n\t\t}\n\n\t\tthis.layout.overlay = null;\n\t\tthis.layout.element = null;\n\t\tthis.layout.title = null;\n\t\tthis.layout.text = null;\n\t\tthis.layout.link = null;\n\t\tthis.layout.btnContainer = null;\n\t\tthis.layout.nextBtn = null;\n\t\tthis.layout.backBtn = null;\n\t\tthis.layout.content = null;\n\t\tthis.layout.finalContent = null;\n\t\tthis.layout.counter = null;\n\t\tthis.layout.currentCounter = null;\n\t\tthis.layout.counterItems = [];\n\t\tthis.popup = null;\n\t}\n\n\t/**\n\t * @private\n\t */\n\tshowStep()\n\t{\n\t\tthis.adjustEvents();\n\n\t\tDom.removeClass(this.popup.getPopupContainer(), \"popup-window-ui-tour-opacity\");\n\n\t\tif (this.layout.element)\n\t\t{\n\t\t\tDom.removeClass(this.layout.element, \"ui-tour-overlay-element-opacity\");\n\t\t}\n\n\t\tif (this.layout.backBtn)\n\t\t{\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.layout.backBtn.style.display = \"block\";\n\t\t\t}, 10);\n\t\t}\n\n\t\tif (this.overlay)\n\t\t{\n\t\t\tthis.setOverlayElementForm();\n\t\t}\n\n\t\tif(this.getCurrentStep())\n\t\t{\n\t\t\tthis.setCoords(this.getCurrentStep().getTarget());\n\t\t}\n\t\tthis.setPopupData();\n\t}\n\n\t/**\n\t * @public\n\t */\n\tshowNextStep()\n\t{\n\t\tif (this.currentStepIndex === this.steps.length)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.getCurrentStep().getCursorMode())\n\t\t{\n\t\t\tthis.showCursor();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tconst popup = this.getPopup();\n\t\t\tpopup.show();\n\n\t\t\tif (popup.getPopupContainer())\n\t\t\t{\n\t\t\t\tDom.removeClass(popup.getPopupContainer(), \"popup-window-ui-tour-opacity\");\n\t\t\t}\n\n\t\t\tif(this.getCurrentStep())\n\t\t\t{\n\t\t\t\tthis.setCoords(this.getCurrentStep().getTarget());\n\t\t\t}\n\t\t\tthis.setPopupData();\n\t\t}\n\n\t\tthis.adjustEvents();\n\n\t\tif (this.getCurrentStep() && this.getCurrentStep().getTarget())\n\t\t{\n\t\t\tDom.addClass(this.getCurrentStep().getTarget(), 'ui-tour-selector');\n\t\t}\n\t}\n\t/**\n\t * @private\n\t */\n\tadjustEvents()\n\t{\n\t\tlet currentStep = this.getCurrentStep();\n\t\tcurrentStep.emit(currentStep.constructor.getFullEventName(\"onShow\"), {\n\t\t\tstep : currentStep,\n\t\t\tguide: this\n\t\t});\n\n\t\tif (currentStep.getTarget())\n\t\t{\n\t\t\tlet close = this.close.bind(this);\n\t\t\tconst clickEvent = (e) => {\n\t\t\t\tif (e.isTrusted) {\n\t\t\t\t\tclose();\n\t\t\t\t}\n\t\t\t\tEventEmitter.emit('UI.Tour.Guide:clickTarget', this);\n\t\t\t\tEvent.unbind(currentStep.getTarget(), 'click', clickEvent);\n\t\t\t};\n\n\t\t\tEvent.bind(currentStep.getTarget(), 'click', clickEvent);\n\n\t\t\tthis.subscribe('UI.Tour.Guide:onFinish', () => {\n\t\t\t\tEvent.unbind(currentStep.getTarget(), 'click', close);\n\t\t\t});\n\n\t\t\tconst targetPosWindow = Dom.getPosition(currentStep.getTarget());\n\t\t\tif (!this.isTargetVisible(targetPosWindow))\n\t\t\t{\n\t\t\t\tthis.scrollToTarget(targetPosWindow);\n\t\t\t}\n\t\t}\n\t}\n\t/**\n\t * @private\n\t */\n\tcloseStep()\n\t{\n\t\tconst currentStep = this.getCurrentStep();\n\t\tif (currentStep)\n\t\t{\n\t\t\tcurrentStep.emit(currentStep.constructor.getFullEventName(\"onClose\"), {\n\t\t\t\tstep : currentStep,\n\t\t\t\tguide: this\n\t\t\t});\n\n\t\t\tconst target = currentStep.getTarget();\n\t\t\tif (target)\n\t\t\t{\n\t\t\t\tDom.removeClass(target, \"ui-tour-selector\")\n\t\t\t}\n\t\t}\n\t}\n\n\tsetPopupPosition()\n\t{\n\t\tif (!this.getCurrentStep().getTarget()\n\t\t\t|| this.targetPos === null\n\t\t\t|| this.getCurrentStep().getPosition() === 'center')\n\t\t{\n\t\t\tthis.getPopup().setBindElement(null);\n\t\t\tthis.getPopup().setOffset({ offsetLeft: 0, offsetTop: 0});\n\t\t\tthis.getPopup().setAngle(false);\n\t\t\tthis.getPopup().adjustPosition();\n\n\t\t\treturn;\n\t\t}\n\n\t\tlet offsetLeft = 0;\n\t\tlet offsetTop = -15;\n\t\tlet angleOffset = 0;\n\t\tlet anglePosition = \"top\";\n\n\t\tconst bindOptions = {\n\t\t\tforceTop: true,\n\t\t\tforceLeft: true,\n\t\t\tforceBindPosition: true\n\t\t};\n\n\t\tconst popupWidth = this.getPopup().getPopupContainer().offsetWidth;\n\t\tconst clientWidth = document.documentElement.clientWidth;\n\n\t\tif (this.getCurrentStep().getPosition() === \"right\")\n\t\t{\n\t\t\tanglePosition = \"left\";\n\t\t\toffsetLeft = this.targetPos.width + 30;\n\t\t\toffsetTop = this.targetPos.height + this.getAreaPadding();\n\n\t\t\tif ((this.targetPos.left + offsetLeft + popupWidth) > clientWidth)\n\t\t\t{\n\t\t\t\tlet left = this.targetPos.left - popupWidth;\n\t\t\t\tif (left > 0)\n\t\t\t\t{\n\t\t\t\t\toffsetLeft = -popupWidth - 30;\n\t\t\t\t\tanglePosition = \"right\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (this.getCurrentStep().getPosition() === \"left\")\n\t\t{\n\t\t\tanglePosition = \"right\";\n\t\t\toffsetLeft = - this.targetPos.width - (popupWidth - this.targetPos.width) - 40;\n\t\t\toffsetTop = this.targetPos.height + this.getAreaPadding();\n\n\t\t\tif ((this.targetPos.right + offsetLeft + popupWidth) < clientWidth)\n\t\t\t{\n\t\t\t\tlet left = this.targetPos.left - popupWidth;\n\t\t\t\tif (left < 0)\n\t\t\t\t{\n\t\t\t\t\toffsetLeft = this.targetPos.width + 40;\n\t\t\t\t\tanglePosition = \"left\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse // top || bottom\n\t\t{\n\t\t\tbindOptions.forceLeft = false;\n\t\t\tbindOptions.forceTop = false;\n\n\t\t\tif (this.getCurrentStep().getRounded())\n\t\t\t{\n\t\t\t\tif (!this.onEvents)\n\t\t\t\t{\n\t\t\t\t\toffsetTop = - (this.layout.element.getAttribute(\"r\") - this.targetPos.height / 2 + 10);\n\t\t\t\t}\n\t\t\t\tangleOffset = 0;\n\t\t\t\toffsetLeft = this.targetPos.width / 2;\n\t\t\t}\n\t\t\telse if (this.targetPos.width < 30)\n\t\t\t{\n\t\t\t\toffsetLeft = this.targetPos.width / 2;\n\t\t\t\toffsetTop = -15;\n\t\t\t\tangleOffset = 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\toffsetLeft = 25;\n\n\t\t\t\tif (!this.onEvents)\n\t\t\t\t{\n\t\t\t\t\toffsetTop = - (this.layout.element.getAttribute(\"height\") / 2 - this.targetPos.height / 2 + 10);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\toffsetTop = 0;\n\t\t\t\t}\n\n\t\t\t\tangleOffset = 0;\n\t\t\t}\n\t\t}\n\n\t\tlet bindElement = this.getCurrentStep().getTarget();\n\n\t\tif(this.getCurrentStep().getPosition() === 'center')\n\t\t\tbindElement = window;\n\n\t\tthis.getPopup().setBindElement(bindElement);\n\t\tthis.getPopup().setOffset({offsetLeft: offsetLeft, offsetTop: -offsetTop});\n\t\tthis.getPopup().setAngle({position: anglePosition, offset: angleOffset});\n\t\tthis.getPopup().adjustPosition(bindOptions);\n\n\t}\n\n\t/**\n\t * @private\n\t */\n\tsetOverlay()\n\t{\n\t\tthis.layout.overlay = Tag.render`\n\t\t\t<svg class=\"ui-tour-overlay\" xmlns=\"http://www.w3.org/2000/svg\" width=\"100%\" height=\"100%\" preserveAspectRatio=\"none\">\n\t\t\t\t<mask id=\"hole\">\n\t\t\t\t\t<defs>\n\t\t\t\t\t\t<filter id=\"ui-tour-filter\">\n\t\t\t\t\t\t\t<feGaussianBlur stdDeviation=\"0\"/>\n\t\t\t\t\t\t</filter>\n\t\t\t\t\t</defs>\n\t\t\t\t\t<rect x=\"0\" y=\"0\" width=\"100%\" height=\"100%\" fill=\"white\"></rect>\n\t\t\t\t\t<rect id=\"rect\" class=\"ui-tour-overlay-element ui-tour-overlay-element-rect\" x=\"1035.5\" y=\"338\" width=\"422\" rx=\"2\" ry=\"2\" height=\"58\" filter=\"url(#ui-tour-filter)\"></rect>\n\t\t\t\t\t<circle id=\"circle\" class=\"ui-tour-overlay-element ui-tour-overlay-element-circle\" cx=\"10\" cy=\"10\" r=\"10\" filter=\"url(#ui-tour-filter)\"></circle>\n\t\t\t\t</mask>\n\t\t\t\t<rect x=\"0\" y=\"0\" width=\"100%\" height=\"100%\" fill=\"#000\" mask=\"url(#hole)\"></rect>\n\t\t\t</svg>\n\t\t`;\n\n\t\tDom.addClass(document.body, 'ui-tour-body-overflow');\n\t\tif (this.targetContainer)\n\t\t{\n\t\t\tDom.append(this.layout.overlay, this.targetContainer);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tDom.append(this.layout.overlay, document.body);\n\t\t}\n\n\t\tthis.setOverlayElementForm();\n\t}\n\n\tsetOverlayElementForm()\n\t{\n\t\tif (this.getCurrentStep().getRounded())\n\t\t{\n\t\t\tthis.layout.overlay.querySelector(\".ui-tour-overlay-element-rect\").style.display = \"none\";\n\t\t\tthis.layout.overlay.querySelector(\".ui-tour-overlay-element-circle\").style.display = \"block\";\n\t\t\tthis.layout.element = this.layout.overlay.querySelector(\".ui-tour-overlay-element-circle\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.layout.overlay.querySelector(\".ui-tour-overlay-element-circle\").style.display = \"none\";\n\t\t\tthis.layout.overlay.querySelector(\".ui-tour-overlay-element-rect\").style.display = \"block\";\n\t\t\tthis.layout.element = this.layout.overlay.querySelector(\".ui-tour-overlay-element-rect\");\n\t\t}\n\n\t\treturn this.layout.element;\n\t}\n\n\thandleResizeWindow()\n\t{\n\t\tif (this.layout.element && this.getCurrentStep())\n\t\t{\n\t\t\tthis.setCoords(this.getCurrentStep().getTarget());\n\t\t}\n\n\t}\n\n\t/**\n\t * @private\n\t * @param {Element} node\n\t */\n\tsetCoords(node)\n\t{\n\t\tif (!node)\n\t\t{\n\t\t\tif(this.layout.element)\n\t\t\t{\n\t\t\t\tthis.layout.element.style.display = \"none\";\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tthis.targetPos = node.getBoundingClientRect();\n\n\t\tif (this.layout.element)\n\t\t{\n\t\t\tthis.layout.element.style.display = \"block\";\n\n\t\t\tif (this.getCurrentStep().getRounded())\n\t\t\t{\n\t\t\t\tthis.layout.element.setAttribute('cx', this.targetPos.left + this.targetPos.width / 2);\n\t\t\t\tthis.layout.element.setAttribute('cy', this.targetPos.top + this.targetPos.height / 2);\n\t\t\t\tthis.layout.element.setAttribute('r', this.targetPos.width / 2 + this.getAreaPadding());\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.layout.element.setAttribute('x', this.targetPos.left - this.getAreaPadding());\n\t\t\t\tthis.layout.element.setAttribute('y', this.targetPos.top - this.getAreaPadding());\n\t\t\t\tthis.layout.element.setAttribute('width', this.targetPos.width + this.getAreaPadding()*2);\n\t\t\t\tthis.layout.element.setAttribute('height', this.targetPos.height + this.getAreaPadding()*2);\n\t\t\t}\n\t\t}\n\t}\n\n\tgetAreaPadding()\n\t{\n\t\tlet padding = 15;\n\t\tif (this.getCurrentStep().getAreaPadding() >= 0)\n\t\t{\n\t\t\tpadding = this.getCurrentStep().getAreaPadding();\n\t\t}\n\n\t\treturn padding;\n\t}\n\n\t/**\n\t * @private\n\t */\n\tincreaseCurrentStepIndex()\n\t{\n\t\tthis.currentStepIndex++;\n\n\t\tif (this.currentStepIndex + 1 === this.steps.length && !this.finalStep && !this.onEvents)\n\t\t{\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.layout.nextBtn.textContent = Loc.getMessage(\"JS_UI_TOUR_BUTTON_CLOSE\");\n\t\t\t}, 200);\n\t\t}\n\t}\n\n\t/**\n\t * @private\n\t */\n\treduceCurrentStepIndex()\n\t{\n\t\tif (this.currentStepIndex === 0)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.currentStepIndex < this.steps.length && !this.finalStep)\n\t\t{\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.layout.nextBtn.textContent = Loc.getMessage(\"JS_UI_TOUR_BUTTON\");\n\t\t\t}, 200);\n\t\t}\n\n\t\tthis.currentStepIndex--;\n\t}\n\n\t/**\n\t * @public\n\t */\n\tgetPopup()\n\t{\n\t\tif (!this.popup)\n\t\t{\n\t\t\tlet bindElement = this.getCurrentStep()\n\t\t\t\t? this.getCurrentStep().getTarget()\n\t\t\t\t: window;\n\n\t\t\tlet className = 'popup-window-ui-tour popup-window-ui-tour-opacity';\n\n\t\t\tif (this.getCurrentStep().getCondition())\n\t\t\t{\n\t\t\t\tif (Type.isString(this.getCurrentStep().getCondition()))\n\t\t\t\t{\n\t\t\t\t\tclassName = className + ' --condition-' + this.getCurrentStep().getCondition().toLowerCase();\n\t\t\t\t}\n\n\t\t\t\tif (Type.isObject(this.getCurrentStep().getCondition()))\n\t\t\t\t{\n\t\t\t\t\tclassName = className + ' --condition-' + this.getCurrentStep().getCondition()?.color.toLowerCase();\n\t\t\t\t}\n\n\t\t\t\tif (this.getCurrentStep().getCondition()?.top !== false)\n\t\t\t\t{\n\t\t\t\t\tclassName = className + ' --condition';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.onEvents\n\t\t\t\t? className = className + ' popup-window-ui-tour-animate'\n\t\t\t\t: null;\n\n\t\t\tlet buttons = [];\n\n\t\t\tif(this.getCurrentStep() && this.getCurrentStep().getButtons().length > 0)\n\t\t\t{\n\t\t\t\tthis.getCurrentStep().getButtons().forEach((item)=> {\n\t\t\t\t\tbuttons.push(new PopupWindowButton({\n\t\t\t\t\t\ttext: item.text,\n\t\t\t\t\t\tclassName: 'ui-btn ui-btn-sm ui-btn-primary ui-btn-round',\n\t\t\t\t\t\tevents: {\n\t\t\t\t\t\t\tclick: Type.isFunction(item.event) ? item.event : null\n\t\t\t\t\t\t}\n\t\t\t\t\t}))\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tconst popupWidth = this.onEvents ? 280 : 420;\n\n\t\t\tthis.popup = new Popup({\n\t\t\t\ttargetContainer: this.targetContainer,\n\t\t\t\tcontent: this.getContent(),\n\t\t\t\tbindElement: bindElement,\n\t\t\t\tclassName: className,\n\t\t\t\tautoHide: this.onEvents ? false : true,\n\t\t\t\toffsetTop: 15,\n\t\t\t\twidth: popupWidth,\n\t\t\t\tcloseIcon: true,\n\t\t\t\tnoAllPaddings: true,\n\t\t\t\tbindOptions: {\n\t\t\t\t\tforceTop: true,\n\t\t\t\t\tforceLeft: true,\n\t\t\t\t\tforceBindPosition: true\n\t\t\t\t},\n\t\t\t\tevents: {\n\t\t\t\t\tonPopupClose : (popup) => {\n\t\t\t\t\t\tif(popup.destroyed === false && this.onEvents)\n\t\t\t\t\t\t\tEventEmitter.emit('UI.Tour.Guide:onPopupClose', this);\n\n\t\t\t\t\t\tthis.close();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tbuttons: buttons\n\t\t\t});\n\n\t\t\tconst conditionNodeTop = Tag.render`\n\t\t\t\t<div class=\"ui-tour-popup-condition-top\">\n\t\t\t\t\t<div class=\"ui-tour-popup-condition-angle\"></div>\n\t\t\t\t</div>\n\t\t\t`;\n\n\t\t\tconst conditionNodeBottom = Tag.render`\n\t\t\t\t<div class=\"ui-tour-popup-condition-bottom\"></div>\n\t\t\t`;\n\n\t\t\tif (Type.isString(this.getCurrentStep().getCondition()))\n\t\t\t{\n\t\t\t\tDom.append(conditionNodeTop, this.popup.getContentContainer());\n\t\t\t}\n\n\t\t\tif (Type.isObject(this.getCurrentStep().getCondition()))\n\t\t\t{\n\t\t\t\tif (this.getCurrentStep().getCondition()?.top !== false)\n\t\t\t\t{\n\t\t\t\t\tDom.append(conditionNodeTop, this.popup.getContentContainer());\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif (this.getCurrentStep().getCondition()?.bottom !== false)\n\t\t\t{\n\t\t\t\tDom.append(conditionNodeBottom, this.popup.getContentContainer());\n\t\t\t}\n\t\t}\n\n\t\treturn this.popup;\n\t}\n\n\t/**\n\t * @private\n\t */\n\tgetContent()\n\t{\n\t\tif (!this.layout.content)\n\t\t{\n\t\t\tlet iconNode = '';\n\t\t\tif (this.getCurrentStep().getIconSrc())\n\t\t\t{\n\t\t\t\ticonNode = Tag.render`\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass=\"ui-tour-popup-icon\"\n\t\t\t\t\t\tstyle=\"background-image: url(${encodeURI(this.getCurrentStep().getIconSrc())});\"\n\t\t\t\t\t></div>\n\t\t\t\t`;\n\t\t\t}\n\n\t\t\tlet linkNode = '';\n\t\t\tif(this.getCurrentStep().getLink() || this.getCurrentStep().getArticle())\n\t\t\t{\n\t\t\t\tlinkNode = this.getLink();\n\t\t\t}\n\n\t\t\tthis.layout.content = Tag.render`\n\t\t\t\t<div\n\t\t\t\t\tclass=\"ui-tour-popup ${this.simpleMode ? 'ui-tour-popup-simple' : ''} ${this.onEvents ? 'ui-tour-popup-events' : ''}\"\n\t\t\t\t\tstyle=\"${iconNode ? 'padding-left: 13px;' : ''};\"\n\t\t\t\t>\n\t\t\t\t\t${iconNode}\n\t\t\t\t\t<div>\n\t\t\t\t\t\t${this.getTitle()}\n\t\t\t\t\t\t<div class=\"ui-tour-popup-content\">\n\t\t\t\t\t\t\t${this.getText()}\n\t\t\t\t\t\t\t${linkNode}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t${linkNode}\n\t\t\t\t\t\t<div class=\"ui-tour-popup-footer\">\n\t\t\t\t\t\t\t<div class=\"ui-tour-popup-index\">\n\t\t\t\t\t\t\t\t${this.onEvents ? '' : this.getCounterItems()}\n\t\t\t\t\t\t\t\t${this.onEvents ? '' : this.getCurrentCounter()}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t${this.onEvents ? '' : this.getBtnContainer()}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t`;\n\t\t}\n\n\t\treturn this.layout.content;\n\t}\n\n\t/**\n\t * @private\n\t */\n\tsetPopupData()\n\t{\n\t\tEvent.unbindAll(this.layout.link, 'click');\n\n\t\tthis.getTitle().innerHTML = this.getCurrentStep().getTitle();\n\t\tthis.getText().innerHTML = this.getCurrentStep().getText();\n\n\t\tif (this.getCurrentStep().getArticle() || this.getCurrentStep().getLink())\n\t\t{\n\t\t\tDom.removeClass(this.layout.link, \"ui-tour-popup-link-hide\");\n\n\t\t\tif (this.getCurrentStep().getArticle())\n\t\t\t{\n\t\t\t\tEvent.bind(this.layout.link, \"click\", this.handleClickLink.bind(this));\n\t\t\t}\n\n\t\t\tif (this.getCurrentStep().getLink())\n\t\t\t{\n\t\t\t\tthis.getLink().setAttribute('href', this.getCurrentStep().getLink());\n\t\t\t}\n\n\t\t}\n\t\telse {\n\t\t\tDom.addClass(this.layout.link, \"ui-tour-popup-link-hide\");\n\t\t}\n\n\t\tthis.getCurrentCounter().textContent = Loc.getMessage(\"JS_UI_TOUR_STEP_INDEX_TEXT\")\n\t\t\t.replace('#NUMBER#', this.currentStepIndex + 1)\n\t\t\t.replace('#NUMBER_TOTAL#', this.steps.length);\n\n\t\tfor (let i = 0; i < this.steps.length; i++)\n\t\t{\n\t\t\tif (this.layout.counterItems[i])\n\t\t\t{\n\t\t\t\tDom.removeClass(this.layout.counterItems[i], 'ui-tour-popup-index-item-current');\n\t\t\t\tDom.removeClass(this.layout.counterItems[i], 'ui-tour-popup-index-item-passed');\n\t\t\t}\n\n\t\t\tif (i === this.currentStepIndex)\n\t\t\t{\n\t\t\t\tDom.addClass(this.layout.counterItems[i], 'ui-tour-popup-index-item-current');\n\t\t\t}\n\t\t\telse if (i < this.currentStepIndex)\n\t\t\t{\n\t\t\t\tDom.addClass(this.layout.counterItems[i], 'ui-tour-popup-index-item-passed')\n\t\t\t}\n\t\t}\n\n\t\tthis.setPopupPosition();\n\t}\n\n\t/**\n\t * @public\n\t */\n\thandleClickLink()\n\t{\n\t\tevent.preventDefault();\n\n\t\tif(!this.helper)\n\t\t{\n\t\t\tthis.helper = top.BX.Helper;\n\t\t}\n\n\t\tthis.helper.show(\"redirect=detail&code=\" + this.getCurrentStep().getArticle());\n\n\t\tif(this.onEvent)\n\t\t{\n\t\t\tif(this.helper.isOpen())\n\t\t\t\tthis.getPopup().setAutoHide(false);\n\n\t\t\tEventEmitter.subscribe(this.helper.getSlider(), 'SidePanel.Slider:onCloseComplete', () => {\n\t\t\t\tthis.getPopup().setAutoHide(true);\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * @public\n\t */\n\tgetTitle()\n\t{\n\t\tif (this.layout.title === null)\n\t\t{\n\t\t\tthis.layout.title = Tag.render`\n\t\t\t\t<div class=\"ui-tour-popup-title\"></div>\n\t\t\t`;\n\t\t}\n\n\t\treturn this.layout.title;\n\t}\n\n\t/**\n\t * @public\n\t */\n\tgetText()\n\t{\n\t\tif (this.layout.text === null)\n\t\t{\n\t\t\tthis.layout.text = Tag.render`\n\t\t\t\t<div class=\"ui-tour-popup-text\"></div>\n\t\t\t`;\n\t\t}\n\n\t\treturn this.layout.text;\n\t}\n\n\t/**\n\t * @public\n\t */\n\tgetLink()\n\t{\n\t\tif (!this.layout.link)\n\t\t{\n\t\t\tconst title = this.steps[this.currentStepIndex].getLinkTitle() ?? Loc.getMessage('JS_UI_TOUR_LINK');\n\t\t\tthis.layout.link = Tag.render`\n\t\t\t\t<a target=\"_blank\" href=\"\" class=\"ui-tour-popup-link\">\n\t\t\t\t\t${title}\n\t\t\t\t</a>\n\t\t\t`;\n\t\t}\n\n\t\treturn this.layout.link;\n\t}\n\n\t/**\n\t * @public\n\t */\n\tgetCurrentCounter()\n\t{\n\t\tif (this.layout.currentCounter === null)\n\t\t{\n\t\t\tthis.layout.currentCounter = Tag.render`\n\t\t\t\t<span class=\"ui-tour-popup-counter\">\n\t\t\t\t\t${Loc.getMessage(\"JS_UI_TOUR_STEP_INDEX_TEXT\")\n\t\t\t\t\t\t.replace('#NUMBER#', this.currentStepIndex + 1)\n\t\t\t\t\t\t.replace('#NUMBER_TOTAL#', this.steps.length)}\n\t\t\t\t</span>\n\t\t\t`;\n\t\t}\n\n\t\treturn this.layout.currentCounter;\n\t}\n\n\t/**\n\t * @private\n\t */\n\tgetBtnContainer()\n\t{\n\t\tif (this.layout.btnContainer === null)\n\t\t{\n\t\t\tthis.layout.btnContainer = Tag.render`\n\t\t\t\t<div class=\"ui-tour-popup-btn-block\"></div>\n\t\t\t`;\n\n\t\t\tthis.layout.nextBtn = Tag.render`\n\t\t\t\t<button id=\"next\" class=\"ui-tour-popup-btn-next\">\n\t\t\t\t\t${this.simpleMode ? Loc.getMessage(\"JS_UI_TOUR_BUTTON_SIMPLE\") : Loc.getMessage(\"JS_UI_TOUR_BUTTON\")}\n\t\t\t\t</button>\n\t\t\t`;\n\n\n\t\t\tthis.layout.backBtn = Tag.render`\n\t\t\t\t<button id=\"back\" class=\"ui-tour-popup-btn-back\">\n\t\t\t\t</button>\n\t\t\t`;\n\n\t\t\tDom.append(this.layout.backBtn, this.layout.btnContainer);\n\t\t\tDom.append(this.layout.nextBtn, this.layout.btnContainer);\n\n\t\t\tEvent.bind(this.layout.nextBtn, \"click\", this.handleClickOnNextBtn.bind(this));\n\t\t\tEvent.bind(this.layout.backBtn, \"click\", this.handleClickOnBackBtn.bind(this));\n\n\t\t}\n\n\t\treturn this.layout.btnContainer;\n\t}\n\n\tgetCounterItems()\n\t{\n\t\tif (this.layout.counter === null)\n\t\t{\n\t\t\tthis.layout.counter = Tag.render`\n\t\t\t\t<span class=\"ui-tour-popup-index-items\">\n\t\t\t\t</span>\n\t\t\t`;\n\t\t}\n\n\t\tthis.layout.counterItems = [];\n\n\t\tfor (let i = 0; i < this.steps.length; i++)\n\t\t{\n\t\t\tconst currentStepIndex = Tag.render`\n\t\t\t\t<span class=\"ui-tour-popup-index-item\">\n\t\t\t\t</span>\n\t\t\t`;\n\n\t\t\tthis.layout.counterItems.push(currentStepIndex);\n\t\t\tDom.append(currentStepIndex, this.layout.counter);\n\t\t}\n\n\t\treturn this.layout.counter;\n\t}\n\n\t/**\n\t * @returns {Step}\n\t */\n\tgetCurrentStep()\n\t{\n\t\treturn this.steps[this.currentStepIndex];\n\t}\n\n\t/**\n\t * @returns {Step}\n\t */\n\tgetPreviousStep()\n\t{\n\t\tif (this.steps[this.currentStepIndex - 1])\n\t\t{\n\t\t\treturn this.steps[this.currentStepIndex - 1];\n\t\t}\n\t}\n\n\thandleClickOnNextBtn()\n\t{\n\t\tDom.addClass(this.layout.element, \"ui-tour-overlay-element-opacity\");\n\t\tDom.addClass(this.popup.getPopupContainer(), \"popup-window-ui-tour-opacity\");\n\n\t\tthis.clickOnBackBtn = false;\n\t\tif (this.getCurrentStep())\n\t\t{\n\t\t\tthis.closeStep();\n\t\t}\n\n\t\tthis.increaseCurrentStepIndex();\n\n\t\tif (this.getCurrentStep() && this.getCurrentStep().getTarget())\n\t\t{\n\t\t\tDom.addClass(this.getCurrentStep().getTarget(), 'ui-tour-selector');\n\t\t}\n\n\t\tif (this.currentStepIndex === this.steps.length)\n\t\t{\n\t\t\tif (this.finalStep)\n\t\t\t{\n\t\t\t\tthis.setFinalStep()\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.close();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.showStep();\n\t\t\t}, 200);\n\n\t\t\tif (Dom.hasClass(this.layout.backBtn, 'ui-tour-popup-btn-hidden'))\n\t\t\t{\n\t\t\t\tDom.removeClass(this.layout.backBtn, 'ui-tour-popup-btn-hidden');\n\t\t\t}\n\t\t}\n\n\t}\n\n\thandleClickOnBackBtn()\n\t{\n\t\tDom.addClass(this.layout.element, \"ui-tour-overlay-element-opacity\");\n\t\tDom.addClass(this.popup.getPopupContainer(), \"popup-window-ui-tour-opacity\");\n\n\t\tthis.closeStep();\n\t\tthis.reduceCurrentStepIndex();\n\n\t\tif (this.currentStepIndex === 0)\n\t\t{\n\t\t\tDom.addClass(this.layout.backBtn, 'ui-tour-popup-btn-hidden');\n\t\t}\n\n\t\tthis.clickOnBackBtn = true;\n\t\tsetTimeout(() => {\n\t\t\tthis.layout.backBtn.style.display = \"none\";\n\t\t\tthis.showStep();\n\t\t}, 200);\n\n\t\tif (this.getCurrentStep().getTarget())\n\t\t{\n\t\t\tDom.addClass(this.getCurrentStep().getTarget(), 'ui-tour-selector');\n\t\t}\n\t}\n\n\tsetFinalStep()\n\t{\n\t\tthis.layout.element.style.display = \"none\";\n\t\tthis.getPopup().destroy();\n\n\t\tconst finalPopup = this.getFinalPopup();\n\t\tfinalPopup.show();\n\t\tDom.addClass(finalPopup.getPopupContainer(), \"popup-window-ui-tour-final-show\");\n\t}\n\n\t/**\n\t * @public\n\t */\n\tgetFinalPopup()\n\t{\n\t\tthis.popup = new Popup({\n\t\t\tcontent: this.getFinalContent(),\n\t\t\tclassName: 'popup-window-ui-tour-final',\n\t\t\toffsetTop: this.onEvents ? 0 : 15,\n\t\t\toffsetLeft: 35,\n\t\t\tmaxWidth: 430,\n\t\t\tminWidth: 300\n\t\t});\n\n\t\treturn this.popup;\n\t}\n\n\tgetFinalContent()\n\t{\n\t\tif (!this.layout.finalContent)\n\t\t{\n\t\t\tthis.layout.finalContent = Tag.render`\n\t\t\t\t<div class=\"ui-tour-popup\">\n\t\t\t\t\t<div class=\"ui-tour-popup-title\">\n\t\t\t\t\t\t${this.finalTitle}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"ui-tour-popup-content\">\n\t\t\t\t\t\t<div class=\"ui-tour-popup-text\">\n\t\t\t\t\t\t\t${this.finalText}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"ui-tour-popup-footer-btn\">\n\t\t\t\t\t\t${this.getFinalBtn()}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t`;\n\t\t}\n\n\t\treturn this.layout.finalContent;\n\t}\n\n\tgetFinalBtn()\n\t{\n\t\tconst buttons = [];\n\n\t\tif (this.buttons !== \"\")\n\t\t{\n\t\t\tfor (let i = 0; i < this.buttons.length; i++)\n\t\t\t{\n\t\t\t\tlet btn = Tag.render`\n\t\t\t\t\t<button class=\"${this.buttons[i].class}\" onclick=\"${this.buttons[i].events.click}\">\n\t\t\t\t\t${this.buttons[i].text}\n\t\t\t\t\t</button>\n\t\t\t\t`;\n\n\t\t\t\tbuttons.push(btn);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlet btn = Tag.render`\n\t\t\t\t<button class=\"ui-btn ui-btn-sm ui-btn-primary ui-btn-round\" onclick=\"${this.close.bind(this)}\">\n\t\t\t\t${Loc.getMessage(\"JS_UI_TOUR_BUTTON_CLOSE\")}\n\t\t\t\t</button>\n\t\t\t`;\n\n\t\t\tbuttons.push(btn);\n\t\t}\n\n\t\treturn buttons;\n\t}\n\n\t/**\n\t * @private\n\t */\n\tisTargetVisible(node)\n\t{\n\t\treturn (\n\t\t\tnode.top >= 0 &&\n\t\t\tnode.left >= 0 &&\n\t\t\tnode.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&\n\t\t\tnode.right <= (window.innerWidth || document.documentElement.clientWidth)\n\t\t);\n\t}\n\n\t/**\n\t * @private\n\t */\n\tscrollToTarget(target)\n\t{\n\t\twindow.scrollTo(0, target.y - this.getAreaPadding());\n\t}\n\n\t/**\n\t * @private\n\t */\n\tstatic getFullEventName(shortName)\n\t{\n\t\treturn \"UI.Tour.Guide:\" + shortName;\n\t}\n\n\tshowCursor()\n\t{\n\t\tthis.setCursorPos();\n\n\t\tsetTimeout(() => {\n\t\t\tthis.animateCursor();\n\t\t}, 1000);\n\t}\n\n\tgetCursor()\n\t{\n\t\tif (!this.layout.cursor)\n\t\t{\n\t\t\tthis.layout.cursor = Tag.render`\n\t\t\t\t<div class=\"ui-tour-cursor\"></div>\n\t\t\t`;\n\t\t\tEvent.bind(this.layout.cursor, 'transitionend', () => {\n\t\t\t\tthis.getCurrentStep().initTargetEvent();\n\t\t\t});\n\t\t\tDom.append(this.layout.cursor, document.body);\n\t\t}\n\n\t\treturn this.layout.cursor;\n\t}\n\n\tsetCursorPos()\n\t{\n\t\tconst targetPos = this.getCurrentStep().getTargetPos();\n\n\t\tlet left = targetPos.left + targetPos.width / 2;\n\n\t\tif (left < 0)\n\t\t{\n\t\t\tleft = 0;\n\t\t}\n\n\t\tthis.cursorPaddingTop = 30;\n\t\tlet top = targetPos.bottom + this.cursorPaddingTop;\n\n\t\tif (top < 0)\n\t\t{\n\t\t\ttop = 0;\n\t\t}\n\n\t\tDom.adjust(this.getCursor(), {\n\t\t\tstyle: {\n\t\t\t\ttop: top + 'px',\n\t\t\t\tleft: left + 'px'\n\t\t\t}\n\t\t});\n\n\t}\n\n\tanimateCursor()\n\t{\n\t\tconst adjustment = this.cursorPaddingTop + this.getCurrentStep().getTargetPos().height / 2;\n\t\tthis.layout.cursor.style.transform = 'translateY(-' + adjustment + 'px)';\n\t}\n}\n","import { Type} from 'main.core';\nimport { Guide } from './guide.js';\n\nclass Manager {\n\n\tconstructor()\n\t{\n\t\tthis.guides = new Map();\n\t\tthis.autoStartQueue = [];\n\t\tthis.currentGuide = null;\n\t}\n\n\tcreate(options)\n\t{\n\t\toptions = Type.isPlainObject(options) ? options : {};\n\n\t\tconst id = options.id;\n\t\tif (!Type.isString(id) && id !== '')\n\t\t{\n\t\t\tthrow new Error(\"'id' parameter is required.\")\n\t\t}\n\n\t\tif (this.get(id))\n\t\t{\n\t\t\tthrow new Error(\"The tour instance with the same 'id' already exists.\");\n\t\t}\n\n\t\tconst guide = new Guide(options);\n\t\tthis.guides.set(guide, true);\n\n\t\treturn guide;\n\t}\n\n\tadd(options)\n\t{\n\t\tconst guide = this.create(options);\n\n\t\tguide.subscribe(\"UI.Tour.Guide:onFinish\", () => {\n\t\t\tthis.handleTourFinish(guide);\n\t\t});\n\n\t\tif (!this.currentGuide)\n\t\t{\n\t\t\tthis.currentGuide = guide;\n\t\t\tguide.start();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.autoStartQueue.push(guide);\n\t\t}\n\t}\n\n\t/**\n\t * @public\n\t * @param {string} id\n\t * @returns {Guide|null}\n\t */\n\tget(id)\n\t{\n\t\treturn this.guides.get(id);\n\t}\n\n\t/**\n\t * @public\n\t * @param {string} id\n\t */\n\tremove(id)\n\t{\n\t\tthis.guides.delete(id);\n\t}\n\n\t/**\n\t * @public\n\t * @returns {Guide|null}\n\t */\n\tgetCurrentGuide()\n\t{\n\t\treturn this.currentGuide;\n\t}\n\n\t/**\n\t * @private\n\t * @param {Guide} guide\n\t */\n\thandleTourFinish(guide)\n\t{\n\t\tthis.currentGuide = null;\n\t\tthis.remove(guide.getId());\n\n\t\tconst autoStartGuide = this.autoStartQueue.shift();\n\t\tif (autoStartGuide)\n\t\t{\n\t\t\tthis.currentGuide = autoStartGuide;\n\t\t\tautoStartGuide.start();\n\t\t}\n\t}\n}\n\nexport default new Manager();"],"names":["GuideConditionColor","WARNING","ALERT","PRIMARY","Step","Event","EventEmitter","constructor","options","target","Type","isString","isFunction","isDomNode","id","text","areaPadding","link","linkTitle","rounded","title","iconSrc","article","position","cursorMode","targetEvent","buttons","condition","events","isPlainObject","eventName","callback","Reflection","getClass","subscribe","getFullEventName","getCondition","getTarget","document","querySelector","getTargetPos","Dom","getPosition","getId","getButtons","getAreaPadding","getRounded","getText","getLink","getLinkTitle","getTitle","getIconSrc","getArticle","getCursorMode","getTargetEvent","shortName","setTarget","initTargetEvent","dispatchEvent","MouseEvent","Guide","steps","Array","isArray","forEach","step","push","length","Error","Text","getRandom","setId","autoSave","popup","layout","overlay","element","closeIcon","right","top","btnContainer","nextBtn","backBtn","content","finalContent","counter","currentCounter","counterItems","onEvents","currentStepIndex","targetPos","clickOnBackBtn","helper","BX","Helper","targetContainer","isBoolean","finalStep","finalText","finalTitle","simpleMode","setAutoSave","cb","bind","window","handleResizeWindow","getAutoSave","mode","save","optionName","userOptions","Math","floor","Date","now","send","start","emit","guide","setOverlay","getPopup","show","getPopupContainer","removeClass","showStep","addClass","getCurrentStep","close","closeStep","destroy","cursor","remove","increaseCurrentStepIndex","body","classList","adjustEvents","setTimeout","style","display","setOverlayElementForm","setCoords","setPopupData","showNextStep","showCursor","currentStep","clickEvent","e","isTrusted","unbind","targetPosWindow","isTargetVisible","scrollToTarget","setPopupPosition","setBindElement","setOffset","offsetLeft","offsetTop","setAngle","adjustPosition","angleOffset","anglePosition","bindOptions","forceTop","forceLeft","forceBindPosition","popupWidth","offsetWidth","clientWidth","documentElement","width","height","left","getAttribute","bindElement","offset","Tag","render","append","node","getBoundingClientRect","setAttribute","padding","textContent","Loc","getMessage","reduceCurrentStepIndex","className","toLowerCase","isObject","color","item","PopupWindowButton","click","event","Popup","getContent","autoHide","noAllPaddings","onPopupClose","destroyed","conditionNodeTop","conditionNodeBottom","getContentContainer","bottom","iconNode","encodeURI","linkNode","getCounterItems","getCurrentCounter","getBtnContainer","unbindAll","innerHTML","handleClickLink","replace","i","preventDefault","onEvent","isOpen","setAutoHide","getSlider","handleClickOnNextBtn","handleClickOnBackBtn","getPreviousStep","setFinalStep","hasClass","finalPopup","getFinalPopup","getFinalContent","maxWidth","minWidth","getFinalBtn","btn","class","innerHeight","clientHeight","innerWidth","scrollTo","y","setCursorPos","animateCursor","getCursor","cursorPaddingTop","adjust","adjustment","transform","ConditionColor","Manager","guides","Map","autoStartQueue","currentGuide","create","get","set","add","handleTourFinish","delete","getCurrentGuide","autoStartGuide","shift"],"mappings":";;;;;;CAAA;CACA;CACA;AACA,CAAe,MAAMA,mBAAmB,CACxC;CADqBA,mBAAmB,CAEhCC,OAAO,GAAG,qBAAqB;CAFlBD,mBAAmB,CAGhCE,KAAK,GAAG,mBAAmB;CAHdF,mBAAmB,CAIhCG,OAAO,GAAG,qBAAqB;;CCLhC,MAAMC,IAAI,SAASC,eAAK,CAACC,YAAY,CAC5C;GACCC,WAAW,CAACC,OAAO,EACnB;KACC,KAAK,CAACA,OAAO,CAAC;KACd,IAAI,CAACC,MAAM,GAAG,IAAI;KAClB,IACCC,cAAI,CAACC,QAAQ,CAACH,OAAO,CAACC,MAAM,CAAC,IAAID,OAAO,CAACC,MAAM,KAAK,EAAE,IACtDC,cAAI,CAACE,UAAU,CAACJ,OAAO,CAACC,MAAM,CAAC,IAC/BC,cAAI,CAACG,SAAS,CAACL,OAAO,CAACC,MAAM,CAAC,EAE/B;OACC,IAAI,CAACA,MAAM,GAAGD,OAAO,CAACC,MAAM;;KAG7B,IAAI,CAACK,EAAE,GAAGN,OAAO,CAACM,EAAE,IAAI,IAAI;KAC5B,IAAI,CAACC,IAAI,GAAGP,OAAO,CAACO,IAAI;KACxB,IAAI,CAACC,WAAW,GAAGR,OAAO,CAACQ,WAAW;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