You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
main
${ noResults }
1 line
11 KiB
Plaintext
1 line
11 KiB
Plaintext
(()=>{var e;(e=jQuery)(function(){var t=window.location.href,c=void 0!==document.title?document.title:"",n="no",a=document.querySelector(".ht-ctc-chat");try{n=void 0!==navigator.userAgent&&navigator.userAgent.match(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i)?"yes":"no"}catch(e){}"no"==n&&(n=void 0!==screen.width&&screen.width>1025?"no":"yes");var o={};function r(){localStorage.getItem("ht_ctc_storage")&&(o=localStorage.getItem("ht_ctc_storage"),o=JSON.parse(o))}function _(e){return!!o[e]&&o[e]}function i(e,t){r(),o[e]=t;var c=JSON.stringify(o);localStorage.setItem("ht_ctc_storage",c)}r();var s={},u={};function l(){var t=document.querySelector(".ht_ctc_chat_data");t&&t.remove(),document.dispatchEvent(new CustomEvent("ht_ctc_event_settings",{detail:{ctc:s}})),function(){if(a){document.dispatchEvent(new CustomEvent("ht_ctc_event_chat")),function(e){s.schedule&&"yes"==s.schedule?document.dispatchEvent(new CustomEvent("ht_ctc_event_display",{detail:{ctc:s,display_chat:g,ht_ctc_chat:e,online_content:f}})):(g(e),f())}(a),a.addEventListener("click",function(){document.querySelector(".ht_ctc_chat_greetings_box")||b(a)}),function(){if(a){var e=document.querySelector(".ht_ctc_chat_greetings_box");e&&a.addEventListener("click",function(t){t.target.closest(".ht_ctc_chat_style")&&(e.classList.contains("ctc_greetings_opened")?v("user_closed"):d("user_opened"))}),a.addEventListener("click",function(e){e.target.closest(".ctc_greetings_close_btn")&&v("user_closed")})}}(),a&&a.addEventListener("click",function(e){if(e.target.closest(".ht_ctc_chat_greetings_box_link")){e.preventDefault();var t=document.querySelector("#ctc_opt");if(t)if(t.checked||_("g_optin"))b(a),h();else{var c=document.querySelector(".ctc_opt_in");c&&(c.style.display="block",c.style.opacity="0",setTimeout(function(){c.style.transition="opacity 0.4s",c.style.opacity="1"},10))}else b(a),h();document.dispatchEvent(new CustomEvent("ht_ctc_event_greetings"))}});var e=document.querySelector("#ctc_opt");e&&e.addEventListener("change",function(){if(e.checked){var t=document.querySelector(".ctc_opt_in");t&&(t.style.transition="opacity 0.1s ease-out",t.style.opacity="0",setTimeout(function(){t.style.display="none"},100)),i("g_optin","y"),setTimeout(function(){b(a),h()},500)}})}}(),e(document).on("click",".ht-ctc-sc-chat",function(){b(this)}),document.querySelectorAll(".ctc_chat, #ctc_chat").forEach(function(e){e.addEventListener("click",function(e){b(this),this.classList.contains("ctc_woo_place")&&e.preventDefault()})}),document.querySelectorAll('[href="#ctc_chat"]').forEach(function(e){e.addEventListener("click",function(e){e.preventDefault(),b(this)})})}function d(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"open";y();var c=document.querySelector(".ht-ctc-chat .ctc_cta_stick");c&&c.remove();var n=document.querySelector(".ht_ctc_chat_greetings_box");n&&("init"==t?e(".ht_ctc_chat_greetings_box").show(70):e(".ht_ctc_chat_greetings_box").show(400),n.classList.add("ctc_greetings_opened"),n.classList.remove("ctc_greetings_closed")),i("g_action",t),"user_opened"==t&&i("g_user_action",t),function(){if(document.querySelector(".ctc_greetings_modal")&&!document.querySelector(".ht_ctc_modal_backdrop")){var e=function(t){"Escape"===t.key&&(v("user_closed"),document.removeEventListener("keydown",e))},t=document.createElement("div");t.className="ht_ctc_modal_backdrop",document.body.appendChild(t),t.addEventListener("click",function(){v("user_closed")}),document.addEventListener("keydown",e)}}()}function h(){m(),setTimeout(function(){v("chat_clicked")},500)}function v(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"close";m(),"element"==t?e(".ht_ctc_chat_greetings_box").hide(70):e(".ht_ctc_chat_greetings_box").hide(400);var c=document.querySelector(".ht_ctc_chat_greetings_box");c&&(c.classList.add("ctc_greetings_closed"),c.classList.remove("ctc_greetings_opened")),i("g_action",t),"user_closed"==t&&i("g_user_action",t)}function m(){var e=document.querySelector(".ht_ctc_modal_backdrop");e&&e.remove()}function g(e){var t;"yes"==n?"show"==s.d
|