(function(global) {
'use strict';
var iframe = document.createElement('iframe');
// Attributes
iframe['id'] = 'motion-chat-iframe';
iframe['src'] = 'https://elpaso-mo2-vcc.answernet.com:443/snippet?location=' + btoa(window.location.host) + '&version=1.0.16&onlineForm=&offlineForm=&id=7&name=Ramsey_Washington_FSPP&address=https%3A%2F%2FCompozeLabsShopify.com&description=%2B16232883776&mapKey=email&mapKeyOffline=email&key=CLNT&agentAlias=Agent&customerAlias=Me&color=%23256d33&color_button=%23256d33&textColor=%23ffffff&fontSize=15&remote=https%3A%2F%2Felpaso-mo2-vcc.answernet.com%3A443&animation=true&header_shape=rounded&header_online=Have%20a%20question%3F%20Chat%20Now!&start_chat_button=Chat&offline_chat_button=Send&header_offline=Contact%20us&download_transcript=true&timeout=0&whiteLabel=Powered%20by%20xCALLY&defaultWhiteLabel=true&sitepic=&closingQuestion=Do%20you%20want%20to%20close%20the%20interaction%3F&formSubmitSuccessMessage=Form%20properly%20submitted&formSubmitFailureMessage=Form%20submission%20error¬eTitle=Note&placeholderMessage=Type%20a%20message&closingMessage=Thank%20you%20for%20contacting%20Ramsey%20and%20Washington%20Counties%E2%80%99%20food%20scraps%20pickup%20program!&closingMessageButton=Close&skipMessageButton=NEW%20CHAT&conditionAgreement=false&enableRating=false&enableFeedback=false&enableSendButton=false&feedbackTitle=Feedback&ratingType=star&ratingStarsNumber=5&token=ixaCwl24W35e648paNyxjeUcLXkStKmk&autoclose=true&enableCustomerWriting=false&forwardTranscript=false&forwardTranscriptMessage=&forwardOffline=false&forwardOfflineAddress=&waitingTitle=All%20of%20our%20agents%20are%20busy%20at%20this%20time.%20Your%20chat%20is%20very%20important%20to%20us.&waitingMessage=Please%20hold%20and%20we%20will%20answer%20your%20request%20as%20soon%20as%20possible.&offlineMessageSubject=New%20offline%20message%20from%20websiteName&offlineMessageBody=You%20received%20a%20new%20offline%20message%20from%20websiteName.%20Here%20you%20can%20find%20the%20details%20of%20the%20request%3A&enableUnmanagedNote=true&unmanagedMessage=Your%20request%20has%20not%20been%20processed.&skipUnmanaged=Skip&sendUnmanaged=Send&enableCustomerAttachment=false&enableCustomerCheckmarks=false&agentAvatar=1679440136797-Food%20Scraps%20Pickup%20Favicon_1%20(2).jpg&showAgentAvatar=false&timezone=¬ificationTemplate=%3Cp%3EAccount%3A%20%7B%7Baccount.name%7D%7D%3Cbr%20%2F%3E%0A%7B%7B%23queue%7D%7DQueue%3A%20%7B%7Bqueue.name%7D%7D%3Cbr%20%2F%3E%0A%7B%7B%2Fqueue%7D%7DFrom%20%3A%20%7B%7Bfrom%7D%7D%3C%2Fp%3E%0A¬ificationSound=true¬ificationShake=false&hideWhenOffline=false&agentIdentifier=website_alias&waitForTheAssignedAgent=10&alignment=bottom_right&verticalAlignment=30&messagesAlignment=alternate&defaultTitle=&customerAvatar=1679519309750-FSPP%20User.png&showCustomerAvatar=true&messageFontSize=14&backgroundColor=%23fafafa&queueTransfer=true&queueTransferTimeout=300&agentTransfer=false&agentTransferTimeout=300&systemAlias=System&systemAvatar=&mandatoryDispositionPauseId=&mandatoryDisposition=false&createdAt=&updatedAt=&ListId=5&IntervalId=&Interval=&customerIp=3.139.85.113&referer=&openedInteractions=27&maxInteractions=0&virtual=&online=true&custom=false';
var alignment="bottom_right";
var verticalAlignment="30";
var iframe_status = false;
var link_mobile = document.createElement('link');
link_mobile.href = 'https://elpaso-mo2-vcc.answernet.com:443/snippet/styles/mobile.css?version=1.0.16';
link_mobile.rel='stylesheet';
link_mobile.type = "text/css";
// Bottom, right
iframe.className = 'motion-chat-iframe-bottom_right';
verticalAlignment = 0;
iframe.appendChild(link_mobile);
document.body.appendChild(iframe);
// START Events management
window.addEventListener('message', function(evt) {
switch (evt.data.cmd) {
case 'show':
// Bottom, right
iframe.style.top = 'auto';
iframe.style.bottom = '0px';
break;
case 'hide':
// Bottom, right
iframe.style.top = 'calc(100% - 50px)';
break;
case "init":
break;
case "offline":
break;
default:
}
}, false);
// END Events management
// START Proactive action management
// END Proactive action management
if (window.DeviceOrientationEvent) {
window.addEventListener('orientationchange', function() {
if (alignment == 'right'){
document.getElementById("chat_tab_arrow").innerHTML = " < ";
var iframeEl = document.getElementById('motion-chat-iframe');
iframeEl.contentWindow.postMessage({"evt":"hide"}, '*');
tab_status = 0;
iframe_h = topIframe_calc();
topIframe_set(iframe_h);
if(typeof div_tab != "undefined") topChat_set(iframe_h, verticalAlignment);
}
else if (alignment == 'left'){
document.getElementById("chat_tab_arrow").innerHTML = " > ";
var iframeEl = document.getElementById('motion-chat-iframe');
iframeEl.contentWindow.postMessage({"evt":"hide"}, '*');
tab_status = 0;
iframe_h = topIframe_calc();
topIframe_set(iframe_h);
if(typeof div_tab != "undefined") topChat_set(iframe_h, verticalAlignment);
} }, false);
}
window.addEventListener("resize", function(event) {
var iframe_h = topIframe_calc();
topIframe_set(iframe_h);
if(typeof div_tab != "undefined") topChat_set(iframe_h, verticalAlignment);
});
function topIframe_calc(){
var heightD = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
var iframeT = ((heightD/100)*verticalAlignment) + 450;
if (heightD < iframeT) {
var height_iframe = 450 - (iframeT - heightD);
}
else { height_iframe = 450; }
return height_iframe;
}
function topIframe_set(height_iframe){
if( height_iframe > 340){
iframe.style['height'] = height_iframe +'px';
if (alignment == "right" || alignment == "left" )
{ iframe.style['top'] = verticalAlignment + "%"; }
else{ iframe.style['bottom'] = "0%"; }
}
else {
iframe.style['height'] = '340px';
if (alignment == "right" || alignment == "left" )
{ iframe.style['top'] = "calc(100% - 340px)"; }
else{ iframe.style['bottom'] = "0%"; }
}
}
function topChat_set(height_iframe, verticalAlignment){
if( height_iframe > 340){
div_tab.style['top'] = "calc("+ verticalAlignment +"% + " + (height_iframe - 100) + "px)";
}
else {
div_tab.style['top'] = "auto";
div_tab.style['bottom'] = "0px";
}
}
}());