1!function (t) { 2 var e = {}; 3 4 function i(n) { 5 if (e[n]) return e[n].exports; 6 var o = e[n] = {i: n, l: !1, exports: {}}; 7 return t[n].call(o.exports, o, o.exports, i), o.l = !0, o.exports 8 } 9 10 i.m = t, i.c = e, i.d = function (t, e, n) { 11 i.o(t, e) || Object.defineProperty(t, e, {configurable: !1, enumerable: !0, get: n}) 12 }, i.n = function (t) { 13 var e = t && t.__esModule ? function () { 14 return t.default 15 } : function () { 16 return t 17 }; 18 return i.d(e, "a", e), e 19 }, i.o = function (t, e) { 20 return Object.prototype.hasOwnProperty.call(t, e) 21 }, i.p = "/", i(i.s = 10) 22}({ 23 10: function (t, e, i) { 24 i(11), t.exports = i(12) 25 }, 11: function (t, e) { 26 !function (t) { 27 var animationTimer; 28 var isWidgetEnabled = 0; 29 var e = chaty_settings; 30 var animationClass = ".i-trigger .chaty-widget-i .svg, .i-trigger .chaty-widget-i .widget-img, .i-trigger .chaty-widget-i .facustom-icon"; 31 32 function i(t) { 33 for (var e = t + "=", i = document.cookie.split(";"), n = 0; n < i.length; n++) { 34 for (var o = i[n]; " " == o.charAt(0);) o = o.substring(1); 35 if (0 == o.indexOf(e)) return o.substring(e.length, o.length) 36 } 37 return "" 38 } 39 40 var n = new Date; 41 42 function o() { 43 44 } 45 46 "" != i("display_cta"), token = "", jQuery(document).ready(function () { 47 "true" == e.object_settings.active && (function (e, n) { 48 var o = e.object_settings.device, a = ""; 49 if ("right" == e.object_settings.position) a = "left: auto;bottom: 25px; right: 25px;"; else if ("left" == e.object_settings.position) a = "right: auto; bottom: 25px; left: 25px;"; else if ("custom" == e.object_settings.position) { 50 var c = e.object_settings.pos_side, s = e.object_settings.bot, r = e.object_settings.side; 51 a = "right" === c ? "left: auto; bottom: " + s + "px; right: " + r + "px" : "left: " + r + "px; bottom: " + s + "px; right: auto" 52 } 53 var g = e.object_settings.cta, d = "", l = e.object_settings.social; 54 var isChatyInMobile = false; //initiate as false 55 if(/(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) 56 || /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 )|
56sy(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))) { 57 isChatyInMobile = true; 58 } 59 if(isChatyInMobile) { 60 jQuery("body").addClass("chaty-in-mobile"); 61 } else { 62 jQuery("body").addClass("chaty-in-desktop"); 63 } 64 if (Object.keys(l).length >= 1 && (d = '<div class="chaty-widget hide-widget ' + n + " " + o + ' " style="display:block; ' + a + '" dir="ltr">', d += '<div class="chaty-widget-is" id="transition_disabled">'), d += function (e) { 65 var i = "", n = 0; 66 return t.each(e.object_settings.social, function (t, o) { 67 if (e.object_settings.isPRO && jQuery("body").addClass("has-pro-version"), !e.object_settings.isPRO && "3" == ++n) return !1; 68 extra_class = "", "1" != e.object_settings.analytics && 1 != e.object_settings.analytics || (extra_class += " update-analytics "); 69 var desktopClass = (e.object_settings.social[t].is_desktop == 1)?"is-in-desktop":""; 70 var mobileClass = (e.object_settings.social[t].is_mobile == 1)?"is-in-mobile":""; 71 var targetAction = (e.object_settings.is_mobile == 1)?e.object_settings.social[t].mobile_target:e.object_settings.social[t].desktop_target; 72 if(jQuery("body").hasClass("chaty-in-mobile")) { 73 e.object_settings.social[t].href_url = e.object_settings.social[t].mobile_url; 74 } 75 76 if(e.object_settings.social[t].social_channel == "viber") { 77 if(jQuery("body").hasClass("chaty-in-mobile")) { 78 var viberVal = e.object_settings.social[t].href_url; 79 viberVal = viberVal.replace("+",""); 80 if (navigator.userAgent.match(/(iPod|iPhone|iPad)/)) { 81 viberVal = "+"+viberVal; 82 } 83 e.object_settings.social[t].href_url = viberVal; 84 } 85 e.object_settings.social[t].href_url = "viber://chat?number="+e.object_settings.social[t].href_url; 86 } 87 console.log(e.object_settings.social[t].href_url); 88 socialString = '<div class="chaty-widget-i chaty-main-widget ' + desktopClass + " " + mobileClass + " " + extra_class + " " + e.object_settings.social[t].social_channel + '" data-title="' + e.object_settings.social[t].val + '" id="chaty-channel-' + e.object_settings.social[t].social_channel + '" data-channel="' + e.object_settings.social[t].social_channel + '" data-code="' + e.object_settings.social[t].qr_code_image + '">', bgColor = "", "" != e.object_settings.social[t].bg_color && (socialString += "<style>#chaty-channel-" + e.object_settings.social[t].social_channel + " .color-element {fill: " + e.object_settings.social[t].bg_color + "}</style>", bgColor = "style='background-color: " + e.object_settings.social[t].bg_color + ";'"), socialString += "<a class='set-url-target' rel='noopener' data-mobile-target='"+e.object_settings.social[t].mobile_target+"' data-desktop-target='"+e.object_settings.social[t].desktop_target+"' target='" + targetAction + "' href='" + e.object_settings.social[t].href_url + "' >", "" != e.object_settings.social[t].img_url ? socialString += "<span " + bgColor + " class='chaty-social-img'><img src='" + e.object_settings.social[t].img_url + "' alt='" + e.object_settings.social[t].title + "' /></span>" : socialString += e.object_settings.social[t].default_icon, socialString += "</a>", socialString += "<div class='chaty-widget-i-title'><p>" + e.object_settings.social[t].title + "</p></div>", socialString += "</div>"; 89 i += socialString; 90 }), i 91 }(e), l = e.object_settings.social, Object.keys(l).length >= 1) { 92 d += "</div>", d += '<div class="i-trigger">'; 93 var h = i("display_cta"); 94 var CU = current_url = window.location.origin; 95 CU = CU.replace("https://",""); 96 CU = CU.replace("http://",""); 97 if ("" != g && "none" != h) var p = "true"; else p = "no-tooltip"; 98 d += '<div class="chaty-widget-i chaty-close-sett
98ings i-trigger-open ' + p + ' ">', d += function (t) { 99 switch (t.object_settings.widget_type) { 100 case"chat-image": 101 if (t.object_settings.widget_img.length > 1) return '<div class="widget-img" style="background-color:' + t.object_settings.color + '"><img src="' + t.object_settings.widget_img + '"/></div>'; 102 case"chat-smile": 103 return '<svg version="1.1" id="smile" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496.8 507.1 54 54" style="enable-background:new -496.8 507.1 54 54;" xml:space="preserve"><style type="text/css">.st1{fill:#FFFFFF;} .st2{fill:none;stroke:#808080;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;}</style><g><circle cx="-469.8" cy="534.1" r="27" fill="' + t.object_settings.color + '"/></g><path class="st1" d="M-459.5,523.5H-482c-2.1,0-3.7,1.7-3.7,3.7v13.1c0,2.1,1.7,3.7,3.7,3.7h19.3l5.4,5.4c0.2,0.2,0.4,0.2,0.7,0.2c0.2,0,0.2,0,0.4,0c0.4-0.2,0.6-0.6,0.6-0.9v-21.5C-455.8,525.2-457.5,523.5-459.5,523.5z"/><path class="st2" d="M-476.5,537.3c2.5,1.1,8.5,2.1,13-2.7"/><path class="st2" d="M-460.8,534.5c-0.1-1.2-0.8-3.4-3.3-2.8"/></svg>'; 104 case"chat-bubble": 105 return '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496.9 507.1 54 54" style="enable-background:new -496.9 507.1 54 54;" xml:space="preserve"><style type="text/css">.st1{fill:#FFFFFF;}</style><g><circle cx="-469.9" cy="534.1" r="27" fill="' + t.object_settings.color + '"/></g><path class="st1" d="M-472.6,522.1h5.3c3,0,6,1.2,8.1,3.4c2.1,2.1,3.4,5.1,3.4,8.1c0,6-4.6,11-10.6,11.5v4.4c0,0.4-0.2,0.7-0.5,0.9 c-0.2,0-0.2,0-0.4,0c-0.2,0-0.5-0.2-0.7-0.4l-4.6-5c-3,0-6-1.2-8.1-3.4s-3.4-5.1-3.4-8.1C-484.1,527.2-478.9,522.1-472.6,522.1z M-462.9,535.3c1.1,0,1.8-0.7,1.8-1.8c0-1.1-0.7-1.8-1.8-1.8c-1.1,0-1.8,0.7-1.8,1.8C-464.6,534.6-463.9,535.3-462.9,535.3z M-469.9,535.3c1.1,0,1.8-0.7,1.8-1.8c0-1.1-0.7-1.8-1.8-1.8c-1.1,0-1.8,0.7-1.8,1.8C-471.7,534.6-471,535.3-469.9,535.3z M-477,535.3c1.1,0,1.8-0.7,1.8-1.8c0-1.1-0.7-1.8-1.8-1.8c-1.1,0-1.8,0.7-1.8,1.8C-478.8,534.6-478.1,535.3-477,535.3z"/></svg>'; 106 case"chat-db": 107 return '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496 507.1 54 54" style="enable-background:new -496 507.1 54 54;" xml:space="preserve"><style type="text/css">.st1{fill:#FFFFFF;}</style><g><circle cx="-469" cy="534.1" r="27" fill="' + t.object_settings.color + '"/></g><path class="st1" d="M-464.6,527.7h-15.6c-1.9,0-3.5,1.6-3.5,3.5v10.4c0,1.9,1.6,3.5,3.5,3.5h12.6l5,5c0.2,0.2,0.3,0.2,0.7,0.2c0.2,0,0.2,0,0.3,0c0.3-0.2,0.5-0.5,0.5-0.9v-18.2C-461.1,529.3-462.7,527.7-464.6,527.7z"/><path class="st1" d="M-459.4,522.5H-475c-1.9,0-3.5,1.6-3.5,3.5h13.9c2.9,0,5.2,2.3,5.2,5.2v11.6l1.9,1.9c0.2,0.2,0.3,0.2,0.7,0.2c0.2,0,0.2,0,0.3,0c0.3-0.2,0.5-0.5,0.5-0.9v-18C-455.9,524.1-457.5,522.5-459.4,522.5z"/></svg>'; 108 default: 109 return '<svg version="1.1" id="ch" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496 507.7 54 54" style="enable-background:new -496 507.7 54 54;" xml:space="preserve"><style type="text/css">.st1 {fill: #FFFFFF;}.st0{fill: #808080;}</style><g><circle cx="-469" cy="534.7" r="27" fill="' + t.object_settings.color + '"/></g><path class="st1" d="M-459.9,523.7h-20.3c-1.9,0-3.4,1.5-3.4,3.4v15.3c0,1.9,1.5,3.4,3.4,3.4h11.4l5.9,4.9c0.2,0.2,0.3,0.2,0.5,0.2 h0.3c0.3-0.2,0.5-0.5,0.5-0.8v-4.2h1.7c1.9,0,3.4-1.5,3.4-3.4v-15.3C-456.5,525.2-458,523.7-459.9,523.7z"/><path class="st0" d="M-477.7,530.5h11.9c0.5,0,0.8,0.4,0.8,0.8l0,0c0,0.5-0.4,0.8-0.8,0.8h-11.9c-0.5,0-0.8-0.4-0.8-0.8l0,0C-478.6,530.8-478.2,530.5-477.7,530.5z"/><path class="st0" d="M-477.7,533.5h7.9c0.5,0,0.8,0.4,0.8,0.8l0,0c0,0.5-0.4,0.8-0.8,0.8h-7.9c-0.5,0-0.8-0.4-0.8-0.8l0,0C-478.6,533.9-478.2,533.5-477.7,533.5z"/></svg>' 110 } 111 }
111(e), h = i("display_cta"), "" != g && "none" != h && (d += ' <div class="chaty-widget-i-title true"> ', d += g, d += "</div>"), d += "</div>", d += '<div class="chaty-widget-i chaty-close-settings i-trigger-close" data-title="' + e.object_settings.close_text + '" style="background-color:' + e.object_settings.color + '">', "" == e.object_settings.close_img ? (d += '<svg viewBox="0 0 54 54" fill="none" xmlns="http://www.w3.org/2000/svg">', d += '<ellipse cx="26" cy="26" rx="26" ry="26" fill="' + e.object_settings.color + '"/>', d += '<rect width="27.1433" height="3.89857" rx="1.94928" transform="translate(18.35 15.6599) scale(0.998038 1.00196) rotate(45)" fill="white"/>', d += '<rect width="27.1433" height="3.89857" rx="1.94928" transform="translate(37.5056 18.422) scale(0.998038 1.00196) rotate(135)" fill="white"/>', d += "</svg>") : d += "<span class='chaty-social-img'><img alt='" + e.object_settings.close_text + "' src='" + e.object_settings.close_img + "' /></span>", d += '<div class="chaty-widget-i-title">', d += e.object_settings.close_text, d += "</div>", d += "</div>", d += " </div>", 0 === n.length && !e.object_settings.isPRO && (d += '<div class="get" style="position: absolute;width: 100%;text-align: center;"> <a href="https://premio.io/downloads/chaty/?utm_source=wpplugin&domain='+CU+'" target="_blank" style=" font-size: 11px; top: -10px; font-family: Lato, Helvetica, Arial, sans-serif; position: relative; color: #8c8585; ">Get Chaty</a></div>'), d += "</div>" 112 } else ; 113 t("body").append(d) 114 }(e, token)), function () { 115 var n = t(".chaty-widget"), a = e.object_settings.widget_size ? e.object_settings.widget_size : 54, 116 c = +e.object_settings.widget_size + 8; 117 118 function s() { 119 var t = n.position().top, e = n.find(".chaty-widget-is .chaty-widget-i").length; 120 if(jQuery("body").hasClass("chaty-in-desktop")) { 121 e = n.find(".chaty-widget-is .chaty-widget-i.is-in-desktop").length; 122 } else { 123 e = n.find(".chaty-widget-is .chaty-widget-i.is-in-mobile").length; 124 } 125 if (e * c > (jQuery(window).height() - (chaty_settings.object_settings.widget_size+8))) { 126 var i = Math.round(Math.sqrt(e)), o = Math.ceil(Math.sqrt(e)); 127 n.find(".chaty-widget-is").css({ 128 height: o * c, 129 width: i * c 130 }), g(o), n.find("span").css({ 131 height: o * c, 132 width: i * c 133 }), g(o), n.find("img").css({height: o * c, width: i * c}), g(o) 134 } else g() 135 } 136 137 function r() { 138 "left" === e.object_settings.position && n.addClass("chaty-widget-is-right"), "custom" === e.object_settings.position && "left" === e.object_settings.pos_side && n.addClass("chaty-widget-is-right") 139 } 140 function g(t) { 141 var e; 142 if(jQuery("body").hasClass("chaty-in-desktop")) { 143 e = n.find(".chaty-widget-is .chaty-widget-i.is-in-desktop").length; 144 } else { 145 e = n.find(".chaty-widget-is .chaty-widget-i.is-in-mobile").length; 146 } 147 n.find(".chaty-widget-i").css({ 148 height: a + "px", 149 width: a + "px" 150 }), n.find("img").css({ 151 height: a + "px", 152 width: a + "px" 153 }), n.find("span").css({ 154 height: a + "px", 155 width: a + "px" 156 }), n.find(".chaty-widget-is").css({top: "-" + 100 * e + "%"}); 157 n.find(".chaty-widget-is").height(e*(parseInt(a)+8)); 158 n.find(".chaty-widget-is").width(parseInt(a)+8); 159 } 160 161 r(), s(), jQuery(window).resize(function () { 162 s(), 1 == Object.keys(e.object_settings.social).length && (jQuery(".chaty-widget").addClass("chaty-widget-show"), jQuery(".chaty-widget-is").css("top", "auto")) 163 }), t(".chaty-widget-i.facebook").mouseenter(function () { 164 t(".facebook_two_mess").css({opacity: "1", "z-index": "1"}), t(this).addClass("before") 165 }), t(".chaty-widget-i.facebook").mouseleave(function () { 166 t(".facebook_two_mess").css({opacity: "0", "z-index": "1"}), t(this).removeClass("before") 167 }), t(".chaty-widget-i.facebook").on("click", function () { 168 t(this).addClass("active"), t(".facebook_two_mess").hide(), jQuery(".chaty-widget .get a").hide(), t(this).children(".face_title").css({ 169 opacity: "1", 170 "z-index": "2" 171 }).show(), t(".chaty-widget").hasClass("one_widget") ? t(".chaty-widget").hasClass("chaty-widget-is-right") ? t(".face_title").css({ 172 top: "calc(100% - 447px)", 173 left: "20px" 174 }) : t(".face_title").css({ 175 top: "calc(100% - 447px)", 176 left: "auto", 177 right: "20px" 178 }) : (t(".facebook_two_mess").css({ 179 opacity: "0", 180 "z-index": "10001" 181 }), t(".ico_d").hide(), t(".chaty-widget .chaty-widget-i").css({"box-shadow": "0px 3px 6px rgba(0,0,0,0)"}), t(".chaty-widget").hasClass("one_widget") || t(".i-trigger").hide()) 182 }), t(".i-trigger-close").on("click", function (e) { 183 e.preventDefault(), t(".chaty-widget-i.facebook").hasClass("active") || (n.removeClass("chaty-widget-show"), n.addClass("none-widget-show")) 184 }), t("body").on("click", ".close_facebook", function () { 185 t(".facebook_two_mess").show(), jQuery(".chaty-widget .get a").show(), t(".chaty-widget-i.facebook").removeClass("active"), t(this).parent().parent().css({opacity: "1"}).hide(), t(".i-trigger").show(), t(".chaty-widget-is .chaty-widget-i svg").show() 186 }), t(".i-trigger-close").on("click", function (e) { 187 t(".i-trigger-open").addClass("active_clos"), e.preventDefault(), t(".chaty-widget-i.facebook").hasClass("active") || (n.removeClass("chaty-widget-show"), n.addClass("none-widget-show")) 188 }), t("body").on("click", ".update-analytics", function (t) { 189 if (channelName = jQuery(this).attr("data-channel"), null != channelName && "" != channelName) if (window.hasOwnProperty("gtag")) gtag("event", "chaty_" + channelName, { 190 eventCategory: "chaty_" + channelName, 191 event_action: "chaty_" + channelName 192 }); else if (window.hasOwnProperty("ga")) { 193 var e = window.ga.getAll()[0]; 194 e && e.send("event", "click", { 195 eventCategory: "chaty_" + channelName, 196 eventAction: "chaty_" + channelName 197 }) 198 } 199 }), t("body").on("click", ".wechat", function () { 200 var t = jQuery(".chaty-widget .chaty-widget-i.wechat").attr("data-code"); 201 null != t && "" != t && (jQuery("#wechat-qr-code").length || (htmlString = "<div id='wechat-qr-code' class='wechat-qr-code'>", htmlString += '<div class="wechat-box-head">WeChat<svg xmlns="http://www.w3.org/2000/svg" class="close_facebook" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" width="612px" height="612px" viewBox="0 0 612 612" style="fill: #fff; float: right; margin-top: 4px;" xml:space="preserve"><path xmlns="http://www.w3.org/2000/svg" d="M268.064,256.75l138.593-138.593c3.124-3.124,3.124-8.189,0-11.313c-3.125-3.124-8.189-3.124-11.314,0L256.75,245.436 L118.157,106.843c-3.124-3.124-8.189-3.124-11.313,0c-3.125,3.124-3.125,8.189,0,11.313L245.436,256.75L106.843,395.343 c-3.125,3.125-3.125,8.189,0,11.314c1.562,1.562,3.609,2.343,5.657,2.343s4.095-0.781,5.657-2.343L256.75,268.064l138.593,138.593 c1.563,1.562,3.609,2.343,5.657,2.343s4.095-0.781,5.657-2.343c3.124-3.125,3.124-8.189,0-11.314L268.064,256.75z"></path></svg></div>', htmlString += "<div class='wechat-box'><img src='" + t + "' alt='QR Code' /><a href='javascript:;'>", htmlString += "</a></div></div>", jQuery("body").append(htmlString)), jQuery("#wechat-qr-code").show()) 202 }); 203 var d = i("display_cta"); 204 if(chaty_settings.object_settings.display_state == "hover") { 205 n.find(".i-trigger-open").mouseenter(function (e) { 206 e.stopPropagation(); 207 removeAnimation(); 208 //t(this).removeClass("active_clos"); 209 o(), t(".chaty-widget-is").removeAttr("id"), t(this).hasClass("active_clos") || t(".chaty-widget-i.facebook").hasClass("active") || n.hasClass("one_widget") || (r(), t(n).hasClass("chaty-widget-show") || (n.addClass("chaty-widget-show"), n.removeClass("none-widget-show"))); 210 //o(); 211 jQuery("body .chaty-widget-i-title.true").remove(); 212 }); 213 } else { 214 n.find(".i-trigger-open").click(function (e) { 215 e.stopPropagation(); 216 removeAnimation(); 217 o(), t(".chaty-widget-is").removeAttr("id"), t(this).hasClass("active_clos") || t(".chaty-widget-i.facebook").hasClass("active") || n.hasClass("one_widget") || (r(), t(n).hasClass("chaty-widget-show") || (n.addClass("chaty-widget-show"), n.removeClass("none-widget-show"))); 218 o(); 219 jQuery("body .chaty-widget-i-title.true").remove(); 220 }); 221 } 222 t(".one_widget").on("click", function () { 223 t(".chaty-widget-i-title").hasClass("face_title") ? (t(".facebook_two_mess").detach(), t(".chaty-widget-i").addClass("bofore_del")) : (t(".chaty-widget-i-title").detach(), t(".chaty-widget-i").addClass("bofore_del")); 224 removeAnimation(); 225 }), n.find(".i-trigger-open").on("click", function () { 226 "none" != d && (t(".chaty-widget").hasClass(".one_widget") || t(".i-trigger-open .chaty-widget-i-title").detach()), t(".i-trigger-open").addClass("no-tooltip"), t(this).hasClass("active_clos") || t(".chaty-widget-i.facebook").hasClass("active") || n.hasClass("one_widget") || (r(), t(n).hasClass("chaty-widget-show") || (n.addClass("chaty-widget-show"), n.removeClass("none-widget-show"))); 227 removeAnimation(); 228 }), n.find(".i-trigger-open").mouseenter(function () { 229 t(this).addClass("no-tooltip"), t(".i-trigger-open").removeClass("active_clos"); 230 s(); 231 }), n.find(".chaty-widget-is").mouseleave(function () { 232 t(".i-trigger-open").removeClass("active_clos"), t(".chaty-widget-i.facebook").hasClass("active") 233 }), 1 === Object.keys(e.object_settings.social).length && n.find(".i-trigger-open").on("touchstart", function (e) { 234 "use strict"; 235 t(this).find(".chaty-widget-i").toggleClass("hover") 236 }), 1 == Object.keys(e.object_settings.social).length && (jQuery(".chaty-widget").addClass("chaty-widget-show"), jQuery(".chaty-widget-is").css("top", "auto"), jQuery(".chaty-widget-is").css("z-index", "10001"), jQuery(".chaty-widget-i.i-trigger-close, .i-trigger.chaty-widget-i").remove(), jQuery(".chaty-widget .get a").css("top", "-10px"), jQuery(".chaty-widget").addClass("one_widget"), jQuery(".chaty-widget-i:first .chaty-widget-i-title:last p").text(e.object_settings.cta), jQuery(document).on("click", ".chaty-widget-i", function () { 237 jQuery(".chaty-widget-i:first .chaty-widget-i-title:last").hide(), jQuery("body").addClass("hide-cht-widget") 238 }), jQuery("body").append("<style>.chaty-widget-is{top:0!important;}</style>")) 239 }(), t(document).ready(function () { 240 1 !== Object.keys(e.object_settings.social).length || !e.object_settings.social.snapchat && !e.object_settings.social.wechat || e.object_settings.cta || (t(".chaty-widget-i-title").detach(), t(".chaty-widget-i").addClass("bofore_del")), t(".chaty-widget-i-title").hasClass("one_go") && (t(".chaty-widget-i-title p").text(t(".chaty-widget-i-title.one_go").html()), "none" == i("display_cta") && (t(".chaty-widget-i-title").hasClass("face_title") ? (t(".facebook_two_mess").detach(), t(".chaty-widget-i").addClass("bofore_del")) : (t(".chaty-widget-i-title").detach(), t(".chaty-widget-i").addClass("bofore_del")))), window.matchMedia("only screen and (max-width: 760px)").matches && t(".i-trigger-open").addClass("active_clos"), jQuery(".chaty-widget-i-title").each(function () { 241 "" == jQuery(this).text() && jQuery(this).remove() 242 }) 243 }), t(document).ready(function () { 244 var activeWidget = 0; 245 if(jQuery("body").hasClass("chaty-in-desktop")) { 246 activeWidget = jQuery(".chaty-widget-is .chaty-widget-i.is-in-desktop").length; 247 } else { 248 activeWidget = jQuery(".chaty-widget-is .chaty-widget-i.is-in-mobile").length; 249 } 250 if(activeWidget == 0) { 251 jQuery(".chaty-widget").addClass("hide-widget").removeClass("desktop_active").removeClass("mobile_active"); 252 } else { 253 if(jQuery("body").hasClass("chaty-in-desktop")) { 254 jQuery(".chaty-widget").removeClass("hide-widget").addClass("desktop_active"); 255 } else { 256 jQuery(".chaty-widget").removeClass("hide-widget").addClass("mobile_active"); 257 } 258 if(activeWidget == 1) {
259 jQuery(".chaty-close-settings").hide(); 260 if(jQuery("body").hasClass("chaty-in-desktop")) { 261 htmlToAdd = jQuery(".chaty-widget-is .chaty-widget-i.is-in-desktop:first").clone(); 262 jQuery(".i-trigger").html(htmlToAdd); 263 } else { 264 htmlToAdd = jQuery(".chaty-widget-is .chaty-widget-i.is-in-mobile:first").clone(); 265 jQuery(".i-trigger").html(htmlToAdd); 266 } 267 jQuery(".i-trigger .chaty-widget-i-title p").text(chaty_settings.object_settings.cta); 268 jQuery(".chaty-widget").addClass("one_widget"); 269 270 jQuery(".chaty-widget.one_widget, .i-trigger, .chaty-widget-i").mouseenter(function () { 271 o(); 272 jQuery(".chaty-widget-i-title").remove(); 273 jQuery(".chaty-widget").addClass("hide-tooltip-arrow"); 274 set_cta_status(); 275 removeAnimation(); 276 }); 277 } else { 278 jQuery(".chaty-widget").removeClass("one_widget"); 279 jQuery(".i-trigger .chaty-main-widget").remove(); 280 jQuery(".chaty-close-settings").show(); 281 jQuery(".chaty-widget-i-title").removeClass("hide-it"); 282 jQuery(".chaty-widget.one_widget, .i-trigger, .chaty-widget-i").mouseenter(function () { 283 o(); 284 set_cta_status(); 285 jQuery(".i-trigger .chaty-widget-i-title").addClass("hide-it"); 286 // jQuery(".chaty-widget").addClass("hide-tooltip-arrow"); 287 removeAnimation(); 288 }); 289 } 290 } 291 292 /* check for display rules */ 293 var displayStatus = 0; 294 if(parseInt(chaty_settings.object_settings.display_conditions) == 1) { 295 var displayRules = chaty_settings.object_settings.display_rules; 296 297 if(displayRules.length > 0) { 298 var localDate = new Date(); 299 localDate.setHours(localDate.getHours() + (chaty_settings.object_settings.gmt)); 300 var utcHours = localDate.getUTCHours(); 301 var utcMin = localDate.getUTCMinutes(); 302 var utcDay = localDate.getUTCDay(); 303 // console.log("utcHours: "+utcHours+" utcMin:"+utcMin+" utcDay:"+utcDay); 304 for(var rule = 0; rule < displayRules.length; rule++) { 305 // console.log("displayRules[rule].days: "+displayRules[rule].days); 306 var hourStatus = 0; 307 var minStatus = 0; 308 var checkForTime = 0; 309 if(displayRules[rule].days == -1) { 310 checkForTime = 1; 311 } else if(displayRules[rule].days >= 0 && displayRules[rule].days <= 6) { 312 if(displayRules[rule].days == utcDay) { 313 checkForTime = 1; 314 } 315 } else if(displayRules[rule].days == 7) { 316 if(utcDay >= 0 && utcDay <= 4) { 317 checkForTime = 1; 318 } 319 } else if(displayRules[rule].days == 8) { 320 if(utcDay >= 1 && utcDay <= 5) { 321 checkForTime = 1; 322 } 323 } else if(displayRules[rule].days == 9) { 324 if(utcDay == 5 || utcDay == 6) { 325 checkForTime = 1; 326 } 327 } 328 // console.log("end_hours: "+displayRules[rule].end_hours); 329 // console.log("end_min: "+displayRules[rule].end_min); 330 if(checkForTime == 1) { 331 if(utcHours > displayRules[rule].start_hours && utcHours < displayRules[rule].end_hours) { 332 hourStatus = 1; 333 } else if(utcHours == displayRules[rule].start_hours && utcHours < displayRules[rule].end_hours) { 334 if(utcMin >= displayRules[rule].start_min) { 335 hourStatus = 1; 336 } 337 } else if(utcHours > displayRules[rule].start_hours && utcHours == displayRules[rule].end_hours) { 338 if(utcMin <= displayRules[rule].end_min) { 339 hourStatus = 1; 340 } 341 } else if(utcHours == displayRules[rule].start_hours && utcHours == displayRules[rule].end_hours) { 342 if(utcMin >= displayRules[rule].start_min && utcMin <= displayRules[rule].end_min) { 343 hourStatus = 1; 344 } 345 } 346 347 if(hourStatus == 1) { 348 if(utcMin >= displayRules[rule].start_min && utcMin <= displayRules[rule].end_min) { 349 minStatus = 1; 350 } 351 } 352 } 353 // console.log("minStatus: "+minStatus); 354 355 if(hourStatus == 1 && checkForTime == 1) { 356 displayStatus = 1; 357 } 358 if(displayStatus == 1) { 359 rule = displayRules.length+1; 360 } 361 } 362 } else { 363 displayStatus = 1; 364 } 365 } else { 366 displayStatus = 1; 367 } 368 369 if(activeWidget == 1) { 370 if(i("display_cta") != "") { 371 jQuery(".chaty-widget-i-title").remove(); 372 jQuery(".chaty-widget").addClass("hide-tooltip-arrow"); 373 setInterval(function(){ 374 set_cta_status();
375 }, 900); 376 } 377 378 jQuery(".chaty-main-widget").addClass("i-trigger-open").addClass("single-button"); 379 380 jQuery(".chaty-widget-show .i-trigger-open svg").css("transform","rotate(0deg)"); 381 } 382 383 jQuery("chaty-main-widget").mouseenter(function(){ 384 set_cta_status(); 385 }); 386 387 // console.log("display_state: "+chaty_settings.object_settings.display_state); 388 // console.log("has_close_button: "+chaty_settings.object_settings.has_close_button); 389 // console.log("exit_intent: "+chaty_settings.object_settings.exit_intent); 390 // console.log("time_trigger: "+chaty_settings.object_settings.time_trigger); 391 // console.log("on_page_scroll: "+chaty_settings.object_settings.on_page_scroll); 392 if(displayStatus == 1) { 393 var widget_status = get_chaty_cookie("cta_widget_status"); 394 if(widget_status == "yes") { 395 jQuery(".chaty-widget").removeClass("hide-widget"); 396 show_chaty_widget(); 397 } else { 398 /* set animation */ 399 if (chaty_settings.object_settings.time_trigger == "no" && chaty_settings.object_settings.exit_intent == "no" && chaty_settings.object_settings.on_page_scroll == "no") { 400 jQuery(".chaty-widget").removeClass("hide-widget"); 401 if(chaty_settings.object_settings.display_state == "open" && chaty_settings.object_settings.has_close_button == "no") { 402 chaty_settings.object_settings.has_close_button = "no"; 403 } else { 404 chaty_settings.object_settings.display_state = "hover"; 405 chaty_settings.object_settings.has_close_button = "yes"; 406 } 407 show_chaty_widget(); 408 } else { 409 jQuery(".chaty-widget").addClass("hide-widget"); 410 if (chaty_settings.object_settings.time_trigger == "yes") { 411 setTimeout(function () { 412 if (!isWidgetEnabled) { 413 jQuery(".chaty-widget").removeClass("hide-widget"); 414 show_chaty_widget(); 415 } 416 }, parseInt(chaty_settings.object_settings.trigger_time) * 1000); 417 } 418 if (chaty_settings.object_settings.exit_intent == "yes") { 419 function addEvent(obj, evt, fn) { 420 if (obj.addEventListener) { 421 obj.addEventListener(evt, fn, false); 422 } 423 else if (obj.attachEvent) { 424 obj.attachEvent("on" + evt, fn); 425 } 426 } 427 428 addEvent(document, 'mouseout', function(evt) { 429 if (evt.toElement == null && evt.relatedTarget == null ) { 430 var widget_status = get_chaty_cookie("cta_exit_intent_shown"); 431 if (widget_status == null) { 432 set_chaty_cookie("cta_exit_intent_shown","yes",1); 433 isWidgetEnabled = true; 434 jQuery(".chaty-widget").removeClass("hide-widget"); 435 jQuery(".chaty-widget").addClass("chaty-animation-widget"); 436 jQuery(".chaty-animation-widget").append("<div class='chaty-nav'></div>"); 437 if(chaty_settings.object_settings.display_state == "open" && chaty_settings.object_settings.has_close_button == "no") { 438 chaty_settings.object_settings.has_close_button = "no"; 439 } else { 440 chaty_settings.object_settings.display_state = "open"; 441 chaty_settings.object_settings.has_close_button = "yes"; 442 } 443 show_chaty_widget(); 444 if (chaty_settings.object_settings.position == "left") { 445 jQuery(".chaty-widget").addClass("left-position"); 446 } else if (chaty_settings.object_settings.position == "right") { 447 jQuery(".chaty-widget").addClass("right-position"); 448 } else if (chaty_settings.object_settings.position == "custom") { 449 if (e.object_settings.pos_side == "left") { 450 jQuery(".chaty-widget").addClass("left-position"); 451 } else { 452 jQuery(".chaty-widget").addClass("right-position"); 453 } 454 } 455 removeAnimation(); 456 setTimeout(function () { 457 jQuery(".chaty-animation-widget").addClass("active"); 458 }, 100); 459 setTimeout(function () { 460 jQuery(".chaty-nav").remove(); 461 }, 2500); 462 } 463 } 464 }); 465 } 466 if (chaty_settings.object_settings.on_page_scroll == "yes") { 467 if (parseInt(chaty_settings.object_settings.page_scroll) > 0) { 468 jQuery(window).scroll(function () { 469 if (!isWidgetEnabled) { 470 var scrollHeight = jQuery(document).height() - jQuery(window).height(); 471 var scrollPos = jQuery(window).scrollTop(); 472 if (scrollPos != 0) { 473 if (((scrollPos / scrollHeight) * 100) >= parseInt(chaty_settings.object_settings.page_scroll)) { 474 jQuery(".chaty-widget").removeClass("hide-widget"); 475 show_chaty_widget(); 476 } 477 } 478 } 479 }); 480 } 481 } 482 } 483 } 484 } else { 485 jQuery(".chaty-widget").addClass("hide-widget"); 486 } 487 }); 488 jQuery(".chaty-widget-i-title").each(function(){ 489 if(jQuery(this).text() == "") { 490 jQuery(this).closest(".chaty-widget-i").addClass("hide-chaty-arrow"); 491 jQuery(this).remove(); 492 } 493 }); 494 }); 495 496 function set_cta_status() { 497 var n = new Date; 498 setInterval(function () { 499 n.setTime(n.getTime() + 1e3), document.cookie = "display_cta=none; expires=" + n.toGMTString() + "; path=/" 500 }, 500); 501 } 502 503 function set_chaty_cookie(name,value,days) { 504 var expires = ""; 505 if (days) { 506 var date = new Date(); 507 date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); 508 expires = "; expires=" + date.toUTCString(); 509 } 510 document.cookie = name + "=" + (value || "") + expires + "; path=/"; 511 } 512 function get_chaty_cookie(name) { 513 var nameEQ = name + "="; 514 var ca = document.cookie.split(';'); 515 for(var i=0;i < ca.length;i++) { 516 var c = ca[i];
517 while (c.charAt(0)==' ') c = c.substring(1,c.length); 518 if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); 519 } 520 return null; 521 } 522 523 function show_chaty_widget() { 524 set_chaty_cookie("cta_widget_status", "yes", 1); 525 isWidgetEnabled = 1; 526 var activeWidget = 0; 527 if(jQuery("body").hasClass("chaty-in-desktop")) { 528 activeWidget = jQuery(".chaty-widget-is .chaty-widget-i.is-in-desktop").length; 529 } else { 530 activeWidget = jQuery(".chaty-widget-is .chaty-widget-i.is-in-mobile").length; 531 } 532 var chatyAnimation = get_chaty_cookie("chaty-animation"); 533 if(chatyAnimation != null) { 534 chaty_settings.object_settings.animation_class = ""; 535 } 536 537 if(chaty_settings.object_settings.animation_class != "") { 538 jQuery(".i-trigger .chaty-widget-i svg").wrap(function() { 539 return "<div class='svg'></div>"; 540 }); 541 if(chaty_settings.object_settings.animation_class != "sheen") { 542 if (activeWidget > 1) { 543 jQuery(animationClass).removeClass("chaty-animation-" + chaty_settings.object_settings.animation_class).removeClass("start-now"); 544 setTimeout(function () { 545 jQuery(animationClass).addClass("chaty-animation-" + chaty_settings.object_settings.animation_class).addClass("start-now"); 546 }, 1000); 547 animationTimer = setInterval(function () { 548 jQuery(animationClass).removeClass("chaty-animation-" + chaty_settings.object_settings.animation_class).removeClass("start-now"); 549 setTimeout(function () { 550 jQuery(animationClass).addClass("chaty-animation-" + chaty_settings.object_settings.animation_class).addClass("start-now"); 551 }, 1000); 552 }, 5000); 553 } else if (activeWidget == 1) { 554 animationClass = ".chaty-main-widget svg, .chaty-main-widget img, .chaty-main-widget .facustom-icon"; 555 // console.log("animationClass:" + animationClass); 556 jQuery(animationClass).removeClass("chaty-animation-" + chaty_settings.object_settings.animation_class).removeClass("start-now"); 557 setTimeout(function () { 558 jQuery(animationClass).addClass("chaty-animation-" + chaty_settings.object_settings.animation_class).addClass("start-now"); 559 }, 1000); 560 animationTimer = setInterval(function () { 561 jQuery(animationClass).removeClass("chaty-animation-" + chaty_settings.object_settings.animation_class).removeClass("start-now"); 562 setTimeout(function () { 563 jQuery(animationClass).addClass("chaty-animation-" + chaty_settings.object_settings.animation_class).addClass("start-now"); 564 }, 1000); 565 }, 5000); 566 } 567 } else { 568 animationClass = ".i-trigger .chaty-widget-i .wrap-svg"; 569 if(!jQuery(".i-trigger .chaty-widget-i .wrap-svg").length) { 570 jQuery(".i-trigger .chaty-widget-i svg").wrap(function() { 571 return "<div class='wrap-svg'></div>"; 572 }); 573 } 574 jQuery(animationClass).removeClass("chaty-animation-sheen").removeClass("start-now"); 575 setTimeout(function () { 576 jQuery(animationClass).addClass("chaty-animation-sheen").addClass("start-now"); 577 }, 10); 578 animationTimer = setInterval(function () { 579 jQuery(animationClass).removeClass("chaty-animation-sheen").removeClass("start-now"); 580 setTimeout(function () { 581 jQuery(animationClass).addClass("chaty-animation-sheen").addClass("start-now"); 582 }, 10); 583 }, 5000); 584 } 585 } 586 587 if(chaty_settings.object_settings.display_state == "open") { 588 if(chaty_settings.object_settings.has_close_button == "no") { 589 if(activeWidget > 1) { 590 removeAnimation(); 591 jQuery(".chaty-widget").find(".i-trigger-open").removeClass("active_clos"); 592 jQuery(".chaty-widget").find(".i-trigger-open").trigger("click"); 593 jQuery(".chaty-widget-is").addClass("has-no-close-btn"); 594 jQuery(".i-trigger").remove(); 595 } 596 } else { 597 if(activeWidget > 1) { 598 removeAnimation(); 599 jQuery(".chaty-widget").find(".i-trigger-open").removeClass("active_clos"); 600 jQuery(".chaty-widget").find(".i-trigger-open").trigger("click"); 601 } 602 } 603 } 604 } 605 606 function removeAnimation() { 607 if(animationTimer) { 608 clearInterval(animationTimer); 609 animationTimer = 0; 610 } 611 set_chaty_cookie("chaty-animation","stop",1); 612 jQuery(".chaty-animation-" + chaty_settings.object_settings.animation_class).removeClass("chaty-animation-" + chaty_settings.object_settings.animation_class).removeClass("start-now"); 613 jQuery(".start-now").removeClass("start-now"); 614 chaty_settings.object_settings.animation_class = ""; 615 } 616 }(jQuery) 617 }, 12: function (t, e) { 618 } 619});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.