403Webshell
Server IP : 103.234.187.230  /  Your IP : 216.73.216.216
Web Server : Apache
System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/chatbot.hellogtx.com/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/chatbot.hellogtx.com/js/chatbot.js
SERVER_URL='https://chatprod.careinsurance.com';
//SERVER_URL='http://chatbot.hellogtx.com/';
BOT_ID=1;
BOT_NAME='uat';
BOT_THEME='4';
BOT_POSITION='bottom-right';
bot_click_image = 'true';
is_form_assist='false';
is_lead_generation='false';
is_easyassist_enabled='false';
easyassist_token='';
var web_landing_list=[];
/*document.body.innerHTML +="<div id='notif_and_cross_div' onmouseover='show_cross()' onmouseout='dont_show_cross()' style='position:fixed;right:90px;bottom:7em;height:100px;width:400px;display:none;z-index:9999999999'><svg onclick='hide_notification()' id='cross-chatbox-notification' width='28' height='28' viewBox='0 0 28 28' fill='none' xmlns='http://www.w3.org/2000/svg' style='position: fixed;cursor: pointer;right: 90px;bottom: 12.5em;z-index: 2147483647;display: none;'><circle cx='14' cy='14' r='14' fill='#3871F0' fill-opacity='0.08'></circle><path d='M10.3335 9.21192L14.0001 12.8781L17.6667 9.22303C17.7388 9.14959 17.8255 9.09192 17.9211 9.05367C18.0167 9.01542 18.1193 8.99743 18.2222 9.00084C18.4242 9.01391 18.6145 9.10004 18.7576 9.24315C18.9007 9.38625 18.9869 9.57656 19 9.77852C19.001 9.87782 18.9818 9.97629 18.9436 10.068C18.9054 10.1596 18.849 10.2426 18.7777 10.3118L15.1001 14.0002L18.7777 17.6886C18.9222 17.8286 19.0022 18.0219 19 18.2219C18.9869 18.4239 18.9007 18.6142 18.7576 18.7573C18.6145 18.9004 18.4242 18.9865 18.2222 18.9996C18.1193 19.003 18.0167 18.985 17.9211 18.9468C17.8255 18.9085 17.7388 18.8508 17.6667 18.7774L14.0001 15.1223L10.3446 18.7774C10.2724 18.8508 10.1858 18.9085 10.0902 18.9468C9.99455 18.985 9.89203 19.003 9.78909 18.9996C9.58334 18.9889 9.38886 18.9023 9.24317 18.7567C9.09749 18.611 9.01094 18.4165 9.00023 18.2108C8.99922 18.1115 9.0184 18.013 9.0566 17.9214C9.0948 17.8297 9.15122 17.7467 9.22244 17.6775L12.9001 14.0002L9.21133 10.3118C9.14211 10.2416 9.08775 10.1583 9.05147 10.0666C9.0152 9.97502 8.99777 9.87703 9.00023 9.77852C9.0133 9.57656 9.09944 9.38625 9.24256 9.24315C9.38568 9.10004 9.576 9.01391 9.77798 9.00084C9.88012 8.99599 9.98215 9.01223 10.0777 9.04854C10.1733 9.08486 10.2604 9.14048 10.3335 9.21192V9.21192Z' fill='#3871F0'></path></svg><svg width='351' height='117' viewBox='0 0 351 117' fill='none' xmlns='http://www.w3.org/2000/svg' style='position: fixed;cursor: pointer;right: 80px;bottom: 5em;z-index: 2147483647;display: none;' id='chatbox-notification' onclick='open_up_bot()' class='animate__animated animate__pulse'><g filter='url(#filter0_d)'><rect x='15' y='15' width='321' height='62' rx='31' fill='white'></rect><path d='M298.764 102C298.764 102 270.667 92.1219 268.253 73.243H295.013C288.51 76.7439 282.248 82.7811 298.764 102Z' fill='white'></path></g><defs><filter id='filter0_d' x='0' y='0' width='351' height='117' filterUnits='userSpaceOnUse' color-interpolation-filters='sRGB'><feFlood flood-opacity='0' result='BackgroundImageFix'></feFlood><feColorMatrix in='SourceAlpha' type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0'></feColorMatrix><feOffset></feOffset><feGaussianBlur stdDeviation='7.5'></feGaussianBlur><feColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0'></feColorMatrix><feBlend mode='normal' in2='BackgroundImageFix' result='effect1_dropShadow'></feBlend><feBlend mode='normal' in='SourceGraphic' in2='effect1_dropShadow' result='shape'></feBlend></filter></defs><text x='50%' y='40%' dominant-baseline='middle' text-anchor='middle' fill='#4D4D4D' id='prompt-text'>I love SVG</text></svg></div><svg  class='animate__animated animate__fadeIn' id='one-popup-on-bot' width='25' height='25' viewBox='0 0 22 22' fill='none' xmlns='http://www.w3.org/2000/svg' style='position: fixed;cursor: pointer;right: 34px;bottom: 6.5em;z-index: 99999999999999999999;display: none;'><circle cx='11' cy='11' r='11' fill='#E82D2D'></circle><path d='M7.93018 8.85889V7.1084C8.90674 7.1084 9.58789 6.979 9.97363 6.72021C10.3594 6.46143 10.5522 6.05371 10.5522 5.49707H12.7275V16H10.3765V8.85889H7.93018Z' fill='white'></path></svg>";*/
var easychat_form_assist_id = ""
var easychat_page_category = ""
var easychat_minimized_chatbot = false;
var easychat_do_not_disturb = ""
var easychat_window_location = encodeURIComponent(window.location.href);
var website_cookies = ""
var meta_tags_information = ""
var form_assist_tags = "";
var is_bot_minimized = false;
var easychat_intent_name = ""
var is_web_landing_allowed = 'false'
var campaign_link_query_id = "INTENT_ID"
var prompt_message = ""
var chat_bot_maximized = false
var prompt_text_font_family = ""
var auto_popup = null;
var is_bot_loaded = false;

/////////////////////////////// Encryption //////////////////////////

function easychat_set_cookie(cookiename, cookievalue, expiration, path) {
    if (path == "") {
        document.cookie = cookiename + "=" + cookievalue + "; expires=" + expiration+"; secure";
    } else {
        document.cookie = cookiename + "=" + cookievalue + "; path=" + path + "; expires=" + expiration+"; secure";
    }
}


function custom_encrypt(msgString, key) {
    // msgString is expected to be Utf8 encoded
    var iv = CryptoJS.lib.WordArray.random(16);
    var encrypted = CryptoJS.AES.encrypt(msgString, CryptoJS.enc.Utf8.parse(key), {
        iv: iv
    });
    var return_value = key;
    return_value += "." + encrypted.toString();
    return_value += "." + CryptoJS.enc.Base64.stringify(iv);
    return return_value;
}

function generate_random_string(length) {
    var result = '';
    var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
    var charactersLength = characters.length;
    for (var i = 0; i < length; i++) {
        result += characters.charAt(Math.floor(Math.random() * charactersLength));
    }
    return result;
}


function encrypt_variable(data) {

    utf_data = CryptoJS.enc.Utf8.parse(data);
    encoded_data = utf_data;
    random_key = generate_random_string(16);
    encrypted_data = custom_encrypt(encoded_data, random_key);

    return encrypted_data;
}


////////////////////////////////////////////////////////////////////////////////////

function show_web_landing_intents() {
    var current_url = window.location.href;
    try {
        if (web_landing_list.length > 0) {
            for (var i = 0; i < web_landing_list.length; i++) {
                url = web_landing_list[i]["url"]
                intent_name = web_landing_list[i]["intent_name"]
                if (url == current_url) {
                    easychat_intent_name = intent_name;
                    is_web_landing_allowed = 'true';
                    try {
                        if (web_landing_list[i]["show_prompt_message_after_timer"] == 'true') {
                            prompt_message = web_landing_list[i]["prompt_message"];
                            prompt_message_timer = parseInt(web_landing_list[i]["prompt_message_timer"]) * 1000;
                            setTimeout(function(e) {
                                if (chat_bot_maximized == false) {
                                    setTimeout(function(e) {
                                            document.getElementById("notif_and_cross_div").style.display = "block";
                                            document.getElementById("chatbox-notification").style.display = "block";
                                        }, 800)
                                        //document.getElementById("allincall-popup").style.zIndex = "unset";
                                    document.getElementById("one-popup-on-bot").style.display = "inline-block";
                                    document.getElementById("one-popup-on-bot").style.zIndex = "9999999999999";
                                    document.getElementById("allincall-popup").style.zIndex = "9989";
                                    document.getElementById("prompt-text").innerHTML = prompt_message
                                    document.getElementById("prompt-text").style.fontFamily = prompt_text_font_family
                                }
                            }, prompt_message_timer);
                        }
                    } catch (err) { console.log(err) }
                }
            }
        }
    } catch (err) {}
}

function check_campaign_link() {
    var campaign_link_intent = easychat_get_url_vars()["easychat_query"]
    if (campaign_link_intent != undefined && campaign_link_intent != "" && campaign_link_intent != null) {
        campaign_link_query_id = campaign_link_intent
        document.getElementById("allincall-popup").click();
    }
}


// Get Webiste Cookies
function getCookies() {
    var pairs = document.cookie.split(";");
    var cookies = {};
    for (var i = 0; i < pairs.length; i++) {
        var pair = pairs[i].split("=");
        cookies[(pair[0] + '').trim()] = unescape(pair.slice(1).join('='));
    }
    return cookies;
}

function get_cookie(cookiename) {
    var cookie_name = cookiename + "=";
    var decodedCookie = decodeURIComponent(document.cookie);
    var cookie_array = decodedCookie.split(';');
    for (var i = 0; i < cookie_array.length; i++) {
        var c = cookie_array[i];
        while (c.charAt(0) == ' ') {
            c = c.substring(1);
        }
        if (c.indexOf(cookie_name) == 0) {
            return c.substring(cookie_name.length, c.length);
        }
    }
    return "";
}

// Get Webiste META Data
var meta_tag_filter_list = ["title", "description", "keywords"];

function get_meta_tag_information() {
    var meta_tags = document.getElementsByTagName("meta");
    var meta_tag_dict = {};
    for (var index = 0; index < meta_tags.length; index++) {
        var meta_tag_name = meta_tags[index].getAttribute("name");
        for (var m_index = 0; m_index < meta_tag_filter_list.length; m_index++) {
            if (meta_tag_name == meta_tag_filter_list[m_index]) {
                meta_tag_dict[meta_tag_name] = meta_tags[index].getAttribute("content");
            }
        }
    }
    return meta_tag_dict;
}




// Include CSS files
function easychat_add_css(filename) {
    var head = document.getElementsByTagName('head')[0];
    var style = document.createElement('link');
    style.href = filename;
    style.type = 'text/css';
    style.rel = 'stylesheet';
    document.head.appendChild(style);
}

// Include script files
function easychat_add_script(filename) {
    var head = document.getElementsByTagName('head')[0];
    var script = document.createElement('script');
    script.src = filename;
    script.type = 'text/javascript';
    document.head.appendChild(script)
}

if( document.readyState !== 'loading' ) {
    initialize_easychat_bot();
} else  {
    document.addEventListener("DOMContentLoaded", function(event) {
        initialize_easychat_bot();
    });    
}

function initialize_easychat_bot() {
    easychat_add_css(SERVER_URL + "/static/EasyChatApp/css/embed.css");
    easychat_add_css(SERVER_URL + "/static/EasyChatApp/css/theme5_embed.css");
    ////easychat_add_css(SERVER_URL + "/static/EasyChatApp/font-awesome-4.7.0/css/font-awesome.min.css");
    easychat_add_script(SERVER_URL + "/static/EasyChatApp/js/crypto-js.min.js");
    easychat_add_css(SERVER_URL + "/static/EasyChatApp/css/animate.css");    

    setTimeout(function() {
        load_easychat_bot();
    }, 2000)
}

var intent_name_pk_dict = {}

function get_suggestion_list(bot_id, category, intent_type) {
    var json_string = JSON.stringify({
        bot_id: bot_id,
        category: category,
        intent_type: intent_type,
    });
    json_string = encrypt_variable(json_string);
    json_string = encodeURIComponent(json_string);

    var xhttp = new XMLHttpRequest();
    var params = 'json_string=' + json_string
    xhttp.open("POST", "/chat/get-intents/", true);
    xhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    xhttp.onreadystatechange = function() {
        if (this.readyState == 4 && this.status == 200) {
            response = JSON.parse(this.responseText);
            response = custom_decrypt(response)
            response = JSON.parse(response);
            if (response["status"] == 200) {
                intents_list = response["intents_list"]
                intent_name_pk_dict = response["intent_name_pk_dict"]

                var intents = document.getElementById('Intents');
                while (intents.lastChild) {
                    intents.removeChild(intents.lastChild);
                }

                //$("#Intents").empty();
            
                for(var i=0;i<intents_list.length;i++) {
                    var option = document.createElement('option');
                    option.value = intents_list[i];
                    intents.appendChild(option);   
                    //$("#Intents").append('<option  value="' +  intents_list[i] + '"></option>');
                }    

            } else {
                console.log("error")
            }
        }
    }
    xhttp.send(params);
}

function go_to_intent(bot_pk) {
    intent_name = document.getElementById("search_intent_word").value
    intent_pk = intent_name_pk_dict[String(intent_name)]
    window.location = "/chat/edit-intent/?intent_pk=" + intent_pk
}


function get_form_assist_tags() {
    var xhttp = new XMLHttpRequest();
    var params = '&bot_id=' + BOT_ID;
    xhttp.open("POST", SERVER_URL + "/chat/get-form-assist-tags/", true);
    xhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    xhttp.onreadystatechange = function() {
        if (this.readyState == 4 && this.status == 200) {
            response = JSON.parse(this.responseText);
            if (response["status"] == 200) {
                window.form_assist_tags = response["form_assist_tags"];
            }
        }
    }
    xhttp.send(params);

}


// Import form assist code when form assist is allowed
if (is_form_assist == "true") {
    easychat_add_script(SERVER_URL + "/static/EasyChatApp/js/form_assist.js");
    get_form_assist_tags();
}

if (is_easyassist_enabled == "true") {
    easychat_add_script(SERVER_URL + "/static/EasyAssistApp/js/easy-assist-v6.js?key=" + easyassist_token);
}

// var slideIndex = 1;

function easychat_get_url_vars() {
    var vars = {};
    var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m, key, value) {
        vars[key] = value;
    });
    return vars;
}

// On windows loads
// window.onload = function() {
//     load_easychat_bot();
// }

function load_easychat_bot() {
    if (is_bot_loaded) return;
    is_bot_loaded = true;
    if (is_lead_generation == 'true') {
        is_form_assist = 'false'
    }
    try {
        website_cookies = getCookies()
        website_cookies = JSON.stringify(website_cookies)
        website_cookies = encrypt_variable(website_cookies)

        meta_tags_information = get_meta_tag_information()
        meta_tags_information = JSON.stringify(meta_tags_information)
        meta_tags_information = encrypt_variable(meta_tags_information)
    } catch (err) {
        console.log(err)
    }
    //If form asssit is true call form assist function in form_assist.js

    var easychat_iframe = document.createElement('iframe');
    easychat_iframe.style.display = "none";
    easychat_iframe.id = "allincall-chat-box";
    easychat_iframe.frameborder = "0";
    easychat_iframe.zIndex = "2147483647";
    easychat_iframe.backgroundColor = "white";
    easychat_iframe.allow = "microphone";
    document.body.appendChild(easychat_iframe);

    url_parameters = easychat_get_url_vars();
    var xhttp = new XMLHttpRequest();
    var json_string = JSON.stringify({
        bot_id: BOT_ID,
        web_page: window.location.href
    })
    json_string = encodeURIComponent(json_string)
    var params = 'json_string=' + json_string;
    xhttp.open("POST", SERVER_URL + "/chat/get-bot-image/", true);
    xhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    xhttp.onreadystatechange = function() {
        if (this.readyState == 4 && this.status == 200) {
            response = JSON.parse(this.responseText);
            prompt_text_font_family = response.font_style;
            prompt_text_family_to_pass_in_google_api = prompt_text_font_family.replace(" ", '+')
	   // easychat_add_css("https://fonts.googleapis.com/css?family=" + prompt_text_family_to_pass_in_google_api)
            var bot_theme_color = response.bot_theme_color
            var easychat_popup_image = document.createElement("img");
            easychat_popup_image.id = "allincall-popup";
            easychat_popup_image.style.position = "fixed";
            easychat_popup_image.style.cursor = "pointer";
            easychat_popup_image.style.right = "20px";
            easychat_popup_image.style.bottom = "0em";
            easychat_popup_image.style.width = "8em";
            easychat_popup_image.style.zIndex = "9989";

           /* var bot_theme_color = response.bot_theme_color*/

            is_minimization_enabled = response.is_minimization_enabled
            if (is_minimization_enabled) {
                var easychat_popup_min_image = document.createElement("img");
                easychat_popup_min_image.id = "allincall-min-popup";
                easychat_popup_min_image.style.position = "fixed";
                easychat_popup_min_image.style.cursor = "pointer";
                easychat_popup_min_image.style.right = "21px";
                easychat_popup_min_image.style.bottom = "5em";
                easychat_popup_min_image.style.width = "3em";
                easychat_popup_min_image.style.zIndex = "9989";
                easychat_popup_min_image.style.display = "none";

                var easychat_popup_minimize = document.createElement("span");
                easychat_popup_minimize.id = "allincall-minimize-popup";
                easychat_popup_minimize.innerHTML = '<svg width="14" height="8" viewBox="0 0 14 8" fill="none" xmlns="http://www.w3.org/2000/svg">\
                                                                                            <path d="M2 0L7 5L12 0L14 1L7 8L0 1L2 0Z" fill="black"/>\
                                                                                        </svg>'
                                                                                        
                easychat_popup_minimize.style.border = "2px solid #" + bot_theme_color;

                var easychat_popup_minimize_tooltip = document.createElement("span");
                easychat_popup_minimize_tooltip.id = "allincall-minimize-popup-tooltip";
                easychat_popup_minimize_tooltip.textContent = "Click here to minimize";
                easychat_popup_minimize_tooltip.style.visibiity = "hidden";
                easychat_popup_minimize_tooltip.style.backgroundColor = "#" + bot_theme_color;

                var easychat_popup_maximize = document.createElement("span");
                easychat_popup_maximize.id = "allincall-maximize-popup";
                easychat_popup_maximize.innerHTML = '<svg width="11" height="8" viewBox="0 0 14 8" fill="none" xmlns="http://www.w3.org/2000/svg">\
                                                                                            <path d="M12 8L7 3L2 8L-8.74228e-08 7L7 6.11959e-07L14 7L12 8Z" fill="black"/>\
                                                                                        </svg>'
                
                easychat_popup_maximize.style.border = "2px solid #" + bot_theme_color;

                var easychat_popup_maximize_tooltip = document.createElement("span");
                easychat_popup_maximize_tooltip.id = "allincall-maximize-popup-tooltip";
                easychat_popup_maximize_tooltip.textContent = "Click here to maximize";
                easychat_popup_maximize_tooltip.style.visibiity = "hidden";
                easychat_popup_maximize_tooltip.style.backgroundColor = "#" + bot_theme_color;

            } else {
                var easychat_popup_min_image = "None"
            }

            response = JSON.parse(this.responseText);

            if (BOT_POSITION.indexOf("right") != -1) {
                easychat_popup_image.style.right = "20px";
                if (is_minimization_enabled) {
                    easychat_popup_min_image.style.right = "20px";
                }
                if (BOT_POSITION.indexOf("top") != -1) {
                    easychat_popup_image.style.top = "0px";

                    if (is_minimization_enabled) {
                        easychat_popup_min_image.style.top = "0em";

                        easychat_popup_minimize.style.top = "20px";
                        easychat_popup_minimize_tooltip.style.bottom = "unset";
                        easychat_popup_minimize_tooltip.style.top = "40px";
                        easychat_popup_minimize_tooltip.style.right = "158px";

                        easychat_popup_maximize.style.top = "5px";
                        easychat_popup_maximize_tooltip.style.bottom = "unset";

                        easychat_popup_maximize_tooltip.style.top = "22px";
                        easychat_popup_maximize_tooltip.style.right = "87px";
                    }
                } else {
                    if (is_minimization_enabled) {
                        easychat_popup_min_image.style.bottom = "1em";

                        easychat_popup_maximize.style.bottom = "50px";
                        easychat_popup_minimize_tooltip.style.right = "154px";
                        easychat_popup_minimize_tooltip.style.bottom = "107px";
                        easychat_popup_maximize_tooltip.style.right = "83px";
                        easychat_popup_maximize_tooltip.style.bottom = "68px";
                    }
                }
            } else {
                easychat_popup_image.style.left = "20px";
                if (is_minimization_enabled) {
                    easychat_popup_min_image.style.left = "20px";

                    easychat_popup_minimize.style.left = "150px";
                    easychat_popup_minimize_tooltip.style.left = "175px";

                    easychat_popup_maximize.style.left = "65px";
                    easychat_popup_maximize_tooltip.style.left = "85px";

                    easychat_popup_minimize_tooltip.style.right = "unset";
                    easychat_popup_maximize_tooltip.style.right = "unset";
                }
                if (BOT_POSITION.indexOf("top") != -1) {
                    easychat_popup_image.style.top = "0px";
                    if (is_minimization_enabled) {
                        easychat_popup_min_image.style.top = "0em";

                        easychat_popup_minimize.style.top = "20px";

                        easychat_popup_minimize_tooltip.style.top = "45px";
                        easychat_popup_minimize_tooltip.style.bottom = "unset";

                        easychat_popup_maximize.style.top = "5px";
                        easychat_popup_maximize_tooltip.style.top = "22px";
                        easychat_popup_maximize_tooltip.style.bottom = "unset";
                    }
                } else {
                    if (is_minimization_enabled) {
                        easychat_popup_min_image.style.bottom = "1em";

                        easychat_popup_maximize.style.bottom = "50px";
                        easychat_popup_maximize_tooltip.style.bottom = "68px";
                    }
                }
            }

            window.form_assist_autopop_up_timer = response.form_assist_autopop_up_timer;
            window.form_assist_inactivity_timer = response.form_assist_inactivity_timer;
            window.is_auto_pop_allowed = response.is_auto_pop_allowed;
            window.auto_pop_up_timer = response.auto_pop_timer
            //window.is_form_assist_auto_pop_allowed = response.is_form_assist_auto_pop_allowed
         /*bubble code*/
            window.auto_pop_up_text = response.auto_pop_text
            window.is_form_assist_auto_pop_allowed = response.is_form_assist_auto_pop_allowed
            window.is_nps_required = response.is_nps_required
            notification_message_div ='<div class="notification-message-div" style="display:none;" id="notification-message-div">\
            <div class="notification-message-hide-div" onclick="hide_auto_pop_up_notification_text()">\
                <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\
                    <circle cx="12" cy="12" r="11.5" fill="white" stroke="#D3E7FF"></circle>\
                    <path d="M16.1839 17L12.5029 13.3156L8.82186 17L8 16.1787L11.6868 12.5L8 8.82134L8.82186 8L12.5029 11.6844L16.1839 8.00578L17 8.82134L13.319 12.5L17 16.1787L16.1839 17Z" fill="#0085FF"></path>\
                </svg></div>\
            <div class="notification-message">\
                <span> <svg width="28" height="26" viewBox="0 0 28 26" fill="none" xmlns="http://www.w3.org/2000/svg">\
                    <path d="M10.8896 17.2108L6.68998 11.8405C6.68998 11.8405 5.86993 10.2885 8.0351 10.1679C8.0351 10.1679 7.07822 8.44705 9.41351 7.95764C9.41351 7.95764 8.39557 6.90729 9.47268 6.15549C10.5498 5.40368 11.3032 6.66714 11.3032 6.66714C11.3032 6.66714 12.6303 4.65722 13.7123 6.04074C14.7942 7.42426 17.3097 10.5104 17.3097 10.5104C17.3097 10.5104 17.5153 7.53379 18.9477 7.22838C20.0809 6.98676 20.3276 7.73942 20.3276 7.73942C20.3276 7.73942 20.6095 10.3757 20.8806 11.4605C21.2576 12.9685 21.2556 14.5389 20.7254 15.5043L22.647 17.9617L16.7544 21.3638L15.0816 19.0005C15.0818 19.0005 12.7019 19.5282 10.8896 17.2108Z" fill="#FFD3B4"></path>\
                    <path d="M17.8963 6.8808C17.1904 7.08995 16.6113 7.65362 16.4551 8.28353L16.1311 9.59087L12.8952 5.56503C12.6927 5.30703 12.3692 5.1574 11.9843 5.14364C11.5986 5.12984 11.1972 5.2541 10.8542 5.49353C10.6405 5.64271 10.4701 5.82326 10.3474 6.01718C9.8672 5.46932 8.94834 5.4056 8.26151 5.88506C7.90833 6.1316 7.67143 6.47887 7.59459 6.86288C7.52658 7.20259 7.59313 7.53503 7.78187 7.80679C7.54522 7.86184 7.31348 7.96496 7.10368 8.11143C6.76065 8.35084 6.51703 8.67677 6.41767 9.02913C6.3389 9.30844 6.35864 9.57767 6.47085 9.80635C6.22741 9.8605 5.98852 9.96566 5.77264 10.1163C5.43019 10.3553 5.18626 10.6803 5.08584 11.0312C4.98511 11.3833 5.0407 11.7191 5.24235 11.977L9.81505 17.8243C10.6978 18.9532 12.1727 19.5466 13.8853 19.4695L15.3883 21.6038C15.492 21.751 15.727 21.7759 15.9264 21.6608L21.819 18.2587C21.927 18.1964 22.0091 18.1011 22.0449 17.9967C22.0807 17.8923 22.0667 17.7886 22.0065 17.7116L20.1866 15.3844C20.4727 14.6697 21.1083 12.9046 20.2883 11.2934L19.7904 7.80573C19.7361 7.42552 19.5089 7.11981 19.1507 6.9449C18.7926 6.76999 18.3471 6.74725 17.8963 6.8808ZM18.963 8.04675L19.4676 11.5814C19.4722 11.6132 19.4818 11.6433 19.4964 11.6709C20.2728 13.1475 19.5867 14.8345 19.3612 15.3889L19.3361 15.4508C19.2916 15.5612 19.3031 15.6733 19.3673 15.7552L21.0525 17.9103L15.9379 20.8632L14.5197 18.8493C14.456 18.7587 14.339 18.7111 14.2056 18.7214C12.659 18.8402 11.3203 18.3307 10.5326 17.3235L5.95993 11.4762C5.87205 11.3638 5.8479 11.217 5.89201 11.0629C5.93639 10.9078 6.04444 10.764 6.19621 10.6581C6.34818 10.5521 6.52523 10.4968 6.69515 10.5023C6.86398 10.5078 7.00542 10.5727 7.0933 10.685L9.74996 14.0822C9.87267 14.2391 10.1677 14.2621 10.3765 14.1118C10.5672 13.9745 10.6303 13.741 10.5165 13.5955L7.29516 9.47616C7.20586 9.36194 7.18078 9.21345 7.2246 9.05797C7.26844 8.90253 7.37592 8.75874 7.52727 8.65312C7.67849 8.54754 7.85561 8.49268 8.02576 8.49876C8.19591 8.50485 8.33883 8.57109 8.42813 8.68531L11.6495 12.8047C11.7713 12.9604 12.0325 12.9554 12.2327 12.8155C12.4324 12.676 12.513 12.4416 12.3918 12.2865L8.54056 7.36173C8.42201 7.21013 8.37731 7.02382 8.41469 6.83706C8.44799 6.67097 8.54398 6.52524 8.68514 6.42673C8.99728 6.20882 9.4409 6.27335 9.67364 6.5709L13.5249 11.4957C13.6464 11.651 13.9075 11.6466 14.1074 11.5071C14.3075 11.3674 14.3887 11.133 14.2672 10.9776L11.0457 6.85827C10.8613 6.62248 10.9655 6.25327 11.2779 6.03523C11.4293 5.92957 11.6062 5.87477 11.7764 5.88085C11.9465 5.88693 12.0895 5.95318 12.1788 6.0674L12.181 6.07025L15.8671 10.6562L15.7576 11.0978C15.4527 11.3918 14.6874 12.2258 14.5502 13.3047C14.5245 13.5074 14.689 13.6551 14.9176 13.6346C15.1462 13.6141 15.3525 13.4332 15.3783 13.2304C15.5058 12.2274 16.3781 11.4707 16.3855 11.4643C16.4638 11.3983 16.5185 11.3144 16.5401 11.2274L17.2682 8.28957C17.3475 7.96948 17.6418 7.68302 18.0006 7.57674C18.2296 7.50885 18.456 7.52045 18.638 7.60933C18.82 7.69819 18.9354 7.85357 18.963 8.04675Z" fill="black"></path>\
                    <path d="M19.842 3.30215C20.0513 3.18129 20.1445 2.95077 20.0501 2.78727C19.9557 2.62378 19.7095 2.58923 19.5002 2.7101C19.2908 2.83097 19.1976 3.06149 19.292 3.22498C19.3864 3.38847 19.6326 3.42302 19.842 3.30215Z" fill="black"></path>\
                    <path d="M14.2341 5.11155C14.2492 5.10001 15.7715 3.95113 17.8577 3.52672C18.0976 3.47788 18.2876 3.25713 18.2646 3.05513C18.244 2.87405 18.0565 2.76504 17.842 2.80864C15.5149 3.28213 13.8422 4.54435 13.7722 4.59783C13.5806 4.74408 13.5288 4.9776 13.6564 5.11947C13.784 5.26134 14.0426 5.25769 14.2341 5.11155Z" fill="black"></path>\
                    <path d="M15.3205 5.2931C15.1184 5.42546 15.0433 5.65761 15.152 5.81233C15.2608 5.96707 15.5132 5.9857 15.7159 5.85382C15.7358 5.841 17.7198 4.57136 19.9704 4.80634C20.201 4.83039 20.455 4.65935 20.5096 4.44422C20.557 4.25715 20.4367 4.09407 20.2365 4.07319C17.6329 3.80134 15.4137 5.23209 15.3205 5.2931Z" fill="black"></path>\
                    <path d="M5.53285 14.7613C5.66201 14.5728 5.61311 14.3581 5.42338 14.2814C5.23337 14.2046 4.97403 14.2954 4.84429 14.484C4.80817 14.5365 3.95937 15.7869 3.90517 17.3235C3.89866 17.5078 4.05843 17.6399 4.26837 17.6241C4.50946 17.6059 4.73067 17.4008 4.73814 17.1897C4.78459 15.873 5.52539 14.7723 5.53285 14.7613Z" fill="black"></path>\
                    <path d="M5.89352 16.0002C5.87206 16.0523 5.37051 17.2913 5.59341 18.5169C5.62661 18.6995 5.83239 18.7977 6.0518 18.7352C6.28372 18.6691 6.45236 18.4472 6.41726 18.2542C6.22897 17.2189 6.66503 16.1289 6.67124 16.1137C6.75364 15.9126 6.64679 15.7242 6.4323 15.6927C6.21749 15.6613 5.97627 15.7989 5.89352 16.0002Z" fill="black"></path>\
                </svg></span><span style="white-space: break-spaces;position: relative;top: -6px;"> '+ auto_pop_up_text+'</span></div></div>'
                notification_counter='<div class="notification-div" style="display:none;" id="notification-count">1</div>'
                notification_message_div_element = document.createElement("div");
                notification_message_div_element.innerHTML += notification_message_div;
                notification_counter_element = document.createElement("div");
                notification_counter_element.innerHTML += notification_counter;
                document.body.appendChild(notification_counter_element)
                document.body.appendChild( notification_message_div_element)
               /*end*/
            if (response.status == 200 && response.bot_image_url != "") {
                easychat_popup_image.src = SERVER_URL + response.bot_image_url;
                if (is_minimization_enabled) {
                    easychat_popup_min_image.src = SERVER_URL + response.bot_image_url;
                }

            } else {
                easychat_popup_image.src = SERVER_URL + "/static/EasyChatApp/img/popup-3.svg";
                if (is_minimization_enabled) {
                    easychat_popup_min_image.src = SERVER_URL + "/static/EasyChatApp/img/popup-3.svg";
                }
            }

            if (is_form_assist == "true") {
                callFormAssist()
            }

            document.body.appendChild(easychat_popup_image);
            if (is_minimization_enabled) {
                document.body.appendChild(easychat_popup_min_image);
                document.body.appendChild(easychat_popup_minimize);
                document.body.appendChild(easychat_popup_minimize_tooltip);
                document.body.appendChild(easychat_popup_maximize);
                document.body.appendChild(easychat_popup_maximize_tooltip);

                document.getElementById("allincall-minimize-popup").addEventListener("click", function(e) {
                    document.getElementById("allincall-popup").style.display = "none";
                    document.getElementById("allincall-min-popup").style.display = "block";
                    document.getElementById("allincall-maximize-popup").style.display = "block";
                    document.getElementById("allincall-minimize-popup").style.display = "none";
                    document.getElementById("allincall-maximize-popup-tooltip").style.visibility = "hidden";
                    document.getElementById("allincall-minimize-popup-tooltip").style.visibility = "hidden";
                });

                document.getElementById("allincall-minimize-popup").addEventListener("mouseover", function(e) {
                    document.getElementById("allincall-minimize-popup").style.backgroundColor = "#" + bot_theme_color;
                    document.getElementById("allincall-minimize-popup-tooltip").textContent = "Click here to minimize";
                    document.getElementById("allincall-minimize-popup-tooltip").style.visibility = "unset";
                });

                document.getElementById("allincall-minimize-popup").addEventListener("mouseout", function(e) {
                    document.getElementById("allincall-minimize-popup").style.backgroundColor = "white";
                    document.getElementById("allincall-minimize-popup-tooltip").style.visibility = "hidden";
                    document.getElementById("allincall-minimize-popup").style.fontColor = "black";

                });

                document.getElementById("allincall-maximize-popup").addEventListener("click", function(e) {
                    document.getElementById("allincall-popup").style.display = "block";
                    document.getElementById("allincall-min-popup").style.display = "none";
                    document.getElementById("allincall-maximize-popup").style.display = "none";
                    document.getElementById("allincall-minimize-popup").style.display = "block";
                    document.getElementById("allincall-maximize-popup-tooltip").style.visibility = "hidden";
                    document.getElementById("allincall-minimize-popup-tooltip").style.visibility = "hidden";
                });

                document.getElementById("allincall-maximize-popup").addEventListener("mouseover", function(e) {
                    document.getElementById("allincall-maximize-popup").style.backgroundColor = "#" + bot_theme_color;
                    document.getElementById("allincall-maximize-popup-tooltip").textContent = "Click here to maximize";
                    document.getElementById("allincall-maximize-popup-tooltip").style.visibility = "unset";
                });

                document.getElementById("allincall-maximize-popup").addEventListener("mouseout", function(e) {
                    document.getElementById("allincall-maximize-popup").style.backgroundColor = "white";
                    document.getElementById("allincall-maximize-popup-tooltip").style.visibility = "hidden";
                    document.getElementById("allincall-maximize-popup").style.fontColor = "black";

                });
            }

            [document.getElementById("allincall-popup"), document.getElementById("allincall-min-popup")].forEach(function(element) {
                if (element == null) {
                    return;
                }
                element.addEventListener("click", function(e) {
                    if (auto_popup != null) {
                        clearTimeout(auto_popup)
                    }

                    document.getElementById("allincall-chat-box").contentWindow.postMessage({
                        event_id: 'is_chatbot_opened',
                        data: true,
                    }, "*")
   /* bubble code*/
                    if(document.getElementById("notification-message-div") !=null  && document.getElementById("notification-message-div")!= undefined ){

                        document.getElementById("notification-message-div").style.display ="none"



                    }

                    if(document.getElementById("notification-count") !=null  && document.getElementById("notification-count")!= undefined ){



                         document.getElementById("notification-count").style.display ="none"

                    }
      /*end*/
                    try {
                        website_cookies = getCookies()
                        website_cookies = JSON.stringify(website_cookies)
                        website_cookies = encrypt_variable(website_cookies)
                        chat_bot_maximized = true
                        try {
                            document.getElementById("one-popup-on-bot").style.display = "none";
                            document.getElementById("chatbox-notification").style.display = "none";
                            document.getElementById("allincall-popup").style.zIndex = "9989";
                            document.getElementById("cross-chatbox-notification").remove();

                        } catch (err) {}

                    } catch (err) { console.log(err) }

                    document.getElementById("allincall-chat-box").style.display = "block";
                    if (is_minimization_enabled) {
                        document.getElementById("allincall-minimize-popup").style.display = "none";
                        document.getElementById("allincall-maximize-popup").style.display = "none";
                        document.getElementById("allincall-min-popup").style.display = "none";
                    }
                    if (is_form_assist == 'true') {
                        easychat_do_not_disturb = is_form_assist_active()
                        easychat_form_assist_id = get_form_assist_id()
                        console.log("Do not Disturb: " + easychat_do_not_disturb)
                        if (easychat_do_not_disturb == true && easychat_form_assist_id == "") {
                            is_trigger_bot_allowed = 0;
                            openChatBot();
                        } else if (easychat_minimized_chatbot != true) {
                            document.getElementById("allincall-chat-box").src = SERVER_URL + "/chat/index/?id=" + BOT_ID + '&name=' + BOT_NAME + '&theme=' + BOT_THEME + '&easychat_window_location=' + easychat_window_location + '&form_assist_id=' + easychat_form_assist_id + '&do_not_disturb=' + easychat_do_not_disturb + '&is_lead_generation=' + is_lead_generation + '&page_category=' + easychat_page_category.toString() + '&meta_data=' + meta_tags_information + '&easychat_intent_name=' + easychat_intent_name + '&is_web_landing_allowed=' + is_web_landing_allowed + '&campaign_link_query_id=' + campaign_link_query_id;
                            // document.getElementById("allincall-chat-box").contentWindow.postMessage('open-chatbot','*')
                            //document.getElementById("chatbox-notification").style.display = "none"
                            try {
                                document.getElementById("one-popup-on-bot").style.display = "none";
                                document.getElementById("chatbox-notification").style.display = "none";
                                document.getElementById("allincall-popup").style.zIndex = "9989";
                                document.getElementById("cross-chatbox-notification").style.display = "none";
                            } catch (err) {}


                        }
                    } else if (easychat_minimized_chatbot != true) {
                        document.getElementById("allincall-chat-box").src = SERVER_URL + "/chat/index/?id=" + BOT_ID + '&name=' + BOT_NAME + '&theme=' + BOT_THEME + '&easychat_window_location=' + easychat_window_location + '&form_assist_id=' + easychat_form_assist_id + '&do_not_disturb=' + easychat_do_not_disturb + '&is_lead_generation=' + is_lead_generation + '&page_category=' + easychat_page_category.toString() + '&meta_data=' + meta_tags_information + '&easychat_intent_name=' + easychat_intent_name + '&is_web_landing_allowed=' + is_web_landing_allowed + '&campaign_link_query_id=' + campaign_link_query_id;
                        // document.getElementById("allincall-chat-box").contentWindow.postMessage('open-chatbot','*')
                        if (!get_cookie("isFeedBackDone")) {
                            easychat_set_cookie("isFeedBackDone", "0", "", "")
                        }
                        try {
                            document.getElementById("chatbox-notification").style.display = "none";
                            document.getElementById("allincall-popup").style.zIndex = "9989";
                            document.getElementById("cross-chatbox-notification").style.display = "none";
                            document.getElementById("one-popup-on-bot").style.display = "none";
                            setTimeout(function(e) {
                                document.getElementById("allincall-chat-box").contentWindow.postMessage({
                                    event_id: 'isFeedBackDone',
                                    data: get_cookie("isFeedBackDone")
                                }, "*")
                            }, 2000);
                        } catch (err) {}


                        // set livechat cookie
                        if (!get_cookie("livechat_cookie_session_id")) {
                            easychat_set_cookie("livechat_cookie_session_id", "", "", "")
                        }
                        setTimeout(function(e) {
                            document.getElementById("allincall-chat-box").contentWindow.postMessage({
                                event_id: 'livechat_cookie_session_user_id',
                                livechat_cookie_session_id: get_cookie("livechat_cookie_session_id"),
                            }, "*")
                        }, 1000);
                    }

                    this.style.display = "none";
                    document.body.style.overflow = "unset";
                    var chat_box_window = document.getElementById("allincall-chat-box");

                    if ((window.innerWidth < 500)) {
                        chat_box_window.style.display = "block";
                        chat_box_window.style.height = "100%";
                        chat_box_window.style.bottom = "0em";
                        chat_box_window.style.right = "0em";
                        //chat_box_window.style.animationName = "my-amine-blo";
                        try {
                            chat_box_window.classList.remove("animate__animated")
                            chat_box_window.classList.remove("animate__slideOutDown")
                            chat_box_window.classList.remove("scale-out-br")
                        } catch (err) {}
                        chat_box_window.className += "animate__animated animate__slideInUp";
                    } else {

                        if (BOT_POSITION == "right") {
                            chat_box_window.style.display = "block";
                            chat_box_window.style.right = "1em";
                            chat_box_window.style.animationName = "right-anime";
                        }
                        if (BOT_POSITION == "left") {
                            chat_box_window.style.display = "block";
                            chat_box_window.style.left = "1em"
                            chat_box_window.style.animationName = "left-anime";
                        }
                        if (BOT_POSITION == "bottom-right") {
                            try {
                                chat_box_window.classList.remove("animate__animated")
                                chat_box_window.classList.remove("animate__slideOutDown")
                                chat_box_window.classList.remove("scale-out-br")
                            } catch (err) {}
                            chat_box_window.className += "animate__animated animate__slideInUp";
                            chat_box_window.style.display = "block";
                            chat_box_window.style.bottom = "1em";
                            chat_box_window.style.right = "2em";
                            //chat_box_window.style.animationName = "bottom-left-right-anime";
                        }
                        if (BOT_POSITION == "top-right") {
                            chat_box_window.style.display = "block";
                            chat_box_window.style.right = "1em";
                            chat_box_window.style.top = "2em";
                            chat_box_window.style.animationName = "right-anime";
                        }
                        if (BOT_POSITION == "bottom-left") {
                            try {
                                chat_box_window.classList.remove("animate__animated")
                                chat_box_window.classList.remove("animate__slideOutDown")
                                chat_box_window.classList.remove("scale-out-bl")
                            } catch (err) {}
                            chat_box_window.className += "animate__animated animate__slideInUp";
                            chat_box_window.style.display = "block";
                            chat_box_window.style.left = "1em";
                            chat_box_window.style.bottom = "1em";
                            //chat_box_window.style.animationName = "bottom-left-right-anime";

                        }
                        if (BOT_POSITION == "top-left") {
                            chat_box_window.style.display = "block";
                            chat_box_window.style.left = "1em";
                            chat_box_window.style.top = "2em";
                            chat_box_window.style.animationName = "left-anime";
                        }
                    }
                });
            });
            if (is_lead_generation == 'true') {
                setTimeout(function(e) {
                    document.getElementById("allincall-popup").click();
                }, 3000)
            }

            if (is_auto_pop_allowed == true && is_form_assist_auto_pop_allowed == false) {
                auto_popup = setTimeout(function(e) {
                   // document.getElementById("allincall-popup").click();
                  //bubble code
                   document.getElementById("notification-count").style.display="flex"
                   document.getElementById("notification-message-div").style.display="block"
                 //end
                }, auto_pop_up_timer * 1000)
            }
            show_web_landing_intents();
            check_campaign_link();
        }
    }
    xhttp.send(params);

    window.addEventListener('message', function(event) {
        // IMPORTANT: Check the origin of the data! 
        if (~event.origin.indexOf(SERVER_URL)) {

            // The data has been sent from your site 
            // The data sent with postMessage is stored in event.data

            // setting feedback done cookie
            if (event.data.event_id === "isFeedBackDone") {
                easychat_set_cookie("isFeedBackDone", event.data.data, "", "")
            }

            // setting livechat session cookie and user id cookie
            if (event.data.event_id === "livechat_cookie_session_user_id") {
                easychat_set_cookie("livechat_cookie_session_id", event.data.data.livechat_cookie_session_id, "", "")
            }

            if (event.data.event_id === "unset_livechat_cookies") {
                easychat_set_cookie("livechat_cookie_session_id", "", "", new Date().getTime())
            }

            if (event.data.event_id === "create-cobrowsing-lead" && is_easyassist_enabled == "true") {
                create_easyassist_cobrowsing_lead(event.data.data.phone, "Mobile Number");
                if (is_form_assist == "true") {
                    stop_all_activity();
                    window.clearTimeout(timer);
                }
                // $('#allincall-chat-box', window.document).hide("slow");
                // $('#allincall-popup', window.document).show("slow");
                //console.log("cobrowsing has been initiated");
                return;
            }

            if (event.data.event_id === "connect-with-agent" && is_easyassist_enabled == "true") {
                connect_with_easyassist_agent_with_details(event.data.data.full_name, event.data.data.mobile_number);
                if (is_form_assist == "true") {
                    stop_all_activity();
                    window.clearTimeout(timer);
                }
                //$('#allincall-chat-box', window.document).hide("slow");
                //$('#allincall-popup', window.document).show("slow");
                document.getElementById('allincall-chat-box').style.display="none";
                document.getElementById('allincall-popup').style.display = 'block';
                // document.getElementById("allincall-minimize-popup").style.display = "block";
                return;
            }

            if (event.data.event_id === "set_cookie") {
                easychat_set_cookie(event.data.data.cookie_name, event.data.data.cookie_value, event.data.data.expiration, event.data.data.path);
                return;
            }

            if (is_form_assist == 'true') {
                if (event.data == "disable-form-assist") {
                    close_chatbot_animation()
                    setTimeout(function() {
                        document.getElementById("allincall-popup").style.display = "block";
                        if (is_minimization_enabled) {
                            document.getElementById("allincall-minimize-popup").style.display = "block";
                        }
                        document.getElementById("allincall-chat-box").style.display = "none";
                    }, 1000);
                    easychat_form_assist_id = "";
                    element_id = ""
                    window.clearTimeout(timer);
                    stop_all_activity()
                }
                if (event.data == "enable-form-assist") {
                    window.clearTimeout(timer);
                    enable_form_assist()
                }
            }

            if (event.data == "minimize-chatbot") {
                is_bot_minimized = true
                document.getElementById("allincall-chat-box").contentWindow.postMessage({
                    event_id: 'chatbot_minimized_state',
                    data: is_bot_minimized

                }, "*")
                minimize_chatbot_animation()
                setTimeout(function() {
                    document.getElementById("allincall-popup").style.display = "block";
                    if (is_minimization_enabled) {
                        document.getElementById("allincall-minimize-popup").style.display = "block";
                    }
                    document.getElementById("allincall-chat-box").style.display = "none";
                }, 1000);
                easychat_minimized_chatbot = true;
                easychat_page_category = "";
                easychat_form_assist_id = "";
                if (is_form_assist == 'true') {
                    element_id = ""
                    window.starting_element = false
                    window.clearTimeout(auto_form_pop_timer)
                    window.clearTimeout(timer);
                    timer_is_on = 0
                    check_user_activity_status()
                }
            }
            //bubble code
            if (event.data.event_id == "agent_unread_message"){
                document.getElementById("notification-count").innerHTML=event.data.data["message_count"];
                document.getElementById("notification-count").style.display="flex";
            }
              //end
            if (event.data.event_id == "chatbot_minimized_state") {
                document.getElementById("allincall-popup").click();
   //bubbule code
                document.getElementById("notification-count").style.display="none";
   //end
                is_bot_minimized = false
                    // document.getElementById('tooltiptext-minimize').style.display ="block";
                document.getElementById("allincall-chat-box").contentWindow.postMessage({
                    event_id: 'chatbot_minimized_state',
                    data: is_bot_minimized
                }, "*")

            }
            if (event.data == "close-bot") {
                close_chatbot_animation()
                setTimeout(function() {
                    document.getElementById("allincall-popup").style.display = "block";
                    if (is_minimization_enabled) {
                        document.getElementById("allincall-minimize-popup").style.display = "block";
                    }
                    document.getElementById("allincall-chat-box").style.display = "none";
                }, 1000);
                easychat_page_category = "";
                easychat_form_assist_id = "";
                easychat_minimized_chatbot = false;
                if (is_form_assist == 'true') {
                    element_id = ""
                    window.starting_element = false
                    window.clearTimeout(auto_form_pop_timer)
                    window.clearTimeout(timer);
                    timer_is_on = 0
                    check_user_activity_status()
                }
            }

            if (event.data == "share-screen") {
                share_screen();
            }

            if (is_form_assist == 'true') {
                if (event.data == 'stop-form-assist') {
                    clearTimeout(timer);
                    stop_form_assist = true
                    easychat_form_assist_id = "";
                    stop_user_activity_status();
                }
            }

        } else {
            // The data hasn't been sent from your site! 
            // Be careful! Do not use it. 
            return;
        }

    });
}

function close_chatbot_animation() {
    var chat_box_window = document.getElementById("allincall-chat-box");
    try {
        chat_box_window.classList.remove("animate__animated")
        chat_box_window.classList.remove("animate__slideInUp")
        if (BOT_POSITION == "bottom-right") {
            chat_box_window.classList.remove("scale-out-br")
        } else if (BOT_POSITION == "bottom-left") {
            chat_box_window.classList.remove("scale-out-bl")
        }
    } catch (err) {}
    chat_box_window.className += "animate__animated animate__slideOutDown"
}

function send_message_into_allincall_chatbot_window(message) {
    var is_visible = true;
    if (document.getElementById("allincall-chat-box").style.display != "block") {
        //document.getElementById("allincall-popup").click();
        is_visible = false;
    }

    if (is_visible) {
        allincall_chat_window = document.getElementById("allincall-chat-box").contentWindow;
        allincall_chat_window.postMessage(message, SERVER_URL);
    } else {
        setTimeout(function(e) {
            allincall_chat_window = document.getElementById("allincall-chat-box").contentWindow;
            allincall_chat_window.postMessage(message, SERVER_URL);
        }, 2000);
    }
}

function hide_notification() {
    document.getElementById("chatbox-notification").style.display = "none";
    document.getElementById("cross-chatbox-notification").remove();
}

function show_cross() {
    try {
        document.getElementById("cross-chatbox-notification").style.display = "block";
    } catch (err) {}
}

function dont_show_cross() {
    try {
        document.getElementById("cross-chatbox-notification").style.display = "none";
    } catch (err) {}
}

function open_up_bot() {
    document.getElementById("allincall-popup").click();
}

function minimize_chatbot_animation() {
    var chat_box_window = document.getElementById("allincall-chat-box");
    try {
        chat_box_window.classList.remove("animate__animated")
        chat_box_window.classList.remove("animate__slideInUp")
        chat_box_window.classList.remove("animate__animated")
        chat_box_window.classList.remove("animate__slideOutDown")
    } catch (err) {}
    if (BOT_POSITION == "bottom-right") {
        chat_box_window.className += "scale-out-br";
    } else if (BOT_POSITION == "bottom-left") {
        chat_box_window.className += "scale-out-bl";
    }

}
//bubble code
function hide_auto_pop_up_notification_text(){
    document.getElementById("notification-message-div").style.display="none";
    document.getElementById("notification-count").style.display="none";
}

Youez - 2016 - github.com/yon3zu
LinuXploit