Advertisement
Guest User

Untitled

a guest
Jan 29th, 2020
337
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 41.26 KB | None | 0 0
  1. <script>
  2. "function"!==typeof window.DIL&&(window.DIL=function(a,c){var e=[],b,h;a!==Object(a)&&(a={});var g,k,q,m,r,n,x,E,t,A,L,B,C,F;g=a.partner;k=a.containerNSID;q=!!a.disableDestinationPublishingIframe;m=a.iframeAkamaiHTTPS;r=a.mappings;n=a.uuidCookie;x=!0===a.enableErrorReporting;E=a.visitorService;t=a.declaredId;A=!0===a.removeFinishedScriptsAndCallbacks;L=!0===a.delayAllUntilWindowLoad;B=!0===a.disableIDSyncs;C="undefined"===typeof a.secureDataCollection||!0===a.secureDataCollection;F=!0===a.useCORSOnly;
  3. var M,N,I,G,O,P,Q,R;M=!0===a.disableScriptAttachment;N=!0===a.disableDefaultRequest;I=a.afterResultForDefaultRequest;G=a.dpIframeSrc;O=!0===a.testCORS;P=!0===a.useJSONPOnly;Q=a.visitorConstructor;R=!0===a.disableCORS;x&&DIL.errorModule.activate();var T=!0===window._dil_unit_tests;(b=c)&&e.push(b+"");if(!g||"string"!==typeof g)return b="DIL partner is invalid or not specified in initConfig",DIL.errorModule.handleError({name:"error",message:b,filename:"dil.js"}),Error(b);b="DIL containerNSID is invalid or not specified in initConfig, setting to default of 0";
  4. if(k||"number"===typeof k)k=parseInt(k,10),!isNaN(k)&&0<=k&&(b="");b&&(k=0,e.push(b),b="");h=DIL.getDil(g,k);if(h instanceof DIL&&h.api.getPartner()===g&&h.api.getContainerNSID()===k)return h;if(this instanceof DIL)DIL.registerDil(this,g,k);else return new DIL(a,"DIL was not instantiated with the 'new' operator, returning a valid instance with partner = "+g+" and containerNSID = "+k);var y={IS_HTTPS:C||"https:"===document.location.protocol,POST_MESSAGE_ENABLED:!!window.postMessage,COOKIE_MAX_EXPIRATION_DATE:"Tue, 19 Jan 2038 03:14:07 UTC",
  5. MILLIS_PER_DAY:864E5,DIL_COOKIE_NAME:"AAMC_"+encodeURIComponent(g)+"_"+k,FIRST_PARTY_SYNCS:"AMSYNCS",FIRST_PARTY_SYNCS_ON_PAGE:"AMSYNCSOP"},J={stuffed:{}},v={},p={firingQueue:[],fired:[],firing:!1,sent:[],errored:[],reservedKeys:{sids:!0,pdata:!0,logdata:!0,callback:!0,postCallbackFn:!0,useImageRequest:!0},callbackPrefix:"demdexRequestCallback",firstRequestHasFired:!1,useJSONP:!0,abortRequests:!1,num_of_jsonp_responses:0,num_of_jsonp_errors:0,num_of_cors_responses:0,num_of_cors_errors:0,corsErrorSources:[],
  6. num_of_img_responses:0,num_of_img_errors:0,toRemove:[],removed:[],readyToRemove:!1,platformParams:{d_nsid:k+"",d_rtbd:"json",d_jsonv:DIL.jsonVersion+"",d_dst:"1"},nonModStatsParams:{d_rtbd:!0,d_dst:!0,d_cts:!0,d_rs:!0},modStatsParams:null,adms:{TIME_TO_CATCH_ALL_REQUESTS_RELEASE:2E3,calledBack:!1,mid:null,noVisitorAPI:!1,VisitorAPI:null,instance:null,releaseType:"no VisitorAPI",isOptedOut:!0,isOptedOutCallbackCalled:!1,admsProcessingStarted:!1,process:function(d){try{if(!this.admsProcessingStarted){this.admsProcessingStarted=
  7. !0;var l=this,s,f,a,b;if("function"===typeof d&&"function"===typeof d.getInstance){if(E===Object(E)&&(s=E.namespace)&&"string"===typeof s)f=d.getInstance(s,{idSyncContainerID:k});else{this.releaseType="no namespace";this.releaseRequests();return}if(f===Object(f)&&f instanceof d&&"function"===typeof f.isAllowed&&"function"===typeof f.getMarketingCloudVisitorID&&"function"===typeof f.getCustomerIDs&&"function"===typeof f.isOptedOut){this.VisitorAPI=d;if(!f.isAllowed()){this.releaseType="VisitorAPI not allowed";
  8. this.releaseRequests();return}this.instance=f;a=function(d){"VisitorAPI"!==l.releaseType&&(l.mid=d,l.releaseType="VisitorAPI",l.releaseRequests())};b=f.getMarketingCloudVisitorID(a);if("string"===typeof b&&b.length){a(b);return}setTimeout(function(){"VisitorAPI"!==l.releaseType&&(l.releaseType="timeout",l.releaseRequests())},this.getLoadTimeout());return}this.releaseType="invalid instance"}else this.noVisitorAPI=!0;this.releaseRequests()}}catch(e){this.releaseRequests()}},releaseRequests:function(){this.calledBack=
  9. !0;p.registerRequest()},getMarketingCloudVisitorID:function(){return this.instance?this.instance.getMarketingCloudVisitorID():null},getMIDQueryString:function(){var d=w.isPopulatedString,l=this.getMarketingCloudVisitorID();d(this.mid)&&this.mid===l||(this.mid=l);return d(this.mid)?"d_mid="+this.mid+"&":""},getCustomerIDs:function(){return this.instance?this.instance.getCustomerIDs():null},getCustomerIDsQueryString:function(d){if(d===Object(d)){var l="",s=[],f=[],a,b;for(a in d)d.hasOwnProperty(a)&&
  10. (f[0]=a,b=d[a],b===Object(b)&&(f[1]=b.id||"",f[2]=b.authState||0,s.push(f),f=[]));if(f=s.length)for(d=0;d<f;d++)l+="&d_cid_ic="+u.encodeAndBuildRequest(s[d],"%01");return l}return""},getIsOptedOut:function(){this.instance?this.instance.isOptedOut([this,this.isOptedOutCallback],this.VisitorAPI.OptOut.GLOBAL,!0):(this.isOptedOut=!1,this.isOptedOutCallbackCalled=!0)},isOptedOutCallback:function(d){this.isOptedOut=d;this.isOptedOutCallbackCalled=!0;p.registerRequest()},getLoadTimeout:function(){var d=
  11. this.instance;if(d){if("function"===typeof d.getLoadTimeout)return d.getLoadTimeout();if("undefined"!==typeof d.loadTimeout)return d.loadTimeout}return this.TIME_TO_CATCH_ALL_REQUESTS_RELEASE}},declaredId:{declaredId:{init:null,request:null},declaredIdCombos:{},setDeclaredId:function(d,l){var s=w.isPopulatedString,f=encodeURIComponent;if(d===Object(d)&&s(l)){var a=d.dpid,b=d.dpuuid,e=null;if(s(a)&&s(b)){e=f(a)+"$"+f(b);if(!0===this.declaredIdCombos[e])return"setDeclaredId: combo exists for type '"+
  12. l+"'";this.declaredIdCombos[e]=!0;this.declaredId[l]={dpid:a,dpuuid:b};return"setDeclaredId: succeeded for type '"+l+"'"}}return"setDeclaredId: failed for type '"+l+"'"},getDeclaredIdQueryString:function(){var d=this.declaredId.request,l=this.declaredId.init,a=encodeURIComponent,f="";null!==d?f="&d_dpid="+a(d.dpid)+"&d_dpuuid="+a(d.dpuuid):null!==l&&(f="&d_dpid="+a(l.dpid)+"&d_dpuuid="+a(l.dpuuid));return f}},registerRequest:function(d){var l=this.firingQueue;d===Object(d)&&l.push(d);this.firing||
  13. !l.length||L&&!DIL.windowLoaded||(this.adms.isOptedOutCallbackCalled||this.adms.getIsOptedOut(),this.adms.calledBack&&!this.adms.isOptedOut&&this.adms.isOptedOutCallbackCalled&&(this.adms.isOptedOutCallbackCalled=!1,d=l.shift(),d.src=d.src.replace(/demdex.net\/event\?d_nsid=/,"demdex.net/event?"+this.adms.getMIDQueryString()+"d_nsid="),w.isPopulatedString(d.corsPostData)&&(d.corsPostData=d.corsPostData.replace(/^d_nsid=/,this.adms.getMIDQueryString()+"d_nsid=")),D.fireRequest(d),this.firstRequestHasFired||
  14. "script"!==d.tag&&"cors"!==d.tag||(this.firstRequestHasFired=!0)))},processVisitorAPI:function(){this.adms.process(Q||window.Visitor)},requestRemoval:function(d){if(!A)return"removeFinishedScriptsAndCallbacks is not boolean true";var l=this.toRemove,a,f;d===Object(d)&&(a=d.script,f=d.callbackName,(a===Object(a)&&"SCRIPT"===a.nodeName||"no script created"===a)&&"string"===typeof f&&f.length&&l.push(d));if(this.readyToRemove&&l.length){f=l.shift();a=f.script;f=f.callbackName;"no script created"!==a?
  15. (d=a.src,a.parentNode.removeChild(a)):d=a;window[f]=null;try{delete window[f]}catch(b){}this.removed.push({scriptSrc:d,callbackName:f});DIL.variables.scriptsRemoved.push(d);DIL.variables.callbacksRemoved.push(f);return this.requestRemoval()}return"requestRemoval() processed"}};h=function(){var d="http://fast.",l="?d_nsid="+k+"#"+encodeURIComponent(document.location.href);if("string"===typeof G&&G.length)return G+l;y.IS_HTTPS&&(d=!0===m?"https://fast.":"https://");return d+g+".demdex.net/dest5.html"+
  16. l};var z={THROTTLE_START:3E4,MAX_SYNCS_LENGTH:649,throttleTimerSet:!1,id:"destination_publishing_iframe_"+g+"_"+k,url:h(),onPagePixels:[],iframeHost:null,getIframeHost:function(d){if("string"===typeof d){var l=d.split("/");if(3<=l.length)return l[0]+"//"+l[2];e.push("getIframeHost: url is malformed: "+d);return d}},iframe:null,iframeHasLoaded:!1,sendingMessages:!1,messages:[],messagesPosted:[],messagesReceived:[],messageSendingInterval:y.POST_MESSAGE_ENABLED?15:100,ibsDeleted:[],jsonWaiting:[],jsonProcessed:[],
  17. canSetThirdPartyCookies:!0,receivedThirdPartyCookiesNotification:!1,newIframeCreated:null,iframeIdChanged:!1,originalIframeHasLoadedAlready:null,attachIframe:function(){function d(){f=document.createElement("iframe");f.sandbox="allow-scripts allow-same-origin";f.title="Adobe ID Syncing iFrame";f.id=a.id;f.style.cssText="display: none; width: 0; height: 0;";f.src=a.url;a.newIframeCreated=!0;l();document.body.appendChild(f)}function l(){u.addListener(f,"load",function(){f.className="aamIframeLoaded";
  18. a.iframeHasLoaded=!0;a.requestToProcess()})}var a=this,f=document.getElementById(this.id);f?"IFRAME"!==f.nodeName?(this.id+="_2",this.iframeIdChanged=!0,d()):(this.newIframeCreated=!1,"aamIframeLoaded"!==f.className?(this.originalIframeHasLoadedAlready=!1,l()):(this.iframeHasLoaded=this.originalIframeHasLoadedAlready=!0,this.iframe=f,this.requestToProcess())):d();this.iframe=f},requestToProcess:function(d,l){var a=this;d&&!w.isEmptyObject(d)&&this.jsonWaiting.push([d,l]);if((this.receivedThirdPartyCookiesNotification||
  19. !y.POST_MESSAGE_ENABLED||this.iframeHasLoaded)&&this.jsonWaiting.length){var f=this.jsonWaiting.shift();this.process(f[0],f[1]);this.requestToProcess()}this.iframeHasLoaded&&this.messages.length&&!this.sendingMessages&&(this.throttleTimerSet||(this.throttleTimerSet=!0,setTimeout(function(){a.messageSendingInterval=y.POST_MESSAGE_ENABLED?15:150},this.THROTTLE_START)),this.sendingMessages=!0,this.sendMessages())},processSyncOnPage:function(d){var l,a,f;if((l=d.ibs)&&l instanceof Array&&(a=l.length))for(d=
  20. 0;d<a;d++)f=l[d],f.syncOnPage&&this.checkFirstPartyCookie(f,"","syncOnPage")},process:function(d,l){var a=encodeURIComponent,f,b,e,c,g,h;l===Object(l)&&(h=u.encodeAndBuildRequest(["",l.dpid||"",l.dpuuid||""],","));if((f=d.dests)&&f instanceof Array&&(b=f.length))for(e=0;e<b;e++)c=f[e],g=[a("dests"),a(c.id||""),a(c.y||""),a(c.c||"")],this.addMessage(g.join("|"));if((f=d.ibs)&&f instanceof Array&&(b=f.length))for(e=0;e<b;e++)c=f[e],g=[a("ibs"),a(c.id||""),a(c.tag||""),u.encodeAndBuildRequest(c.url||
  21. [],","),a(c.ttl||""),"",h,c.fireURLSync?"true":"false"],c.syncOnPage||(this.canSetThirdPartyCookies?this.addMessage(g.join("|")):c.fireURLSync&&this.checkFirstPartyCookie(c,g.join("|")));if((f=d.dpcalls)&&f instanceof Array&&(b=f.length))for(e=0;e<b;e++)c=f[e],g=c.callback||{},g=[g.obj||"",g.fn||"",g.key||"",g.tag||"",g.url||""],g=[a("dpm"),a(c.id||""),a(c.tag||""),u.encodeAndBuildRequest(c.url||[],","),a(c.ttl||""),u.encodeAndBuildRequest(g,","),h],this.addMessage(g.join("|"));this.jsonProcessed.push(d)},
  22. checkFirstPartyCookie:function(d,a,s){var f=(s="syncOnPage"===s?!0:!1)?y.FIRST_PARTY_SYNCS_ON_PAGE:y.FIRST_PARTY_SYNCS,b=this.getOnPageSyncData(f),c=!1,e=!1,g=Math.ceil((new Date).getTime()/y.MILLIS_PER_DAY);b?(b=b.split("*"),e=this.pruneSyncData(b,d.id,g),c=e.dataPresent,e=e.dataValid,c&&e||this.fireSync(s,d,a,b,f,g)):(b=[],this.fireSync(s,d,a,b,f,g))},getOnPageSyncData:function(d){var a=p.adms.instance;return a&&"function"===typeof a.idSyncGetOnPageSyncInfo?a.idSyncGetOnPageSyncInfo():u.getDilCookieField(d)},
  23. pruneSyncData:function(d,a,b){var f=!1,e=!1,c,g,h;if(d instanceof Array)for(g=0;g<d.length;g++)c=d[g],h=parseInt(c.split("-")[1],10),c.match("^"+a+"-")?(f=!0,b<h?e=!0:(d.splice(g,1),g--)):b>=h&&(d.splice(g,1),g--);return{dataPresent:f,dataValid:e}},manageSyncsSize:function(d){if(d.join("*").length>this.MAX_SYNCS_LENGTH)for(d.sort(function(d,a){return parseInt(d.split("-")[1],10)-parseInt(a.split("-")[1],10)});d.join("*").length>this.MAX_SYNCS_LENGTH;)d.shift()},fireSync:function(d,a,b,f,e,c){function g(d,
  24. a,l,f){return function(){h.onPagePixels[d]=null;var b=h.getOnPageSyncData(l),e=[];if(b){var b=b.split("*"),c,s,g;c=0;for(s=b.length;c<s;c++)g=b[c],g.match("^"+a.id+"-")||e.push(g)}h.setSyncTrackingData(e,a,l,f)}}var h=this;if(d){if("img"===a.tag){d=a.url;b=y.IS_HTTPS?"https:":"http:";var k,n,t;f=0;for(k=d.length;f<k;f++){n=d[f];t=/^\/\//.test(n);var p=new Image;u.addListener(p,"load",g(this.onPagePixels.length,a,e,c));p.src=(t?b:"")+n;this.onPagePixels.push(p)}}}else this.addMessage(b),this.setSyncTrackingData(f,
  25. a,e,c)},addMessage:function(d){var a=encodeURIComponent,a=x?a("---destpub-debug---"):a("---destpub---");this.messages.push(a+d)},setSyncTrackingData:function(d,a,b,f){d.push(a.id+"-"+(f+Math.ceil(a.ttl/60/24)));this.manageSyncsSize(d);u.setDilCookieField(b,d.join("*"))},sendMessages:function(){var d=this,a;this.messages.length?(a=this.messages.shift(),DIL.xd.postMessage(a,this.url,this.iframe.contentWindow),this.messagesPosted.push(a),setTimeout(function(){d.sendMessages()},this.messageSendingInterval)):
  26. this.sendingMessages=!1},receiveMessage:function(d){var a=/^---destpub-to-parent---/;"string"===typeof d&&a.test(d)&&(a=d.replace(a,"").split("|"),"canSetThirdPartyCookies"===a[0]&&(this.canSetThirdPartyCookies="true"===a[1]?!0:!1,this.receivedThirdPartyCookiesNotification=!0,this.requestToProcess()),this.messagesReceived.push(d))}},K={traits:function(d){w.isValidPdata(d)&&(v.sids instanceof Array||(v.sids=[]),u.extendArray(v.sids,d));return this},pixels:function(d){w.isValidPdata(d)&&(v.pdata instanceof
  27. Array||(v.pdata=[]),u.extendArray(v.pdata,d));return this},logs:function(d){w.isValidLogdata(d)&&(v.logdata!==Object(v.logdata)&&(v.logdata={}),u.extendObject(v.logdata,d));return this},customQueryParams:function(d){w.isEmptyObject(d)||u.extendObject(v,d,p.reservedKeys);return this},signals:function(d,a){var b,f=d;if(!w.isEmptyObject(f)){if(a&&"string"===typeof a)for(b in f={},d)d.hasOwnProperty(b)&&(f[a+b]=d[b]);u.extendObject(v,f,p.reservedKeys)}return this},declaredId:function(d){p.declaredId.setDeclaredId(d,
  28. "request");return this},result:function(d){"function"===typeof d&&(v.callback=d);return this},afterResult:function(d){"function"===typeof d&&(v.postCallbackFn=d);return this},useImageRequest:function(){v.useImageRequest=!0;return this},clearData:function(){v={};return this},submit:function(){D.submitRequest(v);v={};return this},getPartner:function(){return g},getContainerNSID:function(){return k},getEventLog:function(){return e},getState:function(){var d={},l={};u.extendObject(d,p,{callbackPrefix:!0,
  29. useJSONP:!0,registerRequest:!0});u.extendObject(l,z,{attachIframe:!0,requestToProcess:!0,process:!0,sendMessages:!0});return{initConfig:a,pendingRequest:v,otherRequestInfo:d,destinationPublishingInfo:l}},idSync:function(d){if(B)return"Error: id syncs have been disabled";if(d!==Object(d)||"string"!==typeof d.dpid||!d.dpid.length)return"Error: config or config.dpid is empty";if("string"!==typeof d.url||!d.url.length)return"Error: config.url is empty";var a=d.url,b=d.minutesToLive,f=encodeURIComponent,
  30. c,a=a.replace(/^https:/,"").replace(/^http:/,"");if("undefined"===typeof b)b=20160;else if(b=parseInt(b,10),isNaN(b)||0>=b)return"Error: config.minutesToLive needs to be a positive number";c=u.encodeAndBuildRequest(["",d.dpid,d.dpuuid||""],",");d=["ibs",f(d.dpid),"img",f(a),b,"",c];z.addMessage(d.join("|"));p.firstRequestHasFired&&z.requestToProcess();return"Successfully queued"},aamIdSync:function(d){if(B)return"Error: id syncs have been disabled";if(d!==Object(d)||"string"!==typeof d.dpuuid||!d.dpuuid.length)return"Error: config or config.dpuuid is empty";
  31. d.url="//dpm.demdex.net/ibs:dpid="+d.dpid+"&dpuuid="+d.dpuuid;return this.idSync(d)},passData:function(d){if(w.isEmptyObject(d))return"Error: json is empty or not an object";z.ibsDeleted.push(d.ibs);delete d.ibs;D.defaultCallback(d);return d},getPlatformParams:function(){return p.platformParams},getEventCallConfigParams:function(){var d=p,a=d.modStatsParams,b=d.platformParams,f;if(!a){a={};for(f in b)b.hasOwnProperty(f)&&!d.nonModStatsParams[f]&&(a[f.replace(/^d_/,"")]=b[f]);d.modStatsParams=a}return a}},
  32. D={corsMetadata:function(){var d="none",a=!0;"undefined"!==typeof XMLHttpRequest&&XMLHttpRequest===Object(XMLHttpRequest)&&("withCredentials"in new XMLHttpRequest?d="XMLHttpRequest":(new Function("/*@cc_on return /^10/.test(@_jscript_version) @*/"))()?d="XMLHttpRequest":"undefined"!==typeof XDomainRequest&&XDomainRequest===Object(XDomainRequest)&&(a=!1),0<Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")&&(a=!1));return{corsType:d,corsCookiesEnabled:a}}(),getCORSInstance:function(){return"none"===
  33. this.corsMetadata.corsType?null:new window[this.corsMetadata.corsType]},submitRequest:function(d){p.registerRequest(D.createQueuedRequest(d));return!0},createQueuedRequest:function(d){var a=p,b,f=d.callback,c="img",e;if(!w.isEmptyObject(r)){var g,h,n;for(g in r)r.hasOwnProperty(g)&&(h=r[g],null!=h&&""!==h&&g in d&&!(h in d||h in p.reservedKeys)&&(n=d[g],null!=n&&""!==n&&(d[h]=n)))}w.isValidPdata(d.sids)||(d.sids=[]);w.isValidPdata(d.pdata)||(d.pdata=[]);w.isValidLogdata(d.logdata)||(d.logdata={});
  34. d.logdataArray=u.convertObjectToKeyValuePairs(d.logdata,"=",!0);d.logdataArray.push("_ts="+(new Date).getTime());"function"!==typeof f&&(f=this.defaultCallback);a.useJSONP=!0!==d.useImageRequest;a.useJSONP&&(c="script",b=a.callbackPrefix+"_"+k+"_"+(new Date).getTime());a=this.makeRequestSrcData(d,b);P&&!F||!(e=this.getCORSInstance())||(c="cors");return{tag:c,src:a.src,corsSrc:a.corsSrc,internalCallbackName:b,callbackFn:f,postCallbackFn:d.postCallbackFn,useImageRequest:!!d.useImageRequest,requestData:d,
  35. corsInstance:e,corsPostData:a.corsPostData}},defaultCallback:function(d,a){z.processSyncOnPage(d);var b,f,c,e,g,h,k,t,x;if((b=d.stuff)&&b instanceof Array&&(f=b.length))for(c=0;c<f;c++)if((e=b[c])&&e===Object(e)){g=e.cn;h=e.cv;k=e.ttl;if("undefined"===typeof k||""===k)k=Math.floor(u.getMaxCookieExpiresInMinutes()/60/24);t=e.dmn||"."+document.domain.replace(/^www\./,"");x=e.type;g&&(h||"number"===typeof h)&&("var"!==x&&(k=parseInt(k,10))&&!isNaN(k)&&u.setCookie(g,h,1440*k,"/",t,!1),J.stuffed[g]=h)}b=
  36. d.uuid;w.isPopulatedString(b)&&!w.isEmptyObject(n)&&(f=n.path,"string"===typeof f&&f.length||(f="/"),c=parseInt(n.days,10),isNaN(c)&&(c=100),u.setCookie(n.name||"aam_did",b,1440*c,f,n.domain||"."+document.domain.replace(/^www\./,""),!0===n.secure));q||p.abortRequests||z.requestToProcess(d,a)},makeRequestSrcData:function(d,a){d.sids=w.removeEmptyArrayValues(d.sids||[]);d.pdata=w.removeEmptyArrayValues(d.pdata||[]);var b=p,f=b.platformParams,c=u.encodeAndBuildRequest(d.sids,","),e=u.encodeAndBuildRequest(d.pdata,
  37. ","),h=(d.logdataArray||[]).join("&");delete d.logdataArray;var n=y.IS_HTTPS?"https://":"http://",t=b.declaredId.getDeclaredIdQueryString(),x=b.adms.instance?b.adms.getCustomerIDsQueryString(b.adms.getCustomerIDs()):"",m;m=[];var r,q,v,A;for(r in d)if(!(r in b.reservedKeys)&&d.hasOwnProperty(r))if(q=d[r],r=encodeURIComponent(r),q instanceof Array)for(v=0,A=q.length;v<A;v++)m.push(r+"="+encodeURIComponent(q[v]));else m.push(r+"="+encodeURIComponent(q));m=m.length?"&"+m.join("&"):"";c="d_nsid="+f.d_nsid+
  38. t+x+(c.length?"&d_sid="+c:"")+(e.length?"&d_px="+e:"")+(h.length?"&d_ld="+encodeURIComponent(h):"");f="&d_rtbd="+f.d_rtbd+"&d_jsonv="+f.d_jsonv+"&d_dst="+f.d_dst;n=n+g+".demdex.net/event";e=b=n+"?"+c+(b.useJSONP?f+"&d_cb="+(a||""):"")+m;2048<b.length&&(b=b.substring(0,2048).substring(0,b.lastIndexOf("&")));return{corsSrc:n+"?"+(O?"testcors=1&d_nsid="+k+"&":"")+"_ts="+(new Date).getTime(),src:b,originalSrc:e,corsPostData:c+f+m,isDeclaredIdCall:""!==t}},fireRequest:function(d){if("img"===d.tag)this.fireImage(d);
  39. else{var a=p.declaredId,a=a.declaredId.request||a.declaredId.init||{},a={dpid:a.dpid||"",dpuuid:a.dpuuid||""};"script"===d.tag?this.fireScript(d,a):"cors"===d.tag&&this.fireCORS(d,a)}},fireImage:function(d){var a=p,c,f;a.abortRequests||(a.firing=!0,c=new Image(0,0),a.sent.push(d),c.onload=function(){a.firing=!1;a.fired.push(d);a.num_of_img_responses++;a.registerRequest()},f=function(f){b="imgAbortOrErrorHandler received the event of type "+f.type;e.push(b);a.abortRequests=!0;a.firing=!1;a.errored.push(d);
  40. a.num_of_img_errors++;a.registerRequest()},c.addEventListener?(c.addEventListener("error",f,!1),c.addEventListener("abort",f,!1)):c.attachEvent&&(c.attachEvent("onerror",f),c.attachEvent("onabort",f)),c.src=d.src)},fireScript:function(d,a){var c=this,f=p,h,k,n=d.src,t=d.postCallbackFn,m="function"===typeof t,r=d.internalCallbackName;f.abortRequests||(f.firing=!0,window[r]=function(c){try{c!==Object(c)&&(c={});B&&(z.ibsDeleted.push(c.ibs),delete c.ibs);var h=d.callbackFn;f.firing=!1;f.fired.push(d);
  41. f.num_of_jsonp_responses++;h(c,a);m&&t(c,a)}catch(s){s.message="DIL jsonp callback caught error with message "+s.message;b=s.message;e.push(b);s.filename=s.filename||"dil.js";s.partner=g;DIL.errorModule.handleError(s);try{h({error:s.name+"|"+s.message},a),m&&t({error:s.name+"|"+s.message},a)}catch(n){}}finally{f.requestRemoval({script:k,callbackName:r}),f.registerRequest()}},M||F?(f.firing=!1,f.requestRemoval({script:"no script created",callbackName:r})):(k=document.createElement("script"),k.addEventListener&&
  42. k.addEventListener("error",function(a){f.requestRemoval({script:k,callbackName:r});b="jsonp script tag error listener received the event of type "+a.type+" with src "+n;c.handleScriptError(b,d)},!1),k.type="text/javascript",k.src=n,h=DIL.variables.scriptNodeList[0],h.parentNode.insertBefore(k,h)),f.sent.push(d),f.declaredId.declaredId.request=null)},fireCORS:function(d,a){var c=this,f=p,h=this.corsMetadata.corsType,k=d.corsSrc,n=d.corsInstance,t=d.corsPostData,r=d.postCallbackFn,m="function"===typeof r;
  43. if(!f.abortRequests&&!R){f.firing=!0;try{n.open("post",k,!0),"XMLHttpRequest"===h&&(n.withCredentials=!0,n.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),n.onreadystatechange=function(){if(4===this.readyState&&200===this.status)a:{var h;try{if(h=JSON.parse(this.responseText),h!==Object(h)){c.handleCORSError(d,a,"Response is not JSON");break a}}catch(k){c.handleCORSError(d,a,"Error parsing response as JSON");break a}B&&(z.ibsDeleted.push(h.ibs),delete h.ibs);try{var n=d.callbackFn;
  44. f.firing=!1;f.fired.push(d);f.num_of_cors_responses++;n(h,a);m&&r(h,a)}catch(t){t.message="DIL handleCORSResponse caught error with message "+t.message;b=t.message;e.push(b);t.filename=t.filename||"dil.js";t.partner=g;DIL.errorModule.handleError(t);try{n({error:t.name+"|"+t.message},a),m&&r({error:t.name+"|"+t.message},a)}catch(x){}}finally{f.registerRequest()}}}),n.onerror=function(){c.handleCORSError(d,a,"onerror")},n.ontimeout=function(){c.handleCORSError(d,a,"ontimeout")},n.send(t)}catch(x){this.handleCORSError(d,
  45. a,"try-catch")}f.sent.push(d);f.declaredId.declaredId.request=null}},handleCORSError:function(d,a,b){p.num_of_cors_errors++;p.corsErrorSources.push(b);"ontimeout"===b||F||(d.tag="script",this.fireScript(d,a))},handleScriptError:function(d,a){p.num_of_jsonp_errors++;this.handleRequestError(d,a)},handleRequestError:function(d,a){var b=p;e.push(d);b.abortRequests=!0;b.firing=!1;b.errored.push(a);b.registerRequest()}},w={isValidPdata:function(a){return a instanceof Array&&this.removeEmptyArrayValues(a).length?
  46. !0:!1},isValidLogdata:function(a){return!this.isEmptyObject(a)},isEmptyObject:function(a){if(a!==Object(a))return!0;for(var b in a)if(a.hasOwnProperty(b))return!1;return!0},removeEmptyArrayValues:function(a){for(var b=0,c=a.length,f,e=[],b=0;b<c;b++)f=a[b],"undefined"!==typeof f&&null!==f&&""!==f&&e.push(f);return e},isPopulatedString:function(a){return"string"===typeof a&&a.length}},u={addListener:function(){if(document.addEventListener)return function(a,b,c){a.addEventListener(b,function(a){"function"===
  47. typeof c&&c(a)},!1)};if(document.attachEvent)return function(a,b,c){a.attachEvent("on"+b,function(a){"function"===typeof c&&c(a)})}}(),convertObjectToKeyValuePairs:function(a,b,c){var f=[],e,g;b||(b="=");for(e in a)a.hasOwnProperty(e)&&(g=a[e],"undefined"!==typeof g&&null!==g&&""!==g&&f.push(e+b+(c?encodeURIComponent(g):g)));return f},encodeAndBuildRequest:function(a,b){return this.map(a,function(a){return encodeURIComponent(a)}).join(b)},map:function(a,b){if(Array.prototype.map)return a.map(b);if(void 0===
  48. a||null===a)throw new TypeError;var c=Object(a),f=c.length>>>0;if("function"!==typeof b)throw new TypeError;for(var e=Array(f),g=0;g<f;g++)g in c&&(e[g]=b.call(b,c[g],g,c));return e},filter:function(a,b){if(!Array.prototype.filter){if(void 0===a||null===a)throw new TypeError;var c=Object(a),f=c.length>>>0;if("function"!==typeof b)throw new TypeError;for(var e=[],g=0;g<f;g++)if(g in c){var h=c[g];b.call(b,h,g,c)&&e.push(h)}return e}return a.filter(b)},getCookie:function(a){a+="=";var b=document.cookie.split(";"),
  49. c,f,e;c=0;for(f=b.length;c<f;c++){for(e=b[c];" "===e.charAt(0);)e=e.substring(1,e.length);if(0===e.indexOf(a))return decodeURIComponent(e.substring(a.length,e.length))}return null},setCookie:function(a,b,c,f,e,g){var h=new Date;c&&(c*=6E4);document.cookie=a+"="+encodeURIComponent(b)+(c?";expires="+(new Date(h.getTime()+c)).toUTCString():"")+(f?";path="+f:"")+(e?";domain="+e:"")+(g?";secure":"")},extendArray:function(a,b){return a instanceof Array&&b instanceof Array?(Array.prototype.push.apply(a,
  50. b),!0):!1},extendObject:function(a,b,c){var f;if(a===Object(a)&&b===Object(b)){for(f in b)!b.hasOwnProperty(f)||!w.isEmptyObject(c)&&f in c||(a[f]=b[f]);return!0}return!1},getMaxCookieExpiresInMinutes:function(){return((new Date(y.COOKIE_MAX_EXPIRATION_DATE)).getTime()-(new Date).getTime())/1E3/60},getCookieField:function(a,b){var c=this.getCookie(a),f=decodeURIComponent;if("string"===typeof c){var c=c.split("|"),e,g;e=0;for(g=c.length-1;e<g;e++)if(f(c[e])===b)return f(c[e+1])}return null},getDilCookieField:function(a){return this.getCookieField(y.DIL_COOKIE_NAME,
  51. a)},setCookieField:function(a,b,c){var e=this.getCookie(a),g=!1,h=encodeURIComponent;b=h(b);c=h(c);if("string"===typeof e){var e=e.split("|"),k,h=0;for(k=e.length-1;h<k;h++)if(e[h]===b){e[h+1]=c;g=!0;break}g||(h=e.length,e[h]=b,e[h+1]=c)}else e=[b,c];this.setCookie(a,e.join("|"),this.getMaxCookieExpiresInMinutes(),"/",this.getDomain(),!1)},setDilCookieField:function(a,b){return this.setCookieField(y.DIL_COOKIE_NAME,a,b)},getDomain:function(a){!a&&window.location&&(a=window.location.hostname);if(a)if(/^[0-9.]+$/.test(a))a=
  52. "";else{var b=a.split("."),c=b.length-1,e=c-1;1<c&&2>=b[c].length&&(2===b[c-1].length||0>",DOMAIN_2_CHAR_EXCEPTIONS,".indexOf(","+b[c]+","))&&e--;if(0<e)for(a="";c>=e;)a=b[c]+(a?".":"")+a,c--}return a}};"error"===g&&0===k&&u.addListener(window,"load",function(){DIL.windowLoaded=!0});var S=!1,H=function(){S||(S=!0,p.registerRequest(),U(),q||p.abortRequests||z.attachIframe(),p.readyToRemove=!0,p.requestRemoval())},U=function(){q||setTimeout(function(){N||p.firstRequestHasFired||("function"===typeof I?
  53. K.afterResult(I).submit():K.submit())},DIL.constants.TIME_TO_DEFAULT_REQUEST)};C=document;"error"!==g&&(DIL.windowLoaded?H():"complete"!==C.readyState&&"loaded"!==C.readyState?u.addListener(window,"load",function(){DIL.windowLoaded=!0;H()}):(DIL.windowLoaded=!0,H()));if("error"!==g)try{DIL.xd.receiveMessage(function(a){z.receiveMessage(a.data)},z.getIframeHost(z.url))}catch(V){}p.declaredId.setDeclaredId(t,"init");p.processVisitorAPI();this.api=K;this.getStuffedVariable=function(a){var b=J.stuffed[a];
  54. b||"number"===typeof b||(b=u.getCookie(a))||"number"===typeof b||(b="");return b};this.validators=w;this.helpers=u;this.constants=y;this.log=e;T&&(this.pendingRequest=v,this.requestController=p,this.setDestinationPublishingUrl=h,this.destinationPublishing=z,this.requestProcs=D,this.variables=J,this.callWindowLoadFunctions=H)},function(){var a=document,c;null==a.readyState&&a.addEventListener&&(a.readyState="loading",a.addEventListener("DOMContentLoaded",c=function(){a.removeEventListener("DOMContentLoaded",
  55. c,!1);a.readyState="complete"},!1))}(),DIL.extendStaticPropertiesAndMethods=function(a){var c;if(a===Object(a))for(c in a)a.hasOwnProperty(c)&&(this[c]=a[c])},DIL.extendStaticPropertiesAndMethods({version:"6.7",jsonVersion:1,constants:{TIME_TO_DEFAULT_REQUEST:50},variables:{scriptNodeList:document.getElementsByTagName("script"),scriptsRemoved:[],callbacksRemoved:[]},windowLoaded:!1,dils:{},isAddedPostWindowLoad:function(a){this.windowLoaded="function"===typeof a?!!a():"boolean"===typeof a?a:!0},create:function(a){try{return new DIL(a)}catch(c){return(new Image(0,
  56. 0)).src="http://error.demdex.net/event?d_nsid=0&d_px=14137&d_ld=name%3Derror%26filename%3Ddil.js%26partner%3Dno_partner%26message%3DError%2520in%2520attempt%2520to%2520create%2520DIL%2520instance%2520with%2520DIL.create()%26_ts%3D"+(new Date).getTime(),Error("Error in attempt to create DIL instance with DIL.create()")}},registerDil:function(a,c,e){c=c+"$"+e;c in this.dils||(this.dils[c]=a)},getDil:function(a,c){var e;"string"!==typeof a&&(a="");c||(c=0);e=a+"$"+c;return e in this.dils?this.dils[e]:
  57. Error("The DIL instance with partner = "+a+" and containerNSID = "+c+" was not found")},dexGetQSVars:function(a,c,e){c=this.getDil(c,e);return c instanceof this?c.getStuffedVariable(a):""},xd:{postMessage:function(a,c,e){var b=1;c&&(window.postMessage?e.postMessage(a,c.replace(/([^:]+:\/\/[^\/]+).*/,"$1")):c&&(e.location=c.replace(/#.*$/,"")+"#"+ +new Date+b++ +"&"+a))},receiveMessage:function(a,c){var e;try{if(window.postMessage)if(a&&(e=function(b){if("string"===typeof c&&b.origin!==c||"[object Function]"===
  58. Object.prototype.toString.call(c)&&!1===c(b.origin))return!1;a(b)}),window.addEventListener)window[a?"addEventListener":"removeEventListener"]("message",e,!1);else window[a?"attachEvent":"detachEvent"]("onmessage",e)}catch(b){}}}}),DIL.errorModule=function(){var a=DIL.create({partner:"error",containerNSID:0,disableDestinationPublishingIframe:!0}),c={harvestererror:14138,destpuberror:14139,dpmerror:14140,generalerror:14137,error:14137,noerrortypedefined:15021,evalerror:15016,rangeerror:15017,referenceerror:15018,
  59. typeerror:15019,urierror:15020},e=!1;return{activate:function(){e=!0},handleError:function(b){if(!e)return"DIL error module has not been activated";b!==Object(b)&&(b={});var h=b.name?(b.name+"").toLowerCase():"",g=[];b={name:h,filename:b.filename?b.filename+"":"",partner:b.partner?b.partner+"":"no_partner",site:b.site?b.site+"":document.location.href,message:b.message?b.message+"":""};g.push(h in c?c[h]:c.noerrortypedefined);a.api.pixels(g).logs(b).useImageRequest().submit();return"DIL error report sent"},
  60. pixelMap:c}}(),DIL.tools={},DIL.modules={helpers:{handleModuleError:function(a,c,e){var b="";c=c||"Error caught in DIL module/submodule: ";a===Object(a)?b=c+(a.message||"err has no message"):(b=c+"err is not a valid object",a={});a.message=b;e instanceof DIL&&(a.partner=e.api.getPartner());DIL.errorModule.handleError(a);return this.errorMessage=b}}});
  61. DIL.tools.getSearchReferrer=function(a,c){var e=DIL.getDil("error"),b=DIL.tools.decomposeURI(a||document.referrer),h="",g="",k={queryParam:"q"};return(h=e.helpers.filter([c===Object(c)?c:{},{hostPattern:/aol\./},{hostPattern:/ask\./},{hostPattern:/bing\./},{hostPattern:/google\./},{hostPattern:/yahoo\./,queryParam:"p"}],function(a){return!(!a.hasOwnProperty("hostPattern")||!b.hostname.match(a.hostPattern))}).shift())?{valid:!0,name:b.hostname,keywords:(e.helpers.extendObject(k,h),g=k.queryPattern?
  62. (h=(""+b.search).match(k.queryPattern))?h[1]:"":b.uriParams[k.queryParam],decodeURIComponent(g||"").replace(/\+|%20/g," "))}:{valid:!1,name:"",keywords:""}};
  63. DIL.tools.decomposeURI=function(a){var c=DIL.getDil("error"),e=document.createElement("a");e.href=a||document.referrer;return{hash:e.hash,host:e.host.split(":").shift(),hostname:e.hostname,href:e.href,pathname:e.pathname.replace(/^\//,""),protocol:e.protocol,search:e.search,uriParams:function(a,e){c.helpers.map(e.split("&"),function(c){c=c.split("=");a[c.shift()]=c.shift()});return a}({},e.search.replace(/^(\/|\?)?|\/$/g,""))}};
  64. DIL.tools.getMetaTags=function(){var a={},c=document.getElementsByTagName("meta"),e,b,h,g,k;e=0;for(h=arguments.length;e<h;e++)if(g=arguments[e],null!==g)for(b=0;b<c.length;b++)if(k=c[b],k.name===g){a[g]=k.content;break}return a};
  65. DIL.modules.siteCatalyst={dil:null,handle:DIL.modules.helpers.handleModuleError,init:function(a,c,e,b){try{var h=this,g={name:"DIL Site Catalyst Module Error"},k=function(a){g.message=a;DIL.errorModule.handleError(g);return a};this.options=b===Object(b)?b:{};this.dil=null;if(c instanceof DIL)this.dil=c;else return k("dilInstance is not a valid instance of DIL");g.partner=c.api.getPartner();if(a!==Object(a))return k("siteCatalystReportingSuite is not an object");window.AppMeasurement_Module_DIL=a.m_DIL=
  66. function(a){var b="function"===typeof a.m_i?a.m_i("DIL"):this;if(b!==Object(b))return k("m is not an object");b.trackVars=h.constructTrackVars(e);b.d=0;b.s=a;b._t=function(){var a,b,c=","+this.trackVars+",",e=this.s,g,r=[];g=[];var m={},q=!1;if(e!==Object(e))return k("Error in m._t function: s is not an object");if(this.d){if("function"===typeof e.foreachVar)e.foreachVar(function(a,b){"undefined"!==typeof b&&(m[a]=b,q=!0)},this.trackVars);else{if(!(e.va_t instanceof Array))return k("Error in m._t function: s.va_t is not an array");
  67. if(e.lightProfileID)(a=e.lightTrackVars)&&(a=","+a+","+e.vl_mr+",");else if(e.pe||e.linkType)a=e.linkTrackVars,e.pe&&(b=e.pe.substring(0,1).toUpperCase()+e.pe.substring(1),e[b]&&(a=e[b].trackVars)),a&&(a=","+a+","+e.vl_l+","+e.vl_l2+",");if(a){b=0;for(r=a.split(",");b<r.length;b++)0<=c.indexOf(","+r[b]+",")&&g.push(r[b]);g.length&&(c=","+g.join(",")+",")}g=0;for(b=e.va_t.length;g<b;g++)a=e.va_t[g],0<=c.indexOf(","+a+",")&&"undefined"!==typeof e[a]&&null!==e[a]&&""!==e[a]&&(m[a]=e[a],q=!0)}h.includeContextData(e,
  68. m).store_populated&&(q=!0);q&&this.d.api.signals(m,"c_").submit()}}};a.loadModule("DIL");a.DIL.d=c;return g.message?g.message:"DIL.modules.siteCatalyst.init() completed with no errors"}catch(q){return this.handle(q,"DIL.modules.siteCatalyst.init() caught error with message ",this.dil)}},constructTrackVars:function(a){var c=[],e,b,h,g,k;if(a===Object(a)){e=a.names;if(e instanceof Array&&(h=e.length))for(b=0;b<h;b++)g=e[b],"string"===typeof g&&g.length&&c.push(g);a=a.iteratedNames;if(a instanceof Array&&
  69. (h=a.length))for(b=0;b<h;b++)if(e=a[b],e===Object(e)&&(g=e.name,k=parseInt(e.maxIndex,10),"string"===typeof g&&g.length&&!isNaN(k)&&0<=k))for(e=0;e<=k;e++)c.push(g+e);if(c.length)return c.join(",")}return this.constructTrackVars({names:"pageName channel campaign products events pe pev1 pev2 pev3".split(" "),iteratedNames:[{name:"prop",maxIndex:75},{name:"eVar",maxIndex:250}]})},includeContextData:function(a,c){var e={},b=!1;if(a.contextData===Object(a.contextData)){var h=a.contextData,g=this.options.replaceContextDataPeriodsWith,
  70. k=this.options.filterFromContextVariables,q={},m,r,n,x;"string"===typeof g&&g.length||(g="_");if(k instanceof Array)for(m=0,r=k.length;m<r;m++)n=k[m],this.dil.validators.isPopulatedString(n)&&(q[n]=!0);for(x in h)!h.hasOwnProperty(x)||q[x]||!(k=h[x])&&"number"!==typeof k||(x=("contextData."+x).replace(/\./g,g),c[x]=k,b=!0)}e.store_populated=b;return e}};
  71. DIL.modules.GA={submitUniversalAnalytics:function(a,c,e){try{var b=a.getAll()[0],h=b[e||"b"].data.keys;a={};var g,k,q,m;g=0;for(k=h.length;g<k;g++)q=h[g],m=b.get(q),"undefined"===typeof m||"function"===typeof m||m===Object(m)||/^_/.test(q)||/^&/.test(q)||(a[q]=m);c.api.signals(a,"c_");return a}catch(r){return"Caught error with message: "+r.message}},dil:null,arr:null,tv:null,errorMessage:"",defaultTrackVars:["_setAccount","_setCustomVar","_addItem","_addTrans","_trackSocial"],defaultTrackVarsObj:null,
  72. signals:{},hasSignals:!1,handle:DIL.modules.helpers.handleModuleError,init:function(a,c,e){try{this.tv=this.arr=this.dil=null;this.errorMessage="";this.signals={};this.hasSignals=!1;var b={name:"DIL GA Module Error"},h="";c instanceof DIL?(this.dil=c,b.partner=this.dil.api.getPartner()):(h="dilInstance is not a valid instance of DIL",b.message=h,DIL.errorModule.handleError(b));a instanceof Array&&a.length?this.arr=a:(h="gaArray is not an array or is empty",b.message=h,DIL.errorModule.handleError(b));
  73. this.tv=this.constructTrackVars(e);this.errorMessage=h}catch(g){this.handle(g,"DIL.modules.GA.init() caught error with message ",this.dil)}finally{return this}},constructTrackVars:function(a){var c=[],e,b,h,g;if(this.defaultTrackVarsObj!==Object(this.defaultTrackVarsObj)){h=this.defaultTrackVars;g={};e=0;for(b=h.length;e<b;e++)g[h[e]]=!0;this.defaultTrackVarsObj=g}else g=this.defaultTrackVarsObj;if(a===Object(a)){a=a.names;if(a instanceof Array&&(b=a.length))for(e=0;e<b;e++)h=a[e],"string"===typeof h&&
  74. h.length&&h in g&&c.push(h);if(c.length)return c}return this.defaultTrackVars},constructGAObj:function(a){var c={};a=a instanceof Array?a:this.arr;var e,b,h,g;e=0;for(b=a.length;e<b;e++)h=a[e],h instanceof Array&&h.length&&(h=[],g=a[e],h instanceof Array&&g instanceof Array&&Array.prototype.push.apply(h,g),g=h.shift(),"string"===typeof g&&g.length&&(c[g]instanceof Array||(c[g]=[]),c[g].push(h)));return c},addToSignals:function(a,c){if("string"!==typeof a||""===a||null==c||""===c)return!1;this.signals[a]instanceof
  75. Array||(this.signals[a]=[]);this.signals[a].push(c);return this.hasSignals=!0},constructSignals:function(){var a=this.constructGAObj(),c={_setAccount:function(a){this.addToSignals("c_accountId",a)},_setCustomVar:function(a,b,c){"string"===typeof b&&b.length&&this.addToSignals("c_"+b,c)},_addItem:function(a,b,c,e,g,h){this.addToSignals("c_itemOrderId",a);this.addToSignals("c_itemSku",b);this.addToSignals("c_itemName",c);this.addToSignals("c_itemCategory",e);this.addToSignals("c_itemPrice",g);this.addToSignals("c_itemQuantity",
  76. h)},_addTrans:function(a,b,c,e,g,h,k,m){this.addToSignals("c_transOrderId",a);this.addToSignals("c_transAffiliation",b);this.addToSignals("c_transTotal",c);this.addToSignals("c_transTax",e);this.addToSignals("c_transShipping",g);this.addToSignals("c_transCity",h);this.addToSignals("c_transState",k);this.addToSignals("c_transCountry",m)},_trackSocial:function(a,b,c,e){this.addToSignals("c_socialNetwork",a);this.addToSignals("c_socialAction",b);this.addToSignals("c_socialTarget",c);this.addToSignals("c_socialPagePath",
  77. e)}},e=this.tv,b,h,g,k,q,m;b=0;for(h=e.length;b<h;b++)if(g=e[b],a.hasOwnProperty(g)&&c.hasOwnProperty(g)&&(m=a[g],m instanceof Array))for(k=0,q=m.length;k<q;k++)c[g].apply(this,m[k])},submit:function(){try{if(""!==this.errorMessage)return this.errorMessage;this.constructSignals();return this.hasSignals?(this.dil.api.signals(this.signals).submit(),"Signals sent: "+this.dil.helpers.convertObjectToKeyValuePairs(this.signals,"=",!0)+this.dil.log):"No signals present"}catch(a){return this.handle(a,"DIL.modules.GA.submit() caught error with message ",
  78. this.dil)}},Stuffer:{LIMIT:5,dil:null,cookieName:null,delimiter:null,errorMessage:"",handle:DIL.modules.helpers.handleModuleError,callback:null,v:function(){return!1},init:function(a,c,e){try{this.callback=this.dil=null,this.errorMessage="",a instanceof DIL?(this.dil=a,this.v=this.dil.validators.isPopulatedString,this.cookieName=this.v(c)?c:"aam_ga",this.delimiter=this.v(e)?e:"|"):this.handle({message:"dilInstance is not a valid instance of DIL"},"DIL.modules.GA.Stuffer.init() error: ")}catch(b){this.handle(b,
  79. "DIL.modules.GA.Stuffer.init() caught error with message ",this.dil)}finally{return this}},process:function(a){var c,e,b,h,g,k;k=!1;var q=1;if(a===Object(a)&&(c=a.stuff)&&c instanceof Array&&(e=c.length))for(a=0;a<e;a++)if((b=c[a])&&b===Object(b)&&(h=b.cn,g=b.cv,h===this.cookieName&&this.v(g))){k=!0;break}if(k){c=g.split(this.delimiter);"undefined"===typeof window._gaq&&(window._gaq=[]);b=window._gaq;a=0;for(e=c.length;a<e&&!(k=c[a].split("="),g=k[0],k=k[1],this.v(g)&&this.v(k)&&b.push(["_setCustomVar",
  80. q++,g,k,1]),q>this.LIMIT);a++);this.errorMessage=1<q?"No errors - stuffing successful":"No valid values to stuff"}else this.errorMessage="Cookie name and value not found in json";if("function"===typeof this.callback)return this.callback()},submit:function(){try{var a=this;if(""!==this.errorMessage)return this.errorMessage;this.dil.api.afterResult(function(c){a.process(c)}).submit();return"DIL.modules.GA.Stuffer.submit() successful"}catch(c){return this.handle(c,"DIL.modules.GA.Stuffer.submit() caught error with message ",
  81. this.dil)}}}};
  82. DIL.modules.Peer39={aid:"",dil:null,optionals:null,errorMessage:"",calledBack:!1,script:null,scriptsSent:[],returnedData:[],handle:DIL.modules.helpers.handleModuleError,init:function(a,c,e){try{this.dil=null;this.errorMessage="";this.calledBack=!1;this.optionals=e===Object(e)?e:{};e={name:"DIL Peer39 Module Error"};var b=[],h="";this.isSecurePageButNotEnabled(document.location.protocol)&&(h="Module has not been enabled for a secure page",b.push(h),e.message=h,DIL.errorModule.handleError(e));c instanceof
  83. DIL?(this.dil=c,e.partner=this.dil.api.getPartner()):(h="dilInstance is not a valid instance of DIL",b.push(h),e.message=h,DIL.errorModule.handleError(e));"string"===typeof a&&a.length?this.aid=a:(h="aid is not a string or is empty",b.push(h),e.message=h,DIL.errorModule.handleError(e));this.errorMessage=b.join("\n")}catch(g){this.handle(g,"DIL.modules.Peer39.init() caught error with message ",this.dil)}finally{return this}},isSecurePageButNotEnabled:function(a){return"https:"===a&&!0!==this.optionals.enableHTTPS?
  84. !0:!1},constructSignals:function(){var a=this,c=this.constructScript(),e=DIL.variables.scriptNodeList[0];window["afterFinished_"+this.aid]=function(){try{var b=a.processData(p39_KVP_Short("c_p","|").split("|"));b.hasSignals&&a.dil.api.signals(b.signals).submit()}catch(c){}finally{a.calledBack=!0,"function"===typeof a.optionals.afterResult&&a.optionals.afterResult()}};e.parentNode.insertBefore(c,e);this.scriptsSent.push(c);return"Request sent to Peer39"},processData:function(a){var c,e,b,h,g={},k=
  85. !1;this.returnedData.push(a);if(a instanceof Array)for(c=0,e=a.length;c<e;c++)b=a[c].split("="),h=b[0],b=b[1],h&&isFinite(b)&&!isNaN(parseInt(b,10))&&(g[h]instanceof Array||(g[h]=[]),g[h].push(b),k=!0);return{hasSignals:k,signals:g}},constructScript:function(){var a=document.createElement("script"),c=this.optionals,e=c.scriptId,b=c.scriptSrc,c=c.scriptParams;a.id="string"===typeof e&&e.length?e:"peer39ScriptLoader";a.type="text/javascript";"string"===typeof b&&b.length?a.src=b:(a.src=document.location.protocol+
  86. "//stags.peer39.net/"+this.aid+"/trg_"+this.aid+".js","string"===typeof c&&c.length&&(a.src+="?"+c));return a},submit:function(){try{return""!==this.errorMessage?this.errorMessage:this.constructSignals()}catch(a){return this.handle(a,"DIL.modules.Peer39.submit() caught error with message ",this.dil)}}};
  87. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement