(()=>{var Te={localStorage:Nt("localStorage"),sessionStorage:Nt("sessionStorage")},dt=t=>t instanceof ShadowRoot&&t.host;function N(t,e){for(;t.matches&&!t.matches(e)||dt(t);)dt(t)?t=t.host:t=t.parentNode;return t.matches?t:null}function pt(t,e,r){return r===void 0?r=[]:t!==e&&r.push(t),t!==e?(dt(t)?t=t.host:t=t.parentNode,pt(t,e,r)):r}var Rt=(t,e)=>{let r;if(Te[e]){r=window[e].getItem(`_dl${t}State`);try{r=JSON.parse(r||"{}")}catch{r={}}r.save=()=>{window[e].setItem(`_dl${t}State`,JSON.stringify(r))}}else r={},r.save=()=>{};return r.init=(a,i)=>(r[a]=r[a]!==void 0?r[a]:i,r[a]),r},L=Rt("","sessionStorage"),E=Rt("Local","localStorage");var wi=(t,e)=>t!=null?t==="true"?!0:t==="false"?!1:t.split("|").map(r=>r==="core"?"Data Layer":r):window.trackingDebug||e;window.trackingDebug=Ce("trackingDebug",wi)(window.location.href);var x={debug(){if(window.trackingDebug){if(Array.isArray(window.trackingDebug)&&window.trackingDebug.map(r=>r.toLowerCase()).indexOf(this._id.toLowerCase())===-1)return;var t=[...arguments],e=this.debugHeader||this._id;this.debugParams&&this.debugParams.length&&(e+=` (${this.debugParams.join(", ")})`),console.groupCollapsed?(console.groupCollapsed(`${e}: `),console.log.apply(this,t),console.groupEnd()):(t.unshift(`${e}: `),console.log.apply(this,t))}}};function ke(t){return["resi_myaccount_2","resi_cpp","resi_cpp_2","resi_support_2"].indexOf(t)>=0}function Le(t){return["idm","login","resi_buyflow","resi_buyflow_agent","resi_buyflow_approval","resi_shop","resi_shop_2","resi_shop_agent","resi_shop_ancillary","resi_store"].indexOf(t)>=0}function Mt(t){return["celestial"].indexOf(t)>=0}function D(){return document.currentScript}function v(t,e){if(!e)return;let r=U(e).search.toLowerCase();return new URLSearchParams(r).get(t.toLowerCase())}function Ce(t,e){return function(a){L.init(t,!1);let i=v(t,a);return L[t]=e(i,L[t]),L.save(),L[t]}}function U(t){try{if(t&&typeof t=="string"){let e=document.createElement("a");return e.href=t,{hostname:e.hostname,pathname:e.pathname,search:e.search,hash:e.hash}}}catch{}return{}}function Nt(t){try{var e=window[t],r="__storage_test__";return e.setItem(r,r),e.removeItem(r),!0}catch(a){return a instanceof DOMException&&(a.code===22||a.code===1014||a.name==="QuotaExceededError"||a.name==="NS_ERROR_DOM_QUOTA_REACHED")&&e.length!==0}}var vi=typeof global=="object"&&global&&global.Object===Object&&global,je=vi;var Ai=typeof self=="object"&&self&&self.Object===Object&&self,Si=je||Ai||Function("return this")(),_=Si;var Ei=_.Symbol,P=Ei;var Bt=Object.prototype,Ii=Bt.hasOwnProperty,Oi=Bt.toString,Ae=P?P.toStringTag:void 0;function Di(t){var e=Ii.call(t,Ae),r=t[Ae];try{t[Ae]=void 0;var a=!0}catch{}var i=Oi.call(t);return a&&(e?t[Ae]=r:delete t[Ae]),i}var Ut=Di;var Pi=Object.prototype,Ti=Pi.toString;function ki(t){return Ti.call(t)}var Gt=ki;var Li="[object Null]",Ci="[object Undefined]",Wt=P?P.toStringTag:void 0;function ji(t){return t==null?t===void 0?Ci:Li:Wt&&Wt in Object(t)?Ut(t):Gt(t)}var I=ji;function Ni(t){return t!=null&&typeof t=="object"}var A=Ni;var Ri="[object Symbol]";function Mi(t){return typeof t=="symbol"||A(t)&&I(t)==Ri}var G=Mi;function Bi(t,e){for(var r=-1,a=t==null?0:t.length,i=Array(a);++r<a;)i[r]=e(t[r],r,t);return i}var ae=Bi;var Ui=Array.isArray,b=Ui;var Gi=1/0,$t=P?P.prototype:void 0,Ht=$t?$t.toString:void 0;function Ft(t){if(typeof t=="string")return t;if(b(t))return ae(t,Ft)+"";if(G(t))return Ht?Ht.call(t):"";var e=t+"";return e=="0"&&1/t==-Gi?"-0":e}var qt=Ft;var Wi=/\s/;function $i(t){for(var e=t.length;e--&&Wi.test(t.charAt(e)););return e}var Vt=$i;var Hi=/^\s+/;function Fi(t){return t&&t.slice(0,Vt(t)+1).replace(Hi,"")}var Kt=Fi;function qi(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var y=qi;var Jt=NaN,Vi=/^[-+]0x[0-9a-f]+$/i,Ki=/^0b[01]+$/i,Ji=/^0o[0-7]+$/i,zi=parseInt;function Qi(t){if(typeof t=="number")return t;if(G(t))return Jt;if(y(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=y(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Kt(t);var r=Ki.test(t);return r||Ji.test(t)?zi(t.slice(2),r?2:8):Vi.test(t)?Jt:+t}var zt=Qi;var Qt=1/0,Xi=17976931348623157e292;function Yi(t){if(!t)return t===0?t:0;if(t=zt(t),t===Qt||t===-Qt){var e=t<0?-1:1;return e*Xi}return t===t?t:0}var Xt=Yi;function Zi(t){var e=Xt(t),r=e%1;return e===e?r?e-r:e:0}var Yt=Zi;function es(t){return t}var ie=es;var ts="[object AsyncFunction]",rs="[object Function]",as="[object GeneratorFunction]",is="[object Proxy]";function ss(t){if(!y(t))return!1;var e=I(t);return e==rs||e==as||e==ts||e==is}var se=ss;var os=_["__core-js_shared__"],Ne=os;var Zt=function(){var t=/[^.]+$/.exec(Ne&&Ne.keys&&Ne.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function ns(t){return!!Zt&&Zt in t}var er=ns;var fs=Function.prototype,us=fs.toString;function ds(t){if(t!=null){try{return us.call(t)}catch{}try{return t+""}catch{}}return""}var R=ds;var ps=/[\\^$.*+?()[\]{}|]/g,ls=/^\[object .+?Constructor\]$/,cs=Function.prototype,ms=Object.prototype,hs=cs.toString,gs=ms.hasOwnProperty,bs=RegExp("^"+hs.call(gs).replace(ps,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ys(t){if(!y(t)||er(t))return!1;var e=se(t)?bs:ls;return e.test(R(t))}var tr=ys;function xs(t,e){return t?.[e]}var rr=xs;function _s(t,e){var r=rr(t,e);return tr(r)?r:void 0}var O=_s;var ws=O(_,"WeakMap"),Re=ws;var ar=Object.create,vs=function(){function t(){}return function(e){if(!y(e))return{};if(ar)return ar(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}(),ir=vs;function As(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var sr=As;function Ss(t,e){var r=-1,a=t.length;for(e||(e=Array(a));++r<a;)e[r]=t[r];return e}var or=Ss;var Es=800,Is=16,Os=Date.now;function Ds(t){var e=0,r=0;return function(){var a=Os(),i=Is-(a-r);if(r=a,i>0){if(++e>=Es)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var nr=Ds;function Ps(t){return function(){return t}}var fr=Ps;var Ts=function(){try{var t=O(Object,"defineProperty");return t({},"",{}),t}catch{}}(),oe=Ts;var ks=oe?function(t,e){return oe(t,"toString",{configurable:!0,enumerable:!1,value:fr(e),writable:!0})}:ie,ur=ks;var Ls=nr(ur),dr=Ls;function Cs(t,e,r,a){for(var i=t.length,s=r+(a?1:-1);a?s--:++s<i;)if(e(t[s],s,t))return s;return-1}var pr=Cs;function js(t){return t!==t}var lr=js;function Ns(t,e,r){for(var a=r-1,i=t.length;++a<i;)if(t[a]===e)return a;return-1}var cr=Ns;function Rs(t,e,r){return e===e?cr(t,e,r):pr(t,lr,r)}var mr=Rs;var Ms=9007199254740991,Bs=/^(?:0|[1-9]\d*)$/;function Us(t,e){var r=typeof t;return e=e??Ms,!!e&&(r=="number"||r!="symbol"&&Bs.test(t))&&t>-1&&t%1==0&&t<e}var W=Us;function Gs(t,e,r){e=="__proto__"&&oe?oe(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var ne=Gs;function Ws(t,e){return t===e||t!==t&&e!==e}var C=Ws;var $s=Object.prototype,Hs=$s.hasOwnProperty;function Fs(t,e,r){var a=t[e];(!(Hs.call(t,e)&&C(a,r))||r===void 0&&!(e in t))&&ne(t,e,r)}var Me=Fs;function qs(t,e,r,a){var i=!r;r||(r={});for(var s=-1,f=e.length;++s<f;){var o=e[s],u=a?a(r[o],t[o],o,r,t):void 0;u===void 0&&(u=t[o]),i?ne(r,o,u):Me(r,o,u)}return r}var Be=qs;var hr=Math.max;function Vs(t,e,r){return e=hr(e===void 0?t.length-1:e,0),function(){for(var a=arguments,i=-1,s=hr(a.length-e,0),f=Array(s);++i<s;)f[i]=a[e+i];i=-1;for(var o=Array(e+1);++i<e;)o[i]=a[i];return o[e]=r(f),sr(t,this,o)}}var gr=Vs;function Ks(t,e){return dr(gr(t,e,ie),t+"")}var br=Ks;var Js=9007199254740991;function zs(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Js}var fe=zs;function Qs(t){return t!=null&&fe(t.length)&&!se(t)}var T=Qs;function Xs(t,e,r){if(!y(r))return!1;var a=typeof e;return(a=="number"?T(r)&&W(e,r.length):a=="string"&&e in r)?C(r[e],t):!1}var yr=Xs;function Ys(t){return br(function(e,r){var a=-1,i=r.length,s=i>1?r[i-1]:void 0,f=i>2?r[2]:void 0;for(s=t.length>3&&typeof s=="function"?(i--,s):void 0,f&&yr(r[0],r[1],f)&&(s=i<3?void 0:s,i=1),e=Object(e);++a<i;){var o=r[a];o&&t(e,o,a,s)}return e})}var ue=Ys;var Zs=Object.prototype;function eo(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Zs;return t===r}var de=eo;function to(t,e){for(var r=-1,a=Array(t);++r<t;)a[r]=e(r);return a}var xr=to;var ro="[object Arguments]";function ao(t){return A(t)&&I(t)==ro}var lt=ao;var _r=Object.prototype,io=_r.hasOwnProperty,so=_r.propertyIsEnumerable,oo=lt(function(){return arguments}())?lt:function(t){return A(t)&&io.call(t,"callee")&&!so.call(t,"callee")},X=oo;function no(){return!1}var wr=no;var Sr=typeof exports=="object"&&exports&&!exports.nodeType&&exports,vr=Sr&&typeof module=="object"&&module&&!module.nodeType&&module,fo=vr&&vr.exports===Sr,Ar=fo?_.Buffer:void 0,uo=Ar?Ar.isBuffer:void 0,po=uo||wr,Y=po;var lo="[object Arguments]",co="[object Array]",mo="[object Boolean]",ho="[object Date]",go="[object Error]",bo="[object Function]",yo="[object Map]",xo="[object Number]",_o="[object Object]",wo="[object RegExp]",vo="[object Set]",Ao="[object String]",So="[object WeakMap]",Eo="[object ArrayBuffer]",Io="[object DataView]",Oo="[object Float32Array]",Do="[object Float64Array]",Po="[object Int8Array]",To="[object Int16Array]",ko="[object Int32Array]",Lo="[object Uint8Array]",Co="[object Uint8ClampedArray]",jo="[object Uint16Array]",No="[object Uint32Array]",g={};g[Oo]=g[Do]=g[Po]=g[To]=g[ko]=g[Lo]=g[Co]=g[jo]=g[No]=!0;g[lo]=g[co]=g[Eo]=g[mo]=g[Io]=g[ho]=g[go]=g[bo]=g[yo]=g[xo]=g[_o]=g[wo]=g[vo]=g[Ao]=g[So]=!1;function Ro(t){return A(t)&&fe(t.length)&&!!g[I(t)]}var Er=Ro;function Mo(t){return function(e){return t(e)}}var Ir=Mo;var Or=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Se=Or&&typeof module=="object"&&module&&!module.nodeType&&module,Bo=Se&&Se.exports===Or,ct=Bo&&je.process,Uo=function(){try{var t=Se&&Se.require&&Se.require("util").types;return t||ct&&ct.binding&&ct.binding("util")}catch{}}(),mt=Uo;var Dr=mt&&mt.isTypedArray,Go=Dr?Ir(Dr):Er,pe=Go;var Wo=Object.prototype,$o=Wo.hasOwnProperty;function Ho(t,e){var r=b(t),a=!r&&X(t),i=!r&&!a&&Y(t),s=!r&&!a&&!i&&pe(t),f=r||a||i||s,o=f?xr(t.length,String):[],u=o.length;for(var p in t)(e||$o.call(t,p))&&!(f&&(p=="length"||i&&(p=="offset"||p=="parent")||s&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||W(p,u)))&&o.push(p);return o}var Ue=Ho;function Fo(t,e){return function(r){return t(e(r))}}var Ge=Fo;var qo=Ge(Object.keys,Object),Pr=qo;var Vo=Object.prototype,Ko=Vo.hasOwnProperty;function Jo(t){if(!de(t))return Pr(t);var e=[];for(var r in Object(t))Ko.call(t,r)&&r!="constructor"&&e.push(r);return e}var We=Jo;function zo(t){return T(t)?Ue(t):We(t)}var le=zo;function Qo(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var Tr=Qo;var Xo=Object.prototype,Yo=Xo.hasOwnProperty;function Zo(t){if(!y(t))return Tr(t);var e=de(t),r=[];for(var a in t)a=="constructor"&&(e||!Yo.call(t,a))||r.push(a);return r}var kr=Zo;function en(t){return T(t)?Ue(t,!0):kr(t)}var $=en;var tn=ue(function(t,e,r,a){Be(e,$(e),t,a)}),ce=tn;var rn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,an=/^\w*$/;function sn(t,e){if(b(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||G(t)?!0:an.test(t)||!rn.test(t)||e!=null&&t in Object(e)}var me=sn;var on=O(Object,"create"),M=on;function nn(){this.__data__=M?M(null):{},this.size=0}var Lr=nn;function fn(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Cr=fn;var un="__lodash_hash_undefined__",dn=Object.prototype,pn=dn.hasOwnProperty;function ln(t){var e=this.__data__;if(M){var r=e[t];return r===un?void 0:r}return pn.call(e,t)?e[t]:void 0}var jr=ln;var cn=Object.prototype,mn=cn.hasOwnProperty;function hn(t){var e=this.__data__;return M?e[t]!==void 0:mn.call(e,t)}var Nr=hn;var gn="__lodash_hash_undefined__";function bn(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=M&&e===void 0?gn:e,this}var Rr=bn;function he(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var a=t[e];this.set(a[0],a[1])}}he.prototype.clear=Lr;he.prototype.delete=Cr;he.prototype.get=jr;he.prototype.has=Nr;he.prototype.set=Rr;var ht=he;function yn(){this.__data__=[],this.size=0}var Mr=yn;function xn(t,e){for(var r=t.length;r--;)if(C(t[r][0],e))return r;return-1}var H=xn;var _n=Array.prototype,wn=_n.splice;function vn(t){var e=this.__data__,r=H(e,t);if(r<0)return!1;var a=e.length-1;return r==a?e.pop():wn.call(e,r,1),--this.size,!0}var Br=vn;function An(t){var e=this.__data__,r=H(e,t);return r<0?void 0:e[r][1]}var Ur=An;function Sn(t){return H(this.__data__,t)>-1}var Gr=Sn;function En(t,e){var r=this.__data__,a=H(r,t);return a<0?(++this.size,r.push([t,e])):r[a][1]=e,this}var Wr=En;function ge(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var a=t[e];this.set(a[0],a[1])}}ge.prototype.clear=Mr;ge.prototype.delete=Br;ge.prototype.get=Ur;ge.prototype.has=Gr;ge.prototype.set=Wr;var F=ge;var In=O(_,"Map"),q=In;function On(){this.size=0,this.__data__={hash:new ht,map:new(q||F),string:new ht}}var $r=On;function Dn(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var Hr=Dn;function Pn(t,e){var r=t.__data__;return Hr(e)?r[typeof e=="string"?"string":"hash"]:r.map}var V=Pn;function Tn(t){var e=V(this,t).delete(t);return this.size-=e?1:0,e}var Fr=Tn;function kn(t){return V(this,t).get(t)}var qr=kn;function Ln(t){return V(this,t).has(t)}var Vr=Ln;function Cn(t,e){var r=V(this,t),a=r.size;return r.set(t,e),this.size+=r.size==a?0:1,this}var Kr=Cn;function be(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var a=t[e];this.set(a[0],a[1])}}be.prototype.clear=$r;be.prototype.delete=Fr;be.prototype.get=qr;be.prototype.has=Vr;be.prototype.set=Kr;var Z=be;var jn="Expected a function";function gt(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(jn);var r=function(){var a=arguments,i=e?e.apply(this,a):a[0],s=r.cache;if(s.has(i))return s.get(i);var f=t.apply(this,a);return r.cache=s.set(i,f)||s,f};return r.cache=new(gt.Cache||Z),r}gt.Cache=Z;var Jr=gt;var Nn=500;function Rn(t){var e=Jr(t,function(a){return r.size===Nn&&r.clear(),a}),r=e.cache;return e}var zr=Rn;var Mn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Bn=/\\(\\)?/g,Un=zr(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Mn,function(r,a,i,s){e.push(i?s.replace(Bn,"$1"):a||r)}),e}),Qr=Un;function Gn(t){return t==null?"":qt(t)}var Xr=Gn;function Wn(t,e){return b(t)?t:me(t,e)?[t]:Qr(Xr(t))}var K=Wn;var $n=1/0;function Hn(t){if(typeof t=="string"||G(t))return t;var e=t+"";return e=="0"&&1/t==-$n?"-0":e}var j=Hn;function Fn(t,e){e=K(e,t);for(var r=0,a=e.length;t!=null&&r<a;)t=t[j(e[r++])];return r&&r==a?t:void 0}var ye=Fn;function qn(t,e,r){var a=t==null?void 0:ye(t,e);return a===void 0?r:a}var n=qn;function Vn(t,e){for(var r=-1,a=e.length,i=t.length;++r<a;)t[i+r]=e[r];return t}var $e=Vn;var Kn=Ge(Object.getPrototypeOf,Object),xe=Kn;var Jn="[object Object]",zn=Function.prototype,Qn=Object.prototype,Yr=zn.toString,Xn=Qn.hasOwnProperty,Yn=Yr.call(Object);function Zn(t){if(!A(t)||I(t)!=Jn)return!1;var e=xe(t);if(e===null)return!0;var r=Xn.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Yr.call(r)==Yn}var _e=Zn;var ef="\\ud800-\\udfff",tf="\\u0300-\\u036f",rf="\\ufe20-\\ufe2f",af="\\u20d0-\\u20ff",sf=tf+rf+af,of="\\ufe0e\\ufe0f",nf="\\u200d",ff=RegExp("["+nf+ef+sf+of+"]");function uf(t){return ff.test(t)}var Zr=uf;function df(){this.__data__=new F,this.size=0}var ea=df;function pf(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var ta=pf;function lf(t){return this.__data__.get(t)}var ra=lf;function cf(t){return this.__data__.has(t)}var aa=cf;var mf=200;function hf(t,e){var r=this.__data__;if(r instanceof F){var a=r.__data__;if(!q||a.length<mf-1)return a.push([t,e]),this.size=++r.size,this;r=this.__data__=new Z(a)}return r.set(t,e),this.size=r.size,this}var ia=hf;function we(t){var e=this.__data__=new F(t);this.size=e.size}we.prototype.clear=ea;we.prototype.delete=ta;we.prototype.get=ra;we.prototype.has=aa;we.prototype.set=ia;var J=we;var fa=typeof exports=="object"&&exports&&!exports.nodeType&&exports,sa=fa&&typeof module=="object"&&module&&!module.nodeType&&module,gf=sa&&sa.exports===fa,oa=gf?_.Buffer:void 0,na=oa?oa.allocUnsafe:void 0;function bf(t,e){if(e)return t.slice();var r=t.length,a=na?na(r):new t.constructor(r);return t.copy(a),a}var ua=bf;function yf(t,e){for(var r=-1,a=t==null?0:t.length,i=0,s=[];++r<a;){var f=t[r];e(f,r,t)&&(s[i++]=f)}return s}var da=yf;function xf(){return[]}var He=xf;var _f=Object.prototype,wf=_f.propertyIsEnumerable,pa=Object.getOwnPropertySymbols,vf=pa?function(t){return t==null?[]:(t=Object(t),da(pa(t),function(e){return wf.call(t,e)}))}:He,Fe=vf;var Af=Object.getOwnPropertySymbols,Sf=Af?function(t){for(var e=[];t;)$e(e,Fe(t)),t=xe(t);return e}:He,la=Sf;function Ef(t,e,r){var a=e(t);return b(t)?a:$e(a,r(t))}var qe=Ef;function If(t){return qe(t,le,Fe)}var bt=If;function Of(t){return qe(t,$,la)}var ca=Of;var Df=O(_,"DataView"),Ve=Df;var Pf=O(_,"Promise"),Ke=Pf;var Tf=O(_,"Set"),Je=Tf;var ma="[object Map]",kf="[object Object]",ha="[object Promise]",ga="[object Set]",ba="[object WeakMap]",ya="[object DataView]",Lf=R(Ve),Cf=R(q),jf=R(Ke),Nf=R(Je),Rf=R(Re),ee=I;(Ve&&ee(new Ve(new ArrayBuffer(1)))!=ya||q&&ee(new q)!=ma||Ke&&ee(Ke.resolve())!=ha||Je&&ee(new Je)!=ga||Re&&ee(new Re)!=ba)&&(ee=function(t){var e=I(t),r=e==kf?t.constructor:void 0,a=r?R(r):"";if(a)switch(a){case Lf:return ya;case Cf:return ma;case jf:return ha;case Nf:return ga;case Rf:return ba}return e});var Ee=ee;var Mf=_.Uint8Array,ve=Mf;function Bf(t){var e=new t.constructor(t.byteLength);return new ve(e).set(new ve(t)),e}var xa=Bf;function Uf(t,e){var r=e?xa(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var _a=Uf;function Gf(t){return typeof t.constructor=="function"&&!de(t)?ir(xe(t)):{}}var wa=Gf;var Wf="__lodash_hash_undefined__";function $f(t){return this.__data__.set(t,Wf),this}var va=$f;function Hf(t){return this.__data__.has(t)}var Aa=Hf;function ze(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new Z;++e<r;)this.add(t[e])}ze.prototype.add=ze.prototype.push=va;ze.prototype.has=Aa;var Sa=ze;function Ff(t,e){for(var r=-1,a=t==null?0:t.length;++r<a;)if(e(t[r],r,t))return!0;return!1}var Ea=Ff;function qf(t,e){return t.has(e)}var Ia=qf;var Vf=1,Kf=2;function Jf(t,e,r,a,i,s){var f=r&Vf,o=t.length,u=e.length;if(o!=u&&!(f&&u>o))return!1;var p=s.get(t),d=s.get(e);if(p&&d)return p==e&&d==t;var c=-1,m=!0,h=r&Kf?new Sa:void 0;for(s.set(t,e),s.set(e,t);++c<o;){var S=t[c],k=e[c];if(a)var B=f?a(k,S,c,e,t,s):a(S,k,c,t,e,s);if(B!==void 0){if(B)continue;m=!1;break}if(h){if(!Ea(e,function(z,Q){if(!Ia(h,Q)&&(S===z||i(S,z,r,a,s)))return h.push(Q)})){m=!1;break}}else if(!(S===k||i(S,k,r,a,s))){m=!1;break}}return s.delete(t),s.delete(e),m}var Qe=Jf;function zf(t){var e=-1,r=Array(t.size);return t.forEach(function(a,i){r[++e]=[i,a]}),r}var Oa=zf;function Qf(t){var e=-1,r=Array(t.size);return t.forEach(function(a){r[++e]=a}),r}var Da=Qf;var Xf=1,Yf=2,Zf="[object Boolean]",eu="[object Date]",tu="[object Error]",ru="[object Map]",au="[object Number]",iu="[object RegExp]",su="[object Set]",ou="[object String]",nu="[object Symbol]",fu="[object ArrayBuffer]",uu="[object DataView]",Pa=P?P.prototype:void 0,yt=Pa?Pa.valueOf:void 0;function du(t,e,r,a,i,s,f){switch(r){case uu:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case fu:return!(t.byteLength!=e.byteLength||!s(new ve(t),new ve(e)));case Zf:case eu:case au:return C(+t,+e);case tu:return t.name==e.name&&t.message==e.message;case iu:case ou:return t==e+"";case ru:var o=Oa;case su:var u=a&Xf;if(o||(o=Da),t.size!=e.size&&!u)return!1;var p=f.get(t);if(p)return p==e;a|=Yf,f.set(t,e);var d=Qe(o(t),o(e),a,i,s,f);return f.delete(t),d;case nu:if(yt)return yt.call(t)==yt.call(e)}return!1}var Ta=du;var pu=1,lu=Object.prototype,cu=lu.hasOwnProperty;function mu(t,e,r,a,i,s){var f=r&pu,o=bt(t),u=o.length,p=bt(e),d=p.length;if(u!=d&&!f)return!1;for(var c=u;c--;){var m=o[c];if(!(f?m in e:cu.call(e,m)))return!1}var h=s.get(t),S=s.get(e);if(h&&S)return h==e&&S==t;var k=!0;s.set(t,e),s.set(e,t);for(var B=f;++c<u;){m=o[c];var z=t[m],Q=e[m];if(a)var jt=f?a(Q,z,m,e,t,s):a(z,Q,m,t,e,s);if(!(jt===void 0?z===Q||i(z,Q,r,a,s):jt)){k=!1;break}B||(B=m=="constructor")}if(k&&!B){var De=t.constructor,Pe=e.constructor;De!=Pe&&"constructor"in t&&"constructor"in e&&!(typeof De=="function"&&De instanceof De&&typeof Pe=="function"&&Pe instanceof Pe)&&(k=!1)}return s.delete(t),s.delete(e),k}var ka=mu;var hu=1,La="[object Arguments]",Ca="[object Array]",Xe="[object Object]",gu=Object.prototype,ja=gu.hasOwnProperty;function bu(t,e,r,a,i,s){var f=b(t),o=b(e),u=f?Ca:Ee(t),p=o?Ca:Ee(e);u=u==La?Xe:u,p=p==La?Xe:p;var d=u==Xe,c=p==Xe,m=u==p;if(m&&Y(t)){if(!Y(e))return!1;f=!0,d=!1}if(m&&!d)return s||(s=new J),f||pe(t)?Qe(t,e,r,a,i,s):Ta(t,e,u,r,a,i,s);if(!(r&hu)){var h=d&&ja.call(t,"__wrapped__"),S=c&&ja.call(e,"__wrapped__");if(h||S){var k=h?t.value():t,B=S?e.value():e;return s||(s=new J),i(k,B,r,a,s)}}return m?(s||(s=new J),ka(t,e,r,a,i,s)):!1}var Na=bu;function Ra(t,e,r,a,i){return t===e?!0:t==null||e==null||!A(t)&&!A(e)?t!==t&&e!==e:Na(t,e,r,a,Ra,i)}var Ye=Ra;var yu=1,xu=2;function _u(t,e,r,a){var i=r.length,s=i,f=!a;if(t==null)return!s;for(t=Object(t);i--;){var o=r[i];if(f&&o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++i<s;){o=r[i];var u=o[0],p=t[u],d=o[1];if(f&&o[2]){if(p===void 0&&!(u in t))return!1}else{var c=new J;if(a)var m=a(p,d,u,t,e,c);if(!(m===void 0?Ye(d,p,yu|xu,a,c):m))return!1}}return!0}var Ma=_u;function wu(t){return t===t&&!y(t)}var Ze=wu;function vu(t){for(var e=le(t),r=e.length;r--;){var a=e[r],i=t[a];e[r]=[a,i,Ze(i)]}return e}var Ba=vu;function Au(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}var et=Au;function Su(t){var e=Ba(t);return e.length==1&&e[0][2]?et(e[0][0],e[0][1]):function(r){return r===t||Ma(r,t,e)}}var Ua=Su;function Eu(t,e){return t!=null&&e in Object(t)}var Ga=Eu;function Iu(t,e,r){e=K(e,t);for(var a=-1,i=e.length,s=!1;++a<i;){var f=j(e[a]);if(!(s=t!=null&&r(t,f)))break;t=t[f]}return s||++a!=i?s:(i=t==null?0:t.length,!!i&&fe(i)&&W(f,i)&&(b(t)||X(t)))}var Wa=Iu;function Ou(t,e){return t!=null&&Wa(t,e,Ga)}var $a=Ou;var Du=1,Pu=2;function Tu(t,e){return me(t)&&Ze(e)?et(j(t),e):function(r){var a=n(r,t);return a===void 0&&a===e?$a(r,t):Ye(e,a,Du|Pu)}}var Ha=Tu;function ku(t){return function(e){return e?.[t]}}var tt=ku;function Lu(t){return function(e){return ye(e,t)}}var Fa=Lu;function Cu(t){return me(t)?tt(j(t)):Fa(t)}var qa=Cu;function ju(t){return typeof t=="function"?t:t==null?ie:typeof t=="object"?b(t)?Ha(t[0],t[1]):Ua(t):qa(t)}var rt=ju;function Nu(t){return function(e,r,a){for(var i=-1,s=Object(e),f=a(e),o=f.length;o--;){var u=f[t?o:++i];if(r(s[u],u,s)===!1)break}return e}}var Va=Nu;var Ru=Va(),Ka=Ru;function Mu(t,e,r){(r!==void 0&&!C(t[e],r)||r===void 0&&!(e in t))&&ne(t,e,r)}var Ie=Mu;function Bu(t){return A(t)&&T(t)}var Ja=Bu;function Uu(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var Oe=Uu;function Gu(t){return Be(t,$(t))}var za=Gu;function Wu(t,e,r,a,i,s,f){var o=Oe(t,r),u=Oe(e,r),p=f.get(u);if(p){Ie(t,r,p);return}var d=s?s(o,u,r+"",t,e,f):void 0,c=d===void 0;if(c){var m=b(u),h=!m&&Y(u),S=!m&&!h&&pe(u);d=u,m||h||S?b(o)?d=o:Ja(o)?d=or(o):h?(c=!1,d=ua(u,!0)):S?(c=!1,d=_a(u,!0)):d=[]:_e(u)||X(u)?(d=o,X(o)?d=za(o):(!y(o)||se(o))&&(d=wa(u))):c=!1}c&&(f.set(u,d),i(d,u,a,s,f),f.delete(u)),Ie(t,r,d)}var Qa=Wu;function Xa(t,e,r,a,i){t!==e&&Ka(e,function(s,f){if(i||(i=new J),y(s))Qa(t,e,f,r,Xa,a,i);else{var o=a?a(Oe(t,f),s,f+"",t,e,i):void 0;o===void 0&&(o=s),Ie(t,f,o)}},$)}var at=Xa;var $u=ue(function(t,e,r,a){at(t,e,r,a)}),it=$u;var Hu="[object String]";function Fu(t){return typeof t=="string"||!b(t)&&A(t)&&I(t)==Hu}var st=Fu;function qu(t,e){return ae(e,function(r){return t[r]})}var Ya=qu;function Vu(t){return t==null?[]:Ya(t,le(t))}var Za=Vu;var Ku=Math.max;function Ju(t,e,r,a){t=T(t)?t:Za(t),r=r&&!a?Yt(r):0;var i=t.length;return r<0&&(r=Ku(i+r,0)),st(t)?r<=i&&t.indexOf(e,r)>-1:!!i&&mr(t,e,r)>-1}var xt=Ju;function zu(t){return t==null}var te=zu;var Qu=ue(function(t,e,r){at(t,e,r)}),l=Qu;var Xu="Expected a function";function Yu(t){if(typeof t!="function")throw new TypeError(Xu);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}var ei=Yu;function Zu(t,e,r,a){if(!y(t))return t;e=K(e,t);for(var i=-1,s=e.length,f=s-1,o=t;o!=null&&++i<s;){var u=j(e[i]),p=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return t;if(i!=f){var d=o[u];p=a?a(d,u,o):void 0,p===void 0&&(p=y(d)?d:W(e[i+1])?[]:{})}Me(o,u,p),o=o[u]}return t}var ot=Zu;function ed(t,e,r){for(var a=-1,i=e.length,s={};++a<i;){var f=e[a],o=ye(t,f);r(o,f)&&ot(s,K(f,t),o)}return s}var ti=ed;function td(t,e){if(t==null)return{};var r=ae(ca(t),function(a){return[a]});return e=rt(e),ti(t,r,function(a,i){return e(a,i[0])})}var ri=td;function rd(t,e){return ri(t,ei(rt(e)))}var re=rd;var ad=tt("length"),ai=ad;var si="\\ud800-\\udfff",id="\\u0300-\\u036f",sd="\\ufe20-\\ufe2f",od="\\u20d0-\\u20ff",nd=id+sd+od,fd="\\ufe0e\\ufe0f",ud="["+si+"]",_t="["+nd+"]",wt="\\ud83c[\\udffb-\\udfff]",dd="(?:"+_t+"|"+wt+")",oi="[^"+si+"]",ni="(?:\\ud83c[\\udde6-\\uddff]){2}",fi="[\\ud800-\\udbff][\\udc00-\\udfff]",pd="\\u200d",ui=dd+"?",di="["+fd+"]?",ld="(?:"+pd+"(?:"+[oi,ni,fi].join("|")+")"+di+ui+")*",cd=di+ui+ld,md="(?:"+[oi+_t+"?",_t,ni,fi,ud].join("|")+")",ii=RegExp(wt+"(?="+wt+")|"+md+cd,"g");function hd(t){for(var e=ii.lastIndex=0;ii.test(t);)++e;return e}var pi=hd;function gd(t){return Zr(t)?pi(t):ai(t)}var li=gd;function bd(t,e,r){return t==null?t:ot(t,e,r)}var w=bd;var yd="[object Map]",xd="[object Set]";function _d(t){if(t==null)return 0;if(T(t))return st(t)?li(t):t.length;var e=Ee(t);return e==yd||e==xd?t.size:We(t).length}var vt=_d;var At=class{constructor(){let e=D();this.appId=e&&v("appId",e.src),this._id="App-Log",l(this,x),this.debugHeader=`Data Layer ${this._id} Plugin`,this.debugParams=[],ke(this.appId)&&(this.supportsBeacon=n(window,"navigator.sendBeacon"),this._version="3.21.31",this.bindListeners())}bindListeners(){document.addEventListener("c-tracking-trigger",this.executeTrackingCall.bind(this),!1),document.addEventListener("c-tracking-load-defaults",this.setDefaults.bind(this),!1)}setDefaults(e){e.detail.plugins.push({name:this._id,version:this._version,appId:this.appId,errorDetected:this.checkErrors()})}checkErrors(){return(this.pluginError||typeof XMLHttpRequest!="function")&&(this.pluginError=!0),this.pluginError}sendAjax(e,r,a){if(r&&this.supportsBeacon)navigator.sendBeacon("https://dss-dl-prod.aws-origin.xfinity.com/prod/event/",JSON.stringify(a));else{var i=new XMLHttpRequest;i._fromDL=!0,i.onreadystatechange=i.ontimeout=function(s){s.target.readyState===XMLHttpRequest.DONE&&(this.debugParams=[e,"done"],this.debug(i.status===200?"SUCCESS":"FAILED",', Type: "',s.type,'", Request Obj: ',s.target))}.bind(this),i.open("PUT","https://dss-dl-prod.aws-origin.xfinity.com/prod/event/",!r),i.setRequestHeader("Content-Type","application/json"),i.send(JSON.stringify(a))}this.debugParams=[e,"send"],this.debug('Payload: "',a,'"')}sendRequest(e,r,a){var i={method:r,Data:JSON.stringify(e)};this.sendAjax(r,a,i)}executeTrackingCall(e){try{var r=l({},e.detail.data.eventInfo),a,i=!1,s=n(r,"_sendWithBeacon",!1),f=n(r,"eventMethod","")||"send-Event";switch(delete r._sendWithBeacon,f){case"c-tracking-ajax":n(r,"performance.ajax")&&(r.ajax=n(r,"performance.ajax[0]"),delete r.performance.ajax);case"client-exception":case"app-log":i=!0;break;default:break}i&&!this.pluginError&&(r.skipEventKeys=r.skipEventKeys||[],l(r,["schemaVersion","version","subSchemas","siteInfo.visitorID","siteInfo.sessionID","siteInfo.ctpSessionID","shared.visitorID","shared.sessionID","browserInfo.location","browserInfo.referrer","browserInfo.navigator.userAgent","page.pageInfo.pageName","page.codebase.name","user[0].segment","user[0].profile[0].profileInfo.customerType","user[0].profile[0].profileInfo.custGUID","user[0].profile[0].profileInfo.authenticationType","user[0].profile[0].profileInfo.authGUID"].concat(n(window,"digitalData.config.plugins.appLog.eventFields",[])).reduce((o,u)=>{if(typeof u=="string"&&u.startsWith("func:")){let d=n(window,u.substr(u.indexOf(":")+1),function(){})();if(typeof d=="object"&&d!==null)try{l(o,d)}catch(c){this.debug(`Exception occurred executing '${u}' callback. Error was '${c.message}'`)}else this.debug(`Invalid value returned from '${u}' callback. Value was '${d}'. Only Objects are allowed.`)}else!r.skipEventKeys.indexOf(u)!==-1&&w(o,u,n(window.digitalData,u,void 0));return o},{eventMethod:f})),delete r.skipEventKeys,n(r,"user[0]")&&(r.user=n(r,"user[0]"),n(r,"user.profile[0]")&&(r.user.profile=n(r,"user.profile[0]"))),a=r,this.sendRequest(a,f,s))}catch(o){this.debug("EXCEPTION:",o,this.pluginError?"APP-LOG NOT AVAILABLE!":"")}}},Qx=new At;var St=class{constructor(){let e=D();this.appId=e&&v("appId",e.src)||"",l(this,x),this._id="techTags",this.debugHeader=`Data Layer ${this._id} Plugin`,this.debugParams=[],this.preloadedApps=[],this._version="3.21.31",this.bindListeners()}bindListeners(){document.addEventListener("c-tracking-trigger",this.dlUpdated.bind(this),!1),document.addEventListener("c-tracking-load-defaults",this.setDefaults.bind(this),!1)}setDefaults(e){e.detail.plugins.push({name:this._id,version:this._version,appId:this.appId})}shouldExec(e){let r=(n(e,"detail.page.codebase.name")||n(window.digitalData,"page.codebase.name")||"").toLowerCase(),a=n(e,`detail.config.plugins.${this._id}.active`)||n(window.digitalData,`config.plugins.${this._id}.active`),i=["consent-ui","df buyflow","df checkout","df learn","df my plan","digital","modular","now-ui","orderlab","resi_buyflow","resi_buyflow_agent","resi_buyflow_approval","resi_cpp","resi_global","resi_myaccount","resi_myaccount_2","resi_shop","resi_shop_2","resi_shop_agent","resi_subscription_management","resi_support_2","resi_xm_buyflow_2","resi_xm_shop_2","xds","xoe digital repo","xoe portal","xoe-customer-disconnect","xoe-device-management"];return a||i.indexOf(r)!==-1||i.indexOf(this.appId.toLowerCase())!==-1?this.tagsActivated=!0:(n(window.digitalData,"performance")&&(this.tagsActivated=!0),!1)}appDKey(e){var r;r={"now-ui":"AD-AAB-ADZ-REG",resi_myaccount:"AD-AAB-AAB-SMZ",resi_myaccount_2:"AD-AAB-ADY-UBU",resi_support_2:"AD-AAB-ADY-UBU",resi_cpp:"AD-AAB-ADY-UBU",resi_subscription_management:"AD-AAB-ABK-VWE",resi_xm_buyflow_2:"AD-AAB-AAJ-NTY",resi_xm_shop_2:"AD-AAB-AAJ-NTY",default:"AD-AAB-AAB-RTC"};let a=n(e,"detail.page.codebase.name")||n(window.digitalData,"page.codebase.name","");return r[this.appId.toLowerCase()]||r[a]||r.default}injectAppD(e){if(!window.ADRUM&&!window["adrum-config"]){window["adrum-start-time"]=new Date().getTime();let i=n(e,`detail.config.plugins.${this._id}.isAngularApp`)||n(window.digitalData,`config.plugins.${this._id}.isAngularApp`);(function(s){s.appKey=this.appDKey(e),s.adrumExtUrlHttp="http://assets.xfinity.com/assets/dotcom/adrum",s.adrumExtUrlHttps="https://assets.xfinity.com/assets/dotcom/adrum",s.beaconUrlHttp="http://col.eum-appdynamics.com",s.beaconUrlHttps="https://col.eum-appdynamics.com",s.xd={enable:!1},s.longStackTrace=!1,s.spa={spa2:!0},s.noConflictPromiseMode=!0,s.enableCoreWebVitals=!0,i===!0&&(s.isZonePromise=!0,s.angular=!0)}).call(this,window["adrum-config"]||(window["adrum-config"]={}));var r=document.createElement("script");r.type="text/javascript",r.async=!0,r.src="//assets.xfinity.com/assets/dotcom/adrum/adrum22603859.js";var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(r,a)}}dlUpdated(e){this.tagsActivated||this.shouldExec(e)&&this.injectAppD(e),e?.detail?.type==="c-tracking-init-complete"&&this.checkPreload(e).forEach(this.executePreLoad.bind(this))}checkPreload(e){let r=n(e,`detail.config.plugins.${this._id}.preload`)||n(window.digitalData,`config.plugins.${this._id}.preload`)||[];return["resi_shop","resi_shop_2","resi_shop_agent"].indexOf(this.appId.toLowerCase())!==-1&&r.push({appID:"resi_buyflow",useDC:!0,resourceURL:"/buy/includes/dist/manifest.json"}),r}async processResourceJSON(e,r){this.debug("Process Resource:",e,r);let a=await r.json();this.debug("Process Resource Content:",a),Object.keys(a).forEach(i=>{let s=document.createElement("link");s.rel="prefetch",e&&e.endsWith("/")&&a[i].startsWith("/")&&(e=e.substr(0,e.length-1)),s.href=(e||"")+a[i];let f="",o=U(s.href).pathname?.match(/(\.\w+$)/gim);if(o&&o.length>0)switch(o[0].toLowerCase()){case".js":f="script";break;case".css":f="style";break}s.as=f,document.head.appendChild(s),this.debug("Link Processed:",i,s)})}executePreLoad(e){if(this.preloadedApps.indexOf(e.appID.toLowerCase())!==-1){this.debug("App already pre-loaded:",e);return}this.preloadedApps.push(e.appID.toLowerCase());let r=e.resourceURL,a={};if(e.useDC){let i=document.cookie.split(";").map(s=>s.split("=")[0].trim());if(a=[{id:"wc",path:"wcdc"},{id:"po",path:"pdc"},{id:"ch",path:"ch2"}].map(s=>({name:`www-prd_${s.id}`,url:`https://cdn.${s.path}.comcast.com`})).find(s=>i.indexOf(s.name)!==-1),this.debug("DC:",e,a),!a){document.body.dispatchEvent(new CustomEvent("c-tracking-log-error",{detail:new Error(`Data Center cookie not found for ${e.appID}`),bubbles:!0})),this.debug("Data Center Cookie not found");return}r=a.url+r}this.debug("Full Url: ",r);try{fetch(r).then(this.processResourceJSON.bind(this,a.url)).catch(i=>{document.body.dispatchEvent(new CustomEvent("c-tracking-log-error",{detail:i,bubbles:!0}))})}catch{}}},t_=new St;function nt(t){let e=document.cookie.split(";");for(let r=0;r<e.length;r++){let a=e[r].indexOf("="),i=e[r].substring(0,a),s=e[r].substring(a+1);if(i.trim()===t)return decodeURIComponent(s)}return null}function ft(t){return t?t.split("&").reduce((e,r)=>{if(r==="")return e;let[a,i]=r.split("=");return e[a]=i,e},{}):{}}function wd(t){return Object.entries(t).map(([e,r])=>`${e}=${r}`).join("&")}function ci(){return crypto.randomUUID?crypto.randomUUID():"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}function mi(t,e){let r=new Date,a=60*60*1e3,i=ft(nt("SC"));i["RC.USID"]=t;let s=new Date(r.getTime()+12*a).toUTCString();document.cookie=`SC=${wd(i)};domain=.xfinity.com;expires=${s};path=/;secure;samesite=lax;`;let f=ft(nt("PSC"));f.UCID=e;let o=new Date(r.getTime()+365*24*a);document.cooke=`PSC=${f};domain=.xfinity.com;expires=${o};path=/;secure;samesite=lax;`}function hi(){let t=ft(nt("SC"))["RC.USID"]||ci(),e=ft(nt("PSC")).UCID||ci();return{sessionID:t,visitorID:e}}var Et=class{constructor(){this.currentScript=D(),this.appId=this.currentScript&&v("appId",this.currentScript.src)||"",l(this,x),this._id="xfinity-session",this.debugHeader=`Data Layer ${this._id} Plugin`,this.debugParams=[],this.polarisData=E.init("polaris",{}),this.appId.startsWith("resi_xm")&&this.polarisData.custGUID&&setTimeout(this.checkOptOut.bind(this),0),this.xmTempOptOut(),this.updatePolarisInfo(),this.bindListeners(),this.debug("initialized"),this.initInfo()}xmTempOptOut(){if(this.appId.startsWith("resi_xm")){if(!n(window,"digitalData.performance.pageView")){this.debug("OptOut Waiting for XM page view"),setTimeout(this.xmTempOptOut.bind(this),200);return}this.polarisData.custGUID=n(window,"digitalData.users[0].profile[0].profileInfo.custGUID",void 0),E.polaris=this.polarisData,E.save(),this.debug("Data update from XM",this.polarisData),setTimeout(this.checkOptOut.bind(this),0)}}updateOptOut(e){if(this.optOutTriggered){this.debug("OptOut already sent");return}if(!document.body){this.debug("OptOut Waiting for body"),setTimeout(this.updateOptOut.bind(this,e),0);return}w(this,"polarisData.optOut",e);let r=new CustomEvent("c-tracking-log-dom",{detail:{eventMethod:"tracking-dispatch-optout",...this.polarisData},bubbles:!0});this.debug("sendOptOut: ",r),document.body.dispatchEvent(r),this.optOutTriggered=!0}optOutResponseHandler(e){let r=e.target;if(r.status>=200&&r.status<300){let a=null,i=!1;try{a=JSON.parse(r.responseText),w(this,"polarisData.optOut",a)}catch{i=!0}this.triggerOptOutEvent&&this.updateOptOut(a),i||(E.optOut=a,E.optOutDate=Date.now(),E.save())}}triggerRequest(e){this.optOutRequest||(this.optOutRequest=new XMLHttpRequest,this.optOutRequest.addEventListener("load",e),this.optOutRequest.open("GET",`https://api.pps.sys.comcast.net/privacyPreferences/identityGuid/${this.polarisData.custGUID}/all`),this.optOutRequest.send())}clearOptOut(){this.polarisData.optOut=E.optOut={},E.optOutDate=null,E.polaris=this.polarisData,E.save()}checkOptOut(){if(!this.polarisData.custGUID){this.appId.startsWith("resi_xm")&&this.clearOptOut(),this.updateOptOut({});return}let e=n(E,"optOut",null),r=new Date(n(E,"optOutDate","0")),a=new Date;a.setDate(a.getDate()-7),a>r?(this.triggerOptOutEvent=!0,this.triggerRequest(this.optOutResponseHandler.bind(this))):e&&(this.updateOptOut(e),a=new Date,a.setDate(a.getDate()-1),a>r&&(this.triggerOptOutEvent=!1,this.triggerRequest(this.optOutResponseHandler.bind(this))))}updatePolarisInfo(e){if(n(e,"detail.type")||document.querySelector("xc-header")){let r=n(e,"detail.type")==="user"&&n(e,"detail.response")||n(document.querySelector("xc-header"),"data.polaris.user");r&&((r.hasOwnProperty("authGuid")||r.hasOwnProperty("customerGuid")||n(r,"isAuthenticated")==="false")&&(this.polarisData.authGUID=r.authGuid,this.polarisData.custGUID=r.customerGuid),r.hasOwnProperty("accountStatus")&&w(this.polarisData,"status.account",r.accountStatus),r.services&&w(this.polarisData,"status.services",{cdv:r.services.cdvStatus,homeSecurity:r.services.homeSecurityStatus,hsd:r.services.hsdStatus,mobile:r.services.mobileStatus,video:r.services.videoStatus}),this.polarisData.type=n(r,"role","").toString().toLowerCase().trim(),this.polarisData.linkedCount=Object.keys(n(r,"linkedAccounts",{})).length,E.polaris=this.polarisData,E.save(),document.dispatchEvent(new CustomEvent("c-tracking-log-update",{detail:this.populatePolaris({}),bubbles:!0})),this.polarisNotify())}this.appId.startsWith("resi_xm")||setTimeout(this.checkOptOut.bind(this),0)}polarisNotify(){setTimeout(()=>{let e=new CustomEvent("c-tracking-log-dom",{detail:{eventMethod:"tracking-dispatch-polaris",...this.polarisData},bubbles:!0});this.debug("update polaris: ",e),document.body.dispatchEvent(e)},0)}initInfo(){if(this.checkErrors())return;let e=hi();this.info=e;let{sessionID:r,visitorID:a}=e;mi(r,a)}bindListeners(){this.checkErrors()||(window.addEventListener("polaris-data-changed",this.updatePolarisInfo.bind(this),!1),document.addEventListener("c-tracking-load-defaults",this.populateDataLayer.bind(this),!1),document.addEventListener("c-tracking-log-page",this.updateInfo.bind(this),!1))}populateDataLayer(e){e.detail.plugins.push({name:this._id,version:"3.21.31",errorDetected:this.checkErrors()}),this.setData(e.detail),this.updateInfo()}setData(e){return this.info&&(e.shared=e.shared||{},e.shared.sessionID=e.shared.sessionID||this.info.sessionID,e.shared.visitorID=e.shared.visitorID||this.info.visitorID),this.populatePolaris(e),e}populatePolaris(e){return this.polarisData&&Object.keys(this.polarisData).forEach(r=>{let a=`user[0].profile[0].profileInfo.${r}`;n(e,a)||w(e,a,this.polarisData[r])}),e}updateInfo(){let e=hi();this.info=e;let{sessionID:r,visitorID:a}=e;mi(r,a)}checkErrors(){return(this.pluginError||!/\.xfinity\.com$/i.test(window.location.hostname))&&(this.pluginError=!0),this.pluginError}},s_=new Et;var It=class{constructor(){l(this,x),this._id="PERSIST",this.debugHeader=`Data Layer ${this._id} Plugin`,this.debugParams=[],this._version="3.21.31",this.bindListeners()}bindListeners(){document.addEventListener("c-tracking-trigger",this.dlUpdated.bind(this),!1),document.addEventListener("c-tracking-load-defaults",this.setDefaults.bind(this),!1)}setDefaults(e){e.detail.plugins.push({name:this._id,version:this._version,description:"Enable persistence of data layer properties across page views",errorDetected:this.checkErrors()})}checkErrors(){return(this.pluginError||!Te.localStorage||!Te.sessionStorage)&&(this.pluginError=!0),this.pluginError}populatedSharedData(e){let r=e.getItem("dl_Cache"),a;try{r=JSON.parse(r)}catch{r=null}r&&l(window.digitalData,[].concat(n(window.digitalData,`config.plugins.persistence.${e===window.localStorage?"browser":"session"}`,[])).reduce((i,s)=>(w(i,s,(a=n(window.digitalData,s,void 0))===void 0?n(r,s,void 0):a),i),{}))}storeSharedData(e){let r={};l(r,[].concat(n(window.digitalData,`config.plugins.persistence.${e===window.localStorage?"browser":"session"}`,[])).reduce((a,i)=>(w(a,i,n(window.digitalData,i,void 0)),a),{})),e.setItem("dl_Cache",JSON.stringify(r))}dlUpdated(e){n(e,"detail.type","")==="page"&&(this.populatedSharedData(window.localStorage),this.populatedSharedData(window.sessionStorage),this.storeSharedData(window.localStorage),this.storeSharedData(window.sessionStorage))}},u_=new It;var Ot=class{constructor(){let e=D();this.appId=e&&v("appId",e.src),l(this,x),this._id="AWS",this.supportsBeacon=n(window,"navigator.sendBeacon"),this.debugHeader=`Data Layer ${this._id} Plugin`,this.debugParams=[],this._version="3.21.31",this._ignoredEvents=[],this.bindListeners()}bindListeners(){document.addEventListener("c-tracking-trigger",this.executeTrackingCall.bind(this),!1),document.addEventListener("c-tracking-load-defaults",this.setDefaults.bind(this),!1)}setDefaults(e){this._ignoredEvents=n(window.digitalData,"config.plugins.aws.ignoredEvents",[]),e.detail.plugins.push({name:this._id,version:this._version,description:"Pass Data-Layer information to aws end point",errorDetected:this.checkErrors()})}checkErrors(){return(this.pluginError||typeof XMLHttpRequest!="function")&&(this.pluginError=!0),this.pluginError}sendAjax(e,r,a){if(r&&this.supportsBeacon)navigator.sendBeacon("https://dl.cws.xfinity.com/event/",JSON.stringify(a));else{var i=new XMLHttpRequest;i._fromDL=!0,i.onreadystatechange=i.ontimeout=function(s){s.target.readyState===XMLHttpRequest.DONE&&(this.debugParams=[e,"done"],this.debug(i.status===200?"SUCCESS":"FAILED",', Type: "',s.type,'", Request Obj: ',s.target))}.bind(this),i.open("PUT","https://dl.cws.xfinity.com/event/",!r),i.setRequestHeader("Content-Type","application/json"),i.send(JSON.stringify(a))}this.debugParams=[e,"send"],this.debug('Payload: "',a,'"')}sendRequest(e,r,a){var i={method:r,Data:JSON.stringify(e)};this.sendAjax(r,a,i)}executeTrackingCall(e){try{var r=l({},e.detail.data.eventInfo),a,i=n(e,"detail.type",""),s=!0,f=n(r,"_sendWithBeacon",!1),o=n(r,"eventMethod","")||"send-Event",u=!1;switch(delete r._sendWithBeacon,i){case"ajax":s=Le(this.appId),u=!0,n(r,"performance.ajax")&&(r.ajax=n(r,"performance.ajax[0]"),delete r.performance.ajax);break;case"page":o="PageLoadEvent";break;case"c-tracking-init-start":o="PageInit-Start";break;case"c-tracking-init-complete":o="PageInit-Complete";break;default:i.startsWith("c-tracking-init-")&&(s=!1),u=!0;break}this._ignoredEvents.includes(o)&&(s=!1,this.debug("EVENT IGNORED",o)),s&&!this.pluginError&&(u?(r.skipEventKeys=r.skipEventKeys||[],l(r,["schemaVersion","version","subSchemas","siteInfo.visitorID","siteInfo.sessionID","siteInfo.ctpSessionID","shared.visitorID","shared.sessionID","browserInfo.location","browserInfo.referrer","browserInfo.navigator.userAgent","page.pageInfo.pageName","page.codebase.name","user[0].segment","user[0].profile[0].profileInfo.customerType","user[0].profile[0].profileInfo.custGUID","user[0].profile[0].profileInfo.authenticationType","user[0].profile[0].profileInfo.authGUID"].concat(n(window,"digitalData.config.plugins.aws.eventFields",[])).reduce((p,d)=>{if(typeof d=="string"&&d.startsWith("func:")){let m=n(window,d.substr(d.indexOf(":")+1),function(){})();if(typeof m=="object"&&m!==null)try{l(p,m)}catch(h){this.debug(`Exception occurred executing '${d}' callback. Error was '${h.message}'`)}else this.debug(`Invalid value returned from '${d}' callback. Value was '${m}'. Only Objects are allowed.`)}else!r.skipEventKeys.indexOf(d)!==-1&&w(p,d,n(window.digitalData,d,void 0));return p},{eventMethod:o})),delete r.skipEventKeys,a=r):a=l({},window.digitalData,{eventMethod:o}),this.sendRequest(a,o,f))}catch(p){this.debug("EXCEPTION:",p,this.pluginError?"AWS NOT AVAILABLE!":"")}}},c_=new Ot;var Dt=class{constructor(){this.initStart=n(window,"performance.timing",{}).requestStart||Date.now(),this.currentScript=D(),l(this,x),this._id="LAUNCH",this._version="3.21.31",this._status="INIT",this.debugHeader=`Data Layer ${this._id} Plugin`,this.debugParams=[],this._initQueue=[],this.initConfig(),document.addEventListener("c-tracking-load-defaults",this.setDefaults.bind(this),!1),document.addEventListener("c-tracking-dispatch-targetUpdate",e=>{let r=e.detail,a=!1;delete r.eventMethod,Object.keys(this.config).forEach(i=>{r.hasOwnProperty(i)&&(this.config[i]=L.lConfig[i]=r[i],a=!0)}),a&&this.processConfig(r)},!1),this._exec=this.executeTrackingCall.bind(this),this.loadLaunch()&&(this.toggleFlicker(!0),document.addEventListener("c-tracking-trigger",this._exec,!1))}initConfig(){this.config=L.init("lConfig",{initTimeout:2500,spaTimeout:1e3,noTargetDelay:!0,flickerDisable:!1}),this.config.notifyTimeout=this.config.notifyTimeout||1e3,Object.keys(this.config).forEach(e=>{let r=v(`launch_${e}`,window.location.href);if(r){switch(typeof this.config[e]){case"number":r=Number(r);break;case"boolean":r=r==="true";break}this.config[e]=L.lConfig[e]=r,L.save()}})}updateStyle(e){if(this.styleBlock||(this.styleBlock=document.createElement("style")),e){if(this.styleBlock.parentNode){let r=250;this.styleBlock.innerHTML=`body { opacity: 1; animation: ${r}ms fadein; } @keyframes fadein { from { opacity: 0; } to   { opacity: 1; } }`,setTimeout(()=>{this.styleBlock.parentNode.removeChild(this.styleBlock)},r)}}else this.styleBlock.innerHTML="body { opacity: 0; }",this.styleBlock.parentNode!==this.currentScript.parentNode&&this.currentScript.parentNode.insertBefore(this.styleBlock,this.currentScript)}toggleFlicker(e,r){if(!L.lConfig.flickerDisable&&e){let a,{initTimeout:i,spaTimeout:s}=this.config;a=r?s:i,this.flickerTimer&&clearTimeout(this.flickerTimer);let f=Date.now()-this.initStart;a=a-f,a=a<0?0:a,this.flickerTimer=setTimeout(this.toggleFlicker.bind(this,!1,r),a),this.flickerActive=!0,this.flickerIsSpa=r,this.updateStyle()}else this.flickerActive&&(this.flickerActive=!1,this.flickerTimer=null,this.updateStyle(!0))}setStatus(e){return function(a){return this._status=e,this.debugParams=[e],this.debug(a),document.removeEventListener("c-tracking-trigger",this._exec),!1}.bind(this)}loadLaunch(){let e=this.setStatus("ERROR"),r=this.setStatus("DISABLED"),a=(d,c)=>d!=null?d==="true":c,i=Ce("disableScripts",a),s=Ce("debugLaunch",a);if(i(window.location.href))return r("Disable scripts enabled!");let f=this.currentScript&&v("appId",this.currentScript.src),o=this.currentScript&&v("workflowID",this.currentScript.src);if(typeof window._satellite<"u"){if(typeof window._satellite.buildInfo<"u")return this.debug("Launch already detected, proceeding with activation through load success."),this.launchLoaded(),!0;if(typeof window._satellite.configurationSettings<"u")return e('Instance of "_satellite" already found! Aborting Launch initialization.')}if(s(window.location.href))return this.debug("Debug launch enabled, launch not yet be loaded."),!0;if(!o&&!f)return e("Application identifier not found!");let u,p;return p={resi_global:"https://assets.adobedtm.com/331fbea29f79/e5b825f47ce6/launch-18bdbdf8eca5.min.js",resi_buyflow:"https://assets.adobedtm.com/331fbea29f79/e5b825f47ce6/launch-18bdbdf8eca5.min.js",resi_buyflow_approval:"https://assets.adobedtm.com/331fbea29f79/e5b825f47ce6/launch-18bdbdf8eca5.min.js",resi_shop_2:"https://assets.adobedtm.com/331fbea29f79/e5b825f47ce6/launch-18bdbdf8eca5.min.js",resi_buyflow_agent:"https://assets.adobedtm.com/331fbea29f79/e5b825f47ce6/launch-18bdbdf8eca5.min.js",resi_myaccount:"https://assets.adobedtm.com/331fbea29f79/e5b825f47ce6/launch-18bdbdf8eca5.min.js",resi_myaccount_2:"https://assets.adobedtm.com/331fbea29f79/e5b825f47ce6/launch-18bdbdf8eca5.min.js",resi_support:"https://assets.adobedtm.com/331fbea29f79/e5b825f47ce6/launch-18bdbdf8eca5.min.js",resi_support_2:"https://assets.adobedtm.com/331fbea29f79/e5b825f47ce6/launch-18bdbdf8eca5.min.js",test:"https://assets.adobedtm.com/331fbea29f79/f0f7bfe56a6a/launch-400f7622ecac.min.js",login:"https://assets.adobedtm.com/331fbea29f79/fdd77923e2da/launch-46f715e51bac.min.js",resi_stream:"https://assets.adobedtm.com/launch-ENcd3e2a27442a49a1ad80b135b0864a86.min.js",resi_shop_agent:"https://assets.adobedtm.com/331fbea29f79/69ccdb5b9b50/launch-b9e16cebbe07.min.js",resi_shop_ancillary:"https://assets.adobedtm.com/331fbea29f79/5d27143e4c5d/launch-e78575acc1e1.min.js",resi_subscription_management:"https://assets.adobedtm.com/331fbea29f79/18d1c60239db/launch-90557250d9d7.min.js",resi_support_fe:"https://assets.adobedtm.com/331fbea29f79/801bfc652c34/launch-ba8a20ec41a6.min.js",resi_xm_buyflow:"https://assets.adobedtm.com/331fbea29f79/f5d2107f9dfd/launch-6cc47641d08f.min.js",resi_xm_buyflow_2:"https://assets.adobedtm.com/331fbea29f79/a1677ef86d87/launch-d7f43fab9698.min.js",resi_xm_myaccount:"https://assets.adobedtm.com/331fbea29f79/c0a78d794175/launch-7dc11f06b777.min.js",resi_xm_shop:"https://assets.adobedtm.com/331fbea29f79/f88e7fa02c6b/launch-29d494ec28f2.min.js",resi_xm_shop_2:"https://assets.adobedtm.com/331fbea29f79/bbf7e1c8104a/launch-e5e8890c27e7.min.js",resi_cpp:"https://assets.adobedtm.com/331fbea29f79/b89b840626b5/launch-dfc187a05ec1.min.js",resi_xumo:"https://assets.adobedtm.com/331fbea29f79/e8a7f3d33ed6/launch-b48308a3be5f.min.js",resi_prepaid:"https://assets.adobedtm.com/331fbea29f79/e5b825f47ce6/launch-18bdbdf8eca5.min.js",idm:"https://assets.adobedtm.com/331fbea29f79/3ac6e7f13fd8/launch-995a63aed64a.min.js",busn_eccc:"https://assets.adobedtm.com/331fbea29f79/2877acbf51f0/launch-d3d2ed844b44.min.js",busn_global:"https://assets.adobedtm.com/331fbea29f79/d5488db5974c/launch-35af2ea2adb5.min.js",busn_myaccount:"https://assets.adobedtm.com/0bb9bfa13133/e5e061b1a82a/launch-0f69c6906f35.min.js",busn_cbm:"https://assets.adobedtm.com/0bb9bfa13133/9187321309e9/launch-cec7a8b4e091.min.js",busn_ecom:"https://assets.adobedtm.com/0bb9bfa13133/0e4e6ee0c9bc/launch-28fd181c8c34.min.js",busn_helpsupport:"https://assets.adobedtm.com/0bb9bfa13133/dda4a9773ba1/launch-dbf5657e27f5.min.js",busn_enterpriseportal:"https://assets.adobedtm.com/0bb9bfa13133/25e4676d3528/launch-f27f144ac2a6.min.js"},u=p[o]||p[f]||p.fallback,u?(this.injectScript(u,e),!0):e("Launch URL undefined")}launchNotify(){this.notifyTimer?clearTimeout(this.notifyTimer):this.notifyStart=Date.now();let e=(Array.isArray(this.config.callbackGlobalItems)?this.config.callbackGlobalItems:[]).every(a=>n(window,a,void 0)!==void 0),r=Date.now()-this.notifyStart>this.config.notifyTimeout;if(!e&&!r){this.notifyTimer=setTimeout(this.launchNotify.bind(this),100);return}this.debugParams=["launch-initialized"],this.debug(`Dispatching Launch Loaded Event prereqMet: ${e}, timedOut: ${r}`),document.dispatchEvent(new CustomEvent("c-tracking-launch-loaded",{bubbles:!0}))}launchLoaded(){this._status="READY",this.debug("Launch Loaded Successfully"),this.processQueue(),setTimeout(this.launchNotify.bind(this),0)}processQueue(){this._initQueue.forEach(e=>{e.debugParam="from-queue",this.executeTrackingCall(e)})}injectScript(e,r){this._status="LOADING";var a=document.createElement("script");a.onerror=i=>{r(`Error loading launch, Detail: ${i.target}`)},a.onload=this.launchLoaded.bind(this),this.currentScript.parentNode.insertBefore(a,this.currentScript),a.src=e}processConfig(e){Object.keys(e).forEach(r=>{let a=e[r];switch(this.config[r]=a,r){case"spaTimeout":this.flickerIsSpa&&this.toggleFlicker(this.flickerActive,!0);break;case"initTimeout":this.flickerIsSpa||this.toggleFlicker(this.flickerActive);break;case"flickerDisable":this.flickerActive&&a===!0&&this.toggleFlicker(!1)}})}setDefaults(e){this.processConfig(n(window.digitalData,"config.plugins.launch",{})),e.detail.plugins.push({name:this._id,version:this._version,description:"Properly notify Adobe Launch tag management upon modifications to data layer",status:this._status,appId:this.currentScript&&v("appId",this.currentScript.src),workflowId:this.currentScript&&v("workflowID",this.currentScript.src)})}executeTrackingCall(e){try{if(this.debugParams=["executeTrackingCall"],e.debugParam&&this.debugParams.unshift(e.debugParam),this._status!=="READY"){this._status!=="ERROR"&&(this._initQueue.push({detail:{...e.detail}}),n(window,"_satellite.buildInfo")?this.launchLoaded():n(window,"_satellite.configurationSettings")&&this.setStatus("ERROR")('Instance of "_satellite.configurationSettings" already found!'));return}var r=l({},e.detail.data.eventInfo),a="";switch(e.detail.type){case"page":a="custom-PageLoad";break;case"custom":e.detail.data.eventInfo||(r.eventMethod="custom-PageUpdate");default:e.detail.type.startsWith("c-tracking-init-")?a="custom-"+e.detail.type.replace("c-tracking-",""):a=r.eventMethod||"send-Event";break}a==="targetStart"&&r.type==="spa"?(this.initStart=Date.now(),this.toggleFlicker(!0,!0)):a==="custom-PageLoad"&&this.config.noTargetDelay?this.toggleFlicker(!1):a==="targetUpdate"&&this.processConfig(r),window._satellite.track(a,r),this.debugParams.push(a),this.debug(`Event Info:
`+JSON.stringify(e.detail.data.eventInfo,null,2))}catch(i){this.debug("EXCEPTION:",i)}}},y_=new Dt;var Pt=class{constructor(){l(this,x),this._id="DTM",this._version="3.21.31",this.debugHeader=`Data Layer ${this._id} Plugin`,this.debugParams=[],this.bindListeners()}bindListeners(){document.addEventListener("c-tracking-trigger",this.executeTrackingCall.bind(this),!1),document.addEventListener("c-tracking-load-defaults",this.setDefaults.bind(this),!1)}setDefaults(e){l(e.detail,{event:[],page:{attributes:{isPageLoadVariables:!1}}}),e.detail.plugins.push({name:this._id,version:this._version,description:"Properly notify Adobe Dynamic tag management upon modifications to data layer",errorDetected:this.checkErrors()})}dtmInit(){this.checkErrors(),this.dtmError||window._satellite.pageBottom()}checkErrors(){return(this.dtmError||typeof window._satellite>"u"||typeof window._satellite.track!="function"||typeof window._satellite.pageBottom!="function"||typeof window._satellite.buildInfo<"u")&&(this.dtmError=!0),this.dtmError}executeTrackingCall(e){try{var r=l({},e.detail.data.eventInfo),a="";switch(e.detail.type){case"page":a="custom-PageLoad";break;case"c-tracking-init-end":this.dtmInit();case"custom":e.detail.data.eventInfo||(r.eventMethod="custom-PageUpdate");default:e.detail.type.startsWith("c-tracking-init-")?a="custom-"+e.detail.type.replace("c-tracking-",""):a=r.eventMethod||"send-Event";break}this.debugParams=[a],this.debug(a=="send-Event"?`
`+JSON.stringify(e.detail.data.eventInfo,null,2)+`
`:"",this.dtmError?"DTM NOT AVAILABLE!":""),this.dtmError||window._satellite.track(a)}catch(i){this.debug("EXCEPTION:",i,this.dtmError?"DTM NOT AVAILABLE!":"")}}},v_=new Pt;var Tt=class{constructor(){l(this,x),this._id="dl-plugin-js-exceptions",this._version="3.21.31",this.debugHeader=`Data Layer ${this._id} Plugin`,this.debugParams=[],this.exceptions=[],this.unhandledRejections=new Map,this.skippedCount=0,this.throttlePerError=100,this.throttleGlobalCount=0,this.throttleGlobalMax=20,this.promiseInterval=6e4,this._processError=this.processError.bind(this),this._processRejections=this.processRejections.bind(this,!0),this._rejectionHandled=this.rejectionHandled.bind(this),this._populateDataLayer=this.populateDataLayer.bind(this),this.bindListeners(),this.setupRejectionsInterval(),this.debug("initialized")}bindListeners(){window.addEventListener("error",this._processError,!1),window.addEventListener("c-tracking-log-error",this._processError,!1),window.addEventListener("unhandledrejection",this._processError,!1),window.addEventListener("rejectionhandled",this._rejectionHandled,!1),window.addEventListener("beforeunload",this._processRejections,!1),document.addEventListener("c-tracking-load-defaults",this._populateDataLayer,!1)}populateDataLayer(e){this.processConfig(n(window.digitalData,"config.plugins.exceptions",{})),n(e,"detail.plugins",[]).some(a=>a.name===this._id)?(window.removeEventListener("error",this._processError),window.removeEventListener("c-tracking-log-error",this._processError),window.removeEventListener("unhandledrejection",this._processError),window.removeEventListener("rejectionhandled",this._rejectionHandled),window.removeEventListener("beforeunload",this._processRejections),document.removeEventListener("c-tracking-load-defaults",this._populateDataLayer),clearInterval(this.interval)):e.detail.plugins.push({name:this._id,version:this._version})}setupRejectionsInterval(){clearInterval(this.interval),this.promiseInterval&&(this.interval=setInterval(()=>this.processRejections(!1),this.promiseInterval))}processConfig(e){let r=n(e,"promiseInterval",this.promiseInterval);r!==this.promiseInterval&&(this.promiseInterval=r,this.setupRejectionsInterval())}sendInfo(e){let r=new CustomEvent("c-tracking-log",{detail:{eventInfo:e},bubbles:!0});this.debug("sendInfo: ",r),document.body.dispatchEvent(r)}dataLayerUpdated(e){n(e,"detail.type","")==="page"&&this.exceptions.length&&(this.exceptions.forEach(r=>{setTimeout(this.sendInfo.bind(this,r),0)}),this.exceptions=[])}rejectionHandled(e){this.unhandledRejections.delete(this.rawPromiseMessage(e))}processError(e){if(e.reason){e.message=this.generatePromiseMessage(e),e.capturedTimeStamp=new Date;let r=this.rawPromiseMessage(e);this.unhandledRejections.has(r)||this.unhandledRejections.set(r,e)}else this.trackError(e)}processRejections(e){this.debug(`Processing Unhandled Promise Rejections: Count(${this.unhandledRejections.size})`),this.unhandledRejections.forEach(r=>{this.trackError(r,e)}),this.unhandledRejections.clear()}trackError(e,r){let a=!1,i={_sendWithBeacon:r,eventMethod:"client-exception",eventType:"js",eventName:e.type};if(e.type==="c-tracking-log-error"&&(e=e.detail),e.message||(this.debug("Skipped the tracking of an error event due to missing error message: ",e),a=!0),this.throttleGlobalCount>this.throttleGlobalMax?(this.debug("skip track - Maximum error threshold reached:",e),a=!0):e["dl-handled"]?(this.debug("skip track - error previously tracked:",e),a=!0):this.lastTracked&&(this.lastTracked.message===e.message||e.message?.match(/script\serror/i))&&this.lastTracked.ts+this.throttlePerError>Date.now()&&(this.debug("skip track - another error of this type was tracked in the last 100 ms:",e),a=!0),this.lastTracked=e,this.lastTracked.ts=Date.now(),e["dl-handled"]=!0,a){this.skippedCount++;return}this.debug("Tracking Error: ",e),i=l(i,{eventAction:e.message,filename:e.filename,lineno:e.lineno,colno:e.colno,type:n(e,"reason.name")||n(e,"error.name"),stack:n(e,"reason.stack")||n(e,"error.stack")||e.stack,skippedCount:this.skippedCount,timeStamp:e.capturedTimeStamp}),this.skippedCount=0,this.throttleGlobalCount++,window.digitalData&&document.body?this.sendInfo(i):this.exceptions.push(i)}generatePromiseMessage(e){let r=this.rawPromiseMessage(e),a=e.reason.name?`${e.reason.name}: `:"";return`${e.type}: ${a}${r}`}rawPromiseMessage(e){return e.reason.message||e.reason}},I_=new Tt;var kt=class{constructor(){l(this,x),this._id="Timeline",this.debugHeader=`Data Layer ${this._id} Plugin`,this.debugParams=[],this._version="3.21.31",this.bindListeners(),this.debug("initialized")}bindListeners(){this.checkErrors()||(document.addEventListener("c-tracking-trigger",this.executeTrackingCall.bind(this),!1),document.addEventListener("c-tracking-load-defaults",this.setDefaults.bind(this),!1))}setDefaults(e){e.detail.plugins.push({name:this._id,version:this._version,description:"Pass Data-Layer information to aws lambda timeline end point",errorDetected:this.checkErrors()})}checkErrors(){return(this.pluginError||typeof XMLHttpRequest!="function")&&(this.pluginError=!0),this.pluginError}isCustomerType(e,r){let a=n(e,"digitalData.transaction.attributes",null)||n(window,"digitalData.transaction.attributes",null);return a?.buyflowType==="All digital buyflow|dotcom"&&a?.buyflowStep==="order"&&a?.flowType===r}generateTimelineRequest(e){this.debug("INFO: ",e,"GENERATE TIMELINE REQUEST");let r=n(e,"digitalData.page.pageInfo.pageName","")||n(window,"digitalData.page.pageInfo.pageName",""),a=n(e,"digitalData.user[0].profile[0].profileInfo.custGUID",null)||n(window,"digitalData.user[0].profile[0].profileInfo.custGUID",null);if(!a)return this.debug("NO CUST GUID"),null;let i={interactionType:"SALES_RETENTION",channel:"MY_ACCOUNT_WEB",custGUID:a};switch(r){case"resi|sales|shop||home":return{...i,actionId:"LEARN_OVERVIEW"};case"resi|sales|shop|myplan|gbboffers2.0":return{...i,actionId:"SALES_CENTER"};case"resi|sales|shop|movers|localization":return{...i,actionId:"MOVES"};case"resi|sales|shop|learn|offers":return{...i,actionId:"ALL_OFFERS"};case"resi|sales|shop|learn|Plan Builder":return{...i,actionId:"PLANBUILDER"};default:return this.isCustomerType(e,"NewCustomer")?{...i,actionId:"NEW_CUSTOMER_ORDER"}:(this.debug("INFO:",r,"PAGE NAME NOT FOUND"),null)}}sendRequest(e){var r=new XMLHttpRequest;r._fromDL=!0,r.onreadystatechange=r.ontimeout=function(a){a.target.readyState===XMLHttpRequest.DONE&&(this.debugParams=["Timeline Update","done"],this.debug(r.status===200?"SUCCESS":"FAILED",', Type: "',a.type,'", Request Obj: ',a.target))}.bind(this),this.debug("INFO: ","https://4ob33768rg.execute-api.us-east-1.amazonaws.com/prod/five-standards","OPENING REQUEST TO SEND"),r.open("POST","https://4ob33768rg.execute-api.us-east-1.amazonaws.com/prod/five-standards"),r.setRequestHeader("Content-Type","application/json"),r.send(JSON.stringify(e))}dlUpdateTimeline(e){let r=this.generateTimelineRequest(e);r&&this.sendRequest(r)}executeTrackingCall(e){try{let r=l({},e.detail.data);n(e,"detail.type","")==="page"&&this.dlUpdateTimeline(r)}catch(r){this.debug("EXCEPTION:",r,this.pluginError?"TIMELINE AWS LAMBDA NOT AVAILABLE!":"")}}},T_=new kt;function vd(t,e={}){let r=e,a=[];function i(){return r}function s(o){r=t(r,o),a.forEach(u=>u())}function f(o){a.push(o)}return{dispatch:s,subscribe:f,getState:i}}function gi(t){let e=Object.values(t);for(let r=0;r<e.length;r++)if(e[r]?.pendingCount>0)return!0;return!1}function Ad(t,e){switch(e.type){case"pending":return t.pendingProcesses[e.process]={pendingCount:t.pendingProcesses?.[e.process]?.pendingCount+1||1},{...t,type:e.type,lastestEvent:e.event,isPending:gi(t.pendingProcesses)};case"complete":return t.pendingProcesses[e.process]={pendingCount:t.pendingProcesses?.[e.process]?.pendingCount>1?t.pendingProcesses?.[e.process]?.pendingCount-1:0},{...t,type:e.type,lastestEvent:e.event,isPending:gi(t.pendingProcesses)};default:return t}}function bi(t){let e={isPending:!1,pendingProcesses:{}},{subscribe:r,getState:a,dispatch:i}=vd(Ad,e);return r(()=>{let{type:s,isPending:f,lastestEvent:o,pendingProcesses:u}=a();t({type:s,isPending:f,ev:o,pendingProcesses:u})}),document.addEventListener("c-tracking-process-pending",s=>{i({type:"pending",event:s,process:s.detail?.process||"DL_CATCHALL_PROCESS"})},!1),document.addEventListener("c-tracking-process-complete",s=>{i({type:"complete",event:s,process:s.detail?.process||"DL_CATCHALL_PROCESS"})},!1),a().isPending}function yi(){typeof Element.prototype.attachShadow=="function"&&!Element.prototype._DLattachShadow&&(Element.prototype._DLattachShadow=Element.prototype.attachShadow,Element.prototype.attachShadow=function(t={}){return t.mode="open",this._DLattachShadow(t)},Element.prototype.attachShadow.toString=function(){return Element.prototype._DLattachShadow.toString()})}function xi(t){Ed(t),Id(t),Sd(t)}function Sd(t){if(window.fetch){let e=window.fetch;window.fetch=function(r,a){a=a||{};let i=e(r,a);try{let s=n(r,"body",n(a,"body",null));i._perfDebug={requestBody:s},t.trackAjax(i._perf={eventMethod:"c-tracking-ajax",url:!r||typeof r=="string"?r:r.url||r.toString(),source:"fetch",method:a.method||"GET",requestStart:Date.now()})}catch{}return i.then(s=>{try{s.clone().text().then(function(f){i._perfDebug.responseBody=f}).catch(function(){}).finally(function(){t.requestCallback.bind(i)(t,s)})}catch{}return i}).catch(s=>{try{s.name==="AbortError"&&(i._perf.status=499),t.requestCallback.bind(i)(t,s)}catch{}return i})}}}function Ed(t){if(n(window,"Navigator.prototype.sendBeacon")){let e=window.Navigator.prototype.sendBeacon;Navigator.prototype.sendBeacon=function(r){let a=e.apply(this,arguments),i={eventMethod:"c-tracking-ajax",url:r,source:"beacon",method:"POST",success:a,requestStart:Date.now()};return t.trackAjax(i),a}}}function Id(t){if(!XMLHttpRequest.prototype.modified){XMLHttpRequest.prototype.modified=!0;var e=XMLHttpRequest.prototype;e._open=e.open,e.open=function(r,a){t.trackAjax(this._perf={eventMethod:"c-tracking-ajax",url:a,method:r,source:"xhr"}),e._open.apply(this,arguments)},e._send=e.send,e.send=function(r){this._perf||t.trackAjax(this._perf={eventMethod:"c-tracking-ajax",method:"UNKNOWN",source:"xhr"}),this._perf.requestStart=Date.now();let a=function(i){try{n(this,"response")&&!this.fromDL&&(this._perfDebug.responseBody=this.response)}catch{}t.requestCallback.call(this,t,i)};this.addEventListener("load",a),this.addEventListener("error",a),this.addEventListener("abort",a),this.addEventListener("timeout",a),this._perfDebug={},r&&!this.fromDL&&(this._perfDebug.requestBody=r),e._send.apply(this,[r])}}}function Od(){if(navigator?.userAgentData?.brands){let t=new Map([["Google Chrome","Chrome"],["Microsoft Edge","Edge"],["Opera GX","Opera"],["Brave","Brave"],["Samsung Internet","Samsung"]]),e=navigator.userAgentData.brands.find(r=>t.has(r.brand));if(e?.brand)return t.get(e.brand)}if(navigator?.userAgent){let t=navigator.userAgent;if(t.includes("Seamonkey/"))return"Seamonkey";if(t.includes("Firefox/"))return"Firefox";if(t.includes("Edg/")||t.includes("EdgA/")||t.includes("EdgiOS"))return"Edge";if(t.includes("Chromium/"))return"Chromium";if(t.includes("Chrome/"))return"Chrome";if(t.includes("Safari/"))return"Safari";if(t.includes("OPR/")||t.includes("Opera/"))return"Opera"}return"unknown"}function ut(t,e){try{return e.reduce((r,a)=>(r[a]=t?window[t][a]:window[a],r),{})}catch(r){return{error:r}}}function Dd(){return ut("navigator",["cookieEnabled","language","userAgent","hardwareConcurrency","maxTouchPoints"])}function Pd(){let t=ut("screen",["availTop","availLeft","availHeight","availWidth","height","width","top","left","pixelDepth","colorDepth"]);return window.screen.orientation&&(t.orientation={type:window.screen.orientation.type,angle:window.screen.orientation.angle}),t}function Td(){return ut(null,["innerWidth","innerHeight","outerWidth","outerHeight","devicePixelRatio"])}function Lt(){return ut("location",["href","protocol","host","hostname","port","pathname","search","hash","origin"])}function _i(){return{navigator:Dd(),screen:Pd(),window:Td(),location:Lt(),referrer:document.referrer,referrerLocation:U(document.referrer),browserName:Od()}}var Ct=class{constructor(){let e=D();this.appId=e&&v("appId",e.src),l(this,x),this.debugHeader="Data Layer Core",this.debugParams=[],this.defineVars(),yi(),xi(this),this.bindListeners()}defineVars(){it(this,{_id:"Data Layer",_version:"3.21.31",_objectPrefix:"tracking-data-",_keyPrefix:"data-tracking-",_isProcessPending:!1,_pageViewCount:0,_eventQueue:[],_pageUnloading:null,_pageViewStart:n(window,"performance.timing",{}).requestStart||Date.now(),_triggerPage:!1,_triggerPageDetail:null,_mergeArrays:null,_performance:null,_ajaxPerfQ:[],_triggerQueue:[],_waiting:0,_selectors:{actionable:"a, button",sharedData:'script[type="tracking-data"]',parentBlock:"[data-tracking-parent], body",trackingInfo:"[data-tracking]",eventContainer:"[data-tracking-event-container]",eventSuppress:"[data-tracking-auto-event-suppress]",checkedSelector:'input[type="checkbox"], input[type="radio"]',checkedAttributeChecked:"data-tracking-checked",checkedAttributeUnChecked:"data-tracking-unchecked",media:"video, audio"},_initQueue:[],_operational:!1,_ajaxExclude:["https://dl.cws.xfinity.com/event/".toLowerCase(),"NONE".toLowerCase(),"https://dss-dl-prod.aws-origin.xfinity.com/prod/event/".toLowerCase(),"https://4ob33768rg.execute-api.us-east-1.amazonaws.com/prod/five-standards".toLowerCase(),"col.eum-appdynamics.com","comcast-app.quantummetric.com","omtrdc.net","metrics.comcast.com","metrics.xfinity.com"]},(e,r)=>{if(Array.isArray(r))return r}),this.fullDataType=this._objectPrefix+"digitalData",l(this._selectors,{defaultEl:`${this._selectors.checkedSelector},${this._selectors.actionable},${this._selectors.media}`,clickElements:`a, button,${this._selectors.checkedSelector}`,objectData:'script[type^="{0}"]'.replace(/\{0}/g,this._objectPrefix)}),this["init-start-exec"]=this["init-end-exec"]=this["init-complete-exec"]=null}mergeOptions(e,r){if(typeof e<"u"&&(this._mergeArrays||(r||e).arrayAppend||!Array.isArray(e))&&Array.isArray(r))return r=r.concat(e),r}endTimeOnPage(e){if(this._pageUnloading)return;e?this._pageUnloading=!0:e={eventPhase:"inline",type:"spa"};let r=n(window,"digitalData.performance.pageView",{});r.unload=Date.now(),r.end&&(r.timeOnPage=r.unload-r.end),w(window,"digitalData.performance.pageView",r),this.trigger({data:{eventInfo:{_sendWithBeacon:!0,eventMethod:"c-tracking-log-page-unload",eventType:e.type.toLowerCase(),eventPhase:e.eventPhase,performance:{pageView:n(window,"digitalData.performance.pageView",{})}}},trigger:document.body,type:"unload"}),n(window,"digitalData")&&delete window.digitalData.performance}manageInitLifeCycle(){let e=s=>{this[`init-${s}-exec`]||(this.debugParams=[`init-${s}-exec`],this[`init-${s}-exec`]=!0,this.trackInit({type:`c-tracking-init-${s}`,target:document}),this.debugParams=[])},r=()=>{e("start")},a=()=>{r(),e("end")},i=()=>{r(),a(),e("complete"),this._operational=!0,this._triggerPage&&this.pageTrack({type:"init-complete"}),this.processInitQueue()};switch(document.readyState){case"complete":i();break;case"interactive":a();break;case"loading":r();break}}bindTimingListeners(){this._isProcessPending=bi(({type:e,isPending:r,ev:a,pendingProcesses:i})=>{this.debugParams=[`process-${e}`],this._isProcessPending=r,this.debug(JSON.stringify({isPending:r,pendingProcesses:i},null,2)),!this._isProcessPending&&this._triggerPage&&this.pageTrack(a)}),document.addEventListener("c-tracking-wait",()=>{this._waiting++},!1),document.addEventListener("c-tracking-resume",e=>{this.debugParams=[e.type.toLowerCase()],this._waiting>0&&this._waiting--,this._waiting===0&&(this._triggerQueue.forEach(r=>{r.element!=document&&(!r.element.closest||!N(r.element,"body"))&&(r.element=document.body),this.triggerEvent(r.element,r.name,r.data)}),this._triggerQueue=[])})}bindListeners(){this.manageInitLifeCycle(),document.addEventListener("readystatechange",this.manageInitLifeCycle.bind(this),!0),window.addEventListener("beforeunload",this.endTimeOnPage.bind(this),!0),window.addEventListener("unload",this.endTimeOnPage.bind(this),!0),document.addEventListener("c-tracking-log",this.customTrack.bind(this),!1),document.addEventListener("c-tracking-log-dom",this.domTrack.bind(this,"dom"),!1),this.bindTimingListeners(),document.addEventListener("c-tracking-log-page",this.pageTrack.bind(this),!1),document.addEventListener("c-tracking-log-update",this.pageUpdate.bind(this),!1),document.addEventListener("c-tracking-log-page-start",()=>{n(window,"digitalData.performance")&&(this.endTimeOnPage(),this._pageViewStart=this._pageViewStart||Date.now(),this.trigger({data:{eventInfo:{eventMethod:"targetStart",type:"spa"}},trigger:document.body,type:"targetStart"}))},!1),this.bindClickEvents(),this.bindMediaEvents()}triggerQueuedEvents(){this._eventQueue.forEach(e=>{switch(e.type){case"dom":this.domTrack(e.subtype,e.ev,e.data);break;default:this.trigger(e.payload);break}}),this._eventQueue=[]}getEventElement(e){let r;return typeof e.composedPath=="function"&&e.composedPath()?.length?r=e.composedPath()[0]:window.Polymer&&typeof window.Polymer.dom=="function"?r=typeof window.Polymer.dom(e).rootTarget:r=e.target?e.target.correspondingUseElement||e.target:null,r}triageEvent(e){e.hasOwnProperty("s_fe")&&(e._dlHandled=!0,this.debugParams.push("Skipped"),this.debug("Duplicate Adobe Event Skipped",e))}bindClickEvents(){let e=a=>{if(this.debugParams=[a.type.toLowerCase()],this.triageEvent(a),a._dlHandled){a._dlTracked&&(this.debugParams.push("Skipped"),this.debug("Click Handler Skipped",a));return}a._dlHandled=!0;let i=this.getEventElement(a);i=i&&N(i,this._selectors.clickElements),i&&!N(i,this._selectors.eventSuppress)&&(a._dlTracked=!0,this.domTrack("click",a))};document.addEventListener("click",e,!1),document.addEventListener("click",e,!0);let r=()=>{document.removeEventListener("c-tracking-init-end",r,!1),document.body&&(document.removeEventListener("click",e,!1),document.body.addEventListener("click",e,!1),document.removeEventListener("click",e,!0),document.body.addEventListener("click",e,!0))};document.addEventListener("c-tracking-init-end",r,!1),document.addEventListener("c-tracking-unbind-click",a=>{a.target.removeEventListener("click",e,!1),a.target.removeEventListener("click",e,!0)},!1),document.addEventListener("c-tracking-bind-click",a=>{a.target.removeEventListener("click",e,!1),a.target.addEventListener("click",e,!1),a.target.removeEventListener("click",e,!0),a.target.addEventListener("click",e,!0)},!1)}bindMediaEvents(){document.addEventListener("playing",this.trackMediaState.bind(this),!0),document.addEventListener("ended",this.trackMediaState.bind(this),!0),document.addEventListener("pause",this.trackMediaState.bind(this),!0)}triggerEvent(e,r,a){if(this._waiting>0&&["c-tracking-load-defaults"].indexOf(r)===-1){this._triggerQueue.push({element:e,name:r,data:a});return}let i=new CustomEvent(r,{detail:a,composed:!0,bubbles:!0});e.dispatchEvent(i)}trackMediaState(e){this.debugParams=[e.type.toLowerCase()];let r=this.getEventElement(e),a={eventAction:e.type},i=!0;if(r?.matches?.(this._selectors.media)&&!N(r,this._selectors.eventSuppress)){switch(a.timePlayed=r.currentTime,a.duration=r.duration,a.type=r.tagName.toLowerCase(),a.loop=r.hasAttribute("loop")&&r.getAttribute("loop")!=="false",a.autoplay=r.hasAttribute("autoplay"),a.controls=r.getAttribute("controls"),a.controls||delete a.controls,a.poster=r.getAttribute("poster"),a.poster||delete a.poster,a.muted=r.getAttribute("muted"),a.muted||delete a.muted,a.loop&&r.hasAttribute("c-t-"+e.type)&&(i=!1),e.type){case"playing":r.getAttribute("isPaused")==="true"&&(a.resume=r.hasAttribute("isPaused"),r.removeAttribute("isPaused"));break;case"pause":a.timePlayed!==a.duration?r.setAttribute("isPaused","true"):i=!1;break}i&&(this.triggerEvent(r,"c-tracking-log-dom",a),r.setAttribute("c-t-"+e.type,!0))}}elementsToJSON(e,r){let a=this.collectJSONfromElements(e,r),i={eventInfo:{},digitalData:{}};return a.unshift(i),a.push(this.mergeOptions.bind(this)),i=it.apply(this,a),i}collectJSONfromElements(e,r){return Array.prototype.slice.call(e).map(a=>{let i=a.matches("script")?a.innerHTML:a.getAttribute("data-tracking"),s=a.getAttribute("type"),f,o={eventInfo:{},digitalData:{}},u=!0;try{f=JSON.parse(i)}catch{u=!1}if(u&&typeof f!="object"&&(u=!1,f=null),!u&&i.trim()!==""&&this.debug(`Warning - Invalid JSON found: 
`,i,`
Element:
`,a),a.matches(this._selectors.objectData)){let d={};if(s===this.fullDataType)d=l({},d,f);else{let c=s.replace(new RegExp(`^${this._objectPrefix}`),"");d[c]=f||{},a.matches("script")&&a.hasAttribute("data-tracking-append")&&(d[c].arrayAppend=!0)}o[r==="dom"?"eventInfo":"digitalData"]=d}else f&&(o.eventInfo=f);let p=a.attributes;if(p){let d=p.length,c,m;for(;d--;)if(p[d]&&({name:c}=p[d],c.startsWith(this._keyPrefix)&&!xt([this._selectors.checkedAttributeChecked,this._selectors.checkedAttributeUnChecked],c))){m=a.getAttribute(c);try{o.digitalData[c.replace(new RegExp(`^${this._keyPrefix}`),"")]=JSON.parse(m)}catch{m.trim()!==""&&this.debug(`Warning - Invalid JSON found: 
`,m,`
Element:
`,a,`
Attribute:
`,c)}}}return o.digitalData.event&&o.digitalData.event.length&&(o.eventInfo=l({},o.digitalData.event[0],o.eventInfo),delete o.digitalData.event),o})}getEventParent(e,r,a){let i;return e.composedPath&&typeof e.composedPath=="function"&&e.composedPath().length?i=e.composedPath().find(f=>f!==r&&f.matches&&f.matches(a)):i=N(r,a),i||r&&N(r,a)}domTrack(e,r){this.debugParams=[r.type.toLowerCase()];let a=n(r,"detail.eventMethod","");if(this._isProcessPending&&!a.startsWith("tracking-dispatch-")){this._eventQueue.push({type:"dom",subtype:e,ev:{target:this.getEventElement(r),detail:r.detail,type:r.type}});return}let i=this.getEventElement(r),s=this.getEventParent(r,i,this._selectors.parentBlock),f=i.matches(this._selectors.eventContainer)?i:this.getEventParent(r,i,this._selectors.eventContainer),o=[],u;var p=r.detail;if(Array.prototype.push.apply(o,Array.prototype.filter.call(s.children,h=>h.matches(this._selectors.sharedData))),Array.prototype.push.apply(o,(f||i).querySelectorAll(this._selectors.sharedData)),typeof r.composedPath=="function"?Array.prototype.push.apply(o,r.composedPath().filter(h=>i!==h&&h.matches&&h.matches(this._selectors.trackingInfo)).reverse()):(s.matches(this._selectors.trackingInfo)&&o.push(s),Array.prototype.push.apply(o,pt(i,s).filter(h=>h.matches&&h.matches(this._selectors.trackingInfo)).reverse())),i.matches(this._selectors.trackingInfo)){o.push(i);let h=i.getAttribute("data-tracking");try{h=JSON.parse(h)}catch{h.trim()!==""&&this.debug(`Warning - Invalid JSON found: 
`,h,`
Element:
`,i)}}let d=f||N(i,this._selectors.defaultEl),c,m;if(d&&(c=d.querySelectorAll(this._selectors.objectData),m=this.elementsToJSON(c,"dom")),this._mergeArrays=!0,u=this.elementsToJSON(o,"dom"),d&&c.length&&(u=l({},m,u)),p&&(p.event?(l(u.eventInfo,p.event[0]),delete p.event,l(u.digitalData,p)):l(u.eventInfo,p)),i.matches(this._selectors.checkedSelector)){let h=i.matches(":checked")?i.getAttribute(this._selectors.checkedAttributeChecked):i.getAttribute(this._selectors.checkedAttributeUnChecked);try{h=JSON.parse(h),l(u.eventInfo,h)}catch{h.trim()!==""&&this.debug(`Warning - Invalid JSON found: 
`,h,`
Element:
`,i,`
Is Checked:
`,i.matches(":checked"))}}this.setDefaultEventValues(u,r,i),this._mergeArrays=!1,this.debugParams.push(n(u,"eventInfo.eventMethod")),this.trigger({data:u,trigger:i,type:e})}setDefaultEventValues(e,r,a){let i=N(a,this._selectors.defaultEl)||a,s=(i.tagName||i.nodeName||"").toLowerCase();if(typeof e.eventInfo.type>"u"&&(e.eventInfo.type=r.type),typeof e.eventInfo.eventName>"u"&&(e.eventInfo.eventName=s+(i.type?"[type='"+i.type.toLowerCase()+"'] ":" ")+r.type),typeof e.eventInfo.eventAction>"u"){let f=null;i.matches(this._selectors.checkedSelector)?(f=`Name:${i.getAttribute("name")}, Value:${i.value}`,f+=i.matches(":checked")?", :checked":", :unchecked"):i.matches(this._selectors.media)?f=r.type:i.matches(this._selectors.actionable)&&(f=this.getActionElementDefault(i)),f!==null&&(e.eventInfo.eventAction=f)}i.matches(this._selectors.media)&&typeof e.eventInfo[`${s}Name`]>"u"&&(e.eventInfo[`${s}Name`]=(i.src||i.currentSrc||(i.querySelector("source")||{}).src||"UNKNOWN").toLowerCase()),(typeof e.eventInfo.eventPage>"u"||e.eventInfo.eventPage==="")&&(n(e,"eventInfo.screenName")&&n(window,"digitalData.schemaVersion")?e.eventInfo.eventPage=this.buildPageName(n(e,"eventInfo.screenName")):e.eventInfo.eventPage=n(window,"digitalData.page.pageInfo.pageName")),typeof e.eventInfo.eventMethod>"u"&&i.matches(this._selectors.media)&&(e.eventInfo.eventMethod=`${s}-Track`),typeof e.eventInfo.eventPhase>"u"&&(e.eventInfo.eventPhase=r.eventPhase)}getActionElementDefault(e){let r="";return r=r||e.getAttribute("aria-label"),r=r||e.getAttribute("title"),r=r||e.innerText,!r&&e.querySelector("img")?.hasAttribute("alt")&&(r=e.querySelector("img").getAttribute("alt")),!r&&e.querySelector("svg")?.hasAttribute("aria-label")&&(r=e.querySelector("svg").getAttribute("aria-label")),r.trim()}trackInit(e){let r=e&&e.target?e.target.querySelectorAll(this._selectors.objectData):document.querySelectorAll(this._selectors.objectData),a=this.elementsToJSON(r,"page");w(a.digitalData,"browserInfo.location",Lt()),this.trigger({data:a,trigger:e&&e.target,type:e.type.toLowerCase()}),e.type.toLowerCase()==="c-tracking-init-start"&&(this.debugParams.push("targetStart"),this.trigger({data:{eventInfo:{eventMethod:"targetStart",type:"init"}},trigger:document.body,type:"targetStart"}))}pageUpdate(e){this.debugParams=[e.type.toLowerCase(),"page-update"];var r=e&&e.target?e.target.querySelectorAll(this._selectors.objectData):document.querySelectorAll(this._selectors.objectData),a=e.detail||{},i=this.elementsToJSON(r,"page");if(l(i,{digitalData:a}),this._isProcessPending||!this._operational){this._triggerPageDetail=l(this._triggerPageDetail,a);return}this.trigger({data:i,trigger:e&&e.target,type:"update"})}pageTrack(e){if(this.debugParams=[e.type.toLowerCase(),"page-track"],this._isProcessPending||!this._operational){this._triggerPageDetail=l(this._triggerPageDetail,e.detail),this._triggerPage=!0;return}this._triggerPage=!1;let r=e&&e.target?e.target.querySelectorAll(this._selectors.objectData):document.querySelectorAll(this._selectors.objectData),a=e.detail||{},i=this.elementsToJSON(r,"page");a=l(this._triggerPageDetail,a),this._triggerPageDetail=null,l(i,{digitalData:a}),this.trigger({data:i,trigger:e&&e.target,type:"page"}),this.triggerQueuedEvents()}customTrack(e){this.debugParams=[e.type.toLowerCase(),"custom-track"],this.trigger({data:e.detail,trigger:e.target,type:"custom"})}processInitQueue(){this._initQueue.forEach(e=>{this.debugParams=[`init-queue [${e.type}]`],this.trigger(e),this.debugParams=[]}),this._initQueue=[]}trigger(e){let r=n(e,"type",""),a=n(e,"data.eventInfo.eventMethod","");if(!this._operational&&!(r.startsWith("c-tracking-init-")||r==="targetStart")&&!a.startsWith("tracking-dispatch-")){this._initQueue.push(e);return}else if(this._isProcessPending&&e.data&&this._triggerPage&&!(r.startsWith("c-tracking-init-")||r==="targetStart")&&!a.startsWith("tracking-dispatch-")){this._eventQueue.push({type:"trigger",payload:e});return}e.trigger=e.trigger||document,e.data=e.data||{},this.setDataLayer(e.trigger,e),this.debug(`
digitalData Object: `,window.digitalData,`
digitalData Value:
`,JSON.stringify(window.digitalData,null,2)),e.type!=="update"&&this.triggerEvent(e.trigger,"c-tracking-trigger",e)}requestCallback(e,r){this._perf&&(this._perf.url||(this._perf.url=this.responseURL||""),this._perf.requestEnd=Date.now(),typeof this._perf.requestStart=="number"&&(this._perf.requestMS=this._perf.requestEnd-this._perf.requestStart),r.stack&&(this._perf.stack=r.stack),r.message&&(this._perf.eventAction=r.message),this._perf.type=r.type,this._perf.status=this.status||r.status||this._perf.status,this._perf.status>=200&&this._perf.status<=299&&delete this._perfDebug,this._fromDL||e.recordAjax(this._perf,this._perfDebug))}shouldTrack(e){return!this._ajaxExclude.some(r=>e.toLowerCase().indexOf(r)!==-1)}recordAjax(e,r){if(ke(this.appId)||Le(this.appId)||Mt(this.appId))if(this.shouldTrack(e.url)){delete e.url,delete e.eventMethod;let a={eventInfo:{eventMethod:"c-tracking-ajax",eventType:e.source,type:"complete",skipEventKeys:["user[0].segment","browserInfo.location"],performance:{ajax:[{...r,...e}]}}};this.setDefaultEventValues(a,{},document.body),w(a.eventInfo,"browserInfo.location",U(location.href)),delete a.eventInfo.eventName,this.trigger({data:a,trigger:document.body,type:"ajax"})}else this.debug("Ajax recording skipped",e)}trackAjax(e){this.shouldTrack(e.url)&&(e.location=U(e.url),n(window,"digitalData.performance.ajax")?window.digitalData.performance.ajax.push(e):(this._ajaxPerfQ=this._ajaxPerfQ||[],this._ajaxPerfQ.push(e)))}customAssign(e,r){return Array.isArray(r)?re(r.map(a=>_e(a)?re(ce({},a,this.customAssign.bind(this)),te):typeof a=="number"&&a!==0||typeof a=="string"?a:null),te):_e(r)?re(ce({},r,this.customAssign.bind(this)),te):typeof r=="number"&&r!==0||typeof r=="string"?r:null}pagePerf(e){window.performance?e.performance=this._performance||(this._performance={timing:re(ce({},window.performance.timing,this.customAssign.bind(this)),te),navigation:re(ce({},window.performance.navigation,this.customAssign.bind(this)),te)}):e.performance=e.performance||{missingPerformanceObject:!0},e.performance.ajax=this._ajaxPerfQ||[],delete this._ajaxPerfQ;let r=this._pageViewStart,a=Date.now();e.performance.pageView={start:r,end:a,count:this._pageViewCount},this._pageViewCount>0&&!this._pageViewStart?(e.performance.pageView.start=null,e.performance.pageView.invalidStartTime=!0):e.performance.pageView.ms=a-r,delete this._pageViewStart}setDataLayer(e,r){let{data:a}=r,i={version:this._version,plugins:[]};this.triggerEvent(e,"c-tracking-load-defaults",i),(r.type||"").startsWith("c-tracking-init-")?(i.timeStamp=i.timeStamp||new Date,window.digitalData=i):r.type==="page"?(this.pagePerf(i),i.browserInfo=_i(),n(a,"digitalData.page.pageInfo.screenName")||w(a,"digitalData.page.pageInfo.screenName",window.location.pathname),i.timeStamp=i.timeStamp||new Date,window.digitalData=i,this._pageViewCount++):window.digitalData=window.digitalData||i,l(window.digitalData,a.digitalData),window.digitalData.event=window.digitalData.event||[],vt(a.eventInfo)&&r.type!=="ajax"&&(a.eventInfo.timeStamp=a.eventInfo.timeStamp||new Date,window.digitalData.event.push({eventInfo:a.eventInfo})),window.digitalData.schemaVersion&&w(window.digitalData,"page.pageInfo.pageName",this.buildPageName())}buildPageName(e){let r=[],a=window.digitalData;r.push(n(a,"page.category.businessType")),r.push(n(a,"page.category.siteType")),r.push(n(a,"page.category.primaryCategory"));let i=[...n(a,"page.category.subCategories",[])];return i.unshift(n(a,"page.category.subCategory5")),i.unshift(n(a,"page.category.subCategory4")),i.unshift(n(a,"page.category.subCategory3")),i.unshift(n(a,"page.category.subCategory2")),i.unshift(n(a,"page.category.subCategory1")),r.push(i.filter(s=>typeof s=="string"&&s.length>0).join("~")),r.push(e||n(a,"page.pageInfo.screenName")),r.join("|")}},$_=new Ct;})();
/*! For license information please see datalayer-resi.min.js.LEGAL.txt */
