function launch_chaty(t){null!=t&&"widget_index"!=t||(t=0),jQuery("#chaty-widget-"+t).length&&jQuery("#chaty-widget-"+t+" .chaty-cta-button .open-chaty").trigger("click"),jQuery("#chaty-widget-_"+t).length&&jQuery("#chaty-widget-_"+t+" .chaty-cta-button .open-chaty").trigger("click")}!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):"undefined"!=typeof module&&module.exports?module.exports=t(require("jquery")):t(jQuery)}((function(t,e){var a,c,n=[],i="",s=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4))?1:0,o=["System Stack","Arial","Tahoma","Verdana","Helvetica","Times New Roman","Trebuchet MS","Georgia","-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"],h=!0,l=!1,d=0,r=!1,y=!1,g=[],p=0,f=0,u="",w=0,m="";function v(a){if(t("#chaty-widget-"+a).data("animation")!=e&&"none"!=t("#chaty-widget-"+a).data("animation")){var c="chaty-animation-"+t("#chaty-widget-"+a).data("animation");t("#chaty-widget-"+a+" ."+c).removeClass(c)}t("#chaty-widget-"+a+" .ch-pending-msg").remove()}function _(){var e,a=!1;n.length&&t.each(n,(function(t,e){P(e.triggers.has_countries)&&!L(e.triggers.countries)&&e.triggers.countries.length&&(a=!0)})),a?""!=(i=H())?b():(e="https://www.cloudflare.com/cdn-cgi/trace",t.get(e,(function(t){var e,a=t.match("loc=(.*)");a.length>1&&(a=a[1])&&(""==(a=a.toUpperCase())&&(a="-"),e=a,"undefined"!=typeof Storage?null==window.sessionStorage.getItem("chaty_user_country_code")&&window.sessionStorage.setItem("chaty_user_country_code",e):X("chaty_user_country_code")||R("chaty_user_country_code",e,365),b())}))):b()}function b(){n.length&&(t("body").append(' '),t.each(n,(function(e,a){var c="",h="",g=0,p=[],f={},w=function(e){if(P(e.triggers.has_countries)&&!L(e.triggers.countries)&&e.triggers.countries.length&&"-"!=(i=H())&&-1==t.inArray(i,e.triggers.countries))return!1;return!0}(a);w=w&&function(t){if(t.triggers.has_date_scheduling_rules){var e=t.triggers.date_scheduling_rules.start_date_time,a=t.triggers.date_scheduling_rules.end_date_time,c=new Date,n=(c=Q(c,t.triggers.time_diff)).getFullYear()+"-"+q(c.getMonth()+1)+"-"+q(c.getDate())+" "+q(c.getHours())+":"+q(c.getMinutes())+":"+q(c.getSeconds());return""==a&&e<=n||(""==e&&a>=n||""!=e&&""!=a&&e<=n&&a>=n)}return!0}(a),w=w&&function(t){var e=!0;if(P(t.triggers.has_day_hours_scheduling_rules)&&t.triggers.day_hours_scheduling_rules.length>0){var a=t.triggers.day_hours_scheduling_rules;if(a.length>0){e=!1;for(var c=new Date,n=(c=Q(c,t.triggers.day_time_diff)).getHours(),i=c.getMinutes(),s=c.getDay(),o=0;o=0&&a[o].days<=6?a[o].days==s&&(l=1):7==a[o].days?s>=0&&s<=4&&(l=1):8==a[o].days?s>=1&&s<=5&&(l=1):9==a[o].days&&(6!=s&&0!=s||(l=1)),1==l&&(n>a[o].start_hours&&n=a[o].start_min&&(h=1):n>a[o].start_hours&&n==a[o].end_hours?i<=a[o].end_min&&(h=1):n==a[o].start_hours&&n==a[o].end_hours&&i>=a[o].start_min&&i<=a[o].end_min&&(h=1),1==h&&i>=a[o].start_min&&i<=a[o].end_min&&1),1==h&&1==l&&(e=1),1==e&&(o=a.length+1)}}}return e}(a);let m=null,v=0,_=null,b=!1;t.each(a.channels,(function(t,e){k(e)&&("Chatway"===e.channel?(v=!0,_=e.chatway_position,m=e,"inside-chaty"!==_&&"chat-view"!==a.settings.cta_type||(b=!0,g++,p.push(e))):(f=e,p.push(e),g++))})),"open"==a.settings.default_state&&1==g&&"chat-view"!=a.settings.cta_type&&(a.settings.default_state="click",n[e].settings.default_state="click");let M="";if(v&&(M="has-chatway-channel"),(1!=g||!b)&&w&&g>0&&!t("#chaty-widget-"+a.id).length){var S=z(a.settings);S="right"==S?"right":"left";var T=W(a);if("chat-view"==a.settings.cta_type){var D="";t("body").append(D),function(e){var a=e.id,c=B(a);null==c&&(c=-1);var n=e.settings.cta_body,i=e.settings.cta_head,s=t("title").text();L(s)?(n=n.replace(/{title}/g,""),i=i.replace(/{title}/g,"")):(n=n.replace(/{title}/g,s),i=i.replace(/{title}/g,s));n=n.replace(/{url}/g,""+window.location.href+""),i=i.replace(/{url}/g,""+window.location.href+"");var o="";o+="",t("#chaty-widget-"+a).append(o)}(a)}else{D="";t("body").append(D)}P(a.triggers.auto_hide_widget)&&parseInt(a.triggers.hide_after)>0&&(t("#chaty-widget-"+a.id).addClass("auto-hide-chaty"),t("#chaty-widget-"+a.id).attr("data-time",a.triggers.hide_after));var A=G(a.id,"c-widget");if(t("#chaty-widget-"+a.id).addClass(a.settings.show_cta),1==g&&"chat-view"!=a.settings.cta_type){"vertical"!=a.settings.icon_view&&(T="right"!=S?"right":"left");var O=I(f,a.id,T);t("#chaty-widget-"+a.id+" .chaty-i-trigger").append(O),t("#chaty-widget-"+a.id+" .chaty-i-trigger").addClass("single-channel"),t("#chaty-widget-"+a.id+" .chaty-i-trigger .chaty-channel").addClass("single"),t("#chaty-widget-"+a.id+" .chaty-widget").addClass("has-single"),L(X=a.settings.cta_text)||(X=x(X)),"first_click"==a.settings.show_cta&&(A?(t("#chaty-widget-"+a.id+" .chaty-tooltip").removeClass("chaty-tooltip"),t("#chaty-widget-"+a.id+" .chaty-i-trigger .chaty-channel").addClass("active").addClass("chaty-tooltip").addClass("pos-"+T),t("#chaty-widget-"+a.id+" .chaty-i-trigger .chaty-channel").append(""+X+"").addClass("active").addClass("has-on-hover"),t("#chaty-widget-"+a.id+" .chaty-i-trigger .chaty-channel a").append(""+X+"").addClass("has-on-hover"),t("#chaty-widget-"+a.id+" .chaty-i-trigger .chaty-channel a").attr("data-text",X)):t("#chaty-widget-"+a.id+" .chaty-i-trigger .chaty-channel a").append(""+X+"").removeClass("active").addClass("has-on-hover")),"all_time"==a.settings.show_cta&&(t("#chaty-widget-"+a.id+" .chaty-i-trigger .chaty-tooltip").append(""+X+"").addClass("active").addClass("has-on-hover"),t("#chaty-widget-"+a.id+" .chaty-i-trigger.single-channel .chaty-channel a").attr("data-text",X));var N=f;("Instagram"!=N.channel_type||"#ffffff"!=N.icon_color&&"#fff"!=N.icon_color)&&(c+="#chaty-widget-"+a.id+" ."+N.channel+"-channel .color-element{ fill: "+N.icon_color+"; color: "+N.icon_color+";}",c+="#chaty-widget-"+a.id+" .channel-icon-"+N.channel+" .color-element{ fill: "+N.icon_color+"; color: "+N.icon_color+";}"),c+="#chaty-widget-"+a.id+" ."+N.channel+"-channel .chaty-custom-icon { background-color: "+N.icon_color+"; }",c+="#chaty-widget-"+a.id+" ."+N.channel+"-channel .chaty-svg { background-color: "+N.icon_color+";}",c+="#chaty-widget-"+a.id+" .channel-icon-"+N.channel+" .chaty-svg { background-color: "+N.icon_color+";}","Contact_Us"==N.channel_type&&(c+=".chaty-contact-form-box #chaty-submit-button-"+a.id+" {background-color: "+N.contact_form_settings.button_bg_color+"; color: "+N.contact_form_settings.button_text_color+";} ",c+="#chaty-form-"+a.id+"-Contact_Us .chaty-contact-form-title {background-color: "+N.contact_form_settings.title_bg_color+"; } ");var R='
';t("#chaty-widget-"+a.id+" .chaty-i-trigger").append(R)}else{t.each(a.channels,(function(e,n){if(k(n)&&("Chatway"!==n.channel||"inside-chaty"===_||"chat-view"===a.settings.cta_type)){if(U(n.channel_type)&&(n.channel_type=n.channel),"chat-view"==a.settings.cta_type){var i=I(n,a.id,"top");t(".chaty-chat-view-"+a.id+" .chaty-view-channels").append(i)}else{i=I(n,a.id,T);t("#chaty-widget-"+a.id+" .chaty-channel-list").append(i)}("Instagram"!=n.channel_type&&"Instagram_DM"!=n.channel_type||"#ffffff"!=n.icon_color&&"#fff"!=n.icon_color)&&(c+="#chaty-widget-"+a.id+" ."+n.channel+"-channel .color-element{ fill: "+n.icon_color+"; color: "+n.icon_color+";}",c+="#chaty-widget-"+a.id+" .channel-icon-"+n.channel+" .color-element{ fill: "+n.icon_color+"; color: "+n.icon_color+";}"),c+="#chaty-widget-"+a.id+" ."+n.channel+"-channel .chaty-custom-icon { background-color: "+n.icon_color+"; }",c+="#chaty-widget-"+a.id+" ."+n.channel+"-channel .chaty-svg { background-color: "+n.icon_color+";}",c+="#chaty-widget-"+a.id+" .channel-icon-"+n.channel+" .chaty-svg { background-color: "+n.icon_color+";}",c+=".chaty-chat-view-"+a.id+" ."+n.channel+"-channel .chaty-custom-icon { background-color: "+n.icon_color+"; }",c+=".chaty-chat-view-"+a.id+" ."+n.channel+"-channel .chaty-svg { background-color: "+n.icon_color+";}",c+=".chaty-chat-view-"+a.id+" .channel-icon-"+n.channel+" .chaty-svg { background-color: "+n.icon_color+";}","Contact_Us"==n.channel_type&&(c+=".chaty-contact-form-box #chaty-submit-button-"+a.id+" {background-color: "+n.contact_form_settings.button_bg_color+"; color: "+n.contact_form_settings.button_text_color+";} ",c+="#chaty-form-"+a.id+"-Contact_Us .chaty-contact-form-title {background-color: "+n.contact_form_settings.title_bg_color+"; } ")}}));var V=function(t,e){(""==t.widget_icon||"chat-image"==t.widget_icon&&L(t.widget_icon_url)||"chat-fa-icon"==t.widget_icon&&L(t.widget_fa_icon))&&(t.widget_icon="chat-base");return"chat-image"==t.widget_icon?"Chaty Widget":"chat-fa-icon"==t.widget_icon?"":''+function(t,e,a,c){switch(t){case"chat-smile":return'';case"chat-bubble":return'';case"chat-db":return'';default:return''}}(t.widget_icon,t.widget_color,t.widget_icon_color,e)+""}(a.settings,a.id),X=a.settings.cta_text;"first_click"==a.settings.show_cta&&(A||(X=""));var Z=T;"horizontal"==a.settings.icon_view&&(Z="left"==S?"right":"left"),L(X)||(X=x(X));var F='
'+X+'
';t("#chaty-widget-"+a.id+" .chaty-i-trigger").html(F);R='
';t("#chaty-widget-"+a.id+" .chaty-i-trigger").append(R)}t.each(a.channels,(function(t,e){"Contact_Us"==e.channel_type&&"yes"==e.hide_recaptcha_badge&&(c+=".grecaptcha-badge {visibility: hidden;}")})),"chat-view"==a.settings.cta_type&&a.settings.show_close_button,!(A=G(a.id,"c-widget"))||"open"==a.settings.default_state&&1!=g||(function(e,a){var c=G(a,"c-widget");c&&P(e.is_pending_mesg_enabled)&&parseInt(e.pending_mesg_count)>0&&(t("#chaty-widget-"+a+" .chaty-widget").hasClass("has-single")?"sheen"==e.attention_effect||"spin"==e.attention_effect||"pulse"==e.attention_effect?t("#chaty-widget-"+a+" .chaty-i-trigger .chaty-channel").append(""+e.pending_mesg_count+""):t("#chaty-widget-"+a+" .chaty-i-trigger .chaty-channel .chaty-svg").append(""+e.pending_mesg_count+""):"jump"==e.attention_effect||"waggle"==e.attention_effect||"blink"==e.attention_effect||"pulse-icon"==e.attention_effect||"floating"==e.attention_effect?t("#chaty-widget-"+a+" .chaty-i-trigger .chaty-cta-main .chaty-cta-button").append(""+e.pending_mesg_count+""):t("#chaty-widget-"+a+" .chaty-i-trigger .chaty-cta-main").append(""+e.pending_mesg_count+""))}(a.settings,a.id),function(e,a){var c=G(a,"c-widget");c&&"none"!=e.attention_effect&&""!=e.attention_effect&&(t("#chaty-widget-"+a).attr("data-animation",e.attention_effect),t("#chaty-widget-"+a+" .chaty-widget").hasClass("has-single")?t("#chaty-widget-"+a+" .chaty-i-trigger .chaty-channel .chaty-svg").addClass("chaty-animation-"+e.attention_effect):t("#chaty-widget-"+a+" .chaty-i-trigger .chaty-cta-main .chaty-cta-button").addClass("chaty-animation-"+e.attention_effect))}(a.settings,a.id));var Y=0;if("open"!=a.settings.default_state||P(a.settings.show_close_button)||(t("#chaty-widget-"+a.id+" .chaty-widget").addClass("chaty-no-close-button").addClass("chaty-open"),Y=1),v&&(t("#chaty-widget-"+a.id+" .chaty-widget").addClass(_),"above-chaty"===_)){t("#chaty-widget-"+a.id+" .chaty-widget").addClass("has-chatway");let e=W(a),n=I(m,a.id,e,a.settings);t("#chaty-widget-"+a.id).length&&(t("#chaty-widget-"+a.id+" .chaty-channel-list").prepend(n),u+="#chaty-widget-"+a.id+" ."+m.channel_type+"-channel .color-element{ fill: "+m.icon_color+"; color: "+m.icon_color+";}",u+="#chaty-widget-"+a.id+" ."+m.channel_type+"-channel .csaas-svg { background-color: "+m.icon_color+";}",u+=".channel-"+a.id+"-"+m.channel_type+" .csaas-svg { background-color: "+m.icon_color+";}",c+="#chaty-widget-"+a.id+" ."+m.channel_type+"-channel .chaty-custom-icon { background-color: "+m.icon_color+"; }",c+="#chaty-widget-"+a.id+" ."+m.channel_type+"-channel .chaty-svg { background-color: "+m.icon_color+";}",c+="#chaty-widget-"+a.id+" .channel-icon-"+m.channel_type+" .chaty-svg { background-color: "+m.icon_color+";}")}P(a.settings.is_google_analytics_enabled)&&(t("#chaty-widget-"+a.id+" .chaty-channel-list .chaty-channel > a").addClass("has-gae"),t("#chaty-form-"+a.id+"-chaty-chat-view .chaty-channel > a").addClass("has-gae"),t("#chaty-widget-"+a.id+" .chaty-i-trigger.single-channel .chaty-channel > a").addClass("has-gae"),t(".chaty-outer-forms.chaty-whatsapp-btn-form.chaty-form-"+a.id+" form.add-analytics").addClass("form-google-analytics"),t(".whatsapp-chaty-form-"+a.id).addClass("has-form-gae")),P(a.settings.has_custom_css)&&!L(a.settings.custom_css)&&(h+=a.settings.custom_css),"hover"==a.settings.default_state?t("#chaty-widget-"+a.id).addClass("open-on-hover"):"open"==a.settings.default_state&&(t("#chaty-widget-"+a.id+" .chaty-widget").addClass("default-open"),!A&&P(a.settings.show_close_button)||t("#chaty-widget-"+a.id+" .chaty-widget:not(.has-single)").addClass("chaty-open"),A||t("#chaty-widget-"+a.id+" .chaty-widget").removeClass("default-open")),t("#chaty-widget-"+a.id+" .chaty-widget:not(.has-single):not(.chaty-no-close-button)").hasClass("default-open")?P(a.settings.bg_blur_effect)&&t("body").addClass("add-bg-blur-effect"):t("body").removeClass("add-bg-blur-effect"),P(a.settings.bg_blur_effect)&&t("#chaty-widget-"+a.id+" .chaty-widget:not(.chaty-no-close-button)").addClass("has-bg-blur-effect");var J=function(t){return t}(a.settings.widget_size,a.settings.custom_widget_size);if(J=parseInt(J),c+="#chaty-widget-"+a.id+" .chaty-channel-list .chaty-channel {width: "+J+"px; height: "+J+"px; }",c+="#chaty-widget-"+a.id+" .chaty-channel-list .chaty-channel > a {width: "+J+"px; height: "+J+"px; }",c+="#chaty-widget-"+a.id+" .chaty-channel-list .chaty-channel > a .chaty-custom-icon {display:block; width: "+J+"px; height: "+J+"px; line-height: "+J+"px; font-size: "+parseInt(J/2)+"px; }",c+="#chaty-widget-"+a.id+" .chaty-channel-list .chaty-channel button {width: "+J+"px; height: "+J+"px; margin: 0; padding:0; outline: none; border-radius: 50%;}",c+="#chaty-widget-"+a.id+" .chaty-channel-list .chaty-channel .chaty-svg {width: "+J+"px; height: "+J+"px; }",c+="#chaty-widget-"+a.id+" .chaty-channel-list .chaty-channel .chaty-svg img {width: "+J+"px; height: "+J+"px; }",c+="#chaty-widget-"+a.id+" .chaty-channel-list .chaty-channel span.chaty-icon {width: "+J+"px; height: "+J+"px; }",c+="#chaty-widget-"+a.id+" .chaty-channel-list .chaty-channel a {width: "+J+"px; height: "+J+"px; }",c+="#chaty-widget-"+a.id+" .chaty-channel-list .chaty-channel .chaty-svg .chaty-custom-channel-icon {width: "+J+"px; height: "+J+"px; line-height: "+J+"px; display: block; font-size:"+parseInt(J/2)+"px; }",c+="#chaty-widget-"+a.id+" .chaty-i-trigger .chaty-cta-button {background-color: "+a.settings.widget_color+"; }",c+="#chaty-widget-"+a.id+" .chaty-i-trigger .chaty-cta-button button {background-color: "+a.settings.widget_color+"; }",c+="#chaty-widget-"+a.id+" .chaty-i-trigger .chaty-channel {width: "+J+"px; height: "+J+"px; }",c+="#chaty-widget-"+a.id+" .chaty-i-trigger .chaty-channel > a {width: "+J+"px; height: "+J+"px; }",c+="#chaty-widget-"+a.id+" .chaty-i-trigger .chaty-channel > a .chaty-custom-icon {display:block; width: "+J+"px; height: "+J+"px; line-height: "+J+"px; font-size: "+parseInt(J/2)+"px; }",c+="#chaty-widget-"+a.id+" .chaty-i-trigger .chaty-channel button {width: "+J+"px; height: "+J+"px; margin: 0; padding:0; outline: none; border-radius: 50%;}",c+="#chaty-widget-"+a.id+" .chaty-i-trigger .chaty-channel .chaty-svg {width: "+J+"px; height: "+J+"px; }",c+="#chaty-widget-"+a.id+" .chaty-i-trigger .chaty-channel .chaty-svg img {width: "+J+"px; height: "+J+"px; }",c+="#chaty-widget-"+a.id+" .chaty-i-trigger .chaty-channel span.chaty-icon {width: "+J+"px; height: "+J+"px; }",c+="#chaty-widget-"+a.id+" .chaty-i-trigger .chaty-channel a {width: "+J+"px; height: "+J+"px; }",c+="#chaty-widget-"+a.id+" .chaty-i-trigger .chaty-channel .chaty-svg .chaty-custom-channel-icon {width: "+J+"px; height: "+J+"px; line-height: "+J+"px; display: block; font-size:"+parseInt(J/2)+"px; }",c+="#chaty-widget-"+a.id+" .chaty-i-trigger .ch-pending-msg {background-color: "+a.settings.pending_mesg_count_bgcolor+"; color: "+a.settings.pending_mesg_count_color+"; }",c+="#chaty-widget-"+a.id+" .chaty-i-trigger .chaty-channel .chaty-svg .widget-fa-icon {line-height: "+J+"px; font-size:"+parseInt(J/2)+"px; }","vertical"==a.settings.icon_view){c+="#chaty-widget-"+a.id+" .chaty-channel-list {height: "+g*(J+8)+"px; }",c+="#chaty-widget-"+a.id+" .chaty-channel-list {width: "+(J+8)+"px; }";for(var $=0;$<=g;$++)c+="#chaty-widget-"+a.id+" .chaty-open .chaty-channel-list .chaty-channel:nth-child("+($+1)+") {-webkit-transform: translateY(-"+(J+8)*(g-$-Y)+"px); transform: translateY(-"+(J+8)*(g-$-Y)+"px);}",c+="#chaty-widget-"+a.id+" .chaty-open.above-chaty.has-chatway .chaty-channel-list .chaty-channel:nth-child("+($+1)+") {-webkit-transform: translateY(-"+(J+8)*(g-$-Y+1)+"px); transform: translateY(-"+(J+8)*(g-$-Y+1)+"px);}";if(v&&"inside-chaty"==_){let t=0,e=1;for(let n=0;n0&&(c+=".chaty-outer-forms.chaty-form-"+a.id+" .chaty-agent-body {max-height: calc(100vh - "+at+"px); overflow-y: auto; } "),c+="#chaty-form-"+a.id+"-chaty-chat-view .chaty-view-header {background-color: "+a.settings.cta_head_bg_color+";}",c+="#chaty-form-"+a.id+"-chaty-chat-view .chaty-view-header {color: "+a.settings.cta_head_text_color+";}",c+="#chaty-form-"+a.id+"-chaty-chat-view .chaty-view-header svg {fill : "+a.settings.cta_head_text_color+";}";var ct=et+82+J;ct>0&&(c+=".chaty-outer-forms.chaty-contact-form-box.chaty-form-"+a.id+" .chaty-contact-inputs {max-height: calc(100vh - "+ct+"px); overflow-y: auto; } "),25==K&&25==tt||(t(".chaty-outer-forms.chaty-form-"+a.id).addClass("custom-cht-pos"),t("#chaty-widget-"+a.id).addClass("has-custom-pos"));var nt=parseInt(t("#chaty-form-"+a.id+"-Whatsapp .chaty-whatsapp-header").outerHeight())+parseInt(t("#chaty-form-"+a.id+"-Whatsapp .chaty-whatsapp-footer").outerHeight())+parseInt(J)+parseInt(K)+20;if(c+="#chaty-form-"+a.id+"-Whatsapp .chaty-whatsapp-body { max-height: calc(100vh - "+nt+"px); overflow-y: auto; }",G(a.id,"v-widget")&&(P(a.triggers.exit_intent)||P(a.triggers.has_time_delay)||P(a.triggers.has_display_after_page_scroll)>0)?(P(a.triggers.has_time_delay)&&0==parseInt(a.triggers.time_delay)?(j(a.id),t("#chaty-widget-"+a.id).addClass("active")):P(a.triggers.has_time_delay)&&parseInt(a.triggers.time_delay)>0&&(l=!0,parseInt(a.triggers.time_delay)>d&&(d=a.triggers.time_delay),t("#chaty-widget-"+a.id).addClass("on-chaty-delay"),t("#chaty-widget-"+a.id).addClass("delay-time-"+parseInt(a.triggers.time_delay)),t("#chaty-widget-"+a.id).attr("data-time",parseInt(a.triggers.time_delay))),P(a.triggers.has_display_after_page_scroll)&&0==parseInt(a.triggers.display_after_page_scroll)?(j(a.id),t("#chaty-widget-"+a.id).addClass("active")):P(a.triggers.has_display_after_page_scroll)&&parseInt(a.triggers.display_after_page_scroll)>0&&(r=!0,t("#chaty-widget-"+a.id).addClass("on-chaty-scroll"),t("#chaty-widget-"+a.id).addClass("page-scroll-"+parseInt(a.triggers.display_after_page_scroll)),t("#chaty-widget-"+a.id).attr("data-scroll",parseInt(a.triggers.display_after_page_scroll))),P(a.triggers.exit_intent)&&(y=!0,t("#chaty-widget-"+a.id).addClass("on-chaty-exit-intent"))):(j(a.id),t("#chaty-widget-"+a.id).addClass("active")),!L(a.settings.font_family)&&"none"!=a.settings.font_family){var it=a.settings.font_family;-1!=t.inArray(it,o)?"System Stack"==it&&(it="-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"):(t("head").append(''),t("head").append('')),c+="#chaty-widget-"+a.id+", #chaty-widget-"+a.id+" .chaty-tooltip:after {font-family: "+it+"}"}}y&&(s?function(){if(window.history&&window.history.pushState&&y){function e(){y&&""!==location.hash.split("#!/")[1]&&""===window.location.hash&&E()}var a=100;window.history.state&&window.history.state.page&&(a=window.history.state.page),window.history.pushState({page:a+1},""),window.history.pushState({page:a+2},""),window.onpopstate=function(){e()},window.history.onpopstate=function(){e()},window.addEventListener("popstate",(function(){e()})),document.addEventListener("backbutton",(function(){e()})),window.addEventListener("backbutton",(function(){e()})),t(window).on("popstate",(function(){e()}))}}():t(document).mouseleave((function(t){function e(t,e,a){t.addEventListener?(t.addEventListener(e,a,!1),E()):t.attachEvent&&t.attachEvent("on"+e,a)}e(document,"mouseout",(function(t){null==t.toElement&&null==t.relatedTarget&&E()}))}))),""!=c&&(t("#custom-chaty-css").length||t("head").append(""),t("#custom-chaty-css").append(c)),""!=h&&(t("#custom-advance-chaty-css").length||t("head").append(""),t("#custom-advance-chaty-css").append(h)),n.length,t(".chaty-sms-channel").length&&t(".chaty-sms-channel").each((function(){var e=t(this).attr("href");e=(e=e.replace(/{title}/g,C())).replace(/{url}/g,window.location.href),t(this).attr("href",e)})),t(document).on("click","#chaty-widget-"+a.id+" .chaty-i-trigger .chaty-channel",(function(){t(this).closest(".chaty-widget").hasClass("has-single")?t(this).closest(".chaty").hasClass("form-open")&&(P(a.settings.bg_blur_effect)?t("body").addClass("add-bg-blur-effect"):t("body").removeClass("add-bg-blur-effect")):t(this).closest(".chaty-widget").hasClass("chaty-open")?t("body").removeClass("add-bg-blur-effect"):t(this).closest(".chaty-widget").hasClass("chaty-no-close-button")||P(a.settings.bg_blur_effect)&&t("body").addClass("add-bg-blur-effect")}))})),t("#custom-advance-chaty-css").length||t("head").append(""),t("#custom-advance-chaty-css").append(u),(t(".v3_site_key").length&&!L(t(".v3_site_key").val())||t(".v2_site_key").length&&!L(t(".v2_site_key").val()))&&function(){if(jQuery(".v2_site_key").length&&""!=jQuery(".v2_site_key").val()){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src="https://www.google.com/recaptcha/api.js?onload=onloadChatyCallback&render=explicit&hl=en",(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(t)}jQuery(".v3_site_key").length&&""!=jQuery(".v3_site_key").val()&&jQuery(".v3_site_key").length&&""!=jQuery(".v3_site_key").val()&&jQuery(".front-google-captcha").length&&jQuery(".front-google-captcha:not(.loaded)").each((function(){jQuery(this).addClass("loaded");var t=jQuery(".v3_site_key").val(),e=document.createElement("script");e.type="text/javascript",e.async=!0,e.src="https://www.google.com/recaptcha/api.js?onload=onloadCallbackChatyV3&render="+t,(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(e),e.loadEventEnd=function(){}}))}()),t(".chaty-tooltip").each((function(){""==t(this).data("hover")&&t(this).removeClass("left").removeClass("right").removeClass("top").removeClass("chaty-tooltip")})),function(){t(".chaty.auto-hide-chaty").length&&(c=setInterval((function(){var e=++w;if(t(".chaty.auto-hide-chaty.hide-after-"+w).length){var a=t(".chaty.auto-hide-chaty.hide-after-"+e).data("id");t(".chaty-form-"+a).removeClass("active"),t(".chaty.auto-hide-chaty.hide-after-"+e).removeClass("active"),t("#chaty-widget-"+a).removeClass("auto-hide-chaty"),t("body").removeClass("add-bg-blur-effect")}0==t(".chaty.auto-hide-chaty").length&&clearInterval(c)}),1e3));l&&(a=setInterval((function(){(p++,t(".chaty.delay-time-"+p).length)&&A(t(".chaty.delay-time-"+p).data("id"))}),1e3));if(r){t(window).on("scroll",(function(){if(r){var e=t(document).height()-t(window).height(),a=t(window).scrollTop();if(0!=e){var c=parseInt(a/e*100);if(f<=c){var n=f;f=c;for(var i=n;i<=c;i++)-1==t.inArray(i,g)&&t(".chaty.on-chaty-scroll.page-scroll-"+i).length&&t(".chaty.on-chaty-scroll.page-scroll-"+i).each((function(){var e=t(this).data("id");t(this).removeClass("on-chaty-scroll"),A(e)}));f=c}}}}));window.innerWidth,document.documentElement.clientWidth}}()}function C(){return t("title").length?t("title").text():""}function x(t){return(new DOMParser).parseFromString(t,"text/html").documentElement.textContent}function k(t){if(P(t.is_agent)){if(t.agent_data.length&&(!s&&P(t.is_agent_desktop)||s&&P(t.is_agent_mobile)))return!0}else if((!s&&P(t.is_desktop)||s&&P(t.is_mobile))&&(""!=t.value||"Contact_Us"==t.channel||"Chatway"==t.channel))return!0;return!1}function j(a){if(t("#chaty-widget-"+a+" .chaty-channel.chaty-default-open").length){var c=t("#chaty-widget-"+a+" .chaty-channel.chaty-default-open a.chaty-whatsapp-btn-form").data("form");if(!L(c)){var i=G(a,"c-"+t("#chaty-widget-"+a+" .chaty-channel.chaty-default-open").data("channel"));if(i&&(t("#"+c).addClass("is-active"),t("#"+c).length)){var o=t("#chaty-widget-"+a+" .chaty-channel.chaty-default-open a.chaty-whatsapp-btn-form").html()+""+chaty_settings.lang.hide_whatsapp_form+"";if(v(a),t("#chaty-widget-"+a).find(".ch-pending-msg").remove(),t("#chaty-widget-"+a+" .chaty-widget").removeClass("chaty-open"),t("#chaty-widget-"+a).addClass("form-open"),t("#"+c).addClass("active"),t("#chaty-widget-"+a+" .chaty-widget:not(.chaty-no-close-button)").hasClass("has-bg-blur-effect")&&t("body").addClass("add-bg-blur-effect"),setTimeout((function(){t(".chaty-whatsapp-btn-form.active .chaty-whatsapp-input").focus()}),100),t("#chaty-widget-"+a+" .open-chaty-channel").html(o),t("#chaty-widget-"+a).addClass("active"),t("#chaty-widget-"+a).addClass("active"),t("#chaty-widget-"+a).hasClass("auto-hide-chaty"))(y=parseInt(t("#chaty-widget-"+a).data("time")))>0&&(y+=w,t("#chaty-widget-"+a).addClass("hide-after-"+y));if("on"==chaty_settings.data_analytics_settings){var l=[],d=t("#chaty-widget-"+a+" .chaty-channel.chaty-default-open").data("channel");if(G(a,"v-"+d)&&void 0!==d&&(O(a,"v-"+d),l.push(d)),!h&&l.length){var r=t("#chaty-widget-"+a).data("nonce");t.ajax({url:chaty_settings.ajax_url,data:{widgetId:a,channels:l,userId:a,isMobile:s,widgetNonce:r,action:"update_chaty_channel_views"},type:"post",dataType:"json",success:function(t){},error:function(t,e,a){}})}}return}}}var y;(t("#chaty-widget-"+a).addClass("active"),t("#chaty-widget-"+a).hasClass("auto-hide-chaty"))&&((y=parseInt(t("#chaty-widget-"+a).data("time")))>0&&(y+=w,t("#chaty-widget-"+a).addClass("hide-after-"+y)));V("hide-bg-blur-effect")&&t("body").removeClass("add-bg-blur-effect");var g=G(a,"v-widget");if(g){O(a,"v-widget");t("#chaty-widget-"+a).data("user"),l=[];var p=0,f=0,u=t("#chaty-widget-"+a).data("key");if(typeof n[u]!=e){var m=V("activechatyWidgets");null!=m?(m=m.split(","),-1==t.inArray(a,m)&&(m.push(a),R("activechatyWidgets",m=m.join(","),1))):R("activechatyWidgets",m=a,1)}if(t("#chaty-widget-"+a+" .chaty-widget").hasClass("has-single"))p=1,d=t("#chaty-widget-"+a+" .chaty-channel").data("channel"),G(a,"v-"+d)&&void 0!==d&&(O(a,"v-"+d),l.push(d));else t("#chaty-widget-"+a+" .chaty-widget").hasClass("chaty-open")&&(f=1,t("#chaty-widget-"+a).hasClass("chaty-has-chat-view")?t(".chaty-chat-view.chaty-chat-view-"+a+" .chaty-view-channels").find(".chaty-channel").each((function(){chatyChannel=t(this).data("channel"),(i=G(a,"v-"+chatyChannel))&&"undefined"!=typeof chatyChannel&&(O(a,"v-"+chatyChannel),l.push(chatyChannel))})):t("#chaty-widget-"+a+" .chaty-channel-list .chaty-channel").each((function(){d=t(this).data("channel"),G(a,"v-"+d)&&void 0!==d&&(O(a,"v-"+d),l.push(d))})));if(g&&!h){r=t("#chaty-widget-"+a).data("nonce");h||t.ajax({url:chaty_settings.ajax_url,data:{widgetId:a,channels:l,userId:a,isMobile:s,isOpen:f,isSingle:p,widgetNonce:r,action:"update_chaty_widget_views"},type:"post",dataType:"json",success:function(t){},error:function(t,e,a){}})}}}function I(e,a,c){var n="";if(!P(e.is_agent)){U(e.channel_type)&&(e.channel_type=e.channel);o=T(e,D(e),c,a);if("Contact_Us"==e.channel_type)n+=" has-chaty-box chaty-contact-form";else if("Whatsapp"==e.channel_type){if(P(e.is_default_open))G(a,"c-"+e.channel_type)&&(n+=" chaty-default-open")}return"
"+o+"
"}if(e.agent_data.length){var i=0;if(t.each(e.agent_data,(function(t,e){""!=e.value&&(i++,e)})),i>0){var o,h=B(a);return null==h&&(h=-1),function(e,a){var c="",n=B(a);null==n&&(n=-1);c+="",u+=".chaty-agent-header.agent-info-"+a+"-"+e.channel+" { background-color: "+e.header_bg_color+"; color: "+e.header_text_color+" } ",u+=".agent-info-"+a+"-"+e.channel+" .chaty-close-agent-list svg { fill: "+e.header_text_color+" } ",t("body").append(c)}(e,a),o=T(e,D(e),c,a),("Instagram"!=e.channel_type&&"Instagram_DM"!=e.channel_type||"#ffffff"!=e.icon_color&&"#fff"!=e.icon_color)&&(u+=".chaty-agent-"+a+"-"+e.channel+" .color-element {fill: "+e.icon_color+"; color: "+e.icon_color+";}"),u+=".chaty-agent-"+a+"-"+e.channel+" .chaty-custom-icon { background-color: "+e.icon_color+";}",u+=".chaty-agent-"+a+"-"+e.channel+" .chaty-svg-img { background-color: "+e.icon_color+";}","
"+o+"
"}}}function M(t){return t=(t=(t=(t=S(t,"+")).replace(/ /g,"")).replace(/-/g,"")).replace(/_/g,"")}function S(e,a){for(e=t.trim(e);e.charAt(0)==a;)e=e.substring(1);for(;e.charAt(e.length-1)==a;)e=e.substring(0,e.length-1);return e}function T(e,a,c,n){var i="";if(P(e.is_agent))e.url="javascript:;",e.target="";else if("Whatsapp"==e.channel_type)if(P(e.has_welcome_message))e.url="javascript:;",e.target="",i+=" has-chaty-box chaty-whatsapp-btn-form",function(e,a){const c=new Date;var n=c.getMinutes()<10?"0"+c.getMinutes():c.getMinutes();const i=(c.getHours()<10?"0"+c.getHours():c.getHours())+":"+n;var o="",h=B(a);null==h&&(h=-1);var l="https://web.whatsapp.com/send",d="";s?l="https://wa.me/"+e.value:(l=P(e.is_use_web_version)?"https://web.whatsapp.com/send":"https://wa.me/"+e.value,d="_blank");o+="