mixpanel-browser 2.79.0 → 2.80.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/.github/workflows/integration-tests.yml +1 -0
  2. package/CHANGELOG.md +6 -0
  3. package/dist/async-modules/{mixpanel-recorder-D5HJyV2E.min.js → mixpanel-recorder-B61POiHc.min.js} +2 -2
  4. package/dist/async-modules/{mixpanel-recorder-D5HJyV2E.min.js.map → mixpanel-recorder-B61POiHc.min.js.map} +1 -1
  5. package/dist/async-modules/{mixpanel-recorder-P6SEnnPV.js → mixpanel-recorder-C3AW7mPl.js} +7 -3
  6. package/dist/async-modules/{mixpanel-targeting-BBMVbgJF.js → mixpanel-targeting-CBwOQJZw.js} +1 -1
  7. package/dist/async-modules/{mixpanel-targeting-1L9FyetZ.min.js → mixpanel-targeting-kdl-eE-1.min.js} +2 -2
  8. package/dist/async-modules/{mixpanel-targeting-1L9FyetZ.min.js.map → mixpanel-targeting-kdl-eE-1.min.js.map} +1 -1
  9. package/dist/mixpanel-core.cjs.js +13 -13
  10. package/dist/mixpanel-recorder.js +7 -3
  11. package/dist/mixpanel-recorder.min.js +1 -1
  12. package/dist/mixpanel-recorder.min.js.map +1 -1
  13. package/dist/mixpanel-targeting.js +1 -1
  14. package/dist/mixpanel-targeting.min.js +1 -1
  15. package/dist/mixpanel-targeting.min.js.map +1 -1
  16. package/dist/mixpanel-with-async-modules.cjs.js +15 -15
  17. package/dist/mixpanel-with-async-recorder.cjs.js +15 -15
  18. package/dist/mixpanel-with-recorder.js +19 -15
  19. package/dist/mixpanel-with-recorder.min.js +1 -1
  20. package/dist/mixpanel.amd.js +19 -15
  21. package/dist/mixpanel.cjs.js +19 -15
  22. package/dist/mixpanel.globals.js +15 -15
  23. package/dist/mixpanel.min.js +104 -104
  24. package/dist/mixpanel.module.js +19 -15
  25. package/dist/mixpanel.umd.js +19 -15
  26. package/package.json +1 -1
  27. package/src/autocapture/index.js +10 -10
  28. package/src/config.js +1 -1
  29. package/src/flags/index.js +2 -2
  30. package/src/recorder/session-recording.js +6 -2
  31. package/.claude/settings.local.json +0 -11
@@ -60,7 +60,7 @@ yc="dclid fbclid gclid ko_click_id li_fat_id msclkid sccid ttclid twclid wbraid"
60
60
  "Trident/")?"Internet Explorer":e.includes(a,"Gecko")?"Mozilla":""},lc:function(a,b,c){b={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,
61
61
  BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/,"Whale Browser":/Whale\/(\d+(\.\d+)?)/}[e.info.wb(a,b,c)];return void 0===b?null:(a=a.match(b))?parseFloat(a[a.length-2]):null},ee:function(){return/Windows/i.test(L)?/Phone/.test(L)||/WPDesktop/.test(L)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(L)?"iOS":/Android/.test(L)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(L)?
62
62
  "BlackBerry":/Mac/i.test(L)?"Mac OS X":/Linux/.test(L)?"Linux":/CrOS/.test(L)?"Chrome OS":""},zd:function(a){return/Windows Phone/i.test(a)||/WPDesktop/.test(a)?"Windows Phone":/iPad/.test(a)?"iPad":/iPod/.test(a)?"iPod Touch":/iPhone/.test(a)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(a)?"BlackBerry":/Android/.test(a)?"Android":""},le:function(a){a=a.split("/");return 3<=a.length?a[2]:""},ga:function(){return p.location.href},eb:function(a){"object"!==typeof a&&(a={});return e.extend(e.Ha({$os:e.info.ee(),
63
- $browser:e.info.wb(L,aa.vendor,Fa),$referrer:z.referrer,$referring_domain:e.info.le(z.referrer),$device:e.info.zd(L)}),{$current_url:e.info.ga(),$browser_version:e.info.lc(L,aa.vendor,Fa),$screen_height:Mb.height,$screen_width:Mb.width,mp_lib:"web",$lib_version:"2.79.0",$insert_id:La(),time:e.timestamp()/1E3},e.Ha(a))},ug:function(){return e.extend(e.Ha({$os:e.info.ee(),$browser:e.info.wb(L,aa.vendor,Fa)}),{$browser_version:e.info.lc(L,aa.vendor,Fa)})},mg:function(){return e.Ha({current_page_title:z.title,
63
+ $browser:e.info.wb(L,aa.vendor,Fa),$referrer:z.referrer,$referring_domain:e.info.le(z.referrer),$device:e.info.zd(L)}),{$current_url:e.info.ga(),$browser_version:e.info.lc(L,aa.vendor,Fa),$screen_height:Mb.height,$screen_width:Mb.width,mp_lib:"web",$lib_version:"2.80.0",$insert_id:La(),time:e.timestamp()/1E3},e.Ha(a))},ug:function(){return e.extend(e.Ha({$os:e.info.ee(),$browser:e.info.wb(L,aa.vendor,Fa)}),{$browser_version:e.info.lc(L,aa.vendor,Fa)})},mg:function(){return e.Ha({current_page_title:z.title,
64
64
  current_domain:p.location.hostname,current_url_path:p.location.pathname,current_url_protocol:p.location.protocol,current_url_search:p.location.search})}};var ec=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,dc=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,oa=null,Ga=null;"undefined"!==typeof JSON&&(oa=JSON.stringify,Ga=JSON.parse);oa=oa||e.Wc;Ga=Ga||e.La;e.info=e.info;e.info.browser=e.info.wb;e.info.browserVersion=e.info.lc;e.info.device=e.info.zd;e.info.properties=e.info.eb;e.isBlockedUA=e.Od;e.isEmptyObject=e.P;e.isObject=
65
65
  e.l;e.JSONDecode=e.La;e.JSONEncode=e.Wc;e.toArray=e.Ia;e.NPO=X;var lc="clientX clientY offsetX offsetY pageX pageY screenX screenY x y".split(" "),xb=["mp-include"],Ua=["mp-no-track"],wb=Ua.concat(["mp-sensitive"]),ic="aria-label aria-labelledby aria-describedby href name role title type".split(" "),nc={button:!0,checkbox:!0,combobox:!0,grid:!0,link:!0,listbox:!0,menu:!0,menubar:!0,menuitem:!0,menuitemcheckbox:!0,menuitemradio:!0,navigation:!0,option:!0,radio:!0,radiogroup:!0,searchbox:!0,slider:!0,
66
66
  spinbutton:!0,"switch":!0,tab:!0,tablist:!0,textbox:!0,tree:!0,treegrid:!0,treeitem:!0},oc={base:!0,head:!0,html:!0,link:!0,meta:!0,script:!0,style:!0,title:!0,br:!0,hr:!0,wbr:!0,noscript:!0,picture:!0,source:!0,template:!0,track:!0},pc={article:!0,div:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,p:!0,section:!0,span:!0},zb="onclick onmousedown onmouseup onpointerdown onpointerup ontouchend ontouchstart".split(" "),E=ha("autocapture");Db.prototype.fg=function(a,b){b=b||{};var c=b.threshold_px||30,d=b.timeout_ms||
@@ -78,14 +78,14 @@ kf:this.o("block_selectors"),mf:this.o("capture_extra_attrs"),nf:this.o("capture
78
78
  this.Td);var a=p.history.pushState;"function"===typeof a&&(p.history.pushState=function(c,d,f){a.call(p.history,c,d,f);p.dispatchEvent(new Event("mp_locationchange"))});var b=p.history.replaceState;"function"===typeof b&&(p.history.replaceState=function(c,d,f){b.call(p.history,c,d,f);p.dispatchEvent(new Event("mp_locationchange"))})}};H.prototype.sa=function(a){return(a=this.o(a))?!0===a?{}:"object"===typeof a?a:{}:null};H.prototype.nd=function(a,b,c){if(!this.yc&&(this.o("page_leave")||this.u.R())){this.yc=
79
79
  !0;var d=Math.max(z.documentElement.clientHeight,p.innerHeight||0),f=Math.round(Math.max(this.za-d,0)/(c-d)*100),g=Math.round(d/c*100);c<=d&&(g=f=100);a=e.extend({$max_scroll_view_depth:this.za,$max_scroll_percentage:f,$fold_line_percentage:g,$scroll_height:c,$event_type:a.type,$current_url:b||e.info.ga(),$viewportHeight:d,$viewportWidth:Math.max(z.documentElement.clientWidth,p.innerWidth||0),$captured_for_heatmap:this.u.R()},ua);this.u.track("$mp_page_leave",a,{Sb:"sendBeacon"})}};H.prototype.Se=
80
80
  function(){p.removeEventListener("scroll",this.Fc);p.removeEventListener("scrollend",this.Fc);if(this.u.g("record_heatmap_data")){E.log("Initializing scroll depth tracking");this.za=Math.max(z.documentElement.clientHeight,p.innerHeight||0);var a=function(){if(!this.Y()){var b=Math.max(z.documentElement.clientHeight,p.innerHeight||0)+p.scrollY;b>this.za&&(this.za=b);this.cb=z.body.scrollHeight}}.bind(this);a=yb(a);this.Fc=a.listener;p.addEventListener(a.Bd,this.Fc)}};H.prototype.Sf=function(){p.removeEventListener("click",
81
- this.Sd);if(this.o("click")||this.u.g("record_heatmap_data"))E.log("Initializing click tracking"),this.Sd=function(a){(this.o("click")||this.u.R())&&this.ib(a,"$mp_click")}.bind(this),p.addEventListener("click",this.Sd)};H.prototype.Tf=function(){this.sa("dead_click")||this.u.g("record_heatmap_data")?(E.log("Initializing dead click tracking"),this.pa||(this.pa=new S(function(a){this.ib(a,"$mp_dead_click")}.bind(this)),this.pa.Vg()),this.Ya||(this.Ya=function(a){var b=this.sa("dead_click");!b&&!this.u.R()||
82
- this.Y()||(b=b||{},b.timeout_ms||(b.timeout_ms=500),this.pa.jh(a,b))}.bind(this),p.addEventListener("click",this.Ya))):this.Zg()};H.prototype.Uf=function(){p.removeEventListener("change",this.Rd);this.o("input")&&(E.log("Initializing input tracking"),this.Rd=function(a){this.o("input")&&this.ib(a,"$mp_input_change")}.bind(this),p.addEventListener("change",this.Rd))};H.prototype.Xf=function(){p.removeEventListener("mp_locationchange",this.Ud);if(this.Ob()||this.u.g("record_heatmap_data")){E.log("Initializing pageview tracking");
81
+ this.Sd,!0);if(this.o("click")||this.u.g("record_heatmap_data"))E.log("Initializing click tracking"),this.Sd=function(a){(this.o("click")||this.u.R())&&this.ib(a,"$mp_click")}.bind(this),p.addEventListener("click",this.Sd,!0)};H.prototype.Tf=function(){this.sa("dead_click")||this.u.g("record_heatmap_data")?(E.log("Initializing dead click tracking"),this.pa||(this.pa=new S(function(a){this.ib(a,"$mp_dead_click")}.bind(this)),this.pa.Vg()),this.Ya||(this.Ya=function(a){var b=this.sa("dead_click");!b&&
82
+ !this.u.R()||this.Y()||(b=b||{},b.timeout_ms||(b.timeout_ms=500),this.pa.jh(a,b))}.bind(this),p.addEventListener("click",this.Ya,!0))):this.Zg()};H.prototype.Uf=function(){p.removeEventListener("change",this.Rd,!0);this.o("input")&&(E.log("Initializing input tracking"),this.Rd=function(a){this.o("input")&&this.ib(a,"$mp_input_change")}.bind(this),p.addEventListener("change",this.Rd,!0))};H.prototype.Xf=function(){p.removeEventListener("mp_locationchange",this.Ud);if(this.Ob()||this.u.g("record_heatmap_data")){E.log("Initializing pageview tracking");
83
83
  var a="",b=!1;!this.Ob()&&!this.u.R()||this.Y()||(b=this.u.Tc(ua));b&&(a=e.info.ga());this.Ud=fa(function(){if(!this.Y()){var c=e.info.ga(),d=!1,f=c.split("#")[0].split("?")[0]!==a.split("#")[0].split("?")[0],g=this.Ob();!g&&this.u.R()&&(g="full-url");"full-url"===g?d=c!==a:"url-with-path-and-query-string"===g?d=c.split("#")[0]!==a.split("#")[0]:"url-with-path"===g&&(d=f);d&&(this.u.Tc(ua)&&(a=c),f&&(this.Jb=0,E.log("Path change: re-initializing scroll depth checkpoints")))}}.bind(this));p.addEventListener("mp_locationchange",
84
- this.Ud)}};H.prototype.Yf=function(){p.removeEventListener("click",this.Zd);if(this.sa("rage_click")||this.u.g("record_heatmap_data"))E.log("Initializing rage click tracking"),this.hd||(this.hd=new Db),this.Zd=function(a){var b=this.sa("rage_click");if(b||this.u.R())this.Y()||this.hd.fg(a,b)&&this.ib(a,"$mp_rage_click")}.bind(this),p.addEventListener("click",this.Zd)};H.prototype.Zf=function(){p.removeEventListener("scrollend",this.Ec);p.removeEventListener("scroll",this.Ec);if(this.o("scroll")){E.log("Initializing scroll tracking");
84
+ this.Ud)}};H.prototype.Yf=function(){p.removeEventListener("click",this.Zd,!0);if(this.sa("rage_click")||this.u.g("record_heatmap_data"))E.log("Initializing rage click tracking"),this.hd||(this.hd=new Db),this.Zd=function(a){var b=this.sa("rage_click");if(b||this.u.R())this.Y()||this.hd.fg(a,b)&&this.ib(a,"$mp_rage_click")}.bind(this),p.addEventListener("click",this.Zd,!0)};H.prototype.Zf=function(){p.removeEventListener("scrollend",this.Ec);p.removeEventListener("scroll",this.Ec);if(this.o("scroll")){E.log("Initializing scroll tracking");
85
85
  this.Jb=0;var a=function(){if(this.o("scroll")&&!this.Y()){var b=this.o("scroll_capture_all"),c=(this.o("scroll_depth_percent_checkpoints")||[]).slice().sort(function(n,r){return n-r}),d=p.scrollY,f=e.extend({$scroll_top:d},ua);try{var g=z.body.scrollHeight,k=Math.round(d/(g-p.innerHeight)*100);f.$scroll_height=g;f.$scroll_percentage=k;if(k>this.Jb)for(d=0;d<c.length;d++){var h=c[d];k>=h&&this.Jb<h&&(this.Jb=f.$scroll_checkpoint=h,b=!0)}}catch(n){E.i("Error while calculating scroll percentage",n)}b&&
86
- this.u.track("$mp_scroll",f)}}.bind(this);a=yb(a);this.Ec=a.listener;p.addEventListener(a.Bd,this.Ec)}};H.prototype.$f=function(){p.removeEventListener("submit",this.$d);this.o("submit")&&(E.log("Initializing submit tracking"),this.$d=function(a){this.o("submit")&&this.ib(a,"$mp_submit")}.bind(this),p.addEventListener("submit",this.$d))};H.prototype.Vf=function(){z.removeEventListener("visibilitychange",this.Wd);p.removeEventListener("mp_locationchange",this.Vd);p.removeEventListener("load",this.Xd);
87
- if(this.o("page_leave")||this.u.g("record_heatmap_data")){E.log("Initializing page visibility tracking.");this.Se();var a=e.info.ga();this.Xd=function(){this.cb=z.body.scrollHeight}.bind(this);p.addEventListener("load",this.Xd);this.Vd=fa(function(b){if(!this.Y()){var c=e.info.ga();c!==a&&(this.nd(b,a,this.cb),a=c,this.za=Math.max(z.documentElement.clientHeight,p.innerHeight||0),this.cb=z.body.scrollHeight,this.yc=!1)}}.bind(this));p.addEventListener("mp_locationchange",this.Vd);this.Wd=function(b){z.hidden&&
88
- this.nd(b,a,this.cb)}.bind(this);z.addEventListener("visibilitychange",this.Wd)}};H.prototype.Zg=function(){this.Ya&&(p.removeEventListener("click",this.Ya),this.Ya=null);this.pa&&(this.pa.ah(),this.pa=null)};Na(H);U.prototype.dd=function(){var a=this.sf,b=this.version,c=this.dh;return new C(function(d,f){var g=p.indexedDB.open(a,b);g.onerror=function(){f(g.error)};g.onsuccess=function(){d(g.result)};g.onupgradeneeded=function(k){var h=k.target.result;c.forEach(function(n){h.objectStoreNames.contains(n)||
86
+ this.u.track("$mp_scroll",f)}}.bind(this);a=yb(a);this.Ec=a.listener;p.addEventListener(a.Bd,this.Ec)}};H.prototype.$f=function(){p.removeEventListener("submit",this.$d,!0);this.o("submit")&&(E.log("Initializing submit tracking"),this.$d=function(a){this.o("submit")&&this.ib(a,"$mp_submit")}.bind(this),p.addEventListener("submit",this.$d,!0))};H.prototype.Vf=function(){z.removeEventListener("visibilitychange",this.Wd);p.removeEventListener("mp_locationchange",this.Vd);p.removeEventListener("load",
87
+ this.Xd);if(this.o("page_leave")||this.u.g("record_heatmap_data")){E.log("Initializing page visibility tracking.");this.Se();var a=e.info.ga();this.Xd=function(){this.cb=z.body.scrollHeight}.bind(this);p.addEventListener("load",this.Xd);this.Vd=fa(function(b){if(!this.Y()){var c=e.info.ga();c!==a&&(this.nd(b,a,this.cb),a=c,this.za=Math.max(z.documentElement.clientHeight,p.innerHeight||0),this.cb=z.body.scrollHeight,this.yc=!1)}}.bind(this));p.addEventListener("mp_locationchange",this.Vd);this.Wd=
88
+ function(b){z.hidden&&this.nd(b,a,this.cb)}.bind(this);z.addEventListener("visibilitychange",this.Wd)}};H.prototype.Zg=function(){this.Ya&&(p.removeEventListener("click",this.Ya,!0),this.Ya=null);this.pa&&(this.pa.ah(),this.pa=null)};Na(H);U.prototype.dd=function(){var a=this.sf,b=this.version,c=this.dh;return new C(function(d,f){var g=p.indexedDB.open(a,b);g.onerror=function(){f(g.error)};g.onsuccess=function(){d(g.result)};g.onupgradeneeded=function(k){var h=k.target.result;c.forEach(function(n){h.objectStoreNames.contains(n)||
89
89
  h.createObjectStore(n)})}})};U.prototype.D=function(){if(!p.indexedDB)return C.reject("indexedDB is not supported in this browser");this.ua||(this.ua=this.dd());return this.ua.then(function(a){return a instanceof p.IDBDatabase?C.resolve():C.reject(a)})};U.prototype.Mb=function(a,b){function c(f){return new C(function(g,k){var h=f.transaction(d,a);h.oncomplete=function(){g(h)};h.onabort=h.onerror=function(){k(h.error)};b(h.objectStore(d))})}var d=this.bh;return this.ua.then(c).catch(function(f){return f&&
90
90
  "InvalidStateError"===f.name?(this.ua=this.dd(),this.ua.then(c)):C.reject(f)}.bind(this))};U.prototype.setItem=function(a,b){return this.Mb("readwrite",function(c){c.put(b,a)})};U.prototype.getItem=function(a){var b;return this.Mb("readonly",function(c){b=c.get(a)}).then(function(){return b.result})};U.prototype.removeItem=function(a){return this.Mb("readwrite",function(b){b.delete(a)})};U.prototype.getAll=function(){var a;return this.Mb("readonly",function(b){a=b.getAll()}).then(function(){return a.result})};
91
91
  var P=ha("flags"),cc={version:1,ye:["mixpanelFlags"]},ba=Object.freeze({lb:"networkOnly",He:"networkFirst",Vb:"persistenceUntilNetworkSuccess"}),Cc=[ba.lb,ba.He,ba.Vb];ea.prototype.Db=function(){return this.Qd()||!this.cd()?ba.lb:this.Jc.variantLookupPolicy};ea.prototype.Lf=function(){if(!this.cd())return 864E5;var a=this.Jc.persistenceTtlMs;return void 0===a||null===a?864E5:a};ea.prototype.cd=function(){var a=this.Jc;return a?-1===Cc.indexOf(a.variantLookupPolicy)?(P.error("Invalid variantLookupPolicy:",
@@ -97,105 +97,105 @@ this)).then(function(){P.log("Cleared persisted variants from IndexedDB")}).catc
97
97
  this.K=a.K,this.Ra=a.vg,this.Sa=a.th)},this)),this.bb.then(e.bind(function(){return this.Ua()},this)).catch(function(){D.error("Error initializing feature flags")});D.i("Feature Flags unavailable: missing minimum required APIs")};u.prototype.Yc=function(){return e.extend({distinct_id:this.vc("distinct_id"),device_id:this.vc("$device_id")},this.o("context"))};u.prototype.reset=function(){if(!this.Aa)return Promise.resolve();this.flags=null;this.K={};this.ea={};this.Ja=new Set;this.Sa=this.Ra=this.qa=
98
98
  this.F=null;return this.Aa.clear().then(e.bind(function(){return this.Ua()},this)).catch(function(){D.error("Error during flags reset")})};u.prototype.uc=function(){var a=this.A("flags");return a?e.l(a)?e.extend({},Ub,a):Ub:{}};u.prototype.o=function(a){return this.uc()[a]};u.prototype.Ib=function(){return!!this.A("flags")};u.prototype.uh=function(a,b){if(!this.Ib())return D.i("Feature Flags not enabled, cannot update context"),Promise.resolve();var c=this.A("flags");e.l(c)||(c={});b=b&&b.replace?
99
99
  {}:this.o("context");c.context=e.extend({},b,a);a={};a.flags=c;this.Lg(a);return this.Ua().catch(function(){D.error("Error fetching flags during updateContext")})};u.prototype.ub=function(){this.Ib()||D.error("Feature Flags not enabled");return!!this.flags};u.prototype.Ua=function(){if(!this.Ib())return Promise.resolve();var a=this.Yc(),b=a.distinct_id,c=lb();D.log("Fetching flags for distinct ID: "+b);b=new URLSearchParams;b.set("context",JSON.stringify(a));b.set("token",this.A("token"));b.set("mp_lib",
100
- "web");b.set("$lib_version","2.79.0");b=this.Cb()+"?"+b.toString();this.qa=Date.now();return this.F=this.fetch.call(p,b,{method:"GET",headers:{Authorization:"Basic "+btoa(this.A("token")+":"),traceparent:c}}).then(function(d){this.ae();return d.json()}.bind(this)).then(function(d){var f=d.flags;if(!f)throw Error("No flags in API response");var g=new Map,k={};e.h(f,function(h,n){var r=!1,q=n+":";e.h(this.ea,function(m,t){t.startsWith(q)&&(r=!0)});r?(h=this.flags&&this.flags.get(n))&&g.set(n,h):g.set(n,
100
+ "web");b.set("$lib_version","2.80.0");b=this.Cb()+"?"+b.toString();this.qa=Date.now();return this.F=this.fetch.call(p,b,{method:"GET",headers:{Authorization:"Basic "+btoa(this.A("token")+":"),traceparent:c}}).then(function(d){this.ae();return d.json()}.bind(this)).then(function(d){var f=d.flags;if(!f)throw Error("No flags in API response");var g=new Map,k={};e.h(f,function(h,n){var r=!1,q=n+":";e.h(this.ea,function(m,t){t.startsWith(q)&&(r=!0)});r?(h=this.flags&&this.flags.get(n))&&g.set(n,h):g.set(n,
101
101
  {key:h.variant_key,value:h.variant_value,experiment_id:h.experiment_id,is_experiment_active:h.is_experiment_active,is_qa_tester:h.is_qa_tester,variant_source:"network"})},this);(d=d.pending_first_time_events)&&0<d.length&&e.h(d,function(h){var n=h.flag_key,r=n+":"+h.first_time_event_hash;this.ea[r]||(k[r]={flag_key:n,flag_id:h.flag_id,project_id:h.project_id,first_time_event_hash:h.first_time_event_hash,event_name:h.event_name,property_filters:h.property_filters,pending_variant:h.pending_variant})},
102
102
  this);this.ea&&e.h(this.ea,function(h,n){n=n.split(":")[0];h&&!g.has(n)&&this.flags&&this.flags.has(n)&&g.set(n,this.flags.get(n))},this);this.flags=g;this.Ja=new Set;this.K=k;this.Sa=this.Ra=null;this.Ze=c;this.Ue();this.Aa.save(a,this.flags,this.K)}.bind(this)).catch(function(d){this.qa&&this.ae();D.error(d);throw d;}.bind(this))};u.prototype.ig=function(){return this.Ib()?this.Ja?this.qa?this.F:this.Ua():(D.error("loadFlags called before init"),Promise.resolve()):Promise.resolve()};u.prototype.ae=
103
103
  function(){this.qa?(this.ac=this.qa,this.$b=Date.now(),this.Oe=this.$b-this.ac,this.qa=null):D.error("Fetch in progress started time not set, cannot mark fetch complete")};u.prototype.Ue=function(){var a=!1;e.h(this.K,function(b){b.property_filters&&!e.P(b.property_filters)&&(a=!0)});a&&this.Ed().then(function(){D.log("targeting loaded for property filter evaluation")})};u.prototype.Ed=function(){return ib(this.$.bind(this),this.oa).catch(function(a){D.error("Failed to load targeting: "+a)}.bind(this))};
104
104
  u.prototype.pd=function(a,b){this.K&&!e.P(this.K)&&(p.__mp_targeting&&e.la(p.__mp_targeting.then)?p.__mp_targeting.then(function(c){this.ec(a,b,c)}.bind(this)).catch(function(){this.ec(a,b,null)}.bind(this)):this.ec(a,b,null))};u.prototype.ec=function(a,b,c){e.h(this.K,function(d,f){if(!this.ea[f]){var g=d.flag_key;if(c||!d.property_filters||e.P(d.property_filters)){var k=c?c.eventMatchesCriteria(a,b,{event_name:d.event_name,property_filters:d.property_filters}):{matches:a===d.event_name,error:null};
105
105
  k.error?D.error('Error checking first-time event for flag "'+g+'": '+k.error):k.matches&&(D.log('First-time event matched for flag "'+g+'": '+a),this.flags.set(g,{key:d.pending_variant.variant_key,value:d.pending_variant.variant_value,experiment_id:d.pending_variant.experiment_id,is_experiment_active:d.pending_variant.is_experiment_active}),this.Ja.delete(g),this.ea[f]=!0,this.wg(d.flag_id,d.project_id,d.first_time_event_hash))}else D.warn('Skipping event check for "'+g+'" - property filters require targeting library')}},
106
- this)};u.prototype.Ff=function(a){return this.Cb()+"/"+a+"/first-time-events"};u.prototype.wg=function(a,b,c){var d=this.vc("distinct_id"),f=lb(),g=new URLSearchParams;g.set("mp_lib","web");g.set("$lib_version","2.79.0");g=this.Ff(a)+"?"+g.toString();b={distinct_id:d,project_id:b,first_time_event_hash:c};D.log("Recording first-time event for flag: "+a);this.fetch.call(p,g,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Basic "+btoa(this.A("token")+":"),traceparent:f},body:JSON.stringify(b)}).catch(function(k){D.error("Failed to record first-time event for flag "+
107
- a+": "+k)})};u.prototype.Fd=function(a,b){if(!this.bb)return new Promise(function(d){D.i("Feature Flags not initialized");d(da(b))});var c=this.Aa.Db();return this.bb.then(e.bind(function(){if(c===ba.Vb)return this.ub()&&!this.rb()?this.Va(a,b):this.F?this.F.then(e.bind(function(){return this.Va(a,b)},this)).catch(function(f){D.error(f);return da(b)}):da(b);var d=e.bind(function(){return this.Va(a,b)},this);return this.F?this.F.then(d).catch(d):da(b)},this))};u.prototype.rb=function(){return this.Ra&&
108
- this.Sa?Date.now()-this.Ra>=this.Sa:!1};u.prototype.Va=function(a,b){if(this.rb())return D.log('Loaded persisted variants are past TTL so returning fallback for "'+a+'"'),da(b);if(!this.ub())return D.log("Flags not loaded yet"),da(b);var c=this.flags.get(a);if(!c)return D.log('No flag found: "'+a+'"'),da(b);this.lh(a,c);return c};u.prototype.Af=function(){if(!this.bb)return D.i("Feature Flags not initialized"),Promise.resolve(new Map);var a=this.Aa.Db();return this.bb.then(e.bind(function(){if(a===
109
- ba.Vb)return this.ub()&&!this.rb()?this.Bb():this.F?this.F.then(e.bind(function(){return this.Bb()},this)).catch(function(c){D.error(c);return new Map}):new Map;var b=e.bind(this.Bb,this);return this.F?this.F.then(b).catch(b):new Map},this))};u.prototype.Bb=function(){return this.rb()?(D.log("Loaded persisted variants are past TTL so returning empty Map"),new Map):this.flags||new Map};u.prototype.xc=function(a,b){return this.Fd(a,{value:b}).then(function(c){return c.value}).catch(function(c){D.error(c);
110
- return b})};u.prototype.Ef=function(a,b){D.i("mixpanel.flags.get_feature_data() is deprecated and will be removed in a future release. Use mixpanel.flags.get_variant_value() instead.");return this.xc(a,b)};u.prototype.Gd=function(a,b){return this.Va(a,{value:b}).value};u.prototype.isEnabled=function(a,b){return this.xc(a).then(function(){return this.Pd(a,b)}.bind(this)).catch(function(c){D.error(c);return b})};u.prototype.Pd=function(a,b){b=b||!1;var c=this.Gd(a,b);!0!==c&&!1!==c&&(D.error('Feature flag "'+
111
- a+'" value: '+c+" is not a boolean; returning fallback value: "+b),c=b);return c};u.prototype.lh=function(a,b){this.Ja.has(a)||(this.Ja.add(a),a={"Experiment name":a,"Variant name":b.key,$experiment_type:"feature_flag","Variant fetch start time":Y(this.ac)?(new Date(this.ac)).toISOString():null,"Variant fetch complete time":Y(this.$b)?(new Date(this.$b)).toISOString():null,"Variant fetch latency (ms)":this.Oe,"Variant fetch traceparent":this.Ze},Y(b.experiment_id)&&(a.$experiment_id=b.experiment_id),
112
- Y(b.is_experiment_active)&&(a.$is_experiment_active=b.is_experiment_active),Y(b.is_qa_tester)&&(a.$is_qa_tester=b.is_qa_tester),Y(b.variant_source)&&(a.$variant_source=b.variant_source),Y(b.persisted_at_in_ms)&&(a.$persisted_at_in_ms=b.persisted_at_in_ms),Y(b.ttl_in_ms)&&(a.$ttl_in_ms=b.ttl_in_ms),this.track("$experiment_started",a))};u.prototype.xh=function(){return this.F?this.F:Promise.resolve()};u.prototype.lg=function(){return!!this.fetch&&"undefined"!==typeof Promise&&"undefined"!==typeof Map&&
113
- "undefined"!==typeof Set};Na(u);u.prototype.are_flags_ready=u.prototype.ub;u.prototype.get_variant=u.prototype.Fd;u.prototype.get_variant_sync=u.prototype.Va;u.prototype.get_all_variants=u.prototype.Af;u.prototype.get_all_variants_sync=u.prototype.Bb;u.prototype.get_variant_value=u.prototype.xc;u.prototype.get_variant_value_sync=u.prototype.Gd;u.prototype.is_enabled=u.prototype.isEnabled;u.prototype.is_enabled_sync=u.prototype.Pd;u.prototype.load_flags=u.prototype.ig;u.prototype.update_context=u.prototype.uh;
114
- u.prototype.when_ready=u.prototype.xh;u.prototype.get_feature_data=u.prototype.Ef;u.prototype.getTargeting=u.prototype.Ed;var Dc={version:1,ye:["mixpanelRecordingEvents","mixpanelRecordingRegistry"]},Ec=ha("recorder");K.prototype.Sg=function(){if(this.A("disable_persistence"))return v.log("Load recorder check skipped due to disable_persistence config"),C.resolve(!1);var a=new U("mixpanelBrowserDb","mixpanelRecordingRegistry",Dc),b=this.Jf();return a.D().then(function(){return a.getAll()}).then(function(c){for(var d=
115
- 0;d<c.length;d++){var f=c[d],g=Date.now();if(!f||g>f.maxExpires||g>f.idleExpires||c[d].tabId===b)return!0}return!1}).catch(e.bind(function(c){this.s("Error checking recording registry",c);return!1},this))};K.prototype.mc=function(a,b){if(!p.MutationObserver)return v.i("Browser does not support MutationObserver; skipping session recording"),C.resolve();var c=e.bind(function(f){return new C(e.bind(function(g){var k=fa(e.bind(function(){this.C=this.C||new p.__mp_recorder(this.Nb);this.C.resumeRecording(f);
116
- g()},this));e.m(p.__mp_recorder)?this.$(this.Kc||this.Kb+"mixpanel-recorder-D5HJyV2E.min.js",k):k()},this))},this),d=bc(this.A("record_allowed_iframe_origins"),Ec);if(0<d.length&&(this.Xe(d),p.parent!==p))return this.We(d,c),this.Ve(d),C.resolve();b=e.m(b)?this.A("record_sessions_percent"):b;b=0<b&&100*Math.random()<=b;return a||b?c(!0):this.Sg().then(e.bind(function(f){return f?c(!1):C.resolve()},this))};K.prototype.gg=function(){if(!this.C||!e.la(this.C.isRecording))return!1;try{return this.C.isRecording()}catch(a){return this.s("Error checking if recording is active",
117
- a),!1}};K.prototype.Ug=function(a,b){var c=this.gg(),d=this.A("recording_event_triggers");if(!c&&d&&(c=d[a])&&"number"===typeof c.percentage){var f=c.percentage,g=c.property_filters;g&&!e.P(g)?ib(this.$,this.oa||this.Kb+"mixpanel-targeting-1L9FyetZ.min.js").then(function(k){try{k.eventMatchesCriteria(a,b,{event_name:a,property_filters:g}).matches&&this.mc(!1,f)}catch(h){v.i("Could not parse recording event trigger properties logic:",h)}}.bind(this)).catch(function(k){v.i("Failed to load targeting library:",
118
- k)}):this.mc(!1,f)}};K.prototype.$g=function(){return this.C?this.C.stopRecording():C.resolve()};K.prototype.sg=function(){return this.C?this.C.pauseRecording():C.resolve()};K.prototype.Cg=function(){return this.C?this.C.resumeRecording():C.resolve()};K.prototype.hg=function(){return this.Eb()&&this.A("record_heatmap_data")};K.prototype.Hf=function(){var a={},b=this.Eb();b&&(a.$mp_replay_id=b);return a};K.prototype.If=function(){var a=null,b=this.Eb();b&&(a="https://mixpanel.com/projects/replay-redirect?"+
119
- e.Ub({replay_id:b,distinct_id:this.Dd(),token:this.A("token")}));return a};K.prototype.Eb=function(){if(this.sb)return this.sb;var a=null;this.C&&(a=this.C.replayId);return a||null};K.prototype.We=function(a,b){if(!this.nb){var c=this;this.nb=function(d){-1!==a.indexOf(d.origin)&&(d=d.data)&&"mp_iframe_handshake_response"===d.type&&d.token===c.A("token")&&d.replayId&&(c.sb=d.replayId,d.distinctId&&c.Nb.identify(d.distinctId),c.fd=!1,p.removeEventListener("message",c.nb),c.nb=null,b(!0))};p.addEventListener("message",
120
- this.nb)}};K.prototype.ld=function(a){var b={type:"mp_iframe_handshake_request"};b.token=this.A("token");for(var c=0;c<a.length;c++)try{p.parent.postMessage(b,a[c])}catch(d){}};K.prototype.Ve=function(a){function b(){setTimeout(function(){!c.fd||c.sb||10<=++d||(c.ld(a),f*=2,b())},f)}var c=this,d=0,f=50;this.fd=!0;this.ld(a);b()};K.prototype.Xe=function(a){if(!this.ed){var b=this;this.ed=function(c){if(-1!==a.indexOf(c.origin)){var d=c.data;if(d&&"mp_iframe_handshake_request"===d.type&&d.token===b.A("token")&&
121
- (d=b.Eb())){var f={type:"mp_iframe_handshake_response"};f.token=b.A("token");f.replayId=d;f.distinctId=b.Dd();c.source.postMessage(f,c.origin)}}};p.addEventListener("message",this.ed)}};Na(K);T.prototype.yb=function(){};T.prototype.rc=function(){};T.prototype.ic=function(){};T.prototype.D=function(a){this.u=a;return this};T.prototype.track=function(a,b,c,d){var f=this,g=e.tf(a);if(0===g.length)v.error("The DOM query ("+a+") returned 0 elements");else return e.h(g,function(k){e.me(k,this.fe,function(h){var n=
122
- {},r=f.yb(c,this),q=f.u.g("track_links_timeout");f.rc(h,this,n);window.setTimeout(f.Ae(d,r,n,!0),q);f.u.track(b,r,f.Ae(d,r,n))})},this),!0};T.prototype.Ae=function(a,b,c,d){d=d||!1;var f=this;return function(){c.lf||(c.lf=!0,a&&!1===a(d,b)||f.ic(c))}};T.prototype.yb=function(a,b){return"function"===typeof a?a(b):e.extend({},a)};e.Nd(la,T);la.prototype.yb=function(a,b){var c=la.fh.yb.apply(this,arguments);b.href&&(c.url=b.href);return c};la.prototype.rc=function(a,b,c){c.be=2===a.which||a.metaKey||
123
- a.ctrlKey||"_blank"===b.target;c.href=b.href;c.be||a.preventDefault()};la.prototype.ic=function(a){a.be||setTimeout(function(){window.location=a.href},0)};e.Nd(ya,T);ya.prototype.rc=function(a,b,c){c.element=b;a.preventDefault()};ya.prototype.ic=function(a){setTimeout(function(){a.element.submit()},0)};var Fc=ha("lock");gb.prototype.Vc=function(a,b){return new this.ke(e.bind(function(c,d){function f(){function M(){w.removeItem(O);w.getItem(x)===r&&w.removeItem(x);w.getItem(J)===r&&w.removeItem(J)}
124
- w.setItem(O,"1");a().then(function(ca){M();c(ca)}).catch(function(ca){M();d(ca)})}function g(){w.setItem(J,r);h(k,function(){w.getItem(J)===r?f():n(function(){w.getItem(x)!==r?g():h(function(){return!w.getItem(O)},f)})})}function k(){var M=w.getItem(x);if(M&&M!==r)return!1;w.setItem(x,r);if(w.getItem(x)===r)return!0;za(w,!0)||d(Error("localStorage support dropped while acquiring lock"));return!1}function h(M,ca){M()?ca():n(function(){h(M,ca)})}function n(M){(new Date).getTime()-q>y?(Fc.error("Timeout waiting for mutex on "+
125
- m+"; clearing lock. ["+r+"]"),w.removeItem(O),w.removeItem(x),g()):setTimeout(function(){try{M()}catch(ca){d(ca)}},t*(Math.random()+.1))}var r=b||(new Date).getTime()+"|"+Math.random(),q=(new Date).getTime(),m=this.Ga,t=this.ie,y=this.Sc,w=this.storage,J=m+":X",x=m+":Y",O=m+":Z";try{if(za(w,!0))g();else throw Error("localStorage support check failed");}catch(M){d(M)}},this))};qa.prototype.D=function(){return this.storage?C.resolve():C.reject(Error("localStorage is not available"))};qa.prototype.setItem=
126
- function(a,b){return new C(e.bind(function(c,d){try{this.storage.setItem(a,oa(b))}catch(f){d(f)}c()},this))};qa.prototype.getItem=function(a){return new C(e.bind(function(b,c){try{var d=Ga(this.storage.getItem(a))}catch(f){c(f)}b(d)},this))};qa.prototype.removeItem=function(a){return new C(e.bind(function(b,c){try{this.storage.removeItem(a)}catch(d){c(d)}b()},this))};var hb=ha("batch");Q.prototype.ha=function(){return this.Bc||!this.G?C.resolve():this.aa.D().then(e.bind(function(){this.Bc=!0},this)).catch(e.bind(function(a){this.s("Error initializing queue persistence. Disabling persistence",
127
- a);this.Bc=!0;this.G=!1},this))};Q.prototype.enqueue=function(a,b){a={id:La(),flushAfter:(new Date).getTime()+2*b,payload:a};if(this.G)return this.vf(a);this.S.push(a);return C.resolve(!0)};Q.prototype.ad=function(a){var b=e.bind(function(){return this.ha().then(e.bind(function(){return this.hb()},this)).then(e.bind(function(c){return this.Mc(c.concat(a))},this)).then(e.bind(function(c){c&&(this.S=this.S.concat(a));return c},this)).catch(e.bind(function(c){this.s("Error enqueueing items",c,a);return!1},
128
- this))},this);return this.lock.Vc(b,this.Pb).catch(e.bind(function(c){this.s("Error acquiring storage lock",c);return!1},this))};Q.prototype.xf=function(a){var b=this.S.slice(0,a);return this.G&&b.length<a?this.ha().then(e.bind(function(){return this.hb()},this)).then(e.bind(function(c){if(c.length){var d={};e.h(b,function(k){d[k.id]=!0});for(var f=0;f<c.length;f++){var g=c[f];if((new Date).getTime()>g.flushAfter&&!d[g.id]&&(g.rg=!0,b.push(g),b.length>=a))break}}return b},this)):C.resolve(b)};Q.prototype.xg=
129
- function(a){var b={};e.h(a,function(d){b[d]=!0});this.S=fb(this.S,b);if(this.G){var c=e.bind(function(){return this.ha().then(e.bind(function(){return this.hb()},this)).then(e.bind(function(d){d=fb(d,b);return this.Mc(d)},this)).then(e.bind(function(){return this.hb()},this)).then(e.bind(function(d){for(var f=0;f<d.length;f++){var g=d[f];if(g.id&&b[g.id])throw Error("Item not removed from storage");}return!0},this)).catch(e.bind(function(d){this.s("Error removing items",d,a);return!1},this))},this);
130
- return this.lock.Vc(c,this.Pb).catch(e.bind(function(d){this.s("Error acquiring storage lock",d);return za(this.lock.storage,!0)?!1:c().then(e.bind(function(f){return f?f:this.aa.removeItem(this.Ga).then(function(){return f})},this)).catch(e.bind(function(f){this.s("Error clearing queue",f);return!1},this))},this))}return C.resolve(!0)};Q.prototype.vh=function(a){this.S=eb(this.S,a);return this.G?this.lock.Vc(e.bind(function(){return this.ha().then(e.bind(function(){return this.hb()},this)).then(e.bind(function(b){b=
131
- eb(b,a);return this.Mc(b)},this)).catch(e.bind(function(b){this.s("Error updating items",a,b);return!1},this))},this),this.Pb).catch(e.bind(function(b){this.s("Error acquiring storage lock",b);return!1},this)):C.resolve(!0)};Q.prototype.hb=function(){return this.ha().then(e.bind(function(){return this.aa.getItem(this.Ga)},this)).then(e.bind(function(a){a&&!e.isArray(a)&&(this.s("Invalid storage entry:",a),a=null);return a||[]},this)).catch(e.bind(function(a){this.s("Error retrieving queue",a);return[]},
132
- this))};Q.prototype.Mc=function(a){return this.ha().then(e.bind(function(){return this.aa.setItem(this.Ga,a)},this)).then(function(){return!0}).catch(e.bind(function(b){this.s("Error saving queue",b);return!1},this))};Q.prototype.clear=function(){this.S=[];return this.G?this.ha().then(e.bind(function(){return this.aa.removeItem(this.Ga)},this)):C.resolve()};var va=ha("batch");N.prototype.enqueue=function(a){return this.fb.enqueue(a,this.Ab)};N.prototype.start=function(){this.stopped=!1;this.nc=0;
133
- return this.flush()};N.prototype.stop=function(){this.stopped=!0;this.Rc&&(clearTimeout(this.Rc),this.Rc=null)};N.prototype.clear=function(){return this.fb.clear()};N.prototype.oe=function(){this.fa=this.Z.batch_size};N.prototype.Da=function(){this.qe(this.Z.batch_flush_interval_ms)};N.prototype.qe=function(a){this.Ab=a;this.stopped||(this.Rc=setTimeout(e.bind(function(){this.stopped||this.flush()},this),this.Ab))};N.prototype.Jg=function(a,b){return new C(e.bind(function(c){this.Hg(a,b,c)},this))};
134
- N.prototype.flush=function(a){if(this.Lc)return va.log("Flush: Request already in progress"),C.resolve();this.Lc=!0;a=a||{};var b=this.Z.batch_request_timeout_ms,c=(new Date).getTime(),d=this.fa;return this.fb.xf(d).then(e.bind(function(f){var g=f.length===d,k=[],h={};e.h(f,function(m){var t=m.payload;this.vb&&!m.rg&&(t=this.vb(t));if(t){t.event&&t.properties&&(t.properties=e.extend({},t.properties,{mp_sent_by_lib_version:"2.79.0"}));var y=!0,w=m.id;w?5<(this.ma[w]||0)&&(this.s("[dupe] item ID sent too many times, not sending",
135
- {item:m,fa:f.length,ih:this.ma[w]}),y=!1):this.s("[dupe] found item with no ID",{item:m});y&&k.push(t)}h[m.id]=t},this);if(1>k.length)return this.Lc=!1,this.Da(),C.resolve();var n=e.bind(function(){return this.fb.xg(e.map(f,function(m){return m.id})).then(e.bind(function(m){e.h(f,e.bind(function(t){var y=t.id;y?(this.ma[y]=this.ma[y]||0,this.ma[y]++,5<this.ma[y]&&this.s("[dupe] item ID sent too many times",{item:t,fa:f.length,ih:this.ma[y]})):this.s("[dupe] found item with no ID while removing",{item:t})},
136
- this));if(m)return this.nc=0,this.Cd&&!g?(this.Da(),C.resolve()):this.flush();5<++this.nc?(this.s("Too many queue failures; disabling batching system."),this.Xg()):this.Da();return C.resolve()},this))},this),r=e.bind(function(m){this.Lc=!1;try{if(a.Ce)return this.fb.vh(h);if(e.l(m)&&"timeout"===m.error&&(new Date).getTime()-c>=b)return this.s("Network timeout; retrying"),this.flush();var t;if(t=e.l(m)){var y;if(!(y=500<=m.Hb||429===m.Hb)){var w;if(w=0>=m.Hb){var J=p.navigator.onLine;w=!(e.m(J)||J)}y=
137
- w}t=y||"timeout"===m.error}if(t){var x=2*this.Ab;m.pe&&(x=1E3*parseInt(m.pe,10)||x);x=Math.min(6E5,x);this.s("Error; retry in "+x+" ms");this.qe(x);return C.resolve()}if(e.l(m)&&413===m.Hb){if(1<f.length)return this.fa=Math.min(this.fa,Math.max(1,Math.floor(d/2)),f.length-1),this.s("413 response; reducing batch size to "+this.fa),this.Da(),C.resolve();this.s("Single-event request too large; dropping",f);this.oe()}return n()}catch(O){this.s("Error handling API response",O),this.Da()}},this),q={method:"POST",
138
- Ge:!0,Rf:!0,ze:b};a.Ce&&(q.Sb="sendBeacon");va.log("MIXPANEL REQUEST:",k);return this.Jg(k,q).then(r)},this)).catch(e.bind(function(f){this.s("Error flushing request queue",f);this.Da()},this))};N.prototype.s=function(a,b){va.error.apply(va.error,arguments);if(this.va)try{b instanceof Error||(b=Error(a)),this.va(a,b)}catch(c){va.error(c)}};var Vb={te:function(a,b){var c={},d={};e.l(a)?e.h(a,function(f,g){this.W(g)||(d[g]=f)},this):d[a]=b;c.$set=d;return c},De:function(a){var b={},c=[];e.isArray(a)||
139
- (a=[a]);e.h(a,function(d){this.W(d)||c.push(d)},this);b.$unset=c;return b},ve:function(a,b){var c={},d={};e.l(a)?e.h(a,function(f,g){this.W(g)||(d[g]=f)},this):d[a]=b;c.$set_once=d;return c},Be:function(a,b){var c={},d={};e.l(a)?e.h(a,function(f,g){this.W(g)||(d[g]=e.isArray(f)?f:[f])},this):d[a]=e.isArray(b)?b:[b];c.$union=d;return c},ff:function(a,b){var c={},d={};e.l(a)?e.h(a,function(f,g){this.W(g)||(d[g]=f)},this):d[a]=b;c.$append=d;return c},ne:function(a,b){var c={},d={};e.l(a)?e.h(a,function(f,
140
- g){this.W(g)||(d[g]=f)},this):d[a]=b;c.$remove=d;return c},Ah:function(){return{$delete:""}}};e.extend(F.prototype,Vb);F.prototype.Qa=function(a,b,c){this.j=a;this.cc=b;this.bc=c};F.prototype.set=na(function(a,b,c){var d=this.te(a,b);e.l(a)&&(c=b);return this.v(d,c)});F.prototype.Fa=na(function(a,b,c){var d=this.ve(a,b);e.l(a)&&(c=b);return this.v(d,c)});F.prototype.Tb=na(function(a,b){a=this.De(a);return this.v(a,b)});F.prototype.kb=na(function(a,b,c){e.l(a)&&(c=b);a=this.Be(a,b);return this.v(a,
141
- c)});F.prototype["delete"]=na(function(a){return this.v({$delete:""},a)});F.prototype.remove=na(function(a,b,c){a=this.ne(a,b);return this.v(a,c)});F.prototype.v=function(a,b){a.$group_key=this.cc;a.$group_id=this.bc;a.$token=this.N("token");a=e.pc(a);return this.j.hc({type:"groups",data:a,endpoint:this.j.ja("groups")+"/"+this.N("api_routes").groups,kc:this.j.L.groups},b)};F.prototype.W=function(a){return"$group_key"===a||"$group_id"===a};F.prototype.N=function(a){return this.j.g(a)};F.prototype.toString=
142
- function(){return this.j.toString()+".group."+this.cc+"."+this.bc};F.prototype.remove=F.prototype.remove;F.prototype.set=F.prototype.set;F.prototype.set_once=F.prototype.Fa;F.prototype.union=F.prototype.kb;F.prototype.unset=F.prototype.Tb;F.prototype.toString=F.prototype.toString;e.extend(A.prototype,Vb);A.prototype.Qa=function(a){this.j=a};A.prototype.set=Z(function(a,b,c){var d=this.te(a,b);e.l(a)&&(c=b);this.N("save_referrer")&&this.j.persistence.Uc(document.referrer);d.$set=e.extend({},e.info.ug(),
143
- d.$set);return this.v(d,c)});A.prototype.Fa=Z(function(a,b,c){var d=this.ve(a,b);e.l(a)&&(c=b);return this.v(d,c)});A.prototype.Tb=Z(function(a,b){a=this.De(a);return this.v(a,b)});A.prototype.Md=Z(function(a,b,c){var d={},f={};e.l(a)?(e.h(a,function(g,k){this.W(k)||(isNaN(parseFloat(g))?v.error("Invalid increment value passed to mixpanel.people.increment - must be a number"):f[k]=g)},this),c=b):(e.m(b)&&(b=1),f[a]=b);d.$add=f;return this.v(d,c)});A.prototype.append=Z(function(a,b,c){e.l(a)&&(c=b);
144
- a=this.ff(a,b);return this.v(a,c)});A.prototype.remove=Z(function(a,b,c){e.l(a)&&(c=b);a=this.ne(a,b);return this.v(a,c)});A.prototype.kb=Z(function(a,b,c){e.l(a)&&(c=b);a=this.Be(a,b);return this.v(a,c)});A.prototype.nh=Z(function(){v.error("mixpanel.people.track_charge() is deprecated and no longer has any effect.")});A.prototype.qd=function(a){return this.set("$transactions",[],a)};A.prototype.yd=function(){if(this.dc()){var a={$delete:this.j.ka()};return this.v(a)}v.error("mixpanel.people.delete_user() requires you to call identify() first")};
145
- A.prototype.toString=function(){return this.j.toString()+".people"};A.prototype.v=function(a,b){a.$token=this.N("token");a.$distinct_id=this.j.ka();var c=this.j.H("$device_id"),d=this.j.H("$user_id"),f=this.j.H("$had_persisted_distinct_id");c&&(a.$device_id=c);d&&(a.$user_id=d);f&&(a.$had_persisted_distinct_id=f);c=e.pc(a);return this.dc()?this.j.hc({type:"people",data:c,endpoint:this.j.ja("people")+"/"+this.N("api_routes").engage,kc:this.j.L.Hc},b):(this.Ne(a),e.m(b)||(this.N("verbose")?b({status:-1,
146
- error:null}):b(-1)),e.truncate(c,255))};A.prototype.N=function(a){return this.j.g(a)};A.prototype.dc=function(){return!0===this.j.ra.Kd};A.prototype.Ne=function(a){"$set"in a?this.j.persistence.J("$set",a):"$set_once"in a?this.j.persistence.J("$set_once",a):"$unset"in a?this.j.persistence.J("$unset",a):"$add"in a?this.j.persistence.J("$add",a):"$append"in a?this.j.persistence.J("$append",a):"$remove"in a?this.j.persistence.J("$remove",a):"$union"in a?this.j.persistence.J("$union",a):v.error("Invalid call to _enqueue():",
147
- a)};A.prototype.Oa=function(a,b,c,d){var f=this,g=e.extend({},this.j.persistence.Za(a)),k=g;e.m(g)||!e.l(g)||e.P(g)||(f.j.persistence.O(a,g),f.j.persistence.save(),d&&(k=d(g)),b.call(f,k,function(h,n){0===h&&f.j.persistence.J(a,g);e.m(c)||c(h,n)}))};A.prototype.Qe=function(a,b,c,d,f,g,k){var h=this;this.Oa("$set",this.set,a);this.Oa("$set_once",this.Fa,d);this.Oa("$unset",this.Tb,g,function(q){return e.keys(q)});this.Oa("$add",this.Md,b);this.Oa("$union",this.kb,f);a=this.j.persistence.Za("$append");
148
- if(!e.m(a)&&e.isArray(a)&&a.length)for(b=function(q,m){0===q&&h.j.persistence.J("$append",n);e.m(c)||c(q,m)},d=a.length-1;0<=d;d--){a=this.j.persistence.Za("$append");var n=a.pop();h.j.persistence.save();e.P(n)||h.append(n,b)}a=this.j.persistence.Za("$remove");if(!e.m(a)&&e.isArray(a)&&a.length)for(b=function(q,m){0===q&&h.j.persistence.J("$remove",r);e.m(k)||k(q,m)},d=a.length-1;0<=d;d--){a=this.j.persistence.Za("$remove");var r=a.pop();h.j.persistence.save();e.P(r)||h.remove(r,b)}};A.prototype.W=
149
- function(a){return"$distinct_id"===a||"$token"===a||"$device_id"===a||"$user_id"===a||"$had_persisted_distinct_id"===a};A.prototype.set=A.prototype.set;A.prototype.set_once=A.prototype.Fa;A.prototype.unset=A.prototype.Tb;A.prototype.increment=A.prototype.Md;A.prototype.append=A.prototype.append;A.prototype.remove=A.prototype.remove;A.prototype.union=A.prototype.kb;A.prototype.track_charge=A.prototype.nh;A.prototype.clear_charges=A.prototype.qd;A.prototype.delete_user=A.prototype.yd;A.prototype.toString=
150
- A.prototype.toString;var Gc="__mps __mpso __mpus __mpa __mpap __mpr __mpu $people_distinct_id __alias __timers".split(" ");B.prototype.eb=function(){var a={};this.load();e.h(this.props,function(b,c){e.Ac(Gc,c)||(a[c]=b)});return a};B.prototype.load=function(){if(!this.disabled){var a=this.storage.parse(this.name);a&&(this.props=e.extend({},a))}};B.prototype.upgrade=function(){if(this.storage===e.localStorage){var a=e.cookie.parse(this.name);e.cookie.remove(this.name);e.cookie.remove(this.name,!0);
151
- a&&this.V(a)}else this.storage===e.cookie&&(a=e.localStorage.parse(this.name),e.localStorage.remove(this.name),a&&this.V(a))};B.prototype.save=function(){this.disabled||this.storage.set(this.name,oa(this.props),this.sc,this.oc,this.re,this.wd,this.xb)};B.prototype.Lb=function(a){this.load();return this.props[a]};B.prototype.remove=function(){this.storage.remove(this.name,!1,this.xb);this.storage.remove(this.name,!0,this.xb)};B.prototype.clear=function(){this.remove();this.props={}};B.prototype.V=
152
- function(a,b,c){return e.l(a)?("undefined"===typeof b&&(b="None"),this.sc="undefined"===typeof c?this.xd:c,this.load(),e.h(a,function(d,f){this.props.hasOwnProperty(f)&&this.props[f]!==b||(this.props[f]=d)},this),this.save(),!0):!1};B.prototype.register=function(a,b){return e.l(a)?(this.sc="undefined"===typeof b?this.xd:b,this.load(),e.extend(this.props,a),this.save(),!0):!1};B.prototype.unregister=function(a){this.load();a in this.props&&(delete this.props[a],this.save())};B.prototype.Fe=function(a){this.register(e.info.Fg(a))};
153
- B.prototype.Uc=function(a){this.V({$initial_referrer:a||"$direct",$initial_referring_domain:e.info.le(a)||"$direct"},"")};B.prototype.Of=function(){return e.Ha({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})};B.prototype.Ee=function(a){this.xd=this.sc=a.cookie_expiration;this.ue(a.disable_persistence);this.Mg(a.cookie_domain);this.Ng(a.cross_site_cookie);this.Og(a.cross_subdomain_cookie);this.Rg(a.secure_cookie)};B.prototype.ue=function(a){(this.disabled=
154
- a)?this.remove():this.save()};B.prototype.Mg=function(a){a!==this.xb&&(this.remove(),this.xb=a,this.save())};B.prototype.Ng=function(a){a!==this.wd&&(this.wd=a,this.remove(),this.save())};B.prototype.Og=function(a){a!==this.oc&&(this.oc=a,this.remove(),this.save())};B.prototype.Mf=function(){return this.oc};B.prototype.Rg=function(a){a!==this.re&&(this.re=a?!0:!1,this.remove(),this.save())};B.prototype.J=function(a,b){var c=this.pb(a);a=b[a];var d=this.ca("$set"),f=this.ca("$set_once"),g=this.ca("$unset"),
155
- k=this.ca("$add"),h=this.ca("$union"),n=this.ca("$remove",[]),r=this.ca("$append",[]);"__mps"===c?(e.extend(d,a),this.O("$add",a),this.O("$union",a),this.O("$unset",a)):"__mpso"===c?(e.h(a,function(q,m){m in f||(f[m]=q)}),this.O("$unset",a)):"__mpus"===c?e.h(a,function(q){e.h([d,f,k,h],function(m){q in m&&delete m[q]});e.h(r,function(m){q in m&&delete m[q]});g[q]=!0}):"__mpa"===c?(e.h(a,function(q,m){m in d?d[m]+=q:(m in k||(k[m]=0),k[m]+=q)},this),this.O("$unset",a)):"__mpu"===c?(e.h(a,function(q,
156
- m){e.isArray(q)&&(m in h||(h[m]=[]),e.h(q,function(t){e.Ac(h[m],t)||h[m].push(t)}))}),this.O("$unset",a)):"__mpr"===c?(n.push(a),this.O("$append",a)):"__mpap"===c&&(r.push(a),this.O("$unset",a));v.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):");v.log(b);this.save()};B.prototype.O=function(a,b){var c=this.props[this.pb(a)];e.m(c)||e.h(b,function(d,f){"$append"===a||"$remove"===a?e.h(c,function(g){g[f]===d&&delete g[f]}):delete c[f]},this)};B.prototype.Za=function(a){return this.Lb(this.pb(a))};
157
- B.prototype.pb=function(a){if("$set"===a)return"__mps";if("$set_once"===a)return"__mpso";if("$unset"===a)return"__mpus";if("$add"===a)return"__mpa";if("$append"===a)return"__mpap";if("$remove"===a)return"__mpr";if("$union"===a)return"__mpu";v.error("Invalid queue:",a)};B.prototype.ca=function(a,b){a=this.pb(a);b=e.m(b)?{}:b;return this.props[a]||(this.props[a]=b)};B.prototype.Pg=function(a){var b=(new Date).getTime(),c=this.Lb("__timers")||{};c[a]=b;this.props.__timers=c;this.save()};B.prototype.yg=
158
- function(a){var b=(this.Lb("__timers")||{})[a];e.m(b)||(delete this.props.__timers[a],this.save());return b};var xa,G,pa=p.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,db=!pa&&-1===L.indexOf("MSIE")&&-1===L.indexOf("Mozilla"),Ha=null;aa.sendBeacon&&(Ha=function(){return aa.sendBeacon.apply(aa,arguments)});var Wb={track:"track/",engage:"engage/",groups:"groups/",record:"record/",flags:"flags/",settings:"settings/"},bb={api_host:"https://api-js.mixpanel.com",api_hosts:{},api_routes:Wb,api_extra_query_params:{},
159
- api_method:"POST",api_transport:"XHR",api_payload_format:"base64",app_host:"https://mixpanel.com",autocapture:!1,cdn:"https://cdn.mxpnl.com",cross_site_cookie:!1,cross_subdomain_cookie:!0,error_reporter:ra,flags:!1,persistence:"cookie",persistence_name:"",cookie_domain:"",cookie_name:"",loaded:ra,mp_loader:null,track_marketing:!0,track_pageview:!1,skip_first_touch_marketing:!1,store_google:!0,stop_utm_persistence:!1,save_referrer:!0,test:!1,verbose:!1,img:!1,debug:!1,track_links_timeout:300,cookie_expiration:365,
160
- upgrade:!1,disable_persistence:!1,disable_cookie:!1,secure_cookie:!1,ip:!0,opt_out_tracking_by_default:!1,opt_out_persistence_by_default:!1,opt_out_tracking_persistence_type:"localStorage",opt_out_tracking_cookie_prefix:null,property_blacklist:[],xhr_headers:{},ignore_dnt:!1,batch_requests:!0,batch_size:50,batch_flush_interval_ms:5E3,batch_request_timeout_ms:9E4,batch_autostart:!0,hooks:{},record_allowed_iframe_origins:[],record_block_class:/^(mp-block|fs-exclude|amp-block|rr-block|ph-no-capture)$/,
161
- record_block_selector:"img, video, audio",record_canvas:!1,record_collect_fonts:!1,record_console:!0,record_heatmap_data:!1,recording_event_triggers:{},record_idle_timeout_ms:18E5,record_mask_inputs:!0,record_max_ms:864E5,record_min_ms:0,record_network:!1,record_network_options:{},record_sessions_percent:0,recorder_src:null,targeting_src:null,lib_base_path:"https://cdn.mxpnl.com/libs/",remote_settings_mode:"disabled"},cb=!1;l.prototype.D=function(a,b,c){if(e.m(c))this.B("You must name your new library: init(token, config, name)");
162
- else if("mixpanel"===c)this.B("You must initialize the main mixpanel object right after you include the Mixpanel js snippet");else return a=wa(a,b,c),G[c]=a,a.qb(),a};l.prototype.Qa=function(a,b,c){b=b||{};this.__loaded=!0;this.config={};var d={};"api_payload_format"in b||(b.api_host||bb.api_host).match(/\.mixpanel\.com/)&&(d.api_payload_format="json");this.I={};this.Ea(e.extend({},bb,d,b,{name:c,token:a,callback_fn:("mixpanel"===c?c:"mixpanel."+c)+"._jsc"}));this.U=new K({Nb:this,tc:e.bind(this.g,
163
- this),se:e.bind(this.Ea,this),Kf:e.bind(this.Jd,this),Bg:e.bind(this.B,this),Cf:e.bind(this.ka,this),Kc:this.g("recorder_src"),oa:this.g("targeting_src"),Kb:this.g("lib_base_path"),$:Ja});this._jsc=ra;this.Wb=[];this.Xb=[];this.ba=[];this.ra={disable_all_events:!1,identify_called:!1};this.kd=!1;this.L={};if(this.Na=this.g("batch_requests"))if(e.localStorage.Xa(!0)&&pa){if(this.ag(),Ha&&p.addEventListener){var f=e.bind(function(){this.L.wa.stopped||this.L.wa.flush({Ce:!0})},this);p.addEventListener("pagehide",
164
- function(g){g.persisted&&f()});p.addEventListener("visibilitychange",function(){"hidden"===z.visibilityState&&f()})}}else this.Na=!1,v.log("Turning off Mixpanel request-queueing; needs XHR and localStorage support"),e.h(this.Hd(),function(g){v.log("Clearing batch queue "+g.gb);e.localStorage.remove(g.gb)});this.persistence=this.cookie=new B(this.config);this.Ka={};this.Re();a=e.Ma();this.ka()||this.V({distinct_id:"$device:"+a,$device_id:a},"");this.flags=new u({Cb:e.bind(function(){return this.ja("flags")+
165
- "/"+this.g("api_routes").flags},this),tc:e.bind(this.g,this),se:e.bind(this.Ea,this),Gf:e.bind(this.H,this),rh:e.bind(this.track,this),$:Ja,oa:this.g("targeting_src")||this.g("lib_base_path")+"mixpanel-targeting-1L9FyetZ.min.js"});this.flags.D();this.flags=this.flags;this.Te();a=this.g("remote_settings_mode");this.Yb="strict"===a||"fallback"===a?this.Pe(a).then(e.bind(function(){return this.mb()},this)):this.mb();this.jc=new H(this);this.jc.D()};l.prototype.Te=function(){if(this.g("disable_persistence"))v.log("Tab ID initialization skipped due to disable_persistence config");
166
- else if(e.sessionStorage.Xa())try{var a=this.g("name")+"_"+this.g("token"),b="mp_tab_id_"+a,c="mp_gen_new_tab_id_"+a;!e.sessionStorage.get(c)&&e.sessionStorage.get(b)||e.sessionStorage.set(b,"$tab-"+e.Ma());e.sessionStorage.set(c,"1");this.gh=e.sessionStorage.get(b);p.addEventListener("beforeunload",function(){e.sessionStorage.remove(c)})}catch(d){this.B("Error initializing tab id",d)}else this.B("Session storage is not supported, cannot keep track of unique tab ID.")};l.prototype.Jd=function(){return this.gh||
167
- null};l.prototype.mb=ia(function(a){return this.U.mc(a)});l.prototype.Ye=fa(function(a,b){this.Yb&&this.Yb.then(e.bind(function(){if(!this.kd)return this.U.Ug(a,b)},this))});l.prototype.Wg=function(){return this.mb(!0)};l.prototype.Qc=function(){return this.U.$g()};l.prototype.tg=function(){return this.U.sg()};l.prototype.Dg=function(){return this.U.Cg()};l.prototype.R=function(){return this.U.hg()};l.prototype.Id=function(){return this.U.Hf()};l.prototype.Pf=function(){return this.U.If()};l.prototype.Ie=
168
- function(){return this.U.C};l.prototype.Je=function(){return this.Yb};l.prototype.qb=function(){this.g("loaded")(this);this.md();this.people.Fa(this.persistence.Of());if(this.g("store_google")&&this.g("stop_utm_persistence")){var a=e.info.Ta(null);e.h(a,function(b,c){this.unregister(c)}.bind(this))}};l.prototype.md=function(){this.persistence.Fe(z.referrer);this.g("store_google")&&!this.g("stop_utm_persistence")&&this.register(e.info.Ta());this.g("save_referrer")&&this.persistence.Uc(z.referrer)};
169
- l.prototype.Me=function(){e.h(this.Wb,function(a){this.fc.apply(this,a)},this);this.Wa()||e.h(this.Xb,function(a){this.v.apply(this,a)},this);delete this.Wb;delete this.Xb};l.prototype.fc=function(a,b){if(this.g("img"))return this.B("You can't use DOM tracking functions with img = true."),!1;if(!cb)return this.Wb.push([a,b]),!1;a=(new a).D(this);return a.track.apply(a,b)};l.prototype.gd=function(a,b){if(e.m(a))return null;if(pa)return function(g){a(g,b)};var c=this._jsc,d=""+Math.floor(1E8*Math.random()),
170
- f=this.g("callback_fn")+"["+d+"]";c[d]=function(g){delete c[d];a(g,b)};return f};l.prototype.v=function(a,b,c,d){var f=!0;if(db)return this.Xb.push(arguments),f;var g={method:this.g("api_method"),Sb:this.g("api_transport"),Ge:this.g("verbose")},k=null;d||!e.la(c)&&"string"!==typeof c||(d=c,c=null);c=e.extend(g,c||{});pa||(c.method="GET");g="POST"===c.method;var h=Ha&&g&&"sendbeacon"===c.Sb.toLowerCase(),n=c.Ge;b.verbose&&(n=!0);this.g("test")&&(b.test=1);n&&(b.verbose=1);this.g("img")&&(b.img=1);
171
- if(!pa)if(d)b.callback=d;else if(n||this.g("test"))b.callback="(function(){})";b.ip=this.g("ip")?1:0;b._=(new Date).getTime().toString();g&&(k="data="+encodeURIComponent(b.data),delete b.data);e.extend(b,this.g("api_extra_query_params"));a+="?"+e.Ub(b);var r=this;if("img"in b)k=z.createElement("img"),k.src=a,z.body.appendChild(k);else if(h){try{f=Ha(a,k)}catch(y){r.B(y),f=!1}try{d&&d(f?1:0)}catch(y){r.B(y)}}else if(pa)try{var q=new XMLHttpRequest;q.open(c.method,a,!0);var m=this.g("xhr_headers");
172
- g&&(m["Content-Type"]="application/x-www-form-urlencoded");e.h(m,function(y,w){q.setRequestHeader(w,y)});if(c.ze&&"undefined"!==typeof q.timeout){q.timeout=c.ze;var t=(new Date).getTime()}q.withCredentials=!0;q.onreadystatechange=function(){if(4===q.readyState)if(200===q.status){if(d)if(n){try{var y=e.La(q.responseText)}catch(w){if(r.B(w),c.Rf)y=q.responseText;else return}d(y)}else d(Number(q.responseText))}else y=q.timeout&&!q.status&&(new Date).getTime()-t>=q.timeout?"timeout":"Bad HTTP status: "+
173
- q.status+" "+q.statusText,r.B(y),d&&(n?d({status:0,Hb:q.status,error:y,pe:(q.responseHeaders||{})["Retry-After"]}):d(0))};q.send(k)}catch(y){r.B(y),f=!1}else k=z.createElement("script"),k.type="text/javascript",k.async=!0,k.defer=!0,k.src=a,m=z.getElementsByTagName("script")[0],m.parentNode.insertBefore(k,m);return f};l.prototype.Pe=function(a){function b(){"strict"===a&&(c.Ea({record_sessions_percent:0}),c.kd=!0)}var c=this;if(!p.AbortController)return v.i("Remote settings unavailable: missing minimum required APIs"),
174
- b(),Promise.resolve();var d=this.ja("settings")+"/"+this.g("api_routes").settings,f=e.Ub({$lib_version:"2.79.0",mp_lib:"web",sdk_config:"1"});d=d+"?"+f;var g=new AbortController,k=setTimeout(function(){g.abort()},500);return p.fetch(d,{method:"GET",headers:{Authorization:"Basic "+btoa(c.g("token")+":")},signal:g.signal}).then(function(h){clearTimeout(k);if(h.ok)return h.json();v.i("Network response was not ok");b()}).then(function(h){if(h&&h.sdk_config&&h.sdk_config.config){var n={};e.h(h.sdk_config.config,
175
- function(r,q){bb.hasOwnProperty(q)&&(n[q]=r)});e.P(n)?(v.i("No valid config keys found in remote settings."),b()):c.Ea(n)}else b()}).catch(function(h){clearTimeout(k);v.i("Failed to fetch remote settings",h);b()})};l.prototype.Zb=function(a){function b(k,h){e.h(k,function(n){if(e.isArray(n[0])){var r=h;e.h(n,function(q){r=r[q[0]].apply(r,q.slice(1))})}else this[n[0]].apply(this,n.slice(1))},h)}var c,d=[],f=[],g=[];e.h(a,function(k){k&&(c=k[0],e.isArray(c)?g.push(k):"function"===typeof k?k.call(this):
176
- e.isArray(k)&&"alias"===c?d.push(k):e.isArray(k)&&-1!==c.indexOf("track")&&"function"===typeof this[c]?g.push(k):f.push(k))},this);b(d,this);b(f,this);b(g,this)};l.prototype.od=function(){return!!this.L.wa};l.prototype.Hd=function(){var a="__mpq_"+this.g("token");return this.Xc=this.Xc||{wa:{type:"events",tb:"track",gb:a+"_ev"},Hc:{type:"people",tb:"engage",gb:a+"_pp"},groups:{type:"groups",tb:"groups",gb:a+"_gr"}}};l.prototype.ag=function(){if(!this.od()){var a=e.bind(function(c){return new N(c.gb,
177
- {Z:this.config,va:this.g("error_reporter"),Ig:e.bind(function(d,f,g){this.v(this.ja(c.tb)+"/"+this.g("api_routes")[c.tb],this.$c(d),f,this.gd(g,d))},this),vb:e.bind(function(d){return(d=this.da("before_send_"+c.type,d))?d[0]:null},this),Yg:e.bind(this.Pc,this),G:!0})},this),b=this.Hd();this.L={wa:a(b.wa),Hc:a(b.Hc),groups:a(b.groups)}}this.g("batch_autostart")&&this.Oc()};l.prototype.Oc=function(){this.Ke=!0;this.od()&&(this.Na=!0,e.h(this.L,function(a){a.start()}))};l.prototype.Pc=function(){this.Na=
178
- !1;e.h(this.L,function(a){a.stop();a.clear()})};l.prototype.push=function(a){this.Zb([a])};l.prototype.enable=function(a){var b;if("undefined"===typeof a)this.ra.Ad=!1;else{var c={};var d=[];for(b=0;b<a.length;b++)c[a[b]]=!0;for(a=0;a<this.ba.length;a++)c[this.ba[a]]||d.push(this.ba[a]);this.ba=d}};l.prototype.disable=function(a){"undefined"===typeof a?this.ra.Ad=!0:this.ba=this.ba.concat(a)};l.prototype.$c=function(a){a=oa(a);"base64"===this.g("api_payload_format")&&(a=e.gf(a));return{data:a}};l.prototype.hc=
179
- function(a,b){var c=e.truncate(a.data,255),d=a.endpoint,f=a.kc,g=a.Tg,k=a.Kg||{};b=b||ra;var h=!0,n=e.bind(function(){k.Nc||(c=this.da("before_send_"+a.type,c))&&(c=c[0]);return c?(v.log("MIXPANEL REQUEST:"),v.log(c),this.v(d,this.$c(c),k,this.gd(b,c))):null},this);this.Na&&!g?f.enqueue(c).then(function(r){r?b(1,c):n()}):h=n();return h&&c};l.prototype.track=ia(function(a,b,c,d){if(!c||!c.Nc){var f=this.da("before_track",a,b);if(null===f)return;a=f[0];b=f[1]}d||"function"!==typeof c||(d=c,c=null);
180
- c=c||{};if(f=c.transport)c.Sb=f;f=c.send_immediately;"function"!==typeof d&&(d=ra);if(e.m(a))this.B("No event name provided to mixpanel.track");else if(this.bd(a))d(0);else{b=e.extend({},b);b.token=this.g("token");var g=this.persistence.yg(a);e.m(g)||(b.$duration=parseFloat((((new Date).getTime()-g)/1E3).toFixed(3)));this.md();g=this.g("track_marketing")?e.info.kg():{};b=e.extend({},e.info.eb({mp_loader:this.g("mp_loader")}),g,this.persistence.eb(),this.Ka,this.Id(),b);g=this.g("property_blacklist");
181
- e.isArray(g)?e.h(g,function(k){delete b[k]}):this.B("Invalid value for property_blacklist config: "+g);this.Ye(a,b);f=this.hc({type:"events",data:{event:a,properties:b},endpoint:this.ja("events")+"/"+this.g("api_routes").track,kc:this.L.wa,Tg:f,Kg:c},d);this.flags&&this.flags.pd&&this.flags.pd(a,b);return f}});l.prototype.Qg=ia(function(a,b,c){e.isArray(b)||(b=[b]);var d={};d[a]=b;this.register(d);return this.people.set(a,b,c)});l.prototype.af=ia(function(a,b,c){var d=this.H(a),f={};void 0===d?(f[a]=
182
- [b],this.register(f)):-1===d.indexOf(b)&&(d.push(b),f[a]=d,this.register(f));return this.people.kb(a,b,c)});l.prototype.zg=ia(function(a,b,c){var d=this.H(a);if(void 0!==d){var f=d.indexOf(b);-1<f&&(d.splice(f,1),this.register({Bh:d}));0===d.length&&this.unregister(a)}return this.people.remove(a,b,c)});l.prototype.qh=ia(function(a,b,c,d){var f=e.extend({},b||{});e.h(c,function(g,k){null!==g&&void 0!==g&&(f[k]=g)});return this.track(a,f,d)});l.prototype.Le=function(a,b){return a+"_"+JSON.stringify(b)};
183
- l.prototype.Nf=function(a,b){var c=this.Le(a,b),d=this.Zc[c];if(void 0===d||d.cc!==a||d.bc!==b)d=new F,d.Qa(this,a,b),this.Zc[c]=d;return d};l.prototype.Tc=ia(function(a,b){"object"!==typeof a&&(a={});b=b||{};b=b.event_name||"$mp_web_page_view";var c=e.extend(e.info.mg(),e.info.Ta(),e.info.sd());a=e.extend({},c,a);this.R()&&(a.$captured_for_heatmap=!0);return this.track(b,a)});l.prototype.ph=function(){return this.fc.call(this,la,arguments)};l.prototype.oh=function(){return this.fc.call(this,ya,arguments)};
184
- l.prototype.hh=function(a){e.m(a)?this.B("No event name provided to mixpanel.time_event"):this.bd(a)||this.persistence.Pg(a)};var $b={persistent:!0};l.prototype.register=function(a,b){b=this.da("before_register",a,b);null!==b&&(a=b[0],b=b[1],b=Ia(b),b.persistent?this.persistence.register(a,b.days):e.extend(this.Ka,a))};l.prototype.V=function(a,b,c){c=this.da("before_register_once",a,b,c);null!==c&&(a=c[0],b=c[1],c=c[2],c=Ia(c),c.persistent?this.persistence.V(a,b,c.days):("undefined"===typeof b&&(b=
185
- "None"),e.h(a,function(d,f){this.Ka.hasOwnProperty(f)&&this.Ka[f]!==b||(this.Ka[f]=d)},this)))};l.prototype.unregister=function(a,b){b=this.da("before_unregister",a,b);null!==b&&(a=b[0],b=b[1],b=Ia(b),b.persistent?this.persistence.unregister(a):delete this.Ka[a])};l.prototype.jd=function(a,b){var c={};c[a]=b;this.register(c)};l.prototype.zc=function(a,b,c,d,f,g,k,h){a=this.da("before_identify",a);if(null===a)return-1;a=a[0];var n=this.ka();if(a&&n!==a){if("string"===typeof a&&0===a.indexOf("$device:"))return this.B("distinct_id cannot have $device: prefix"),
186
- -1;this.register({$user_id:a})}this.H("$device_id")||this.V({$had_persisted_distinct_id:!0,$device_id:n},"");a!==n&&a!==this.H("__alias")&&(this.unregister("__alias"),this.register({distinct_id:a}));this.ra.Kd=!0;this.people.Qe(b,c,d,f,g,k,h);a!==n&&this.track("$identify",{distinct_id:a,$anon_distinct_id:n},{Nc:!0});a!==n&&this.flags.Ua().catch(function(){v.error("[flags] Error fetching flags during identify")})};l.prototype.reset=function(){this.Qc();this.persistence.clear();this.ra.Kd=!1;var a=
187
- e.Ma();this.V({distinct_id:"$device:"+a,$device_id:a},"");this.mb();this.flags.reset()};l.prototype.ka=function(){return this.H("distinct_id")};l.prototype.cf=function(a,b){if(a===this.H("$people_distinct_id"))return this.B("Attempting to create alias for existing People user - aborting."),-2;var c=this;e.m(b)&&(b=this.ka());if(a!==b)return this.jd("__alias",a),this.track("$create_alias",{alias:a,distinct_id:b},{Nc:!0},function(){c.zc(a)});this.B("alias matches current distinct_id - skipping api call.");
188
- this.zc(a);return-1};l.prototype.ng=function(a){this.jd("mp_name_tag",a)};l.prototype.Ea=function(a){e.l(a)&&(e.extend(this.config,a),a.batch_size&&e.h(this.L,function(b){b.oe()}),this.g("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.g("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.Ee(this.config),W=W||this.g("debug"),("autocapture"in a||"record_heatmap_data"in a)&&this.jc&&this.jc.D(),e.l(a.hooks)&&
189
- (this.I={},e.h(a.hooks,function(b,c){if(e.la(b))this.I[c]=[b];else if(e.isArray(b)){this.I[c]=[];for(var d=0;d<b.length;d++)e.la(b[d])||v.i("Invalid hook added. Hook is not a function"),this.I[c].push(b[d])}else v.i("Invalid hooks added. Ensure that the hook values passed into config.hooks are functions or arrays of functions.")},this)))};l.prototype.g=function(a){return this.config[a]};l.prototype.da=function(a){var b=ka.call(arguments,1);e.h(this.I[a],function(c){if(null===b)return null;c=c.apply(this,
190
- b);"undefined"===typeof c?(this.B(a+" hook did not return a valid value"),b=null):(e.isArray(c)||(c=[c]),b.splice.apply(b,[0,c.length].concat(c)))},this);return b};l.prototype.H=function(a){return this.persistence.Lb([a])};l.prototype.ja=function(a){return this.g("api_hosts")[a]||this.g("api_host")};l.prototype.toString=function(){var a=this.g("name");"mixpanel"!==a&&(a="mixpanel."+a);return a};l.prototype.bd=function(a){return e.Od(L)||this.ra.Ad||e.Ac(this.ba,a)};l.prototype.Re=function(){"localStorage"===
191
- this.g("opt_out_tracking_persistence_type")&&e.localStorage.Xa()&&(!this.Gb()&&this.Gb({persistence_type:"cookie"})&&this.de({enable_persistence:!1}),!this.Wa()&&this.Wa({persistence_type:"cookie"})&&this.Gc({clear_persistence:!1}),this.rd({persistence_type:"cookie",enable_persistence:!1}));this.Wa()?this.ob({clear_persistence:!0}):this.Gb()||!this.g("opt_out_tracking_by_default")&&!e.cookie.get("mp_optout")||(e.cookie.remove("mp_optout"),this.Gc({clear_persistence:this.g("opt_out_persistence_by_default")}))};
192
- l.prototype.ob=function(a){if(a&&a.clear_persistence)a=!0;else if(a&&a.enable_persistence)a=!1;else return;this.g("disable_persistence")||this.persistence.disabled===a||this.persistence.ue(a);a?(this.Pc(),this.Qc()):this.Ke&&this.Oc()};l.prototype.Pa=function(a,b){b=e.extend({track:e.bind(this.track,this),persistence_type:this.g("opt_out_tracking_persistence_type"),cookie_prefix:this.g("opt_out_tracking_cookie_prefix"),cookie_expiration:this.g("cookie_expiration"),cross_site_cookie:this.g("cross_site_cookie"),
193
- cross_subdomain_cookie:this.g("cross_subdomain_cookie"),cookie_domain:this.g("cookie_domain"),secure_cookie:this.g("secure_cookie"),ignore_dnt:this.g("ignore_dnt")},b);e.localStorage.Xa()||(b.persistence_type="cookie");return a(this.g("token"),{track:b.track,kh:b.track_event_name,mh:b.track_properties,he:b.persistence_type,ge:b.cookie_prefix,td:b.cookie_domain,ud:b.cookie_expiration,rf:b.cross_site_cookie,vd:b.cross_subdomain_cookie,Gg:b.secure_cookie,Ld:b.ignore_dnt})};l.prototype.de=function(a){a=
194
- e.extend({enable_persistence:!0},a);this.Pa(qc,a);this.ob(a)};l.prototype.Gc=function(a){a=e.extend({clear_persistence:!0,delete_user:!0},a);a.delete_user&&this.people&&this.people.dc()&&(this.people.yd(),this.people.qd());this.Pa(rc,a);this.ob(a)};l.prototype.Gb=function(a){return this.Pa(sc,a)};l.prototype.Wa=function(a){return this.Pa(Gb,a)};l.prototype.rd=function(a){a=e.extend({enable_persistence:!0},a);this.Pa(uc,a);this.ob(a)};l.prototype.B=function(a,b){v.error.apply(v.error,arguments);try{b||
195
- a instanceof Error||(a=Error(a)),this.g("error_reporter")(a,b)}catch(c){v.error(c)}};l.prototype.bf=function(a,b){this.I[a]||(this.I[a]=[]);this.I[a].push(b)};l.prototype.Ag=function(a,b){this.I[a]&&(b=this.I[a].indexOf(b),-1!==b?this.I[a].splice(b,1):v.log("remove_hook failed. Matching hook was not found"))};l.prototype.init=l.prototype.D;l.prototype.reset=l.prototype.reset;l.prototype.enable=l.prototype.enable;l.prototype.disable=l.prototype.disable;l.prototype.time_event=l.prototype.hh;l.prototype.track=
196
- l.prototype.track;l.prototype.track_links=l.prototype.ph;l.prototype.track_forms=l.prototype.oh;l.prototype.track_pageview=l.prototype.Tc;l.prototype.register=l.prototype.register;l.prototype.register_once=l.prototype.V;l.prototype.unregister=l.prototype.unregister;l.prototype.identify=l.prototype.zc;l.prototype.alias=l.prototype.cf;l.prototype.name_tag=l.prototype.ng;l.prototype.set_config=l.prototype.Ea;l.prototype.get_config=l.prototype.g;l.prototype.get_api_host=l.prototype.ja;l.prototype.get_property=
197
- l.prototype.H;l.prototype.get_distinct_id=l.prototype.ka;l.prototype.toString=l.prototype.toString;l.prototype.opt_out_tracking=l.prototype.Gc;l.prototype.opt_in_tracking=l.prototype.de;l.prototype.has_opted_out_tracking=l.prototype.Wa;l.prototype.has_opted_in_tracking=l.prototype.Gb;l.prototype.clear_opt_in_out_tracking=l.prototype.rd;l.prototype.get_group=l.prototype.Nf;l.prototype.set_group=l.prototype.Qg;l.prototype.add_group=l.prototype.af;l.prototype.remove_group=l.prototype.zg;l.prototype.add_hook=
198
- l.prototype.bf;l.prototype.remove_hook=l.prototype.Ag;l.prototype.track_with_groups=l.prototype.qh;l.prototype.start_batch_senders=l.prototype.Oc;l.prototype.stop_batch_senders=l.prototype.Pc;l.prototype.start_session_recording=l.prototype.Wg;l.prototype.stop_session_recording=l.prototype.Qc;l.prototype.pause_session_recording=l.prototype.tg;l.prototype.resume_session_recording=l.prototype.Dg;l.prototype.get_session_recording_properties=l.prototype.Id;l.prototype.get_session_replay_url=l.prototype.Pf;
199
- l.prototype.get_tab_id=l.prototype.Jd;l.prototype.DEFAULT_API_ROUTES=Wb;l.prototype.__get_recorder=l.prototype.Ie;l.prototype.__get_recording_init_promise=l.prototype.Je;B.prototype.properties=B.prototype.eb;B.prototype.update_search_keyword=B.prototype.Fe;B.prototype.update_referrer_info=B.prototype.Uc;B.prototype.get_cross_subdomain=B.prototype.Mf;B.prototype.clear=B.prototype.clear;var V={};(function(a){Ja=a;xa=1;G=p.mixpanel;e.m(G)?v.i('"mixpanel" object not initialized. Ensure you are using the latest version of the Mixpanel JS Library along with the snippet we provide.'):
200
- G.__loaded||G.config&&G.persistence?v.i("The Mixpanel library has already been downloaded at least once. Ensure that the Mixpanel code snippet only appears once on the page (and is not double-loaded by a tag manager) in order to avoid errors."):1.1>(G.__SV||0)?v.i("Version mismatch; please ensure you're using the latest version of the Mixpanel code snippet."):(e.h(G._i,function(b){b&&e.isArray(b)&&(V[b[b.length-1]]=wa.apply(this,b))}),Yb(),G.init(),e.h(V,function(b){b.qb()}),Xb())})(function(a,b){var c=
201
- document.createElement("script");c.type="text/javascript";c.async=!0;c.onload=b;c.src=a;document.head.appendChild(c)})})()
106
+ this)};u.prototype.Ff=function(a){return this.Cb().replace(/\/$/,"")+"/"+a+"/first-time-events"};u.prototype.wg=function(a,b,c){var d=this.vc("distinct_id"),f=lb(),g=new URLSearchParams;g.set("mp_lib","web");g.set("$lib_version","2.80.0");g=this.Ff(a)+"?"+g.toString();b={distinct_id:d,project_id:b,first_time_event_hash:c};D.log("Recording first-time event for flag: "+a);this.fetch.call(p,g,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Basic "+btoa(this.A("token")+":"),traceparent:f},
107
+ body:JSON.stringify(b)}).catch(function(k){D.error("Failed to record first-time event for flag "+a+": "+k)})};u.prototype.Fd=function(a,b){if(!this.bb)return new Promise(function(d){D.i("Feature Flags not initialized");d(da(b))});var c=this.Aa.Db();return this.bb.then(e.bind(function(){if(c===ba.Vb)return this.ub()&&!this.rb()?this.Va(a,b):this.F?this.F.then(e.bind(function(){return this.Va(a,b)},this)).catch(function(f){D.error(f);return da(b)}):da(b);var d=e.bind(function(){return this.Va(a,b)},
108
+ this);return this.F?this.F.then(d).catch(d):da(b)},this))};u.prototype.rb=function(){return this.Ra&&this.Sa?Date.now()-this.Ra>=this.Sa:!1};u.prototype.Va=function(a,b){if(this.rb())return D.log('Loaded persisted variants are past TTL so returning fallback for "'+a+'"'),da(b);if(!this.ub())return D.log("Flags not loaded yet"),da(b);var c=this.flags.get(a);if(!c)return D.log('No flag found: "'+a+'"'),da(b);this.lh(a,c);return c};u.prototype.Af=function(){if(!this.bb)return D.i("Feature Flags not initialized"),
109
+ Promise.resolve(new Map);var a=this.Aa.Db();return this.bb.then(e.bind(function(){if(a===ba.Vb)return this.ub()&&!this.rb()?this.Bb():this.F?this.F.then(e.bind(function(){return this.Bb()},this)).catch(function(c){D.error(c);return new Map}):new Map;var b=e.bind(this.Bb,this);return this.F?this.F.then(b).catch(b):new Map},this))};u.prototype.Bb=function(){return this.rb()?(D.log("Loaded persisted variants are past TTL so returning empty Map"),new Map):this.flags||new Map};u.prototype.xc=function(a,
110
+ b){return this.Fd(a,{value:b}).then(function(c){return c.value}).catch(function(c){D.error(c);return b})};u.prototype.Ef=function(a,b){D.i("mixpanel.flags.get_feature_data() is deprecated and will be removed in a future release. Use mixpanel.flags.get_variant_value() instead.");return this.xc(a,b)};u.prototype.Gd=function(a,b){return this.Va(a,{value:b}).value};u.prototype.isEnabled=function(a,b){return this.xc(a).then(function(){return this.Pd(a,b)}.bind(this)).catch(function(c){D.error(c);return b})};
111
+ u.prototype.Pd=function(a,b){b=b||!1;var c=this.Gd(a,b);!0!==c&&!1!==c&&(D.error('Feature flag "'+a+'" value: '+c+" is not a boolean; returning fallback value: "+b),c=b);return c};u.prototype.lh=function(a,b){this.Ja.has(a)||(this.Ja.add(a),a={"Experiment name":a,"Variant name":b.key,$experiment_type:"feature_flag","Variant fetch start time":Y(this.ac)?(new Date(this.ac)).toISOString():null,"Variant fetch complete time":Y(this.$b)?(new Date(this.$b)).toISOString():null,"Variant fetch latency (ms)":this.Oe,
112
+ "Variant fetch traceparent":this.Ze},Y(b.experiment_id)&&(a.$experiment_id=b.experiment_id),Y(b.is_experiment_active)&&(a.$is_experiment_active=b.is_experiment_active),Y(b.is_qa_tester)&&(a.$is_qa_tester=b.is_qa_tester),Y(b.variant_source)&&(a.$variant_source=b.variant_source),Y(b.persisted_at_in_ms)&&(a.$persisted_at_in_ms=b.persisted_at_in_ms),Y(b.ttl_in_ms)&&(a.$ttl_in_ms=b.ttl_in_ms),this.track("$experiment_started",a))};u.prototype.xh=function(){return this.F?this.F:Promise.resolve()};u.prototype.lg=
113
+ function(){return!!this.fetch&&"undefined"!==typeof Promise&&"undefined"!==typeof Map&&"undefined"!==typeof Set};Na(u);u.prototype.are_flags_ready=u.prototype.ub;u.prototype.get_variant=u.prototype.Fd;u.prototype.get_variant_sync=u.prototype.Va;u.prototype.get_all_variants=u.prototype.Af;u.prototype.get_all_variants_sync=u.prototype.Bb;u.prototype.get_variant_value=u.prototype.xc;u.prototype.get_variant_value_sync=u.prototype.Gd;u.prototype.is_enabled=u.prototype.isEnabled;u.prototype.is_enabled_sync=
114
+ u.prototype.Pd;u.prototype.load_flags=u.prototype.ig;u.prototype.update_context=u.prototype.uh;u.prototype.when_ready=u.prototype.xh;u.prototype.get_feature_data=u.prototype.Ef;u.prototype.getTargeting=u.prototype.Ed;var Dc={version:1,ye:["mixpanelRecordingEvents","mixpanelRecordingRegistry"]},Ec=ha("recorder");K.prototype.Sg=function(){if(this.A("disable_persistence"))return v.log("Load recorder check skipped due to disable_persistence config"),C.resolve(!1);var a=new U("mixpanelBrowserDb","mixpanelRecordingRegistry",
115
+ Dc),b=this.Jf();return a.D().then(function(){return a.getAll()}).then(function(c){for(var d=0;d<c.length;d++){var f=c[d],g=Date.now();if(!f||g>f.maxExpires||g>f.idleExpires||c[d].tabId===b)return!0}return!1}).catch(e.bind(function(c){this.s("Error checking recording registry",c);return!1},this))};K.prototype.mc=function(a,b){if(!p.MutationObserver)return v.i("Browser does not support MutationObserver; skipping session recording"),C.resolve();var c=e.bind(function(f){return new C(e.bind(function(g){var k=
116
+ fa(e.bind(function(){this.C=this.C||new p.__mp_recorder(this.Nb);this.C.resumeRecording(f);g()},this));e.m(p.__mp_recorder)?this.$(this.Kc||this.Kb+"mixpanel-recorder-B61POiHc.min.js",k):k()},this))},this),d=bc(this.A("record_allowed_iframe_origins"),Ec);if(0<d.length&&(this.Xe(d),p.parent!==p))return this.We(d,c),this.Ve(d),C.resolve();b=e.m(b)?this.A("record_sessions_percent"):b;b=0<b&&100*Math.random()<=b;return a||b?c(!0):this.Sg().then(e.bind(function(f){return f?c(!1):C.resolve()},this))};K.prototype.gg=
117
+ function(){if(!this.C||!e.la(this.C.isRecording))return!1;try{return this.C.isRecording()}catch(a){return this.s("Error checking if recording is active",a),!1}};K.prototype.Ug=function(a,b){var c=this.gg(),d=this.A("recording_event_triggers");if(!c&&d&&(c=d[a])&&"number"===typeof c.percentage){var f=c.percentage,g=c.property_filters;g&&!e.P(g)?ib(this.$,this.oa||this.Kb+"mixpanel-targeting-kdl-eE-1.min.js").then(function(k){try{k.eventMatchesCriteria(a,b,{event_name:a,property_filters:g}).matches&&
118
+ this.mc(!1,f)}catch(h){v.i("Could not parse recording event trigger properties logic:",h)}}.bind(this)).catch(function(k){v.i("Failed to load targeting library:",k)}):this.mc(!1,f)}};K.prototype.$g=function(){return this.C?this.C.stopRecording():C.resolve()};K.prototype.sg=function(){return this.C?this.C.pauseRecording():C.resolve()};K.prototype.Cg=function(){return this.C?this.C.resumeRecording():C.resolve()};K.prototype.hg=function(){return this.Eb()&&this.A("record_heatmap_data")};K.prototype.Hf=
119
+ function(){var a={},b=this.Eb();b&&(a.$mp_replay_id=b);return a};K.prototype.If=function(){var a=null,b=this.Eb();b&&(a="https://mixpanel.com/projects/replay-redirect?"+e.Ub({replay_id:b,distinct_id:this.Dd(),token:this.A("token")}));return a};K.prototype.Eb=function(){if(this.sb)return this.sb;var a=null;this.C&&(a=this.C.replayId);return a||null};K.prototype.We=function(a,b){if(!this.nb){var c=this;this.nb=function(d){-1!==a.indexOf(d.origin)&&(d=d.data)&&"mp_iframe_handshake_response"===d.type&&
120
+ d.token===c.A("token")&&d.replayId&&(c.sb=d.replayId,d.distinctId&&c.Nb.identify(d.distinctId),c.fd=!1,p.removeEventListener("message",c.nb),c.nb=null,b(!0))};p.addEventListener("message",this.nb)}};K.prototype.ld=function(a){var b={type:"mp_iframe_handshake_request"};b.token=this.A("token");for(var c=0;c<a.length;c++)try{p.parent.postMessage(b,a[c])}catch(d){}};K.prototype.Ve=function(a){function b(){setTimeout(function(){!c.fd||c.sb||10<=++d||(c.ld(a),f*=2,b())},f)}var c=this,d=0,f=50;this.fd=!0;
121
+ this.ld(a);b()};K.prototype.Xe=function(a){if(!this.ed){var b=this;this.ed=function(c){if(-1!==a.indexOf(c.origin)){var d=c.data;if(d&&"mp_iframe_handshake_request"===d.type&&d.token===b.A("token")&&(d=b.Eb())){var f={type:"mp_iframe_handshake_response"};f.token=b.A("token");f.replayId=d;f.distinctId=b.Dd();c.source.postMessage(f,c.origin)}}};p.addEventListener("message",this.ed)}};Na(K);T.prototype.yb=function(){};T.prototype.rc=function(){};T.prototype.ic=function(){};T.prototype.D=function(a){this.u=
122
+ a;return this};T.prototype.track=function(a,b,c,d){var f=this,g=e.tf(a);if(0===g.length)v.error("The DOM query ("+a+") returned 0 elements");else return e.h(g,function(k){e.me(k,this.fe,function(h){var n={},r=f.yb(c,this),q=f.u.g("track_links_timeout");f.rc(h,this,n);window.setTimeout(f.Ae(d,r,n,!0),q);f.u.track(b,r,f.Ae(d,r,n))})},this),!0};T.prototype.Ae=function(a,b,c,d){d=d||!1;var f=this;return function(){c.lf||(c.lf=!0,a&&!1===a(d,b)||f.ic(c))}};T.prototype.yb=function(a,b){return"function"===
123
+ typeof a?a(b):e.extend({},a)};e.Nd(la,T);la.prototype.yb=function(a,b){var c=la.fh.yb.apply(this,arguments);b.href&&(c.url=b.href);return c};la.prototype.rc=function(a,b,c){c.be=2===a.which||a.metaKey||a.ctrlKey||"_blank"===b.target;c.href=b.href;c.be||a.preventDefault()};la.prototype.ic=function(a){a.be||setTimeout(function(){window.location=a.href},0)};e.Nd(ya,T);ya.prototype.rc=function(a,b,c){c.element=b;a.preventDefault()};ya.prototype.ic=function(a){setTimeout(function(){a.element.submit()},
124
+ 0)};var Fc=ha("lock");gb.prototype.Vc=function(a,b){return new this.ke(e.bind(function(c,d){function f(){function M(){w.removeItem(O);w.getItem(x)===r&&w.removeItem(x);w.getItem(J)===r&&w.removeItem(J)}w.setItem(O,"1");a().then(function(ca){M();c(ca)}).catch(function(ca){M();d(ca)})}function g(){w.setItem(J,r);h(k,function(){w.getItem(J)===r?f():n(function(){w.getItem(x)!==r?g():h(function(){return!w.getItem(O)},f)})})}function k(){var M=w.getItem(x);if(M&&M!==r)return!1;w.setItem(x,r);if(w.getItem(x)===
125
+ r)return!0;za(w,!0)||d(Error("localStorage support dropped while acquiring lock"));return!1}function h(M,ca){M()?ca():n(function(){h(M,ca)})}function n(M){(new Date).getTime()-q>y?(Fc.error("Timeout waiting for mutex on "+m+"; clearing lock. ["+r+"]"),w.removeItem(O),w.removeItem(x),g()):setTimeout(function(){try{M()}catch(ca){d(ca)}},t*(Math.random()+.1))}var r=b||(new Date).getTime()+"|"+Math.random(),q=(new Date).getTime(),m=this.Ga,t=this.ie,y=this.Sc,w=this.storage,J=m+":X",x=m+":Y",O=m+":Z";
126
+ try{if(za(w,!0))g();else throw Error("localStorage support check failed");}catch(M){d(M)}},this))};qa.prototype.D=function(){return this.storage?C.resolve():C.reject(Error("localStorage is not available"))};qa.prototype.setItem=function(a,b){return new C(e.bind(function(c,d){try{this.storage.setItem(a,oa(b))}catch(f){d(f)}c()},this))};qa.prototype.getItem=function(a){return new C(e.bind(function(b,c){try{var d=Ga(this.storage.getItem(a))}catch(f){c(f)}b(d)},this))};qa.prototype.removeItem=function(a){return new C(e.bind(function(b,
127
+ c){try{this.storage.removeItem(a)}catch(d){c(d)}b()},this))};var hb=ha("batch");Q.prototype.ha=function(){return this.Bc||!this.G?C.resolve():this.aa.D().then(e.bind(function(){this.Bc=!0},this)).catch(e.bind(function(a){this.s("Error initializing queue persistence. Disabling persistence",a);this.Bc=!0;this.G=!1},this))};Q.prototype.enqueue=function(a,b){a={id:La(),flushAfter:(new Date).getTime()+2*b,payload:a};if(this.G)return this.vf(a);this.S.push(a);return C.resolve(!0)};Q.prototype.ad=function(a){var b=
128
+ e.bind(function(){return this.ha().then(e.bind(function(){return this.hb()},this)).then(e.bind(function(c){return this.Mc(c.concat(a))},this)).then(e.bind(function(c){c&&(this.S=this.S.concat(a));return c},this)).catch(e.bind(function(c){this.s("Error enqueueing items",c,a);return!1},this))},this);return this.lock.Vc(b,this.Pb).catch(e.bind(function(c){this.s("Error acquiring storage lock",c);return!1},this))};Q.prototype.xf=function(a){var b=this.S.slice(0,a);return this.G&&b.length<a?this.ha().then(e.bind(function(){return this.hb()},
129
+ this)).then(e.bind(function(c){if(c.length){var d={};e.h(b,function(k){d[k.id]=!0});for(var f=0;f<c.length;f++){var g=c[f];if((new Date).getTime()>g.flushAfter&&!d[g.id]&&(g.rg=!0,b.push(g),b.length>=a))break}}return b},this)):C.resolve(b)};Q.prototype.xg=function(a){var b={};e.h(a,function(d){b[d]=!0});this.S=fb(this.S,b);if(this.G){var c=e.bind(function(){return this.ha().then(e.bind(function(){return this.hb()},this)).then(e.bind(function(d){d=fb(d,b);return this.Mc(d)},this)).then(e.bind(function(){return this.hb()},
130
+ this)).then(e.bind(function(d){for(var f=0;f<d.length;f++){var g=d[f];if(g.id&&b[g.id])throw Error("Item not removed from storage");}return!0},this)).catch(e.bind(function(d){this.s("Error removing items",d,a);return!1},this))},this);return this.lock.Vc(c,this.Pb).catch(e.bind(function(d){this.s("Error acquiring storage lock",d);return za(this.lock.storage,!0)?!1:c().then(e.bind(function(f){return f?f:this.aa.removeItem(this.Ga).then(function(){return f})},this)).catch(e.bind(function(f){this.s("Error clearing queue",
131
+ f);return!1},this))},this))}return C.resolve(!0)};Q.prototype.vh=function(a){this.S=eb(this.S,a);return this.G?this.lock.Vc(e.bind(function(){return this.ha().then(e.bind(function(){return this.hb()},this)).then(e.bind(function(b){b=eb(b,a);return this.Mc(b)},this)).catch(e.bind(function(b){this.s("Error updating items",a,b);return!1},this))},this),this.Pb).catch(e.bind(function(b){this.s("Error acquiring storage lock",b);return!1},this)):C.resolve(!0)};Q.prototype.hb=function(){return this.ha().then(e.bind(function(){return this.aa.getItem(this.Ga)},
132
+ this)).then(e.bind(function(a){a&&!e.isArray(a)&&(this.s("Invalid storage entry:",a),a=null);return a||[]},this)).catch(e.bind(function(a){this.s("Error retrieving queue",a);return[]},this))};Q.prototype.Mc=function(a){return this.ha().then(e.bind(function(){return this.aa.setItem(this.Ga,a)},this)).then(function(){return!0}).catch(e.bind(function(b){this.s("Error saving queue",b);return!1},this))};Q.prototype.clear=function(){this.S=[];return this.G?this.ha().then(e.bind(function(){return this.aa.removeItem(this.Ga)},
133
+ this)):C.resolve()};var va=ha("batch");N.prototype.enqueue=function(a){return this.fb.enqueue(a,this.Ab)};N.prototype.start=function(){this.stopped=!1;this.nc=0;return this.flush()};N.prototype.stop=function(){this.stopped=!0;this.Rc&&(clearTimeout(this.Rc),this.Rc=null)};N.prototype.clear=function(){return this.fb.clear()};N.prototype.oe=function(){this.fa=this.Z.batch_size};N.prototype.Da=function(){this.qe(this.Z.batch_flush_interval_ms)};N.prototype.qe=function(a){this.Ab=a;this.stopped||(this.Rc=
134
+ setTimeout(e.bind(function(){this.stopped||this.flush()},this),this.Ab))};N.prototype.Jg=function(a,b){return new C(e.bind(function(c){this.Hg(a,b,c)},this))};N.prototype.flush=function(a){if(this.Lc)return va.log("Flush: Request already in progress"),C.resolve();this.Lc=!0;a=a||{};var b=this.Z.batch_request_timeout_ms,c=(new Date).getTime(),d=this.fa;return this.fb.xf(d).then(e.bind(function(f){var g=f.length===d,k=[],h={};e.h(f,function(m){var t=m.payload;this.vb&&!m.rg&&(t=this.vb(t));if(t){t.event&&
135
+ t.properties&&(t.properties=e.extend({},t.properties,{mp_sent_by_lib_version:"2.80.0"}));var y=!0,w=m.id;w?5<(this.ma[w]||0)&&(this.s("[dupe] item ID sent too many times, not sending",{item:m,fa:f.length,ih:this.ma[w]}),y=!1):this.s("[dupe] found item with no ID",{item:m});y&&k.push(t)}h[m.id]=t},this);if(1>k.length)return this.Lc=!1,this.Da(),C.resolve();var n=e.bind(function(){return this.fb.xg(e.map(f,function(m){return m.id})).then(e.bind(function(m){e.h(f,e.bind(function(t){var y=t.id;y?(this.ma[y]=
136
+ this.ma[y]||0,this.ma[y]++,5<this.ma[y]&&this.s("[dupe] item ID sent too many times",{item:t,fa:f.length,ih:this.ma[y]})):this.s("[dupe] found item with no ID while removing",{item:t})},this));if(m)return this.nc=0,this.Cd&&!g?(this.Da(),C.resolve()):this.flush();5<++this.nc?(this.s("Too many queue failures; disabling batching system."),this.Xg()):this.Da();return C.resolve()},this))},this),r=e.bind(function(m){this.Lc=!1;try{if(a.Ce)return this.fb.vh(h);if(e.l(m)&&"timeout"===m.error&&(new Date).getTime()-
137
+ c>=b)return this.s("Network timeout; retrying"),this.flush();var t;if(t=e.l(m)){var y;if(!(y=500<=m.Hb||429===m.Hb)){var w;if(w=0>=m.Hb){var J=p.navigator.onLine;w=!(e.m(J)||J)}y=w}t=y||"timeout"===m.error}if(t){var x=2*this.Ab;m.pe&&(x=1E3*parseInt(m.pe,10)||x);x=Math.min(6E5,x);this.s("Error; retry in "+x+" ms");this.qe(x);return C.resolve()}if(e.l(m)&&413===m.Hb){if(1<f.length)return this.fa=Math.min(this.fa,Math.max(1,Math.floor(d/2)),f.length-1),this.s("413 response; reducing batch size to "+
138
+ this.fa),this.Da(),C.resolve();this.s("Single-event request too large; dropping",f);this.oe()}return n()}catch(O){this.s("Error handling API response",O),this.Da()}},this),q={method:"POST",Ge:!0,Rf:!0,ze:b};a.Ce&&(q.Sb="sendBeacon");va.log("MIXPANEL REQUEST:",k);return this.Jg(k,q).then(r)},this)).catch(e.bind(function(f){this.s("Error flushing request queue",f);this.Da()},this))};N.prototype.s=function(a,b){va.error.apply(va.error,arguments);if(this.va)try{b instanceof Error||(b=Error(a)),this.va(a,
139
+ b)}catch(c){va.error(c)}};var Vb={te:function(a,b){var c={},d={};e.l(a)?e.h(a,function(f,g){this.W(g)||(d[g]=f)},this):d[a]=b;c.$set=d;return c},De:function(a){var b={},c=[];e.isArray(a)||(a=[a]);e.h(a,function(d){this.W(d)||c.push(d)},this);b.$unset=c;return b},ve:function(a,b){var c={},d={};e.l(a)?e.h(a,function(f,g){this.W(g)||(d[g]=f)},this):d[a]=b;c.$set_once=d;return c},Be:function(a,b){var c={},d={};e.l(a)?e.h(a,function(f,g){this.W(g)||(d[g]=e.isArray(f)?f:[f])},this):d[a]=e.isArray(b)?b:
140
+ [b];c.$union=d;return c},ff:function(a,b){var c={},d={};e.l(a)?e.h(a,function(f,g){this.W(g)||(d[g]=f)},this):d[a]=b;c.$append=d;return c},ne:function(a,b){var c={},d={};e.l(a)?e.h(a,function(f,g){this.W(g)||(d[g]=f)},this):d[a]=b;c.$remove=d;return c},Ah:function(){return{$delete:""}}};e.extend(F.prototype,Vb);F.prototype.Qa=function(a,b,c){this.j=a;this.cc=b;this.bc=c};F.prototype.set=na(function(a,b,c){var d=this.te(a,b);e.l(a)&&(c=b);return this.v(d,c)});F.prototype.Fa=na(function(a,b,c){var d=
141
+ this.ve(a,b);e.l(a)&&(c=b);return this.v(d,c)});F.prototype.Tb=na(function(a,b){a=this.De(a);return this.v(a,b)});F.prototype.kb=na(function(a,b,c){e.l(a)&&(c=b);a=this.Be(a,b);return this.v(a,c)});F.prototype["delete"]=na(function(a){return this.v({$delete:""},a)});F.prototype.remove=na(function(a,b,c){a=this.ne(a,b);return this.v(a,c)});F.prototype.v=function(a,b){a.$group_key=this.cc;a.$group_id=this.bc;a.$token=this.N("token");a=e.pc(a);return this.j.hc({type:"groups",data:a,endpoint:this.j.ja("groups")+
142
+ "/"+this.N("api_routes").groups,kc:this.j.L.groups},b)};F.prototype.W=function(a){return"$group_key"===a||"$group_id"===a};F.prototype.N=function(a){return this.j.g(a)};F.prototype.toString=function(){return this.j.toString()+".group."+this.cc+"."+this.bc};F.prototype.remove=F.prototype.remove;F.prototype.set=F.prototype.set;F.prototype.set_once=F.prototype.Fa;F.prototype.union=F.prototype.kb;F.prototype.unset=F.prototype.Tb;F.prototype.toString=F.prototype.toString;e.extend(A.prototype,Vb);A.prototype.Qa=
143
+ function(a){this.j=a};A.prototype.set=Z(function(a,b,c){var d=this.te(a,b);e.l(a)&&(c=b);this.N("save_referrer")&&this.j.persistence.Uc(document.referrer);d.$set=e.extend({},e.info.ug(),d.$set);return this.v(d,c)});A.prototype.Fa=Z(function(a,b,c){var d=this.ve(a,b);e.l(a)&&(c=b);return this.v(d,c)});A.prototype.Tb=Z(function(a,b){a=this.De(a);return this.v(a,b)});A.prototype.Md=Z(function(a,b,c){var d={},f={};e.l(a)?(e.h(a,function(g,k){this.W(k)||(isNaN(parseFloat(g))?v.error("Invalid increment value passed to mixpanel.people.increment - must be a number"):
144
+ f[k]=g)},this),c=b):(e.m(b)&&(b=1),f[a]=b);d.$add=f;return this.v(d,c)});A.prototype.append=Z(function(a,b,c){e.l(a)&&(c=b);a=this.ff(a,b);return this.v(a,c)});A.prototype.remove=Z(function(a,b,c){e.l(a)&&(c=b);a=this.ne(a,b);return this.v(a,c)});A.prototype.kb=Z(function(a,b,c){e.l(a)&&(c=b);a=this.Be(a,b);return this.v(a,c)});A.prototype.nh=Z(function(){v.error("mixpanel.people.track_charge() is deprecated and no longer has any effect.")});A.prototype.qd=function(a){return this.set("$transactions",
145
+ [],a)};A.prototype.yd=function(){if(this.dc()){var a={$delete:this.j.ka()};return this.v(a)}v.error("mixpanel.people.delete_user() requires you to call identify() first")};A.prototype.toString=function(){return this.j.toString()+".people"};A.prototype.v=function(a,b){a.$token=this.N("token");a.$distinct_id=this.j.ka();var c=this.j.H("$device_id"),d=this.j.H("$user_id"),f=this.j.H("$had_persisted_distinct_id");c&&(a.$device_id=c);d&&(a.$user_id=d);f&&(a.$had_persisted_distinct_id=f);c=e.pc(a);return this.dc()?
146
+ this.j.hc({type:"people",data:c,endpoint:this.j.ja("people")+"/"+this.N("api_routes").engage,kc:this.j.L.Hc},b):(this.Ne(a),e.m(b)||(this.N("verbose")?b({status:-1,error:null}):b(-1)),e.truncate(c,255))};A.prototype.N=function(a){return this.j.g(a)};A.prototype.dc=function(){return!0===this.j.ra.Kd};A.prototype.Ne=function(a){"$set"in a?this.j.persistence.J("$set",a):"$set_once"in a?this.j.persistence.J("$set_once",a):"$unset"in a?this.j.persistence.J("$unset",a):"$add"in a?this.j.persistence.J("$add",
147
+ a):"$append"in a?this.j.persistence.J("$append",a):"$remove"in a?this.j.persistence.J("$remove",a):"$union"in a?this.j.persistence.J("$union",a):v.error("Invalid call to _enqueue():",a)};A.prototype.Oa=function(a,b,c,d){var f=this,g=e.extend({},this.j.persistence.Za(a)),k=g;e.m(g)||!e.l(g)||e.P(g)||(f.j.persistence.O(a,g),f.j.persistence.save(),d&&(k=d(g)),b.call(f,k,function(h,n){0===h&&f.j.persistence.J(a,g);e.m(c)||c(h,n)}))};A.prototype.Qe=function(a,b,c,d,f,g,k){var h=this;this.Oa("$set",this.set,
148
+ a);this.Oa("$set_once",this.Fa,d);this.Oa("$unset",this.Tb,g,function(q){return e.keys(q)});this.Oa("$add",this.Md,b);this.Oa("$union",this.kb,f);a=this.j.persistence.Za("$append");if(!e.m(a)&&e.isArray(a)&&a.length)for(b=function(q,m){0===q&&h.j.persistence.J("$append",n);e.m(c)||c(q,m)},d=a.length-1;0<=d;d--){a=this.j.persistence.Za("$append");var n=a.pop();h.j.persistence.save();e.P(n)||h.append(n,b)}a=this.j.persistence.Za("$remove");if(!e.m(a)&&e.isArray(a)&&a.length)for(b=function(q,m){0===
149
+ q&&h.j.persistence.J("$remove",r);e.m(k)||k(q,m)},d=a.length-1;0<=d;d--){a=this.j.persistence.Za("$remove");var r=a.pop();h.j.persistence.save();e.P(r)||h.remove(r,b)}};A.prototype.W=function(a){return"$distinct_id"===a||"$token"===a||"$device_id"===a||"$user_id"===a||"$had_persisted_distinct_id"===a};A.prototype.set=A.prototype.set;A.prototype.set_once=A.prototype.Fa;A.prototype.unset=A.prototype.Tb;A.prototype.increment=A.prototype.Md;A.prototype.append=A.prototype.append;A.prototype.remove=A.prototype.remove;
150
+ A.prototype.union=A.prototype.kb;A.prototype.track_charge=A.prototype.nh;A.prototype.clear_charges=A.prototype.qd;A.prototype.delete_user=A.prototype.yd;A.prototype.toString=A.prototype.toString;var Gc="__mps __mpso __mpus __mpa __mpap __mpr __mpu $people_distinct_id __alias __timers".split(" ");B.prototype.eb=function(){var a={};this.load();e.h(this.props,function(b,c){e.Ac(Gc,c)||(a[c]=b)});return a};B.prototype.load=function(){if(!this.disabled){var a=this.storage.parse(this.name);a&&(this.props=
151
+ e.extend({},a))}};B.prototype.upgrade=function(){if(this.storage===e.localStorage){var a=e.cookie.parse(this.name);e.cookie.remove(this.name);e.cookie.remove(this.name,!0);a&&this.V(a)}else this.storage===e.cookie&&(a=e.localStorage.parse(this.name),e.localStorage.remove(this.name),a&&this.V(a))};B.prototype.save=function(){this.disabled||this.storage.set(this.name,oa(this.props),this.sc,this.oc,this.re,this.wd,this.xb)};B.prototype.Lb=function(a){this.load();return this.props[a]};B.prototype.remove=
152
+ function(){this.storage.remove(this.name,!1,this.xb);this.storage.remove(this.name,!0,this.xb)};B.prototype.clear=function(){this.remove();this.props={}};B.prototype.V=function(a,b,c){return e.l(a)?("undefined"===typeof b&&(b="None"),this.sc="undefined"===typeof c?this.xd:c,this.load(),e.h(a,function(d,f){this.props.hasOwnProperty(f)&&this.props[f]!==b||(this.props[f]=d)},this),this.save(),!0):!1};B.prototype.register=function(a,b){return e.l(a)?(this.sc="undefined"===typeof b?this.xd:b,this.load(),
153
+ e.extend(this.props,a),this.save(),!0):!1};B.prototype.unregister=function(a){this.load();a in this.props&&(delete this.props[a],this.save())};B.prototype.Fe=function(a){this.register(e.info.Fg(a))};B.prototype.Uc=function(a){this.V({$initial_referrer:a||"$direct",$initial_referring_domain:e.info.le(a)||"$direct"},"")};B.prototype.Of=function(){return e.Ha({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})};B.prototype.Ee=function(a){this.xd=
154
+ this.sc=a.cookie_expiration;this.ue(a.disable_persistence);this.Mg(a.cookie_domain);this.Ng(a.cross_site_cookie);this.Og(a.cross_subdomain_cookie);this.Rg(a.secure_cookie)};B.prototype.ue=function(a){(this.disabled=a)?this.remove():this.save()};B.prototype.Mg=function(a){a!==this.xb&&(this.remove(),this.xb=a,this.save())};B.prototype.Ng=function(a){a!==this.wd&&(this.wd=a,this.remove(),this.save())};B.prototype.Og=function(a){a!==this.oc&&(this.oc=a,this.remove(),this.save())};B.prototype.Mf=function(){return this.oc};
155
+ B.prototype.Rg=function(a){a!==this.re&&(this.re=a?!0:!1,this.remove(),this.save())};B.prototype.J=function(a,b){var c=this.pb(a);a=b[a];var d=this.ca("$set"),f=this.ca("$set_once"),g=this.ca("$unset"),k=this.ca("$add"),h=this.ca("$union"),n=this.ca("$remove",[]),r=this.ca("$append",[]);"__mps"===c?(e.extend(d,a),this.O("$add",a),this.O("$union",a),this.O("$unset",a)):"__mpso"===c?(e.h(a,function(q,m){m in f||(f[m]=q)}),this.O("$unset",a)):"__mpus"===c?e.h(a,function(q){e.h([d,f,k,h],function(m){q in
156
+ m&&delete m[q]});e.h(r,function(m){q in m&&delete m[q]});g[q]=!0}):"__mpa"===c?(e.h(a,function(q,m){m in d?d[m]+=q:(m in k||(k[m]=0),k[m]+=q)},this),this.O("$unset",a)):"__mpu"===c?(e.h(a,function(q,m){e.isArray(q)&&(m in h||(h[m]=[]),e.h(q,function(t){e.Ac(h[m],t)||h[m].push(t)}))}),this.O("$unset",a)):"__mpr"===c?(n.push(a),this.O("$append",a)):"__mpap"===c&&(r.push(a),this.O("$unset",a));v.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):");v.log(b);this.save()};B.prototype.O=function(a,
157
+ b){var c=this.props[this.pb(a)];e.m(c)||e.h(b,function(d,f){"$append"===a||"$remove"===a?e.h(c,function(g){g[f]===d&&delete g[f]}):delete c[f]},this)};B.prototype.Za=function(a){return this.Lb(this.pb(a))};B.prototype.pb=function(a){if("$set"===a)return"__mps";if("$set_once"===a)return"__mpso";if("$unset"===a)return"__mpus";if("$add"===a)return"__mpa";if("$append"===a)return"__mpap";if("$remove"===a)return"__mpr";if("$union"===a)return"__mpu";v.error("Invalid queue:",a)};B.prototype.ca=function(a,
158
+ b){a=this.pb(a);b=e.m(b)?{}:b;return this.props[a]||(this.props[a]=b)};B.prototype.Pg=function(a){var b=(new Date).getTime(),c=this.Lb("__timers")||{};c[a]=b;this.props.__timers=c;this.save()};B.prototype.yg=function(a){var b=(this.Lb("__timers")||{})[a];e.m(b)||(delete this.props.__timers[a],this.save());return b};var xa,G,pa=p.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,db=!pa&&-1===L.indexOf("MSIE")&&-1===L.indexOf("Mozilla"),Ha=null;aa.sendBeacon&&(Ha=function(){return aa.sendBeacon.apply(aa,
159
+ arguments)});var Wb={track:"track/",engage:"engage/",groups:"groups/",record:"record/",flags:"flags/",settings:"settings/"},bb={api_host:"https://api-js.mixpanel.com",api_hosts:{},api_routes:Wb,api_extra_query_params:{},api_method:"POST",api_transport:"XHR",api_payload_format:"base64",app_host:"https://mixpanel.com",autocapture:!1,cdn:"https://cdn.mxpnl.com",cross_site_cookie:!1,cross_subdomain_cookie:!0,error_reporter:ra,flags:!1,persistence:"cookie",persistence_name:"",cookie_domain:"",cookie_name:"",
160
+ loaded:ra,mp_loader:null,track_marketing:!0,track_pageview:!1,skip_first_touch_marketing:!1,store_google:!0,stop_utm_persistence:!1,save_referrer:!0,test:!1,verbose:!1,img:!1,debug:!1,track_links_timeout:300,cookie_expiration:365,upgrade:!1,disable_persistence:!1,disable_cookie:!1,secure_cookie:!1,ip:!0,opt_out_tracking_by_default:!1,opt_out_persistence_by_default:!1,opt_out_tracking_persistence_type:"localStorage",opt_out_tracking_cookie_prefix:null,property_blacklist:[],xhr_headers:{},ignore_dnt:!1,
161
+ batch_requests:!0,batch_size:50,batch_flush_interval_ms:5E3,batch_request_timeout_ms:9E4,batch_autostart:!0,hooks:{},record_allowed_iframe_origins:[],record_block_class:/^(mp-block|fs-exclude|amp-block|rr-block|ph-no-capture)$/,record_block_selector:"img, video, audio",record_canvas:!1,record_collect_fonts:!1,record_console:!0,record_heatmap_data:!1,recording_event_triggers:{},record_idle_timeout_ms:18E5,record_mask_inputs:!0,record_max_ms:864E5,record_min_ms:0,record_network:!1,record_network_options:{},
162
+ record_sessions_percent:0,recorder_src:null,targeting_src:null,lib_base_path:"https://cdn.mxpnl.com/libs/",remote_settings_mode:"disabled"},cb=!1;l.prototype.D=function(a,b,c){if(e.m(c))this.B("You must name your new library: init(token, config, name)");else if("mixpanel"===c)this.B("You must initialize the main mixpanel object right after you include the Mixpanel js snippet");else return a=wa(a,b,c),G[c]=a,a.qb(),a};l.prototype.Qa=function(a,b,c){b=b||{};this.__loaded=!0;this.config={};var d={};
163
+ "api_payload_format"in b||(b.api_host||bb.api_host).match(/\.mixpanel\.com/)&&(d.api_payload_format="json");this.I={};this.Ea(e.extend({},bb,d,b,{name:c,token:a,callback_fn:("mixpanel"===c?c:"mixpanel."+c)+"._jsc"}));this.U=new K({Nb:this,tc:e.bind(this.g,this),se:e.bind(this.Ea,this),Kf:e.bind(this.Jd,this),Bg:e.bind(this.B,this),Cf:e.bind(this.ka,this),Kc:this.g("recorder_src"),oa:this.g("targeting_src"),Kb:this.g("lib_base_path"),$:Ja});this._jsc=ra;this.Wb=[];this.Xb=[];this.ba=[];this.ra={disable_all_events:!1,
164
+ identify_called:!1};this.kd=!1;this.L={};if(this.Na=this.g("batch_requests"))if(e.localStorage.Xa(!0)&&pa){if(this.ag(),Ha&&p.addEventListener){var f=e.bind(function(){this.L.wa.stopped||this.L.wa.flush({Ce:!0})},this);p.addEventListener("pagehide",function(g){g.persisted&&f()});p.addEventListener("visibilitychange",function(){"hidden"===z.visibilityState&&f()})}}else this.Na=!1,v.log("Turning off Mixpanel request-queueing; needs XHR and localStorage support"),e.h(this.Hd(),function(g){v.log("Clearing batch queue "+
165
+ g.gb);e.localStorage.remove(g.gb)});this.persistence=this.cookie=new B(this.config);this.Ka={};this.Re();a=e.Ma();this.ka()||this.V({distinct_id:"$device:"+a,$device_id:a},"");this.flags=new u({Cb:e.bind(function(){return this.ja("flags")+"/"+this.g("api_routes").flags},this),tc:e.bind(this.g,this),se:e.bind(this.Ea,this),Gf:e.bind(this.H,this),rh:e.bind(this.track,this),$:Ja,oa:this.g("targeting_src")||this.g("lib_base_path")+"mixpanel-targeting-kdl-eE-1.min.js"});this.flags.D();this.flags=this.flags;
166
+ this.Te();a=this.g("remote_settings_mode");this.Yb="strict"===a||"fallback"===a?this.Pe(a).then(e.bind(function(){return this.mb()},this)):this.mb();this.jc=new H(this);this.jc.D()};l.prototype.Te=function(){if(this.g("disable_persistence"))v.log("Tab ID initialization skipped due to disable_persistence config");else if(e.sessionStorage.Xa())try{var a=this.g("name")+"_"+this.g("token"),b="mp_tab_id_"+a,c="mp_gen_new_tab_id_"+a;!e.sessionStorage.get(c)&&e.sessionStorage.get(b)||e.sessionStorage.set(b,
167
+ "$tab-"+e.Ma());e.sessionStorage.set(c,"1");this.gh=e.sessionStorage.get(b);p.addEventListener("beforeunload",function(){e.sessionStorage.remove(c)})}catch(d){this.B("Error initializing tab id",d)}else this.B("Session storage is not supported, cannot keep track of unique tab ID.")};l.prototype.Jd=function(){return this.gh||null};l.prototype.mb=ia(function(a){return this.U.mc(a)});l.prototype.Ye=fa(function(a,b){this.Yb&&this.Yb.then(e.bind(function(){if(!this.kd)return this.U.Ug(a,b)},this))});l.prototype.Wg=
168
+ function(){return this.mb(!0)};l.prototype.Qc=function(){return this.U.$g()};l.prototype.tg=function(){return this.U.sg()};l.prototype.Dg=function(){return this.U.Cg()};l.prototype.R=function(){return this.U.hg()};l.prototype.Id=function(){return this.U.Hf()};l.prototype.Pf=function(){return this.U.If()};l.prototype.Ie=function(){return this.U.C};l.prototype.Je=function(){return this.Yb};l.prototype.qb=function(){this.g("loaded")(this);this.md();this.people.Fa(this.persistence.Of());if(this.g("store_google")&&
169
+ this.g("stop_utm_persistence")){var a=e.info.Ta(null);e.h(a,function(b,c){this.unregister(c)}.bind(this))}};l.prototype.md=function(){this.persistence.Fe(z.referrer);this.g("store_google")&&!this.g("stop_utm_persistence")&&this.register(e.info.Ta());this.g("save_referrer")&&this.persistence.Uc(z.referrer)};l.prototype.Me=function(){e.h(this.Wb,function(a){this.fc.apply(this,a)},this);this.Wa()||e.h(this.Xb,function(a){this.v.apply(this,a)},this);delete this.Wb;delete this.Xb};l.prototype.fc=function(a,
170
+ b){if(this.g("img"))return this.B("You can't use DOM tracking functions with img = true."),!1;if(!cb)return this.Wb.push([a,b]),!1;a=(new a).D(this);return a.track.apply(a,b)};l.prototype.gd=function(a,b){if(e.m(a))return null;if(pa)return function(g){a(g,b)};var c=this._jsc,d=""+Math.floor(1E8*Math.random()),f=this.g("callback_fn")+"["+d+"]";c[d]=function(g){delete c[d];a(g,b)};return f};l.prototype.v=function(a,b,c,d){var f=!0;if(db)return this.Xb.push(arguments),f;var g={method:this.g("api_method"),
171
+ Sb:this.g("api_transport"),Ge:this.g("verbose")},k=null;d||!e.la(c)&&"string"!==typeof c||(d=c,c=null);c=e.extend(g,c||{});pa||(c.method="GET");g="POST"===c.method;var h=Ha&&g&&"sendbeacon"===c.Sb.toLowerCase(),n=c.Ge;b.verbose&&(n=!0);this.g("test")&&(b.test=1);n&&(b.verbose=1);this.g("img")&&(b.img=1);if(!pa)if(d)b.callback=d;else if(n||this.g("test"))b.callback="(function(){})";b.ip=this.g("ip")?1:0;b._=(new Date).getTime().toString();g&&(k="data="+encodeURIComponent(b.data),delete b.data);e.extend(b,
172
+ this.g("api_extra_query_params"));a+="?"+e.Ub(b);var r=this;if("img"in b)k=z.createElement("img"),k.src=a,z.body.appendChild(k);else if(h){try{f=Ha(a,k)}catch(y){r.B(y),f=!1}try{d&&d(f?1:0)}catch(y){r.B(y)}}else if(pa)try{var q=new XMLHttpRequest;q.open(c.method,a,!0);var m=this.g("xhr_headers");g&&(m["Content-Type"]="application/x-www-form-urlencoded");e.h(m,function(y,w){q.setRequestHeader(w,y)});if(c.ze&&"undefined"!==typeof q.timeout){q.timeout=c.ze;var t=(new Date).getTime()}q.withCredentials=
173
+ !0;q.onreadystatechange=function(){if(4===q.readyState)if(200===q.status){if(d)if(n){try{var y=e.La(q.responseText)}catch(w){if(r.B(w),c.Rf)y=q.responseText;else return}d(y)}else d(Number(q.responseText))}else y=q.timeout&&!q.status&&(new Date).getTime()-t>=q.timeout?"timeout":"Bad HTTP status: "+q.status+" "+q.statusText,r.B(y),d&&(n?d({status:0,Hb:q.status,error:y,pe:(q.responseHeaders||{})["Retry-After"]}):d(0))};q.send(k)}catch(y){r.B(y),f=!1}else k=z.createElement("script"),k.type="text/javascript",
174
+ k.async=!0,k.defer=!0,k.src=a,m=z.getElementsByTagName("script")[0],m.parentNode.insertBefore(k,m);return f};l.prototype.Pe=function(a){function b(){"strict"===a&&(c.Ea({record_sessions_percent:0}),c.kd=!0)}var c=this;if(!p.AbortController)return v.i("Remote settings unavailable: missing minimum required APIs"),b(),Promise.resolve();var d=this.ja("settings")+"/"+this.g("api_routes").settings,f=e.Ub({$lib_version:"2.80.0",mp_lib:"web",sdk_config:"1"});d=d+"?"+f;var g=new AbortController,k=setTimeout(function(){g.abort()},
175
+ 500);return p.fetch(d,{method:"GET",headers:{Authorization:"Basic "+btoa(c.g("token")+":")},signal:g.signal}).then(function(h){clearTimeout(k);if(h.ok)return h.json();v.i("Network response was not ok");b()}).then(function(h){if(h&&h.sdk_config&&h.sdk_config.config){var n={};e.h(h.sdk_config.config,function(r,q){bb.hasOwnProperty(q)&&(n[q]=r)});e.P(n)?(v.i("No valid config keys found in remote settings."),b()):c.Ea(n)}else b()}).catch(function(h){clearTimeout(k);v.i("Failed to fetch remote settings",
176
+ h);b()})};l.prototype.Zb=function(a){function b(k,h){e.h(k,function(n){if(e.isArray(n[0])){var r=h;e.h(n,function(q){r=r[q[0]].apply(r,q.slice(1))})}else this[n[0]].apply(this,n.slice(1))},h)}var c,d=[],f=[],g=[];e.h(a,function(k){k&&(c=k[0],e.isArray(c)?g.push(k):"function"===typeof k?k.call(this):e.isArray(k)&&"alias"===c?d.push(k):e.isArray(k)&&-1!==c.indexOf("track")&&"function"===typeof this[c]?g.push(k):f.push(k))},this);b(d,this);b(f,this);b(g,this)};l.prototype.od=function(){return!!this.L.wa};
177
+ l.prototype.Hd=function(){var a="__mpq_"+this.g("token");return this.Xc=this.Xc||{wa:{type:"events",tb:"track",gb:a+"_ev"},Hc:{type:"people",tb:"engage",gb:a+"_pp"},groups:{type:"groups",tb:"groups",gb:a+"_gr"}}};l.prototype.ag=function(){if(!this.od()){var a=e.bind(function(c){return new N(c.gb,{Z:this.config,va:this.g("error_reporter"),Ig:e.bind(function(d,f,g){this.v(this.ja(c.tb)+"/"+this.g("api_routes")[c.tb],this.$c(d),f,this.gd(g,d))},this),vb:e.bind(function(d){return(d=this.da("before_send_"+
178
+ c.type,d))?d[0]:null},this),Yg:e.bind(this.Pc,this),G:!0})},this),b=this.Hd();this.L={wa:a(b.wa),Hc:a(b.Hc),groups:a(b.groups)}}this.g("batch_autostart")&&this.Oc()};l.prototype.Oc=function(){this.Ke=!0;this.od()&&(this.Na=!0,e.h(this.L,function(a){a.start()}))};l.prototype.Pc=function(){this.Na=!1;e.h(this.L,function(a){a.stop();a.clear()})};l.prototype.push=function(a){this.Zb([a])};l.prototype.enable=function(a){var b;if("undefined"===typeof a)this.ra.Ad=!1;else{var c={};var d=[];for(b=0;b<a.length;b++)c[a[b]]=
179
+ !0;for(a=0;a<this.ba.length;a++)c[this.ba[a]]||d.push(this.ba[a]);this.ba=d}};l.prototype.disable=function(a){"undefined"===typeof a?this.ra.Ad=!0:this.ba=this.ba.concat(a)};l.prototype.$c=function(a){a=oa(a);"base64"===this.g("api_payload_format")&&(a=e.gf(a));return{data:a}};l.prototype.hc=function(a,b){var c=e.truncate(a.data,255),d=a.endpoint,f=a.kc,g=a.Tg,k=a.Kg||{};b=b||ra;var h=!0,n=e.bind(function(){k.Nc||(c=this.da("before_send_"+a.type,c))&&(c=c[0]);return c?(v.log("MIXPANEL REQUEST:"),
180
+ v.log(c),this.v(d,this.$c(c),k,this.gd(b,c))):null},this);this.Na&&!g?f.enqueue(c).then(function(r){r?b(1,c):n()}):h=n();return h&&c};l.prototype.track=ia(function(a,b,c,d){if(!c||!c.Nc){var f=this.da("before_track",a,b);if(null===f)return;a=f[0];b=f[1]}d||"function"!==typeof c||(d=c,c=null);c=c||{};if(f=c.transport)c.Sb=f;f=c.send_immediately;"function"!==typeof d&&(d=ra);if(e.m(a))this.B("No event name provided to mixpanel.track");else if(this.bd(a))d(0);else{b=e.extend({},b);b.token=this.g("token");
181
+ var g=this.persistence.yg(a);e.m(g)||(b.$duration=parseFloat((((new Date).getTime()-g)/1E3).toFixed(3)));this.md();g=this.g("track_marketing")?e.info.kg():{};b=e.extend({},e.info.eb({mp_loader:this.g("mp_loader")}),g,this.persistence.eb(),this.Ka,this.Id(),b);g=this.g("property_blacklist");e.isArray(g)?e.h(g,function(k){delete b[k]}):this.B("Invalid value for property_blacklist config: "+g);this.Ye(a,b);f=this.hc({type:"events",data:{event:a,properties:b},endpoint:this.ja("events")+"/"+this.g("api_routes").track,
182
+ kc:this.L.wa,Tg:f,Kg:c},d);this.flags&&this.flags.pd&&this.flags.pd(a,b);return f}});l.prototype.Qg=ia(function(a,b,c){e.isArray(b)||(b=[b]);var d={};d[a]=b;this.register(d);return this.people.set(a,b,c)});l.prototype.af=ia(function(a,b,c){var d=this.H(a),f={};void 0===d?(f[a]=[b],this.register(f)):-1===d.indexOf(b)&&(d.push(b),f[a]=d,this.register(f));return this.people.kb(a,b,c)});l.prototype.zg=ia(function(a,b,c){var d=this.H(a);if(void 0!==d){var f=d.indexOf(b);-1<f&&(d.splice(f,1),this.register({Bh:d}));
183
+ 0===d.length&&this.unregister(a)}return this.people.remove(a,b,c)});l.prototype.qh=ia(function(a,b,c,d){var f=e.extend({},b||{});e.h(c,function(g,k){null!==g&&void 0!==g&&(f[k]=g)});return this.track(a,f,d)});l.prototype.Le=function(a,b){return a+"_"+JSON.stringify(b)};l.prototype.Nf=function(a,b){var c=this.Le(a,b),d=this.Zc[c];if(void 0===d||d.cc!==a||d.bc!==b)d=new F,d.Qa(this,a,b),this.Zc[c]=d;return d};l.prototype.Tc=ia(function(a,b){"object"!==typeof a&&(a={});b=b||{};b=b.event_name||"$mp_web_page_view";
184
+ var c=e.extend(e.info.mg(),e.info.Ta(),e.info.sd());a=e.extend({},c,a);this.R()&&(a.$captured_for_heatmap=!0);return this.track(b,a)});l.prototype.ph=function(){return this.fc.call(this,la,arguments)};l.prototype.oh=function(){return this.fc.call(this,ya,arguments)};l.prototype.hh=function(a){e.m(a)?this.B("No event name provided to mixpanel.time_event"):this.bd(a)||this.persistence.Pg(a)};var $b={persistent:!0};l.prototype.register=function(a,b){b=this.da("before_register",a,b);null!==b&&(a=b[0],
185
+ b=b[1],b=Ia(b),b.persistent?this.persistence.register(a,b.days):e.extend(this.Ka,a))};l.prototype.V=function(a,b,c){c=this.da("before_register_once",a,b,c);null!==c&&(a=c[0],b=c[1],c=c[2],c=Ia(c),c.persistent?this.persistence.V(a,b,c.days):("undefined"===typeof b&&(b="None"),e.h(a,function(d,f){this.Ka.hasOwnProperty(f)&&this.Ka[f]!==b||(this.Ka[f]=d)},this)))};l.prototype.unregister=function(a,b){b=this.da("before_unregister",a,b);null!==b&&(a=b[0],b=b[1],b=Ia(b),b.persistent?this.persistence.unregister(a):
186
+ delete this.Ka[a])};l.prototype.jd=function(a,b){var c={};c[a]=b;this.register(c)};l.prototype.zc=function(a,b,c,d,f,g,k,h){a=this.da("before_identify",a);if(null===a)return-1;a=a[0];var n=this.ka();if(a&&n!==a){if("string"===typeof a&&0===a.indexOf("$device:"))return this.B("distinct_id cannot have $device: prefix"),-1;this.register({$user_id:a})}this.H("$device_id")||this.V({$had_persisted_distinct_id:!0,$device_id:n},"");a!==n&&a!==this.H("__alias")&&(this.unregister("__alias"),this.register({distinct_id:a}));
187
+ this.ra.Kd=!0;this.people.Qe(b,c,d,f,g,k,h);a!==n&&this.track("$identify",{distinct_id:a,$anon_distinct_id:n},{Nc:!0});a!==n&&this.flags.Ua().catch(function(){v.error("[flags] Error fetching flags during identify")})};l.prototype.reset=function(){this.Qc();this.persistence.clear();this.ra.Kd=!1;var a=e.Ma();this.V({distinct_id:"$device:"+a,$device_id:a},"");this.mb();this.flags.reset()};l.prototype.ka=function(){return this.H("distinct_id")};l.prototype.cf=function(a,b){if(a===this.H("$people_distinct_id"))return this.B("Attempting to create alias for existing People user - aborting."),
188
+ -2;var c=this;e.m(b)&&(b=this.ka());if(a!==b)return this.jd("__alias",a),this.track("$create_alias",{alias:a,distinct_id:b},{Nc:!0},function(){c.zc(a)});this.B("alias matches current distinct_id - skipping api call.");this.zc(a);return-1};l.prototype.ng=function(a){this.jd("mp_name_tag",a)};l.prototype.Ea=function(a){e.l(a)&&(e.extend(this.config,a),a.batch_size&&e.h(this.L,function(b){b.oe()}),this.g("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.g("disable_persistence")||
189
+ (this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.Ee(this.config),W=W||this.g("debug"),("autocapture"in a||"record_heatmap_data"in a)&&this.jc&&this.jc.D(),e.l(a.hooks)&&(this.I={},e.h(a.hooks,function(b,c){if(e.la(b))this.I[c]=[b];else if(e.isArray(b)){this.I[c]=[];for(var d=0;d<b.length;d++)e.la(b[d])||v.i("Invalid hook added. Hook is not a function"),this.I[c].push(b[d])}else v.i("Invalid hooks added. Ensure that the hook values passed into config.hooks are functions or arrays of functions.")},
190
+ this)))};l.prototype.g=function(a){return this.config[a]};l.prototype.da=function(a){var b=ka.call(arguments,1);e.h(this.I[a],function(c){if(null===b)return null;c=c.apply(this,b);"undefined"===typeof c?(this.B(a+" hook did not return a valid value"),b=null):(e.isArray(c)||(c=[c]),b.splice.apply(b,[0,c.length].concat(c)))},this);return b};l.prototype.H=function(a){return this.persistence.Lb([a])};l.prototype.ja=function(a){return this.g("api_hosts")[a]||this.g("api_host")};l.prototype.toString=function(){var a=
191
+ this.g("name");"mixpanel"!==a&&(a="mixpanel."+a);return a};l.prototype.bd=function(a){return e.Od(L)||this.ra.Ad||e.Ac(this.ba,a)};l.prototype.Re=function(){"localStorage"===this.g("opt_out_tracking_persistence_type")&&e.localStorage.Xa()&&(!this.Gb()&&this.Gb({persistence_type:"cookie"})&&this.de({enable_persistence:!1}),!this.Wa()&&this.Wa({persistence_type:"cookie"})&&this.Gc({clear_persistence:!1}),this.rd({persistence_type:"cookie",enable_persistence:!1}));this.Wa()?this.ob({clear_persistence:!0}):
192
+ this.Gb()||!this.g("opt_out_tracking_by_default")&&!e.cookie.get("mp_optout")||(e.cookie.remove("mp_optout"),this.Gc({clear_persistence:this.g("opt_out_persistence_by_default")}))};l.prototype.ob=function(a){if(a&&a.clear_persistence)a=!0;else if(a&&a.enable_persistence)a=!1;else return;this.g("disable_persistence")||this.persistence.disabled===a||this.persistence.ue(a);a?(this.Pc(),this.Qc()):this.Ke&&this.Oc()};l.prototype.Pa=function(a,b){b=e.extend({track:e.bind(this.track,this),persistence_type:this.g("opt_out_tracking_persistence_type"),
193
+ cookie_prefix:this.g("opt_out_tracking_cookie_prefix"),cookie_expiration:this.g("cookie_expiration"),cross_site_cookie:this.g("cross_site_cookie"),cross_subdomain_cookie:this.g("cross_subdomain_cookie"),cookie_domain:this.g("cookie_domain"),secure_cookie:this.g("secure_cookie"),ignore_dnt:this.g("ignore_dnt")},b);e.localStorage.Xa()||(b.persistence_type="cookie");return a(this.g("token"),{track:b.track,kh:b.track_event_name,mh:b.track_properties,he:b.persistence_type,ge:b.cookie_prefix,td:b.cookie_domain,
194
+ ud:b.cookie_expiration,rf:b.cross_site_cookie,vd:b.cross_subdomain_cookie,Gg:b.secure_cookie,Ld:b.ignore_dnt})};l.prototype.de=function(a){a=e.extend({enable_persistence:!0},a);this.Pa(qc,a);this.ob(a)};l.prototype.Gc=function(a){a=e.extend({clear_persistence:!0,delete_user:!0},a);a.delete_user&&this.people&&this.people.dc()&&(this.people.yd(),this.people.qd());this.Pa(rc,a);this.ob(a)};l.prototype.Gb=function(a){return this.Pa(sc,a)};l.prototype.Wa=function(a){return this.Pa(Gb,a)};l.prototype.rd=
195
+ function(a){a=e.extend({enable_persistence:!0},a);this.Pa(uc,a);this.ob(a)};l.prototype.B=function(a,b){v.error.apply(v.error,arguments);try{b||a instanceof Error||(a=Error(a)),this.g("error_reporter")(a,b)}catch(c){v.error(c)}};l.prototype.bf=function(a,b){this.I[a]||(this.I[a]=[]);this.I[a].push(b)};l.prototype.Ag=function(a,b){this.I[a]&&(b=this.I[a].indexOf(b),-1!==b?this.I[a].splice(b,1):v.log("remove_hook failed. Matching hook was not found"))};l.prototype.init=l.prototype.D;l.prototype.reset=
196
+ l.prototype.reset;l.prototype.enable=l.prototype.enable;l.prototype.disable=l.prototype.disable;l.prototype.time_event=l.prototype.hh;l.prototype.track=l.prototype.track;l.prototype.track_links=l.prototype.ph;l.prototype.track_forms=l.prototype.oh;l.prototype.track_pageview=l.prototype.Tc;l.prototype.register=l.prototype.register;l.prototype.register_once=l.prototype.V;l.prototype.unregister=l.prototype.unregister;l.prototype.identify=l.prototype.zc;l.prototype.alias=l.prototype.cf;l.prototype.name_tag=
197
+ l.prototype.ng;l.prototype.set_config=l.prototype.Ea;l.prototype.get_config=l.prototype.g;l.prototype.get_api_host=l.prototype.ja;l.prototype.get_property=l.prototype.H;l.prototype.get_distinct_id=l.prototype.ka;l.prototype.toString=l.prototype.toString;l.prototype.opt_out_tracking=l.prototype.Gc;l.prototype.opt_in_tracking=l.prototype.de;l.prototype.has_opted_out_tracking=l.prototype.Wa;l.prototype.has_opted_in_tracking=l.prototype.Gb;l.prototype.clear_opt_in_out_tracking=l.prototype.rd;l.prototype.get_group=
198
+ l.prototype.Nf;l.prototype.set_group=l.prototype.Qg;l.prototype.add_group=l.prototype.af;l.prototype.remove_group=l.prototype.zg;l.prototype.add_hook=l.prototype.bf;l.prototype.remove_hook=l.prototype.Ag;l.prototype.track_with_groups=l.prototype.qh;l.prototype.start_batch_senders=l.prototype.Oc;l.prototype.stop_batch_senders=l.prototype.Pc;l.prototype.start_session_recording=l.prototype.Wg;l.prototype.stop_session_recording=l.prototype.Qc;l.prototype.pause_session_recording=l.prototype.tg;l.prototype.resume_session_recording=
199
+ l.prototype.Dg;l.prototype.get_session_recording_properties=l.prototype.Id;l.prototype.get_session_replay_url=l.prototype.Pf;l.prototype.get_tab_id=l.prototype.Jd;l.prototype.DEFAULT_API_ROUTES=Wb;l.prototype.__get_recorder=l.prototype.Ie;l.prototype.__get_recording_init_promise=l.prototype.Je;B.prototype.properties=B.prototype.eb;B.prototype.update_search_keyword=B.prototype.Fe;B.prototype.update_referrer_info=B.prototype.Uc;B.prototype.get_cross_subdomain=B.prototype.Mf;B.prototype.clear=B.prototype.clear;
200
+ var V={};(function(a){Ja=a;xa=1;G=p.mixpanel;e.m(G)?v.i('"mixpanel" object not initialized. Ensure you are using the latest version of the Mixpanel JS Library along with the snippet we provide.'):G.__loaded||G.config&&G.persistence?v.i("The Mixpanel library has already been downloaded at least once. Ensure that the Mixpanel code snippet only appears once on the page (and is not double-loaded by a tag manager) in order to avoid errors."):1.1>(G.__SV||0)?v.i("Version mismatch; please ensure you're using the latest version of the Mixpanel code snippet."):
201
+ (e.h(G._i,function(b){b&&e.isArray(b)&&(V[b[b.length-1]]=wa.apply(this,b))}),Yb(),G.init(),e.h(V,function(b){b.qb()}),Xb())})(function(a,b){var c=document.createElement("script");c.type="text/javascript";c.async=!0;c.onload=b;c.src=a;document.head.appendChild(c)})})()