if (typeof sbjs === 'undefined') { /** sourcebuster v1.0.5 **/ !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r;"undefined"!=typeof window?r=window:"undefined"!=typeof global?r=global:"undefined"!=typeof self&&(r=self),r.sbjs=e()}}(function(){return function e(r,t,s){function n(a,i){if(!t[a]){if(!r[a]){var c="function"==typeof require&&require;if(!i&&c)return c(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var p=t[a]={exports:{}};r[a][0].call(p.exports,function(e){var t=r[a][1][e];return n(t?t:e)},p,p.exports,e,r,t,s)}return t[a].exports}for(var o="function"==typeof require&&require,a=0;a0))return x=a.getHost(e),!0;for(var r=0;r0)for(var o=0;o0)for(var a=0;aс оператором', callback_text_already_call: 'Уже Вам звонит ☎️', callback_text_talking: 'Ведет разговор', callback_text_thank: 'Спасибо за обращение!', callback_text_rating: 'Оцените работу менеджера', callback_text_operator_reject: 'Нет свободных операторов', callback_text_user_reject: 'Абонент завершил звонок.
Спасибо за обращение.', callback_text_operator_hungup: 'Мы не смогли дозвониться', callback_text_lost_connect: 'Сервер не доступен', callback_text_lost_reload: 'Сервер не доступен', color: '#3d6fcf', time: 30, forcedOpen: 0, inactivityOpen: 0, closeOpen: 0, widgetShow: 1, chatShow: 0, minPhoneLength: 12, maxPhoneLength: 13, buttonText: 'Жду звонка!', dontWorkTimeMessage_1: 'Вы обратились в нерабочее время', dontWorkTimeMessage_2: 'наш менеджер перезвонит Вам в', dontWorkTimeMessage_3: 'в', dontWorkTimeMessage_4: 'Операторов онлайн:', dontWorkTimeMessage_5: 'Всего звонков за день:', footerMessage: 'Виджет предоставлен', callback_offline_text_success: 'Ваш звонок успешно зарегестрирован в службе поддержки!', callback_offline_text_fail: 'Отсутствует соединение с сервером', greetingMessageAll: { 1: 'Доброе утро! ☀️', 2: 'Добрый день!', 3: 'Добрый вечер!' }, greetingMessage: function () { var currentDate = new Date(); var currentHours = currentDate.getHours(); if (currentHours>=5 && currentHours<11) { return this.greetingMessageAll[1]; } else if (currentHours>=11 && currentHours<16) { return this.greetingMessageAll[2]; } else { return this.greetingMessageAll[3]; } }, chat_greeting_online: 'Здравствуйте! Чем могу быть полезен?', chat_greeting_offline: 'Пожалуйста, оставьте свое сообщение и мы свяжемся с Вами в ближайшее время!', chat_header_open_online: 'Напишите нам!', chat_header_open_offline: 'Мы офлайн!', chat_subheader_open_online: 'Мы онлайн', chat_subheader_open_offline: 'Оставьте сообщение!', chat_placeholder: 'Напишите сообщение и нажмите Enter!', chat_operator_usersubtitle: 'Консультант', chat_text_today: 'Сегодня', chat_operator_typing: 'Оператор печатает сообщение...', chat_lost_connect: 'Сервер не доступен.', chat_lost_reconnect: 'Соединение...', chat_lost_reload: 'Перезагрузите страницу.', workTimeBegin: new Date(), workTimeEnd: new Date(), prepareWorkTime: function () { this.workTimeBegin.setUTCHours('21'); this.workTimeBegin.setUTCMinutes('59'); this.workTimeBegin.setUTCSeconds('00'); this.workTimeEnd.setUTCHours('20'); this.workTimeEnd.setUTCMinutes('59'); this.workTimeEnd.setUTCSeconds('00'); }, workDay: { 0: 1, 1: 1, 2: 1, 3: 1, 4: 1, 5: 1, 6: 1, }, isWorkTime: function () { if (LIRACRM.serverIsWorkTime == 0) { return false; } else { return true; } }, checkWorkTime: function () { LIRACRM.currentTime = new Date(); return (this.workDay[LIRACRM.currentTime.getDay()] && LIRACRM.currentTime >= this.workTimeBegin && LIRACRM.currentTime <= this.workTimeEnd); }, cashVersion: '296', defaultPrefix: '380', defaultPlaceholder: 'Ваш номер телефона', placeLeft: 0, placeRight: 1, domain: 'service.voip.com.ua', domain_callme: 'callme1.voip.com.ua', socket_callme: 'callme2.voip.com.ua:10081', statusUrl: '/script/status/', callUrl: '/script/call/', widgetDebugLevel: '1', init: function () { this.prepareWorkTime(); } }, /* CallTracking Options */ ctOptions: { token: '', workTimeBegin: new Date(), workTimeEnd: new Date(), prepareWorkTime: function () { this.workTimeBegin.setUTCHours('0'); this.workTimeBegin.setUTCMinutes('00'); this.workTimeBegin.setUTCSeconds('00'); this.workTimeEnd.setUTCHours('0'); this.workTimeEnd.setUTCMinutes('00'); this.workTimeEnd.setUTCSeconds('00'); }, workDay: { 0: 0, 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, }, isWorkTime: function () { LIRACRM.currentTime = new Date(); return (this.workDay[LIRACRM.currentTime.getDay()] && LIRACRM.currentTime >= this.workTimeBegin && LIRACRM.currentTime <= this.workTimeEnd); }, init: function () { if (LIRACRM.widgetOptions.widgetDebugLevel > 4) { console.log('init ct options'); }; this.prepareWorkTime(); } }, /* Load JavaScript file */ loadScript: function (url, callback) { var sc = document.getElementsByTagName("script"); var iA = sc[0]; var se = document.createElement("script"); se.type = "text/javascript"; se.async = true; se.charset = "UTF-8"; iA.parentNode.insertBefore(se, iA).src = url; se.onload = function() { if (typeof callback === 'function') callback(); } }, loadWidget: function () { if ( (typeof this.widgetOptions.token === 'undefined' || !this.widgetOptions.token) && this.widgetOptions.hide_widget == 0) { //throw "Widget not declared"; return; }; if (this.widgetOptions.chatShow || LIRACRM.widgetOptions.widgetShow) { this.loadScript('//callme1.voip.com.ua/lirawidget/supportwidget.js?rand=296' , function () { }); } // hide widget but keep connection by Websocket if (this.widgetOptions.hide_widget == 1) { this.loadScript('//callme1.voip.com.ua/lirawidget/supportwidget_hidden.js?rand=296' , function () { }); } }, loadModalWidget: function () { if ( (typeof this.widgetOptions.token === 'undefined' || !this.widgetOptions.token) && this.widgetOptions.hide_widget == 0) { //throw "Widget not declared"; return; }; this.loadScript('//callme1.voip.com.ua/lirawidget/widgetpopup.js?rand=296', function () { }); }, loadColorjs: function () { if ( (typeof this.widgetOptions.token === 'undefined' || !this.widgetOptions.token) && this.widgetOptions.hide_widget == 0) { //throw "Widget not declared"; return; }; this.loadScript('//callme1.voip.com.ua/lirawidget/color.min.js?rand=296', function () { LIRACRM.loadWidget(); }); }, loadCt: function (rand) { if (typeof this.ctOptions.token === 'undefined' || !this.ctOptions.token) { return; }; if (rand === undefined) { rand = 296; }; var referrer = document.referrer, url = document.URL, clientId = this.ga.getClientId(), token = this.ctOptions.token, sbjs_current_src = sbjs.get.current.src, sbjs_current_mdm = sbjs.get.current.mdm, sbjs_current_cmp = sbjs.get.current.cmp, sbjs_current_trm = sbjs.get.current.trm; if (LIRACRM.cookie.get('roistat_visit') != undefined){ var roistat_visit = LIRACRM.cookie.get('roistat_visit'); } else { var roistat_visit = ""; }; //console.log('referrer',referrer); //console.log('url',url); if (LIRACRM.widgetOptions.widgetDebugLevel > 4) { console.log('load ct'); }; // * get yandex client id if (LIRACRM.widgetOptions.yaCounter != '') { var liraxYaCounter = 'yaCounter'+LIRACRM.widgetOptions.yaCounter; var liraxYaCounterFunc = liraxYaCounter+'.getClientID()'; try{ var liraxYaClientId = eval(liraxYaCounterFunc); } catch(error) { liraxYaClientId = ''; } } else { var liraxYaClientId = ''; } this.loadScript('//callme1.voip.com.ua/lirawidget/script/ct/' + token + '?rand=' + encodeURIComponent(rand) + '&clientId=' + encodeURIComponent(clientId) + '&yaClientId=' + encodeURIComponent(liraxYaClientId) + '&ct_c=' + encodeURIComponent(LIRACRM.cookie.get('liracrm_ct_c')) + '&sbjs_current_src=' + encodeURIComponent(sbjs_current_src) + '&sbjs_current_mdm=' + encodeURIComponent(sbjs_current_mdm) + '&sbjs_current_cmp=' + encodeURIComponent(sbjs_current_cmp) + '&sbjs_current_trm=' + encodeURIComponent(sbjs_current_trm) + '&roistat_visit=' + encodeURIComponent(roistat_visit) + '&url=' + encodeURIComponent(url) + '&referrer=' + encodeURIComponent(referrer) , function () { }); }, /* Cookie */ cookie: { set: function (name, value, options) { options = options || {}; var expires = options.expires; if (typeof expires == "number" && expires) { var d = new Date(); d.setTime(d.getTime() + expires * 1000); expires = options.expires = d; }; if (expires && expires.toUTCString) { options.expires = expires.toUTCString(); }; value = encodeURIComponent(value); var updatedCookie = name + "=" + value; for (var propName in options) { updatedCookie += "; " + propName; var propValue = options[propName]; if (propValue !== true) { updatedCookie += "=" + propValue; } }; document.cookie = updatedCookie; }, get: function (name) { var matches = document.cookie.match(new RegExp( "(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\/\+^])/g, '\$1') + "=([^;]*)" )); return matches ? decodeURIComponent(matches[1]) : undefined; } }, /* Google Analytics */ ga: { getClientId: function (callback) { var clientId; if (typeof (ga) !== "undefined") { ga(function (tracker) { clientId = tracker.get('clientId'); if (clientId !== undefined) { if (typeof callback === 'function') callback(); }; }); if (clientId == undefined) { ga(function() { clientId = ga.getAll()[0].get('clientId'); if (typeof callback === 'function') callback(); }); }; }; return clientId; }, getTrackingId: function () { var trackingId; if (typeof (ga) !== "undefined") { ga(function (tracker) { trackingId = tracker.get('trackingId'); }); if (trackingId == undefined) { ga(function() { trackingId = ga.getAll()[0].get('trackingId'); }); }; }; return trackingId; } }, replacePhone: function (phone, liracrm_ct_c, liracrm_phone) { if (LIRACRM.widgetOptions.widgetDebugLevel > 4) { console.log(phone); console.log(liracrm_ct_c); }; var liracrm_ct_phones = phone; var liracrm_ct_phones_nomask = liracrm_phone; var liracrm_ct_ids = liracrm_ct_c; for (var i = 0; i < liracrm_ct_c.length; i++) { if (i == 0 && liracrm_ct_c[i] != 0) { var ct_phone = jQuery(".ct-phone"); var ct_phone_href = ct_phone.attr('href'); var ct_phone_parent = ct_phone.parent(); var ct_phone_parent_href = ct_phone.parent().attr('href'); var ct_phone_number = liracrm_ct_phones_nomask[i]; if (ct_phone_number.slice(0,1) != '0') { ct_phone_number = '+'+ct_phone_number; } if (ct_phone_href) { if (ct_phone_href.indexOf('tel:') !== -1 ) ct_phone.attr('href', 'tel:'+ct_phone_number); if (ct_phone_href.indexOf('callto:') !== -1 ) ct_phone.attr('href', 'callto:'+ct_phone_number); if (ct_phone_href.indexOf('callto:') == -1 && ct_phone_href.indexOf('tel:') == -1) ct_phone.attr('href', 'tel:+'+ct_phone_number); }else if (ct_phone_parent_href) { if (ct_phone_parent_href.indexOf('tel:') !== -1 ) ct_phone_parent.attr('href', 'tel:'+ct_phone_number); if (ct_phone_parent_href.indexOf('callto:') !== -1 ) ct_phone_parent.attr('href', 'callto:'+ct_phone_number); if (ct_phone_parent_href.indexOf('callto:') == -1 && ct_phone_parent_href.indexOf('tel:') == -1) ct_phone_parent.attr('href', 'tel:'+ct_phone_number); }; jQuery('.lirax-hide').hide(); jQuery(".ct-phone").html(liracrm_ct_phones[i]); } else { if (liracrm_ct_c[i] != 0) { var ct_phone = jQuery(".ct-phone-"+i); var ct_phone_href = ct_phone.attr('href'); if (ct_phone_href) { if (ct_phone_href.indexOf('tel:') !== -1 ) ct_phone.attr('href', 'tel:'+ct_phone_number); if (ct_phone_href.indexOf('callto:') !== -1 ) ct_phone.attr('href', 'callto:'+ct_phone_number); if (ct_phone_href.indexOf('callto:') == -1 && ct_phone_href.indexOf('tel:') == -1) ct_phone.attr('href', 'tel:'+ct_phone_number); }; ct_phone.html(liracrm_ct_phones[i]); }; }; }; LIRACRM.cookie.set('liracrm_ct_c', liracrm_ct_c, { expires: new Date(new Date().getTime() + 12000 * 1000), path: '/' }); }, /* Initialization */ startLira: 0, init: function () { if (typeof(ga) == 'undefined' && LIRACRM.startLira == 0) { LIRACRM.startLira++; setTimeout(function () { LIRACRM.init() }, 500); return; }; if (typeof(jQuery) == 'undefined') { if (!this.jQueryScriptOutputted) { this.jQueryScriptOutputted = true; this.loadScript('//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js', function(){ LIRACRM.init(); }); }; /*setTimeout(function () { LIRACRM.init() }, 1000);*/ //return; } else { this.loadColorjs(function(){ }); /* UTM Set */ sbjs.init(); LIRACRM.widgetOptions.init(); this.loadModalWidget(); this.ga.getClientId(function() { LIRACRM.ctOptions.init(); LIRACRM.loadCt(); }); } }, showWidget: function() { jQuery("#liracrm-modal-callme").trigger('click'); } }; if (typeof LIRAX != "undefined" && typeof LIRAX.widgetOptions != "undefined") { for(var propertyName in LIRAX.widgetOptions) { LIRACRM.widgetOptions[propertyName] = LIRAX.widgetOptions[propertyName]; }; LIRAX = LIRACRM; } else { var LIRAX = LIRACRM; }; setTimeout(function(){ LIRACRM.init(); }, 5000);