{{ getScript('freshchat_script', nonceHash)|raw }}
<!-- JIVOCHAT -->
{% if checkConfigHasScript('jivochat_script') %}
{{ getScript('jivochat_script', nonceHash)|raw }}
{% elseif getConfig('jivochat_script') %}
<script nonce="{{ nonceHash }}" src="//code.jivosite.com/widget/{{ getConfig('livechat_script') }}" async></script>
{% endif %}
<!-- LIVECHAT -->
{% if checkConfigHasScript('livechat_script') %}
{{ getScript('livechat_script', nonceHash)|raw }}
{% elseif getConfig('livechat_script') %}
<script nonce="{{ nonceHash }}">
window.__lc = window.__lc || {};
window.__lc.license = '{{ getConfig('livechat_script') }}';
window.__lc.integration_name = "manual_onboarding";
window.__lc.product_name = "livechat";
;(function(n,t,c){function i(n){return e._h?e._h.apply(null,n):e._q.push(n)}var e={_q:[],_h:null,_v:"2.0",on:function(){i(["on",c.call(arguments)])},once:function(){i(["once",c.call(arguments)])},off:function(){i(["off",c.call(arguments)])},get:function(){if(!e._h)throw new Error("[LiveChatWidget] You can't use getters before load.");return i(["get",c.call(arguments)])},call:function(){i(["call",c.call(arguments)])},init:function(){var n=t.createElement("script");n.async=!0,n.type="text/javascript",n.src="https://cdn.livechatinc.com/tracking.js",t.head.appendChild(n)}};!n.__lc.asyncInit&&e.init(),n.LiveChatWidget=n.LiveChatWidget||e}(window,document,[].slice))
</script>
{% endif %}
<!-- CALLPAGE -->
{% if checkConfigHasScript('callpage_script') %}
{{ getScript('callpage_script', nonceHash)|raw }}
{% elseif getConfig('callpage_script') %}
<script nonce="{{ nonceHash }}">var loadBabel = function(url, callback) {var script = document.createElement('script');script.async = true;if (script.readyState) {script.onreadystatechange = function() {if (script.readyState == 'loaded' || script.readyState == 'complete') {script.onreadystatechange = null;callback(window, document);}};} else {script.onload = function() {callback(window, document);};}script.src = url;document.head.appendChild(script);};var getCookie = function(cname) {var objToday = new Date();var version = objToday.toISOString().split('T')[0].split('-').join('');var name = cname + '=';var decodedCookie = decodeURIComponent(document.cookie);var cookieArray = decodedCookie.split(';');for (var i = 0; i < cookieArray.length; i++) {var cookie = cookieArray[i];cookie = cookie.trim();if (cookie.indexOf(name) == 0) {return cookie.substring(name.length, cookie.length);}}return version;};var loadWidget = function(window, document) {var __cp = {id:'{{ getConfig('callpage_script') }}',version:1.1};var cp = document.createElement('script');cp.type = 'text/javascript';cp.async = true;cp.src = ++cdn-widget.callpage.io+build+js+callpage.js.replace(/[+]/g, '/').replace(/[=]/g, '.') + '?v=' + getCookie('callpage-widget-version');var s = document.getElementsByTagName('script')[0];s.parentNode.insertBefore(cp, s);if (window.callpage) {alert('You could have only 1 CallPage code on your website!');} else {window.callpage = function(method) {if (method == '__getQueue') {return this.methods;} else if (method) {if (typeof window.callpage.execute === 'function') {return window.callpage.execute.apply(this, arguments);} else {(this.methods = this.methods || []).push({arguments: arguments,});}}};window.callpage.__cp = __cp;window.callpage('api.button.autoshow');}};loadBabel('https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/6.26.0/polyfill.min.js', function() {return loadWidget(window, document);});</script>
{% endif %}