!function(){"use strict";function e(){return document.currentScript?document.currentScript:document.querySelector("script[jv-id]")||document.querySelector("script[data-jv-id]")}function t(e){return e&&e.match(/https?:\/\/(\S+(\.com|\.ru|\.tech))\/(widget\.js|widget\/[A-Za-z0-9]+)/)}function n(e){return e&&e.match(/^https?:\/\/(\S+)\/script\/widget\/([A-Za-z0-9]+)/)}function o(e){return e&&e.match(/https?:\/\/(\S+)\/script\/geo-widget\/([A-Za-z0-9]+)/)}function r(){var e=window.location&&window.location.protocol;return-1===["http","https"].indexOf(e||"")&&(e="https:"),e}function i(){return window.jivo_config&&window.jivo_config.shard_id||"main"}function a(){return window.jivo_config&&window.jivo_config.telemetry_host||null}function d(e,t,n){var o;e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&(e.attachEvent("on"+t,(o=e,function(){n.call(o,window.event)})),e=null)}function s(e){try{d(window,"scroll",e),d(document.body,"mousemove",e)}catch(t){e&&e()}}function l(e,t,n){if(window.removeEventListener)e.removeEventListener(t,n,!1);else{if(!window.detachEvent)return!1;e.detachEvent("on"+t,(function(){n.call(e)}))}}function c(e){try{l(window,"scroll",e),l(document.body,"mousemove",e)}catch(e){console.warn(e)}}function u(){var e=navigator.userAgent.toLowerCase();return-1==e.search(/google/gi)&&-1==e.search(/\+http:\/\/yandex\.com\/bots/gi)&&-1==e.search(/\+http:\/\/www\.cloudflare\.com\/always-online/gi)&&-1==e.search(/linespider\//gi)}function g(e,t,n,o,r){r&&r.error&&(r=r.error),r&&r instanceof Error||(r={}),r.stack=r.stack||"empty",r.message="Bundle init error: "+e+" error.message: "+r.message,r.columnNumber=o,r.lineNumber=n,r.url=t,window.parent.__jivoOnError(r)}var f="loader_loaded",v="no_widget_id_or_confighost",m="error_code_1015",h="widget_deleted";window.__jivoOnError=function(e){if(u())try{var t=window.jivo_config&&window.jivo_config.err_host?"//"+window.jivo_config.err_host+"/widget":"//err.jivosite.com/widget",n={widget:"true",widget_version:window.jivo_version,level:2,url:(o=window.location,o.protocol+"//"+o.host+o.pathname),lineNumber:e&&e.lineNumber,fileName:e&&e.fileName,column:e&&e.columnNumber,full_message:e&&e.stack,short_message:e&&e.message,shard:i()};window.navigator&&window.navigator.sendBeacon&&navigator.sendBeacon(r()+t,JSON.stringify(n))}catch(e){}var o},function(){var l=.1;window.__hasStorage=!1;try{localStorage.setItem("testLocalStorage","ok"),localStorage.removeItem("testLocalStorage"),window.__hasStorage=!0}catch(e){}function p(l,p,w,_){var b=l.console;if(b||(b={log:function(){},error:function(){}}),function(){if(l.google&&l.google.translate&&0==l.location.href.search(/(http(s?)).+\.translate\.goog/gi))return!1;return!!l.WebSocket}()){if(void 0===l.jivo_magic_var){l.jivo_magic_var=!0;var y,S,j,C,I,E,L,T,N,O,A,B={hasStorage:l.__hasStorage,jivoLoaderVersion:w,loadScript:function(e,t){var n=t||p,o=n.getElementsByTagName("script")[0],r=n.createElement("script");he(r),o.parentNode.insertBefore(r,o).src=e},currentLoaderVersionCache:_},k=navigator.userAgent.toLowerCase(),W=/iPhone|iPad|iPod|Android|Windows Phone/i.test(k),x=p.createElement("iframe"),H=p.createElement("div"),M=0,U=0,J=0,R=[],q=!1,D=ie(),P=JSON.parse('["AF","CG","CF","GW","ER","IR","IQ","KP","LR","LB","LY","ML","CU","PS","SO","SD","SY","ZW","YE"]')||null,z=JSON.parse('["127-129-12k-12i-12c-12h","12e-12i-12e-124-12c-12h","131-12e-12l-12m-124-12b-12c","124-12g-12o-129-12m-124-12g-12c-12h","127-124-12s-12c-12s","12g-124-12k-12c-12p-12n-124-12h-124","3n-12j-124-12d-12l","12g-129-12o-129-128-12k-12i-12h"]')||null;be("Initialization"),l.__jivoBundleOnLoad=function(e){clearTimeout(I),E=e;var t=((new Date).getTime()-L)/1e3;t>6&&ae("loadTime",t);ae("bundleLoaded",!0),ae("buildNumber",y.build_number),be("Bundle is loaded"),function(){C=p.body.lastChild,H.style&&(H.style.opacity="0",H.style.visibility="hidden",H.style.width=0,H.style.height=0,H.style.overflow="hidden");H.setAttribute("id","jivo-iframe-container"),H.appendChild(x),C?C.parentNode.insertBefore(H,C.nextSibling):p.body.appendChild(H);re()}()},l.__jivoBundleInit=function(e){e.loaderContext=B,function(){E=null;var e=function(e){if(e){var t=e.querySelectorAll&&e.querySelectorAll(".js-jivo-bundle");return t&&t.length>0?t:e.getElementsByClassName("js-jivo-bundle")}}(ye());if(!e)throw b.error("Cannot get bundle script element"),new Error("Cannot get bundle script element");for(var t=0;t4){be("Config load limit is exceeded"),B.hasStorage&&localStorage.removeItem("jv_loader_info_"+N);var n=new Error("Config load limit is exceeded"),o="Config urls: "+R.join(";\r\n");try{n.stack=o}catch(e){n=new Error("Config load limit is exceeded. "+o)}l.__jivoOnError(n)}else if(be("Loading config from",e),D.deletedInfo.widgetId&&D.deletedInfo.widgetId===N&&D.deletedInfo.resolveTime&&parseInt(D.deletedInfo.resolveTime)>=(new Date).getTime())b.error("This widget is permanently removed");else{var i=new XMLHttpRequest;i.onreadystatechange=function(){if(4===i.readyState)if(200===i.status){var e=Ie(pe(i));e?(be("Config is loaded",e),e.isDeleted?fe():t?(e.chat_mode=t.chat_mode,e.options=t.options,e.botmode=t.botmode,e.geoip=t.geoip,e.maintenance=!!t.maintenance,Q(e,null)):function(e,t){var n=new XMLHttpRequest;function o(){return!1}n.onreadystatechange=function(){if(4===n.readyState)if(200===n.status){var o=Ie(pe(n));if(!o)throw new Error("Load widget status error");var r=n.getResponseHeader("X-BotMode"),i=n.getResponseHeader("X-GeoIP"),a=o.agents&&o.agents.length;be("Status is loaded",o,r,i,a),e.lastStatus=o,e.botmode="yes"===r?"yes":null,e.geoip=i||";;;",e.chat_mode=a?"online":"offline",e.options=o.premium?888:0,o.bots&&o.bots.length&&(e.bots=o.bots),e.maintenance=!!o.maintenance,t(o.config_updated_ts)}else if(0!==n.status)throw e.botmode=null,e.geoip=";;;",e.chat_mode="offline",e.options=0,t(null),480==n.status&&be("Site is under maintenance, try again later."),new Error("Load widget status error: "+n.status)};var i="/configs/development/status.json",a=o()?i:r()+"//"+e.chat_host+"/widget/status/"+e.site_id+"/"+e.widget_id+"?rnd="+Math.random();n.open("GET",a,!0),n.send(null)}(e,(function(t){Q(e,t)}))):ve(!0)}else 0!==i.status&&ve()},i.open("GET",e,!0),i.send(null)}}function $(e){var t={event:e,widget_id:N,t:(new Date).getTime(),param1:"61.16.0",shard:i()};if(u()&&l.navigator&&l.navigator.sendBeacon)try{var n=a(),o=r();o+=n?"//"+n+"/w":"//telemetry.jivosite.com/w",l.navigator.sendBeacon&&navigator.sendBeacon(o,JSON.stringify(t))}catch(e){}}function K(e,t){Math.random()<=.01*t&&$(e)}function Q(e,t){if(be("checkConfig",e.config_updated_ts,t),e.isDeleted)fe();else if(function(){var e=navigator.userAgent.toLowerCase();return-1!==e.indexOf("msie")||-1!==e.indexOf("trident")}())be("ie11 blocked");else{if(t&&e.config_updated_ts&&e.config_updated_ts!=t)return be("update configUpdatedTs in store",t),ae("configUpdatedTs",t),Y(le(),e);if(e.regions&&!D.isChatStarted){var n=function(e){var t,n,o=e.regions,r=ge(e.geoip);if(o){for(var i=Object.keys(o),a=0;a=0)return!0;return!1}())throw be("Host is blacklisted",l.location.host),new Error("Placing widget is forbidden on "+l.top.location.host);if(t=y.geoip.split(";")[0],P.indexOf(t)>=0)return b.log("[Jivo]: Service unavailable for country");if(!e.disable_stop_words&&function(){var e=!1,t=(d=z,d.map((function(e){return e.split("-").map((function(e){return String.fromCharCode(parseInt(e,32)-20)})).join("")}))),n=p.querySelector('meta[name="description"]'),o=p.querySelector('meta[name="keywords"]'),r=p.title,i=n&&n.content?n.content:"",a=o&&o.content?o.content:"";var d;(we(r,t)||we(i,t)||we(a,t))&&(e=!0);return e}())return $(m),void be("Init error, code 1015.");if(W&&y.disable_mobile)return void be("Mobile widget is disabled");var t;"complete"==p.readyState?ee():D.bundleLoaded&&D.buildNumber==y.build_number?"interactive"==p.readyState?ee():d(l,"DOMContentLoaded",ee):(ae("bundleLoaded",!1),d(l,"load",ee))}(e)}}function ee(){be("Widget initialization"),function(){be("Iframe initialization"),x.src="javascript:void(0)",x.role="presentation",x.allow="autoplay",x.title="Jivochat",x.setAttribute("name","jivo_container"),x.setAttribute("id","jivo_container"),x.setAttribute("frameborder","no"),A&&x.setAttribute("nonce",A);l.atob&&"complete"!==p.readyState?d(l,"load",ne):ne();d(l,"message",(function(e){if(e&&e.data&&"object"==typeof e.data){var t=e.data;"in_node_webkit"==t.name&&(l.jivo_cobrowse={source:e.source,origin:e.origin}),"iframe_url_changed"!=t.name&&"iframe_url_changed"!=t||re()}else y&&1===y.logs&&b&&b.log&&b.log("Error receive postMessage, window message event is empty.")}))}()}function te(){var e=_e();be("loadBundleAfterWait",e,B),c(te),oe(e)}function ne(){var e=_e();if(!B.store.isChatStarted&&y.enable_bundle_wait){be("addWaitActions");try{s(te),setTimeout((function(){be("5s load",B.store),l.jivo_api||te()}),5e3)}catch(t){oe(e)}}else be("startLoadBundle",e),oe(e)}function oe(e){be("Insertion of bundle code from",e);var t=ye(),n=p.createElement("script"),o=function(e){var t=y.bundle_folder?y.bundle_folder:"";return e+t+"/js/bundle_"+y.locale+".js?rand="+y.build_number}(e);L=(new Date).getTime(),he(n),n.className="js-jivo-bundle",n.src=r()+o,B.bundleSrc=o,n.onerror=function(){be("loadBundle errorBundle",e),p.getElementById("jcont")&&function(e,t,n){if(clearTimeout(I),++U>=3){if(be("Bundle load retries count is exceeded"),V)return void b.error("Widget not loaded due CSP security policy.");var o=new Error("Bundle NOT loaded. Type: "+e+(t?". Host: "+t:"")+(n?". Status code: "+n:""));return void l.__jivoOnError(o)}ne()}("errorBundle",e)},t.appendChild(n)}function re(){if(!(M++>3)){if(!E)return M--,ne();try{j=x.contentWindow.document}catch(e){S=p.domain,x.src="javascript:var d=document.open();d.domain='"+S+"';void(0);",j=x.contentWindow.document}var e='',t="";try{t="window.onerror = "+g.toString()+";"}catch(e){}var n=(y&&!y.disable_error_reporting?t:"")+E;if(!(navigator.userAgent.toLowerCase().indexOf("firefox")>-1)&&j.head&&j.body){j.body.class="notranslate",j.head.innerHTML=e;var o=p.createElement("script");o.type="text/javascript",A&&o.setAttribute("nonce",A),o.innerHTML=n,j.head.appendChild(o)}else{var r='',i='