var Moneypenny=function(){var baseURL=("https:"===document.location.protocol?"https":"http")+"://moneypennychat.appspot.com",staticBaseURL=("https:"===document.location.protocol?"https":"http")+"://storage.googleapis.com/moneypennychat",newCaseJSON={},useXmlHttp,webCapture=!0,ready=!0,chatInProgress=!1,widgetId="",dbCaseId="",caseId="",plugins="",jsvars="",buttonImgUrl="",buttonPosition="left",buttonOffset="55%",buttonWidth=35,buttonHeight=73,email="",userName="",emailLocked=!1,description="",vval="",cvval={},cvvalRequired="",locale="en",buttonPos="-4px",formTopPos=0,chatFormPos="",logoLinkEnabled=!0,errorCode=-1,sshot=0,domain="",jre="",labelColor="",lightboxColor="white",requiredColor="",requiredMarker="",fbkText="",fbkLink="",fbkLinkText="",defaultSnapshot=0,snapshotBeforeChat=0,chatEmailRequired=1,chatDescriptionRequired=1,agentStatus=0,chatSound=!0,bgURL=staticBaseURL+"/wbg/moneypenny_form.png",waitImgLoaded=!1,dragFromX=0,dragFromY=0,formPosX=-1,formPosY=-1,dragging=!1,onmouseupPrev=null,onmousemovePrev=null,onmouseupInstalled=!1,onmousemoveInstalled=!1,formWidth,formHeight,rpcUrl="",rpcRetries=0,rpcIgnoreError=!0,rpcStack,rpcStackInitialLength=0,proactiveMsg="",proactiveNotify=!1,proactiveAgentNumber="",proactiveTimer=null,proactiveOfflineFallback=!1,proactiveAutocloseTimer=null,proactiveAutocloseTimerDelay=2,callmeButton="",useCustomCallMeButton=!1,callmePhone="",noProactiveChatDelay=30,visitorCookieLifeTime=0,offlineAllowed=!0,screenshotAllowed=!0,chatAllowed=!0,proactiveChatAllowed=!0,showScreenshotOpt=!0,startChatMessage="",pageChangeNotificationAllowed=!0,visitorChatHistory=!0,startChatRequested=!1,direction="",callbackOpen=null,callbackOpenProactive=null,callbackClose=null,callbackMessageSubmit=null,callbackStartChat=null,callbackChatMessageSent=null,callbackChatMessageReceived=null,callbackBeforeCallme=null,callbackStartCallme=null,callbackAgentOnline=null,callbackAgentCommand=null,callCallbackOpen=!1,historyEnabled=!0,country="",fromUrlOverride="",expiredAccount=!1,agentStatusLastCheck=0,agentStatusCheckInterval=110,mobileUI=null,mobileStyle=null,customDesignUI=null,customDesignStyle=null,hideButtonAPIUsed=!1,showButtonAPIUsed=!1,enableInternationalPhoneCalls=!1,agentTags=null,ruleSetArray=null,visitorClicks=0,visitorLocalTime=0,visitorCountry="",visitorRegion="",visitorCity="",visitorLanguages="",geoRPCSent=!1,isInstanceProactiveV2=!1,currentEvaluationStep=0,routingAvailabilityCache={},routingAvailabilityCacheLifetime=3e4,routingList=[],proactiveChatAgentRoutingRuleSetIndex=-1,waitingRPCResponce=!1,proactiveChatEvaluationFinishedCallback=null,openProactiveChatAPIRule=null,styleTag=null,menuButtonIconSpriteSheetURL=null,menuIconSpriteSheetURL=null,menuButtonStylesAdded=!1,menuStylesAdded=!1,preChatSearchStatus=-1,preChatSearchQuestion="",visitorFirstMessage="",animating=!1,entryPageRefOverride=null,entryPageOverride=null;return{setLocale:function(a){a&&(locale=a,a.length>6&&(locale=a.substr(0,5)))},startLink:function(){return"proactive"!==Moneypenny.getTypeOfChat()&&Moneypenny.startPreChat(),!1},startChat:function(a){return Moneypenny._isReactiveChat=!0,expiredAccount?void Moneypenny.populateFormStatus(-2):(this.preventProactiveChat(),this._hideButton(),chatInProgress||this.handleChatInProgress()||(startChatRequested=!0,proactiveMsg=a,this.sendGetWidgetConfig(!1)),!1)},startCall:function(){return Moneypenny._isReactiveChat=!0,expiredAccount?void Moneypenny.populateFormStatus(-2):(this.preventProactiveChat(),chatInProgress||(this.showLoading(),this.sendGetCallConfig()),!1)},setUserEmail:function(a,b){if(a&&"invalid@example.com"!=a)try{email=a.replace(/^[\s\+]+|[\s\+]+$/g,"")}catch(a){}1==b&&(emailLocked=!0),Moneypenny.isCustomDesignEnabled()&&Moneypenny.getCustomDesignUI().setUserEmail(email,b)},setDescription:function(a){description=a,Moneypenny.isCustomDesignEnabled()&&Moneypenny.getCustomDesignUI().setDescription(a)},setCustomField:function(a,b){Moneypenny.isCustomDesignEnabled()&&Moneypenny.getCustomDesignUI().setCustomField(a,b)},setUserName:function(a){if(a)try{userName=a.replace(/^[\s\+]+|[\s\+]+$/g,"")}catch(a){}MoneypennyChat.setUserNameCookie(userName),Moneypenny.isCustomDesignEnabled()&&Moneypenny.getCustomDesignUI().setUserName(userName)},setButtonEffect:function(a){buttonPos=a,this.buttonOut()},setFormTopPosition:function(a){formTopPos=a},setChatFormPosition:function(a){chatFormPos=a},getChatFormPosition:function(){return Moneypenny.isMobileEnabled()?"":Moneypenny.isCustomDesignEnabled()?"":chatFormPos},setDomain:function(a){if(""==widgetId)for(var b=a.replace(/\s+/g,"").split(","),c=0;c0?(rcpRetries=rpcRetries-1,this.doRpc()):rpcIgnoreError||this.populateFormStatus(6)},getWindowWidth:function(){var a=0;return window.innerWidth?a=window.innerWidth:self.innerWidth?a=self.innerWidth:document.documentElement&&document.documentElement.clientWidth?a=document.documentElement.clientWidth:document.body&&(a=document.body.clientWidth),a},getWindowHeight:function(){var a=0;return window.innerHeight?a=window.innerHeight:self.innerHeight?a=self.innerHeight:document.documentElement&&document.documentElement.clientHeight?a=document.documentElement.clientHeight:document.body&&(a=document.body.clientHeight),a},getOSBarHeight:function(){try{if(navigator.appVersion.indexOf("Win")!==-1)return 28;if(navigator.appVersion.indexOf("Mac")!==-1)return 75}catch(a){}return 0},isIE6:function(){try{return navigator.userAgent.toLowerCase().indexOf("msie 6")!==-1}catch(a){return!1}},isIE7:function(){try{return navigator.userAgent.toLowerCase().indexOf("msie 7")!==-1}catch(a){return!1}},isIE8:function(){try{return navigator.userAgent.toLowerCase().indexOf("msie 8")!==-1}catch(a){return!1}},isIE:function(){try{return navigator.appVersion.indexOf("MSIE")!==-1}catch(a){return!1}},isIE11:function(){try{return navigator.appVersion.indexOf("Trident")!==-1&&navigator.userAgent.indexOf("rv:11")!==-1}catch(a){return!1}},isQuirksMode:function(){return"CSS1Compat"!==document.compatMode},isFirefox:function(){try{return navigator.userAgent.indexOf("Firefox")!==-1}catch(a){return!1}},isSafari:function(){try{var a=navigator.userAgent.toLowerCase();return a.indexOf("safari")!=-1&&a.indexOf("chrome")==-1}catch(a){return!1}},useMobileOptimized:function(){return"undefined"!=typeof window.moneypenny_mobile&&navigator.userAgent.match(/(iPhone|iPod|BlackBerry|Android|IEMobile)/)},getMobileUI:function(){return mobileUI},isMobileEnabled:function(){return null!==mobileUI},useCustomDesign:function(){return"undefined"!=typeof window.chat_custom_design},getCustomDesignUI:function(){return customDesignUI},isCustomDesignEnabled:function(){return null!==customDesignUI},getCustomDesignIframe:function(){return document.getElementById(Moneypenny.getCustomDesignUI().helpers.getIframeId()).contentWindow.document},isInArray:function(a,b){if(a&&b)for(var c=0;cCall me now';var a=document.getElementById("Moneypenny_CallMe");a&&(Moneypenny.getUseCustomCallMeButton()?a.style.display="block":a.innerHTML=callmeButton)}},disableCallMe:function(){if(Moneypenny.isCustomDesignEnabled())Moneypenny.getCustomDesignUI().disableCallmeButtons();else{callmeButton="";var a=document.getElementById("Moneypenny_CallMe");a&&(Moneypenny.getUseCustomCallMeButton()?a.style.display="none":a.innerHTML=callmeButton)}},clickedCallMe:function(){this.callCallback("BeforeCallme","")||MoneypennyChat.populateCallMeForm()},disableButton:function(a){document.getElementById(a)&&(document.getElementById(a).disabled=!0)},injectDialog:function(a){var b="";if(Moneypenny.styleTag=document.getElementById("Moneypenny_Style"),!Moneypenny.styleTag){Moneypenny.styleTag=document.createElement("style"),Moneypenny.styleTag.id="Moneypenny_Style",Moneypenny.styleTag.type="text/css",Moneypenny.styleTag.styleSheet?Moneypenny.styleTag.styleSheet.cssText=b:Moneypenny.styleTag.appendChild(document.createTextNode(b));var c=document.head||document.getElementsByTagName("head")[0];c.appendChild(Moneypenny.styleTag),Moneypenny.addStyleRule(["#Moneypenny_WP","div","span","iframe","h1","h2","h3","h4","h5","h6","hr","p","a","big","em","img","q","small","strong","b","u","i","fieldset","input",'input[type="submit"]',"button","textarea","form","label"],"margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; font-weight: normal; vertical-align: baseline; float: none;max-width: none; max-height: none; letter-spacing: normal; line-height: normal;text-transform: none;-webkit-transform: none; -moz-transform: none; -ms-transform: none; -o-transform: none; transform: none; -webkit-transition-property: none; -moz-transition-property: none; -o-transition-property: none; transition: none;-webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none;font-feature-settings: normal; -webkit-font-feature-settings: normal; -moz-font-feature-settings: normal; -ms-font-feature-settings: normal; -o-font-feature-settings: normal; "),Moneypenny.addStyleRule(["*:before","*:after"],"display:none;"),Moneypenny.addStyleRule(["img"],""+Moneypenny.getDisplayInlineBlockCSS())}var d="position:fixed;_position:absolute;display:none;top:0%;_top:expression(eval(document.body.scrollTop));left:0px;width:100%;height:100%;text-align:left;z-index:2147483644;margin:0;padding:0;border-collapse:collapse;border-spacing:0;border:none;list-style:none;text-align:left;font-size:100%;font-weight:normal;outline:none;background-image:url('"+Moneypenny.getBlankImg()+"');background-repeat:repeat;",e="position:fixed;_position:absolute;display:none;z-index:2147483645;overflow:hidden;margin:0;padding:0;border-collapse:collapse;border-spacing:0;border:none;list-style:none;outline:none;",f="position:fixed;_position:absolute;display:none;top:0%;_top:expression(eval(document.body.scrollTop));left:0px;width:100%;height:2px;text-align:left;z-index:2147483646;",g='
',h='
";if(a){var i=document.getElementById("Moneypenny_W");i||(i=document.createElement("div"),i.id="Moneypenny_W",document.body.appendChild(i));var j=document.getElementById("Moneypenny_WP");j||(j=document.createElement("div"),j.id="Moneypenny_WP",document.body.appendChild(j));var k=document.getElementById("Moneypenny_Applet");k||(k=document.createElement("div"),k.id="Moneypenny_Applet",document.body.appendChild(k));try{i.setAttribute("style",d),j.setAttribute("style",e),k.setAttribute("style",f)}catch(a){}try{i.style.cssText=d,j.style.cssText=e,k.style.cssText=f}catch(a){}i.innerHTML=g,j.innerHTML=h+Moneypenny.soundNotificationDiv()}else document.write('
'+g+'
'+h+Moneypenny.soundNotificationDiv()+'
')},addStyleRule:function(a,b){if(Moneypenny.styleTag){var c="",d=1+"Moneypenny".length+3,e="";if("string"==typeof a)c="#Moneypenny_WP"!==a.substr(0,d)?"#Moneypenny_WP ":"",e=c+a+" { "+b+" } ";else if("object"==typeof a&&"undefined"!=typeof a.length){for(var f=0;f':(Moneypenny.allowChatSound(!1),"")},positionDragger:function(a,b,c,d){var e=document.getElementById("Moneypenny_DB");e.style.left=a+"px",e.style.top=b+"px",e.style.width=c+"px",e.style.height=d+"px"},moveForm:function(a,b){var c=document.getElementById("Moneypenny_WP");a<0&&(a=0),a>Moneypenny.getWindowWidth()-c.offsetWidth&&(a=Moneypenny.getWindowWidth()-c.offsetWidth),b<0&&(b=0),b>Moneypenny.getWindowHeight()-c.offsetHeight&&(b=Moneypenny.getWindowHeight()-c.offsetHeight),c.style.left=a+"px",c.style.top=b+"px",Moneypenny.formPosX=a,Moneypenny.formPosY=b},setupDraggerHandler:function(){try{var a=document.getElementById("Moneypenny_WP"),b=document.getElementById("Moneypenny_DB");b.onmousedown=function(a){if(Moneypenny.dragging=!0,document.getElementById&&!document.all)Moneypenny.dragFromX=a.pageX,Moneypenny.dragFromY=a.pageY;else{var b=document.compatMode&&"BackCompat"!=document.compatMode?document.documentElement:document.body;Moneypenny.dragFromX=event.clientX+b.scrollLeft,Moneypenny.dragFromY=event.clientY+b.scrollTop}return!1},onmouseupInstalled||onmouseupPrev||!document.onmouseup||"function"!=typeof document.onmouseup||(onmouseupPrev=document.onmouseup),onmouseupInstalled=!0,document.onmouseup=function(a){if(Moneypenny.dragging&&(Moneypenny.formPosX>-1||Moneypenny.formPosY>-1)){var b=[Moneypenny.formPosX,-1,Moneypenny.formPosY,-1];Moneypenny.calculateAndSetInViewportPosition(b)}Moneypenny.dragging=!1;try{onmouseupPrev&&onmouseupPrev(a)}catch(a){}},onmousemoveInstalled||onmousemovePrev||!document.onmousemove||"function"!=typeof document.onmousemove||(onmousemovePrev=document.onmousemove),onmousemoveInstalled=!0,document.onmousemove=function(b){if(Moneypenny.dragging){var c=0,d=0;if(document.getElementById&&!document.all)c=a.offsetLeft+b.pageX-Moneypenny.dragFromX,d=a.offsetTop+b.pageY-Moneypenny.dragFromY,Moneypenny.dragFromX=b.pageX,Moneypenny.dragFromY=b.pageY;else{var e=document.compatMode&&"BackCompat"!=document.compatMode?document.documentElement:document.body;c=a.offsetLeft+event.clientX+e.scrollLeft-Moneypenny.dragFromX,d=a.offsetTop+event.clientY+e.scrollTop-Moneypenny.dragFromY,Moneypenny.dragFromX=event.clientX+e.scrollLeft,Moneypenny.dragFromY=event.clientY+e.scrollTop}Moneypenny.moveForm(c,d);try{onmousemovePrev&&onmousemovePrev(b)}catch(a){}return!1}try{onmousemovePrev&&onmousemovePrev(b)}catch(a){}return!0}}catch(a){}},injectButton:function(a,b,c,d,e){"https:"===document.location.protocol&&(d&&(d=d.replace("http://","https://")),e&&(e=e.replace("http://","https://")));var f,g="",h=buttonOffset;f="%"==h.substr(h.length-1,1)?"left"==buttonPosition||"right"==buttonPosition?Math.round(h.substr(0,h.length-1)*this.getWindowHeight()/100):Math.round(h.substr(0,h.length-1)*this.getWindowWidth()/100):h.substr(0,h.length-2);var i="";if(b||""!=buttonImgUrl||(i=this.getMessage(0)), d&&e&&d==e)buttonImgUrl=d,buttonWidth=-1,buttonHeight=-1;else if(b||d&&e){var j="w="+a+"&rand="+encodeURIComponent(Math.floor(4294967295*Math.random()).toString(16));j=Moneypenny.appendTagsParameter(j),buttonImgUrl=baseURL+"/statusImage?"+j,buttonWidth=-1,buttonHeight=-1,d&&e&&(buttonImgUrl+="&on="+encodeURIComponent(d)+"&off="+encodeURIComponent(e))}else if(""==buttonImgUrl&&(buttonImgUrl=staticBaseURL+"/btn/help_"+buttonPosition+"_"+locale,buttonImgUrl+=this.isIE6()?".gif":".png","top"==buttonPosition||"bottom"==buttonPosition)){var k=buttonWidth;buttonWidth=buttonHeight,buttonHeight=k}switch(buttonPosition){case"left":g+="body .Moneypenny_Button{cursor:pointer;cursor:hand;overflow:hidden;position:fixed;_position:absolute;display:block;top:"+h+";_top:expression(eval(document.body.scrollTop)+"+f+");left:0px;z-index:2147000000;margin:0;padding:0;border-collapse:collapse;border-spacing:0;border:none;outline:none;font-size:0px;line-height:0px;}";break;case"right":g+="body .Moneypenny_Button{cursor:pointer;cursor:hand;overflow:hidden;position:fixed;_position:absolute;display:block;top:"+h+";_top:expression(eval(document.body.scrollTop)+"+f+");right:0px;z-index:2147000000;margin:0;padding:0;border-collapse:collapse;border-spacing:0;border:none;outline:none;font-size:0px;line-height:0px;}";break;case"top":g+="body .Moneypenny_Button{cursor:pointer;cursor:hand;overflow:hidden;position:fixed;_position:absolute;display:block;top:0px;left:"+h+";_left:expression(eval(document.body.scrollLeft)+"+f+");z-index:2147000000;margin:0;padding:0;border-collapse:collapse;border-spacing:0;border:none;outline:none;font-size:0px;line-height:0px;}";break;case"bottom":g+="body .Moneypenny_Button{cursor:pointer;cursor:hand;overflow:hidden;position:fixed;_position:absolute;display:block;bottom:0px;left:"+h+";_left:expression(eval(document.body.scrollLeft)+"+f+");z-index:2147000000;margin:0;padding:0;border-collapse:collapse;border-spacing:0;border:none;outline:none;font-size:0px;line-height:0px;}"}g+=" @media print{body .Moneypenny_Button{display:none;}}";var l="";buttonWidth>0&&buttonHeight>0&&(l='width="'+buttonWidth+'" height="'+buttonHeight+'"');var m=''+i+'';if(c){var n=document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",o.styleSheet?o.styleSheet.cssText=g:o.appendChild(document.createTextNode(g)),n.appendChild(o);var p=document.getElementById("Moneypenny_Button");p||(p=document.createElement("div"),p.id="Moneypenny_Button",p.className="Moneypenny_Button",p.onclick=Moneypenny.startLink,document.body.appendChild(p)),p.innerHTML=m}else document.write('"),document.write('
'+m+"
");this.buttonOut()},buttonOver:function(){var a=document.getElementById("Moneypenny_bImg").style;switch(buttonPosition){case"left":a.left="0px";break;case"right":a.right="0px";break;case"top":a.top="0px";break;case"bottom":a.bottom="0px"}this.preloadLoadingImg()},buttonOut:function(){try{var a=document.getElementById("Moneypenny_bImg").style;switch(buttonPosition){case"left":a.left=buttonPos;break;case"right":a.right=buttonPos;break;case"top":a.top=buttonPos;break;case"bottom":a.bottom=buttonPos}}catch(a){}},isWebCapture:function(){return webCapture&&(!chatInProgress||snapshotBeforeChat)&&this.isScreenshotCapable()},showForm:function(a,b,c,d,e,f,g){Moneypenny.formWidth=b,Moneypenny.formHeight=c;var h=document.getElementById("Moneypenny_P"),i=document.getElementById("Moneypenny_IP"),j=document.getElementById("Moneypenny_WP"),k=document.getElementById("Moneypenny_W"),l=document.getElementById("Moneypenny_O");j.style.width=b+"px",j.style.height=c+"px",h.style.width=b+"px",h.style.height=c+"px",i.style.left=d+"px",i.style.top=e+"px",i.style.width=f+"px",i.style.height=g+"px",j.style.display="block",h.style.display="block",f>0&&g>0?i.style.display="block":i.style.display="none",a&&""!=lightboxColor?(k.style.display="block",l.style.display="block",l.style.width=this.getWindowWidth()+"px",l.style.height=this.getWindowHeight()+"px"):(k.style.display="none",l.style.display="none");var m=[-1,-1,-1,-1];MoneypennyChat.isFirstInit()&&Moneypenny.formPosX&&Moneypenny.formPosY?(m[0]=Moneypenny.formPosX,m[2]=Moneypenny.formPosY):m=this.getDefaultChatPosition(a),i.innerHTML='',Moneypenny.positionForm(m[0],m[1],m[2],m[3]),this.setupDraggerHandler()},getDefaultChatPosition:function(a){if(!Moneypenny.isCustomDesignEnabled()){var b=-1,c=-1,d=-1,e=-1;switch(Moneypenny.getChatFormPosition()){case"tl":c=0,d=0;break;case"tr":b=0,d=0;break;case"bl":c=0,e=0;break;case"br":default:b=0,e=0}if(a||"c"===Moneypenny.getChatFormPosition()){var f=document.getElementById("Moneypenny_P");b=-1,e=-1,c=Math.round(this.getWindowWidth()/2-f.offsetWidth/2),c<=0&&(c=0),0!==formTopPos?d=formTopPos:(d=Math.round(this.getWindowHeight()/2-f.offsetHeight/2),d<=0&&(d=0))}return[c,b,d,e]}},positionForm:function(a,b,c,d,e){if(!Moneypenny.isAnimating()||e){var f=document.getElementById("Moneypenny_WP");if(this.isIE6()){var g=document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop,h=document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft;c?f.style.top=g+c+"px":f.style.top=g+Moneypenny.getWindowHeight()-d-f.offsetHeight+"px",a?f.style.left=h+a+"px":f.style.left=h+Moneypenny.getWindowWidth()-b-f.offsetWidth+"px"}else f.style.top=c!=-1?c+"px":"",f.style.bottom=d!=-1?d+"px":"",f.style.left=a!=-1?a+"px":"",f.style.right=b!=-1?b+"px":""}},getPositionArray:function(){for(var a=document.getElementById("Moneypenny_WP"),b=[parseInt(a.style.left,10),parseInt(a.style.right,10),parseInt(a.style.top,10),parseInt(a.style.bottom,10)],c=0;c=0?d=setTimeout(i,b-j):(d=null,c||(h=a.apply(f,e),d||(f=e=null)))};return function(){f=this,e=arguments,g=(new Date).getTime();var j=c&&!d;return d||(d=setTimeout(i,b)),j&&(h=a.apply(f,e),f=e=null),h}},addOnResizeHandler:function(){function a(a){if(chatInProgress){var c=b.getPositionArray();b.isOutsideViewport(c)&&b.calculateAndSetInViewportPosition(c)}}if(!Moneypenny.isMobileEnabled()&&!Moneypenny.isCustomDesignEnabled()){var b=this,c=this.debounce(a,100);if(window.addEventListener)window.addEventListener("resize",c,0);else if(window.attachEvent)window.attachEvent("onresize",c);else{var d=window.onresize,e=function(a){c(a),d&&d(a)};window.onresize=e}}},isOutsideViewport:function(a){return Moneypenny.isOutsideViewportEdgeTop(a)||Moneypenny.isOutsideViewportEdgeRight(a)||Moneypenny.isOutsideViewportEdgeBottom(a)},isOutsideViewportEdgeTop:function(a){return Moneypenny.formHeight>Moneypenny.getWindowHeight()||a[2]<-1},isOutsideViewportEdgeRight:function(a){if(Moneypenny.formWidth>Moneypenny.getWindowWidth())return!0;var b=a[0],c=b+Moneypenny.formWidth;return Moneypenny.getWindowWidth()a/2?c+(a-c)*(1-Math.cos(h*Math.PI/e/2)):c-(c+Moneypenny.formWidth)*(1-Math.cos(h*Math.PI/e/2)),0==h&&(Moneypenny.isAnimating(!0),setTimeout("Moneypenny.isAnimating(false);",f)),setTimeout("Moneypenny.positionForm("+g+", -1, "+d+", -1, true);",h*f/e);setTimeout("Moneypenny.closeForm(true);",f)}},slideFormIn:function(){for(var a=Moneypenny.getWindowWidth(),b=document.getElementById("Moneypenny_WP"),c=b.offsetLeft,d=b.offsetTop,e=20,f=600,g=0,h=0;ha/2?c+(a-c)*(1-Math.sin(h*Math.PI/e/2)):c-(c+Moneypenny.formWidth)*(1-Math.sin(h*Math.PI/e/2)),0==h){Moneypenny.positionForm(g,-1,d,-1),Moneypenny.isAnimating(!0),setTimeout("Moneypenny.isAnimating(false);",f);var i=Moneypenny.getDefaultChatPosition();setTimeout("Moneypenny.positionForm("+i[0]+","+i[1]+","+i[2]+","+i[3]+");",f+1)}else setTimeout("Moneypenny.positionForm("+g+", -1, "+d+", -1, true);",h*f/e)},getCSS:function(a,b,c,d,e,f){var g=";position:absolute;display:block;margin:0;padding:0;border:none;float:none;clear:none;";return void 0!=a&&(g+="left:"+a+"px;"),void 0!=b&&(g+="top:"+b+"px;"),void 0!=c&&(g+="width:"+c+"px;max-width:"+c+"px;min-width:"+c+"px;"),void 0!=d&&(g+="height:"+d+"px;max-height:"+d+"px;min-height:"+d+"px;"),g+="z-index:2;background-color:transparent;background:none;font-style:normal;font-weight:normal;font-size:100%;line-height:normal;text-shadow:none;list-style:none;"+(""==direction?"text-align:left;":"text-align:right;")+"outline:none;text-indent:0px;-moz-box-shadow:none;-webkit-box-shadow:none;"+direction,void 0!=e&&(g+=e.replace(/"/g,"'")),void 0!=f&&(g+=f.replace(/"/g,"'")),g},getSystemMessageCSS:function(a,b,c,d,e,f){return Moneypenny.getCSS(a,b,c,d,e,f)+"position: relative; background-color: #D5E8EA; border: 1px solid #D5E8EA; border-radius: 4px; -moz-border-radius: 4px; -webkit-border-radius: 4px; margin: 5px 0px; font-size: .9em; display: inline-block;"},getBlankImg:function(){return this.isIE6()?staticBaseURL+"/wbg/blank.gif":staticBaseURL+"/wbg/blank.gif"},preloadLoadingImg:function(){if(!waitImgLoaded){waitImgLoaded=!0;var a=new Image;a.src=staticBaseURL+"/wbg/loading.gif"}},showLoading:function(){document.getElementById("Moneypenny_P").innerHTML='
Loading...
',this.showForm(!0,31,31,0,0,0,0)},loadForm:function(){this.showLoading();var a=new Image;return a.onload=function(){Moneypenny.populateForm()},a.src=bgURL,!1},getMoneypennySiteUrl:function(){return"https://moneypennychat.appspot.com/partner?src=widget&id="+widgetId+"&l="+Moneypenny.getLocale()},getLogoClickATag:function(){var a=MoneypennyChat.getPageTitle(!1).toLowerCase(),b=a.indexOf("live chat")!=-1||a.indexOf("online chat")!=-1;return'"},logoLink:function(){return"9a9bb60a-5a65-400c-a6a6-c4095f88c3a7"!==widgetId&&"594d526a-8b21-4dea-9937-941fab9c959d"!==widgetId&&"8f3f2320-a57b-4cd9-9cc2-7030c2984f76"!==widgetId&&"de9efea5-50ce-405b-ba38-d597c5d63bc7"!==widgetId&&"ad15d298-5080-406e-acad-0fa1eb07c1e4"!==widgetId&&"e5277a72-aea3-4184-b8eb-f056273a52e9"!==widgetId&&"e09b64f1-5bf5-415d-8fc0-1a633f5f01b5"!==widgetId&&"c314e9a6-57ca-4db9-bab6-6a902284e0da"!==widgetId&&"23a8596b-1662-4f10-b111-e733c61e2294"!==widgetId&&"7c9d6f66-5ac9-4d4c-aa76-3b803cb4d873"!==widgetId&&"fc798239-0a16-462d-b012-654cf57b0bc8"!==widgetId&&"8c5066d4-7432-484a-a297-3f8e20b09a54"!==widgetId&&"40277fbf-4da8-4569-8ea2-573323e291f6"!==widgetId&&"c4c0c4a0-03e7-49bf-ba4e-09467f70d658"!==widgetId&&"9e7310f0-e8a4-4210-9033-98d3ef28f95c"!==widgetId&&"d960b840-4485-43ca-9831-0ab9a0429f24"!==widgetId&&"e268792b-888d-427c-8ebc-e8f6f1265df7"!==widgetId&&"72b6e844-1e7c-40fe-9b99-b7d4d1aa8d04"!==widgetId&&"8b59b679-9d15-4cb4-aabe-cc9f568d063a"!==widgetId&&"265d60a8-376b-40bc-ab69-0445743a495a"!==widgetId&&"86adddeb-2525-4024-90ac-0f4f4b64774a"!==widgetId&&"f27f627a-51ab-401c-9723-5973d6eb0b2f"!==widgetId&&"edf28ea6-a25f-45da-99d5-1769fa6c6124"!==widgetId&&"5d4fafca-1b3e-4d70-bd73-74b5824ae0ae"!==widgetId&&"d0735f2b-0512-4af5-bdec-96acf9cfff04"!==widgetId&&"21f59ab7-5d72-4dfe-bb3d-6e25cbccf5a9"!==widgetId&&"171eb702-b6f8-4bd6-aa11-b537f7fb167b"!==widgetId&&"299e9557-a29b-4948-b143-fa5a6fce3faf"!==widgetId&&logoLinkEnabled},getInvisibleDivIEFixCSS:function(){return'background-color: #ffffff;-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";filter: alpha(opacity=0);-moz-opacity: 0;-khtml-opacity: 0;opacity: 0;'},initMinimizeArea:function(a,b,c,d){if(!Moneypenny.isQuirksMode()){"undefined"==typeof MoneypennyChat.getChatWindowCookieData("isMinimized")&&MoneypennyChat.setChatWindowCookieData("isMinimized",!1),MoneypennyChat.minimizedDimensions=[a,b,c,d];var e=document.getElementById("Moneypenny_RB");if(!e){e=document.createElement("div"),e.id="Moneypenny_RB",Moneypenny.addStyleRule("#Moneypenny_WP #Moneypenny_RB","position: absolute; z-index: 12; cursor: pointer; left: "+a+"px; top: "+b+"px; width: "+c+"px; height: "+d+"px; display: none;"+Moneypenny.getInvisibleDivIEFixCSS()),Moneypenny.addStyleRule("#Moneypenny_WP.minimized #Moneypenny_RB","display: block;");try{e.setAttribute("onclick","MoneypennyChat.minimizeToggle()")}catch(a){}try{e.onclick=function(){MoneypennyChat.minimizeToggle()}}catch(a){}document.getElementById("Moneypenny_WP").appendChild(e)}}},initMinimizeNotification:function(a,b,c,d,e,f,g,h,i){if(!Moneypenny.isQuirksMode()){var j=document.getElementById("Moneypenny_WP"),k=document.getElementById("Moneypenny_NMN"),l=document.getElementById("Moneypenny_NMNi");k||(k=document.createElement("div"),k.id="Moneypenny_NMN"),l||(l=document.createElement("span"),l.id="Moneypenny_NMNi"),a=a?a:0,b=b?b:0,c=c?c:25,d=d?d:20,g=g?g:"#FF0000",f=f?f:3,i=i?i:"",e=e?e:16,h=h?h:"#FFFFFF";var m="display: none; position: absolute; left:"+a+"px; top:"+b+"px; z-index: 2; font-size:"+e+"px; text-align: center; cursor: pointer; background-color: "+g+"; color: "+h+"; -webkit-border-radius:"+f+"px; border-radius:"+f+"px;"+i,n=Moneypenny.getDisplayInlineBlockCSS()+" box-sizing: border-box; color: "+h+"; font-size: 1em; font-weight: bold; padding:0 0.3em;",o=d===c,p=(d/e).toFixed(4);n+=o?" line-height:"+p+"em; min-width:"+p+"em;":" line-height:"+d+"px; min-width:"+c+"px;";try{k.setAttribute("style",m),k.setAttribute("onclick","MoneypennyChat.minimizeToggle()"),l.setAttribute("style",n)}catch(a){}try{k.style.cssText=m,k.onclick=function(){MoneypennyChat.minimizeToggle()},l.style.cssText=n}catch(a){}j.appendChild(k),k.appendChild(l)}},initChatBoxMenuButton:function(a,b,c,d,e,f,g,h){if(!(Moneypenny.isQuirksMode()||Moneypenny.isIE6()||Moneypenny.isIE7()||Moneypenny.isIE8())){var i=document.getElementById("Moneypenny_WP"),j=document.getElementById("Moneypenny_CBMBtn"),k=document.getElementById("Moneypenny_CBMBtnI");if(!j){if(j=document.createElement("div"),j.id="Moneypenny_CBMBtn",k||(k=document.createElement("i"),k.id="Moneypenny_CBMBtnI"),j.appendChild(k),!menuButtonStylesAdded){if(a=a?a:Moneypenny.formWidth-30,b=b?b:10,c=c?c:20,d=d?d:20,e=e?e:"black",f=f?f:"transparent",extraCSS=g?g:"",MoneypennyChat._chatMenuButtonHeight=d,h)Moneypenny.menuButtonIconSpriteSheetURL=h;else{var l=Moneypenny.getStaticBaseURL()+"/wbg/minBtn_sprites_v2_";switch(e){case"white":case"#FFFFFF":case"#ffffff":Moneypenny.menuButtonIconSpriteSheetURL=l+"white2x.png";break;case"black":case"#000000":default:Moneypenny.menuButtonIconSpriteSheetURL=l+"black2x.png"}}var m="position: absolute; z-index: 2;";Moneypenny.addStyleRule("#Moneypenny_CBMBtn",m+"left:"+a+"px; top:"+b+"px; width:"+c+"px; height:"+d+"px; cursor: pointer; display: block; background-color: "+f+"; color: "+e+"; "+g),Moneypenny.addStyleRule(["#Moneypenny_WP:not(.minimized) #Moneypenny_CBMBtn:hover"],"border-bottom-left-radius: 0; border-bottom-right-radius: 0;"),Moneypenny.addStyleRule("#Moneypenny_CBMBtn>i",m+"right:0px; top:0px; width:20px; height:20px; background-image: url("+Moneypenny.menuButtonIconSpriteSheetURL+"); background-size: 40px 80px; background-repeat: no-repeat; background-position: "+Moneypenny.getIconCoords("chevron-down")+";"),Moneypenny.addStyleRule("#Moneypenny_WP.minimized #Moneypenny_CBMBtn>i","background-position: "+Moneypenny.getIconCoords("chevron-up")+";"),Moneypenny.addStyleRule(["#Moneypenny_CBM"],"display:none;")}i.appendChild(j)}}},initChatBoxMenu:function(a,b,c,d,e,f){if(!Moneypenny.isQuirksMode()){var g=document.getElementById("Moneypenny_CBMBtn");if(g){var h=document.getElementById("Moneypenny_CBM");if(!h){h=document.createElement("div"),h.id="Moneypenny_CBM";var i=document.getElementById("Moneypenny_CBMHoverHelper");if(!i){if(i=document.createElement("div"),i.id="Moneypenny_CBMHoverHelper",!menuStylesAdded){var j,k,l,m=Moneypenny.getStaticBaseURL()+"/wbg/minBtn_sprites_v2_";switch(a=a?a:"",extraCSS=e?e:"",c=c?c:"#000000"){case"white":case"#FFFFFF":case"#ffffff":j="#FFFFFF",k=d?d:"#555555",l=b?b:"#000000",Moneypenny.menuIconSpriteSheetURL=f?f:m+"white2x.png";break;case"black":case"#000000":default:j="#000000",k=d?d:"#EEEEEE",l=b?b:"#FFFFFF",Moneypenny.menuIconSpriteSheetURL=f?f:m+"black2x.png"}var n="position: absolute; z-index: 2;",o=3;Moneypenny.addStyleRule(["#Moneypenny_CBMBtn:hover #Moneypenny_CBM:hover","#Moneypenny_CBMBtn:hover #Moneypenny_CBM","#Moneypenny_CBMBtn #Moneypenny_CBM:hover"],"display:block;"),Moneypenny.addStyleRule("#Moneypenny_CBM",n+(a?"width: "+a+"; ":"")+"padding: 1px "+o+"px; border-radius: 1px;top: "+MoneypennyChat._chatMenuButtonHeight+"px; right: 0px; background: "+l+"; color: "+j+"; border: thin solid "+k+";-webkit-box-shadow: 0 1px 4px 0 "+j+"; box-shadow: 0 1px 4px 0 "+j+"; "+extraCSS),Moneypenny.addStyleRule(".Moneypenny_CBMItem","position:relative; height: 20px; width: 100%;"),Moneypenny.addStyleRule(".Moneypenny_CBMItem:hover","background-color: "+k+";"),Moneypenny.addStyleRule(".Moneypenny_CBMItem span","font-size: 14px; white-space: nowrap; padding-left: 10px;padding-right:26px;"),Moneypenny.addStyleRule(".Moneypenny_CBMItem i",""+Moneypenny.getDisplayInlineBlockCSS()+"position:absolute; top:0; right:0; height: 20px; width: 20px; background-size: 40px 80px;"),Moneypenny.addStyleRule(".Moneypenny_CBMItemSplitter","height:0; width: 90%; margin: 0px auto; border-bottom: thin solid "+c+";clear: both;opacity: 0.15; -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=15);filter: alpha(opacity=15);"),Moneypenny.addStyleRule("#Moneypenny_closeBtn","margin-top: 3px;"),Moneypenny.addStyleRule("#Moneypenny_minBtn","margin-bottom: 3px;"),Moneypenny.addStyleRule(["#Moneypenny_CBMHoverHelper"],"display: block;position: absolute;top: -"+MoneypennyChat._chatMenuButtonHeight+"px;left: -"+o+"px;height: "+MoneypennyChat._chatMenuButtonHeight+"px;width: 100%;"+Moneypenny.getInvisibleDivIEFixCSS())}var p=Moneypenny.appendMenuItem(h,"Moneypenny_minBtn",Moneypenny.getMessage(36),"div",Moneypenny.getIconCoords("minimize"),"MoneypennyChat.minimizeToggle();");p&&Moneypenny.appendMenuSplitter(h),Moneypenny.appendMenuItem(h,"Moneypenny_closeBtn",Moneypenny.getMessage(37),"div",Moneypenny.getIconCoords("close"),"Moneypenny.closeForm();"),g.appendChild(h),h.appendChild(i)}}}}},appendMenuItem:function(chatBoxMenu,id,label,elemType,iconCoords,onClickFunc){if(null!==document.getElementById(id))return!1;var newElem=document.createElement(elemType),newElemLabel=document.createElement("span"),newElemIcon=document.createElement("i");newElem.id=id,newElem.className="Moneypenny_CBMItem",newElemIconCSS="background-image: url('"+Moneypenny.menuIconSpriteSheetURL+"'); background-repeat: no-repeat; background-position: "+iconCoords+";",newElemLabel.innerHTML=label;try{newElem.setAttribute("onclick",onClickFunc),newElemIcon.setAttribute("style",newElemIconCSS)}catch(a){}try{newElem.onclick=function(){eval(onClickFunc)},newElemIcon.style||(newElemIcon.style.cssText=newElemIconCSS)}catch(a){}return newElem.appendChild(newElemLabel),newElem.appendChild(newElemIcon),chatBoxMenu.appendChild(newElem),!0},appendMenuSplitter:function(a){var b=document.createElement("div");b.className="Moneypenny_CBMItemSplitter",a.appendChild(b)},getIconCoords:function(a){switch(a){case"chevron-down":return"0 0";case"chevron-up":return"0 -20px";case"minimize":return"0 -40px";case"close":return"0 -60px";default:return"-100px -100px"}},hideChatBoxMenu:function(){var a=document.getElementById("Moneypenny_WP"),b=document.getElementById("Moneypenny_CBMBtn");b&&a.removeChild(b)},setRequiredMark:function(a,b){requiredColor=a||"#FF0000",requiredMarker=b||"*"},getRequiredMark:function(){return requiredColor&&requiredMarker?''+requiredMarker+"":""},showRequiredMarks:function(){function a(a){var b=a.getElementsByTagName("span");if(0===b.length)return!1;for(var c=!1,d=0;d
'+this.getMessage(1)+"
'+this.getMessage(2)+'
";this.isScreenshotCapable()&&showScreenshotOpt&&(d+='
'+this.getMessage(3)+'
');var e="#ffffff",f="#c7c9c7",g="#a0a1a0",h="10px",i="#51555d",j="#303030",k="font-weight:400;float:none;clear:none;width:auto;height:25px;margin:0 0px 0 4px;cursor:pointer;border:1px solid "+g+";background-color:"+f+";"+(this.isIE()?"filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="+e+",endColorstr="+f+");":"background:-webkit-gradient(linear, left top, left bottom,from("+e+"),to("+f+"));background:-moz-linear-gradient(top,"+e+","+f+");")+"padding:3px 5px;width:auto;overflow:visible;-webkit-border-radius:"+h+";-moz-border-radius:"+h+";border-radius:"+h+";color:"+i+";font-size:12px;font-family:lucida grande,Helvetica Neue,Helvetica,Arial,sans-serif;text-decoration:none;vertical-align:middle;",l="onmouseover=\"this.style.color='"+j+"';\" onmouseout=\"this.style.color='"+i+"';\"";d+='
';var m=20,n=20;d+='
'+this.getMessage(10)+'
',this.isBranded()&&(d+='
',this.logoLink()&&(d+=Moneypenny.getLogoClickATag()),d+='powered by Moneypenny',this.logoLink()&&(d+=""),d+="
"),document.getElementById("Moneypenny_P").innerHTML=d,this.sendGetWidgetConfig(!1),Moneypenny.positionDragger(0,0,338,42),this.showForm(!0,a,b,13,13,341,358),this.showFeedback(),this.updateFormButtons();var o=document.Moneypenny_Form;return o&&(""==email?o.email.focus():o.description.focus()),!1},updateFormButtons:function(){if(expiredAccount)return void((document.getElementById("Moneypenny_OCB")||document.getElementById("Moneypenny_OSB")||document.getElementById("Moneypenny_CL"))&&Moneypenny.populateFormStatus(-2));try{var a=document.getElementById("Moneypenny_SB"),b=document.getElementById("Moneypenny_OSB"),c=document.getElementById("Moneypenny_OCB");agentStatus?(a&&(a.style.display="none"),offlineAllowed&&b&&(b.style.display="inline"),c&&(c.style.display="inline")):(a&&(a.style.display="inline"),b&&(b.style.display="none"),c&&(c.style.display="none"))}catch(a){}var d=document.Moneypenny_Form;d&&d.screenshot&&this.isScreenshotCapable()&&(d.screenshot.checked=1==defaultSnapshot)},showFeedback:function(){try{var a=document.getElementById("Moneypenny_FormFbk");a&&(fbkText||fbkLinkText?(document.getElementById("Moneypenny_FormFbkT").innerHTML=fbkText,document.getElementById("Moneypenny_FormFbkL").href=fbkLink,document.getElementById("Moneypenny_FormFbkL").innerHTML=fbkLinkText,a.style.display="block"):a.style.display="none")}catch(a){}},populateFormStatus:function(a){if(Moneypenny.isMobileEnabled()||Moneypenny.isCustomDesignEnabled())return 4===a&&chatInProgress&&MoneypennyChat?MoneypennyChat.startChat(caseId,baseURL):6!==a&&7!==a||Moneypenny.getCustomDesignUI().initErrorMessage(),!1;var b=this.getMessage(9),c='
';if(1==a?b=this.getMessage(6):4==a?b=this.getMessage(7):5==a?b=this.getMessage(7)+"..":6==a?b=this.getMessage(8):7==a?b=this.getMessage(11):a==-2&&(b="Sorry, this Moneypenny account is currently inactive"),(4==a||5==a)&&chatInProgress&&MoneypennyChat)return MoneypennyChat.isWebCapInProgress()?MoneypennyChat.webCaptureDone(errorCode):MoneypennyChat.startChat(caseId,baseURL),!1;var d="",e=logoLinkEnabled;if(4==a||5==a||6==a||7==a||a==-2?(d="Moneypenny.closeForm();",c='
'):logoLinkEnabled=!1,!Moneypenny.isMobileEnabled()&&!Moneypenny.isCustomDesignEnabled()&&!chatInProgress&&""==callmePhone||6==b||7==b||b==-2){var f='
'+b+c+"
",g=Moneypenny.getChatFormPosition();Moneypenny.setChatFormPosition("c"),MoneypennyChat.populateSubChatForm(f,d),Moneypenny.setChatFormPosition(g)}logoLinkEnabled=e},updateFormStatusBar:function(a,b){var c=document.getElementById("Moneypenny_PB");c&&(c.style.width=Math.round(100*a/4+100*b/4)+"%")},closeForm:function(a){var b=chatInProgress,c="",d="";ready&&(this.hideOverlay(!1),chatInProgress?(MoneypennyChat.closeChat(!0),chatInProgress=!1):MoneypennyChat.reInit()),MoneypennyChat&&1!=a&&MoneypennyChat.setNoProactiveChatCookie(),Moneypenny.proactiveAgentNumber="",MoneypennyChat.clearProactive(),MoneypennyChat.isMinimized()&&MoneypennyChat.unminimizeChat(),Moneypenny.hideChatBoxMenu(),this._showButton(),1!=a&&(c="proactive"===Moneypenny.getTypeOfChat()?"proactive":b?"chat":"form",d=agentStatus?"online":"offline",Moneypenny.callCallback("Close",c,d))},getTypeOfChat:function(){return Moneypenny.isCustomDesignEnabled()?Moneypenny.getCustomDesignUI().getTypeOfMessage():Moneypenny._isReactiveChat?"manual":MoneypennyChat.isProactive()?"proactive":"manual"},hideOverlay:function(a){Moneypenny.isCustomDesignEnabled()||(a||(document.getElementById("Moneypenny_W").style.display="none"),document.getElementById("Moneypenny_O").style.display="none",document.getElementById("Moneypenny_P").style.display="none",document.getElementById("Moneypenny_WP").style.display="none",window.scrollBy(1,0),window.scrollBy(-1,0))},submitForm:function(a){var b=document.Moneypenny_Form;if(b){webCapture=b.screenshot&&b.screenshot.checked,sshot=0,b.screenshot&&(sshot=b.screenshot.checked?1:2),""==labelColor?labelColor=document.getElementById("Moneypenny_email").style.color:(document.getElementById("Moneypenny_email").style.color=labelColor,document.getElementById("Moneypenny_desc").style.color=labelColor);var c=!1;if(cvvalRequired)try{for(var d=cvvalRequired.split(","),e=0;e()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;0!=f.test(b.email.value)||a&&!chatEmailRequired||(document.getElementById("Moneypenny_email").style.color="red",b.email.focus(),c=!0),c||(ready=!1,MoneypennyChat.setUserEmailCookie(b.email.value),email=b.email.value,b.Name&&(userName=b.Name.value),this.sendCreateCase(b.email.value,b.description.value,a)||(document.getElementById("Moneypenny_desc").style.color="red",b.description.focus(),ready=!0))}return!1},startChatGo:function(){agentStatus?MoneypennyChat.proactive(proactiveMsg,!1,"",""):(startChatMessage="",this.startLink()),startChatRequested=!1},getStartChatRequested:function(){if(startChatRequested)return proactiveMsg},sendClickToCall:function(a,b){var c="ci="+encodeURIComponent(dbCaseId);""==dbCaseId&&(c="c="+encodeURIComponent(caseId)),c+="&p="+encodeURIComponent(a)+"&src="+b,this.rpc(baseURL+"/chatjs/ServiceClickToCall?"+c,3,!0),this.callCallback("StartCallme",a)},callbackClickToCall:function(a){},sendGetCallConfig:function(){var a="w="+encodeURIComponent(widgetId);this.rpc(baseURL+"/chatjs/ServiceGetCallConfig?"+a,3,!0)},callbackGetCallConfig:function(a){a>0?MoneypennyChat.populateCallMeForm():(startChatMessage="",this.startLink())},sendGetWidgetConfig:function(a){var b="w="+encodeURIComponent(widgetId);a&&(b+="&p=1"),b=Moneypenny.appendTagsParameter(b),this.rpc(baseURL+"/chatjs/ServiceGetConfig?"+b,3,!0)},callbackGetWidgetConfig:function(a,b,c,d,e,f,g,h,i){if(agentStatus=a,Moneypenny.isMobileEnabled()&&Moneypenny.getMobileUI().setRequiredFields(g,h),a==-1)return Moneypenny._hideButton(),void(Moneypenny.isCustomDesignEnabled()&&this.callCallback("agentOnline",!!a));if(a==-2)return expiredAccount=!0,logoLinkEnabled=!1,void((document.getElementById("Moneypenny_OCB")||document.getElementById("Moneypenny_OSB")||document.getElementById("Moneypenny_CL")||startChatRequested)&&Moneypenny.populateFormStatus(-2));"1"!=MoneypennyChat.getBannedCookie()&&chatAllowed||(agentStatus=0,Moneypenny.isCustomDesignEnabled()&&Moneypenny.getCustomDesignUI().checkStatusShowButton()),this.callCallback("agentOnline",!!a),this.setCallback("agentOnline",null);var j=new Date,k=j.getTime();agentStatusLastCheck=k,agentStatusCheckInterval*=1.1,i&&i>0&&!MoneypennyChat.isNoProactiveChatCookie()&&!Moneypenny.getIsInstanceProactiveV2()&&(proactiveTimer&&clearTimeout(proactiveTimer),i<=15?Moneypenny.sendGetProactiveChatAgent():(i-=15,proactiveTimer=setTimeout("Moneypenny.sendGetProactiveChatAgent(false);",1e3*i))),defaultSnapshot=e,Moneypenny.isCustomDesignEnabled()||this.updateFormButtons(),snapshotBeforeChat=f,chatEmailRequired=g,chatDescriptionRequired=h,Moneypenny.showRequiredMarks(),fbkText=b,fbkLink=d,fbkLinkText=c,this.showFeedback(),startChatRequested&&(this.startChatGo(),a&&(Moneypenny.callCallback("Open","online"),visitorFirstMessage&&Moneypenny.sendCreateCase("",visitorFirstMessage,!0),Moneypenny.getPreChatSearchEnabled()&&Moneypenny.resetPreChatSearch())),callCallbackOpen&&document.getElementById("Moneypenny_OCB")&&(Moneypenny.callCallback("Open",a?"online":"offline"),callCallbackOpen=!1,Moneypenny.getPreChatSearchEnabled()&&Moneypenny.resetPreChatSearch())},getFunctionStack:function(a){for(var b=[],c=a,d="unknown",e=[];c;){if(e=c.toString().match(/function ([^\(]+)/),d=e&&e.length>0?e[1]:"unknown",c.arguments&&c.arguments.length>0){d+="(";for(var f=0;f0&&(e+="&tags="+encodeURIComponent(c.join())),"undefined"==typeof b&&Moneypenny.getIsInstanceProactiveV2()||"Moneypenny".indexOf("HiPer")!==-1&&"undefined"==typeof b)try{d="&debug="+encodeURIComponent(Moneypenny.getFunctionStack(arguments.callee)),e+=baseURL.length+e.length+d.length<2e3?d:"&too-many-chars"}catch(a){}"Moneypenny".indexOf("HiPer")!==-1&&"undefined"==typeof b?this.rpc(baseURL+"/chatjs/proactive-chat-debug?"+e,0,!0):this.rpc(baseURL+"/chatjs/ServiceGetProactiveChatAgent?"+e,3,!0)}},prepareProactiveMessage:function(a,b){var c=a;return c=a.replace("{alias}",b)},callbackProactiveChatAgent:function(a,b,c,d,e,f){waitingRPCResponce=!1,Moneypenny.proactiveAgentNumber=b,""!=callmePhone?(MoneypennyChat.proactive(" ",!1,a,f),webCapture=!1,Moneypenny.sendCreateCase(Moneypenny.getUserEmail(),"Call-me request",!0)):(""!=proactiveMsg&&(d=Moneypenny.prepareProactiveMessage(proactiveMsg,a),proactiveNotify=!0),""!=b&&""!=d?(proactiveMsg=d,e&&"1"==e?proactiveNotify=!0:"0"===e&&(proactiveNotify=!1),MoneypennyChat.proactive(proactiveMsg,proactiveNotify,a,f),Moneypenny.isMobileEnabled()||Moneypenny.isCustomDesignEnabled()||this._hideButton(),ruleSetArray&&(ruleSetArray.length=0)):proactiveOfflineFallback&&this.startLink()),Moneypenny.isCustomDesignEnabled()||(c?Moneypenny.enableCallMe():Moneypenny.disableCallMe())},setFromUrlOverride:function(a){fromUrlOverride=a},sendXMLHttpRequest:function(a,b,c){function d(f,g,h){function i(){if(a.retries--)return d(f,g,h)}e.xhr.open(f,g),a.timeout&&(e.xhr.timeout=a.timeout),a.retries&&(e.xhr.ontimeout=i),e.xhr.onload=function(){useXmlHttp=!0,200===this.status?(b||(b=Function(this.responseText)),b()):c(this)},e.xhr.onerror=function(){return this.status===this.UNSENT&&useXmlHttp===!1?(a.retries=0,console.warn("Please update your Content-Security-Policy to allow "+Moneypenny.getBaseURL()+" for a better experience."),c(this)):0!==this.status&&this.getAllResponseHeaders()?i():void 0},e.xhr.onreadystatechange=function(){if(this.readyState===this.DONE&&this.status===this.UNSENT&&!this.getAllResponseHeaders()&&!this.responseText)return useXmlHttp=!1},e.xhr.send(h?h:null)}var e=this,f=a.method,g=baseURL+a.url;this.xhr=new XMLHttpRequest,d(f,g,a.visitorData)},isPendingAjax:function(){return!(!this.xhr||200===this.xhr.status)},prepSendRPC:function(){var a="e="+encodeURIComponent(newCaseJSON.emailAddress)+"&w="+encodeURIComponent(newCaseJSON.widgetId)+"&l="+encodeURIComponent(newCaseJSON.locale)+"&d="+encodeURIComponent(newCaseJSON.description)+"&k="+encodeURIComponent(Math.floor(4294967295*Math.random()).toString(16));newCaseJSON.from&&(a+="&fo="+encodeURIComponent(newCaseJSON.from));var b=baseURL+"/chatjs/ServiceCreateCase?"+a;return!(b.length>2e3)&&void this.rpc(b,3,!1)},sendCreateCase:function(a,b,c){if(this._hideButton(),visitorChatHistory||(MoneypennyChat.setCookie("MoneypennyUserEmail","",0),MoneypennyChat.deleteCookie("MoneypennyUserEmail"),MoneypennyChat.setCookie("MoneypennyHistory","",0),MoneypennyChat.deleteCookie("MoneypennyHistory")),chatInProgress)return!1;""===a&&(""!==email?a=email:""!==MoneypennyChat.getUserEmailCookie()&&(a=MoneypennyChat.getUserEmailCookie())),b=b.replace(/^\s+|\s+$/g,""),""==b&&(b="(none)"),"undefined"!=typeof fromUrlOverride&&""!==fromUrlOverride&&(newCaseJSON.from=fromUrlOverride),Moneypenny.isCustomDesignEnabled()?(Moneypenny.getCustomDesignUI().disableButton("prechat-start-chat"),Moneypenny.getCustomDesignUI().disableButton("offline-send-email"),Moneypenny.getCustomDesignUI().disableButton("intelliprechat-next")):(Moneypenny.disableButton("Moneypenny_SB"),Moneypenny.disableButton("Moneypenny_OSB"),Moneypenny.disableButton("Moneypenny_OCB")),chatInProgress=c,Moneypenny.isMobileEnabled()||Moneypenny.isCustomDesignEnabled()||(this.isWebCapture()?this.populateFormStatus(1):this.populateFormStatus(2),MoneypennyChat&&c&&(MoneypennyChat.setQuestion(Moneypenny.deactivateHTML(b)),MoneypennyChat.preloadChatFormImg(),MoneypennyChat.chatStarting())),newCaseJSON.status=chatInProgress?"online":"offline",newCaseJSON.type=this.getTypeOfChat(),newCaseJSON.emailAddress=a,newCaseJSON.widgetId=widgetId,newCaseJSON.locale=locale,newCaseJSON.description=b.replace(/\n/g,"
"),newCaseJSON.uniqueKey=Math.floor(4294967295*Math.random()).toString(16);var d={visitorData:JSON.stringify(newCaseJSON),url:"/chatjs/ServiceCreateCase",retries:3,ignoreError:!1,method:"POST",timeout:55e3};return useXmlHttp!==!1?this.sendXMLHttpRequest(d,void 0,Moneypenny.prepSendRPC.bind(this)):this.prepSendRPC(),b=Moneypenny.deactivateHTML(b),c?Moneypenny.callCallback("StartChat",a,b,Moneypenny.getTypeOfChat()):Moneypenny.callCallback("MessageSubmit",a,b),!0},callbackCreateCase:function(a,b,c,d,e,f){if("false"==a)return"Error"==b?(ready=!0,this.populateFormStatus(6)):"Duplicate"==b&&(ready=!0,this.populateFormStatus(7)),chatInProgress=!1,!1;caseId=a,dbCaseId=e,plugins=c,jsvars=d;var g=MoneypennyChat.getHistoryCookie();""!=g&&historyEnabled&&Moneypenny.setCvval("__sehist",g),MoneypennyChat.getPageTitle(!1)&&Moneypenny.setCvval("__sepaget",MoneypennyChat.getPageTitle(!1));var h=MoneypennyChat.getTokensCookies();""!=h&&Moneypenny.setCvval("__setokens",h),MoneypennyChat.setHistoryCookieAppendCase(caseId);try{this.isWebCapture()?this.startWebCapture():(this.populateFormStatus(3),this.sendFinalizeCase())}catch(a){Moneypenny.sendFinalizeCase()}},sendFinalizeCase:function(){var a="ci="+encodeURIComponent(dbCaseId)+"&v="+encodeURIComponent(this.getPlugins());errorCode!=-1&&(a+="&e="+encodeURIComponent(errorCode)),a+="&s="+encodeURIComponent(sshot),a+=chatInProgress?"&m=c2":"&m=h",a+="&u="+encodeURIComponent(this.getEntryPageUrl()),a+="&r="+encodeURIComponent(this.getEntryPageRef());var b=this.getJSVariables(),c="&vjs="+encodeURIComponent(b),d=baseURL+"/chatjs/ServiceFinalizeCase?"+a+c;if(d.length>2e3){rpcStack=[];try{for(var e=baseURL+"/chatjs/ServiceAddToCase?ci="+encodeURIComponent(dbCaseId)+"&vjs=",f=2e3-e.length,g=encodeURIComponent(b),h=0,i=0;;){if(i=h+f,i>=g.length){rpcStack.push(e+g.substr(h));break}if("%"==g.charAt(i-1)||"%"==g.charAt(i-2)||"%"==g.charAt(i-3)){for(var j=1;j<4;j++)if("%"==g.charAt(i-j)){i-=j;break}for(;;){var k=parseInt(g.charAt(i-2)+g.charAt(i-1),16);if(!(k>127&&k<192)){i-=3;break}i-=3}}rpcStack.push(e+g.substring(h,i)),h=i}var l=baseURL+"/chatjs/ServiceFinalizeCase?"+a;rpcStack.push(l.substring(0,2e3)),rpcStack.reverse(),rpcStackInitialLength=rpcStack.length,this.callbackAddToCase(!0)}catch(a){this.rpc(d.substring(0,2e3),3,!1)}}else this.rpc(d,3,!1)},callbackFinalizeCase:function(a){a?(ready=!0,this.populateFormStatus(4)):this.callbackError(!0),newCaseJSON={}},callbackAddToCase:function(a){a?rpcStack.length>0&&(rpcStackInitialLength>0&&this.updateFormStatusBar(3,1-rpcStack.length/rpcStackInitialLength),this.rpc(rpcStack.pop(),3,!1)):this.callbackError(!0)},sendUpdateCase:function(a){if(caseId||dbCaseId){cvval={},vval="",jsvars=a;var b="c="+encodeURIComponent(caseId);dbCaseId&&(b="ci="+encodeURIComponent(dbCaseId)),b+="&vjs="+encodeURIComponent(this.getJSVariables()),this.rpc(baseURL+"/chatjs/ServiceUpdateCase?"+b,3,!0)}},callbackUpdateCase:function(a){},sendCheckPhone:function(a){var b="w="+encodeURIComponent(widgetId)+"&p="+encodeURIComponent(a);this.rpc(baseURL+"/chatjs/ServiceCheckPhone?"+b,3,!0)},callbackCheckPhone:function(a){a?(caseId||dbCaseId?Moneypenny.sendClickToCall(callmePhone,2):this.sendGetProactiveChatAgent(!0),Moneypenny.disableCallMe(),MoneypennyChat.formCallMeDone()):Moneypenny.isCustomDesignEnabled()||MoneypennyChat.populateCallMeForm(!0,this.getCallMePhone())},startWebCapture:function(){try{var a=navigator.appVersion.indexOf("Mac")!==-1?1e3:500;errorCode=-1,document.getElementById("Moneypenny_Applet").style.display="block",document.getElementById("Moneypenny_Applet").innerHTML=''}catch(a){this.webCaptureUploadDone()}},stopWebCapture:function(){try{document.getElementById("Moneypenny_Applet").style.display="none"}catch(a){}},webCaptureReady:function(){this.hideOverlay(!0)},webCaptureSnapshotDone:function(){this.populateFormStatus(2)},webCaptureUploadDone:function(){this.populateFormStatus(3),this.stopWebCapture(),MoneypennyChat&&MoneypennyChat.isWebCapInProgress()?this.populateFormStatus(4):this.sendFinalizeCase()},webCaptureFailed:function(a){errorCode=a,ready=!0,this.webCaptureUploadDone()},thankYouNote:function(){ready=!0,this.populateFormStatus(4)},showHelp:function(){try{h=document.getElementById("Moneypenny_H"),h.innerHTML=this.getMessage(5),h.style.display="block"}catch(a){}return!1},hideHelp:function(){try{document.getElementById("Moneypenny_H").style.display="none"}catch(a){}},getFlashVersion:function(){function a(){var a,b="";try{a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"),b=a.GetVariable("$version")}catch(a){}if(!b)try{a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"),b="WIN 6,0,21,0",a.AllowScriptAccess="always",b=a.GetVariable("$version")}catch(a){}if(!b)try{a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3"),b=a.GetVariable("$version")}catch(a){}if(!b)try{a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3"),b="WIN 3,0,18,0"}catch(a){}if(!b)try{a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),b="WIN 2,0,0,11"}catch(a){}return b}var b=navigator.appVersion.indexOf("MSIE")!==-1,c=navigator.appVersion.toLowerCase().indexOf("win")!==-1,d=navigator.userAgent.indexOf("Opera")!==-1;try{var e="none";if(null!=navigator.plugins&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var f=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"",g=navigator.plugins["Shockwave Flash"+f].description,h=g.split(" "),i=h[2].split("."),j=i[0],k=i[1],l=h[3];""==l&&(l=h[4]),"d"==l[0]?l=l.substring(1):"r"==l[0]&&(l=l.substring(1),l.indexOf("d")>0&&(l=l.substring(0,l.indexOf("d")))),e=j+"."+k+"."+l}}else navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!==-1?e=4:navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!==-1?e=3:navigator.userAgent.toLowerCase().indexOf("webtv")!==-1?e=2:b&&c&&!d&&(e=a());return e.replace(/,/g,".")}catch(a){return"none"}},getJREVersions:function(){function a(a){var b="JavaWebStart.isInstalled."+a+".0";try{return!!window.ActiveXObject&&null!=new window.ActiveXObject(b)}catch(a){return!1}}function b(a,b){try{var c=a.split("."),d=b.split("."),e=c.length;d.length>e&&(e=d.length);for(var f=0;fd[f])return a}}catch(a){}return a}if(!navigator.javaEnabled())return"none";var c="undefined";try{if(navigator.userAgent.toLowerCase().indexOf("msie")!==-1)c=a("1.8.0")?"1.8.0":a("1.7.0")?"1.7.0":a("1.6.0")?"1.6.0":a("1.5.0")?"1.5.0":a("1.4.2")?"1.4.2":"none";else if(navigator.mimeTypes)for(var d=0;d
Please click "Run" or "Allow" to let our applet send a snapshot of the web page to the support team.',7:"شكرا لقد تمّ ارسال رسالتك",8:"عذرا, لم يتم ارسال رسالتك بنجاح. نحن نتحقق من المشكلة. الرجاء المحاولة من جديد لاحقا.",9:"جاري الاتّصال",10:"اغلاق",11:"لقد سبق ان راسلت الفرع الفنّي بخصوص هذه المشكلة.",12:"راسلنا عبر الايميل",13:"دردش معنا",14:"أكتب رسالتك هنا",15:"انا"},az:{0:"Kömək",1:"Sizin e-poçt:",2:"Probleminizi təsvir edin:",3:"Hal-hazırdakı səhifənin qrafiki surətini də əlavə et",4:"Göndər",5:"Dəstəkdən tez cavab al, veb səhifədə gördüyümün qrafiki surətini göndər.",6:'Qrafiki surətin hazırlanması...

Zəhmət olmasa, "Run" (İşə sal) və ya "Allow" (Icazə ver) düymələrini klik edin ki, proqram veb saytın surətini dəstəyə göndərə bilsin.',7:"Təşəkkürlər,
Sizin məktubunuz göndərildi.",8:"Bağışlayın, sizin məktubunuz göndərilmədi.
Biz, sizin problem ilə məşquluq.
Zəhmət olmasa, bir qədər gözləyin.",9:"Yüklənir...",10:"Bağla",11:"Siz bu problem haqqında ismarıcı dəstəyə artıq göndərmisiniz.",12:"Məktub",13:"Çat",14:"Operator cavab verən kimi mesajınızı bura daxil edib [enter] - ə basın",15:"Mən"},cs:{0:"Nápověda",1:"Váš email:",2:"Jak Vám můžeme pomoci?",3:"Vložit snímek obrazovky aktuální stránky",4:"Odeslat",5:"Odeslat snímek toho co právě vidím na stránkách, aby zákaznický servis mohl rychle a přesně odpovědět.",6:'Připravuje se snímání obrazovky...

Prosím klikněte na "Spustit" nebo "Umožnit" pro odeslání snímku obrazovky našemu zákaznickému servisu.',7:"Děkujeme,
Vaše zpráva byla odeslána.",8:"Omlouváme se, Vaše zpráva nemohla být odeslána.
V současnosti zjišťujeme možné potíže.
Prosíme zkuste to později.",9:"Nahrává se...",10:"Zavřít",11:"Tento dotaz byl již odeslán zákaznickému servisu.",12:"Napište nám email",13:"Chatujte s námi",14:"napište sem svoji zprávu a odešlete ji stisknutím tlačítka [Enter]...",15:"Já"},da:{0:"Hjælp",1:"Din emailadresse:",2:"Hvad kan vi hjælpe dig med?",3:"Vedhæft et screenshot af siden",4:"Send",5:"Send et screenshot af det jeg ser på hjemmesiden, så support teamet hurtigt kan afhjælpe problemet.",6:"Gør klar til at tage et screenshot...

Klik "Kør" eller "Accepter" for at tillade, at der bliver sendt et screenshot til support teamet.",7:"Tak,
din besked er sendt.",8:"Beklager, din besked kunne ikke sendes.
Vi undersøger hvorfor, venligst prøv igen senere.",9:"Sender...",10:"Luk",11:"You have already submitted this case to the support team.",12:"Send email",13:"Chat med os",14:"Skriv din besked her og tryk på [Enter]",15:"mig"},de:{0:"Hilfe",1:"Ihre E-Mail-Adresse:",2:"Ihre Frage:",3:"Bildschirmaufnahme der Seite hinzufügen",4:"Senden",5:"Durch anklicken senden Sie uns eine Bildschirmaufnahme der Webseite, damit wir Ihnen rascher helfen können.",6:"Vorbereitung der Bildschirmaufnahme...
Bitte bewilligen Sie die Sicherheitsabfrage des Java-Applets, um eine Bildschirmaufnahme der Web-Seite für das Support Team zu machen.",7:"Vielen Dank,
Ihre Nachricht wurde gesendet.",8:"Leider konnte Ihre Nachricht nicht gesendet werden.
Wir untersuchen das Problem.
Bitte versuchen Sie es später erneut.",9:"Hochladen...",10:"Schließen",11:"You have already submitted this case to the support team.",12:"E-Mail senden",13:"Chat starten",14:"Bitte hier eine Nachricht eingeben und auf [Enter] drücken um fortzufahren...",15:"ich"},el:{0:"Βοήθεια",1:"Το email σας:",2:"Περιγραφή προβλήματος:",3:"Συμπεριλάβετε μια απεικόνιση της παρούσας σελίδας",4:"Αποστολή",5:"Στείλτε μου μια απεικόνιση από τη σελίδα που βλέπετε, ώστε το τεχνικό μας τμήμα να σας δώσει μια σύντομη απάντηση.",6:'Προετοιμασία για απεικόνιση...

Παρακαλώ πατήστε "Εκτέλεση" ή "Επιτρέπω" ώστε η εφαρμογή να στείλει ένα snapshot της σελίδας στο τεχνικό μας τμήμα.',7:"Ευχαριστούμε,
Το μήνυμα στάλθηκε.",8:"Λυπούμαστε, το μήνυμα δεν μπορεί να σταλεί.
Ερευνούμε το θέμα.
Παρακαλόύμε προσπαθήστε αργότερα.",9:"Άνεβασμα αρχείου...",10:"Κλείσιμο",11:"Έχετε ήδη στείλει το συγκεκριμένο πρόβλημα στο τεχνικό μας τμήμα.",12:"Αποστολή",13:"Μιλήστε μαζί μας",14:"γράψτε το μήνυμά σας και πατήστε [enter] για να σταλεί...",15:"Εμένα"},es:{0:"Ayuda",1:"Su email:",2:"¿En qué puedo ayudarle?",3:"Incluye una instantánea de esta página",4:"Enviar",5:"Envia una instantánea de lo que estoy viendo en la página web para que el equipo de soporte puedan darme una respuesta.",6:'Preparando para la instantánea ...

Por favor haga clic en "Run" o "Allow" para permitir que nuestro applet envíe una captura de pantalla de este sitio al equipo de soporte.',7:"Gracias,
Su mensaje ha sido enviado.",8:"Lo sentimos, su mensaje no pudo enviar.
Estamos investigando el problema.
Por favor, inténtelo más tarde.",9:"Cargando...",10:"Cerrar",11:"You have already submitted this case to the support team.",12:"Enviar",13:"Chat con nosotros",14:"Escriba su mensaje aquí y presione [enter] para enviar...",15:"yo"},et:{0:"Abi",1:"Sinu email:",2:"Kirjelda oma probleemi:",3:"Lisa chatile oma ekraanist tehtud pilt",4:"Saada",5:"Saada minu ekraanist tehtud pilt tehnilise toe ekspertidele, et saada kiirem vastus.",6:'Teen ekraanist pilti...

Palun vajuta "Run-Jooksuta" või "Allow-Luba" et saaksime näha pilti veebilehest millel hetkel olete.',7:"Aitäh,
Teie teade on edasi saadetud postituviga.",8:"Kahjuks polnud võimalik teadet postituviga edastada.
Me uurime hetkel mis juhtus.
Palun proovige natukese aja pärast uuesti.", 9:"Laen üles...",10:"Sulge",11:"Selline probleem on juba tehnilise toe ekspertidele esitatud.",12:"Kirjuta meile",13:"Räägi meiega",14:"Palun kirjutage oma teade siia ning vajutage [enter] et see edasi saata...",15:"Mina"},fi:{0:"Palaute",1:"Sähköpostiosoitteesi:",2:"Lisää kysymyksesi:",3:"Liitä kuvakaappaus tämänhetkisestä sivusta",4:"Lähetä",5:"Lähetä kuvakaappaus näkymästä, jotta tukipalvelu voi vastata kysymykseesi nopeammin.",6:"Valmistellaan kuvakaappausta...

Ole hyvä ja valitse "Suorita" tai "Hyväksy" valtuuttaaksesi ohjelman ottamaan kuvakaappauksen tukipalvelua varten.",7:"Kiitos,
Viestisi on lähetetty.",8:"Valitettavasti viestiä ei pystytty lähettämään.&
Ongelmaa tutkitaan.
Ole hyvä ja yritä myöhemmin uudelleen.",9:"Lähetetään...",10:"Sulje",11:"You have already submitted this case to the support team.",12:"Lähetä Email",13:"Avaa Chat",14:"Kirjoita viestisi tähän ja paina [enter]...",15:"Minä"},fr:{0:"Aide",1:"Votre email :",2:"Votre question :",3:"Envoyez une copie d'écran",4:"Envoyez",5:"Envoie une image de la page courante pour que l'équipe de support puisse fournir une réponse rapidement.",6:"Préparation pour la capture d'écran...
Merci de cliquer sur \"Run\" ou \"Allow\" pour que l'applet puisse envoyer l'image de l'écran à l'équipe de support.",7:"Merci,
votre message a été envoyé.",8:"Désolé, votre message n'a pas pu être envoyé.
Nous recherchons la cause du problème.
Merci de rèessayer plus tard.",9:"Envoi en cours...",10:"Fermer",11:"Vous avez déjà envoyé ce message.",12:"Envoyez",13:"Tchattez avec nous",14:"Tapez votre message ici et appuyez sur [Entrée] pour envoyer...",15:"moi"},fr_CA:{0:"Aide",1:"Entrez votre adresse courriel :",2:"Posez votre question :",3:"Envoyez une copie d'écran",4:"Envoyez",5:"Envoie une image de la page courante pour que l'équipe de support puisse fournir une réponse rapidement.",6:"Préparation pour la capture d'écran...
Merci de cliquer sur \"Run\" ou \"Allow\" pour que l'applet puisse envoyer l'image de l'écran à l'équipe de support.",7:"Merci,
votre message a été envoyé.",8:"Désolé, votre message n'a pas pu être envoyé.
Nous recherchons la cause du problème.
Merci de rèessayer plus tard.",9:"Envoi en cours...",10:"Fermer",11:"Vous avez déjà envoyé ce message.",12:"Envoyez",13:"Clavardez avec nous",14:"Tapez votre message ici et appuyez sur [Entrée] pour envoyer...",15:"moi"},hu:{0:"Segítség",1:"E-mail címed:",2:"Írd le a kérdésed:",3:"Mellékeld az oldal snapshotját",4:"Küldd",5:"Küldd el az oldal képét /screenshot/, hogy könnyebben segíthessünk.",6:'Elõkészület a snapshotra...

Kérünk kattints a "Run" vagy "Allow"-ra és a rendszerünk elküldi azt a supportunknak.',7:"Köszönjük,
az üzenetet elküldted.",8:"Sajnáljuk, az üzenetet nem tudtuk elküldeni. Megvizsgáljuk az okát. Kérünk, próbáld meg késõbb.",9:"Feltöltés...",10:"Bezárás",11:"You have already submitted this case to the support team.",12:"Küldd el",13:"Csetelj velünk",14:"ide írja be üzenetét és nyomja meg az [Enter] gombot az elküldéshez...",15:"Én"},it:{0:"Help",1:"La sua email:",2:"La sua richiesta:",3:"Includi uno screenshot della pagina",4:"Invia",5:"Invia una schermata di quello che stai vedendo sulla pagina web per aiutare il team di supporto a fornirti una risposta più rapidamente",6:"Preparazione per la cattura dello schermo...
Si prega di attivare l'applet Java.",7:"Grazie,
Il tuo messaggio è stato inviato.",8:"Mi dispiace, il tuo messaggio non è stato inviato.
Stiamo indagando sulla questione.
Si prega di riprovare più tardi.",9:"Caricamento...",10:"Chiudi",11:"You have already submitted this case to the support team.",12:"Invia",13:"Chatta con noi",14:"scrivi qui il tuo messaggio e premi [Invio]...",15:"me"},is:{0:"Hjálp",1:"Netfangið þitt:",2:"Lýstu vandamálinu:",3:"Láta skjáskot af núverandi síðu fylgja með",4:"Senda",5:"Senda skjáskot af síðunni sem ég er á svo þjónustufulltrúar geti aðstoðað mig betur.",6:'Undibý skjáskot...

Vinsamlegast smelltu á "Run" eða "Allow" svo að forritið geti sent skjáskot af vefsíðunni til þjónustufulltrúanna.',7:"Takk fyrir.
Skilaboðin þín hafa verið send.",8:"Því miður var ekki hægt að senda skilaboðin þín.
Við munum kanna þetta vandamál.
Vinsamlegast reyndu aftur síðar.",9:"Sendi skrá...",10:"Loka",11:"Þú hefur nú þegar sent inn þetta mál til þjónustufulltrúa.",12:"Tölvupóst",13:"Spjallaðu við okkur",14:"Getur þú slegið inn skilaboð og slegið á [enter] til að senda...",15:"Ég"},iw:{0:"עזרה",1:'כתובת הדוא"ל שלך',2:"השאלה שלך",3:"הוסף צילום מסך של הדף הנוכחי",4:"שלח",5:"לתגובה מהירה של צוות התמיכה, הוסף בבקשה צילום מסך של עמוד האינטרנט",6:'מתכונן לצילום המסך ...

לחץ על "אשר" או "הרץ" לשליחת צילום המסך לצוות התמיכה.',7:"הודעתך נשלחה. תודה.",8:"מצטערים, לא ניתן לשלוח את הודעתך.
אנו בוחנים את הנושא.
אנא נסו שוב במועד מאוחר יותר",9:"טוען ...",10:"סגור",11:"You have already submitted this case to the support team.",12:"שלח אימייל",13:"שיחת צ'אט איתנו",14:"הקלד את ההודעה שלך כאן ולחץ [Enter] כדי לשלוח...",15:"אני"},ja:{0:"ヘルプ",1:"あなたのメールアドレス:",2:"ご質問:",3:"現在のページのスナップショットを加える",4:"送る",5:"サポートチームが迅速に回答できるよう、ウェブサイトで私が見ているものをスクリーンショットで送信する。",6:'スナップショットを準備しています

我々のアプレットにウェブサイトのスナップショットをサポートチームに送信させるために、"実行する"もしくは"許可する"をクリックして下さい。',7:"ありがとうございました、
あなたのメッセージは送信されました。",8:"申し訳ございません、あなたのメッセージは送信されませんでした。
我々は問題を調査しています。
時間をおいてもう一度送信して下さい。",9:"アップロード...",10:"閉じる",11:"You have already submitted this case to the support team.",12:"メールする",13:"チャットする",14:"ここにメッセージを入力し、送信するには[enter]を押してください。",15:"お客様"},ko:{0:"고객 지원",1:"이메일 주소:",2:"문제점 또는 의견:",3:"현재 페이지를 캡처해 첨부",4:"보내기",5:"지금 보고 있는 웹페이지를 캡처해 보내면 지원팀이 더욱 빠르고 정확하게 도와드릴 수 있습니다.",6:'화면 캡처 준비중...

"Run"이나 "Allow" 등을 클릭해야 화면을 캡처해서 지원팀에게 보낼 수 있습니다.',7:"고맙습니다.
작성한 내용이 전송됐습니다.",8:"죄송합니다만, 작성한 내용을 전송하지 못했습니다.
전송하지 못한 원인은 내부적으로 더 확인해보겠습니다.
잠시 후에 다시 시도해주세요.",9:"파일 올리는 중...",10:"닫기",11:"이미 해당 건을 지원팀에게 전송했습니다.",12:"이메일 보내기",13:"지원팀과 메신저",14:"여기에 대화 내용을 입력하고 [엔터]키를 누르면 대화할 수 있습니다...",15:"본인"},lt:{0:"Pagalba",1:"Jūsų el. paštas:",2:"Aprašykite savo problemą:",3:"Pridėti esamo ekrano nuotrauką",4:"Siųsti",5:"Nusiųsti dabartinio naršyklėje matomo vaizdo nuotrauką, kad IT komanda galėtų lengviau ir greičiau identifikuoti problemą.",6:'Ruošiama ekrano nuotrauka..

Paspauskite "Run" arba "Allow" leisdama mūsų įskiepiui nusiųsti naršyklės ekrano nuotrauką tech. pagalbos komandai.',7:"Dėkojame,
Jūsų žinutė buvo išsiųsta.",8:"Atsiprašome, Jūsų žinutė nebuvo nusiųsta.
Šiuo metu ieškome kur galėjo būti problema.
Praėjus šiek tiek laiko, pabandykite dar kartą.",9:"Duomenys siunčiami...",10:"Užverti",11:"Jūs jau esate pranešęs apie šią problemą.",12:"Parašykite mums el",13:"Parašykite",14:"Rašykite savo žinutę čia ir spauskite [enter] norėdami ją išsiųsti...",15:"man"},lv:{0:"Palīdzība",1:"Jūsu e-pasts:",2:"Uzrakstiet savu jautājumu:",3:"Pievienot esošās lapas ekrānuzņēmumu",4:"Nosūtīt",5:"Nosūtīt ekrānuzņēmumu, ko es redzu weblapā, lai atbalsta grupa var nodrošināt ātru atbildi.",6:'Sagatavošanās momentuzņēmumam...

Lūdzu, noklikšķiniet uz "Run" vai "Atļaut", lai ļautu mūsu sīklietotnei nosūtīt weblapas momentuzņēmumu atbalsta grupai.',7:"Paldies, Jūsu ziņa tika nosūtīta.",8:"Atvainojiet, Jūsu vēstuli nevar nosūtīt.
Mēs šobrīd izmeklējam šo lietu.
Lūdzu, mēģiniet vēlreiz vēlāk.",9:"Augšupielāde...",10:"Aizvērt",11:"Jūs jau esat iesniedzis šo lietu atbalsta komandai.",12:"Nosūti mums e-pastu",13:"Sākt tērzēšanu",14:"Ierakstiet savu ziņu šeit, un nospiediet [Enter], lai nosūtītu...",15:"Es"},nb:{0:"Hjelp",1:"Din epostadresse:",2:"Ditt spørsmål:",3:"Legg ved et skjermbilde av denne siden",4:"Send inn",5:"Legg ved et skjermbilde av det jeg ser på websiden, slik at de som skal yte brukerstøtte kan gi raskere og bedre svar.",6:'Forbereder skjermbilde...

Om du får spørsmål om å tillate at programmet kjører, er det viktig at du trykker "Tillat", "Kjør" eller lignende positivt svar.',7:"Takk,
Meldingen din har blitt sendt.",8:"Beklager, men meldingen kunne ikke sendes.
Vi forsøker å rette feilen.
Vær vennlig å forsøk igjen senere.",9:"Laster opp...",10:"Lukk",11:"You have already submitted this case to the support team.",12:"Send inn",13:"Chat med oss",14:"Skriv din melding her og trykk [Enter]...",15:"jeg"},nl:{0:"Help",1:"Uw e-mailadres:",2:"Uw vraag:",3:"Voeg een screenshot van de pagina toe",4:"Verzenden",5:"Verstuur een screenshot van de webpagina zodat het support team u snel kan helpen.",6:'Screenshot wordt voorbereid...

Kies a.u.b. "Run" of "Allow" zodat een screenshot kan worden verzonden naar het support team.',7:"Bedankt,
Uw bericht is verzonden.",8:"Excuses, uw bericht kon niet verzonden worden.
Wij zullen het probleem onderzoeken.
Probeert u het later nog eens.",9:"Bezig met versturen...",10:"Sluiten",11:"You have already submitted this case to the support team.",12:"Email ons",13:"Chat met ons",14:"Typ hier uw bericht en druk op [enter] om het te verzenden…",15:"ik"},nn:{0:"Hjelp",1:"Di e-postadresse:",2:"Ditt spørsmål:",3:"Legg ved eit skjermbilete av denne sida",4:"Send inn",5:"Legg ved eit skjermbilete av det eg ser på websida, slik at dei som skal yte brukarstøtte kan gje raskare og betre svar.",6:'Førebur skjermbilete...

Om du får spørsmål om å tillate atprogrammet køyrer, er det viktig at du trykker "Tillat", "Køyr" ellerlignande positivt svar.',7:"Takk,
Meldinga di har blitt sendt.",8:"Beklager, men meldingen kunne ikkje sendast.
Vi forsøker å rettefeilen.
Vær venleg å forsøke igjen seinare.",9:"Lastar opp...",10:"Lat att",11:"You have already submitted this case to the support team.",12:"Send inn",13:"Chat med oss",14:"Skriv di melding her og trykk [Enter]...",15:"Eg"},pl:{0:"Pomoc",1:"Adres email:",2:"Treść pytania:",3:"Załącz zrzut ekranu bieżącej strony",4:"Wyślij",5:"Proszę wysłać zrzut ekranu bieżącej strony, aby otrzymać jak najszybszą odpowiedź.",6:"Przygotowanie do zrobienia zrzutu ekranu...

Aplikacja Java przetwarza treść wiadomości.",7:"Dziękujemy,
Wiadomość została wysłana.",8:"Przepraszamy, wiadomość nie została wysłana.
Nasz zespół analizuje przyczynę problemu.
Proszę spróbować ponownie później.",9:"Ładowanie...",10:"Zamknij",11:"Już wysłałeś to zgłoszenie do wsparcia.",12:"Wyślij email",13:"Wejdź na chat",14:"Proszę wpisać treść pytania i wcisnąć enter.",15:"Ja"},pt:{0:"Ajuda",1:"Seu e-mail:",2:"Seu comentário:",3:"Inclua uma captura de tela da página atual",4:"Envie",5:"Envie a captura de tela daquilo que eu estou vendo na página da web para que o time de suporte possa fornecer uma resposta rápida.",6:'Por favor, clique "Run" ou "Allow" para permitir nosso applet enviar uma captura de tela da página da web para o time de suporte.',7:"Obrigado,
sua mensagem foi enviada.",8:"Desculpe, sua mensagem não pode ser enviada. Nós estamos investigando o problema. Por favor, tente novamente mais tarde.",9:"Carregando...",10:"Feche",11:"You have already submitted this case to the support team.",12:"Envie-nos",13:"Converse conosco",14:"Digite sua mensagem aqui e tecle [enter] para enviar...",15:"eu"},ro:{0:"Ajutor",1:"Email-ul dvs:",2:"Întrebarea dvs:",3:"Includeți o captură a paginii curente",4:"Trimte",5:"Trimiteți o captură a ceea ce vedeți pe pagina web pentru ca echipa tehnică să vă poată răspunde cât mai rapid.",6:'Pregătire pentru captură...

Vă rugăm apăsați "Run" sau "Allow" pentru a lăsa modulul să trimită o captură a paginii către echipa tehnică.',7:"Mulțumim,
Mesajul dumneavoastră a fost trimis.",8:"Scuze, mesajul dumneavoastră nu a fost trimis.
Acum investigăm problema.
Vă rugăm reîncercați mai târziu.",9:"Se încarcă...",10:"Închide",11:"You have already submitted this case to the support team.",12:"email",13:"Conversează prin chat",14:"Scrieți mesajul dumneavoastră aici și apăsați [enter] pentru a-l trimite...",15:"Eu"},ru:{0:"Помощь",1:"Ваш email:",2:"Ваш запрос:",3:"Добавить снимок экрана текущей страницы",4:"Отправить",5:"Отправить снимок экрана (того что я вижу на веб-странице), чтобы служба поддержки смогла быстро ответить.",6:"Подготовка к снятию снимка экрана
Пожалуйста разрешите Java-апплету сделать это действие.",7:"Спасибо,
Ваше сообщение отправлено.",8:"К сожалению, Ваше сообщение не может быть отправлено.
Мы разбираемся с возникшей проблемой.
Пожалуйста, повторите попытку позже.",9:"Идет загрузка...",10:"Закрыть",11:"You have already submitted this case to the support team.",12:"Отправить",13:"Чат со специалистом",14:"Введите свое сообщение здесь и нажмите [enter] для отправки...",15:"Я"},sk:{0:"Pomoc",1:"Váš email:",2:"Popíšte Vašu otázku:",3:"Pripojiť snapshot aktuálnej stránky",4:"Pošli",5:"Pošli fotku toho čo vidím na stránke aby mohla naša podpora poskytnúť rýchlu odpoveď.",6:"Pripravujeme fotku...

Prosíme umožnite appletu nám poslať fotku aktuálnej web stránky.",7:"Ďakujeme Vám!
Vaša správa bola poslaná.",8:"Prepáčte, Vaša správa nebola poslaná.
Riešime vyskytnutý problém.
Prosíme pokúste sa neskôr znova.",9:"Nahráva sa...",10:"Zatvoriť",11:"You have already submitted this case to the support team.",12:"Pošli email",13:"Chatuj s nami",14:"Napíšte svoj dotaz a stlačte [Enter]...",15:"ja"},sv:{0:"Hjälp",1:"Din emailadress:",2:"Vad kan vi hjälpa till med?",3:"Bifoga skärmdump av aktuell webbsida",4:"Skicka",5:"Skicka en skärmdump av det jag ser på webbsidan så att supportteamet lättare kan ge ett snabbt svar.",6:'Förbereder en skärmdump...

Vänligen klicka på "Kör" alternativt "Tillåt" så att vår applet ta en skärmdump och skicka den till supportteamet.',7:"Tack så mycket,
ditt meddelande har skickats.",8:"Tyvärr, ditt meddelande gick inte att skicka.
Vi undersöker problemet.
Vänligen försök igen vid ett senare tillfälle.",9:"Laddar upp...",10:"Stäng",11:"You have already submitted this case to the support team.",12:"Skicka ett email",13:"Chatta med oss",14:"Fyll i ditt meddelande här och tryck på [enter] för att skicka...",15:"Jag"},tr:{0:"Yardım",1:"E-posta Adresiniz:",2:"Sorununuzun detaylarını yazın:",3:"Şu an bulunduğum sayfanın görünümünü de ekle",4:"Gönder",5:"Şu anda siz ne görüyorsanız ekranda destek elemanının da aynı görüntüyü görebilmesi ve size daha hızlı geri dönmesini sağlar.",6:'Ekran görünümü hazırlanıyor...

Lütfen "Çalıştır" veya "İzin Ver" tuşlarından birine basın böylece yazılımımız ekran görüntüsünü alıp destek personeline gönderebilecek.',7:"Teşekkür ederiz,
Mesajınız gönderildi.",8:"Özür dileriz fakat mesaj&#305;n&#305;z gönderilemedi.
&#350;u anda bu konu ile ilgili hata gönderildi inceliyoruz
Lütfen daha sonra tekrar deneyiniz.",9:"Yükleniyor...",10:"Kapat",11:"You have already submitted this case to the support team.",12:"İletişim",13:"Bizimle Chat Yapın",14:"Mesajinizi yazin ve [enter] tusuna basin...",15:"ben"},zh:{0:"帮助",1:"您的电子邮件",2:"描述您的问题:",3:"包括对当前网页的快照",4:"发送",5:"寄了什么,我看到在网页上,让支持小组可以提供快速的答案屏幕快照",6:"准备屏幕捕获...
请相信Java小程序",7:"谢谢您
您的邮件已发送",8:"对不起,您的邮件无法发送
我们正在调查这个问题
请稍后再试",9:"上传...",10:"关闭",11:"You have already submitted this case to the support team.",12:"邮件联系",13:"在线聊天",14:"在这里输入后按回车键发送",15:"me"},zh_TW:{0:"排解疑難",1:"你的電郵地址:",2:"你的問題:",3:"Include a snapshot of the current page",4:"傳送",5:"Send a screen shot of what I am seeing on the web page so that the support team can provide a fast answer.",6:'Preparing for snapshot...

Please click "Run" or "Allow" to let our applet send a snapshot of the web page to the support team.',7:"謝謝。
你的訊息已送出",8:"對不起,你的訊息傳送發生錯誤。
我們正在調查中,
請稍後再試。",9:"上傳中…...",10:"關閉",11:"你的個案已經提交到支援小組",12:"以電郵聯絡我們",13:"聊天對話",14:"在這裡輸入後按下 Enter 鍵發送",15:"我"},en:{0:"Help",1:"Your email:",2:"Your question:",3:"Include a snapshot of the current page",4:"Send",5:"Send a screen shot of what I am seeing on the web page so that the support team can provide a fast answer.",6:'Preparing for snapshot...

Please click "Run" or "Allow" to let our applet send a snapshot of the web page to the support team.',7:"Thank you,
Your message has been sent.",8:"Sorry, your message couldn't be sent.
We are investigating the issue.
Please try again later.",9:"Uploading...",10:"Close",11:"You have already submitted this case to the support team.",12:"Email us",13:"Chat with us",14:"Type your message here and press [enter] to send...",15:"me",16:"How can we help?",17:"Do any of these help?",18:"Next",19:"Back",20:"None of these helped...",21:"How would you rate your chat?",22:"How would you rate your chat with {alias}?",23:"Any comments you wish to add?",24:"Submit",25:"or Cancel",26:"Thank you for your feedback!",27:"Not helpful",28:"Needs work",29:"So-so",30:"Helpful",31:"Very helpful",32:"Poor",33:"Ok",34:"Great",36:"Minimize",37:"End Chat",38:"Call from my computer",39:"Call me on my phone",40:"Return to chat",41:"Call me",42:"Cancel",56:"Please click the UPLOAD button below.",57:"UPLOAD",58:"Close"}}},prepareEventHandling:function(){document.addEventListener?(Moneypenny.addEvent=function(a,b,c){return a.addEventListener(b,c,!1),c},Moneypenny.removeEvent=function(a,b,c){a.removeEventListener(b,c,!1)}):document.attachEvent&&(Moneypenny.addEvent=function(a,b,c){var d=function(){return c.apply(a,arguments)};return a.attachEvent("on"+b,d),d},Moneypenny.removeEvent=function(a,b,c){a.detachEvent("on"+b,c)})},sendGetProactiveGeoData:function(){if(!geoRPCSent){geoRPCSent=!0;var a="w="+encodeURIComponent(widgetId);this.rpc(baseURL+"/chatjs/servicegetproactivegeodata?"+a,3,!0)}},setProactiveChatEventListener:function(a,b,c){switch(c=[c],a.toLowerCase()){case"scroll":Moneypenny.addEvent(window,"scroll",function(a){var d=(window.pageYOffset||document.documentElement.scrollyPos)+(window.innerHeight||document.documentElement.offsetHeight);Moneypenny.evaluateProactiveRule("intrule",b,d)&&Moneypenny.proactiveChatEvaluateCallback(!0,c)});break;case"click":Moneypenny.addEvent(document,"click",function(){visitorClicks++,Moneypenny.evaluateProactiveRule("intrule",b,visitorClicks)&&Moneypenny.proactiveChatEvaluateCallback(!0,c)});break;case"exit":Moneypenny.addEvent(document,"mouseout",function(a){a=a?a:window.event;var b=a.relatedTarget||a.toElement,d=a.pageY||a.clientY;b&&"HTML"!=b.nodeName||d!=-1&&d<150&&Moneypenny.proactiveChatEvaluateCallback(!0,c)})}},prepareForRegexMatch:function(a){return a.replace(/[-[\]{}()+?.,\\^$|#\s]/g,"\\$&").replace(/\*+/g,".*")},evaluateProactiveRule:function(a,b,c){switch(a.toLowerCase()){case"stringrule":var d;switch(b.operator.toLowerCase()){case"equals":return d=new RegExp("^"+Moneypenny.prepareForRegexMatch(decodeURIComponent(b.value))+"$"),d.test(c);case"notequals":return d=new RegExp("^"+Moneypenny.prepareForRegexMatch(decodeURIComponent(b.value))+"$"),!d.test(c);case"contains":return d=new RegExp(Moneypenny.prepareForRegexMatch(decodeURIComponent(b.value))),d.test(c);case"notcontains":return d=new RegExp(Moneypenny.prepareForRegexMatch(decodeURIComponent(b.value))),!d.test(c);case"in":return d=new RegExp(Moneypenny.prepareForRegexMatch(decodeURIComponent(c))),d.test(b.value);case"beginswith":return d=new RegExp("^"+Moneypenny.prepareForRegexMatch(decodeURIComponent(b.value))),d.test(c);case"endwith":return d=new RegExp(Moneypenny.prepareForRegexMatch(decodeURIComponent(b.value))+"$"),d.test(c);case"matchregex":return d=new RegExp(decodeURIComponent(b.value)),d.test(c)}break;case"intrule":switch(b.operator.toLowerCase()){case"equals":return c==b.value;case"notequals":return c!=b.value;case"greater":return c>b.value;case"less":return c=b.value;case"lessequal":return c<=b.value}break;case"boolrule":return Moneypenny.booleanToString(c)==Moneypenny.booleanToString(b.value);case"timeofdayrule":for(var e=new Date(b.toEpoch),f=new Date(b.fromEpoch),g=new Date(c),h=!1,i=!1,j=b.days.length;j>=0;j--)b.days[j]==g.getUTCDay()&&(i=!0);if(!i)return!1;if(f.getUTCHours()===g.getUTCHours()&&f.getUTCMinutes()<=g.getUTCMinutes()&&(h=!0),g.getUTCHours()===e.getUTCHours()&&g.getUTCMinutes()<=e.getUTCMinutes()&&(h=!0),h)return!0;var k=e.getUTCHours()0;){a=ruleSetArray[i],g=!Moneypenny.isRuleSetAgentRouted(a)&&!Moneypenny.isRuleSetTagRouted(a),b=a.operator,c=a.pageRules;var j=c.length;a:for(;j-- >0;){switch(d=c[j],f=!1,d.name.toLowerCase()){case"pageurl":e=Moneypenny.proactiveUrlEvaluation(d.ruleProperty,window.location.href);break;case"entryurl":e=Moneypenny.proactiveUrlEvaluation(d.ruleProperty,Moneypenny.getEntryPageUrl(!0));break;case"comingfrom":e=Moneypenny.proactiveUrlEvaluation(d.ruleProperty,Moneypenny.getEntryPageRef(!0));break;case"keywords":e=Moneypenny.evaluateProactiveRule("stringrule",d.ruleProperty,Moneypenny.getSearchParamsFromUrl(Moneypenny.getEntryPageRef(!0)));break;case"jsvar":e=Moneypenny.evaluateProactiveRule("stringrule",d.ruleProperty,Moneypenny.getJSVarValue(d.ruleProperty.jsVar));break;case"newvisitor":e=Moneypenny.evaluateProactiveRule("boolrule",d.ruleProperty,MoneypennyChat.getVisitorIsFirstTimeVisiting()),g=!1;break;case"chattedbefore":e=Moneypenny.evaluateProactiveRule("boolrule",d.ruleProperty,MoneypennyChat.getVisitorNumberOfPreviousChats()>0),g=!1;break;case"pagesvisited":e=Moneypenny.evaluateProactiveRule("intrule",d.ruleProperty,MoneypennyChat.getVisitorNumberOfPagesVisited());break;case"lang":case"timeofday":case"country":case"state":case"city":case"region":h=!0;default:f=!0}if(!f)if("any"===b){if(e)return g&&Moneypenny.setOpenProactiveChatAPIRule(a),void Moneypenny.openProactiveV2Chat(i)}else{if(!e){ruleSetArray.splice(i,1);break a}if(!(c.length>1))return g&&Moneypenny.setOpenProactiveChatAPIRule(a),void Moneypenny.openProactiveV2Chat(i);ruleSetArray[i].pageRules.splice(j,1)}}}h?Moneypenny.sendGetProactiveGeoData():Moneypenny.proactiveChatRuleEvalStep3()},proactiveUrlEvaluation:function(a,b){if(!b||!a)return!1;var c=Moneypenny.evaluateProactiveRule("stringrule",a,b);if("notequals"!==a.operator.toLowerCase()&&!c||"notequals"===a.operator.toLowerCase()&&c){var d="",e=b.charAt(b.length-1);d="/"===e?b.substring(0,b.length-1):b+"/",c=Moneypenny.evaluateProactiveRule("stringrule",a,d)}return c},callbackGetProactiveGeoData:function(a,b,c,d,e){visitorCountry=a,visitorRegion=b,visitorCity=c,visitorLocalTime=1e3*d,visitorLanguages=e,Moneypenny.proactiveChatRuleEvalStep2()},proactiveChatRuleEvalStep2:function(){var a,b,c,d,e,f,g;currentEvaluationStep=2;for(var h=ruleSetArray.length;h-- >0;){a=ruleSetArray[h],g=!Moneypenny.isRuleSetAgentRouted(a)&&!Moneypenny.isRuleSetTagRouted(a),b=a.operator,c=a.pageRules;var i=c.length;a:for(;i-- >0;){switch(d=c[i],f=!1,d.name.toLowerCase()){case"timeofday":e=Moneypenny.evaluateProactiveRule("timeofdayrule",d.ruleProperty,visitorLocalTime);break;case"country":e=Moneypenny.evaluateProactiveRule("stringrule",d.ruleProperty,visitorCountry);break;case"region":e=Moneypenny.evaluateProactiveRule("stringrule",d.ruleProperty,visitorCountry);break;case"state":e=Moneypenny.evaluateProactiveRule("stringrule",d.ruleProperty,visitorRegion);break;case"city":e=Moneypenny.evaluateProactiveRule("stringrule",d.ruleProperty,visitorCity);break;case"lang":e=Moneypenny.evaluateProactiveRule("stringrule",d.ruleProperty,visitorLanguages);break;default:f=!0}if(!f)if("any"===b){if(e)return g&&Moneypenny.setOpenProactiveChatAPIRule(a),void Moneypenny.openProactiveV2Chat(h)}else{if(!e){ruleSetArray.splice(h,1);break a}if(!(c.length>1))return g&&Moneypenny.setOpenProactiveChatAPIRule(a),void Moneypenny.openProactiveV2Chat(h);ruleSetArray[h].pageRules.splice(i,1)}}}Moneypenny.proactiveChatRuleEvalStep3()},proactiveChatRuleEvalStep3:function(){function a(a){for(var b=[],c=0;c0;){c=ruleSetArray[g],d=c.pageRules;var j=d.length;for(f=!Moneypenny.isRuleSetAgentRouted(c)&&!Moneypenny.isRuleSetTagRouted(c);j-- >0;){switch(e=d[j],firstPass&&(e.eventID="eventID"+g+j),e.name.toLowerCase()){case"visitorclicks":firstPass&&(Moneypenny.setProactiveChatEventListener("click",e.ruleProperty,e.eventID),f=!1);break;case"scrolldown":firstPass&&(Moneypenny.setProactiveChatEventListener("scroll",e.ruleProperty,e.eventID),f=!1);break;case"visitorexits":firstPass&&(Moneypenny.setProactiveChatEventListener("exit",e.ruleProperty,e.eventID),f=!1);break;case"timesite":b(h,e);break;case"timepage":b(i,e)}firstPass&&f&&0===j&&Moneypenny.setOpenProactiveChatAPIRule(c)}}Moneypenny.executeProactiveChatEvaluationFinishedCallback();for(timeSiteTimeout in h)h.hasOwnProperty(timeSiteTimeout)&&window.setTimeout(function(a){return function(){Moneypenny.proactiveChatEvaluateCallback(!0,a)}}(a(h[timeSiteTimeout])),1e3*(timeSiteTimeout-MoneypennyChat.getVisitorTimeOnSite()));for(timePageTimeout in i)i.hasOwnProperty(timePageTimeout)&&window.setTimeout(function(a){return function(){Moneypenny.proactiveChatEvaluateCallback(!0,a)}}(a(i[timePageTimeout])),1e3*(timePageTimeout-MoneypennyChat.getVisitorTimeOnPage()))},proactiveChatEvaluateCallback:function(a,b){for(var c,d,e,f=ruleSetArray.length;f-- >0;){c=ruleSetArray[f],d=c.pageRules,e=c.operator;for(var g=d.length;g-- >0;)Moneypenny.isInArray(d[g].eventID,b)&&("any"===e?a&&Moneypenny.openProactiveV2Chat(f):a?d.length>1?ruleSetArray[f].pageRules.splice(g,1):Moneypenny.openProactiveV2Chat(f):ruleSetArray.splice(f,1))}},openProactiveV2Chat:function(a){var b=ruleSetArray[a];if(!waitingRPCResponce){if(waitingRPCResponce=!0,Moneypenny.isRuleSetAgentRouted(b)||Moneypenny.isRuleSetTagRouted(b))return Moneypenny.setRoutingList(a),Moneypenny.openProactiveChatWithAgentRouting(a);Moneypenny.openProactiveChatDo(!1,!1,decodeURIComponent(b.message),b.id?b.id:a)}},isRuleSetAgentRouted:function(a){return!!(a.advanced.agents&&a.advanced.agents instanceof Array&&a.advanced.agents.length>0)},isRuleSetTagRouted:function(a){return!!(a.advanced.tags&&a.advanced.tags instanceof Array&&a.advanced.tags.length>0)},setRoutingList:function(a){var b=ruleSetArray[a],c=b.advanced.agents||b.advanced.tags;routingList=[];for(var d=0;d(new Date).getTime()?routingAvailabilityCache.data:null},callbackGetAvailableAgentList:function(routingAvailabilityJSON){var routingAvailability={};routingAvailabilityJSON&&(routingAvailability=eval("("+routingAvailabilityJSON+")")),this.setRoutingAvailabilityCache(routingAvailability),this.handleProactiveChatRouting()},handleProactiveChatRouting:function(){var a=[],b=this.getRoutingAvailabilityCache(routingAvailabilityCacheLifetime);if(b!=={}){for(var c=0;c0)return Moneypenny.sendGetProactiveChatAgent(!1,proactiveChatAgentRoutingRuleSetIndex,a)}Moneypenny.proactiveChatWithAgentRoutingErrorFallback()}},proactiveChatWithAgentRoutingErrorFallback:function(){switch(waitingRPCResponce=!1,Moneypenny.clearProactiveChatEvaluationFinishedCallback(),proactiveChatAgentRoutingRuleSetIndex!=-1&&(ruleSetArray.splice(proactiveChatAgentRoutingRuleSetIndex,1),proactiveChatAgentRoutingRuleSetIndex=-1),routingAvailabilityCache={},routingList=[],currentEvaluationStep){case 1:Moneypenny.proactiveChatRuleEvalStep1();break;case 2:Moneypenny.proactiveChatRuleEvalStep2();break;case 3:Moneypenny.proactiveChatRuleEvalStep3()}},sendProactiveRoutingHashAndNumber:function(a,b){var c="w="+encodeURIComponent(widgetId);c+="&h="+encodeURIComponent(a),c+="&nr="+encodeURIComponent(b),this.rpc(baseURL+"/chatjs/servicegetproactivedatafromnrhash?"+c,3,!0),proactiveChatAgentRoutingRuleSetIndex!=-1&&ruleSetArray.splice(proactiveChatAgentRoutingRuleSetIndex,1)},proactiveChatInitialize:function(a){if(Moneypenny.setIsInstanceProactiveV2(!0),!MoneypennyChat.isNoProactiveChatCookie()&&a){var b=JSON.parse(a);if(ruleSetArray=b.ruleSets.reverse(),ruleSetArrayOperator=b.operator,b.proactiveDisableTime&&Moneypenny.setNoProactiveChatDelay(b.proactiveDisableTime),b.newVisitorCookieLifeTime&&(Moneypenny.setVisitorCookieLifeTime(b.newVisitorCookieLifeTime),MoneypennyChat.getVisitCookie())){var c=MoneypennyChat.getVisitCookie(),d=Math.floor(MoneypennyChat.getVisitorTimeOnSite()/60),e=Moneypenny.getVisitorCookieLifeTime()-d;e<0&&(e=1),MoneypennyChat.setCookie("MoneypennyVisit",c,e)}Moneypenny.proactiveChatRuleEvalStep1()}},getJSVarValue:function(a){jsvars=a;var b=this.getJSVariables(),c=b.split("=");return c[0]==a?c[1]:""},messagesInit:function(newMessagesJSON){var newMessagesObj=eval("("+newMessagesJSON+")");Moneypenny.messagesObj=newMessagesObj,Moneypenny.messagesObj&&(Moneypenny.getMessage=function(a){Moneypenny.messagesObj.isSingle&&(Moneypenny.setLocale=function(){ return!1});var b=Moneypenny.getLocale(),c="ar"===b||"iw"===b?"direction:rtl;":"";return Moneypenny.setDirection(c),Moneypenny.messagesObj[b][a]})},setPreChatSearchEnabled:function(a){this.enablePreChatSearch=a,1==a&&this.setPreChatSearch(1)},getPreChatSearchEnabled:function(){return this.enablePreChatSearch},resetPreChatSearch:function(){preChatSearchQuestion="",Moneypenny.setPreChatSearch(1)},startPreChatSearch:function(){var a='
';MoneypennyChat.populateSubChatForm(a,"Moneypenny.closeForm();"),Moneypenny._hideButton();var b=document.getElementById("Moneypenny_CM");b&&(b.parentNode.style.borderColor="white"),Moneypenny.preChatSearchShowSearchForm()},preChatSearchShowSearchForm:function(){function a(){var a=document.getElementById("Moneypenny_CM").parentNode,b=parseInt(a.style.height,10),c=d.offsetHeight,g=f.offsetHeight,h=b-c-g-20;e.style.height=h+"px"}var b=document.getElementById("preChatSearchContainer"),c='
'+Moneypenny.getMessage(16)+'
";b.innerHTML=c;var d=document.getElementById("preChatSearchInstructions"),e=document.getElementById("preChatSearchQuestionTextArea"),f=document.getElementById("preChatSearchSubmitArea"),g=document.getElementById("preChatSearchNextButton");g.onclick=function(){return Moneypenny.preChatSearchSubmit(),!1},a(),e.value=preChatSearchQuestion?preChatSearchQuestion:"",e.focus(),e.onkeyup=function(a){a&&13==a.keyCode&&Moneypenny.preChatSearchSubmit()}},preChatSearchSubmit:function(){Moneypenny.disableButton("preChatSearchNextButton");var a=document.getElementById("preChatSearchContainer"),b='
";preChatSearchQuestion=document.getElementById("preChatSearchQuestionTextArea").value,a.innerHTML=b;var c=baseURL+"/chatjs/preChatSearch?criteria="+encodeURIComponent(preChatSearchQuestion)+"&widget="+Moneypenny.getWidgetId()+"&locale="+Moneypenny.getLocale();Moneypenny.rpc(c,3,!0)},callbackSearchAction:function(a){function b(){var a=document.getElementById("Moneypenny_CM").parentNode,b=parseInt(a.style.height,10),c=e.offsetHeight,d=g.offsetHeight,h=b-c-d-20;f.style.height=h+"px"}if(Moneypenny.isCustomDesignEnabled())return void Moneypenny.getCustomDesignUI().intelliPrechatController.callbackSearchResults(a);if(!a||a.length<=0)return void Moneypenny.preChatSearchStartChat();var c=document.getElementById("preChatSearchContainer"),d=' ";c.innerHTML=d;var e=document.getElementById("preChatResultsHeader"),f=document.getElementById("preChatSearchSearchResults"),g=document.getElementById("preChatSearchResultsSubmitArea"),h=document.getElementById("preChatSearchBackButton"),i=document.getElementById("preChatSearchHelpButton");h.onclick=function(){return Moneypenny.preChatSearchShowSearchForm(),!1},i.onclick=function(){return Moneypenny.preChatSearchStartChat(),!1};for(var j='",f.innerHTML=j,b()},preChatSearchStartChat:function(){if(Moneypenny.setPreChatSearch(0),""==startChatMessage){var a=[-1,-1,-1,-1];Moneypenny.formPosX&&Moneypenny.formPosY?(a[0]=Moneypenny.formPosX,a[2]=Moneypenny.formPosY):a=Moneypenny.getDefaultChatPosition(),Moneypenny.setDescription(preChatSearchQuestion),Moneypenny.loadForm(),Moneypenny.positionForm(a[0],a[1],a[2],a[3])}else preChatSearchQuestion&&(Moneypenny.setDescription(preChatSearchQuestion),Moneypenny.setStartChat(preChatSearchQuestion)),visitorFirstMessage=preChatSearchQuestion?preChatSearchQuestion:"n/a",Moneypenny.startChat(preChatSearchQuestion,!0)},deactivateHTML:function(a){return a.replace(/>/g,">").replace(/]*>/g," ").replace(/\s{2,}/g," ")}}}(),MoneypennyChat=function(){var caseId="",baseURL="",timer=null,pollCount=0,totalPollCount=0,lastTypedText="",_useStaticAgentName=!1,_useStaticAgentAvatar=!1,nickname="",prevNickname="",avatarURL="",prevAvatarURL="",prevMsgFrom="",readonly=!1,webCapInProgress=!1,history="",userInput="",introMsg=!0,customIntroMsg="",question="",questionKeptForCanceledChat="",chatview="",pollId=0,chatAnswered=!1,transcriptAgentCSS="color:#75A7fE;",transcriptVisitorCSS="color:#A1A1A3;",transcriptTextCSS="color:black;",transcriptPadding=7,minimized,minimizedDimensions=[0,0,0,0],_chatMenuButtonHeight,_isFirstInit=!0,bgURL=Moneypenny.getStaticBaseURL()+"/wbg/moneypenny_chat_form.png",bgCallMeURL=Moneypenny.getStaticBaseURL()+"/wbg/moneypenny_chat_form.png",pageTitle=document.title,proactiveMsg="",msgIdLst=null,postChatIframeURL="",postChatHTML="",proactiveMessageBuffer="",pageInitTime=+new Date,reassignmentVar,secureCookies=!1,chatAgentSurvey=null,selectedAgentSurveyRating=null,fileUploadInProgress=!1,secureDataTransferInProgress=!1,WAGTTimeout,isApprovalBotChat=!1,approvalCookieName="MoneypennyApproval",isHumanResponded=!1;return{setCaseId:function(a){caseId=a},getCaseId:function(){return caseId},startChat:function(a,b){this.initChat(a,b),this.sendChatAction()},restartChat:function(a,b){if(introMsg=!1,this.initChat(a,b),Moneypenny.getPageChangeNotificationAllowed()?this.sendChatMessage(7,window.location.href):this.sendChatMessage(7,""),this.setReadOnly(!1),this.setPreviousChatWindowState(),this.startPolling(),!MoneypennyChat.isMinimized()){var c=document.Moneypenny_Form;c&&c.chat.focus()}},preloadChatFormImg:function(){if(!Moneypenny.isMobileEnabled()&&!Moneypenny.isCustomDesignEnabled()){var a=new Image;a.src=bgURL}},getNickname:function(){return nickname},setIsApprovalBotChat:function(a){isApprovalBotChat=a},getIsApprovalBotChat:function(){return isApprovalBotChat},setIsHumanResponded:function(a){isHumanResponded=a},getIsHumanResponded:function(){return isHumanResponded},proactive:function(a,b,c,d){Moneypenny.isMobileEnabled()?(Moneypenny.getMobileUI().proactive(a,b,c,d),proactiveMessageBuffer=a):Moneypenny.isCustomDesignEnabled()?(Moneypenny.getCustomDesignUI().proactive(a,c,d),proactiveMessageBuffer=a,nickname=c,b&&this.newMessageNotification()):(baseURL=Moneypenny.getBaseURL(),avatarURL=d,""==caseId&&(nickname=c,this.showFormChat()," "!=a?"/info "==a.substr(0,6)?proactiveMsg=a.substr(6):(d&&(avatarURL=d),proactiveMsg=this.createTranscriptLine(c,a),proactiveMessageBuffer=a):proactiveMsg=" ",history=proactiveMsg,MoneypennyChat.displayHistory(),Moneypenny.slideFormIn(),b&&this.newMessageNotification(),this.setReadOnly(!1),""!=c&&Moneypenny.callCallback("OpenProactive",c,a),Moneypenny.setProactiveChatAutocloseTimeout()))},chatStarting:function(){document.getElementById("Moneypenny_CL")||Moneypenny.isMobileEnabled()||Moneypenny.isCustomDesignEnabled()||(baseURL=Moneypenny.getBaseURL(),this.showFormChat(),this.setReadOnly(!0))},setSecureCookies:function(){secureCookies=!0},initChat:function(a,b){caseId=a,baseURL=b,pollCount=0,pollId=0,nickname="",readonly=!1,webCapInProgress=!1,chatAnswered=!1,msgIdLst={};var c=document.Moneypenny_Form;userInput=c&&c.chat?c.chat.value:"",""==history&&""!=proactiveMsg&&(history=proactiveMsg),proactiveMsg="",Moneypenny.disableCallMe(),this.setCaseIdCookie(),this.setChatViewCookie(),Moneypenny.isMobileEnabled()||Moneypenny.isCustomDesignEnabled()||this.showFormChat()},setCustomIntroMsg:function(a){customIntroMsg=a},isFirstInit:function(){return _isFirstInit},reInit:function(){_isFirstInit=!1,avatarURL="",prevAvatarURL="",prevNickname="",proactiveMessageBuffer="",history="",prevMsgFrom="",this.setReadOnly(!0),reassignmentVar&&(reassignmentVar=window.clearTimeout(reassignmentVar)),Moneypenny.isCustomDesignEnabled()||(Moneypenny.formPosY=-1,Moneypenny.formPosX=-1),MoneypennyChat.resetChatWindowCookieData(),MoneypennyChat.setIsApprovalBotChat(!1),MoneypennyChat.setIsHumanResponded(!1)},isProactive:function(){return""!=proactiveMsg},clearProactive:function(){proactiveMsg="",Moneypenny.proactiveAgentNumber=""},sendChatAction:function(){var a="ci="+encodeURIComponent(Moneypenny.getDbCaseId());Moneypenny.proactiveAgentNumber&&(a+="&a="+Moneypenny.proactiveAgentNumber),proactiveMessageBuffer&&(a+="&pm="+encodeURIComponent(proactiveMessageBuffer)),Moneypenny.getTags()&&(a+="&tags="+Moneypenny.getTags()),Moneypenny.getUserName()&&(a+="&un="+encodeURIComponent(Moneypenny.getUserName())),MoneypennyChat.getCookie(approvalCookieName)&&(a+="&aprv="+MoneypennyChat.getCookie(approvalCookieName));var b=baseURL+"/chatjs/ServiceChatAction?"+a;Moneypenny.rpc(b,3,!0)},callbackChatAction:function(a){caseId&&(Moneypenny.isCustomDesignEnabled()&&"proactive"===Moneypenny.getCustomDesignUI().getTypeOfMessage()&&Moneypenny.getCustomDesignUI().proactiveController.clearInvite(),this.setReadOnly(!1),MoneypennyChat.updateHistoryCookieForLastCase(caseId),this.startPolling(),""!=Moneypenny.getCallMePhone()&&(Moneypenny.sendClickToCall(Moneypenny.getCallMePhone(),2),Moneypenny.setCallMePhone("")))},setReassignmentTimerAfterRestartChat:function(a){if(a>-1&&!reassignmentVar){var b=this.getHistoryCookieLastCase();if(b&&b[0]==caseId){var c=new Date,d=c.getTime()-b[1];d<1e3*a&&(reassignmentVar=window.setTimeout(function(){MoneypennyChat.callAssignNewAgent()},1e3*a-d))}}},callAssignNewAgent:function(){if(caseId&&!chatAnswered&&"1"!=MoneypennyChat.getBannedCookie()&&""==Moneypenny.getCallMePhone()){var a=document.getElementById("Moneypenny_Typing");if(a&&"visible"==a.style.visibility)return void(reassignmentVar=window.setTimeout(function(){MoneypennyChat.callAssignNewAgent()},1e4));var b="c="+encodeURIComponent(Moneypenny.getCaseId());b=Moneypenny.appendTagsParameter(b);var c=baseURL+"/chatjs/ServiceAgentReassign?"+b;Moneypenny.rpc(c,3,!0)}},callbackAssignNewAgent:function(a){a&&(MoneypennyChat.updateHistoryCookieForLastCase(caseId),reassignmentVar=null)},soundNotificationDiv:function(){return""},populateChatForm:function(){var a=350,b=370,c='
',d=23,e=23;c+='
'+Moneypenny.getMessage(10)+'
'+this.soundNotificationDiv(),Moneypenny.isBranded()&&(c+='
',Moneypenny.logoLink()&&(c+=Moneypenny.getLogoClickATag()),c+='powered by Moneypenny',Moneypenny.logoLink()&&(c+=""),c+="
"),c+='
'+Moneypenny.getCallMeButton()+"
",document.getElementById("Moneypenny_P").innerHTML=c,Moneypenny.positionDragger(25,16,282,21),Moneypenny.showForm(!1,a,b,19,18,304,331)},populateSubChatForm:function(a,b){var c=350,d=370,e="white",f="#8e8e8e",g='
'+a+"
",h=23,i=23;b&&(g+='
'+Moneypenny.getMessage(10)+'
'),g+=this.soundNotificationDiv(),Moneypenny.isBranded()&&(g+='
',Moneypenny.logoLink()&&(g+=Moneypenny.getLogoClickATag()),g+='powered by Moneypenny',Moneypenny.logoLink()&&(g+=""),g+="
"),document.getElementById("Moneypenny_P").innerHTML=g,Moneypenny.positionDragger(25,16,282,21),Moneypenny.showForm(!1,c,d,19,18,304,331)},populateCallMeForm:function(a,b){var c,d;document.getElementById("Moneypenny_CL")?(c=MoneypennyChat.getChatTranscriptWidth()+"px",d=Math.round(.75*MoneypennyChat.getChatTranscriptWidth())+"px"):document.getElementById("Moneypenny_CM")?(c=MoneypennyChat.getPostChatWidth()+"px",d=Math.round(.75*MoneypennyChat.getPostChatWidth())+"px"):(c="230px",d="172px");var e="#4d4d4d",f="#FFFFFF",g=Moneypenny.getStaticBaseURL()+"/wbg/callme_phone_grey.png",h=Moneypenny.getStaticBaseURL()+"/wbg/callme_phone_black.png",i=Moneypenny.getStaticBaseURL()+"/wbg/callme_web_grey.png",j=Moneypenny.getStaticBaseURL()+"/wbg/callme_web_black.png",k=Moneypenny.getMessage(38),l=Moneypenny.getMessage(39),m=Moneypenny.getMessage(40),n="",o=Moneypenny.isIE6()||Moneypenny.isIE7()||Moneypenny.isIE8(),p=function(){if(!a&&caseId){var p="document.getElementById('Moneypenny_CMW').style.backgroundImage='url("+j+")';";p+="document.getElementById('Moneypenny_CMW').style.color='"+f+"';";var q="if (document.getElementById('Moneypenny_CMW')) {";q+="document.getElementById('Moneypenny_CMW').style.backgroundImage='url("+i+")';",q+="document.getElementById('Moneypenny_CMW').style.color='"+e+"';",q+="}";var r="width:"+c+";height:86px;margin:20px auto 0 auto;background-image:url("+i+");";r+="background-repeat: no-repeat no-repeat;background-position:center;cursor:pointer;position:relative;color:"+e+";";var s="width:"+c+";position:absolute;bottom:5px;margin-top:3px;font-family:arial,sans-serif;font-size:12px;font-weight:normal;font-weight:bold;",t="document.getElementById('Moneypenny_CMP').style.backgroundImage='url("+h+")';";t+="document.getElementById('Moneypenny_CMP').style.color='"+f+"';";var u="if (document.getElementById('Moneypenny_CMP')) {";u+="document.getElementById('Moneypenny_CMP').style.backgroundImage='url("+g+")';",u+="document.getElementById('Moneypenny_CMP').style.color='"+e+"'};";var v="width:"+c+";height:86px;margin:20px auto 0 auto;background-image:url("+g+"); background-repeat: no-repeat no-repeat;background-position:center;cursor:pointer;position:relative;color:"+e+";",w="width:"+c+";position:absolute;bottom:5px;margin-top:3px;font-family:arial,sans-serif;font-size:12px;font-weight:normal;font-weight:bold;",x='
';x+='
'+k+"
",x+="
",Moneypenny.isIE()||Moneypenny.isSafari()?Moneypenny.hasFlash()&&(n+=x):n+=x,n+='
',n+='
'+l+"
",n+="
"}else{b||(b=""),a=!0;var y="width:"+c+";margin:20px auto;padding:10px 0px;border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px;background-color:white;",z="margin-top:6px;margin-bottom:6px;font-family:lucida grande,Helvetica Neue,Helvetica,Arial,sans-serif;font-size:12px;font-weight:default;color:grey;",A="margin:0px;",B="height:30px;max-width:"+d+";margin-top:0px;margin-top:0px;font-family:lucida grande,Helvetica Neue,Helvetica,Arial,sans-serif;font-size:13px;color:black;border:2px inset;"+(b?"border-color:red;":""),C="width:auto;height:28px;margin:0;margin-top:6px;padding:3px 5px 3px 5px;font-size:12px;font-family:lucida grande,Helvetica Neue,Helvetica,Arial,sans-serif;cursor:pointer;font-weight:bold;";n+='
',n+='
Enter your phone number
',n+='
',n+='
',n+='',n+="
",n+="
"}history&&(n+='
'+m+"
"),MoneypennyChat.populateSubChatForm(n,"MoneypennyChat.submitFormCallMe(false);"),a&&!o&&(Moneypenny.phonePicker.init("phonenumber",Moneypenny.getVisitorCountry()),MoneypennyChat.selectPhoneInputCountry(Moneypenny.getVisitorCountry()),Moneypenny.phonePicker.setCountryListWindowHeight(150));var D=document.getElementById("Moneypenny_CM");D.style.top=Math.round((290-D.offsetHeight)/2)+"px"};if(Moneypenny.phonePicker)p();else{window._1a058890_5788_4457_aa0e_3453f3f878a0=Moneypenny;var q=document.createElement("script");q.type="text/javascript",q.src=Moneypenny.getBaseURL()+"/js/i18nphonepicker/i18nphonepicker-min.js",q.onload=function(){var a=document.createElement("link");a.rel="stylesheet",a.type="text/css",a.href=Moneypenny.getBaseURL()+"/js/i18nphonepicker/css/intlTelInput.css",document.getElementsByTagName("head")[0].appendChild(a),p()},document.getElementsByTagName("head")[0].appendChild(q)}},selectPhoneInputCountry:function(a){if(("string"==typeof a||a instanceof String)&&(a=a.toLowerCase()),Moneypenny.phonePicker){var b=Moneypenny.phonePicker.getCountryData();if(b.countries&&a)for(var c=0;c5)},submitFormCallMe:function(a,b){if(a)if(Moneypenny.disableCallMe(),b)window.open(Moneypenny.getBaseURL().replace(/http\:/,"https:")+"/voice/webphone.jsp?c="+Moneypenny.getCaseId(),"webphone","left=20,top=20,width=310,height=260,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1"),Moneypenny.callCallback("StartCallme",""),caseId?MoneypennyChat.formCallMeDone():Moneypenny.hideOverlay(!1);else{var c,d="";if(c=Moneypenny.isCustomDesignEnabled()?Moneypenny.getCustomDesignIframe().getElementById("callme-form"):document.getElementById("Moneypenny_Form"),c&&c.phonenumber&&c.phonenumber.value){if(!MoneypennyChat.isPhoneNumberValid())return void Moneypenny.callbackCheckPhone(!1);d=c.phonenumber.value.replace(/[^+0-9xX]*/g,"")}""!=d&&(Moneypenny.setCallMePhone(d),Moneypenny.sendCheckPhone(d),Moneypenny.isCustomDesignEnabled()||(document.getElementById("Moneypenny_CallMeSubmit").innerHTML="Please wait..."))}else Moneypenny.enableCallMe(),caseId||MoneypennyChat.isProactive()?MoneypennyChat.formCallMeDone():Moneypenny.hideOverlay(!1);return!1},showFormChat:function(){if(!Moneypenny.isMobileEnabled()&&!Moneypenny.isCustomDesignEnabled()){var a="word-wrap: break-word;-ms-word-break: keep-all;word-break: keep-all;word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;-ms-hyphens: auto;hyphens: auto;white-space: pre-wrap;";Moneypenny.addStyleRule(["#Moneypenny_CL .Moneypenny_transcriptLine"],a),this.populateChatForm()}this.isProactive()&&(history=proactiveMsg,this.setReadOnly(!1)),""!=history?this.displayHistory():this.setReadOnly(!0);var b=document.Moneypenny_Form;b&&(""!=userInput?(b.chat.value=userInput,userInput=""):""!=question&&"(none)"!=question&&(""==history&&this.appendTextToChat(Moneypenny.getMessage(15),question+"
",!1,!1,!1),question=""),introMsg?""!=customIntroMsg?b.chat.value=customIntroMsg:b.chat.value=unescape(Moneypenny.getMessage(14)):MoneypennyChat.isMinimized()||b.chat.focus(),""!=this.getMessageCookie()&&(introMsg=!1,b.chat.value=this.getMessageCookie(),this.setMessageCookie("")))},displayHistory:function(){var a=document.getElementById("Moneypenny_CL");try{a.innerHTML=history+this.createTranscriptLine(nickname,"",!0),this.scrollDown()}catch(a){}},startPolling:function(){timer&&this.stopPolling(),timer=setInterval("MoneypennyChat.pollChat()",2e3)},stopPolling:function(){clearInterval(timer)},keyDownHandler:function(a){var b,c=a||window.event,d=c.keyCode||c.which;return c&&13==d?(c.ctrlKey?(b=document.Moneypenny_Form,b&&(b.chat.value=b.chat.value+"\n")):readonly||(caseId||Moneypenny.clearProactiveChatAutocloseTimeout(),this.submitChat()),c.stopPropagation&&c.stopPropagation(),c.preventDefault&&c.preventDefault(),c.cancelBubble&&(c.cancelBubble=!0),c.returnValue&&(c.returnValue=!1),!1):(introMsg&&(b=document.Moneypenny_Form,b&&(b.chat.value=""),introMsg=!1),caseId||Moneypenny.setProactiveChatAutocloseTimeout(),!0)},submitChat:function(){var a=document.Moneypenny_Form;if(a){var b=a.chat.value;introMsg?(a&&(a.chat.value=""),introMsg=!1):""!=b&&(this.appendTextToChat(Moneypenny.getMessage(15),Moneypenny.deactivateHTML(b),!1,!1,!1),this.isProactive()?(Moneypenny.sendCreateCase(Moneypenny.getUserEmail(),b,!0,!1),this.setReadOnly(!0)):this.sendChatMessage(1,Moneypenny.deactivateHTML(b)),a.chat.value="",lastTypedText=""),a.chat.focus()}return!1},setReadOnly:function(a){readonly=a;try{var b=document.getElementById("Moneypenny_CE");b&&(readonly?b.setAttribute("readOnly","readonly"):b.removeAttribute("readOnly"))}catch(a){}},callbackChatPosted:function(a){},parseEmoji:function(a){var b=/(:[^:\s]{1,}\|[^:\s]{4,}:)/g;return a.match(b)&&(a=a.replace(b,function(a){var b=a.split("|"),c=b[1];c=c.substring(0,c.length-1);var d=b[0].substring(1),e=':'+d+':';return e})),a},appendTextToChat:function(a,b,c,d,e,f){if(this.setCaseIdCookie(),b=b.replace(/\&\#41\;/g,")"),b=b.replace(/\&\#40\;/g,"("),b=b.replace(/\\n/g,"
"),b=b.replace(/\n/g,"
"),b=b.replace(/< *br *\/*>/g,"
"),b=b.replace(/< *BR *\/*>/g,"
"),Moneypenny.isMobileEnabled()||Moneypenny.isCustomDesignEnabled()||(b=b.replace(/(\s|^):\)/g," :slightly_smiling_face|1f642:"),b=b.replace(/(\s|^);\)/g," :wink|1f609:"),b=b.replace(/(\s|^):D/g," :grinning|1f600:"),b=b.replace(/(\s|^):\(/g," :slightly_frowning_face|2639:"),b=b.replace(/(\s|^):o/g," :open_mouth|1f62e:"),b=b.replace(/(\s|^):\-\)/g," :slightly_smiling_face|1f642:"),b=b.replace(/(\s|^);\-\)/g," :wink|1f609:"),b=b.replace(/(\s|^):\-D/g," :grinning|1f600:"),b=b.replace(/(\s|^):\-\(/g," :slightly_frowning_face|2639:"),b=b.replace(/(\s|^):\-o/g," :open_mouth|1f62e:"),MoneypennyChat.handleDataTransferInProgress()),b=this.parseEmoji(b),Moneypenny.isMobileEnabled())Moneypenny.getMobileUI().updateChat(b,a==Moneypenny.getMessage(15),c);else if(Moneypenny.isCustomDesignEnabled())Moneypenny.getCustomDesignUI().updateChat(b,a==Moneypenny.getMessage(15),c,d,e,f);else{var g=document.getElementById("Moneypenny_CL");history+=this.createTranscriptLine(a,b,!1),prevMsgFrom=a,1!=c&&g&&(g.innerHTML=history+this.createTranscriptLine(nickname,"",!0),this.scrollDown())}systemMsgId=null},setUseStaticAgentAvatar:function(a){_useStaticAgentAvatar=a},staticAgentAvatarEl:function(){return document.getElementById("Moneypenny_AAvatar")},populateStaticAgentAvatar:function(){var a=this.staticAgentAvatarEl();a&&a.src!==avatarURL&&(a.src=avatarURL)},setUseStaticAgentName:function(a){_useStaticAgentName=a},staticAgentNameEl:function(){return document.getElementById("Moneypenny_AName")},populateStaticAgentName:function(){var a=this.staticAgentNameEl();a&&prevNickname!==nickname&&(a.innerHTML=nickname)},createTranscriptLine:function(a,b,c){var d="",e="",f=a===nickname;if(history||(d+='
',_useStaticAgentAvatar&&this.populateStaticAgentAvatar()),!c&&""!==avatarURL&&f&&(_useStaticAgentAvatar||""!=prevNickname&&prevNickname==nickname||(e+=''),prevAvatarURL=avatarURL,prevNickname=nickname),""!==a&&"Chat Bot"!==a&&a!=prevMsgFrom){var g=f?transcriptAgentCSS:transcriptVisitorCSS;e+=''+a+": "}!c&&""!==avatarURL&&f&&(e+="
",avatarURL="");var h="",i="";c?(h='id="Moneypenny_Typing" ',i="visibility:hidden;",b='[...]'):f||(b=Moneypenny.deactivateHTML(b));var j='class="Moneypenny_transcriptLine" ';return a!=prevMsgFrom?(""!=history&&(d+='
'),d+="
'+e+b+"
"):d+="
'+e+b+"
",d},isTyping:function(a){if(Moneypenny.isMobileEnabled()&&a)Moneypenny.getMobileUI().triggerIsTyping();else if(Moneypenny.isCustomDesignEnabled())Moneypenny.getCustomDesignUI().triggerIsTyping(a);else{var b=document.getElementById("Moneypenny_Typing");b&&(a?b.style.visibility="visible":b.style.visibility="hidden")}},scrollDown:function(){var a=document.getElementById("Moneypenny_CL");a&&(a.scrollTop=a.scrollHeight)},animateScrollDown:function(a,b,c){var d=0,e=20,f=a.scrollHeight-b;a.scrollTop=b;var g=function(){d+=e;var b=f/c*100;a.scrollTop+=b,d0?window.requestAnimationFrame&&requestAnimationFrame(b)||setTimeout(b,20):a.parentNode.removeChild(a)};isNaN(parseInt(a.style.opacity))&&(a.style.opacity=1),b()},waitingForAgentMessage:function(a){if(MoneypennyChat.getIsApprovalBotChat()){if(MoneypennyChat.getIsHumanResponded())return}else if(MoneypennyChat.getChatAnsweredStatus())return;""!=Moneypenny.getCaseId()&&(systemMsgId="WAGT_AUTO_RESPOND",Moneypenny.isCustomDesignEnabled()?this.appendTextToChat("",a,!1,systemMsgId,!1):(a=a.replace(/\[\[/g,''),a=a.replace(/\]\]/g,""),a=a.replace(/\[/g,''),a=a.replace(/\]/g,""),this.appendTextToChat("","
"+a,!1,systemMsgId,!1)),clearTimeout(WAGTTimeout))},isVisitorTyping:function(){if(Moneypenny.isMobileEnabled())return Moneypenny.getMobileUI().isVisitorTyping();if(Moneypenny.isCustomDesignEnabled())return Moneypenny.getCustomDesignUI().isVisitorTyping();var a=!1,b="",c=document.Moneypenny_Form;return c&&c.chat&&(b=c.chat.value,!introMsg&&b&&lastTypedText!=b&&(a=!0)),lastTypedText=b,a},pollChat:function(){if(!this.isChatViewCookieValid()||""==caseId)return this.stopPolling(),Moneypenny.isCustomDesignEnabled()?Moneypenny.getCustomDesignUI().destroy():Moneypenny.hideOverlay(!1),void Moneypenny.setChatInProgress(!1);if(this.refreshChatViewCookie(),0==pollCount){var a="c="+encodeURIComponent(caseId)+"&i="+this.getPollIdCookie(),b=new Date;if(a+="&t="+b.getTime(), totalPollCount%2==0&&(a+=">",this.isVisitorTyping()&&(a+="&st"),Moneypenny.isSneakPeek())){var c="";if(Moneypenny.isMobileEnabled())c=Moneypenny.getMobileUI().getVisitorTyping();else if(Moneypenny.isCustomDesignEnabled())c=Moneypenny.getCustomDesignUI().getVisitorTyping();else{var d=document.Moneypenny_Form;c=d&&d.chat?d.chat.value:""}""===c||MoneypennyChat.introMsg||(a+="&tt="+encodeURIComponent(c))}Moneypenny.rpc(baseURL+"/chatjs/ServiceChatPoll?"+a,0,!0)}pollCount++,pollCount>3&&(pollCount=0),totalPollCount++},callbackPolling:function(a,b,c){b!==-1&&1==msgIdLst[b]||(msgIdLst[b]=1,b!=-1&&this.setPollIdCookie(b),this.callbackMessage(!0,a,!1)),1==c?this.isTyping(!0):2==c&&this.isTyping(!1),pollCount=0},sendChatMessage:function(a,b){var c="a="+a+"&c="+encodeURIComponent(caseId),d=new Date;c+="&t="+d.getTime(),""!=b&&(c+="&m="+encodeURIComponent(b));var e=baseURL+"/chatjs/ServiceChatMessage?"+c;e.length>2e3&&(c="a="+a+"&c="+encodeURIComponent(caseId),c+="&t="+d.getTime(),c+="&m="+encodeURIComponent("[truncated message] "+b),e=baseURL+"/chatjs/ServiceChatMessage?"+c),Moneypenny.rpc(e,3,!0),1==a&&Moneypenny.callCallback("ChatMessageSent",b)},callbackMessage:function(fromAgent,textMsg,replay,historyOnly){if(""!=textMsg){textMsg=decodeURIComponent(textMsg).replace(/\%20/g," ");var from=nickname,cmd=textMsg.substr(0,4);switch(cmd){case"/SCR":replay||this.takeScreenshot();break;case"/BYE":replay||(window.Cobrowse&&window.Cobrowse.isSupported()&&window.Cobrowse.state===window.Cobrowse.State.Active&&window.Cobrowse.end(),systemMsgId="BYE_BYE",this.appendTextToChat("",textMsg.substr(5),!1,systemMsgId,!1),this.setReadOnly(!0),this.closeChat(),Moneypenny.disableCallMe(),Moneypenny.isMobileEnabled()?Moneypenny.getMobileUI().endChat():Moneypenny.isCustomDesignEnabled()&&Moneypenny.getCustomDesignUI().endChat(!1));break;case"/NIC":nickname&&!replay&&window.Cobrowse&&window.Cobrowse.isSupported()&&window.Cobrowse.state===window.Cobrowse.State.Active&&window.Cobrowse.end(),nickname=textMsg.substr(5),Moneypenny.isMobileEnabled()?Moneypenny.getMobileUI().updateAgentName(nickname):Moneypenny.isCustomDesignEnabled()?Moneypenny.getCustomDesignUI().updateAgentName(nickname):_useStaticAgentName&&this.populateStaticAgentName();break;case"/GO2":replay||this.redirectBrowser(textMsg.substr(5));break;case"/WAI":this.setReadOnly(!0),systemMsgId="WAI_WAITING",this.appendTextToChat("",textMsg.substr(5),!1,systemMsgId,!1);break;case"/NFO":systemMsgId="NFO_INITIAL",Moneypenny.isMobileEnabled()&&Moneypenny.getMobileUI().isInitAgentMsg(textMsg.substr(5)),this.setReadOnly(!1),this.appendTextToChat("",textMsg.substr(5),!1,systemMsgId,!1);break;case"/CAL":var optionCallMeValue=textMsg.substr(5);optionCallMeValue.indexOf("1")!=-1?(Moneypenny.isCustomDesignEnabled()&&Moneypenny.getCustomDesignUI().setAllowCallMe(!0),Moneypenny.enableCallMe()):Moneypenny.disableCallMe();break;case"/BAN":this.setBannedCookie(),Moneypenny.allowChat(!1);break;case"/AVA":avatarURL=textMsg.substr(5),_useStaticAgentAvatar?this.populateStaticAgentAvatar():(this.setCookie("MoneypennyAgentAvatar",avatarURL),Moneypenny.isMobileEnabled()?Moneypenny.getMobileUI().updateAgentAvatar(avatarURL):Moneypenny.isCustomDesignEnabled()&&Moneypenny.getCustomDesignUI().updateAgentAvatar(avatarURL));break;case"/SYS":var payload=textMsg.substr(5),syscmd=payload.substr(0,4),systemMsg="";if("PURL"==syscmd)postChatIframeURL=payload.substr(5);else if("PTXT"==syscmd)postChatHTML=decodeURIComponent(payload.substr(5)).replace(/\%20/g," ");else if("WAGT"==syscmd){if(!Moneypenny.isMobileEnabled()){var message=decodeURIComponent(payload.substr(5)).replace(/\%20/g," "),delay=message.substring(0,message.indexOf(","));message=message.substring(message.indexOf(",")+1),WAGTTimeout=window.setTimeout('MoneypennyChat.waitingForAgentMessage("'+message.replace(/\"/g,'\\"')+'");',1e3*delay)}}else if("EMAI"==syscmd){var email=decodeURIComponent(payload.substr(5)).replace(/\%20/g," ");Moneypenny.setUserEmail(email),MoneypennyChat.setUserEmailCookie(email)}else if("REAS"==syscmd){var reassign=payload.substr(5);MoneypennyChat.setReassignmentTimerAfterRestartChat(reassign)}else if("RERY"!=syscmd||historyOnly){if("SRVY"==syscmd)chatAgentSurvey=eval("("+payload.substr(5)+")");else if("XSRV"==syscmd)chatAgentSurvey=null;else if("FURV"==syscmd){if(MoneypennyChat.sendChatMessage(6,"Visitor has received the file request."),MoneypennyChat.setFileUploadInProgress(!0),Moneypenny.isMobileEnabled())return void Moneypenny.getMobileUI().showUploadButtons();if(Moneypenny.isCustomDesignEnabled())return void Moneypenny.getCustomDesignUI().enableFileUploadButtons();MoneypennyChat.loadVisitorIframe(Moneypenny.getBaseURL()+"/chatFileUpload?widgetPublicId="+Moneypenny.getWidgetId()+"&casePublicId="+Moneypenny.getCaseId(),"MoneypennyChat.cancelVisitorRequest();",120)}else if("FUMV"==syscmd){var json=textMsg.substr(9),re=new RegExp(""","g");json=json.replace(re,'"'),json=JSON.parse(json);var fileName=MoneypennyChat.fileNamePretty(json[0].fileName),randomId=MoneypennyChat.createRandomId(),thumbnailImg="",thumbnailDivHeight="";json[0].mimeType.indexOf("/png")>-1||json[0].mimeType.indexOf("/jpeg")>-1||json[0].mimeType.indexOf("/bmp")>-1?(thumbnailImg='',thumbnailDivHeight="min-height:100px; max-height:130px;"):json[0].mimeType.indexOf("/gif")>-1&&(thumbnailImg='',thumbnailDivHeight="min-height:100px; max-height:130px;"),Moneypenny.isMobileEnabled()?systemMsg=''+fileName+'
'+thumbnailImg+"
":Moneypenny.isCustomDesignEnabled()?systemMsg=''+fileName+'
'+thumbnailImg+"
":(systemMsg='
File uploaded:
'+fileName+'
'+thumbnailImg+"
",MoneypennyChat.saveUserInput(),MoneypennyChat.showFormChat()),from=1===json[0].authorType?nickname:Moneypenny.getMessage(15),MoneypennyChat.appendTextToChat(from,systemMsg,!1,!1,!0,!1),MoneypennyChat.setFileUploadInProgress(!1),Moneypenny.isMobileEnabled()&&Moneypenny.getMobileUI().updateScroll()}else if("SDR_"==syscmd){if(Moneypenny.isMobileEnabled()){MoneypennyChat.sendChatMessage(6,"Sorry, this feature is not yet available for mobile visitors.");break}MoneypennyChat.sendChatMessage(6,"Visitor has received the Secure Data Transfer request."),secureDataTransferInProgress=!0;var iframeHeight=150;"SDR_CC"===payload?iframeHeight=230:"SDR_CCZ"===payload?iframeHeight=280:"SDR_SSN"===payload?iframeHeight=132:"SDR_SN"===payload&&(iframeHeight=180),MoneypennyChat.loadVisitorIframe(Moneypenny.getBaseURL()+"/secureDataTransferRequest?casePublicId="+Moneypenny.getCaseId()+"&type="+payload,"MoneypennyChat.cancelVisitorRequest();",iframeHeight)}else if("COBR"==syscmd){var cobrParams=payload.split(" ");if(Moneypenny.isCustomDesignEnabled()&&window.Cobrowse){if(replay||window.Cobrowse.state!==window.Cobrowse.State.Initial)return;return window.Cobrowse.isSupported()?(systemMsgId="COBR_COBROWSE_ACCEPT",Moneypenny.getCustomDesignUI().updateChat(Moneypenny.getMessage(61).replace("{alias}",nickname),!1,!1,systemMsgId,!1,!1),Moneypenny.getCustomDesignUI().updateScroll(),void Moneypenny.getCustomDesignUI().enableCobrowsingButtons(cobrParams[1],cobrParams[2])):void MoneypennyChat.sendChatMessage(6,"Visitor browser does not support cobrowsing.")}}else if("SDTM"==syscmd){if(Moneypenny.isCustomDesignEnabled()){if(replay)return;Moneypenny.getCustomDesignUI().secureDataController.submitSecureDataClick(),systemMsg='
Thank you. Your secure data has been received.
'}else MoneypennyChat.showFormChat(),systemMsg='
'+Moneypenny.getMessage(43)+"
";systemMsgId="SDTM_SECURE_DATA",MoneypennyChat.appendTextToChat("",systemMsg,!1,systemMsgId,!0,!1),secureDataTransferInProgress=!1}else if("APRV"==syscmd){if(!Moneypenny.isCustomDesignEnabled())return!1;MoneypennyChat.setIsApprovalBotChat(!0);var payloadJSON=JSON.parse(payload.substr(5));payloadJSON.approved?MoneypennyChat.getCookie(approvalCookieName)||MoneypennyChat.setCookie(approvalCookieName,!0):MoneypennyChat.getCookie(approvalCookieName)&&MoneypennyChat.deleteCookie(approvalCookieName)}}else MoneypennyChat.updateHistoryCookieForLastCase(Moneypenny.getCaseId());break;default:this.setReadOnly(!1),fromAgent?(chatAnswered=!0,Moneypenny.isCustomDesignEnabled()&&Moneypenny.getCustomDesignUI().enableCallmeButtons()):from=Moneypenny.getMessage(15),this.appendTextToChat(from,textMsg,historyOnly,!1,!1),replay||(this.newMessageNotification(),fromAgent&&(MoneypennyChat.isMinimized()&&MoneypennyChat.newMinimizedMessageReceived(),Moneypenny.callCallback("ChatMessageReceived",nickname,textMsg)))}}pollCount=0},loadVisitorIframe:function(a,b,c){if(!Moneypenny.isMobileEnabled()){if(Moneypenny.isCustomDesignEnabled())return void Moneypenny.getCustomDesignUI().initSecureFileDataTransfer(a,c);MoneypennyChat.saveUserInput();var d=document.getElementById("Moneypenny_CL");d.style.position="static",MoneypennyChat.populateSubChatForm(d.outerHTML,"Moneypenny.closeForm()");var e=document.createElement("div");e.setAttribute("id","Moneypenny_VisitorIframeDiv"),e.setAttribute("display","inline-block"),e.innerHTML='

'+Moneypenny.getMessage(42)+"",document.getElementById("Moneypenny_CL").appendChild(e);var f=MoneypennyChat.getChatBoxHeight();document.getElementById("Moneypenny_CL").style.maxHeight=f,document.getElementById("Moneypenny_CL").style.minHeight=f,document.getElementById("Moneypenny_VisitorIframe").focus(),MoneypennyChat.scrollDown()}},cancelVisitorRequest:function(){MoneypennyChat.sendChatMessage(6,"Visitor has cancelled the request."),MoneypennyChat.setFileUploadInProgress(!1),secureDataTransferInProgress=!1,Moneypenny.isCustomDesignEnabled()||MoneypennyChat.showFormChat()},createRandomId:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=16*Math.random()|0,c="x"===a?b:3&b|8;return c.toString(16)})},viewOrDownload:function(a,b,c){var d=document.getElementById(b);if("mouseenter"===a){d.style.background="rgba(0,0,0,0.3)",d.style.border="rgba(0,0,0,0.3)";var e=30,f=Math.round((d.offsetHeight-e)/2),g=document.createElement("div");g.innerHTML='',d.appendChild(g)}"mouseleave"===a&&(document.getElementById("links").parentNode.removeChild(document.getElementById("links")),d.style.background="",d.style.border="")},saveUserInput:function(){var a=document.Moneypenny_Form;a&&(userInput=a.chat.value)},callbackHistory:function(a,b){if(a&&a.length>0){msgIdLst={};for(var c=0,d=0;d15){var b=a.split("."),c=b[b.length-1];return b=b.splice(0,b.length-1).join("."),b=b.substr(0,6)+"..."+b.substr(b.length-6,6),b+"."+c}return a},cancelSecureDataRequest:function(){MoneypennyChat.sendChatMessage(6,"Visitor has cancelled the Secure Data Transfer request."),MoneypennyChat.showFormChat()},newMessageNotification:function(){if(document.title=this.getPageTitle(!0),Moneypenny.isCustomDesignEnabled()){var a={state1:this.getPageTitle(!0),state2:this.getPageTitle(!1)};Moneypenny.getCustomDesignUI().setVisitorNotification(a)}else window.setTimeout("document.title=MoneypennyChat.getPageTitle(false);",1e3),window.setTimeout("document.title=MoneypennyChat.getPageTitle(true);",1500),window.setTimeout("document.title=MoneypennyChat.getPageTitle(false);",2500),window.setTimeout("document.title=MoneypennyChat.getPageTitle(true);",3e3),window.setTimeout("document.title=MoneypennyChat.getPageTitle(false);",4e3),window.setTimeout("document.title=MoneypennyChat.getPageTitle(true);",4500),window.setTimeout("document.title=MoneypennyChat.getPageTitle(false);",5500);Moneypenny.getChatSoundAllowed()&&this.playSound()},playSound:function(){var a=Moneypenny.getBaseURL()+"/sounds/chatmsg.mp3",b=Moneypenny.getBaseURL()+"/sounds/chatmsg.ogg";try{var c;c=Moneypenny.isFirefox()?new Audio(b):new Audio(a),c.play()}catch(a){try{var d=document.getElementById("Moneypenny_Snd");if(!d)return;d.innerHTML='';this.populateSubChatForm(c,"Moneypenny.closeForm();"),postChatIframeURL=""}else postChatHTML&&(postChatHTML=postChatHTML.replace(/\{alias\}/g,encodeURIComponent(nickname)),postChatHTML=postChatHTML.replace(/\{case\}/g,encodeURIComponent(Moneypenny.getBaseURL()+"/viewcase?c="+caseId)),this.populateSubChatForm(postChatHTML,"Moneypenny.closeForm();"),postChatHTML="");caseId="",this.deleteChatCookies(),this.reInit()}},resetCaseIdFromCustomDesign:function(){caseId=""},redirectBrowser:function(a){var b=document.Moneypenny_Form;if(b&&(userInput=b.chat.value,""!=userInput))try{var c=new RegExp(/^\s+$/);c.test(userInput)||this.setMessageCookie(userInput.replace(/^\s*/,"").replace(/\s*$/,""))}catch(a){}systemMsgId="GO2_REDIRECT",this.appendTextToChat("","redirecting...",!1,systemMsgId,!1);var d=!1;try{var e=document.location.hostname;if(0===a.indexOf("http")&&a.indexOf("://")!==-1){var f=a.substring(a.indexOf("://")+3);if(f.indexOf("/")!==-1&&(f=f.substring(0,f.indexOf("/")),f.indexOf(":")!==-1&&(f=f.substring(0,f.indexOf(":")))),0===a.indexOf(Moneypenny.getBaseURL()+"/chat?c=")||0===a.indexOf(Moneypenny.getBaseURL().replace("http:","https:")+"/chat?c="))d=!0;else if(""!=f&&e!=f&&(""==Moneypenny.getDomain()||f.indexOf(Moneypenny.getDomain())===-1)){var g=Moneypenny.getBaseURL()+"/chatcrossdomain?c=";0===a.indexOf("http://")&&(g=g.replace("https://","http://")),a=g+Moneypenny.getCaseId()+"&u="+encodeURIComponent(a)+"&w="+Moneypenny.getWidgetId(),d=!0,this.deleteChatCookies()}}}catch(a){}d&&top&&top.frames&&top.frames.length>0?setTimeout('top.location.href = "'+a+'"',100):setTimeout('window.location.href = "'+a+'"',100)},takeScreenshot:function(){Moneypenny.isScreenshotCapable()?(MoneypennyChat.saveUserInput(),this.stopPolling(),Moneypenny.populateFormStatus(1),webCapInProgress=!0,Moneypenny.startWebCapture()):this.sendChatMessage(5,"")},webCaptureDone:function(a){webCapInProgress=!1,this.sendChatMessage(4,a),this.showFormChat(),this.startPolling()},isWebCapInProgress:function(){return webCapInProgress},formCallMeDone:function(){this.showFormChat()},setCaseIdCookie:function(){caseId&&this.setCookie("MoneypennyChatSession",caseId,16)},getCaseIdCookie:function(){return this.getCookie("MoneypennyChatSession")},setNoProactiveChatCookie:function(){this.setCookie("MoneypennyNoProactiveChat","no",Moneypenny.getNoProactiveChatDelay())},isNoProactiveChatCookie:function(){return"no"==this.getCookie("MoneypennyNoProactiveChat")||!this.isCookieEnabled()},setIsForcedProactive:function(a){this.isForcedProactive=a},getIsForcedProactive:function(){return this.isForcedProactive},setPollIdCookie:function(a){""!=caseId&&this.setCookie("MoneypennyChatPoll"+caseId,a,16)},getPollIdCookie:function(){var a=pollId;return""!=caseId&&(pollId=parseInt(this.getCookie("MoneypennyChatPoll"+caseId)),isNaN(pollId)&&(pollId=a)),pollId},setMessageCookie:function(a){this.setCookie("MoneypennyChatMessage",encodeURIComponent(a),16)},getMessageCookie:function(){return decodeURIComponent(this.getCookie("MoneypennyChatMessage"))},setAgentAvatarCookie:function(a){this.setCookie("MoneypennyAgentAvatar",encodeURIComponent(a),16)},getAgentAvatarCookie:function(){return decodeURIComponent(this.getCookie("MoneypennyAgentAvatar"))},setChatViewCookie:function(){chatview=Math.random(),this.setCookie("MoneypennyChatView",chatview,16)},refreshChatViewCookie:function(){this.setCookie("MoneypennyChatView",chatview,16)},isChatViewCookieValid:function(){var a=this.getCookie("MoneypennyChatView");return chatview==a||""==a},setHistoryCookieAppendCase:function(a,b){try{var c=this.getCookie("MoneypennyHistory");if(!b){var d=new Date;b=d.getTime()}""==c&&(c="1#");var e=c.split("!");if(e.length>5){c=c.split("#")[0]+"#";for(var f=e.length-5;f0){var e=new Date;e.setTime(e.getTime()+60*c*1e3),d="; expires="+e.toGMTString()}var f="";Moneypenny.getDomain()&&(f="; domain="+Moneypenny.getDomain());var g="";secureCookies&&(g="; Secure"),document.cookie=a+"="+b+d+"; path=/;"+f+g},deleteCookie:function(a){var b="";Moneypenny.getDomain()&&(b="; domain="+Moneypenny.getDomain()),document.cookie=a+"=; expires=Thu, 01-Jan-70 00:00:01 GMT;; path=/;"+b},getCookie:function(a){for(var b=document.cookie.split(";"),c=0;c
'+Moneypenny.getMessage(21)+'
",m=document.getElementById("Moneypenny_CL");MoneypennyChat.populateSubChatForm(m.outerHTML,"Moneypenny.closeForm();");var n=document.createElement("div");n.innerHTML=l,document.getElementById("Moneypenny_CL").appendChild(n),document.getElementById("Moneypenny_CL").style.position="static";var o=document.getElementById("Moneypenny_CM").parentNode.offsetHeight+"px",p=document.getElementById("Moneypenny_CM").parentNode.offsetWidth-transcriptPadding+"px";document.getElementById("Moneypenny_CL").style.maxHeight=o,document.getElementById("Moneypenny_CL").style.minHeight=o,document.getElementById("Moneypenny_CL").style.maxWidth=p,document.getElementById("Moneypenny_CL").style.minWidth=p,b=document.getElementById("chatSurvey"),c=document.getElementById("chatSurveyRatingContainer"),d=document.getElementById("chatSurveyRating"),e=document.getElementById("chatSurveyQuestion"),f=document.getElementById("chatSurveyCommentsContainer"),g=document.getElementById("chatSurveyComments"),h=document.getElementById("chatSurveySubmitContainer"),i=document.getElementById("chatSurveySubmitButton"),j=document.getElementById("chatSurveyCancelButton"),k=document.getElementById("chatSurveyResults");for(var q="",r=chatAgentSurvey.ratings,s=0;s';d.innerHTML=q,a();var t=document.getElementById("Moneypenny_CL"),u=t.scrollHeight-document.getElementById("Moneypenny_CM").parentNode.offsetHeight;if(MoneypennyChat.animateScrollDown(t,u,3e3),nickname.length>0){var v=Moneypenny.getMessage(22);v=v.replace("{alias}",nickname),e.innerHTML=v}else e.innerHTML=Moneypenny.getMessage(21);g.onfocus=function(){this.value===Moneypenny.getMessage(23)&&(this.value="")},i.onclick=function(){MoneypennyChat.animateFadeOut(document.getElementById("chatSurvey")),k.style.display="",document.getElementById("Moneypenny_CL").focus(),chatAgentSurvey=null,MoneypennyChat.sendChatAgentSurveyRating()},j.onclick=function(){return MoneypennyChat.closeChatAgentSurvey(),!1},setTimeout(function(){MoneypennyChat.closeChatAgentSurvey()},36e6)}}},mouseoverChatAgentSurveyRating:function(a){if(chatAgentSurvey)for(var b=0,c=2,d=chatAgentSurvey.ratings,e=0;e=0;c--)document.getElementById(b[c].id).src=Moneypenny.getBaseURL()+b[c].defaultImg;selectedAgentSurveyRating?MoneypennyChat.mouseoverChatAgentSurveyRating(selectedAgentSurveyRating.id):document.getElementById("chatSurveyRatingText").innerHTML=""}},setChatAgentSurveyRating:function(a){if(chatAgentSurvey){for(var b=chatAgentSurvey.ratings,c=0;c=0&&j[2]>=0&&j[1]===-1&&j[3]===-1;var l=!1;if(k&&(l=j[0]+Moneypenny.formWidth>Moneypenny.getWindowWidth(),l||(l=j[2]+Moneypenny.formHeight>Moneypenny.getWindowHeight())),k&&!l)return Moneypenny.positionForm(j[0],j[1],j[2],j[3]),void MoneypennyChat.setChatWindowCookieData("chatBoxPosition",[j[0],j[1],j[2],j[3]]);var m=Moneypenny.getDefaultChatPosition();Moneypenny.positionForm(m[0],m[1],m[2],m[3]),MoneypennyChat.setChatWindowCookieData("chatBoxPosition",[m[0],m[1],m[2],m[3]]);var n=MoneypennyChat.getChatWindowCookieData("chatBoxPosition");Moneypenny.calculateAndSetInViewportPosition(n)}},newMinimizedMessageReceived:function(){var a=document.getElementById("Moneypenny_NMN"),b=document.getElementById("Moneypenny_NMNi");if(a){a.style.display="block";var c=MoneypennyChat.getChatWindowCookieData("newMinimizedMessageCount");b.innerHTML=++c,MoneypennyChat.setChatWindowCookieData("newMinimizedMessageCount",c)}},setPreviousChatWindowState:function(){if(!Moneypenny.isMobileEnabled()&&!Moneypenny.isCustomDesignEnabled()){var a=decodeURIComponent(MoneypennyChat.getCookie("MoneypennyChatWindow")).split("|");if(0!==a.length)if(MoneypennyChat.isMinimized()){var b=document.getElementById("Moneypenny_NMN");if(b){var c=MoneypennyChat.getChatWindowCookieData("newMinimizedMessageCount");b.style.display=c>0?"block":"none"}MoneypennyChat.minimizeChat(!0)}else{var d=MoneypennyChat.getChatWindowCookieData("chatBoxPosition");Moneypenny.calculateAndSetInViewportPosition(d)}}},resetChatWindowCookieData:function(){this.getChatWindowCookieData("isMinimized")&&this.setChatWindowCookieData("minimize","false"),this.getChatWindowCookieData("newMinimizedMessageCount")&&this.setChatWindowCookieData("newMinimizedMessageCount","0"),this.getChatWindowCookieData("chatBoxPosition")&&this.setChatWindowCookieData("chatBoxPosition",Moneypenny.getDefaultChatPosition())},setChatWindowCookieData:function(a,b){var c=decodeURIComponent(MoneypennyChat.getCookie("MoneypennyChatWindow")),d=[];if(""===c||c.split("|").length<3?(d[0]=void 0,d[1]=0,Moneypenny.isCustomDesignEnabled()||(d[2]=[-1,0,-1,0])):d=c.split("|"),!a)return void MoneypennyChat.setCookie("MoneypennyChatWindow",encodeURIComponent(d.join("|")),30);switch(a){case"isMinimized":d[0]=b;break;case"newMinimizedMessageCount":d[1]=b;break;case"chatBoxPosition":d[2]=b}MoneypennyChat.setCookie("MoneypennyChatWindow",encodeURIComponent(d.join("|")),30)},getChatWindowCookieData:function(a){if(!a)return!1;var b=decodeURIComponent(MoneypennyChat.getCookie("MoneypennyChatWindow")).split("|");if(""===b)return MoneypennyChat.setChatWindowCookieData(),void(b=decodeURIComponent(MoneypennyChat.getCookie("MoneypennyChatWindow")).split("|"));var c;switch(a){case"isMinimized":c="undefined"==typeof b[0]||"undefined"===b[0]?void 0:"true"===b[0];break;case"newMinimizedMessageCount":c=b[1]?parseInt(b[1],10):0;break;case"chatBoxPosition":if(!b[2])return Moneypenny.getDefaultChatPosition();for(var d=b[2].split(","),e=0;e0?a.dump(b[d],c-1):g):f.push(b[d]),f.push(i);f.length>1&&f.pop(),f.push("]")}else{f.push("{");for(d in b)a.hasOwnProperty(b,d)&&(f.push(d+j),a.isObject(b[d])?f.push(c>0?a.dump(b[d],c-1):g):f.push(b[d]),f.push(i));f.length>1&&f.pop(),f.push("}")}return f.join("")},substitute:function(b,c,d){for(var f,g,h,i,j,k,l,m,n,o=[],p="dump",q=" ",r="{",s="}";(f=b.lastIndexOf(r),!(f<0))&&(g=b.indexOf(s,f),!(f+1>=g));)l=b.substring(f+1,g),i=l,k=null,h=i.indexOf(q),h>-1&&(k=i.substring(h+1),i=i.substring(0,h)),j=c[i],d&&(j=d(i,j,k)),a.isObject(j)?a.isArray(j)?j=a.dump(j,parseInt(k,10)):(k=k||"",m=k.indexOf(p),m>-1&&(k=k.substring(4)),n=j.toString(),j=n===e||m>-1?a.dump(j,parseInt(k,10)):n):a.isString(j)||a.isNumber(j)||(j="~-"+o.length+"-~",o[o.length]=l),b=b.substring(0,f)+j+b.substring(g+1);for(f=o.length-1;f>=0;f-=1)b=b.replace(new RegExp("~-"+f+"-~"),"{"+o[f]+"}","g");return b},trim:function(a){try{return a.replace(/^\s+|\s+$/g,"")}catch(b){return a}},merge:function(){var b,c={},d=arguments,e=d.length;for(b=0;b=420)c.addEventListener("load",function(){k(d,g)});else{var m=a[d];if(m.varName){var n=YAHOO.util.Get.POLL_FREQ;m.maxattempts=YAHOO.util.Get.TIMEOUT/n,m.attempts=0,m._cache=m.varName[0].split("."),m.timer=f.later(n,m,function(a){var b,c=this._cache,e=c.length,f=this.win;for(b=0;bthis.maxattempts){var h="Over retry limit, giving up";m.timer.cancel(),l(d,h)}return}m.timer.cancel(),k(d,g)},null,!0)}else f.later(YAHOO.util.Get.POLL_FREQ,null,k,[d,g])}}else c.onload=function(){k(d,g)}};return{POLL_FREQ:10,PURGE_THRESH:20,TIMEOUT:2e3,_finalize:function(a){f.later(0,null,m,a)},abort:function(b){var c=f.isString(b)?b:b.tId,d=a[c];d&&(d.aborted=!0)},script:function(a,b){return r("script",a,b)},css:function(a,b){return r("css",a,b)}}}(),YAHOO.register("get",YAHOO.util.Get,{version:"2.8.2r1",build:"7"});var Moneypenny=Moneypenny,MoneypennyChat=MoneypennyChat;Moneypenny.isSneakPeek=function(){return true;};!function(a){"use strict";function b(a,b){this.options=a,this.target=b}b.prototype={initViewport:function(){this.isViewportModified=!1;var a=this._findViewportMeta();a&&(this.originalMeta=a)},_findViewportMeta:function(){var a,b,c=document.getElementsByTagName("meta");for(a=0;ascreen.width?(this.nonResponsive=!0,screen.width/a.innerWidth):screen.width/screen.availWidth:a.matchMedia("(orientation: landscape)").matches?0:void 0:1},removeChildren:function(a){if("undefined"!=typeof a)for(;a.firstChild;)a.removeChild(a.firstChild)},removeElement:function(a){a.parentNode&&a.parentNode.removeChild(a)},elementHasClass:function(a,b){var c=new RegExp("(\\s|^)"+b+"(\\s|$)");return!!a.className.match(c)},elementAddClass:function(a,b){this.elementHasClass(a,b)||(a.className+=(a.className.length>0?" ":"")+b)},elementRemoveClass:function(a,b){if(this.elementHasClass(a,b)){var c=new RegExp("(\\s|^)"+b+"(\\s|$)");a.className=a.className.replace(c,"")}},elementToggleClass:function(a,b){this.elementHasClass(a,b)?this.elementRemoveClass(a,b):this.elementAddClass(a,b)},elementAddId:function(a,b){this.iframe=document.getElementById(this.getIframeId()).contentWindow.document;var c=this.iframe.getElementsByClassName(a);if(c.length>0){var d=c[c.length-1];d.setAttribute("id",b)}},supportsSvg:function(){return document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1")},addSvgIcon:function(a,b){if(this.iframe=document.getElementById(this.getIframeId()).contentWindow.document,this.supportsSvg()){var c="http://www.w3.org/2000/svg",d=this.iframe.createElementNS(c,"svg"),e=this.iframe.createElementNS(c,"g");e.id=a,d.appendChild(e);var f=this.getSvgPath(a,b);d.setAttributeNS(null,"viewBox",f.viewBox);var g=this.iframe.createElementNS("http://www.w3.org/2000/svg","path");return g.setAttribute("class","designstudio-icon"),g.setAttribute("fill",f.iconColor),g.setAttribute("d",f.data),g.setAttribute("transform",f.tran),e.appendChild(g),d}var h=this.iframe.createElement("img");return h.className="svg-backup-img",h.src=this.options.staticUrl+"/images/png/icons/"+a+"-dk.png",h},getSvgPath:function(a,b){var c,d,e="90 100 375 375";switch(a){case"bars":c="M1536 192v-128q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1536 704v-128q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1536 1216v-128q0 -26 -19 -45 t-45 -19h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45z",d="scale(.195, -.195) translate(750, -2200)";break;case"camera":c="M960 864q119 0 203.5 -84.5t84.5 -203.5t-84.5 -203.5t-203.5 -84.5t-203.5 84.5t-84.5 203.5t84.5 203.5t203.5 84.5zM1664 1280q106 0 181 -75t75 -181v-896q0 -106 -75 -181t-181 -75h-1408q-106 0 -181 75t-75 181v896q0 106 75 181t181 75h224l51 136 q19 49 69.5 84.5t103.5 35.5h512q53 0 103.5 -35.5t69.5 -84.5l51 -136h224zM960 128q185 0 316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z",d="scale(.175, -.175) translate(725, -2350)";break;case"cancel":c="M1312 643q0 161 -87 295l-754 -753q137 -89 297 -89q111 0 211.5 43.5t173.5 116.5t116 174.5t43 212.5zM313 344l755 754q-135 91 -300 91q-148 0 -273 -73t-198 -199t-73 -274q0 -162 89 -299zM1536 643q0 -157 -61 -300t-163.5 -246t-245 -164t-298.5 -61t-298.5 61 t-245 164t-163.5 246t-61 300t61 299.5t163.5 245.5t245 164t298.5 61t298.5 -61t245 -164t163.5 -245.5t61 -299.5z",d="scale(.215, -.215) translate(625, -2000)";break;case"chevron-down":c="M1683 728l-742 -741q-19 -19 -45 -19t-45 19l-742 741q-19 19 -19 45.5t19 45.5l166 165q19 19 45 19t45 -19l531 -531l531 531q19 19 45 19t45 -19l166 -165q19 -19 19 -45.5t-19 -45.5z",d="scale(.20, -.20) translate(600, -2050)";break;case"chevron-left":c="M1171 1235l-531 -531l531 -531q19 -19 19 -45t-19 -45l-166 -166q-19 -19 -45 -19t-45 19l-742 742q-19 19 -19 45t19 45l742 742q19 19 45 19t45 -19l166 -166q19 -19 19 -45t-19 -45z",d="scale(.20, -.20) translate(700, -2150)";break;case"close":c="M1298 214q0 -40 -28 -68l-136 -136q-28 -28 -68 -28t-68 28l-294 294l-294 -294q-28 -28 -68 -28t-68 28l-136 136q-28 28 -28 68t28 68l294 294l-294 294q-28 28 -28 68t28 68l136 136q28 28 68 28t68 -28l294 -294l294 294q28 28 68 28t68 -28l136 -136q28 -28 28 -68 t-28 -68l-294 -294l294 -294q28 -28 28 -68z",d="scale(.20, -.20) translate(600, -2050)";break;case"comment":c="M1792 640q0 -174 -120 -321.5t-326 -233t-450 -85.5q-70 0 -145 8q-198 -175 -460 -242q-49 -14 -114 -22q-17 -2 -30.5 9t-17.5 29v1q-3 4 -0.5 12t2 10t4.5 9.5l6 9t7 8.5t8 9q7 8 31 34.5t34.5 38t31 39.5t32.5 51t27 59t26 76q-157 89 -247.5 220t-90.5 281 q0 130 71 248.5t191 204.5t286 136.5t348 50.5q244 0 450 -85.5t326 -233t120 -321.5z",d="scale(.195, -.195) translate(600, -2000)";break;case"comment-o":c="M896 1152q-204 0 -381.5 -69.5t-282 -187.5t-104.5 -255q0 -112 71.5 -213.5t201.5 -175.5l87 -50l-27 -96q-24 -91 -70 -172q152 63 275 171l43 38l57 -6q69 -8 130 -8q204 0 381.5 69.5t282 187.5t104.5 255t-104.5 255t-282 187.5t-381.5 69.5zM1792 640 q0 -174 -120 -321.5t-326 -233t-450 -85.5q-70 0 -145 8q-198 -175 -460 -242q-49 -14 -114 -22h-5q-15 0 -27 10.5t-16 27.5v1q-3 4 -0.5 12t2 10t4.5 9.5l6 9t7 8.5t8 9q7 8 31 34.5t34.5 38t31 39.5t32.5 51t27 59t26 76q-157 89 -247.5 220t-90.5 281q0 174 120 321.5 t326 233t450 85.5t450 -85.5t326 -233t120 -321.5z",d="scale(.195, -.195) translate(600, -2000)";break;case"comments":c="M1408 768q0 -139 -94 -257t-256.5 -186.5t-353.5 -68.5q-86 0 -176 16q-124 -88 -278 -128q-36 -9 -86 -16h-3q-11 0 -20.5 8t-11.5 21q-1 3 -1 6.5t0.5 6.5t2 6l2.5 5t3.5 5.5t4 5t4.5 5t4 4.5q5 6 23 25t26 29.5t22.5 29t25 38.5t20.5 44q-124 72 -195 177t-71 224 q0 139 94 257t256.5 186.5t353.5 68.5t353.5 -68.5t256.5 -186.5t94 -257zM1792 512q0 -120 -71 -224.5t-195 -176.5q10 -24 20.5 -44t25 -38.5t22.5 -29t26 -29.5t23 -25q1 -1 4 -4.5t4.5 -5t4 -5t3.5 -5.5l2.5 -5t2 -6t0.5 -6.5t-1 -6.5q-3 -14 -13 -22t-22 -7 q-50 7 -86 16q-154 40 -278 128q-90 -16 -176 -16q-271 0 -472 132q58 -4 88 -4q161 0 309 45t264 129q125 92 192 212t67 254q0 77 -23 152q129 -71 204 -178t75 -230z",d="scale(.195, -.195) translate(600, -2000)";break;case"comments-o":c="M704 1152q-153 0 -286 -52t-211.5 -141t-78.5 -191q0 -82 53 -158t149 -132l97 -56l-35 -84q34 20 62 39l44 31l53 -10q78 -14 153 -14q153 0 286 52t211.5 141t78.5 191t-78.5 191t-211.5 141t-286 52zM704 1280q191 0 353.5 -68.5t256.5 -186.5t94 -257t-94 -257 t-256.5 -186.5t-353.5 -68.5q-86 0 -176 16q-124 -88 -278 -128q-36 -9 -86 -16h-3q-11 0 -20.5 8t-11.5 21q-1 3 -1 6.5t0.5 6.5t2 6l2.5 5t3.5 5.5t4 5t4.5 5t4 4.5q5 6 23 25t26 29.5t22.5 29t25 38.5t20.5 44q-124 72 -195 177t-71 224q0 139 94 257t256.5 186.5 t353.5 68.5zM1526 111q10 -24 20.5 -44t25 -38.5t22.5 -29t26 -29.5t23 -25q1 -1 4 -4.5t4.5 -5t4 -5t3.5 -5.5l2.5 -5t2 -6t0.5 -6.5t-1 -6.5q-3 -14 -13 -22t-22 -7q-50 7 -86 16q-154 40 -278 128q-90 -16 -176 -16q-271 0 -472 132q58 -4 88 -4q161 0 309 45t264 129 q125 92 192 212t67 254q0 77 -23 152q129 -71 204 -178t75 -230q0 -120 -71 -224.5t-195 -176.5z",d="scale(.195, -.195) translate(600, -2000)";break;case"commenting-o":c="M640 640q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1024 640q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1408 640q0 -53 -37.5 -90.5t-90.5 -37.5 t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM896 1152q-204 0 -381.5 -69.5t-282 -187.5t-104.5 -255q0 -112 71.5 -213.5t201.5 -175.5l87 -50l-27 -96q-24 -91 -70 -172q152 63 275 171l43 38l57 -6q69 -8 130 -8q204 0 381.5 69.5t282 187.5 t104.5 255t-104.5 255t-282 187.5t-381.5 69.5zM1792 640q0 -174 -120 -321.5t-326 -233t-450 -85.5q-70 0 -145 8q-198 -175 -460 -242q-49 -14 -114 -22h-5q-15 0 -27 10.5t-16 27.5v1q-3 4 -0.5 12t2 10t4.5 9.5l6 9t7 8.5t8 9q7 8 31 34.5t34.5 38t31 39.5t32.5 51 t27 59t26 76q-157 89 -247.5 220t-90.5 281q0 130 71 248.5t191 204.5t286 136.5t348 50.5t348 -50.5t286 -136.5t191 -204.5t71 -248.5z",d="scale(.195, -.195) translate(600, -2000)";break;case"ellipsis-v":c="M384 288v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM384 800v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM384 1312v-192q0 -40 -28 -68t-68 -28h-192 q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68z",d="scale(.20, -.20) translate(1300, -2100)";break;case"envelope":c="M1792 826v-794q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v794q44 -49 101 -87q362 -246 497 -345q57 -42 92.5 -65.5t94.5 -48t110 -24.5h1h1q51 0 110 24.5t94.5 48t92.5 65.5q170 123 498 345q57 39 100 87zM1792 1120q0 -79 -49 -151t-122 -123 q-376 -261 -468 -325q-10 -7 -42.5 -30.5t-54 -38t-52 -32.5t-57.5 -27t-50 -9h-1h-1q-23 0 -50 9t-57.5 27t-52 32.5t-54 38t-42.5 30.5q-91 64 -262 182.5t-205 142.5q-62 42 -117 115.5t-55 136.5q0 78 41.5 130t118.5 52h1472q65 0 112.5 -47t47.5 -113z",d="scale(.175, -.175) translate(800, -2250)";break;case"envelope-o":c="M1664 32v768q-32 -36 -69 -66q-268 -206 -426 -338q-51 -43 -83 -67t-86.5 -48.5t-102.5 -24.5h-1h-1q-48 0 -102.5 24.5t-86.5 48.5t-83 67q-158 132 -426 338q-37 30 -69 66v-768q0 -13 9.5 -22.5t22.5 -9.5h1472q13 0 22.5 9.5t9.5 22.5zM1664 1083v11v13.5t-0.5 13 t-3 12.5t-5.5 9t-9 7.5t-14 2.5h-1472q-13 0 -22.5 -9.5t-9.5 -22.5q0 -168 147 -284q193 -152 401 -317q6 -5 35 -29.5t46 -37.5t44.5 -31.5t50.5 -27.5t43 -9h1h1q20 0 43 9t50.5 27.5t44.5 31.5t46 37.5t35 29.5q208 165 401 317q54 43 100.5 115.5t46.5 131.5z M1792 1120v-1088q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1472q66 0 113 -47t47 -113z",d="scale(.175, -.175) translate(800, -2250)";break;case"paper-plane":c="M1764 1525q33 -24 27 -64l-256 -1536q-5 -29 -32 -45q-14 -8 -31 -8q-11 0 -24 5l-453 185l-242 -295q-18 -23 -49 -23q-13 0 -22 4q-19 7 -30.5 23.5t-11.5 36.5v349l864 1059l-1069 -925l-395 162q-37 14 -40 55q-2 40 32 59l1664 960q15 9 32 9q20 0 36 -11z",d="scale(.17, -.17) translate(750, -2450)";break;case"paper-plane-o":c="M1764 1525q33 -24 27 -64l-256 -1536q-5 -29 -32 -45q-14 -8 -31 -8q-11 0 -24 5l-527 215l-298 -327q-18 -21 -47 -21q-14 0 -23 4q-19 7 -30 23.5t-11 36.5v452l-472 193q-37 14 -40 55q-3 39 32 59l1664 960q35 21 68 -2zM1422 26l221 1323l-1434 -827l336 -137 l863 639l-478 -797z",d="scale(.17, -.17) translate(750, -2450)";break;case"phone":c="M1408 296q0 -27 -10 -70.5t-21 -68.5q-21 -50 -122 -106q-94 -51 -186 -51q-27 0 -52.5 3.5t-57.5 12.5t-47.5 14.5t-55.5 20.5t-49 18q-98 35 -175 83q-128 79 -264.5 215.5t-215.5 264.5q-48 77 -83 175q-3 9 -18 49t-20.5 55.5t-14.5 47.5t-12.5 57.5t-3.5 52.5 q0 92 51 186q56 101 106 122q25 11 68.5 21t70.5 10q14 0 21 -3q18 -6 53 -76q11 -19 30 -54t35 -63.5t31 -53.5q3 -4 17.5 -25t21.5 -35.5t7 -28.5q0 -20 -28.5 -50t-62 -55t-62 -53t-28.5 -46q0 -9 5 -22.5t8.5 -20.5t14 -24t11.5 -19q76 -137 174 -235t235 -174 q2 -1 19 -11.5t24 -14t20.5 -8.5t22.5 -5q18 0 46 28.5t53 62t55 62t50 28.5q14 0 28.5 -7t35.5 -21.5t25 -17.5q25 -15 53.5 -31t63.5 -35t54 -30q70 -35 76 -53q3 -7 3 -21z",d="scale(.195, -.195) translate(750, -2200)";break;case"user":c="M1408 131q0 -120 -73 -189.5t-194 -69.5h-874q-121 0 -194 69.5t-73 189.5q0 53 3.5 103.5t14 109t26.5 108.5t43 97.5t62 81t85.5 53.5t111.5 20q9 0 42 -21.5t74.5 -48t108 -48t133.5 -21.5t133.5 21.5t108 48t74.5 48t42 21.5q61 0 111.5 -20t85.5 -53.5t62 -81 t43 -97.5t26.5 -108.5t14 -109t3.5 -103.5zM1088 1024q0 -159 -112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5z",d="scale(.19, -.19) translate(850, -2150)";break;case"minimize_thin":c="M1779.3,853.3H12.7v85.4h1766.7V853.3z",d="scale(.215, -.215) translate(400, -2300)";break;case"close_thin":c="M1778.3 76.8 1716.2 14.7 896.5 834.4 76.8 14.7 14.7 76.8 834.4 896.5 14.7 1716.2 76.8 1778.3 896.5 958.6 1716.2 1778.3 1778.3 1716.2 958.6 896.5z",d="scale(.215, -.215) translate(400, -2300)";break;case"icn-send-outline":c="M2.5,8.6L58,31.7L2.5,54.8l0-15.4l34.4-5.6l13.4-2.2l-13.4-2.2L2.5,24L2.5,8.6 M0.3,5.3l0,20.6l36.3,5.9L0.2,37.6l0,20.6l63.5-26.5L0.3,5.3L0.3,5.3z",d="translate(0, 0)",e="0 0 60 60";break;default:c="",d=""}return{iconColor:b,data:c,tran:d,viewBox:e}},getIframeId:function(){var a;return a=this.target&&document.getElementById(this.target)?"designstudio-iframe-"+this.target:"designstudio-iframe"},getLogoChatBoxURL:function(a,b,c){return a.replace("{0}",b).replace("{1}",c)},toggleHeader:function(a){switch(this.iframe=document.getElementById(this.getIframeId()).contentWindow.document,this.clearHeaderSettings(),a){case"prechat":this.options.header=this.options.prechatHeader;break;case"offline":this.options.header=this.options.offlineHeader;break;case"chat":this.options.header=this.options.chatHeader;break;case"none":this.clearHeaderSettings()}this.elementAddClass(this.iframe.getElementById("header"),a+"-header"),this.elementAddClass(this.iframe.getElementById("header-text"),a+"-header-text"),this.iframe.getElementById("header-text").innerHTML=this.options.header.text;var b=this.addSvgIcon(this.options.header.svgIcon,this.options.header.fontColor);this.iframe.getElementById("icon-custom").appendChild(b);var c=this.addSvgIcon(this.options.minimizeIcon,this.options.header.fontColor);this.iframe.getElementById("icon-minimize").appendChild(c);var d=this.addSvgIcon(this.options.closeIcon,this.options.header.fontColor);this.iframe.getElementById("icon-close").appendChild(d)},clearHeaderSettings:function(){this.iframe=document.getElementById(this.getIframeId()).contentWindow.document,this.header=this.iframe.getElementById("header"),this.elementRemoveClass(this.header,"prechat-header"),this.elementRemoveClass(this.header,"chat-header"),this.elementRemoveClass(this.header,"offline-header"),this.elementRemoveClass(this.header,"none-header"),this.removeChildren(this.iframe.getElementById("icon-custom")),this.removeChildren(this.iframe.getElementById("icon-minimize")),this.removeChildren(this.iframe.getElementById("icon-close"))},toggleFooterButtons:function(a){switch(this.iframe=document.getElementById(this.getIframeId()).contentWindow.document,this.clearFooterButtonSettings(),a){case"offline":this.iframe.getElementById("buttons-offline-div").setAttribute("style","display:inline;");var b=this.iframe.createElement("input");b.className="button",b.id=a+"-send-email",b.setAttribute("type","button"),b.value=this.options.offlineSendEmailButton.text,this.iframe.getElementById("button-send-email").appendChild(b),this.expandFooter(!0);break;case"prechat":this.iframe.getElementById("buttons-prechat-div").setAttribute("style","display:inline;");var c=this.iframe.createElement("input");c.className="button",c.id="prechat-start-chat",c.setAttribute("type","button"),c.value=this.options.prechatChatButton.text,this.iframe.getElementById("button-start-chat").appendChild(c),this.expandFooter(!0);break;case"chat":this.iframe.getElementById("buttons-chat-div").setAttribute("style","display:inline;");var d=this.iframe.createElement("input");d.className="button",d.id=a+"-call-me",d.setAttribute("type","button"),d.value=this.options.chatCallMeButton.text,this.iframe.getElementById("button-call-me").appendChild(d);var e=this.iframe.createElement("input");e.className="button",e.id=a+"-cancel-callme",e.setAttribute("type","button"),this.iframe.getElementById("button-cancel-callme").appendChild(e);var f=this.iframe.createElement("input");f.className="button button-cancel",f.id="warning-cancel-end",f.setAttribute("type","button"),this.iframe.getElementById("button-cancel-end-chat").appendChild(f);var g=this.iframe.createElement("input");g.className="button",g.id="warning-end-chat",g.setAttribute("type","button"),this.iframe.getElementById("button-end-chat").appendChild(g);var h=this.iframe.createElement("input");h.className="button",h.id=a+"-close",h.setAttribute("type","button"),this.iframe.getElementById("button-close-chat").appendChild(h);var i=this.iframe.createElement("input");i.className="button button-cancel",i.id=a+"-cancel-file-upload",i.setAttribute("type","button"),this.iframe.getElementById("button-cancel-file-upload").appendChild(i);var j=this.iframe.createElement("input");j.className="button",j.id=a+"-file-upload",j.setAttribute("type","button"),this.iframe.getElementById("button-file-upload").appendChild(j);var k=this.iframe.createElement("input");k.className="button button-cancel",k.id=a+"-cobrowse-decline",k.setAttribute("type","button"),this.iframe.getElementById("button-cobrowse-decline").appendChild(k);var l=this.iframe.createElement("input");l.className="button",l.id=a+"-cobrowse-accept",l.setAttribute("type","button"),this.iframe.getElementById("button-cobrowse-accept").appendChild(l);break;case"none":this.clearFooterButtonSettings()}},expandFooter:function(a){this.iframe=document.getElementById(this.getIframeId()).contentWindow.document;var b=this.iframe.getElementById("footer-"+(this.isMobileDevice()?"mobile":"desktop"));b&&(b.className="footer-"+(a?"expand":"collapse"))},clearFooterButtonSettings:function(){this.iframe.getElementById("buttons-prechat-div").setAttribute("style","display:none;"),this.iframe.getElementById("buttons-offline-div").setAttribute("style","display:none;"),this.iframe.getElementById("buttons-chat-div").setAttribute("style","display:none;"),this.removeChildren(this.iframe.getElementById("button-call-me")),this.removeChildren(this.iframe.getElementById("button-send-email")),this.removeChildren(this.iframe.getElementById("button-start-chat")),this.removeChildren(this.iframe.getElementById("button-close-chat")),this.removeChildren(this.iframe.getElementById("button-file-upload")),this.removeChildren(this.iframe.getElementById("button-cancel-file-upload")),this.removeChildren(this.iframe.getElementById("button-cancel-callme")),this.removeChildren(this.iframe.getElementById("button-cancel-end-chat")),this.removeChildren(this.iframe.getElementById("button-end-chat"))},disableViewButton:function(a){this.iframe=document.getElementById(this.getIframeId()).contentWindow.document;var b=this.iframe.getElementById("prechat"===a?a+"-start-chat":a+"-send-email");b.setAttribute("disabled",!0),this.elementAddClass(b,"disabled")},enableViewButton:function(a){a.removeAttribute("disabled"),this.elementRemoveClass(a,"disabled")},splitMessageAndLink:function(a){var b,c,d=a,e=null!==a?a.match("\\[.*?\\]|\\[\\[.*?\\]\\]"):null;e&&(d=a.substring(0,a.indexOf("[")),b=a.substring(a.lastIndexOf("]")+1),c=a.substring(a.lastIndexOf("[")+1,a.indexOf("]")));var f={linkStr:c,message1:d,message2:b};return f},checkFontForImport:function(){var a=this.parseBaseFontOption(this.options.baseFont);if(a.import)return!0},parseBaseFontOption:function(a){var b=a.split("|"),c=b[0],d=c.match(/'([^']*?)'/)[1];return{name:d,family:b[0],weight:b[1],import:"import"===b[3]&&"import"}},getOuterHeight:function(b){b="string"==typeof b?document.querySelector(b):b;var c=a.getComputedStyle(b),d=parseFloat(c.marginTop)+parseFloat(c.marginBottom);return Math.ceil(b.offsetHeight+d)},getOuterWidth:function(b){b="string"==typeof b?document.querySelector(b):b;var c=a.getComputedStyle(b),d=parseFloat(c.marginLeft)+parseFloat(c.marginRight);return Math.ceil(b.offsetWidth+d)},isInsideGWT:function(){return this.target&&document.getElementById(this.target)},setIsMobile:function(a){this.isMobile=a},getVisible:function(a){return a.isVisible},_deactivateHTML:function(a){return a.replace(/>/g,">").replace(/parseInt(a[1],10)||536===parseInt(a[1],10)&&11>=parseInt(a[2],10))}return da}function J(a,b,c){for(var d in ca)if(ca.hasOwnProperty(d)&&b===a.f[ca[d]]&&c===a.f[ca[d]])return!0;return!1}function K(a){var b,c=a.g.a.offsetWidth,d=a.h.a.offsetWidth;(b=c===a.f.serif&&d===a.f["sans-serif"])||(b=I()&&J(a,c,d)),b?aa()-a.A>=a.w?I()&&J(a,c,d)&&(null===a.u||a.u.hasOwnProperty(a.a.c))?M(a,a.v):M(a,a.B):L(a):M(a,a.v)}function L(a){setTimeout(c(function(){K(this)},a),50)}function M(a,b){setTimeout(c(function(){g(this.g.a),g(this.h.a),g(this.j.a),g(this.m.a),b(this.a)},a),0)}function N(a,b,c){this.c=a,this.a=b,this.f=0,this.m=this.j=!1,this.s=c}function O(a){0==--a.f&&a.j&&(a.m?(a=a.a,a.g&&h(a.f,[a.a.c("wf","active")],[a.a.c("wf","loading"),a.a.c("wf","inactive")]),A(a,"active")):z(a.a))}function P(a){this.j=a,this.a=new B,this.h=0,this.f=this.g=!0}function Q(a,b,d,e,f){var g=0==--a.h;(a.f||a.g)&&setTimeout(function(){var a=f||null,i=e||null||{};if(0===d.length&&g)z(b.a);else{b.f+=d.length,g&&(b.j=g);var j,k=[];for(j=0;j=b.f?e():a.fonts.load(s(b.a),b.h).then(function(a){1<=a.length?d():setTimeout(f,25)},function(){e()})}f()}),e=null,f=new Promise(function(a,c){e=setTimeout(c,b.f)});Promise.race([f,d]).then(function(){e&&(clearTimeout(e),e=null),b.g(b.a)},function(){b.j(b.a)})};var ca={D:"serif",C:"sans-serif"},da=null;H.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=aa(),K(this)};var ea=null;N.prototype.g=function(a){var b=this.a;b.g&&h(b.f,[b.a.c("wf",a.c,u(a).toString(),"active")],[b.a.c("wf",a.c,u(a).toString(),"loading"),b.a.c("wf",a.c,u(a).toString(),"inactive")]),A(b,"fontactive",a),this.m=!0,O(this)},N.prototype.h=function(a){var b=this.a;if(b.g){var c=i(b.f,b.a.c("wf",a.c,u(a).toString(),"active")),d=[],e=[b.a.c("wf",a.c,u(a).toString(),"loading")];c||d.push(b.a.c("wf",a.c,u(a).toString(),"inactive")),h(b.f,d,e)}A(b,"fontinactive",a),O(this)},P.prototype.load=function(a){this.c=new d(this.j,a.context||this.j),this.g=!1!==a.events,this.f=!1!==a.classes,R(this,new x(this.c,a),a)},S.prototype.load=function(a){function b(){if(f["__mti_fntLst"+d]){var c,e=f["__mti_fntLst"+d](),g=[];if(e)for(var h=0;h=0&&d.helpers.getVisible(c.view)&&c.view.setPlacement()},fontactive:function(a,b){c.context.indexOf("button")>=0&&d.helpers.getVisible(c.view)&&c.view.setPlacement()}})}},a.chat_custom_design=a.chat_custom_design||{},a.chat_custom_design.FontConfig=b}(window),function(a){"use strict";function b(a,b){this.options=a,this.helpers=b,this.basePx=16,this.scale=this.helpers.getScale(),this.font=this.helpers.parseBaseFontOption(this.options.baseFont),this.headerHeight=45,this.textEntryHeight=80,this.bottomGap=15,this.footerHeightCollapse=25,this.footerHeightExpand=60,this.messageMinHeight=40,this.buttonSpacing=15,this.minimizeViewWidth=252,this.minimizeOutsideMargin=15}b.prototype={em:function(a,b,c,d){var e;return e=d?a/b:a/b+(c?"em":"em;")},calcBaseFontSize:function(a,b){return Math.round(a/this.scale)+(b?"px":"px;")},calcMessagesHeight:function(a){var b;switch(a){case"messages-expand":b=this.headerHeight+this.textEntryHeight+this.footerHeightCollapse;break;case"messages-collapse":b=this.headerHeight+this.textEntryHeight+this.bottomGap+this.footerHeightExpand;break;case"messages-notextarea":b=this.headerHeight+this.footerHeightCollapse;break;case"messages-notextarea-with-expand":b=this.headerHeight+this.footerHeightExpand+this.bottomGap;break;default:b=this.headerHeight+this.textEntryHeight+this.footerHeightCollapse}return"calc(100% - "+this.em(b,this.basePx,!0)+");"},getPlacementInsidePreview:function(a,b,c,d,e){if(e-=12,d-=12,ce&&(i="",j="");var k="bottom:0;",l="top:50%;margin-top:"+g+"px;";switch(b>d&&(k="",l=""),a){case"left-top":f="top:0;left:0;float:left;";break;case"left-bottom":f=k+"left:0;float:left;";break;case"right-top":f=i+"float:right;top:0;";break;case"right-bottom":f=i+"float:right;"+k;break;case"center-top":f="top:0;"+j;break;case"left-center":f="left:0;float:left;"+l;break;case"center-center":f=l+j;break;case"center-bottom":f=k+j;break;case"right-center":f=i+l;break;default:console.log("Placement parameter in in helpers.getPlacement() doesn't match any options.")}return f},getPlacement:function(a,b,c){var d="";if(!this.helpers.isInsideGWT()&&!this.helpers.isIpad()&&"undefined"!=typeof MoneypennyChat.getChatWindowCookieData("chatBoxPosition")&&""!==MoneypennyChat.getChatWindowCookieData("chatBoxPosition")){var e=MoneypennyChat.getChatWindowCookieData("chatBoxPosition");return"left:"+e[0]+"px;top:"+e[1]+"px;"}var f=this._ipadTop(),g=this.em(b/2*-1,this.basePx),h=this.em(c/2*-1,this.basePx);switch(this._ipadPlacement(a)){case"left-top":d="top:"+f+";left:0;float:left;";break;case"left-bottom":d="bottom:0;left:0;float:left;";break;case"right-top":d="right:0;float:right;top:"+f+";";break;case"right-bottom":d="right:0;float:right;bottom:0;";break;case"center-top":d="top:"+f+";left:50%;margin-left:"+h;break;case"left-center":d="left:0;float:left;top:50%;margin-top:"+g;break;case"center-center":d="top:50%;margin-top:"+g+"left:50%;margin-left:"+h;break;case"center-bottom":d="bottom:0;left:50%;margin-left:"+h;break;case"right-center":d="right:0;top:50%;margin-top:"+g;break;default:console.warn("Placement parameter in in helpers.getPlacement() doesn't match any options.")}return d},getMinimizeIframePlacement:function(){var a,b="",c=this.em(this.minimizeViewWidth/2*-1,this.options.agentMessage.fontSize),d=this._ipadTop();switch(a=this._ipadPlacement(this.options.placement),a=this._mobilePlacement(this.options.placement)){case"left-top":b="top:"+d+";left:0;float:left;";break;case"left-bottom":case"left-center":b="bottom:0;left:0;float:left;";break;case"right-top":b="right:0;float:right;top:"+d+";";break;case"right-bottom":case"right-center":b="right:0;float:right;bottom:0;";break;case"center-top":b="top:"+d+";left:50%;margin-left:"+c;break;case"center-center":case"center-bottom":b="bottom:0;left:50%;margin-left:"+c;break;default:console.warn("Placement string in helpers.getMinimizeIframePlacement() doesn't match any options.")}return b},getMinimizeContentsPlacement:function(a,b,c,d){var e=this._ipadPlacement(this.options.placement);if(a&&b&&c&&d){var f="",g="",h="",i="";e.indexOf("left")>=0&&(f+=" left",g+=" left",h+=" message-right",i+=" minimize-notify-left-avatar",e.indexOf("center")>=0&&(f+=" bottom",g+=" bottom",h+=" bottom",i+=" minimize-notify-bottom")),(e.indexOf("right")>=0||e.indexOf("center-center")>=0)&&(f+=" right",g+=" right",h+=" message-left",i+=" minimize-notify-right-avatar",e.indexOf("center")>=0&&(f+=" bottom",g+=" bottom",h+=" bottom",i+=" minimize-notify-bottom")),e.indexOf("top")>=0&&!this.helpers.isMobileDevice()&&(f+=" top",g+=" top",h+=" top",i+=" minimize-notify-top",e.indexOf("center")>=0&&(f+=" right",g+=" right",h+=" message-left",i+=" minimize-notify-right-avatar")),(e.indexOf("bottom")>=0||this.helpers.isMobileDevice())&&(f+=" bottom",g+=" bottom",h+=" bottom",i+=" minimize-notify-bottom",e.indexOf("center")>=0&&e.indexOf("left")<0&&(f+=" right",g+=" right",h+=" message-left",i+=" minimize-notify-right-avatar")),this.helpers.elementAddClass(a,f),this.helpers.elementAddClass(b,g),this.helpers.elementAddClass(c,h),this.helpers.elementAddClass(d,i)}},_ipadTop:function(){return this.helpers.isIpad()?document.body.scrollTop:"0"},_ipadPlacement:function(a){return this.helpers.isIpad()&&a.indexOf("-top")<0&&(a.indexOf("left-")>=0?a="left-top":a.indexOf("center-")>=0?a="center-top":a.indexOf("right")>=0&&(a="right-top")),a},_mobilePlacement:function(a){return this.helpers.isMobileDevice()&&a.indexOf("-bottom")<0&&(a.indexOf("left-")>=0?a="left-bottom":a.indexOf("center-")>=0?a="center-bottom":a.indexOf("right")>=0&&(a="right-bottom")),a},minimizeStylesheet:function(){return'"},iframeButtonStylesheet:function(a){return this.buttonViewOptions=a,'"},buttonTextTransformCss:function(){var a="";return a+="right"===this.buttonViewOptions.position?"-ms-transform:rotate(-180deg);-webkit-transform:rotate(-180deg);transform:rotate(-180deg);":"-ms-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg);"},buttonTextCss:function(){var a=" solid ",b=0,c=0,d=this.buttonViewOptions.borderRadius,e=this.buttonViewOptions.borderRadius,f=this.buttonViewOptions.borderWidth,g=this.buttonViewOptions.borderWidth,h=0,i=this.buttonViewOptions.borderWidth;return"bottom"===this.buttonViewOptions.position&&(b=this.buttonViewOptions.borderRadius,c=this.buttonViewOptions.borderRadius,d=0,e=0,f=this.buttonViewOptions.borderWidth,g=this.buttonViewOptions.borderWidth,h=this.buttonViewOptions.borderWidth,i=0),"font-family:"+this.font.family+";font-weight:"+this.font.weight+";padding:"+this.em(10,this.buttonViewOptions.fontSize)+"text-align:center;color:"+this.buttonViewOptions.fontColor+";font-size:"+this.em(this.buttonViewOptions.fontSize,this.buttonViewOptions.fontSize)+"border-top-left-radius:"+this.em(b,this.buttonViewOptions.fontSize)+"border-top-right-radius:"+this.em(c,this.buttonViewOptions.fontSize)+"border-bottom-left-radius:"+this.em(d,this.buttonViewOptions.fontSize)+"border-bottom-right-radius:"+this.em(e,this.buttonViewOptions.fontSize)+"border-left:"+this.em(f,this.buttonViewOptions.fontSize,!0)+a+this.buttonViewOptions.borderColor+";border-right:"+this.em(g,this.buttonViewOptions.fontSize,!0)+a+this.buttonViewOptions.borderColor+";border-top:"+this.em(h,this.buttonViewOptions.fontSize,!0)+a+this.buttonViewOptions.borderColor+";border-bottom:"+this.em(i,this.buttonViewOptions.fontSize,!0)+a+this.buttonViewOptions.borderColor+";background-color:"+this.buttonViewOptions.bgColor+";"},mainCss:function(){var a="font-size:"+this.calcBaseFontSize(this.basePx)+"-webkit-transform:translateZ(0);-moz-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0);display:none;z-index:100003;position:fixed;";if(this.helpers.isMobileDevice())a+="top:"+this.em(this.options.padding,this.basePx)+"bottom:"+this.em(this.options.padding,this.basePx)+"left:"+this.em(this.options.padding,this.basePx)+"right:"+this.em(this.options.padding,this.basePx);else{var b=parseInt(this.options.height)+24,c=parseInt(this.options.width)+24;a+="height:"+this.em(b,this.basePx)+"width:"+this.em(c,this.basePx)+this.getPlacement(this.options.placement,b,c)}return a},draggableCss:function(){var a="width:calc(100% - "+this.em(95,this.basePx,!0)+");left:0;top:0;position:absolute;height:3em;z-index:13000;margin-top:12px;margin-left:12px;cursor:move;";return a},getBackgroundTypeCSS:function(){var a;return null!==this.options.bgColor?a="background-color:"+this.options.bgColor+";":null!==this.options.bgImageUrl?(a='background-image:url("'+this.options.bgImageUrl+'");background-repeat: '+(this.options.bgImageRepeat?"repeat":"no-repeat")+";",this.options.bgImageRepeat||(a+="background-size: 100%;background-position:center center;background-size:cover;")):null!==this.options.bgPatternUrl&&(a='background-image:url("'+this.options.staticUrl+"/images/png/patterns/"+this.options.bgPatternUrl+'");background-repeat:repeat;background-size:'+this.em(512,this.basePx)+";"),a},iframeCss:function(){return"-webkit-transform:translateZ(0);-moz-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0);display:block;position:absolute;border:none;width:100%;height:100%;"},iframeStylesheet:function(){return'"; },customSurveyStylesheet:function(){return''}},a.chat_custom_design=a.chat_custom_design||{},a.chat_custom_design.Style=b}(window),function(a){"use strict";function b(){this.helpers=this.helpers||new a.chat_custom_design.Helpers(this.options,this.target),this.isMobile=this.helpers.isMobileDevice()}b.prototype={bind:function(a,b){var c=this;"mainDivAnimationEnd"===a?(c.mainDiv.addEventListener("webkitAnimationEnd",function(a){b(a)}),c.mainDiv.addEventListener("animationend",function(a){b(a)}),c.mainDiv.addEventListener("oanimationend",function(a){b(a)})):"minimizeDivAnimationEnd"===a&&(c.minimizeDiv.addEventListener("webkitAnimationEnd",function(a){b(a)}),c.minimizeDiv.addEventListener("animationend",function(a){b(a)}),c.minimizeDiv.addEventListener("oanimationend",function(a){b(a)}))},bindNewMessageListener:function(a,b){a.addEventListener("webkitAnimationEnd",function(a){b(a)}),a.addEventListener("animationend",function(a){b(a)}),a.addEventListener("oanimationend",function(a){b(a)})},init:function(){document.body.appendChild(this.animateStylesheet()),document.getElementById("iframe-minimize").contentWindow.document.body.appendChild(this.animateStylesheet()),this.mainDiv=document.getElementById("designstudio"),this.minimizeDiv=document.getElementById("designstudio-minimize")},getAnimationIn:function(a){var b="";switch(a){case"button":b=this.animationInButton;break;case"minimize":b=this.animationInMinimize;break;case"message":b=this.animationInMessage}return b},setAnimationIn:function(a,b){var c="designstudio-animated designstudio-";switch(a){case"button":this.animationInButton=c+b;break;case"minimize":this.animationInMinimize=c+b;break;case"message":this.animationInMessage=c+b}},getAnimationOut:function(a){var b="";switch(a){case"button":b=this.animationOutButton;break;case"minimize":b=this.animationOutMinimize;break;case"message":b=this.animationOutMessage}return b},setAnimationOut:function(a,b){var c="designstudio-animated designstudio-";switch(a){case"button":this.animationOutButton=c+b;break;case"minimize":this.animationOutMinimize=c+b;break;case"message":this.animationOutMessage=c+b}},addAnimation:function(a,b,c){this.helpers.isInsideGWT()||(this.helpers.elementAddClass(a,b),c&&this.setAnimationCallback(c))},removeAnimation:function(a,b){this.helpers.isInsideGWT()||this.helpers.elementRemoveClass(a,b)},setAnimationCallback:function(a){a&&(this.callback=a)},callAnimationCallback:function(a){this.callback&&this.callback(a),this.callback=""},animateStylesheet:function(){var a=".designstudio-animated {-webkit-animation-duration: .5s;animation-duration: .5s;-webkit-animation-fill-mode: both;animation-fill-mode: both;}@keyframes designstudio-fadeOut {from {opacity: 1;}to {opacity: 0;}}.designstudio-fadeOut {animation-name: designstudio-fadeOut;}@-webkit-keyframes designstudio-fadeInUp {from {opacity: 0;-webkit-transform: translate3d(0, 100%, 0);transform: translate3d(0, 100%, 0);}to {opacity: 1;-webkit-transform: none;transform: none;}}@keyframes designstudio-fadeInUp {from {opacity: 0;-webkit-transform: translate3d(0, 100%, 0);transform: translate3d(0, 100%, 0);}to {opacity: 1;-webkit-transform: none;transform: none;}}.designstudio-fadeInUp {-webkit-animation-name: designstudio-fadeInUp;animation-name: designstudio-fadeInUp;}@-webkit-keyframes designstudio-fadeInDown {from {opacity: 0;-webkit-transform: translate3d(0, -100%, 0);transform: translate3d(0, -100%, 0);}to {opacity: 1;-webkit-transform: none;transform: none;}}@keyframes designstudio-fadeInDown {from {opacity: 0;-webkit-transform: translate3d(0, -100%, 0);transform: translate3d(0, -100%, 0);}to {opacity: 1;-webkit-transform: none;transform: none;}}.designstudio-fadeInDown {-webkit-animation-name: designstudio-fadeInDown;animation-name: designstudio-fadeInDown;}@-webkit-keyframes designstudio-fadeInLeft {from {opacity: 0;-webkit-transform: translate3d(-100%, 0, 0);transform: translate3d(-100%, 0, 0);}to {opacity: 1;-webkit-transform: none;transform: none;}}@keyframes designstudio-fadeInLeft {from {opacity: 0;-webkit-transform: translate3d(-100%, 0, 0);transform: translate3d(-100%, 0, 0);}to {opacity: 1;-webkit-transform: none;transform: none;}}.designstudio-fadeInLeft {-webkit-animation-name: designstudio-fadeInLeft;animation-name: designstudio-fadeInLeft;}@-webkit-keyframes designstudio-fadeInRight {from {opacity: 0;-webkit-transform: translate3d(100%, 0, 0);transform: translate3d(100%, 0, 0);}to {opacity: 1;-webkit-transform: none;transform: none;}}@keyframes designstudio-fadeInRight {from {opacity: 0;-webkit-transform: translate3d(100%, 0, 0);transform: translate3d(100%, 0, 0);}to {opacity: 1;-webkit-transform: none;transform: none;}}.designstudio-fadeInRight {-webkit-animation-name: designstudio-fadeInRight;animation-name: designstudio-fadeInRight;}@-webkit-keyframes designstudio-fadeOutUp {from {opacity: 1;}to {opacity: 0;-webkit-transform: translate3d(0, -100%, 0);transform: translate3d(0, -100%, 0);}}@keyframes designstudio-fadeOutUp {from {opacity: 1;}to {opacity: 0;-webkit-transform: translate3d(0, -100%, 0);transform: translate3d(0, -100%, 0);}}.designstudio-fadeOutUp {-webkit-animation-name: designstudio-fadeOutUp;animation-name: designstudio-fadeOutUp;}@-webkit-keyframes designstudio-fadeOutDown {from {opacity: 1;}to {opacity: 0;-webkit-transform: translate3d(0, 100%, 0);transform: translate3d(0, 100%, 0);}}@keyframes designstudio-fadeOutDown {from {opacity: 1; }to {opacity: 0;-webkit-transform: translate3d(0, 100%, 0);transform: translate3d(0, 100%, 0);}}.designstudio-fadeOutDown {-webkit-animation-name: designstudio-fadeOutDown;animation-name: designstudio-fadeOutDown;}@-webkit-keyframes designstudio-fadeOutLeft {from {opacity: 1;}to {opacity: 0;-webkit-transform: translate3d(-100%, 0, 0);transform: translate3d(-100%, 0, 0);}}@keyframes designstudio-fadeOutLeft {from {opacity: 1;}to {opacity: 0;-webkit-transform: translate3d(-100%, 0, 0);transform: translate3d(-100%, 0, 0);}}.designstudio-fadeOutLeft {-webkit-animation-name: designstudio-fadeOutLeft;animation-name: designstudio-fadeOutLeft;}@-webkit-keyframes designstudio-fadeOutRight {from {opacity: 1;}to {opacity: 0;-webkit-transform: translate3d(100%, 0, 0);transform: translate3d(100%, 0, 0);}}@keyframes designstudio-fadeOutRight {from {opacity: 1;}to {opacity: 0;-webkit-transform: translate3d(100%, 0, 0);transform: translate3d(100%, 0, 0);}}.designstudio-fadeOutRight {-webkit-animation-name: designstudio-fadeOutRight;animation-name: designstudio-fadeOutRight;}",b=document.createElement("style");return b.innerHTML=a,b}},a.chat_custom_design=a.chat_custom_design||{},a.chat_custom_design.AnimateView=b}(window),function(a){"use strict";function b(b,c){this.options=b,this.target=c,this.helpers=this.helpers||new a.chat_custom_design.Helpers(this.options,this.target),this.stylesheet=this.stylesheet||new a.chat_custom_design.Style(this.options,this.helpers),this.isMobile=this.helpers.isMobileDevice(),this.isVisible=!1,this.clickCounter=0,this.fontFrameContext="designstudio-frame"+(this.target?"-"+this.target:"")}b.prototype={bind:function(a,b){var c=this;"minimizeIconClick"===a?c.minimizeIcon.addEventListener("click",function(){b()}):"closeIconClick"===a?c.closeIcon.addEventListener("click",function(a){c.clickCounter++,b(c.clickCounter)}):"escapeKeyClose_iframe"===a?this.iframe.addEventListener("keyup",function(a){c.isVisible&&27===a.keyCode&&(a.stopPropagation(),c.clickCounter++,b(c.clickCounter))}):"mouseDown"===a?c.designstudio.addEventListener("mousedown",function(a){b(a)}):"mouseMove"===a?document.addEventListener("mousemove",function(a){b(a)}):"mouseUp"===a&&(document.addEventListener("mouseup",function(a){b(a)}),this.iframe.addEventListener("mouseup",function(a){b(a)}))},postBind:function(a,b){var c=this;"dismissErrorClick"===a&&c.iframe.getElementById("message-error").addEventListener("click",function(){b()})},setFontConfig:function(){a.chat_custom_design.FontConfig.prototype.injectFontLoader({context:this.fontFrameContext,view:this,options:this.options})},render:function(){if(this.helpers.isInsideGWT()?document.getElementById(this.target).children[0].appendChild(this.iframeTemplate()):(this.popover=this.template(),document.body.appendChild(this.popover),this.popover.appendChild(this.iframeTemplate())),this.overlay=this.overlayTemplate(),this.main=this.mainTemplate(this.isMobile),this.header=this.headerTemplate(),this.background=this.backgroundTemplate(),this.prechat=this.prechatTemplate(),this.offline=this.offlineTemplate(),this.chat=this.chatTemplate(),this.footer=this.footerTemplate(),this.callme=this.callmeTemplate(),this.main.appendChild(this.overlay),this.main.appendChild(this.header),this.main.appendChild(this.background),this.main.appendChild(this.prechat),this.main.appendChild(this.offline),this.main.appendChild(this.chat),this.main.appendChild(this.footer),this.main.appendChild(this.callme),this.helpers.isInsideGWT()&&!this.isMobile){var a=document.getElementById(this.helpers.getIframeId()).clientWidth,b=document.getElementById(this.helpers.getIframeId()).clientHeight,c=this.stylesheet.getPlacementInsidePreview(this.options.placement,this.options.height,this.options.width,b,a);this.main.setAttribute("style",c)}this.iframe=document.getElementById(this.helpers.getIframeId()).contentWindow.document,this.iframe.open(),this.iframe.write(this._headerDetailsViewport()),this.iframe.write(this.stylesheet.iframeStylesheet()),this.iframe.write(this.main.outerHTML),this.iframe.close(),this.helpers.setDomLanguageDirection(this.iframe),this.minimizeIcon=this.iframe.getElementById("icon-minimize"),this.closeIcon=this.iframe.getElementById("icon-close"),this.customIcon=this.iframe.getElementById("icon-custom"),this.header=this.iframe.getElementById("header"),this.offline=this.iframe.getElementById("offline"),this.prechat=this.iframe.getElementById("prechat"),this.chat=this.iframe.getElementById("chat"),this.designstudio=document.getElementById("designstudio"),this.footerEl=this.iframe.getElementById("footer")},toggle:function(){this.isVisible?this.hide():this.show()},show:function(){this.iframe=document.getElementById(this.helpers.getIframeId()).contentWindow.document,this.designstudio=document.getElementById("designstudio"),this.main=this.iframe.getElementById("main-"+(this.isMobile?"mobile":"desktop")),null!==this.designstudio&&(this.designstudio.style.display="inline"),null!==this.main&&(this.main.style.display="inline"),this.mainViewLoading&&this.addLoadingIndicator(),this.isVisible=!0,this.updateMobileCSS(),this.helpers.ipadScrollToTop(),this.helpers.disableScrolling()},hide:function(){this.iframe=document.getElementById(this.helpers.getIframeId()).contentWindow.document,this.designstudio=document.getElementById("designstudio"),this.main=this.iframe.getElementById("main-"+(this.isMobile?"mobile":"desktop")),null!==this.designstudio&&(this.designstudio.style.display="none"),null!==this.main&&(this.main.style.display="none"),this.isVisible=!1,this.updateMobileCSS(),this.helpers.enableScrolling()},addLoadingIndicator:function(){this.helpers.elementAddClass(this.iframe.getElementById("background"),"loading-flex"),this.helpers.elementAddClass(this.iframe.getElementById("header"),"loading");var a=document.createElement("div");a.id="indicator-loading",this.iframe.getElementById("background").appendChild(a)},removeLoadingIndicator:function(){this.helpers.elementRemoveClass(this.iframe.getElementById("header"),"loading"),this.helpers.elementRemoveClass(this.iframe.getElementById("background"),"loading-flex"),this.helpers.removeElement(this.iframe.getElementById("indicator-loading"))},getIsVisible:function(){return this.isVisible},destroy:function(){this.helpers.removeElement(this.popover)},_headerDetailsViewport:function(){return'Chat Box'},mainTemplate:function(){var a=document.createElement("main");return a.className="main",a.id="main-"+(this.isMobile?"mobile":"desktop"),a},backgroundTemplate:function(){var a=document.createElement("div");return a.id="background",a},overlayTemplate:function(){var a=document.createElement("div");return a.id="overlay",null===this.options.logoImageUrl||this.isMobile||"overlay"!==this.options.logoPlacement||a.appendChild(this._logoTemplate()),a},headerTemplate:function(){var a=document.createElement("div");a.id="header-"+(this.isMobile?"mobile":"desktop");var b=document.createElement("div");b.id="header",a.appendChild(b);var c=document.createElement("div");c.id="icon-custom",b.appendChild(c);var d=document.createElement("div");d.id="header-text",b.appendChild(d);var e=document.createElement("div");e.id="icon-minimize",e.setAttribute("aria-label","Minimize"),b.appendChild(e);var f=document.createElement("div");return f.id="icon-close",f.setAttribute("aria-label","Close"),b.appendChild(f),a},prechatTemplate:function(){var a=document.createElement("div");return a.id="prechat",a},chatTemplate:function(){var a=document.createElement("div");return a.id="chat",a.className="chat-"+(this.isMobile?"mobile":"desktop"),a},offlineTemplate:function(){var a=document.createElement("div");return a.id="offline",a},footerTemplate:function(){var a=document.createElement("div");a.id="footer-"+(this.isMobile?"mobile":"desktop"),a.className="footer-expand";var b=document.createElement("div");b.id="footer",a.appendChild(b);var c=document.createElement("div");c.id="buttons-offline-div",b.appendChild(c);var d=document.createElement("div");d.id="button-send-email",c.appendChild(d);var e=document.createElement("div");e.id="buttons-prechat-div",b.appendChild(e);var f=document.createElement("div");f.id="button-start-chat",e.appendChild(f);var g=document.createElement("div");g.id="buttons-chat-div",b.appendChild(g);var h=document.createElement("div");h.id="button-call-me",h.style.display="none",g.appendChild(h);var i=document.createElement("div");i.id="wrapper-buttons-end-chat",i.className="wrapper-multi-buttons",i.style.display="none",g.appendChild(i);var j=document.createElement("div");j.id="button-cancel-end-chat",j.className="multi-button-first",i.appendChild(j);var k=document.createElement("div");k.id="button-end-chat",k.className="multi-button-second",i.appendChild(k);var l=document.createElement("div");l.id="button-close-chat",l.style.display="none",g.appendChild(l);var m=document.createElement("div");m.id="button-cancel-callme",m.style.display="none",g.appendChild(m);var n=document.createElement("div");n.id="wrapper-buttons-file-upload",n.className="wrapper-multi-buttons",n.style.display="none",g.appendChild(n);var o=document.createElement("div");o.id="button-cancel-file-upload",o.className="multi-button-first",n.appendChild(o);var p=document.createElement("div");p.id="button-file-upload",p.className="multi-button-second",n.appendChild(p);var q=document.createElement("div");q.id="wrapper-buttons-cobrowse",q.className="wrapper-multi-buttons",q.style.display="none",g.appendChild(q);var r=document.createElement("div");r.id="button-cobrowse-decline",r.className="multi-button-first",q.appendChild(r);var s=document.createElement("div");s.id="button-cobrowse-accept",s.className="multi-button-second",q.appendChild(s);var t=document.createElement("form");t.setAttribute("id","upload-form"),t.setAttribute("name","uploadData"),t.setAttribute("method","post"),t.setAttribute("enctype","multipart/form-data"),b.appendChild(t);var u=document.createElement("input");u.id="file-input",u.setAttribute("type","file"),u.setAttribute("name","visitorFile"),t.appendChild(u);var v=document.createElement("iframe");return v.id="hiddenFileUploadIframe",v.setAttribute("name","hiddenFileUploadIframe"),v.setAttribute("style","display: none"),b.appendChild(v),null!==this.options.logoImageUrl&&"footer"===this.options.logoPlacement&&b.appendChild(this._logoTemplate()),this.options.showPoweredBy&&a.appendChild(this._poweredByTemplate()),a},_logoTemplate:function(){var a=document.createElement("div");a.id="logo";var b=document.createElement("img");return b.className="logo "+this.options.logoPosition,b.src=this.options.logoImageUrl,a.appendChild(b),a},_poweredByTemplate:function(){if(this.options.showPoweredBy){var a=document.createElement("a");a.href=this.options.logoUrl,a.target="_blank",a.className="link-powered-by";var b;return b=document.createElement("img"),b.className="powered-by",b.id="img-powered-by",b.setAttribute("src",this.options.staticUrl+"/images/png/img-powered-by.png"),a.appendChild(b),a}},callmeTemplate:function(){var a=document.createElement("div");return a.id="callme-div",a},template:function(){var a=document.createElement("div");if(a.id="designstudio",a.setAttribute("style",this.stylesheet.mainCss()),!this.isMobile){var b=document.createElement("div");b.id="draggable",b.setAttribute("style",this.stylesheet.draggableCss()),a.appendChild(b)}return a},iframeTemplate:function(){var a=document.createElement("iframe");return a.id=this.helpers.getIframeId(),a.setAttribute("style",this.stylesheet.iframeCss()),a.setAttribute("name","designstudio-frame"+(this.target?"-"+this.target:"")),a.setAttribute("title","Live Chat Box"),a.allowtransparency="true",a.frameborder=0,a},setIsMobile:function(a){this.isMobile=a},updateMobileCSS:function(){this.isMobile&&this.isVisible?this.iframe.getElementsByTagName("body")[0].setAttribute("style","background-color: rgba(210, 215, 211, .75);"):this.iframe.getElementsByTagName("body")[0].setAttribute("style","background-color: transparent;")},iosChatboxResize:function(b){/iPhone|iPod/.test(navigator.userAgent)&&!a.MSStream&&("collapse"===b&&this.helpers.elementAddClass(this.iframe.getElementById("main-mobile"),"ios-collapse"),"expand"===b&&this.helpers.elementRemoveClass(this.iframe.getElementById("main-mobile"),"ios-collapse"),document.body.scrollTop=document.documentElement.scrollTop=0)}},a.chat_custom_design=a.chat_custom_design||{},a.chat_custom_design.MainView=b}(window),function(a){"use strict";function b(b,c,d){this.isOnline=c,this.options=b,this.buttonViewOptions=this.getIsOnline()?b.onlineButton:b.offlineButton,this.target=d,this.helpers=this.helpers||new a.chat_custom_design.Helpers(this.buttonViewOptions,this.target),this.isMobile=this.helpers.isMobileDevice(),this.stylesheet=this.stylesheet||new a.chat_custom_design.Style(this.options,this.helpers),this.isVisible=!1,this.allowOffline=!0,this._determineIconType(),this.basePx=this.buttonViewOptions.fontSize,this.scale=this.helpers.getScale(),this.fontFrameContext="designstudio-button-frame"+(this.target?"-"+this.target:"")}b.prototype={em:function(a,b,c){return a/(b?b:this.basePx)+(c?"em":"em;")},setOptions:function(a){this.buttonViewOptions=this.getIsOnline()?a.onlineButton:a.offlineButton,this._determineIconType()},setFontConfig:function(){a.chat_custom_design.FontConfig.prototype.injectFontLoader({context:this.fontFrameContext,view:this,options:this.options})},_determineIconType:function(){this.isText=null!==this.buttonViewOptions.text,this.isSvg=null!==this.buttonViewOptions.svgIcon,this.isImage=null!==this.buttonViewOptions.imageUrl},bind:function(a,b){var c=this;"buttonClick"===a?c.iframe.addEventListener("click",function(){b()}):"buttonTouchStart"===a?c.iframe.addEventListener("touchstart",function(){b()}):"buttonTouchMove"===a?c.iframe.addEventListener("touchmove",function(a){b(a)}):"buttonTouchEnd"===a&&c.iframe.addEventListener("touchend",function(){b()})},outerButtonCss:function(){var a="position:fixed;z-index:999998;left:-9999px;font-size:"+this.buttonViewOptions.fontSize+"px;";return a},iFrameCss:function(){var a="border:none;display:block;";return this.isSvg&&(a+=this.buttonSvgCss()),a},iframeButtonTemplate:function(){var a=document.createElement("iframe");return a.id="iframe-designstudio-button"+(this.target?"-"+this.target:""),a.setAttribute("style",this.iFrameCss()),a.setAttribute("name","designstudio-button-frame"+(this.target?"-"+this.target:"")),a.setAttribute("title","Live Chat Button"),a.allowtransparency="true",a.frameborder=0,a.scrolling="no",this.isText&&(a.className="iframe-button-text"),a},buttonContainer:function(){var a=document.createElement("div");return a.id="iframe-button-container",a},buttonContent:function(){var a=document.createElement("div");return a.id="iframe-button-content",this.isSvg?(a.className="button-svg",a.appendChild(this.svgButtonTemplate())):this.isImage?(a.className="button-image",a.appendChild(this.imageButtonTemplate())):this.isText&&(a.className="button-text",a.appendChild(this.textButtonTemplate())),a},template:function(){var a=document.createElement("div");return a.id="designstudio-button",a.setAttribute("style",this.outerButtonCss()),a},textButtonTemplate:function(){var a=document.createElement("span");return a.id="designstudio-button-text",a.textContent=this.buttonViewOptions.text,a},imageButtonTemplate:function(){var a=document.createElement("img");return a.id="designstudio-button-image-"+(this.isMobile?"mobile":"desktop"),a.src=this.buttonViewOptions.imageUrl,a},buttonSvgCss:function(){var a="margin:"+this.em(10);return 1===this.scale&&(a+="width:"+this.em(60)+"height:"+this.em(60)),a},svgButtonTemplate:function(a){var b=document.createElement("div");b.id="svg-container";var c=a?"comments-o":this.buttonViewOptions.svgIcon;if(this.helpers.supportsSvg()){var d="http://www.w3.org/2000/svg",e=document.createElementNS(d,"svg");e.setAttributeNS(null,"viewBox","0 0 600 600");var f=document.createElementNS(d,"defs");e.appendChild(f);var g=document.createElement("filter");g.id="dropshadow",g.setAttribute("height","140%"),f.appendChild(g);var h=document.createElement("feGaussianBlur");h.setAttribute("in","SourceAlpha"),h.setAttribute("stdDeviation","15"),g.appendChild(h);var i=document.createElement("feOffset");i.setAttribute("result","offsetblur"),i.setAttribute("dx","10"),i.setAttribute("dy","10"),g.appendChild(i);var j=document.createElement("feComponentTransfer");g.appendChild(j);var k=document.createElement("feFuncA");k.setAttribute("type","linear"),k.setAttribute("slope","0.8"),j.appendChild(k);var l=document.createElement("feMerge");g.appendChild(l);var m=document.createElement("feMergeNode");l.appendChild(m);var n=document.createElement("feMergeNode");n.setAttribute("in","SourceGraphic"),l.appendChild(n);var o=document.createElementNS(d,"g");o.id=c,o.setAttributeNS(null,"class","designstudio-container");var p=document.createElementNS(d,"circle");p.setAttributeNS(null,"class","designstudio-circle"),p.setAttributeNS(null,"cx","50%"),p.setAttributeNS(null,"cy","50%"),p.setAttributeNS(null,"r","260"),p.setAttributeNS(null,"fill",this.buttonViewOptions.bgColor),p.setAttributeNS(null,"linejoin","round"),p.setAttributeNS(null,"stroke",this.buttonViewOptions.borderColor),p.setAttributeNS(null,"stroke-width","0"),p.setAttributeNS(null,"fill-opacity","1"),p.setAttributeNS(null,"position","absolute"),o.appendChild(p),e.appendChild(o);var q=this.helpers.getSvgPath(c,this.buttonViewOptions.fontColor),r=document.createElementNS("http://www.w3.org/2000/svg","path");r.setAttribute("class","designstudio-icon"),r.setAttribute("fill",q.iconColor),r.setAttribute("d",q.data),r.setAttribute("transform",q.tran),o.appendChild(r),b.appendChild(e)}else{var s=document.createElement("img");s.setAttribute("src",this.options.staticUrl+"/images/png/"+c+"-dk.png"),s.id="button-img",b.appendChild(s)}return b},render:function(){this.button=this.template(),this.helpers.isInsideGWT()?document.getElementById(this.target).children[0].appendChild(this.button):document.body.appendChild(this.button),this.container=this.buttonContainer(),this.mainDiv=this.buttonContent(),this.button.appendChild(this.iframeButtonTemplate()),this.container.appendChild(this.mainDiv),this.iframe=document.getElementById("iframe-designstudio-button"+(this.target?"-"+this.target:"")).contentWindow.document,this.iframe.open(),this.iframe.write(this._headerDetailsViewport()),this.iframe.write(this.stylesheet.iframeButtonStylesheet(this.buttonViewOptions)),this.iframe.write(this.container.outerHTML),this.iframe.close(),this.helpers.setDomLanguageDirection(this.iframe),this.mainButtonContainer=this.iframe.getElementById("iframe-button-container"),this.buttonElementContent=this.iframe.getElementById("iframe-button-content"),this.setUpAnimations()},destroy:function(){this.helpers.removeElement(this.button)},refresh:function(){this.destroy(),this.render()},_headerDetailsViewport:function(){return'Live Chat Button'},setPlacement:function(){this._updateButtonPlacement(),this._updateOffset(),this.setUpAnimations(),this.helpers.ipadScrollToTop(),this.resizeDivs()},resizeDivs:function(){this.iframeElement=document.getElementById("iframe-designstudio-button"+(this.target?"-"+this.target:""));var a=this.iframe.getElementById("iframe-button-content").getBoundingClientRect().width,b=this.iframe.getElementById("iframe-button-content").getBoundingClientRect().height;this.mainButtonContainer.style.height=b,this.mainButtonContainer.style.width=a,this.iframeElement.height=this.mainButtonContainer.offsetHeight,this.iframeElement.width=this.mainButtonContainer.offsetWidth},_updateButtonPlacement:function(){this.button.style.left=null,this.button.style.right=null,this.button.style.top=null,this.button.style.bottom=null,this.button.style.webkitTransform=null,this.button.style.MozTransform=null,this.button.style.msTransform=null,this.button.style.transform=null,this.button.style.webkitTransformOrigin=null,this.button.style.MozTransformOrigin=null,this.button.style.msTransformOrigin=null,this.button.style.transformOrigin=null,"left"===this.buttonViewOptions.position&&"top"===this.buttonViewOptions.offset?(this.button.style.left=0,this.buttonElementContent.style.right=0,this.buttonElementContent.style.top=0):"left"===this.buttonViewOptions.position&&"bottom"===this.buttonViewOptions.offset?(this.button.style.left=0,this.buttonElementContent.style.left=0,this.buttonElementContent.style.top=0):"right"===this.buttonViewOptions.position&&"top"===this.buttonViewOptions.offset?(this.button.style.right=0,this.buttonElementContent.style.left=0,this.buttonElementContent.style.top=0):"right"===this.buttonViewOptions.position&&"bottom"===this.buttonViewOptions.offset?(this.button.style.right=0,this.buttonElementContent.style.right=0,this.buttonElementContent.style.top=0):"top"===this.buttonViewOptions.position&&"right"===this.buttonViewOptions.offset?(this.button.style.top=0,this.buttonElementContent.style.top=0,this.buttonElementContent.style.right=0):"top"===this.buttonViewOptions.position&&"left"===this.buttonViewOptions.offset?(this.button.style.top=0,this.buttonElementContent.style.top=0,this.buttonElementContent.style.left=0):"bottom"===this.buttonViewOptions.position&&"right"===this.buttonViewOptions.offset?(this.button.style.bottom=0,this.buttonElementContent.style.bottom=0,this.buttonElementContent.style.right=0):"bottom"===this.buttonViewOptions.position&&"left"===this.buttonViewOptions.offset&&(this.button.style.bottom=0,this.buttonElementContent.style.bottom=0,this.buttonElementContent.style.left=0);var a=this._getDegreeOfRotation(this.isText,this.buttonViewOptions.position),b=this._getOriginXY(this.buttonViewOptions.position,this.buttonViewOptions.offset),c=this._getTranslateXY(this.isText,this.isSvg,this.buttonViewOptions.position,this.buttonViewOptions.offset,this.buttonViewOptions.offsetValue,this.buttonViewOptions.offsetUnit);if(""!==c){this.button.style.webkitTransformOrigin=b,this.button.style.MozTransformOrigin=b,this.button.style.msTransformOrigin=b,this.button.style.transformOrigin=b;var d="rotate("+a+"deg)";this.button.style.webkitTransform=d+c,this.button.style.MozTransform=d+c,this.button.style.msTransform=d+c,this.button.style.transform=d+c}},_getDegreeOfRotation:function(a,b){var c="0";return a&&("left"===b?c="-90":"right"===b&&(c="90")),c},_getOriginXY:function(a,b){var c="";return"left"===a&&"bottom"===b?c="0% 100%":"left"===a&&"top"===b||"left"===b?c="0% 0%":"right"===a&&"bottom"===b?c="100% 100%":("right"===a&&"top"===b||"right"===b)&&(c="100% 0%"),c},_getTranslateXY:function(a,b,c,d,e,f){var g="",h="0%";if(!a||"left"!==c&&"right"!==c||("left"===c&&"bottom"===d?(h="100%",g=" translate(0%, 100%)"):"left"===c&&"top"===d?g=" translate(-100%, 0%)":"right"===c&&"bottom"===d?(h="100%",g=" translate(0%, 100%)"):"right"===c&&"top"===d&&(g=" translate(100%, 0%)"),"50"===e&&"%"===f&&(g=" translate("+("left"===c?"-50%":"50%")+", "+h+")")),"50"===e&&"%"===f&&""===g){var i=this._getCenter(b);g="bottom"===d?" translate(0%, "+i+")":"top"===d?" translate(0%, -"+i+")":"left"===d?" translate(-"+i+", 0%)":" translate("+i+", 0%)"}return g},_getCenter:function(a){var b="50%";return a&&(b=80/this.basePx/2+"em"),b},setUpAnimations:function(){if(!this.helpers.isInsideGWT()&&Moneypenny.getCustomDesignUI()&&"undefined"!=typeof Moneypenny.getCustomDesignUI().animateView){var a,b;switch(this.buttonViewOptions.position){case"left":a="fadeInLeft",b="fadeOutLeft";break;case"right":a="fadeInRight",b="fadeOutRight";break;case"top":a="fadeInDown",b="fadeOutUp";break;case"bottom":a="fadeInUp",b="fadeOutDown";break;default:a="",b=""}Moneypenny.getCustomDesignUI().animateView.setAnimationIn("button",a),Moneypenny.getCustomDesignUI().animateView.setAnimationOut("button",b)}},_updateOffset:function(){var a=this.buttonViewOptions.offsetValue,b=this.buttonViewOptions.offsetUnit;"px"===b&&(a/=this.basePx,b="em"),this.button.style[this.buttonViewOptions.offset]=a+b},getButton:function(){return this.button},toggle:function(){this.isVisible?this.hide():this.show()},show:function(){this._doNotShowOffline()?this.hide():(this.isVisible=!0,this.setPlacement())},hide:function(){this.isVisible=!1,this.button.style.left="-9999px",this.button.style.right=""},updateAgentAvatar:function(a){this.agentAvatarUrl=a},_isAvatarAvailable:function(){return"undefined"!=typeof this.agentAvatarUrl&&""!==this.agentAvatarUrl},setIsOnline:function(a){this.isOnline=a},getIsOnline:function(){return this.isOnline},_doNotShowOffline:function(){return!this.allowOffline&&!this.getIsOnline()},isShowNoButton:function(){return null===this.buttonViewOptions.text&&null===this.buttonViewOptions.imageUrl&&null===this.buttonViewOptions.svgIcon},isViewVisible:function(){return this.isVisible},setIsMobile:function(a){this.isMobile=a}},a.chat_custom_design=a.chat_custom_design||{},a.chat_custom_design.ButtonView=b}(window),function(a){"use strict";function b(b,c,d){this.options=b,this.target=c,this.helpers=this.helpers||new a.chat_custom_design.Helpers(this.options,this.target),this.stylesheet=this.stylesheet||new a.chat_custom_design.Style(this.options,this.helpers),this.messageView=this.messageView||new a.chat_custom_design.MessageView(this.options,this.target,d),this.mainView=this.mainView||new a.chat_custom_design.MainView(this.options,this.target),this.isVisible=!1,this.isOnline=!1,this.isTyping=!1,this.textareaTypingValue="",this.isMobile=this.helpers.isMobileDevice(),this.iframe=document.getElementById(this.helpers.getIframeId()).contentWindow.document,this.chat=this.iframe.getElementById("chat"),this.callmeButton=this.iframe.getElementById("button-call-me"),this.callmeCancel=this.iframe.getElementById("button-cancel-callme"),this.actionAreaEnabled=!!this.options.chatSendButton.svgIcon,this.state={closeChatWarningDisplay:!1}}b.prototype={bind:function(a,b){var c=this;"formClick"===a?c.iframe.addEventListener("click",function(){b()}):"callmeButtonClick"===a?c.callmeButton.addEventListener("click",function(){b()}):"callmeCancelClick"===a?c.callmeCancel.addEventListener("click",function(){b()}):"fileUploadButtonClick"===a?c.chatFileUploadButton.addEventListener("click",function(){b()}):"chatCancelFileUploadButtonClick"===a?c.chatCancelFileUpload.addEventListener("click",function(){ b()}):"chatFileSelect"===a?c.chatFileInput.addEventListener("change",function(a){b(a)}):"chatSendMessage"===a?(c.chatMessageTextarea.addEventListener("keyup",function(a){a.preventDefault(),13===a.keyCode?b():(c.setIsVisitorTyping(c.chatMessageTextarea.value.length>0),b(a,"messageCookie"))}),this.actionAreaEnabled&&(c.chatMessageSendButton.addEventListener("mousedown",function(a){a.preventDefault()}),c.chatMessageSendButton.addEventListener("click",function(){b()}))):"chatCloseChat"===a?c.chatCloseButton.addEventListener("click",function(a){b()}):"chatCancelCloseChat"===a?c.cancelEndChatButton.addEventListener("click",function(a){b()}):"chatEndChat"===a?c.endChatButton.addEventListener("click",function(a){b()}):"chatMessageTextareaFocus"===a?c.chatMessageTextarea.addEventListener("focus",function(){b()}):"chatMessageTextareaBlur"===a?c.chatMessageTextarea.addEventListener("blur",function(){b()}):"acceptCobrowseButtonClick"===a?c.acceptCobrowseButton.addEventListener("click",function(a){b()}):"declineCobrowseButtonClick"===a&&c.declineCobrowseButton.addEventListener("click",function(a){b()})},setState:function(a,b){this.state[a]=b},getState:function(a){return this.state[a]},render:function(){this.iframe=this.iframe,this.footer=this.iframe.getElementById("footer"),this.messageView.render(),this.chat.appendChild(this.textEntryAreaTemplate()),this.callmeButton=this.iframe.getElementById("button-call-me"),this.callmeCancel=this.iframe.getElementById("button-cancel-callme"),this.chatFileUploadButton=this.iframe.getElementById("button-file-upload"),this.chatMessageTextarea=this.iframe.getElementById("message-textarea"),this.textareaDiv=this.iframe.getElementById("textarea-div"),this.chatMessageSendButton=this.iframe.getElementById("action-item-send"),this.chatFileInput=this.iframe.getElementById("file-input"),this.chatCancelFileUpload=this.iframe.getElementById("button-cancel-file-upload"),this.chatCloseButton=this.iframe.getElementById("button-close-chat"),this.messagesContent=this.iframe.getElementById("messages-content"),this.fileUploadForm=this.iframe.getElementById("upload-form"),this.cancelEndChatButton=this.iframe.getElementById("button-cancel-end-chat"),this.endChatButton=this.iframe.getElementById("button-end-chat"),this.acceptCobrowseButton=this.iframe.getElementById("button-cobrowse-accept"),this.declineCobrowseButton=this.iframe.getElementById("button-cobrowse-decline"),this.fileUploadButtonWrapper=this.iframe.getElementById("wrapper-buttons-file-upload"),this.coBrowseButtonWrapper=this.iframe.getElementById("wrapper-buttons-cobrowse"),this.endChatButtonWrapper=this.iframe.getElementById("wrapper-buttons-end-chat"),this.resizeMessageInputArea()},destroy:function(){this.helpers.removeElement(this.chat),this.helpers.removeChildren(this.iframe.getElementById("button-call-me"))},refresh:function(){},toggle:function(){this.isVisible?this.hide():this.show()},show:function(){this.isVisible=!0,this.mainView.show(),this.chat.style.display="inline",this.helpers.toggleHeader("chat"),this.helpers.toggleFooterButtons("chat"),this.focusMessageInputArea(),this.helpers.isInsideGWT()||(this.iframe.getElementById("chat-cancel-callme").value=Moneypenny.getMessage(40).toUpperCase(),this.iframe.getElementById("chat-cancel-file-upload").value=Moneypenny.getMessage(42).toUpperCase(),this.iframe.getElementById("chat-file-upload").value=Moneypenny.getMessage(57).toUpperCase(),this.iframe.getElementById("chat-close").value=Moneypenny.getMessage(58).toUpperCase(),this.iframe.getElementById("chat-cobrowse-decline").value=Moneypenny.getMessage(63).toUpperCase(),this.iframe.getElementById("chat-cobrowse-accept").value=Moneypenny.getMessage(62).toUpperCase()),this.messageView.updateScroll()},hide:function(){this.isVisible=!1,this.chat.style.display="none",this.helpers.toggleHeader("none"),this.helpers.toggleFooterButtons("none")},getVisitorTyping:function(){return this.chatMessageTextarea.value},setIsVisitorTyping:function(a){this.isTyping=a},isVisitorTyping:function(){var a=this.isTyping&&this.textareaTypingValue!==this.chatMessageTextarea.value;return this.textareaTypingValue=this.chatMessageTextarea.value,a},updateHeaderText:function(a){this.headerText=this.iframe.getElementById("header-text"),this.headerText.innerHTML=a},hideInput:function(){this.textareaDiv.style.display="none",this.chatMessageTextarea.disabled=!0,this.chatMessageTextarea.placeholder="",this.resizeMessageInputArea("notextarea")},showInput:function(){this.textareaDiv.style.display="inline",this.chatMessageTextarea.disabled=!1,this.chatMessageTextarea.placeholder="",this.resizeMessageInputArea(),this.focusMessageInputArea()},enableCallmeButtons:function(){this.callmeButton.style.display="inline",this.callmeCancel.style.display="none",this.resizeMessageInputArea()},showCancelCallmeButtons:function(){this.callmeButton.style.display="none",this.callmeCancel.style.display="inline",this.resizeMessageInputArea()},disableCallmeButtons:function(a){this.callmeButton.style.display="none",this.callmeCancel.style.display="none",this.resizeMessageInputArea(a)},enableFileUploadButtons:function(){this.fileUploadButtonWrapper.style.display="flex",this.chatFileInput.style.display="inline",this.resizeMessageInputArea("notextarea")},disableFileUploadButtons:function(){this.fileUploadButtonWrapper.style.display="none",this.chatFileInput.style.display="none",this.resizeMessageInputArea()},enableCobrowsingButtons:function(a,b){this.coBrowseButtonWrapper.style.display="flex",this.acceptCobrowseButton.dataset.key=a,this.acceptCobrowseButton.dataset.token=b,this.resizeMessageInputArea("notextarea")},disableCobrowsingButtons:function(){this.coBrowseButtonWrapper.style.display="none",this.acceptCobrowseButton.removeAttribute("data-key"),this.acceptCobrowseButton.removeAttribute("data-token"),this.resizeMessageInputArea()},toggleCloseButton:function(){"none"!==this.chatCloseButton.style.display?this.chatCloseButton.style.display="none":this.chatCloseButton.style.display="inline"},enableWarningEndChatButtons:function(){this.endChatButtonWrapper.style.display="flex",this.resizeMessageInputArea()},disableWarningEndChatButtons:function(){this.endChatButtonWrapper.style.display="none",this.resizeMessageInputArea()},textEntryAreaTemplate:function(){var b=this.iframe.createElement("div");b.id="textarea-div",b.className="rtl"===a.chat_custom_design.direction?" rtl":"";var c=this.iframe.createElement("textarea");c.id="message-textarea";var d=this.actionAreaEnabled||this.helpers.isInsideGWT();return c.className="text-entry text-entry-"+(this.isMobile?"mobile":"desktop")+(d?" actionarea-true":" actionarea-false"),c.role="textarea",c.autocomplete="off",c.setAttribute("type",this.options.chatTextarea.type),c.value="",c.placeholder=this.options.chatTextarea.placeholder,b.appendChild(c),this.actionAreaEnabled&&b.appendChild(this.actionArea(this.options.chatSendButton.svgIcon,this.options.chatSendButton.bgColor)),b},actionArea:function(a,b){var c=this.iframe.createElement("div");c.className="action-area-chat";var d=document.createElement("div");return d.id="action-item-send",d.setAttribute("alt",this.options.chatSendButton.text),d.appendChild(this.helpers.addSvgIcon(a,b)),c.appendChild(d),c},resizeMessageInputArea:function(a){var b=this._isExpandNeeded();this.helpers.expandFooter(b),b?this.helpers.elementAddClass(this.iframe.getElementById("textarea-div"),"bottom-position"):this.iframe.querySelector("#textarea-div.bottom-position")&&this.helpers.elementRemoveClass(this.iframe.getElementById("textarea-div"),"bottom-position");var c=this.iframe.getElementById("messages-content");if(c){var d="messages-content messages-"+(b?"collapse":"expand");"notextarea"!==a&&"special-feature"!==a||(d="messages-content",d+=b?" messages-notextarea-with-expand":" messages-notextarea"),c.className=d}},_isExpandNeeded:function(){var a=!1;null!==this.options.logoImageUrl&&"footer"===this.options.logoPlacement&&(a=!0);for(var b=this.iframe.getElementById("buttons-chat-div").childNodes,c=0;c0),this.removeAgentIsTyping(),this.systemMessageToBeRemoved.length)for(var d=this.systemMessageToBeRemoved.length-1;d>=0;--d)switch(this.systemMessageToBeRemoved[d]){case this.systemIds.CLOSE_WARN:case this.systemIds.FURV_FILE_UPLOAD:this.setState("lastMessageType",this.lastMsgElement.className.indexOf("agent")>=this.TYPE.SYSTEM?this.TYPE.AGENT:this.TYPE.VISITOR);break;default:this.messageToBeRemoved(this.systemMessageToBeRemoved[d])}if(this.options.visitorMessage.bubble&&this.lastMsgElement){if(this.state.lastMessageType===this.TYPE.AGENT)return b=".agent-alias",c=this.innerAgentMessageTemplate(a,"-bubble",this._isAvatarAvailable()),this.insertMessageWithGroup(c,b);if(this.state.lastMessageType===this.TYPE.VISITOR&&this.systemMessageToBeRemoved.length)return b=".system-message",c=this.agentMessageTemplate(a),this.insertMessageBeforeLastOnOwn(c,b)}c=this.agentMessageTemplate(a),this.iframe.getElementById("messages-content").appendChild(c)},_setIsShortAlias:function(a){if("undefined"==typeof a||null===a)return void(this.isShortAlias=!1);var b=document.createElement("span");b.style.visibility="hidden",b.style.whiteSpace="nowrap",b.innerHTML=a,b.className="agent-alias",b.id="hidden-alias";var c=this.helpers.isInsideGWT()?document.getElementById(this.target).children[0]:this.iframe.body;c.appendChild(b);var d=c.querySelector("#hidden-alias");d.offsetWidth<=40/this.helpers.getScale()&&d.offsetWidth>0?this.isShortAlias=!0:this.isShortAlias=!1,this.helpers.removeElement(d)},clearMessages:function(){this.messagesContent.innerHTML=""},setSystemMessageToBeRemoved:function(a){a!==this.systemIds.START&&a!==this.systemIds.SDTM_SECURE_DATA&&this.systemMessageToBeRemoved.push(a)},messageToBeRemoved:function(a){var b=this.systemMessageToBeRemoved.indexOf(a);b>=0&&(this.helpers.removeElement(this.iframe.getElementById(this.systemMessageToBeRemoved[b])),this.systemMessageToBeRemoved.splice(b,1))},setIsSystemMessage:function(a){this.isSystemMessage=a},clearSystemMessage:function(a){this.setIsSystemMessage(!1),this.messageToBeRemoved(a),this.setState("currentMessageType",this.state.currentMessageType!==this.TYPE.SYSTEM?this.state.currentMessageType:this.state.lastMessageType),this.setLastMessageEl()},isMessageAlreadyShowing:function(){return this.messageAlreadyShowing},addAgentIsTyping:function(){this.isAgentTyping||(this.isAgentTyping=!0,this.iframe.getElementById("messages-content").appendChild(this.agentIsTypingTemplate()),this.updateScroll())},removeAgentIsTyping:function(){var a=this.iframe.getElementById("agent-is-typing");a&&(this.isAgentTyping=!1,this.helpers.removeElement(a),this.setLastMessageEl())},setVisitorIsUploading:function(){this.messagesContent=this.iframe.getElementById("messages-content"),this.isVisitorUploading||(this.isVisitorUploading=!0,this.messagesContent.appendChild(this.visitorIsUploadingTemplate()),this.updateScroll())},_removeVisitorIsUploading:function(){var a=this.iframe.getElementById("visitor-is-uploading");a&&(this.isVisitorUploading=!1,this.helpers.removeElement(a))},updateScroll:function(){var a=this;setTimeout(function(){var b=a.iframe.getElementById("messages-content");"undefined"!=typeof b&&(b.scrollTop=b.scrollHeight)},30)},messagesContentTemplate:function(){var a=this.iframe.createElement("div");return a.className="messages-content",a.id="messages-content",a},agentMessageTemplate:function(a){var b=this.options.agentMessage.bubble?"-bubble":"",c=this.iframe.createElement("div");if(c.className="message-block container-agent-message"+b,this._isAvatarAvailable()){var d=this.iframe.createElement("div");d.className="agent-details"+b,c.appendChild(d);var e=this.iframe.createElement("img");e.className="agent-avatar",e.setAttribute("src",this.agentAvatarUrl),d.appendChild(e)}var f=this.innerAgentMessageTemplate(a,b,this._isAvatarAvailable());c.appendChild(f);var g=this.iframe.createElement("div");return g.className="agent-alias"+this.direction,"undefined"!=typeof this.agentName&&"Chat Bot"!==this.agentName?(g.innerHTML=this.agentName,g.className+=this._shortAliasCSS()):g.innerHTML="",c.appendChild(g),c},visitorMessageTemplate:function(a,b){var c=this.options.visitorMessage.bubble?"-bubble":"",d=this.iframe.createElement("div");d.className="message-block container-visitor-message"+c;var e=this.innerVisitorMessageTemplate(a,c,b);d.appendChild(e);var f=this.iframe.createElement("div");f.className="visitor-details"+c+this.direction,d.appendChild(f);var g=this.iframe.createElement("div");return g.className="visitor-alias",g.innerHTML=this.helpers._deactivateHTML(this.options.visitorName),f.appendChild(g),d},systemMessageTemplate:function(a,b){if(b&&"<"!==a.charAt(0)){var c="",d="";a=c+a+d}var e=this.options.agentMessage.bubble?"-bubble":"",f=this.iframe.createElement("div");f.className="container-agent-message"+e+" system-message",f.id=this.isSystemMessage;var g=this.iframe.createElement("div");g.className="agent-message"+e+" full",f.appendChild(g);var h=this.iframe.createElement("div");return h.className="message-text",h.innerHTML=a,g.appendChild(h),f},_shortAliasCSS:function(){var a;return a=this.isShortAlias&&this._isAvatarAvailable()&&this.options.agentMessage.bubble?"short-alias":"long-alias"," "+a},innerVisitorMessageTemplate:function(a,b,c){var d=this.iframe.createElement("div");d.className="visitor-message"+b+this.direction;var e=this.iframe.createElement("div");return e.className="message-text",e.innerHTML=this.helpers.isInsideGWT()||c?a:Moneypenny.deactivateHTML(a),d.appendChild(e),d},innerAgentMessageTemplate:function(a,b,c){var d=this.iframe.createElement("div");d.className="agent-message"+b+(c?" has-avatar":" no-avatar")+this.direction;var e=this.iframe.createElement("div");return e.className="message-text",e.innerHTML=a,d.appendChild(e),d},insertMessageWithGroup:function(a,b){var c=this.lastMsgElement.parentNode.querySelectorAll(b);c=c[c.length-1],c.parentNode.insertBefore(a,c)},insertMessageBeforeLastOnOwn:function(a,b){var c=this.chat.querySelectorAll(b);c=c[c.length-1],c.parentNode.insertBefore(a,c)},agentIsTypingTemplate:function(){var a='
',b=this.agentMessageTemplate(a);return b.setAttribute("id","agent-is-typing"),b},visitorIsUploadingTemplate:function(){var a='
',b=this.visitorMessageTemplate(a,!0);return b.setAttribute("id","visitor-is-uploading"),b},_isAvatarAvailable:function(){return"undefined"!=typeof this.agentAvatarUrl&&""!==this.agentAvatarUrl},updateChatAutoResponder:function(a,b,c){var d=this.iframe.createElement("div");d.className="container-agent-message",d.id=this.systemIds.WAGT_AUTO_RESPOND;var e=this.iframe.createElement("div");e.className="agent-message full",d.appendChild(e);var f=this.iframe.createElement("div");if(f.className="message-text",f.innerHTML=a,e.appendChild(f),c&&(this.cancelChatLink.innerHTML=c,this.cancelChatLink.className="link-message",f.appendChild(this.cancelChatLink)),b&&""!==b){var g=this.iframe.createElement("span");g.innerHTML=b,f.appendChild(g)}return d},errorMessage:function(){var a=this.iframe.createElement("div");a.id=this.systemIds.ERROR_MSG,a.className="container-agent-message";var b=this.iframe.createElement("div");b.className="agent-message error-message",a.appendChild(b);var c=this.iframe.createElement("div");c.className="message-text message-error-text",c.innerHTML=Moneypenny.getMessage(8),b.appendChild(c);var d=document.createElement("div");d.id="button-error-dismiss",c.appendChild(d);var e=this.iframe.createElement("input");e.className="button",e.id="error-dismiss",e.setAttribute("type","button"),e.value="OK",d.appendChild(e),this.iframe.getElementById("main-"+(this.isMobile?"mobile":"desktop")).appendChild(a)},_chatCloseWarning:function(a){return Moneypenny.getMessage(46)+"

"+Moneypenny.getMessage(47).replace("{alias}",a)}},a.chat_custom_design=a.chat_custom_design||{},a.chat_custom_design.MessageView=b}(window),function(a){"use strict";function b(b){this.options=b,this.helpers=this.helpers||new a.chat_custom_design.Helpers(this.options),this.stylesheet=this.stylesheet||new a.chat_custom_design.Style(this.options,this.helpers),this.buttonView=this.buttonView||new a.chat_custom_design.ButtonView(this.options),this.isMobile=this.helpers.isMobileDevice(),this.isVisible=!1,this.direction=a.chat_custom_design.direction?" "+a.chat_custom_design.direction:"",this.notifyCount=0,this.scale=this.helpers.getScale(),this.latestMessage="",this.fontFrameContext="designstudio-minimize-frame"+(this.target?"-"+this.target:""),this.minimizeStashCookie={}}b.prototype={bind:function(a,b){var c=this;"minimizeClickToMaximize"===a&&c.iframe.addEventListener("click",function(){b()})},setFontConfig:function(){a.chat_custom_design.FontConfig.prototype.injectFontLoader({context:this.fontFrameContext,view:this,options:this.options})},render:function(){this.minimize=this.template(),document.body.appendChild(this.minimize),this.minimizeContent=this.minimizeContentTemplate(),this.iframeTemplate=this.iframeMinimizeTemplate(),this.minimize.appendChild(this.iframeTemplate),this.iframeTemplate.appendChild(this.minimizeContent),this.iframe=document.getElementById("iframe-minimize").contentWindow.document,this.iframe.open(),this.iframe.write(this._headerDetailsViewport()),this.iframe.write(this.stylesheet.iframeButtonStylesheet(this.options.onlineButton)),this.iframe.write(this.stylesheet.minimizeStylesheet()),this.iframe.write(this.minimizeContent.outerHTML),this.iframe.close(),this.helpers.setDomLanguageDirection(this.iframe),this.minimizeDiv=document.getElementById("designstudio-minimize"),this.minimizeContent=this.iframe.getElementById("minimize-content"),this.minimizeSvg=this.iframe.getElementById("minimize-svg"),this.minimizeAvatar=this.iframe.getElementById("minimize-avatar"),this.minimizeAvatarContainer=this.iframe.getElementById("minimize-avatar-container"),this.minimizeMessages=this.iframe.getElementById("minimize-messages"),this.minimizeText=this.iframe.getElementById("minimize-text"),this.notifyDiv=this.iframe.getElementById("minimize-notify"),this.notifyCounter=this.iframe.getElementById("minimize-notify-counter")},template:function(){var a=document.createElement("div");return a.id="designstudio-minimize",a.setAttribute("style",this.outerMinimizeCss()),a},getMinimizeIframe:function(){return document.getElementById("iframe-minimize").contentWindow.document},outerMinimizeCss:function(){var a="position:fixed;z-index:999998;display:none;"+this.stylesheet.getMinimizeIframePlacement();return a},iframeMinimizeTemplate:function(){var a=document.createElement("iframe");return a.id="iframe-minimize",a.setAttribute("style",this.iFrameCss()),a.setAttribute("name","designstudio-minimize-frame"+(this.target?"-"+this.target:"")),a.setAttribute("title","Live Chat Button"),a.allowtransparency="true",a.frameborder=0,a.scrolling="no",a},iFrameCss:function(){var a="border:none;display:block;font-size:"+this.stylesheet.calcBaseFontSize(this.options.agentMessage.fontSize);return a},_headerDetailsViewport:function(){return'Minimized Chat Box'},minimizeContentTemplate:function(){var a=document.createElement("div");a.id="minimize-content";var b=this.notifyTemplate();a.appendChild(b);var c=document.createElement("div");c.id="minimize-avatar-container";var d=document.createElement("img");d.id="minimize-avatar",c.appendChild(d),a.appendChild(c);var e=document.createElement("div");e.id="minimize-svg",e.appendChild(this.buttonView.svgButtonTemplate(!0)),a.appendChild(e);var f=this.messagesTemplate();return a.appendChild(f),this.stylesheet.getMinimizeContentsPlacement(c,e,f,b),a},messagesTemplate:function(){var a=document.createElement("div");return a.id="minimize-messages",a},messageTemplate:function(a){var b=document.createElement("div");b.className="minimize-message ";var c=document.createElement("div");return c.id="minimize-text",a&&(c.innerHTML=a),c.className=this.direction,b.appendChild(c),b},notifyTemplate:function(){var a=document.createElement("div");a.id="minimize-notify";var b=document.createElement("span");return b.id="minimize-notify-counter",a.appendChild(b),a},showNotify:function(){this.notifyDiv.style.display="flex"},hideNotify:function(){this.notifyDiv.style.display="none",this.notifyCount=0},incrementNotify:function(a){this.notifyStyle=getComputedStyle(this.notifyDiv),"inline"!==this.notifyStyle.display&&this.showNotify(),a?this.notifyCount=a:this.notifyCount++,this.notifyCounter.innerHTML=this.notifyCount},updateAgentAvatar:function(a){var b=!1;a!==this.agentAvatarUrl&&(b=!0),this.agentAvatarUrl=a,b&&this.showAvatarOrSVG()},_isAvatarAvailable:function(){return"undefined"!=typeof this.agentAvatarUrl&&""!==this.agentAvatarUrl},updateMessage:function(a,b,c){this._setLatestMessage(a);var d=a;c&&a&&(d=c?this._removeInlineFormatting(a):a);var e,f=this.messageTemplate(d);if(this.options.placement.indexOf("top")>=0&&!this.isMobile||this.helpers.isIpad()?(this.minimizeMessages.insertBefore(f,this.minimizeMessages.firstChild),e=0):(this.minimizeMessages.appendChild(f),e=this.minimizeMessages.children.length-1),this.showMessageContainer(),this.resizeDivs(),Moneypenny.getCustomDesignUI()&&"undefined"!=typeof Moneypenny.getCustomDesignUI().animateView){if(this.minimizeMessages.children.length>0)for(var g=this.minimizeMessages.children.length-1;g>=0;g--)g!==e&&(Moneypenny.getCustomDesignUI().animateView.removeAnimation(this.minimizeMessages.children[g],Moneypenny.getCustomDesignUI().animateView.getAnimationIn("message")),Moneypenny.getCustomDesignUI().animateView.addAnimation(this.minimizeMessages.children[g],Moneypenny.getCustomDesignUI().animateView.getAnimationOut("message")));Moneypenny.getCustomDesignUI().animateController._updateMessageBindings(f),Moneypenny.getCustomDesignUI().animateView.addAnimation(f,Moneypenny.getCustomDesignUI().animateView.getAnimationIn("message"))}else this.minimizeMessages.children.length>3&&(this.helpers.removeElement(this.minimizeMessages.children[0]),this.resizeDivs())},_removeInlineFormatting:function(a){return"["+a.replace(/\|\/gi," ").replace(/|<\/b>/gi,"")+"]"},clearMessages:function(){this._getLatestMessage()!==Moneypenny.getMessage(35)&&(this.minimizeMessages.innerHTML="")},setUpAnimations:function(){if(!this.helpers.isInsideGWT()&&Moneypenny.getCustomDesignUI()&&"undefined"!=typeof Moneypenny.getCustomDesignUI().animateView){ var a="",b="",c="",d="";this.options.placement.indexOf("top")>=0&&!this.isMobile||this.helpers.isIpad()?(a="fadeInDown",b="fadeOutUp",c="fadeInDown",d="fadeOut"):(a="fadeInUp",b="fadeOutDown",c="fadeInUp",d="fadeOut"),Moneypenny.getCustomDesignUI().animateView.setAnimationIn("minimize",a),Moneypenny.getCustomDesignUI().animateView.setAnimationOut("minimize",b),Moneypenny.getCustomDesignUI().animateView.setAnimationIn("message",c),Moneypenny.getCustomDesignUI().animateView.setAnimationOut("message",d)}},show:function(){this.isVisible=!0,this.minimizeDiv.style.display="inline",this.showAvatarOrSVG(),this.helpers.nonResponsive&&this.handleNonResponsive(),this.resizeDivs()},hide:function(){this.isVisible=!1,this.minimizeDiv.style.display="none",this.hideNotify()},hideTargetMessage:function(a){a.target.style.display="none"},showAvatarOrSVG:function(){this._isAvatarAvailable()?(this.minimizeAvatar.src=this.agentAvatarUrl,this.showAvatar(),this.hideSVG()):(this.hideAvatar(),this.showSVG())},isViewVisible:function(){return this.isVisible},showAvatar:function(){this.minimizeAvatarContainer.style.display="inline"},hideAvatar:function(){this.minimizeAvatarContainer.style.display="none"},showSVG:function(){this.iframe.getElementById("svg-container").style.display="inline"},hideSVG:function(){this.iframe.getElementById("svg-container").style.display="none"},showMessageContainer:function(){this.minimizeMessages.style.display="inline"},hideMessageContainer:function(){this.minimizeMessages.style.display="none"},destroy:function(){this.helpers.removeElement(this.minimize)},refresh:function(){this.destroy(),this.render()},handleNonResponsive:function(){if(this.options.placement.indexOf("center")>=0&&this.options.placement.indexOf("left")<0&&this.options.placement.indexOf("right")<0){var a=document.getElementById("designstudio-minimize").offsetWidth,b=this.stylesheet.em(a/2*-1,this.options.agentMessage.fontSize,!0,!1);document.getElementById("designstudio-minimize").style.marginLeft=b}},resizeDivs:function(){this.iframeElement=document.getElementById("iframe-minimize"),this.iframeElement.height=Math.max(this.helpers.getOuterHeight(this.minimizeMessages),this.helpers.getOuterHeight(this.minimizeSvg),this.helpers.getOuterHeight(this.minimizeAvatarContainer));var a=this._isAvatarAvailable()?this.helpers.getOuterWidth(this.minimizeAvatarContainer):this.helpers.getOuterWidth(this.minimizeSvg);"inline"===this.minimizeMessages.style.display&&(a+=this.helpers.getOuterWidth(this.minimizeMessages)),this.iframeElement.style.width=a,this.iframeElement.width=a},_getLatestMessage:function(){return this.latestMessage},_setLatestMessage:function(a){this.latestMessage=a}},a.chat_custom_design=a.chat_custom_design||{},a.chat_custom_design.MinimizeView=b}(window),function(a){"use strict";function b(b,c){this.target=c,this.options=b,this.helpers=this.helpers||new a.chat_custom_design.Helpers(this.options,this.target),this.iframe=document.getElementById(this.helpers.getIframeId()).contentWindow.document,this.direction=a.chat_custom_design.direction?" "+a.chat_custom_design.direction:""}b.prototype={bind:function(a,b,c){var d,e=this,f=this.iframe.querySelectorAll(".field-input");for(d=0;d=0&&("fieldFocusPreChat"===a?e.addEvent(f[d],"focus",c):"fieldBlurPreChat"===a?e.addEvent(f[d],"blur",c):"fieldFocusOffline"===a?f[d].classList.contains(b)&&e.addEvent(f[d],"focus",c):"fieldBlurOffline"===a&&e.addEvent(f[d],"blur",c));var g=e.iframe.querySelector("."+b+"-dropdown#widgetselector");if(g&&("widgetOptionsPreChat"===a?e.addEvent(g,"change",c):"widgetOptionsOffline"===a&&e.addEvent(g,"change",c)),"checkboxPreChat"===a||"checkboxOffline"===a){var h=e.iframe.querySelectorAll("."+b+"-checkbox");0!==h.length&&Array.prototype.forEach.call(h,function(a){e.addEvent(a,"change",c)})}},addEvent:function(a,b,c){a.addEventListener(b,function(a){c(a)})},renderFields:function(a){var b,c;if("prechat"===a?(b=this.iframe.getElementById("prechat-form"),c=this.options.prechatFields):"offline"===a&&(b=this.iframe.getElementById("offline-form"),c=this.options.offlineFields),"undefined"!=typeof c){for(var d=0,e=0;e=0;g--)switch(f=c[g],f.type){case"textarea":h=this.textAreaTemplate(f,a),b.insertBefore(h,b.firstChild),c.length<=2&&d<=1&&this.helpers.elementAddClass(this.iframe.querySelector("."+a+"-textarea"),"textarea-tall");break;case"text":case"email":case"tel":h=this.textInputTemplate(f,a),b.insertBefore(h,b.firstChild);break;case"radio":case"checkbox":h=this.checkboxTemplate(f,a),b.insertBefore(h,b.firstChild);break;case"label":h=this.freeFormLabelTemplate(f,a),b.insertBefore(h,b.firstChild);break;case"dropdown":case"widgetselector":h=this.dropdownTemplate(f,a),b.insertBefore(h,b.firstChild);break;case"fileupload":}}},addRequiredSymbol:function(a){return a?"*":""},labelSpan:function(a){var b=this.iframe.createElement("span");return b.className="required-symbol",b.innerHTML=a,b},textInputTemplate:function(a,b){var c,d=this.addRequiredSymbol(a.required),e=b+"-"+a.name,f=this.iframe.createElement("div");f.setAttribute("data-ref",e),f.className="field div-text",c=this.iframe.createElement("label"),c.className=b+"-textinput-label",c.innerHTML=a.label,c.setAttribute("for",a.name),d&&c.appendChild(this.labelSpan(d)),f.appendChild(c),c=f;var g=this.iframe.createElement("input");return g.className=b+"-textinput field-input",g.setAttribute("id",a.name),g.setAttribute("name",a.name),g.setAttribute("type",a.type),g.setAttribute("label",a.label),g.setAttribute("placeholder",a.placeholder),this.addRequiredAttribute(g,a.required),f.appendChild(g),f},textAreaTemplate:function(a,b){var c,d=this.addRequiredSymbol(a.required),e=b+"-"+a.name,f=this.iframe.createElement("div");f.setAttribute("data-ref",e),f.className="field div-textarea",c=this.iframe.createElement("label"),c.className=b+"-textarea-label",c.innerHTML=a.label,c.setAttribute("for",a.name),f.appendChild(c),d&&c.appendChild(this.labelSpan(d)),c=f;var g=this.iframe.createElement("textarea");return g.className=b+"-textarea field-input",g.setAttribute("id",a.name),g.setAttribute("name",a.name),g.setAttribute("type",a.type),g.setAttribute("label",a.label),g.setAttribute("placeholder",a.placeholder),this.addRequiredAttribute(g,a.required),f.appendChild(g),f},checkboxTemplate:function(a,b){var c=this,d=b+"-"+a.name,e=this.iframe.createElement("div");e.setAttribute("data-ref",d),e.className="field div-checkbox";var f=this.iframe.createElement("div");f.className="checkbox-name",f.innerHTML=a.label,e.appendChild(f);var g=this.addRequiredSymbol(a.required);if(g){var h=c.iframe.createElement("span");h.className="required-symbol",h.innerHTML=g,f.appendChild(h)}var i=c.iframe.createElement("div");return i.className=b+"-checkbox-wrapper",i.setAttribute("required",a.required),e.appendChild(i),a.options.forEach(function(e){var f=c.iframe.createElement("div");f.className=b+"-checkbox-item",i.appendChild(f);var g=c.iframe.createElement("input");g.className=b+"-checkbox field-input",g.setAttribute("id",d),g.setAttribute("name",a.name),g.setAttribute("type","checkbox"),g.setAttribute("value","false"),f.appendChild(g);var h=c.iframe.createElement("label");h.className=b+"-checkbox-label",h.id="checkbox-label",h.innerHTML=e.displayText,h.setAttribute("for",d),f.appendChild(h)}),e},freeFormLabelTemplate:function(a,b){var c=this.iframe.createElement("div");c.className="field label-freeform";var d=this.iframe.createElement("label");return d.className=b+"-label-freeform",d.setAttribute("name",a.name),d.innerHTML=a.label,c.appendChild(d),c},dropdownTemplate:function(a,b){var c,d,e,f=b+"-"+a.name,g=this.iframe.createElement("div");g.setAttribute("data-ref",f),g.className="field div-dropdown";var h=this.iframe.createElement("span");h.className="dropdown"+this.direction,h.id="dropdown-form",g.appendChild(h);var i=this.iframe.createElement("select");if(i.className=b+"-dropdown field-input",i.setAttribute("id",a.name),i.setAttribute("name",a.name),i.setAttribute("selected","selected"),a.required&&i.setAttribute("required",!0),c=this.iframe.createElement("option"),c.innerHTML=a.placeholder,c.setAttribute("value",""),c.setAttribute("selected",!0),c.setAttribute("disabled",!0),i.appendChild(c),null!==a.options)for(var j=0;j=0)a.postChatSurveyContent=a.postChatSurveyContent.replace("