uawdijnntqw1x1x1
IP : 216.73.217.167
Hostname : xhost1.intravision.ru
Kernel : Linux xhost1.intravision.ru 3.16.0-7-amd64 #1 SMP Debian 3.16.59-1 (2018-10-03) x86_64
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
OS : Linux
PATH:
/
var
/
www
/
tiskom
/
data
/
www
/
tiskom.xhost.intravision.ru
/
bitrix
/
js
/
.
/
ui
/
.
/
tour
/
src
/
manager.js
/
/
import { Type} from 'main.core'; import { Guide } from './guide.js'; class Manager { constructor() { this.guides = new Map(); this.autoStartQueue = []; this.currentGuide = null; } create(options) { options = Type.isPlainObject(options) ? options : {}; const id = options.id; if (!Type.isString(id) && id !== '') { throw new Error("'id' parameter is required.") } if (this.get(id)) { throw new Error("The tour instance with the same 'id' already exists."); } const guide = new Guide(options); this.guides.set(guide, true); return guide; } add(options) { const guide = this.create(options); guide.subscribe("UI.Tour.Guide:onFinish", () => { this.handleTourFinish(guide); }); if (!this.currentGuide) { this.currentGuide = guide; guide.start(); } else { this.autoStartQueue.push(guide); } } /** * @public * @param {string} id * @returns {Guide|null} */ get(id) { return this.guides.get(id); } /** * @public * @param {string} id */ remove(id) { this.guides.delete(id); } /** * @public * @returns {Guide|null} */ getCurrentGuide() { return this.currentGuide; } /** * @private * @param {Guide} guide */ handleTourFinish(guide) { this.currentGuide = null; this.remove(guide.getId()); const autoStartGuide = this.autoStartQueue.shift(); if (autoStartGuide) { this.currentGuide = autoStartGuide; autoStartGuide.start(); } } } export default new Manager();
/var/www/tiskom/data/www/tiskom.xhost.intravision.ru/bitrix/js/./ui/./tour/src/manager.js