
v3Lander.initProgramRulesData(function(name){if(name==="constants"){return{"CUST_IP_HOST_RESOLUTION_ACTIVE":false,"RESET_CHAT_ON_BROWSER_CLOSE":false,"SAML_ASSERTION_ON_TRANSCRIPT_REQUEST":false,"CONVERSATION_TRANSCRIPT_RETRY_COUNT":5.0,"CONVERSATION_TRANSCRIPT_RETRY_INTERVAL":2000.0,"MAX_LOG_LINE_LENGTH":10000.0,"ASSISTED_AGENT_CHAT_COUNT":2.0,"ASSISTED_CUSTOMER_CHAT_COUNT":2.0,"DEBUG":true,"DEFERRED_START_OF_MANAGERS":false,"SALE_EXPIRATION":2595600000,"SALE_STATE_CONVERTED":"converted","SALE_STATE_ASSISTED":"assisted","SALE_STATE_UNSOLD":"unsold","SESSION_EXPIRE_TIME":1800000,"INC_GROUP_CONTROL":"CONTROL","INC_GROUP_CHAT":"CHAT","INC_STATE_ELIGIBLE":"ELIGIBLE","INC_STATE_TARGETED":"TARGETED","INC_STATE_EXPOSURE_QUALIFIED":"EXPOSURE_QUALIFIED","INC_STATE_EXPOSED":"EXPOSED","INC_STATE_ENGAGED":"ENGAGED","INC_STATE_INTERACTED":"INTERACTED","INC_STATE_ASSISTED":"ASSISTED","INC_STATE_CONVERTED":"CONVERTED","INC_GROUP_DURATION":2595600000,"INC_CONTROL_PERCENT":0.0,"MESSAGE_COUNT_ASSISTED":1.0,"PERSISTENT_ASSISTED":6.0,"UNDEFINED_ASSISTED":3.0,"MAX_LONG":9.223372036854776E18,"REMOVE_QUERY_STRING_FROM_TRACKING_URL":false,"RECHAT_INTERVAL":86400000,"JS_LOG_LEVEL":"ERROR","API_SERVICE_SURVEY_EMAIL_ALERT_URL":""};}
if(name==="custom-events"){return[new EXCBTT({name:"NewSession",getEvtData:function(rule,evt){return MI8.mixAbsorber({sessionID:getSessionID(),loyalty:PM.getVar("loyalty",rule).getValueOrDefault(),timestamp:new Date()}).absorb(evt);}}),new EXCBTT({name:"SaleLanding",getEvtData:function(rule,evt){return MI8.mixAbsorber({products:(e9(function(){return s7("inqSalesProducts");},false,true)?s7("inqSalesProducts"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesProducts;},false,true)?window.parent.inqSalesProducts:null))),quantities:(e9(function(){return s7("inqSalesQuantities");},false,true)?s7("inqSalesQuantities"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesQuantities;},false,true)?window.parent.inqSalesQuantities:null))),prices:(e9(function(){return s7("inqSalesPrices");},false,true)?s7("inqSalesPrices"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesPrices;},false,true)?window.parent.inqSalesPrices:null))),productTypes:(e9(function(){return s7("inqSalesProductTypes");},false,true)?s7("inqSalesProductTypes"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesProductTypes;},false,true)?window.parent.inqSalesProductTypes:null))),products2:(e9(function(){return s7("inqSalesProducts2");},false,true)?s7("inqSalesProducts2"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesProducts2;},false,true)?window.parent.inqSalesProducts2:null))),quantities2:(e9(function(){return s7("inqSalesQuantities2");},false,true)?s7("inqSalesQuantities2"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesQuantities2;},false,true)?window.parent.inqSalesQuantities2:null))),prices2:(e9(function(){return s7("inqSalesPrices2");},false,true)?s7("inqSalesPrices2"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesPrices2;},false,true)?window.parent.inqSalesPrices2:null))),productTypes2:(e9(function(){return s7("inqSalesProductTypes2");},false,true)?s7("inqSalesProductTypes2"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesProductTypes2;},false,true)?window.parent.inqSalesProductTypes2:null))),orderType:(e9(function(){return s7("inqOrderType");},false,true)?s7("inqOrderType"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqOrderType;},false,true)?window.parent.inqOrderType:null))),lc:PM.getVar("saleLC",rule).getValueOrDefault(),customerID:Inq.getCustID(),businessUnitID:CHM.getBusinessUnitID(evt,rule),agentGroupID:CHM.getAgentGroupID(evt,false)}).absorb(evt);},aliases:[{name:"onSaleEvent",getEvtData:function(rule,evt){return{products:(e9(function(){return s7("inqSalesProducts");},false,true)?s7("inqSalesProducts"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesProducts;},false,true)?window.parent.inqSalesProducts:null))),quantities:(e9(function(){return s7("inqSalesQuantities");},false,true)?s7("inqSalesQuantities"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesQuantities;},false,true)?window.parent.inqSalesQuantities:null))),prices:(e9(function(){return s7("inqSalesPrices");},false,true)?s7("inqSalesPrices"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesPrices;},false,true)?window.parent.inqSalesPrices:null))),productTypes:(e9(function(){return s7("inqSalesProductTypes");},false,true)?s7("inqSalesProductTypes"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesProductTypes;},false,true)?window.parent.inqSalesProductTypes:null))),total:FM.ex8("saleValue"),products2:(e9(function(){return s7("inqSalesProducts2");},false,true)?s7("inqSalesProducts2"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesProducts2;},false,true)?window.parent.inqSalesProducts2:null))),quantities2:(e9(function(){return s7("inqSalesQuantities2");},false,true)?s7("inqSalesQuantities2"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesQuantities2;},false,true)?window.parent.inqSalesQuantities2:null))),prices2:(e9(function(){return s7("inqSalesPrices2");},false,true)?s7("inqSalesPrices2"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesPrices2;},false,true)?window.parent.inqSalesPrices2:null))),productTypes2:(e9(function(){return s7("inqSalesProductTypes2");},false,true)?s7("inqSalesProductTypes2"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesProductTypes2;},false,true)?window.parent.inqSalesProductTypes2:null))),orderType:(e9(function(){return s7("inqOrderType");},false,true)?s7("inqOrderType"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqOrderType;},false,true)?window.parent.inqOrderType:null))),lc:PM.getVar("saleLC",rule).getValueOrDefault(),customerID:Inq.getCustID(),businessUnitID:CHM.getBusinessUnitID(evt,rule),agentGroupID:CHM.getAgentGroupID(evt,false)};}}]}),new EXCBTT({name:"Assisted",getEvtData:function(rule,evt){return MI8.mixAbsorber({agentID:CHM.getAgentID(),chatID:CHM.getChatID(),customerID:Inq.getCustID(),businessUnitID:CHM.getBusinessUnitID(evt,rule),agentGroupID:CHM.getAgentGroupID(evt,false)}).absorb(evt);},aliases:[{name:"onSaleQualifiedEvent",getEvtData:function(rule,evt){return{agentID:PM.getVar("assistAgt",rule).getValueOrDefault(),chatID:PM.getVar("assistChatID",rule).getValueOrDefault(),customerID:Inq.getCustID(),bizRuleName:PM.getVar("asstRuleName",rule).getValueOrDefault(),chatType:CHM.getChatType(),businessUnitID:CHM.getBusinessUnitID(evt,rule),agentGroupID:CHM.getAgentGroupID(evt,false)};}}]}),new EXCBTT({name:"Converted",getEvtData:function(rule,evt){return MI8.mixAbsorber({saleID:PM.getVar("saleID",rule).getValueOrDefault(),agentID:PM.getVar("assistAgt",rule).getValueOrDefault(),chatID:PM.getVar("assistChatID",rule).getValueOrDefault(),customerID:Inq.getCustID(),products:(e9(function(){return s7("inqSalesProducts");},false,true)?s7("inqSalesProducts"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesProducts;},false,true)?window.parent.inqSalesProducts:null))),quantities:(e9(function(){return s7("inqSalesQuantities");},false,true)?s7("inqSalesQuantities"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesQuantities;},false,true)?window.parent.inqSalesQuantities:null))),prices:(e9(function(){return s7("inqSalesPrices");},false,true)?s7("inqSalesPrices"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesPrices;},false,true)?window.parent.inqSalesPrices:null))),productTypes:(e9(function(){return s7("inqSalesProductTypes");},false,true)?s7("inqSalesProductTypes"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesProductTypes;},false,true)?window.parent.inqSalesProductTypes:null))),products2:(e9(function(){return s7("inqSalesProducts2");},false,true)?s7("inqSalesProducts2"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesProducts2;},false,true)?window.parent.inqSalesProducts2:null))),quantities2:(e9(function(){return s7("inqSalesQuantities2");},false,true)?s7("inqSalesQuantities2"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesQuantities2;},false,true)?window.parent.inqSalesQuantities2:null))),prices2:(e9(function(){return s7("inqSalesPrices2");},false,true)?s7("inqSalesPrices2"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesPrices2;},false,true)?window.parent.inqSalesPrices2:null))),productTypes2:(e9(function(){return s7("inqSalesProductTypes2");},false,true)?s7("inqSalesProductTypes2"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesProductTypes2;},false,true)?window.parent.inqSalesProductTypes2:null))),orderType:(e9(function(){return s7("inqOrderType");},false,true)?s7("inqOrderType"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqOrderType;},false,true)?window.parent.inqOrderType:null))),lc:PM.getVar("saleLC",rule).getValueOrDefault(),businessUnitID:CHM.getBusinessUnitID(evt,rule),agentGroupID:CHM.getAgentGroupID(evt,false)}).absorb(evt);},aliases:[{name:"onSoldEvent",getEvtData:function(rule,evt){return{saleID:PM.getVar("saleID",rule).getValueOrDefault(),agentID:PM.getVar("assistAgt",rule).getValueOrDefault(),chatID:PM.getVar("assistChatID",rule).getValueOrDefault(),customerID:Inq.getCustID(),chatType:CHM.getChatType(),products:(e9(function(){return s7("inqSalesProducts");},false,true)?s7("inqSalesProducts"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesProducts;},false,true)?window.parent.inqSalesProducts:null))),quantities:(e9(function(){return s7("inqSalesQuantities");},false,true)?s7("inqSalesQuantities"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesQuantities;},false,true)?window.parent.inqSalesQuantities:null))),prices:(e9(function(){return s7("inqSalesPrices");},false,true)?s7("inqSalesPrices"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesPrices;},false,true)?window.parent.inqSalesPrices:null))),productTypes:(e9(function(){return s7("inqSalesProductTypes");},false,true)?s7("inqSalesProductTypes"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesProductTypes;},false,true)?window.parent.inqSalesProductTypes:null))),products2:(e9(function(){return s7("inqSalesProducts2");},false,true)?s7("inqSalesProducts2"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesProducts2;},false,true)?window.parent.inqSalesProducts2:null))),quantities2:(e9(function(){return s7("inqSalesQuantities2");},false,true)?s7("inqSalesQuantities2"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesQuantities2;},false,true)?window.parent.inqSalesQuantities2:null))),prices2:(e9(function(){return s7("inqSalesPrices2");},false,true)?s7("inqSalesPrices2"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesPrices2;},false,true)?window.parent.inqSalesPrices2:null))),productTypes2:(e9(function(){return s7("inqSalesProductTypes2");},false,true)?s7("inqSalesProductTypes2"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesProductTypes2;},false,true)?window.parent.inqSalesProductTypes2:null))),orderType:(e9(function(){return s7("inqOrderType");},false,true)?s7("inqOrderType"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqOrderType;},false,true)?window.parent.inqOrderType:null))),lc:PM.getVar("saleLC",rule).getValueOrDefault(),bizRuleName:PM.getVar("asstRuleName",rule).getValueOrDefault(),businessUnitID:CHM.getBusinessUnitID(evt,rule),agentGroupID:CHM.getAgentGroupID(evt,false)};}}]}),new EXCBTT({name:"CustomerHostDomainResolved",getEvtData:function(rule,evt){return MI8.mixAbsorber({hostName:PM.getVar("custHost",rule).getValueOrDefault(),ip:Inq.getCustIP()}).absorb(evt);}}),new EXCBTT({name:"SaleStateTransition",getEvtData:function(rule,evt){return MI8.mixAbsorber({chatID:CHM.getChatID(),customerID:Inq.getCustID(),oldAssistChatID:PM.getVar("oldAssistChatID",rule).getValueOrDefault(),oldAssistDT:PM.getVar("oldAssistDT",rule).getValueOrDefault(),oldAssistAgt:PM.getVar("oldAssistAgt",rule).getValueOrDefault(),oldAsstRuleID:PM.getVar("oldAsstRuleID",rule).getValueOrDefault(),oldAsstRuleName:PM.getVar("oldAsstRuleName",rule).getValueOrDefault(),oldSaleState:PM.getVar("oldSaleState",rule).getValueOrDefault(),oldIncState:PM.getVar("oldIncState",rule).getValueOrDefault(),oldSaleID:PM.getVar("oldSaleID",rule).getValueOrDefault(),oldSoldDT:PM.getVar("oldSoldDT",rule).getValueOrDefault(),assistChatID:PM.getVar("assistChatID",rule).getValueOrDefault(),assistDT:PM.getVar("assistDT",rule).getValueOrDefault(),assistAgt:PM.getVar("assistAgt",rule).getValueOrDefault(),asstRuleID:PM.getVar("asstRuleID",rule).getValueOrDefault(),asstRuleName:PM.getVar("asstRuleName",rule).getValueOrDefault(),saleState:PM.getVar("saleState",rule).getValueOrDefault(),incState:PM.getVar("incState",rule).getValueOrDefault(),saleID:PM.getVar("saleID",rule).getValueOrDefault(),soldDT:PM.getVar("soldDT",rule).getValueOrDefault()}).absorb(evt);}}),new EXCBTT({name:"EligibleEvent",getEvtData:function(rule,evt){return MI8.mixAbsorber({siteID:getSiteID(),pageID:LDM.getPageID(0,evt),customerID:Inq.getCustID(),incrementalityID:asi4(),sessionID:getSessionID(),group:PM.getVar("incGroup",rule).getValueOrDefault(),businessUnitID:CHM.getBusinessUnitID(evt,rule)}).absorb(evt);},aliases:[{name:"onGroupAssignment",getEvtData:function(rule,evt){return{customerID:Inq.getCustID(),group:PM.getVar("incGroup",rule).getValueOrDefault()};}}]}),new EXCBTT({name:"TargetedEvent",getEvtData:function(rule,evt){return MI8.mixAbsorber({siteID:getSiteID(),pageID:LDM.getPageID(0,evt),customerID:Inq.getCustID(),incrementalityID:asi4(),sessionID:getSessionID(),group:PM.getVar("incGroup",rule).getValueOrDefault(),brID:CHM.getChat()?CHM.getChat().getRuleId():(evt.rule?evt.rule.id:rule.getID()),businessUnitID:CHM.getBusinessUnitID(evt,rule),agentGroupID:CHM.getAgentGroupID(evt,false)}).absorb(evt);},aliases:[{name:"onTargeted",getEvtData:function(rule,evt){return{customerID:Inq.getCustID(),group:PM.getVar("incGroup",rule).getValueOrDefault(),bizRuleName:rule.evt.rule.name,businessUnitID:CHM.getBusinessUnitID(evt,rule),agentGroupID:CHM.getAgentGroupID(evt,false)};}}]}),new EXCBTT({name:"ExposedEvent",getEvtData:function(rule,evt){return MI8.mixAbsorber({siteID:getSiteID(),pageID:LDM.getPageID(0,evt),customerID:Inq.getCustID(),incrementalityID:asi4(),sessionID:getSessionID(),brID:CHM.getChat()?CHM.getChat().getRuleId():(evt.rule?evt.rule.id:rule.getID()),chatID:CHM.getChatID(),businessUnitID:CHM.getBusinessUnitID(evt,rule)}).absorb(evt);}}),new EXCBTT({name:"EngagedEvent",getEvtData:function(rule,evt){return MI8.mixAbsorber({siteID:getSiteID(),pageID:LDM.getPageID(0,evt),customerID:Inq.getCustID(),incrementalityID:asi4(),sessionID:getSessionID(),brID:CHM.getChat()?CHM.getChat().getRuleId():(evt.rule?evt.rule.id:rule.getID()),chatID:CHM.getChatID(),businessUnitID:CHM.getBusinessUnitID(evt,rule)}).absorb(evt);}}),new EXCBTT({name:"InteractedEvent",getEvtData:function(rule,evt){return MI8.mixAbsorber({siteID:getSiteID(),pageID:LDM.getPageID(0,evt),customerID:Inq.getCustID(),incrementalityID:asi4(),sessionID:getSessionID(),brID:CHM.getChat()?CHM.getChat().getRuleId():(evt.rule?evt.rule.id:rule.getID()),chatID:CHM.getChatID(),businessUnitID:CHM.getBusinessUnitID(evt,rule),type:CHM.getConversionType()}).absorb(evt);}}),new EXCBTT({name:"AssistedEvent",getEvtData:function(rule,evt){return MI8.mixAbsorber({siteID:getSiteID(),pageID:LDM.getPageID(0,evt),customerID:Inq.getCustID(),incrementalityID:asi4(),sessionID:getSessionID(),brID:CHM.getChat()?CHM.getChat().getRuleId():(evt.rule?evt.rule.id:rule.getID()),chatID:CHM.getChatID(),businessUnitID:CHM.getBusinessUnitID(evt,rule),type:CHM.getConversionType()}).absorb(evt);}}),new EXCBTT({name:"ConvertedEvent",getEvtData:function(rule,evt){return MI8.mixAbsorber({siteID:getSiteID(),pageID:LDM.getPageID(0,evt),customerID:Inq.getCustID(),incrementalityID:asi4(),sessionID:getSessionID(),group:PM.getVar("incGroup",rule).getValueOrDefault(),products:(e9(function(){return s7("inqSalesProducts");},false,true)?s7("inqSalesProducts"):null),quantities:(e9(function(){return s7("inqSalesQuantities");},false,true)?s7("inqSalesQuantities"):null),prices:(e9(function(){return s7("inqSalesPrices");},false,true)?s7("inqSalesPrices"):null),productTypes:(e9(function(){return s7("inqSalesProductTypes");},false,true)?s7("inqSalesProductTypes"):null),products2:(e9(function(){return s7("inqSalesProducts2");},false,true)?s7("inqSalesProducts2"):null),quantities2:(e9(function(){return s7("inqSalesQuantities2");},false,true)?s7("inqSalesQuantities2"):null),prices2:(e9(function(){return s7("inqSalesPrices2");},false,true)?s7("inqSalesPrices2"):null),productTypes2:(e9(function(){return s7("inqSalesProductTypes2");},false,true)?s7("inqSalesProductTypes2"):null),orderType:(e9(function(){return s7("inqOrderType");},false,true)?s7("inqOrderType"):null),orderID:(e9(function(){return s7("inqClientOrderNum");},false,true)?s7("inqClientOrderNum"):null),clientTimestamp:(e9(function(){return s7("inqClientTimeStamp");},false,true)?s7("inqClientTimeStamp"):null),testOrder:(e9(function(){return s7("inqTestOrder");},false,true)?s7("inqTestOrder"):null),businessUnitID:CHM.getBusinessUnitID(evt,rule),total:FM.ex8("saleValue"),agentGroupID:CHM.getAgentGroupID(evt,false)}).absorb(evt);},aliases:[{name:"onConversion",getEvtData:function(rule,evt){return{customerID:Inq.getCustID(),group:PM.getVar("incGroup",rule).getValueOrDefault(),bizRuleName:PM.getVar("asstRuleName",rule).getValueOrDefault(),businessUnitID:CHM.getBusinessUnitID(evt,rule),agentGroupID:CHM.getAgentGroupID(evt,false)};}}]}),new EXCBTT({name:"SurveyLaunched",getEvtData:function(rule,evt){return MI8.mixAbsorber({siteID:getSiteID(),businessUnitID:CHM.getBusinessUnitID(evt,rule),agentGroupID:CHM.getAgentGroupID(evt,false)}).absorb(evt);}}),new EXCBTT({name:"PreChatSurveyComplete",getEvtData:function(rule,evt){return MI8.mixAbsorber({}).absorb(evt);}}),new EXCBTT({name:"IncStateFunnelTransition",getEvtData:function(rule,evt){return MI8.mixAbsorber({newState:"to be set by firing rule"}).absorb(evt);}}),new EXCBTT({name:"IframeC2C",getEvtData:function(rule,evt){return MI8.mixAbsorber({c2cIFrameDomainName:gc7("C2C_IFRAME_DOMAIN_NAME",rule),queryData:"{}"}).absorb(evt);}}),new EXCBTT({name:"ChatMinimized",getEvtData:function(rule,evt){return MI8.mixAbsorber({}).absorb(evt);}}),new EXCBTT({name:"ChatRestored",getEvtData:function(rule,evt){return MI8.mixAbsorber({}).absorb(evt);}}),new EXCBTT({name:"SkinLoaded",getEvtData:function(rule,evt){return MI8.mixAbsorber({}).absorb(evt);}}),new EXCBTT({name:"ChatTranscriptEmailedToCustomer",getEvtData:function(rule,evt){return MI8.mixAbsorber({}).absorb(evt);}}),new EXCBTT({name:"StorageReady",getEvtData:function(rule,evt){return MI8.mixAbsorber({}).absorb(evt);}}),new EXCBTT({name:"StorageChanged",getEvtData:function(rule,evt){return MI8.mixAbsorber({}).absorb(evt);}}),new EXCBTT({name:"LogToDW",getEvtData:function(rule,evt){return MI8.mixAbsorber({}).absorb(evt);}}),new EXCBTT({name:"ACIFCanvasReady",getEvtData:function(rule,evt){return MI8.mixAbsorber({}).absorb(evt);}}),new EXCBTT({name:"LoadPostChatSurvey",getEvtData:function(rule,evt){return MI8.mixAbsorber({}).absorb(evt);}}),new EXCBTT({name:"SendSurveyAlert",getEvtData:function(rule,evt){return MI8.mixAbsorber({}).absorb(evt);}})];}
if(name==="js-functions"){return{"saleValue":function(){try{var ps=inqSalesPrices;var qs=inqSalesQuantities;if(ps.length==qs.length){if(qs.length>0){var sum=0;for(var i=0;i<qs.length;i++){sum+=(parseFloat(qs[i])*parseFloat(ps[i]));}
return sum;}}}catch(er){}
return null;},"sendRequestToEmailApiController":function(ROM,evt,url){var data={};data["emailSpecID"]=evt["emailSpecID"];data["emailSpecName"]=evt["emailSpecName"];data["subject"]=evt["emailSubject"];data["body"]=evt["emailBody"];data["chatID"]=evt["chatID"];data["isHtml"]=evt["isHtml"]||true;ROM.post(url,data);},"sendLogEvtDataListToIJSFLoggingController":function(ROM,resources,rule,evts){ROM.logEventsToDW(rule,evts,resources["ARRAY_JASPER_ETL"].url);},"resetBrmResetSessionFlag":function(BRM){BRM.fireResetSessionOnStart=false;}};}
if(name==="schedules"){return{};}
if(name==="rules"){return[Rule.create({id:5,name:"Sale Setter Rule",vars:[],tt1:function(rule){return[{id:"onManualInvocation"}]},cc2:function(rule,evt){return(false);},af3:function(rule,evt){log("Won't happen");},active:true}),Rule.create({id:600,name:"Sale Page Triggering Rule",vars:[],tt1:function(rule){return[{id:"onPageLanding"}]},cc2:function(rule,evt){return(((e9(function(){return s7("inqSalesProducts");},false,true))&&(e9(function(){return s7("inqSalesQuantities");},false,true)))||((!(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)))&&(e9(function(){return window.parent.inqSalesProducts;},false,true))&&(e9(function(){return window.parent.inqSalesQuantities;},false,true))));},af3:function(rule,evt){PM.getVar("saleLC",rule).z3((PM.getVar("saleLC",rule).getValueOrDefault()+1));EVM.fireCustomEvent('SaleLanding',rule,evt,function(){return{};});},active:true}),Rule.create({id:10,name:"Incrementality Attribute Setter Stub Rule - DEPRECATED",vars:[],tt1:function(rule){return[{id:"onPageLanding"}]},cc2:function(rule,evt){return(false);},af3:function(rule,evt){log("DEPRECATED Rule#10");},active:true}),Rule.create({id:400,name:"MobileSuppression",vars:[],tt1:function(rule){return[{id:"onPageLanding"}]},cc2:function(rule,evt){return((d8t("Unsupported"))||(d8t("Phone"))||(d8t("Tablet")));},af3:function(rule,evt){Inq.blockServices(["ALL"],0);},active:true}),Rule.create({id:401,name:"We need this rule to reserve id to use it for business rule for CEAPI-Post-Chat-Survey",vars:[],tt1:function(rule){return[{id:"onPageLanding"}]},cc2:function(rule,evt){return(false);},af3:function(rule,evt){log("Mock Rule 401");},active:true}),Rule.create({id:404,name:"ChromeOnIphoneSuppression",vars:[],tt1:function(rule){return[{id:"onPageLanding"}]},cc2:function(rule,evt){return(false);},af3:function(rule,evt){Inq.blockServices(["ALL"],0);},active:true}),Rule.create({id:405,name:"iOS6orLessSuppression",vars:[],tt1:function(rule){return[{id:"onPageLanding"}]},cc2:function(rule,evt){return((new Boolean(FM.ex8(function(){var uaString=navigator.userAgent;return(/(iPhone|iPod|iPad)/i.test(uaString)&&/OS [1-6]_(.*) like Mac OS X/i.test(uaString));})).valueOf()));},af3:function(rule,evt){Inq.blockServices(["ALL"],0);},active:true}),Rule.create({id:407,name:"iOS-7-Suppression",vars:[],tt1:function(rule){return[{id:"onPageLanding"}]},cc2:function(rule,evt){return(false);},af3:function(rule,evt){log("Mock Rule 407 - iOS-7-Suppression");},active:true}),Rule.create({id:408,name:"iOS-8-Suppression",vars:[],tt1:function(rule){return[{id:"onPageLanding"}]},cc2:function(rule,evt){return(false);},af3:function(rule,evt){log("Mock Rule 408 - iOS-8-Suppression");},active:true}),Rule.create({id:409,name:"iOS-9-Suppression",vars:[],tt1:function(rule){return[{id:"onPageLanding"}]},cc2:function(rule,evt){return(false);},af3:function(rule,evt){log("Mock Rule 409 - iOS-9-Suppression");},active:true}),Rule.create({id:410,name:"iOS-10-Suppression",vars:[],tt1:function(rule){return[{id:"onPageLanding"}]},cc2:function(rule,evt){return(false);},af3:function(rule,evt){log("Mock Rule 410 - iOS-10-Suppression");},active:true}),Rule.create({id:411,name:"WindowsPhone-Suppression",vars:[],tt1:function(rule){return[{id:"onPageLanding"}]},cc2:function(rule,evt){return((new Boolean(s7("/Windows Phone/i.test(navigator.userAgent)")).valueOf()));},af3:function(rule,evt){Inq.blockServices(["ALL"],0);},active:true}),Rule.create({id:412,name:"iOS-10-Chrome-Suppression",vars:[],tt1:function(rule){return[{id:"onPageLanding"}]},cc2:function(rule,evt){return(false);},af3:function(rule,evt){log("Mock Rule 412 - iOS-10-Chrome-Suppression");},active:true}),Rule.create({id:420,name:"iOS-11-Suppression",vars:[],tt1:function(rule){return[{id:"onPageLanding"}]},cc2:function(rule,evt){return(false);},af3:function(rule,evt){log("Mock Rule 420 - iOS-11-Suppression");},active:true}),Rule.create({id:421,name:"iOS-12-Suppression",vars:[],tt1:function(rule){return[{id:"onPageLanding"}]},cc2:function(rule,evt){return(false);},af3:function(rule,evt){log("Mock Rule 421 - iOS-12-Suppression");},active:true}),Rule.create({id:422,name:"iOS-13-Suppression",vars:[],tt1:function(rule){return[{id:"onPageLanding"}]},cc2:function(rule,evt){return(false);},af3:function(rule,evt){log("Mock Rule 422 - iOS-13-Suppression");},active:true}),Rule.create({id:423,name:"iOS-14-Suppression",vars:[],tt1:function(rule){return[{id:"onPageLanding"}]},cc2:function(rule,evt){return(false);},af3:function(rule,evt){log("Mock Rule 423 - iOS-14-Suppression");},active:true}),Rule.create({id:500,name:"Session Manager- Reset Session Rule",vars:[],tt1:function(rule){return[{id:"onPageLanding"},{id:"onCustomerMsg"},{id:"onAgentMsg"},{id:"onQueueWaitMsg"}]},cc2:function(rule,evt){return(true);},af3:function(rule,evt){if((PM.getVar("loyalty",rule).getValueOrDefault()==0)||(e9(function(){return BRM.fireResetSessionOnStart;},false,true))){PM.getVar("loyalty",rule).z3(1.0);PM.getVar("sesID",rule).z3(Inq.getCustID()+(e9(PM.getVar("loyalty",rule).getValueOrDefault())?PM.getVar("loyalty",rule).getValueOrDefault().toString():""));PM.getVar("fst",rule).z3(new Date());PM.getVar("lst",rule).z3(PM.getVar("fst",rule).getValueOrDefault());FM.ex8(FM.getFcn("resetBrmResetSessionFlag"),BRM);EVM.fireCustomEvent('NewSession',rule,evt,function(){return{};});}else if((!(CHM.isServiceInProgress("ANY")))&&((!(e9(function(){return PM.getVar("ltt",rule).getValueOrDefault();},false,true)))||(new Date().after(Date.roll(PM.getVar("ltt",rule).getValueOrDefault(),gc7("SESSION_EXPIRE_TIME",rule)))))){PM.getVar("loyalty",rule).z3((PM.getVar("loyalty",rule).getValueOrDefault()+1));PM.reset("session");PM.reset("surveyShown");PM.getVar("sesID",rule).z3(Inq.getCustID()+(e9(PM.getVar("loyalty",rule).getValueOrDefault())?PM.getVar("loyalty",rule).getValueOrDefault().toString():""));PM.getVar("lst",rule).z3(new Date());EVM.fireCustomEvent('NewSession',rule,evt,function(){return{};});}
PM.getVar("ltt",rule).z3(new Date());PM.getVar("incStart",rule).z3(new Date());},active:true}),Rule.create({id:501,name:"Reset Session Rule",vars:[],tt1:function(rule){return[{id:"onResetSession"}]},cc2:function(rule,evt){return(true);},af3:function(rule,evt){PM.getVar("loyalty",rule).z3(1.0);PM.getVar("sesID",rule).z3(Inq.getCustID()+(e9(PM.getVar("loyalty",rule).getValueOrDefault())?PM.getVar("loyalty",rule).getValueOrDefault().toString():""));PM.getVar("fst",rule).z3(new Date());PM.getVar("lst",rule).z3(PM.getVar("fst",rule).getValueOrDefault());EVM.fireCustomEvent('NewSession',rule,evt,function(){return{};});PM.getVar("ltt",rule).z3(new Date());PM.getVar("incStart",rule).z3(new Date());},active:true}),Rule.create({id:550,name:"Chat Count Rule",vars:[],tt1:function(rule){return[{id:"onChatLaunched",serviceType:"C2C"},{id:"onChatLaunched",serviceType:"C2CALL"},{id:"onChatLaunched",serviceType:"POPUP"},{id:"onChatLaunched",serviceType:"POPUP_CALL"},{id:"onChatLaunched",serviceType:"PERSISTENT"},{id:"onChatLaunched",serviceType:"EXTERNAL_CHAT"},{id:"onChatLaunched",serviceType:"EXTERNAL_POPUP_CHAT"}]},cc2:function(rule,evt){return(true);},af3:function(rule,evt){PM.getVar("chatCnt",rule).z3((PM.getVar("chatCnt",rule).getValueOrDefault()+1));},active:true}),Rule.create({id:551,name:"Sale Qualification Count Rule",vars:[],tt1:function(rule){return[{id:"on"+"Assisted"}]},cc2:function(rule,evt){return(true);},af3:function(rule,evt){PM.getVar("salesQualificationCount",rule).z3((PM.getVar("salesQualificationCount",rule).getValueOrDefault()+1));},active:true}),Rule.create({id:553,name:"DEPRECATED Clientside listeners backward compatibility Rule",vars:[],tt1:function(rule){return[{id:"onPageLanding"}]},cc2:function(rule,evt){return(true);},af3:function(rule,evt){publishAPI("InqSaleMgr.getSaleID","assistChatID");},active:true}),Rule.create({id:555,name:"Referring Search Rule",vars:[],tt1:function(rule){return[{id:"on"+"NewSession"}]},cc2:function(rule,evt){return(true);},af3:function(rule,evt){PM.getVar("rd",rule).z3(URI.parseURI(doc.referrer).domain);if((typeof(URI.parseURI(doc.referrer).domain)==="string"?URI.parseURI(doc.referrer).domain.endsWith("google.com",true):false)||(typeof(URI.parseURI(doc.referrer).domain)==="string"?URI.parseURI(doc.referrer).domain.endsWith("ask.com",true):false)||(typeof(URI.parseURI(doc.referrer).domain)==="string"?URI.parseURI(doc.referrer).domain.endsWith("aol.com",true):false)||(typeof(URI.parseURI(doc.referrer).domain)==="string"?URI.parseURI(doc.referrer).domain.endsWith("bing.com",true):false)||(typeof(URI.parseURI(doc.referrer).domain)==="string"?URI.parseURI(doc.referrer).domain.endsWith("google.fr",true):false)||(typeof(URI.parseURI(doc.referrer).domain)==="string"?URI.parseURI(doc.referrer).domain.endsWith("google.de",true):false)||(typeof(URI.parseURI(doc.referrer).domain)==="string"?URI.parseURI(doc.referrer).domain.endsWith("google.co.uk",true):false)||(typeof(URI.parseURI(doc.referrer).domain)==="string"?URI.parseURI(doc.referrer).domain.endsWith("aol.fr",true):false)||(typeof(URI.parseURI(doc.referrer).domain)==="string"?URI.parseURI(doc.referrer).domain.endsWith("aol.de",true):false)||(typeof(URI.parseURI(doc.referrer).domain)==="string"?URI.parseURI(doc.referrer).domain.endsWith("aol.co.uk",true):false)){PM.getVar("sest",rule).z3(URI.parseURI(doc.referrer).qMap["q"]);}else if(typeof(URI.parseURI(doc.referrer).domain)==="string"?URI.parseURI(doc.referrer).domain.endsWith("yahoo.com",true):false){PM.getVar("sest",rule).z3(URI.parseURI(doc.referrer).qMap["p"]);}else{PM.getVar("sest",rule).z3("");}},active:true}),Rule.create({id:605,name:"Sale Reset Rule",vars:[],tt1:function(rule){return[{id:"onPageLanding"},{id:"on"+"SaleLanding"}]},cc2:function(rule,evt){return((!(CHM.isPersistentWindow()))&&(!(typeof(PM.getVar("saleState",rule).getValueOrDefault())==="string"?PM.getVar("saleState",rule).getValueOrDefault().equals(gc7("SALE_STATE_UNSOLD",rule),false):false))&&(((e9(function(){return PM.getVar("assistDT",rule).getValueOrDefault();},false,true))&&(new Date().after(Date.roll(PM.getVar("assistDT",rule).getValueOrDefault(),gc7("SALE_EXPIRATION",rule)))))||((e9(function(){return PM.getVar("soldDT",rule).getValueOrDefault();},false,true))&&(new Date(86400000).before(PM.getVar("soldDT",rule).getValueOrDefault()))&&(new Date().after(Date.roll(PM.getVar("soldDT",rule).getValueOrDefault(),gc7("SALE_EXPIRATION",rule)))))));},af3:function(rule,evt){Inq.doRuleActionList("saveAssistedVariablesActionList",rule,evt);PM.getVar("saleState",rule).z3(gc7("SALE_STATE_UNSOLD",rule));PM.getVar("assistDT",rule).z3(new Date(0));PM.getVar("soldDT",rule).z3(new Date(0));PM.getVar("assistAgt",rule).z3("");PM.getVar("assistChatID",rule).z3("-1");EVM.fireCustomEvent('SaleStateTransition',rule,evt,function(){return{};});},active:true}),Rule.create({id:829,name:"Log To Data Warehouse",vars:[],tt1:function(rule){return[{id:"on"+"LogToDW"}]},cc2:function(rule,evt){return(true);},af3:function(rule,evt){FM.ex8(FM.getFcn("sendLogEvtDataListToIJSFLoggingController"),ROM,resources,rule,evt);},active:true}),Rule.create({id:830,name:"ETLv2 Converted Rule",vars:[],tt1:function(rule){return[{id:"on"+"SaleLanding"}]},cc2:function(rule,evt){return(true);},af3:function(rule,evt){PM.getVar("incState",rule).z3(gc7("INC_STATE_CONVERTED",rule));try{ROM.send(resources["INC_EVENT_URL"].url,{"evt":pd1d(gc7("INC_STATE_CONVERTED",rule)),"siteID":pd1d(getSiteID()),"pageID":pd1d(LDM.getPageID(0,evt)),"customerID":pd1d(Inq.getCustID()),"incrementalityID":pd1d(asi4()),"sessionID":pd1d(getSessionID()),"group":pd1d(PM.getVar("incGroup",rule).getValueOrDefault()),"products":pd1d((e9(function(){return s7("inqSalesProducts");},false,true)?s7("inqSalesProducts"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesProducts;},false,true)?window.parent.inqSalesProducts:null)))),"quantities":pd1d((e9(function(){return s7("inqSalesQuantities");},false,true)?s7("inqSalesQuantities"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesQuantities;},false,true)?window.parent.inqSalesQuantities:null)))),"prices":pd1d((e9(function(){return s7("inqSalesPrices");},false,true)?s7("inqSalesPrices"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesPrices;},false,true)?window.parent.inqSalesPrices:null)))),"productTypes":pd1d((e9(function(){return s7("inqSalesProductTypes");},false,true)?s7("inqSalesProductTypes"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesProductTypes;},false,true)?window.parent.inqSalesProductTypes:null)))),"products2":pd1d((e9(function(){return s7("inqSalesProducts2");},false,true)?s7("inqSalesProducts2"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesProducts2;},false,true)?window.parent.inqSalesProducts2:null)))),"quantities2":pd1d((e9(function(){return s7("inqSalesQuantities2");},false,true)?s7("inqSalesQuantities2"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesQuantities2;},false,true)?window.parent.inqSalesQuantities2:null)))),"prices2":pd1d((e9(function(){return s7("inqSalesPrices2");},false,true)?s7("inqSalesPrices2"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesPrices2;},false,true)?window.parent.inqSalesPrices2:null)))),"productTypes2":pd1d((e9(function(){return s7("inqSalesProductTypes2");},false,true)?s7("inqSalesProductTypes2"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesProductTypes2;},false,true)?window.parent.inqSalesProductTypes2:null)))),"orderType":pd1d((e9(function(){return s7("inqOrderType");},false,true)?s7("inqOrderType"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqOrderType;},false,true)?window.parent.inqOrderType:null)))),"customerName":pd1d((e9(function(){return s7("inqCustomerName");},false,true)?s7("inqCustomerName"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqCustomerName;},false,true)?window.parent.inqCustomerName:null)))),"orderID":pd1d((e9(function(){return s7("inqClientOrderNum");},false,true)?s7("inqClientOrderNum"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqClientOrderNum;},false,true)?window.parent.inqClientOrderNum:null)))),"testOrder":pd1d((e9(function(){return s7("inqTestOrder");},false,true)?s7("inqTestOrder"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqTestOrder;},false,true)?window.parent.inqTestOrder:null)))),"otherInfo":pd1d((e9(function(){return s7("inqOtherInfo");},false,true)?s7("inqOtherInfo"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqOtherInfo;},false,true)?window.parent.inqOtherInfo:null)))),"clientTimestamp":pd1d((e9(function(){return s7("inqClientTimeStamp");},false,true)?s7("inqClientTimeStamp"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqClientTimeStamp;},false,true)?window.parent.inqClientTimeStamp:null)))),"businessUnitID":pd1d((e9(function(){return CHM.getLastChat();},false,true)?CHM.getLastChat().businessUnitID:CHM.getBusinessUnitID(evt,rule))),"visitorAttributes":pd1d((e9(VAM.getCopyAsArray(true).join(";"))?VAM.getCopyAsArray(true).join(";").toString():""))},true,true,null,null);}catch(e){lmt12("Error occurred when trying to send data to TagServer "+cf21(e),LOG_LEVELS.ERROR);}
EVM.fireCustomEvent('ConvertedEvent',rule,evt,function(){return{businessUnitID:(e9(function(){return CHM.getLastChat();},false,true)?CHM.getLastChat().businessUnitID:CHM.getBusinessUnitID(evt,rule))};});},active:true}),Rule.create({id:610,name:"Sale Page Landing Data Pass",vars:[],tt1:function(rule){return[{id:"on"+"SaleLanding"}]},cc2:function(rule,evt){return(true);},af3:function(rule,evt){try{ROM.send(resources["SALE_LANDING_CONTROLLER"].url,{"siteID":pd1d(getSiteID()),"agentID":pd1d(CHM.getAgentID()),"chatID":pd1d(PM.getVar("assistChatID",rule).getValueOrDefault()),"customerID":pd1d(Inq.getCustID()),"initialCustomerID":pd1d(CONVM.getInitialCustomerID()),"conversationID":pd1d(CONVM.getConversationID()),"pageID":pd1d(LDM.getPageID(null,evt)),"buID":pd1d((e9(function(){return CHM.getLastChat();},false,true)?CHM.getLastChat().businessUnitID:CHM.getBusinessUnitID(evt,rule))),"incAssignmentID":pd1d((e9(function(){return asi4();},false,true)?asi4():null)),"agentGroupID":pd1d(CHM.getAgentGroupID(evt,false)),"orderType":pd1d((e9(function(){return s7("inqOrderType");},false,true)?s7("inqOrderType"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqOrderType;},false,true)?window.parent.inqOrderType:null)))),"incGroup":pd1d((e9(function(){return PM.getVar("incGroup",rule).getValueOrDefault();},false,true)?PM.getVar("incGroup",rule).getValueOrDefault():null)),"sessionID":pd1d((e9(function(){return getSessionID();},false,true)?getSessionID():null)),"vAtts":pd1d((e9(function(){return VAM.getCopyAsArray(false).join(";");},false,true)?VAM.getCopyAsArray(true).join(";"):null)),"products":pd1d((e9(function(){return s7("inqSalesProducts");},false,true)?s7("inqSalesProducts"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesProducts;},false,true)?window.parent.inqSalesProducts:null)))),"quantities":pd1d((e9(function(){return s7("inqSalesQuantities");},false,true)?s7("inqSalesQuantities"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesQuantities;},false,true)?window.parent.inqSalesQuantities:null)))),"prices":pd1d((e9(function(){return s7("inqSalesPrices");},false,true)?s7("inqSalesPrices"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesPrices;},false,true)?window.parent.inqSalesPrices:null)))),"productTypes":pd1d((e9(function(){return s7("inqSalesProductTypes");},false,true)?s7("inqSalesProductTypes"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesProductTypes;},false,true)?window.parent.inqSalesProductTypes:null)))),"products2":pd1d((e9(function(){return s7("inqSalesProducts2");},false,true)?s7("inqSalesProducts2"):null)),"quantities2":pd1d((e9(function(){return s7("inqSalesQuantities2");},false,true)?s7("inqSalesQuantities2"):null)),"prices2":pd1d((e9(function(){return s7("inqSalesPrices2");},false,true)?s7("inqSalesPrices2"):null)),"productTypes2":pd1d((e9(function(){return s7("inqSalesProductTypes2");},false,true)?s7("inqSalesProductTypes2"):null)),"orderType":pd1d((e9(function(){return s7("inqOrderType");},false,true)?s7("inqOrderType"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqOrderType;},false,true)?window.parent.inqOrderType:null)))),"customerName":pd1d((e9(function(){return s7("inqCustomerName");},false,true)?s7("inqCustomerName"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqCustomerName;},false,true)?window.parent.inqCustomerName:null)))),"clientOrderNum":pd1d((e9(function(){return s7("inqClientOrderNum");},false,true)?s7("inqClientOrderNum"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqClientOrderNum;},false,true)?window.parent.inqClientOrderNum:null)))),"testOrder":pd1d((e9(function(){return s7("inqTestOrder");},false,true)?s7("inqTestOrder"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqTestOrder;},false,true)?window.parent.inqTestOrder:null)))),"otherInfo":pd1d((e9(function(){return s7("inqOtherInfo");},false,true)?s7("inqOtherInfo"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqOtherInfo;},false,true)?window.parent.inqOtherInfo:null)))),"clientTimestamp":pd1d((e9(function(){return s7("inqClientTimeStamp");},false,true)?s7("inqClientTimeStamp"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqClientTimeStamp;},false,true)?window.parent.inqClientTimeStamp:null))))},true,false,null,null);}catch(e){lmt12("Error occurred when trying to send data to TagServer "+cf21(e),LOG_LEVELS.ERROR);}
PM.getVar("saleValue",rule).z3(parseFloat(FM.ex8("saleValue")));log("***************** SALE LANDING *****************");},active:true}),Rule.create({id:620,name:"Fire AssistedEvent Rule - by Message Count",vars:[],tt1:function(rule){return[{id:"onAgentMsg"},{id:"onCustomerMsg"}]},cc2:function(rule,evt){return((e9(function(){return evt.agtMsgCnt;},false,true))&&(e9(function(){return evt.custMsgCnt;},false,true))&&(parseFloat(evt.agtMsgCnt)>=gc7("ASSISTED_AGENT_CHAT_COUNT",rule))&&(parseFloat(evt.custMsgCnt)>=gc7("ASSISTED_CUSTOMER_CHAT_COUNT",rule)));},af3:function(rule,evt){log("******** ASSISTED by message exchange **********");PM.getVar("assistedType",rule).z3(gc7("MESSAGE_COUNT_ASSISTED",rule));EVM.fireCustomEvent('AssistedEvent',rule,evt,function(){return{businessUnitID:CHM.getBusinessUnitID(evt,rule)};});},active:true}),Rule.create({id:621,name:"Fire AssistedEvent Rule - by Persistent Push",vars:[],tt1:function(rule){return[{id:"onPersistentPush"}]},cc2:function(rule,evt){return(!((CHM.isServiceInProgress("C2CALL"))||(CHM.isServiceInProgress("POPUP_CALL"))||((CHM.isServiceInProgress("C2C"))&&(isC2PActive(false)))));},af3:function(rule,evt){log("******** ASSISTED by Persistent Push **********");PM.getVar("assistedType",rule).z3(gc7("PERSISTENT_ASSISTED",rule));EVM.fireCustomEvent('AssistedEvent',rule,evt,function(){return{businessUnitID:CHM.getBusinessUnitID(evt,rule)};});},active:true}),Rule.create({id:622,name:"Assisted Rule",vars:[],tt1:function(rule){return[{id:"on"+"AssistedEvent"}]},cc2:function(rule,evt){return(true);},af3:function(rule,evt){Inq.doRuleActionList("setAssistedStateActionList",rule,evt);},active:true}),Rule.create({id:624,name:"Send Assisted Event on Agent Assigned",vars:[],tt1:function(rule){return[{id:"onAgentAssigned"}]},cc2:function(rule,evt){return((CHM.isPersistentWindow())&&((CHM.isServiceInProgress("C2CALL"))||(CHM.isServiceInProgress("POPUP_CALL"))||((CHM.isServiceInProgress("C2C"))&&(isC2PActive(false)))));},af3:function(rule,evt){EVM.fireCustomEvent('AssistedEvent',rule,evt,function(){return{businessUnitID:CHM.getBusinessUnitID(evt,rule)};});},active:true}),Rule.create({id:625,name:"Sale Conversion Rule",vars:[],tt1:function(rule){return[{id:"on"+"SaleLanding"}]},cc2:function(rule,evt){return(!(typeof(PM.getVar("saleState",rule).getValueOrDefault())==="string"?PM.getVar("saleState",rule).getValueOrDefault().equals(gc7("SALE_STATE_UNSOLD",rule),false):false));},af3:function(rule,evt){CRMT.create({doCallbackActions:function(data){if((new Boolean(data.success).valueOf())){Inq.doRuleActionList("saveAssistedVariablesActionList",rule,evt);PM.getVar("saleState",rule).z3(gc7("SALE_STATE_CONVERTED",rule));PM.getVar("saleID",rule).z3((e9(data.saleID)?data.saleID.toString():""));PM.getVar("soldDT",rule).z3(new Date());EVM.fireCustomEvent('SaleStateTransition',rule,evt,function(){return{};});EVM.fireCustomEvent('Converted',rule,evt,function(){return{};});}}}).callRemote(resources["SET_SALE_CONTROLLER"].url,{"agentID":pd1d(PM.getVar("assistAgt",rule).getValueOrDefault()),"chatID":pd1d(PM.getVar("assistChatID",rule).getValueOrDefault()),"customerID":pd1d(Inq.getCustID()),"products":pd1d((e9(function(){return s7("inqSalesProducts");},false,true)?s7("inqSalesProducts"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesProducts;},false,true)?window.parent.inqSalesProducts:null)))),"quantities":pd1d((e9(function(){return s7("inqSalesQuantities");},false,true)?s7("inqSalesQuantities"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesQuantities;},false,true)?window.parent.inqSalesQuantities:null)))),"prices":pd1d((e9(function(){return s7("inqSalesPrices");},false,true)?s7("inqSalesPrices"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesPrices;},false,true)?window.parent.inqSalesPrices:null)))),"productTypes":pd1d((e9(function(){return s7("inqSalesProductTypes");},false,true)?s7("inqSalesProductTypes"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesProductTypes;},false,true)?window.parent.inqSalesProductTypes:null)))),"products2":pd1d((e9(function(){return s7("inqSalesProducts2");},false,true)?s7("inqSalesProducts2"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesProducts2;},false,true)?window.parent.inqSalesProducts2:null)))),"quantities2":pd1d((e9(function(){return s7("inqSalesQuantities2");},false,true)?s7("inqSalesQuantities2"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesQuantities2;},false,true)?window.parent.inqSalesQuantities2:null)))),"prices2":pd1d((e9(function(){return s7("inqSalesPrices2");},false,true)?s7("inqSalesPrices2"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesPrices2;},false,true)?window.parent.inqSalesPrices2:null)))),"productTypes2":pd1d((e9(function(){return s7("inqSalesProductTypes2");},false,true)?s7("inqSalesProductTypes2"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqSalesProductTypes2;},false,true)?window.parent.inqSalesProductTypes2:null)))),"orderType":pd1d((e9(function(){return s7("inqOrderType");},false,true)?s7("inqOrderType"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqOrderType;},false,true)?window.parent.inqOrderType:null)))),"customerName":pd1d((e9(function(){return s7("inqCustomerName");},false,true)?s7("inqCustomerName"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqCustomerName;},false,true)?window.parent.inqCustomerName:null)))),"clientOrderNum":pd1d((e9(function(){return s7("inqClientOrderNum");},false,true)?s7("inqClientOrderNum"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqClientOrderNum;},false,true)?window.parent.inqClientOrderNum:null)))),"testOrder":pd1d((e9(function(){return s7("inqTestOrder");},false,true)?s7("inqTestOrder"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqTestOrder;},false,true)?window.parent.inqTestOrder:null)))),"otherInfo":pd1d((e9(function(){return s7("inqOtherInfo");},false,true)?s7("inqOtherInfo"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqOtherInfo;},false,true)?window.parent.inqOtherInfo:null)))),"clientTimestamp":pd1d((e9(function(){return s7("inqClientTimeStamp");},false,true)?s7("inqClientTimeStamp"):(e9(function(){return s7("window.v3Lander.isWebSDK");},false,true)?null:(e9(function(){return window.parent.inqClientTimeStamp;},false,true)?window.parent.inqClientTimeStamp:null)))),"siteID":pd1d(getSiteID())});},active:true}),Rule.create({id:635,name:"Save Last n Sales",vars:[],tt1:function(rule){return[{id:"on"+"Converted"}]},cc2:function(rule,evt){return(true);},af3:function(rule,evt){PM.getVar("nSalesID",rule).prepend([PM.getVar("saleID",rule).getValueOrDefault()]);},active:true}),Rule.create({id:700,name:"Page Landing Data Pass",vars:[{name:"url_700",defVal:null,rId:"tmpVars",shName:"url",fnCast:function(o){return o?o.toString():o;},fnSer:null,maxSize:200,type:"String"}],tt1:function(rule){return[{id:"onPageLanding"}]},cc2:function(rule,evt){return((CHM.isServiceInProgress("ANY"))&&((e9(function(){return s7("window.v3Lander.isWebSDK");},false,true))||(!(typeof("_inqPersistentChat")==="string"?"_inqPersistentChat".equals(top.name,false):false))));},af3:function(rule,evt){if(gc7("REMOVE_QUERY_STRING_FROM_TRACKING_URL",rule)){PM.getVar("url",rule).z3(LDM.getCurrentPageURL().replace(/\?.*/g,""));}else{PM.getVar("url",rule).z3(LDM.getCurrentPageURL());}
ROM.sendDataToAgent(CHM.getAgentID(),MI8.mixMutatable(MI8.mixAbsorber(MI8.unmixMutatable(MI8.mixMutatable().set("URL",PM.getVar("url",rule).getValueOrDefault()).set("markerID",LDM.getPageMarker(null,evt)).set("siteID",getSiteID()))).absorb(s7('inqData'))).set("agentID",CHM.getAgentID()).set("engagementID",CHM.getChatID()));},active:true}),Rule.create({id:710,name:"Agent Assigned Tracking",vars:[{name:"url_710",defVal:null,rId:"tmpVars",shName:"url",fnCast:function(o){return o?o.toString():o;},fnSer:null,maxSize:200,type:"String"}],tt1:function(rule){return[{id:"onAgentAssigned"}]},cc2:function(rule,evt){return((CHM.isServiceInProgress("ANY"))&&((e9(function(){return s7("window.v3Lander.isWebSDK");},false,true))||(!(typeof("_inqPersistentChat")==="string"?"_inqPersistentChat".equals(top.name,false):false))));},af3:function(rule,evt){if(gc7("REMOVE_QUERY_STRING_FROM_TRACKING_URL",rule)){PM.getVar("url",rule).z3(LDM.getCurrentPageURL().replace(/\?.*/g,""));}else{PM.getVar("url",rule).z3(LDM.getCurrentPageURL());}
ROM.sendDataToAgent(CHM.getAgentID(),{"URL":pd1d(PM.getVar("url",rule).getValueOrDefault()),"markerID":pd1d(LDM.getPageMarker(null,evt)),"siteID":pd1d(getSiteID()),agentID:CHM.getAgentID(),engagementID:CHM.getChatID()});},active:true}),Rule.create({id:799,name:"Reset incGroup",vars:[],tt1:function(rule){return[{id:"on"+"NewSession"}]},cc2:function(rule,evt){return((!(e9(function(){return PM.getVar("incStart",rule).getValueOrDefault();},false,true)))||(new Date().after(Date.roll(PM.getVar("incStart",rule).getValueOrDefault(),gc7("INC_GROUP_DURATION",rule)))));},af3:function(rule,evt){PM.getVar("incStart",rule).z3(new Date());PM.getVar("incID",rule).z3(getSessionID());if((!(PM.getVar("incExempt",rule).getValueOrDefault()))&&(rand(1,100,true)<=gc7("INC_CONTROL_PERCENT",rule))){PM.getVar("incGroup",rule).z3(gc7("INC_GROUP_CONTROL",rule));}else{PM.getVar("incGroup",rule).z3(gc7("INC_GROUP_CHAT",rule));}
PM.getVar("incState",rule).z3(gc7("INC_STATE_ELIGIBLE",rule));},active:true}),Rule.create({id:800,name:"Eligible Rule",vars:[],tt1:function(rule){return[{id:"on"+"NewSession"}]},cc2:function(rule,evt){return(true);},af3:function(rule,evt){EVM.fireCustomEvent('EligibleEvent',rule,evt,function(){return{};});try{ROM.send(resources["INC_EVENT_URL"].url,{"evt":pd1d(gc7("INC_STATE_ELIGIBLE",rule)),"siteID":pd1d(getSiteID()),"pageID":pd1d(LDM.getPageID(0,evt)),"customerID":pd1d(Inq.getCustID()),"incrementalityID":pd1d(asi4()),"sessionID":pd1d(getSessionID()),"group":pd1d(PM.getVar("incGroup",rule).getValueOrDefault()),"businessUnitID":pd1d(CHM.getBusinessUnitID(evt,rule)),"initialCustomerID":pd1d(CONVM.getInitialCustomerID()),"conversationID":pd1d(CONVM.getConversationID()),"browserType":pd1d(getClientBrowserType()),"browserVersion":pd1d(cbtv1()),"countryCode":pd1d(((getCustGeoData())?(getCustGeoData().country_code):"")),"regionCode":pd1d(((getCustGeoData())?(getCustGeoData().region_code):"")),"operatingSystemType":pd1d(getOSType()),"codeVersion":pd1d(v3Lander.codeVersion),"visitorAttributes":pd1d((e9(VAM.getCopyAsArray(true).join(";"))?VAM.getCopyAsArray(true).join(";").toString():"")),"externalCustomerIDs":pd1d(VAM.getExternalCustomerIdVisitorAttributesAsString())},true,false,null,null);}catch(e){lmt12("Error occurred when trying to send data to TagServer "+cf21(e),LOG_LEVELS.ERROR);}},active:true}),Rule.create({id:802,name:"Set G3R3 Actionable Flag",vars:[],tt1:function(rule){return[{id:"onPageLanding"}]},cc2:function(rule,evt){return((e9(function(){return PM.getVar("incGroup",rule).getValueOrDefault();},false,true))&&(typeof(gc7("INC_GROUP_CONTROL",rule))==="string"?gc7("INC_GROUP_CONTROL",rule).equals(PM.getVar("incGroup",rule).getValueOrDefault(),true):false));},af3:function(rule,evt){BRM.setActionable(false);},active:true}),Rule.create({id:805,name:"Targeted Rule",vars:[],tt1:function(rule){return[{id:"onRuleSatisfied"}]},cc2:function(rule,evt){return(!(CHM.isServiceInProgress("ANY")));},af3:function(rule,evt){EVM.fireCustomEvent('TargetedEvent',rule,evt,function(){return{brID:evt.rule.id,businessUnitID:CHM.getBusinessUnitID(evt,rule)};});try{ROM.send(resources["INC_EVENT_URL"].url,{"evt":pd1d(gc7("INC_STATE_TARGETED",rule)),"siteID":pd1d(getSiteID()),"pageID":pd1d(LDM.getPageID(0,evt)),"customerID":pd1d(Inq.getCustID()),"incrementalityID":pd1d(asi4()),"sessionID":pd1d(getSessionID()),"group":pd1d(PM.getVar("incGroup",rule).getValueOrDefault()),"brID":pd1d(CHM.getChat()?CHM.getChat().getRuleId():(evt.rule?evt.rule.id:rule.getID())),"businessUnitID":pd1d(CHM.getBusinessUnitID(evt,rule)),"initialCustomerID":pd1d(CONVM.getInitialCustomerID()),"conversationID":pd1d(CONVM.getConversationID()),"targetAgentAttributes":pd1d(firstExisting('getAgentAttributesAsString',CHM.getChat(),evt&&evt.rule,rule)),"brAttributes":pd1d(firstExisting('ra1t',CHM.getChat(),evt&&evt.rule,rule)||""),"funnelLevel":pd1d(evt.rule.getFunnelLevel()),"visitorAttributes":pd1d((e9(VAM.getCopyAsArray(true).join(";"))?VAM.getCopyAsArray(true).join(";").toString():"")),"agentGroupID":pd1d(CHM.getAgentGroupID(evt,false)),"queueThreshold":pd1d(evt.rule.q6t())},true,false,null,null);}catch(e){lmt12("Error occurred when trying to send data to TagServer "+cf21(e),LOG_LEVELS.ERROR);}},active:true}),Rule.create({id:807,name:"Exposure Qualified Rule",vars:[],tt1:function(rule){return[{id:"onExposureQualified"}]},cc2:function(rule,evt){return(!(CHM.isServiceInProgress("ANY")));},af3:function(rule,evt){try{ROM.send(resources["INC_EVENT_URL"].url,{"evt":pd1d(gc7("INC_STATE_EXPOSURE_QUALIFIED",rule)),"siteID":pd1d(getSiteID()),"pageID":pd1d(LDM.getPageID(null,evt)),"customerID":pd1d(Inq.getCustID()),"incrementalityID":pd1d(asi4()),"sessionID":pd1d(getSessionID()),"businessUnitID":pd1d(CHM.getBusinessUnitID(evt,rule)),"initialCustomerID":pd1d(CONVM.getInitialCustomerID()),"conversationID":pd1d(CONVM.getConversationID()),"group":pd1d(PM.getVar("incGroup",rule).getValueOrDefault()),"brID":pd1d(CHM.getChat()?CHM.getChat().getRuleId():(evt.rule?evt.rule.id:rule.getID())),"result":pd1d(evt.result),"targetAgentAttributes":pd1d(firstExisting('getAgentAttributesAsString',CHM.getChat(),evt&&evt.rule,rule)),"brAttributes":pd1d(firstExisting('ra1t',CHM.getChat(),evt&&evt.rule,rule)||""),"funnelLevel":pd1d(evt.rule.getFunnelLevel()),"visitorAttributes":pd1d((e9(VAM.getCopyAsArray(true).join(";"))?VAM.getCopyAsArray(true).join(";").toString():"")),"agentGroupID":pd1d(CHM.getAgentGroupID(evt,false)),"queueThreshold":pd1d(evt.rule.q6t())},true,false,null,null);}catch(e){lmt12("Error occurred when trying to send data to TagServer "+cf21(e),LOG_LEVELS.ERROR);}},active:true}),Rule.create({id:810,name:"Exposed Rule",vars:[],tt1:function(rule){return[{id:"onServiceInvitation"}]},cc2:function(rule,evt){return(true);},af3:function(rule,evt){EVM.fireCustomEvent('ExposedEvent',rule,evt,function(){return{businessUnitID:CHM.getBusinessUnitID(evt,rule)};});try{ROM.send(resources["INC_EVENT_URL"].url,{"evt":pd1d(gc7("INC_STATE_EXPOSED",rule)),"siteID":pd1d(getSiteID()),"pageID":pd1d(LDM.getPageID(0,evt)),"customerID":pd1d(Inq.getCustID()),"incrementalityID":pd1d(asi4()),"sessionID":pd1d(getSessionID()),"brID":pd1d(CHM.getChat()?CHM.getChat().getRuleId():(evt.rule?evt.rule.id:rule.getID())),"chatID":pd1d(CHM.getChatID()),"businessUnitID":pd1d(CHM.getBusinessUnitID(evt,rule)),"agentGroupID":pd1d(CHM.getAgentGroupID(evt,false)),"initialCustomerID":pd1d(CONVM.getInitialCustomerID()),"conversationID":pd1d(CONVM.getConversationID()),"targetAgentAttributes":pd1d(firstExisting('getAgentAttributesAsString',CHM.getChat(),evt&&evt.rule,rule)),"brAttributes":pd1d(firstExisting('ra1t',CHM.getChat(),evt&&evt.rule,rule)||""),"visitorAttributes":pd1d((e9(VAM.getCopyAsArray(true).join(";"))?VAM.getCopyAsArray(true).join(";").toString():"")),"queueThreshold":pd1d(evt.rule.q6t())},true,false,null,null);}catch(e){lmt12("Error occurred when trying to send data to TagServer "+cf21(e),LOG_LEVELS.ERROR);}},active:true}),Rule.create({id:811,name:"engagement.windowDisplayed rule",vars:[],tt1:function(rule){return[{id:"onChatLaunched",serviceType:"C2C"},{id:"onChatLaunched",serviceType:"C2CALL"},{id:"onChatLaunched",serviceType:"POPUP"},{id:"onChatLaunched",serviceType:"POPUP_CALL"},{id:"onChatLaunched",serviceType:"PERSISTENT"},{id:"onChatLaunched",serviceType:"CONVERSIVE"},{id:"onChatLaunched",serviceType:"EXTERNAL_CHAT"},{id:"onChatLaunched",serviceType:"EXTERNAL_POPUP_CHAT"}]},cc2:function(rule,evt){return(true);},af3:function(rule,evt){try{ROM.send(resources["JASPER_ETL"].url,{"_domain":pd1d("engagement"),"evt":pd1d("windowDisplayed"),"customerID":pd1d(Inq.getCustID()),"siteID":pd1d(getSiteID()),"pageID":pd1d(LDM.getPageID(0,evt)),"pageURL":pd1d(LDM.getCurrentPageURL()),"sessionID":pd1d(getSessionID()),"incAssignmentID":pd1d(asi4()),"businessRuleID":pd1d(CHM.getChat()?CHM.getChat().getRuleId():(evt.rule?evt.rule.id:rule.getID())),"chatID":pd1d(CHM.getChatID()),"businessUnitID":pd1d(CHM.getBusinessUnitID(evt,rule)),"agentGroupID":pd1d(CHM.getAgentGroupID(evt,false)),"initialCustomerID":pd1d(CONVM.getInitialCustomerID()),"conversationID":pd1d(CONVM.getConversationID()),"inHOP":pd1d(evt.inHOP),"targetAgentAttributes":pd1d(firstExisting('getAgentAttributesAsString',CHM.getChat(),evt&&evt.rule,rule)),"brAttributes":pd1d(firstExisting('ra1t',CHM.getChat(),evt&&evt.rule,rule)||""),"visitorAttributes":pd1d((e9(VAM.getCopyAsArray(true).join(";"))?VAM.getCopyAsArray(true).join(";").toString():"")),"qt":pd1d(CHM.q6t())},false,false,null,null);}catch(e){lmt12("Error occurred when trying to send data to TagServer "+cf21(e),LOG_LEVELS.ERROR);}},active:true}),Rule.create({id:812,name:"engagement.persistentWindowDisplayed rule",vars:[],tt1:function(rule){return[{id:"onChatLaunched",serviceType:"PERSISTENT"},{id:"onPersistentPush"}]},cc2:function(rule,evt){return(true);},af3:function(rule,evt){try{ROM.send(resources["JASPER_ETL"].url,{"_domain":pd1d("engagement"),"evt":pd1d("persistentWindowDisplayed"),"customerID":pd1d(Inq.getCustID()),"siteID":pd1d(getSiteID()),"pageID":pd1d(LDM.getPageID(0,evt)),"sessionID":pd1d(getSessionID()),"incAssignmentID":pd1d(asi4()),"businessRuleID":pd1d(CHM.getChat()?CHM.getChat().getRuleId():(evt.rule?evt.rule.id:rule.getID())),"chatID":pd1d(CHM.getChatID()),"businessUnitID":pd1d(CHM.getBusinessUnitID(evt,rule)),"initialCustomerID":pd1d(CONVM.getInitialCustomerID()),"conversationID":pd1d(CONVM.getConversationID()),"inHOP":pd1d(evt.inHOP),"targetAgentAttributes":pd1d(firstExisting('getAgentAttributesAsString',CHM.getChat(),evt&&evt.rule,rule)),"brAttributes":pd1d(firstExisting('ra1t',CHM.getChat(),evt&&evt.rule,rule)||"")},false,true,20,5000);}catch(e){lmt12("Error occurred when trying to send data to TagServer "+cf21(e),LOG_LEVELS.ERROR);}},active:true}),Rule.create({id:814,name:"ServiceEngaged Rule",vars:[],tt1:function(rule){return[{id:"onServiceEngaged"}]},cc2:function(rule,evt){return(true);},af3:function(rule,evt){EVM.fireCustomEvent('EngagedEvent',rule,evt,function(){return{businessUnitID:CHM.getBusinessUnitID(evt,rule),rule:evt.rule};});},active:true}),Rule.create({id:813,name:"Move Inc State Through Funnel Rule",vars:[],tt1:function(rule){return[{id:"on"+"IncStateFunnelTransition"}]},cc2:function(rule,evt){return(true);},af3:function(rule,evt){if(parseFloat(PM.getVar("incStatesMap",rule).getValueOrDefault().get(PM.getVar("incState",rule).getValueOrDefault()))<parseFloat(PM.getVar("incStatesMap",rule).getValueOrDefault().get(evt.newState))){PM.getVar("incState",rule).z3((e9(evt.newState)?evt.newState.toString():""));}},active:true}),Rule.create({id:815,name:"Engaged Rule",vars:[],tt1:function(rule){return[{id:"on"+"EngagedEvent"}]},cc2:function(rule,evt){return(true);},af3:function(rule,evt){if(!(typeof(CHM.getChatID())==="string"?CHM.getChatID().equals(PM.getVar("engagedChatID",rule).getValueOrDefault(),false):false)){PM.getVar("engagedChatID",rule).z3(CHM.getChatID());EVM.fireCustomEvent('IncStateFunnelTransition',rule,evt,function(){return{newState:gc7("INC_STATE_ENGAGED",rule)};});try{ROM.send(resources["INC_EVENT_URL"].url,{"evt":pd1d(gc7("INC_STATE_ENGAGED",rule)),"siteID":pd1d(getSiteID()),"pageID":pd1d(LDM.getPageID(0,evt)),"customerID":pd1d(Inq.getCustID()),"incrementalityID":pd1d(asi4()),"sessionID":pd1d(getSessionID()),"brID":pd1d(CHM.getChat()?CHM.getChat().getRuleId():(evt.rule?evt.rule.id:rule.getID())),"chatID":pd1d(CHM.getChatID()),"businessUnitID":pd1d(CHM.getBusinessUnitID(evt,rule)),"agentGroupID":pd1d(CHM.getAgentGroupID(evt,false)),"initialCustomerID":pd1d(CONVM.getInitialCustomerID()),"conversationID":pd1d(CONVM.getConversationID()),"targetAgentAttributes":pd1d(firstExisting('getAgentAttributesAsString',CHM.getChat(),evt&&evt.rule,rule)),"brAttributes":pd1d(firstExisting('ra1t',CHM.getChat(),evt&&evt.rule,rule)||""),"visitorAttributes":pd1d((e9(VAM.getCopyAsArray(true).join(";"))?VAM.getCopyAsArray(true).join(";").toString():"")),"queueThreshold":pd1d(evt.rule.q6t())},true,false,null,null);}catch(e){lmt12("Error occurred when trying to send data to TagServer "+cf21(e),LOG_LEVELS.ERROR);}}},active:true}),Rule.create({id:820,name:"Fire Interacted Event Rule",vars:[],tt1:function(rule){return[{id:"onServiceInteracted"}]},cc2:function(rule,evt){return(true);},af3:function(rule,evt){EVM.fireCustomEvent('InteractedEvent',rule,evt,function(){return{businessUnitID:CHM.getBusinessUnitID(evt,rule)};});},active:true}),Rule.create({id:821,name:"Interacted Rule",vars:[],tt1:function(rule){return[{id:"on"+"InteractedEvent"}]},cc2:function(rule,evt){return(true);},af3:function(rule,evt){if(!(typeof(CHM.getChatID())==="string"?CHM.getChatID().equals(PM.getVar("interactedChatID",rule).getValueOrDefault(),false):false)){PM.getVar("interactedChatID",rule).z3(CHM.getChatID());EVM.fireCustomEvent('IncStateFunnelTransition',rule,evt,function(){return{newState:gc7("INC_STATE_INTERACTED",rule)};});PM.getVar("incExempt",rule).z3(true);try{ROM.send(resources["INC_EVENT_URL"].url,{"evt":pd1d(gc7("INC_STATE_INTERACTED",rule)),"siteID":pd1d(getSiteID()),"pageID":pd1d(LDM.getPageID(0,evt)),"customerID":pd1d(Inq.getCustID()),"incrementalityID":pd1d(asi4()),"sessionID":pd1d(getSessionID()),"brID":pd1d(CHM.getChat()?CHM.getChat().getRuleId():(evt.rule?evt.rule.id:rule.getID())),"chatID":pd1d(CHM.getChatID()),"businessUnitID":pd1d(CHM.getBusinessUnitID(evt,rule)),"agentGroupID":pd1d(CHM.getAgentGroupID(evt,true)),"initialCustomerID":pd1d(CONVM.getInitialCustomerID()),"conversationID":pd1d(CONVM.getConversationID()),"targetAgentAttributes":pd1d(firstExisting('getAgentAttributesAsString',CHM.getChat(),evt&&evt.rule,rule)),"brAttributes":pd1d(firstExisting('ra1t',CHM.getChat(),evt&&evt.rule,rule)||""),"type":pd1d(CHM.getConversionType())},true,false,null,null);}catch(e){lmt12("Error occurred when trying to send data to TagServer "+cf21(e),LOG_LEVELS.ERROR);}}},active:true}),Rule.create({id:850,name:"Set Service Missed Rule",vars:[],tt1:function(rule){return[{id:"onServiceMissed"}]},cc2:function(rule,evt){return(typeof((e9(evt.serviceType)?evt.serviceType.toString():""))==="string"?(e9(evt.serviceType)?evt.serviceType.toString():"").equals("POPUP",false):false);},af3:function(rule,evt){PM.getVar("svcMissed",rule).z3(parseFloat(evt.rule.id));},active:true}),Rule.create({id:855,name:"Clear Service Missed Rule and update lco",vars:[],tt1:function(rule){return[{id:"onServiceInvitation"}]},cc2:function(rule,evt){return(typeof("POPUP")==="string"?"POPUP".equals((e9(evt.serviceType)?evt.serviceType.toString():""),false):false);},af3:function(rule,evt){PM.getVar("svcMissed",rule).z3(-1);PM.getVar("lco",rule).z3(new Date());},active:true}),Rule.create({id:910,name:"Last n Session Time Rule",vars:[],tt1:function(rule){return[{id:"on"+"NewSession"}]},cc2:function(rule,evt){return(true);},af3:function(rule,evt){if((e9(function(){return PM.getVar("lst",rule).getValueOrDefault();},false,true))&&(e9(function(){return PM.getVar("nSesT",rule).getValueOrDefault();},false,true))){PM.getVar("nSesT",rule).prepend([PM.getVar("lst",rule).getValueOrDefault()]);}},active:true}),Rule.create({id:920,name:"Session Time Reset",vars:[],tt1:function(rule){return[{id:"on"+"NewSession"}]},cc2:function(rule,evt){return(true);},af3:function(rule,evt){PM.getVar("sesT",rule).z3(0);},active:true}),Rule.create({id:930,name:"Session and Site Time Update",vars:[],tt1:function(rule){return[{id:"onAgentMsg"},{id:"onCustomerMsg"},{id:"onPageLanding"},{id:"onQueueWaitMsg"}]},cc2:function(rule,evt){return(true);},af3:function(rule,evt){PM.getVar("siteT",rule).z3((PM.getVar("siteT",rule).getValueOrDefault()+(parseFloat(Math.round(Date.diff(PM.getVar("ltt",rule).getValueOrDefault(),(PM.getVar("lst",rule).getValueOrDefault()))/(1000)))-PM.getVar("sesT",rule).getValueOrDefault())));PM.getVar("sesT",rule).z3(parseFloat(Math.round(Date.diff(PM.getVar("ltt",rule).getValueOrDefault(),(PM.getVar("lst",rule).getValueOrDefault()))/(1000))));},active:true}),Rule.create({id:945,name:"resetFunnelLevel",vars:[],tt1:function(rule){return[{id:"onPageLanding"}]},cc2:function(rule,evt){return((e9(function(){return PM.getVar("lco",rule).getValueOrDefault();},false,true))&&(new Date().after(Date.roll(PM.getVar("lco",rule).getValueOrDefault(),gc7("RECHAT_INTERVAL",rule)))));},af3:function(rule,evt){PM.getVar("cfl",rule).z3(gc7("MAX_LONG",rule));},active:true}),Rule.create({id:950,name:"CurrentFunnelLevelUpdater Rule",vars:[],tt1:function(rule){return[{id:"onChatLaunched",serviceType:"ALL"}]},cc2:function(rule,evt){return((!(e9(function(){return evt.rule.gc7('ifl');},false,true)))&&(e9(function(){return evt.rule.gc7('fl');},false,true))&&(PM.getVar("cfl",rule).getValueOrDefault()>parseFloat(evt.rule.gc7('fl'))));},af3:function(rule,evt){PM.getVar("cfl",rule).z3(parseFloat(evt.rule.gc7('fl')));},active:true}),Rule.create({id:986,name:"Update Assigned Agent On Transfer",vars:[],tt1:function(rule){return[{id:"onAgentAssigned"}]},cc2:function(rule,evt){return((e9(function(){return PM.getVar("incState",rule).getValueOrDefault();},false,true))&&(typeof(PM.getVar("incState",rule).getValueOrDefault())==="string"?PM.getVar("incState",rule).getValueOrDefault().equals(gc7("INC_STATE_ASSISTED",rule),false):false));},af3:function(rule,evt){if(e9(function(){return CHM.getAgentID();},false,true)){PM.getVar("assistAgt",rule).z3(CHM.getAgentID());}},active:true}),Rule.create({id:990,name:"sale state transition listener rule",vars:[],tt1:function(rule){return[{id:"on"+"SaleStateTransition"}]},cc2:function(rule,evt){return(true);},af3:function(rule,evt){try{ROM.send(resources["JASPER_ETL"].url,MI8.unmixMutatable(MI8.mixMutatable().set("_domain","sale").set("evt","state-change").set("customerID",Inq.getCustID()).set("initialCustomerID",CONVM.getInitialCustomerID()).set("conversationID",CONVM.getConversationID()).set("siteID",getSiteID()).set("pageID",LDM.getPageID(null,evt)).set("oldSaleState",evt.oldSaleState).set("saleState",PM.getVar("saleState",rule).getValueOrDefault()).set("sessionID",getSessionID()).set("assistChatID",PM.getVar("assistChatID",rule).getValueOrDefault()).set("chatID",CHM.getChatID()).set("oldAssistAgt",evt.oldAssistAgt).set("assistAgt",evt.assistAgt)),false,true,20,5000);}catch(e){lmt12("Error occurred when trying to send data to TagServer "+cf21(e),LOG_LEVELS.ERROR);}},active:true}),Rule.create({id:900,name:"EmailService",vars:[],tt1:function(rule){return[{id:"on"+"SendSurveyAlert"}]},cc2:function(rule,evt){return(true);},af3:function(rule,evt){FM.ex8(FM.getFcn("sendRequestToEmailApiController"),ROM,evt,(e9(urls.apiServiceURL)?urls.apiServiceURL.toString():""));},active:true}),Rule.create({id:901,name:"ACIFReady",vars:[],tt1:function(rule){return[{id:"on"+"StorageReady"}]},cc2:function(rule,evt){return(true);},af3:function(rule,evt){PM.getVar("isACIFReady",rule).z3(true);},active:true})];}
if(name==="vars"){return[{name:"loyalty",defVal:0,rId:"state",shName:"_loy",fnCast:function(o){return parseFloat(o);},type:"generic"},{name:"sesID",defVal:null,rId:"session",shName:"_ssID",fnCast:function(o){return o?o.toString():o;},fnSer:null,maxSize:30,type:"String"},{name:"ltt",defVal:null,rId:"session",shName:"ltt",type:"Date"},{name:"lco",defVal:null,rId:"state",shName:"lco",type:"Date"},{name:"fst",defVal:null,rId:"state",shName:"fst",type:"Date"},{name:"lst",defVal:null,rId:"state",shName:"lst",type:"Date"},{name:"freq",defVal:null,rId:"state",shName:"_f",fnCast:function(o){return parseFloat(o);},type:"generic"},{name:"sesT",defVal:null,rId:"session",shName:"_sT",fnCast:function(o){return parseFloat(o);},type:"generic"},{name:"nSesT",defVal:[],rId:"state",shName:"_ssQ",maxEntr:5,type:"DateList"},{name:"siteT",defVal:null,rId:"state",shName:"_sesT",fnCast:function(o){return parseFloat(o);},type:"generic"},{name:"saleValue",defVal:null,rId:"state",shName:"_slV",fnCast:function(o){return parseFloat(o);},type:"generic"},{name:"nSalesID",defVal:[],rId:"state",shName:"_slq",type:"List"},{name:"chatCnt",defVal:0.0,rId:"state",shName:"_cct",fnCast:function(o){return parseFloat(o);},type:"generic"},{name:"salesQualificationCount",defVal:0.0,rId:"state",shName:"_sqc",fnCast:function(o){return parseFloat(o);},type:"generic"},{name:"soldDT",defVal:null,rId:"vital",shName:"_sdt",type:"Date"},{name:"oldSoldDT",defVal:null,rId:"tmpVars",shName:"_osQ",type:"Date"},{name:"assistAgt",defVal:null,rId:"vital",shName:"_aa",fnCast:function(o){return o?o.toString():o;},fnSer:null,maxSize:null,type:"String"},{name:"oldAssistAgt",defVal:null,rId:"tmpVars",shName:"_oaa",fnCast:function(o){return o?o.toString():o;},fnSer:null,maxSize:null,type:"String"},{name:"assistDT",defVal:null,rId:"vital",shName:"_adt",type:"Date"},{name:"oldAssistDT",defVal:null,rId:"tmpVars",shName:"_oadt",type:"Date"},{name:"assistChatID",defVal:"-1",rId:"vital",shName:"_acid",fnCast:function(o){return o?o.toString():o;},fnSer:null,maxSize:30,type:"String"},{name:"engagedChatID",defVal:null,rId:"session",shName:"_ecID",fnCast:function(o){return o?o.toString():o;},fnSer:null,maxSize:30,type:"String"},{name:"interactedChatID",defVal:null,rId:"session",shName:"_icID",fnCast:function(o){return o?o.toString():o;},fnSer:null,maxSize:30,type:"String"},{name:"oldAssistChatID",defVal:null,rId:"tmpVars",shName:"_oaci",fnCast:function(o){return o?o.toString():o;},fnSer:null,maxSize:30,type:"String"},{name:"asstRuleID",defVal:null,rId:"vital",shName:"_arid",fnCast:function(o){return o?o.toString():o;},fnSer:null,maxSize:null,type:"String"},{name:"oldAsstRuleID",defVal:null,rId:"tmpVars",shName:"_oari",fnCast:function(o){return o?o.toString():o;},fnSer:null,maxSize:null,type:"String"},{name:"asstRuleName",defVal:null,rId:"vital",shName:"_arn",fnCast:function(o){return o?o.toString():o;},fnSer:null,maxSize:60,type:"String"},{name:"oldAsstRuleName",defVal:null,rId:"tmpVars",shName:"_oarn",fnCast:function(o){return o?o.toString():o;},fnSer:null,maxSize:60,type:"String"},{name:"saleLC",defVal:0.0,rId:"state",shName:"_slc",fnCast:function(o){return parseFloat(o);},type:"generic"},{name:"saleState",defVal:gc7("SALE_STATE_UNSOLD",rule),rId:"vital",shName:"_ss",fnCast:function(o){return o?o.toString():o;},fnSer:null,maxSize:null,type:"String"},{name:"oldSaleState",defVal:null,rId:"tmpVars",shName:"_oss",fnCast:function(o){return o?o.toString():o;},fnSer:null,maxSize:null,type:"String"},{name:"saleID",defVal:null,rId:"vital",shName:"_sID",fnCast:function(o){return o?o.toString():o;},fnSer:null,maxSize:30,type:"String"},{name:"oldSaleID",defVal:null,rId:"tmpVars",shName:"_osID",fnCast:function(o){return o?o.toString():o;},fnSer:null,maxSize:30,type:"String"},{name:"incStart",defVal:null,rId:"vital",shName:"_is",type:"Date"},{name:"incGroup",defVal:null,rId:"vital",shName:"_ig",fnCast:function(o){return o?o.toString():o;},fnSer:null,maxSize:null,type:"String"},{name:"incID",defVal:null,rId:"vital",shName:"_iID",fnCast:function(o){return o?o.toString():o;},fnSer:null,maxSize:30,type:"String"},{name:"incState",defVal:null,rId:"state",shName:"_ist",fnCast:function(o){return o?o.toString():o;},fnSer:null,maxSize:null,type:"String"},{name:"oldIncState",defVal:null,rId:"tmpVars",shName:"_ois",fnCast:function(o){return o?o.toString():o;},fnSer:null,maxSize:null,type:"String"},{name:"incExempt",defVal:null,rId:"state",shName:"_iex",fnCast:function(o){return Boolean(o);},fnSer:function(b){return inu1(b)?null:Number(b);},type:"generic"},{name:"svcMissed",defVal:-1,rId:"session",shName:"_svMs",fnCast:function(o){return parseFloat(o);},type:"generic"},{name:"custHost",defVal:null,rId:"state",shName:"_ch",fnCast:function(o){return o?o.toString():o;},fnSer:null,maxSize:null,type:"String"},{name:"rd",defVal:null,rId:"session",shName:"rd",fnCast:function(o){return o?o.toString():o;},fnSer:null,maxSize:30,type:"String"},{name:"sest",defVal:null,rId:"session",shName:"sest",fnCast:function(o){return o?o.toString():o;},fnSer:null,maxSize:null,type:"String"},{name:"assistedType",defVal:gc7("UNDEFINED_ASSISTED",rule),rId:"session",shName:"_aTyp",fnCast:function(o){return parseFloat(o);},type:"generic"},{name:"cfl",defVal:gc7("MAX_LONG",rule),rId:"state",shName:"cfl",fnCast:function(o){return parseFloat(o);},type:"generic"},{name:"incStatesMap",defVal:[{key:gc7("INC_STATE_ELIGIBLE",rule),value:10},{key:gc7("INC_STATE_TARGETED",rule),value:20},{key:gc7("INC_STATE_EXPOSURE_QUALIFIED",rule),value:30},{key:gc7("INC_STATE_EXPOSED",rule),value:40},{key:gc7("INC_STATE_ENGAGED",rule),value:50},{key:gc7("INC_STATE_INTERACTED",rule),value:60},{key:gc7("INC_STATE_ASSISTED",rule),value:70},{key:gc7("INC_STATE_CONVERTED",rule),value:80}],rId:"tmpVars",shName:"_ismp",maxEntr:8,type:"Map"},{name:"isACIFReady",defVal:false,rId:"tmpVars",shName:"iard",fnCast:function(o){return Boolean(o);},fnSer:function(b){return inu1(b)?null:Number(b);},type:"generic"}];}
return null;});