-
Notifications
You must be signed in to change notification settings - Fork 316
/
Copy pathmixpanel.min.js
150 lines (150 loc) · 75.5 KB
/
mixpanel.min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
(function(){function Cb(){function a(){a.done||(Qa=a.done=!0,Ra=!1,d.g(R,function(e){e.dd()}))}function b(){try{A.documentElement.doScroll("left")}catch(e){setTimeout(b,1);return}a()}if(A.addEventListener)"complete"===A.readyState?a():A.addEventListener("DOMContentLoaded",a,!1);else if(A.attachEvent){A.attachEvent("onreadystatechange",a);var c=!1;try{c=null===r.frameElement}catch(e){}A.documentElement.doScroll&&c&&b()}d.Ec(r,"load",a,!0)}function Db(){E.init=function(a,b,c){if(c)return E[c]||(E[c]=
R[c]=ma(a,b,c),E[c].ya()),E[c];c=E;R.mixpanel?c=R.mixpanel:a&&(c=ma(a,b,"mixpanel"),c.ya(),R.mixpanel=c);E=c;1===xa&&(r.mixpanel=E);Eb()}}function Eb(){d.g(R,function(a,b){"mixpanel"!==b&&(E[b]=a)});E._=d}function ya(a){a=d.j(a)?a:d.l(a)?{}:{days:a};return d.extend({},Fb,a)}function ma(a,b,c){var e="mixpanel"===c?E:E[c];if(e&&0===xa)var f=e;else{if(e&&!d.isArray(e)){z.error("You have already initialized "+c);return}f=new l}f.Ib={};f.ja(a,b,c);f.people=new x;f.people.ja(f);if(!f.h("skip_first_touch_marketing")){a=
d.info.ka(null);var g={},k=!1;d.g(a,function(h,p){(g["initial_"+p]=h)&&(k=!0)});k&&f.people.$(g)}S=S||f.h("debug");!d.l(e)&&d.isArray(e)&&(f.Ta.call(f.people,e.people),f.Ta(e));return f}function l(){}function Gb(a){return a}function Sa(a){throw Error(a+" not available in this build.");}function T(a){this.W=null;this.Fe=a}function y(a){this.props={};this.name=a.persistence_name?"mp_"+a.persistence_name:"mp_"+a.token+"_mixpanel";var b=a.persistence;"cookie"!==b&&"localStorage"!==b&&(z.u("Unknown persistence type "+
b+"; falling back to cookie"),b=a.persistence="cookie");"localStorage"===b&&d.localStorage.na()?this.storage=d.localStorage:this.storage=d.cookie;this.load();this.Yc(a);this.upgrade();this.save()}function x(){}function C(){}function L(a,b){this.X=b.X;this.ra=new O(a,{X:d.bind(this.m,this),R:b.R,Oc:b.Oc,Pc:b.Pc,F:b.F,hb:b.hb});this.P=b.P;this.re=b.se;this.za=b.za;this.De=b.Ee;this.T=this.P.batch_size;this.Ga=this.P.batch_flush_interval_ms;this.stopped=!this.P.batch_autostart;this.eb=0;this.V={};this.fc=
b.fc||!1}function Ta(a,b){var c=[];d.g(a,function(e){var f=e.id;f in b?(f=b[f],null!==f&&(e.payload=f,c.push(e))):c.push(e)});return c}function Ua(a,b){var c=[];d.g(a,function(e){e.id&&!b[e.id]&&c.push(e)});return c}function O(a,b){b=b||{};this.aa=a;if(this.F=b.F)this.R=b.R||new fa,this.lock=new Va(a,{storage:b.Oc||r.localStorage,zb:b.Pc});this.m=b.X||d.bind(Wa.error,Wa);this.Na=b.Na||null;this.K=[];this.pb=!1;this.Bd=b.hb?Hb(d.bind(this.Lb,this),b.hb):d.bind(function(c){return this.Lb([c])},this)}
function fa(a){this.storage=a||r.localStorage}function Va(a,b){b=b||{};this.aa=a;this.storage=b.storage||r.localStorage;this.Bc=b.Bc||100;this.zb=b.zb||2E3;this.Cc=b.Cc||D}function na(){this.xc="submit"}function ba(){this.xc="click"}function Q(){}function B(a){this.la=a.Gd;this.Hd=a.Id;this.track=a.Se}function J(a){this.A=a}function ha(){}function Xa(a){var b=Ib,c=a.split(".");c=c[c.length-1];if(4<c.length||"com"===c||"org"===c)b=Jb;return(a=a.match(b))?a[0]:""}function za(a){var b=Math.random().toString(36).substring(2,
10)+Math.random().toString(36).substring(2,10);return a?b.substring(0,a):b}function Hb(a,b){var c=null,e=[];return function(f){var g=this;e.push(f);c||(c=new D(function(k){setTimeout(function(){var h=a.apply(g,[e]);c=null;e=[];k(h)},b)}));return c}}function oa(a,b){return null===Aa||b?Aa=Ya(a||r.localStorage):Aa}function Ya(a){var b=!0;try{var c="__mplss_"+za(8);a.setItem(c,"xyz");"xyz"!==a.getItem(c)&&(b=!1);a.removeItem(c)}catch(e){b=!1}return b}function Za(a){a=a.prototype;for(var b in a)"function"===
typeof a[b]&&(a[b]=Ba(a[b]))}function Ba(a){return function(){try{return a.apply(this,arguments)}catch(b){z.u("Implementation error. Please turn on debug and contact [email protected]."),S&&z.u(b)}}}function ia(a){return{log:Ca(z.log,a),error:Ca(z.error,a),u:Ca(z.u,a)}}function Ca(a,b){return function(){arguments[0]="["+b+"] "+arguments[0];return a.apply(z,arguments)}}function pa(a,b){$a.add(a,b);Da||(Da=Kb($a.Ad))}function ab(a){var b=typeof a;if(null!==a&&("object"===b||"function"===b))var c=
a.then;return"function"===typeof c?c:!1}function Ea(){for(var a=0;a<this.N.length;a++){var b=void 0,c=void 0,e=1===this.state?this.N[a].Ge:this.N[a].Cd,f=this.N[a];try{!1===e?f.reject(this.pa):(c=!0===e?this.pa:e.call(void 0,this.pa),c===f.promise?f.reject(TypeError("Promise-chain cycle")):(b=ab(c))?b.call(c,f.resolve,f.reject):f.resolve(c))}catch(g){f.reject(g)}}this.N.length=0}function bb(a){var b,c=this;if(!c.ua){c.ua=!0;c.Fa&&(c=c.Fa);try{(b=ab(a))?pa(function(){var e=new cb(c);try{b.call(a,function(){bb.apply(e,
arguments)},function(){ja.apply(e,arguments)})}catch(f){ja.call(e,f)}}):(c.pa=a,c.state=1,0<c.N.length&&pa(Ea,c))}catch(e){ja.call(new cb(c),e)}}}function ja(a){var b=this;b.ua||(b.ua=!0,b.Fa&&(b=b.Fa),b.pa=a,b.state=2,0<b.N.length&&pa(Ea,b))}function db(a,b,c,e){for(var f=0;f<b.length;f++)(function(g){a.resolve(b[g]).then(function(k){c(g,k)},e)})(f)}function cb(a){this.Fa=a;this.ua=!1}function Lb(a){this.promise=a;this.state=0;this.ua=!1;this.N=[];this.pa=void 0}function U(a){if("function"!==typeof a)throw TypeError("Not a function");
if(0!==this.__NPO__)throw TypeError("Not a promise");this.__NPO__=1;var b=new Lb(this);this.then=function(c,e){var f={Ge:"function"===typeof c?c:!0,Cd:"function"===typeof e?e:!1};f.promise=new this.constructor(function(g,k){if("function"!==typeof g||"function"!==typeof k)throw TypeError("Not a function");f.resolve=g;f.reject=k});b.N.push(f);0!==b.state&&pa(Ea,b);return f.promise};this["catch"]=function(c){return this.then(void 0,c)};try{a.call(void 0,function(c){bb.call(b,c)},function(c){ja.call(b,
c)})}catch(c){ja.call(b,c)}}function eb(a,b,c){function e(f){z.error(b+" error: "+f)}return{na:function(f){(f=c(a,f))||z.error(b+" unsupported");return f},error:e,get:function(f){try{return a.getItem(f)}catch(g){e(g)}return null},parse:function(f){try{return d.ea(a.getItem(f))||{}}catch(g){}return null},set:function(f,g){try{a.setItem(f,g)}catch(k){e(k)}},remove:function(f){try{a.removeItem(f)}catch(g){e(g)}}}}function Fa(a){var b={};a=fb(a).split(" ");for(var c=0;c<a.length;c++){var e=a[c];e&&(b[e]=
!0)}return b}function fb(a){switch(typeof a.className){case "string":return a.className;case "object":return a.className.We||a.getAttribute("class")||"";default:return""}}function Mb(a){if(a.previousElementSibling)return a.previousElementSibling;do a=a.previousSibling;while(a&&(!a||1!==a.nodeType));return a}function gb(a,b,c,e,f,g){var k={$classes:fb(a).split(" "),$tag_name:a.tagName.toLowerCase()},h=a.id;h&&(k.$id=h);Ga(a,b,f,g)&&d.g(Nb.concat(e),function(p){if(a.hasAttribute(p)&&!c[p]){var q=a.getAttribute(p);
qa(q)&&(k["$attr-"+p]=q)}});e=b=1;for(f=a;f=Mb(f);)b++,f.tagName===a.tagName&&e++;k.$nth_child=b;k.$nth_of_type=e;return k}function Ob(a,b){var c=b.md,e=b.nd||[],f=b.rd,g=b.sd||[],k=b.vd||!1,h=b.ud||[],p=b.wd||!1,q={};d.g(b.qd||[],function(v){q[v]=!0});var n=null,m="undefined"===typeof a.target?a.srcElement:a.target;m&&3===m.nodeType&&(m=m.parentNode);if(Pb(m,a)&&Ha(m,a,c,e)&&!Ia(m,a,f,g)){b=[m];for(var t=m;t.parentNode&&!P(t,"body");)b.push(t.parentNode),t=t.parentNode;var w=[],u,G=!1;d.g(b,function(v){var M=
Ga(v,a,c,e);q.href||"a"!==v.tagName.toLowerCase()||(u=v.getAttribute("href"),u=M&&qa(u)&&u);Ia(v,a,f,g)&&(G=!0);w.push(gb(v,a,q,h,c,e))},this);if(!G&&(b=A.documentElement,n={$event_type:a.type,$host:r.location.host,$pathname:r.location.pathname,$elements:w,$el_attr__href:u,$viewportHeight:Math.max(b.clientHeight,r.innerHeight||0),$viewportWidth:Math.max(b.clientWidth,r.innerWidth||0)},d.g(h,function(v){if(!q[v]&&m.hasAttribute(v)){var M=m.getAttribute(v);qa(M)&&(n["$el_attr__"+v]=M)}}),k&&(b=hb(m,
a,c,e))&&b.length&&(n.$el_text=b),"click"===a.type&&(d.g(Qb,function(v){v in a&&(n["$"+v]=a[v])}),p&&(n.$captured_for_heatmap=!0),m=Rb(a)),k&&(b=hb(m,a,c,e))&&b.length&&(n.$el_text=b),m)){if(!Ha(m,a,c,e)||Ia(m,a,f,g))return null;k=gb(m,a,q,h,c,e);n.$target=k;n.$el_classes=k.$classes;d.extend(n,d.ba({$el_id:k.$id,$el_tag_name:k.$tag_name}))}}return n}function hb(a,b,c,e){var f="";Ga(a,b,c,e)&&a.childNodes&&a.childNodes.length&&d.g(a.childNodes,function(g){g&&3===g.nodeType&&g.textContent&&(f+=d.trim(g.textContent).split(/(\s+)/).filter(qa).join("").replace(/[\r\n]/g,
" ").replace(/[ ]+/g," ").substring(0,255))});return d.trim(f)}function Rb(a){var b=a.target;a=a.composedPath();for(var c=0;c<a.length;c++){var e=a[c];if(P(e,"a")||P(e,"button")||P(e,"input")||P(e,"select")||e.getAttribute&&"button"===e.getAttribute("role")){b=e;break}if(e===b)break}return b}function Ha(a,b,c,e){if(c)try{if(!c(a,b))return!1}catch(f){return I.u("Error while checking element in allowElementCallback",f),!1}if(!e.length)return!0;for(b=0;b<e.length;b++){c=e[b];try{if(a.matches(c))return!0}catch(f){I.u("Error while checking selector: "+
c,f)}}return!1}function Ia(a,b,c,e){if(c)try{if(c(a,b))return!0}catch(f){return I.u("Error while checking element in blockElementCallback",f),!0}if(e&&e.length)for(b=0;b<e.length;b++){c=e[b];try{if(a.matches(c))return!0}catch(f){I.u("Error while checking selector: "+c,f)}}a=Fa(a);for(b=0;b<Ja.length;b++)if(a[Ja[b]])return!0;return!1}function P(a,b){return a&&a.tagName&&a.tagName.toLowerCase()===b.toLowerCase()}function Pb(a,b){if(!a||P(a,"html")||!a||1!==a.nodeType)return!1;switch(a.tagName.toLowerCase()){case "form":return"submit"===
b.type;case "input":return-1===["button","submit"].indexOf(a.getAttribute("type"))?"change"===b.type:"click"===b.type;case "select":case "textarea":return"change"===b.type;default:return"click"===b.type}}function Ga(a,b,c,e){if(!Ha(a,b,c,e))return!1;for(c=a;c.parentNode&&!P(c,"body");c=c.parentNode)for(e=Fa(c),b=0;b<ib.length;b++)if(e[ib[b]])return!1;c=Fa(a);for(b=0;b<jb.length;b++)if(c[jb[b]])return!0;if(P(a,"input")||P(a,"select")||P(a,"textarea")||"true"===a.getAttribute("contenteditable"))return!1;
b=a.type||"";if("string"===typeof b)switch(b.toLowerCase()){case "hidden":return!1;case "password":return!1}a=a.name||a.id||"";return"string"===typeof a&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(a.replace(/[^a-zA-Z0-9]/g,""))?!1:!0}function qa(a){return null===a||d.l(a)||"string"===typeof a&&(a=d.trim(a),/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/.test((a||
"").replace(/[- ]/g,""))||/(^\d{3}-?\d{2}-?\d{4}$)/.test(a))?!1:!0}function Sb(a,b){kb(!0,a,b)}function Tb(a,b){kb(!1,a,b)}function Ub(a,b){return"1"===lb(a,b)}function mb(a,b){if(Vb(b))return z.warn('This browser has "Do Not Track" enabled. This will prevent the Mixpanel SDK from sending any data. To ignore the "Do Not Track" browser setting, initialize the Mixpanel instance with the config "ignore_dnt: true"'),!0;(a="0"===lb(a,b))&&z.warn("You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data.");
return a}function Y(a){return Ka(a,function(b){return this.h(b)})}function V(a){return Ka(a,function(b){return this.C(b)})}function ca(a){return Ka(a,function(b){return this.C(b)})}function Wb(a,b){b=b||{};La(b).remove(Ma(a,b),!!b.Zb,b.Xb)}function La(a){a=a||{};return"localStorage"===a.Ac?d.localStorage:d.cookie}function Ma(a,b){b=b||{};return(b.zc||"__mp_opt_in_out_")+a}function lb(a,b){return La(b).get(Ma(a,b))}function Vb(a){if(a&&a.nc)return!1;a=a&&a.window||r;var b=a.navigator||{},c=!1;d.g([b.doNotTrack,
b.msDoNotTrack,a.doNotTrack],function(e){d.includes([!0,1,"1","yes"],e)&&(c=!0)});return c}function kb(a,b,c){d.rb(b)&&b.length?(c=c||{},La(c).set(Ma(b,c),a?1:0,d.sc(c.Yb)?c.Yb:null,!!c.Zb,!!c.qe,!!c.xd,c.Xb),c.track&&a&&c.track(c.Le||"$opt_in",c.Ne,{send_immediately:!0})):z.error("gdpr."+(a?"optIn":"optOut")+" called with an invalid token")}function Ka(a,b){return function(){var c=!1;try{var e=b.call(this,"token"),f=b.call(this,"ignore_dnt"),g=b.call(this,"opt_out_tracking_persistence_type"),k=b.call(this,
"opt_out_tracking_cookie_prefix"),h=b.call(this,"window");e&&(c=mb(e,{nc:f,Ac:g,zc:k,window:h}))}catch(p){z.error("Unexpected error when checking tracking opt-out status: "+p)}if(!c)return a.apply(this,arguments);c=arguments[arguments.length-1];"function"===typeof c&&c(0)}}var S=!1;if("undefined"===typeof window){var nb={hostname:""};var r={crypto:{Ze:function(){throw Error("unsupported");}},navigator:{userAgent:"",onLine:!0},document:{createElement:function(){return{}},location:nb,referrer:""},screen:{width:0,
height:0},location:nb,addEventListener:function(){},removeEventListener:function(){}}}else r=window;var ob=r.setImmediate,Da,pb=Object.prototype.toString,Kb="undefined"!==typeof ob?function(a){return ob(a)}:setTimeout;try{Object.defineProperty({},"x",{});var Z=function(a,b,c,e){return Object.defineProperty(a,b,{value:c,writable:!0,configurable:!1!==e})}}catch(a){Z=function(b,c,e){b[c]=e;return b}}var $a=function(){function a(f,g){this.Ed=f;this.self=g;this.next=void 0}var b,c,e;return{add:function(f,
g){e=new a(f,g);c?c.next=e:b=e;c=e;e=void 0},Ad:function(){var f=b;for(b=c=Da=void 0;f;)f.Ed.call(f.self),f=f.next}}}();var qb=Z({},"constructor",U,!1);U.prototype=qb;Z(qb,"__NPO__",0,!1);Z(U,"resolve",function(a){return a&&"object"===typeof a&&1===a.__NPO__?a:new this(function(b,c){if("function"!==typeof b||"function"!==typeof c)throw TypeError("Not a function");b(a)})});Z(U,"reject",function(a){return new this(function(b,c){if("function"!==typeof b||"function"!==typeof c)throw TypeError("Not a function");
c(a)})});Z(U,"all",function(a){var b=this;return"[object Array]"!==pb.call(a)?b.reject(TypeError("Not an array")):0===a.length?b.resolve([]):new b(function(c,e){if("function"!==typeof c||"function"!==typeof e)throw TypeError("Not a function");var f=a.length,g=Array(f),k=0;db(b,a,function(h,p){g[h]=p;++k===f&&c(g)},e)})});Z(U,"race",function(a){var b=this;return"[object Array]"!==pb.call(a)?b.reject(TypeError("Not an array")):new b(function(c,e){if("function"!==typeof c||"function"!==typeof e)throw TypeError("Not a function");
db(b,a,function(f,g){c(g)},e)})});var D="undefined"!==typeof Promise&&-1!==Promise.toString().indexOf("[native code]")?Promise:U;var ra=Array.prototype,rb=Object.prototype,aa=ra.slice,ka=rb.toString,sa=rb.hasOwnProperty,F=r.console,W=r.navigator,A=r.document,ta=r.opera,sb=r.screen,H=W.userAgent,Na=Function.prototype.bind,tb=ra.forEach,ub=ra.indexOf,vb=ra.map,Xb=Array.isArray,Oa={},d={trim:function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},z={log:function(){if(S&&!d.l(F)&&F)try{F.log.apply(F,
arguments)}catch(a){d.g(arguments,function(b){F.log(b)})}},warn:function(){if(S&&!d.l(F)&&F){var a=["Mixpanel warning:"].concat(d.ca(arguments));try{F.warn.apply(F,a)}catch(b){d.g(a,function(c){F.warn(c)})}}},error:function(){if(S&&!d.l(F)&&F){var a=["Mixpanel error:"].concat(d.ca(arguments));try{F.error.apply(F,a)}catch(b){d.g(a,function(c){F.error(c)})}}},u:function(){if(!d.l(F)&&F){var a=["Mixpanel error:"].concat(d.ca(arguments));try{F.error.apply(F,a)}catch(b){d.g(a,function(c){F.error(c)})}}}};
d.bind=function(a,b){var c;if(Na&&a.bind===Na)return Na.apply(a,aa.call(arguments,1));if(!d.qb(a))throw new TypeError;var e=aa.call(arguments,2);return c=function(){if(!(this instanceof c))return a.apply(b,e.concat(aa.call(arguments)));var f={};f.prototype=a.prototype;var g=new f;f.prototype=null;f=a.apply(g,e.concat(aa.call(arguments)));return Object(f)===f?f:g}};d.g=function(a,b,c){if(null!==a&&void 0!==a)if(tb&&a.forEach===tb)a.forEach(b,c);else if(a.length===+a.length)for(var e=0,f=a.length;e<
f&&!(e in a&&b.call(c,a[e],e,a)===Oa);e++);else for(e in a)if(sa.call(a,e)&&b.call(c,a[e],e,a)===Oa)break};d.extend=function(a){d.g(aa.call(arguments,1),function(b){for(var c in b)void 0!==b[c]&&(a[c]=b[c])});return a};d.isArray=Xb||function(a){return"[object Array]"===ka.call(a)};d.qb=function(a){try{return/^\s*\bfunction\b/.test(a)}catch(b){return!1}};d.Ud=function(a){return!(!a||!sa.call(a,"callee"))};d.ca=function(a){return a?a.ca?a.ca():d.isArray(a)||d.Ud(a)?aa.call(a):d.values(a):[]};d.map=
function(a,b,c){if(vb&&a.map===vb)return a.map(b,c);var e=[];d.g(a,function(f){e.push(b.call(c,f))});return e};d.keys=function(a){var b=[];if(null===a)return b;d.g(a,function(c,e){b[b.length]=e});return b};d.values=function(a){var b=[];if(null===a)return b;d.g(a,function(c){b[b.length]=c});return b};d.ob=function(a,b){var c=!1;if(null===a)return c;if(ub&&a.indexOf===ub)return-1!=a.indexOf(b);d.g(a,function(e){if(c||(c=e===b))return Oa});return c};d.includes=function(a,b){return-1!==a.indexOf(b)};
d.pc=function(a,b){a.prototype=new b;a.prototype.constructor=a;a.He=b.prototype};d.j=function(a){return a===Object(a)&&!d.isArray(a)};d.Ja=function(a){if(d.j(a)){for(var b in a)if(sa.call(a,b))return!1;return!0}return!1};d.l=function(a){return void 0===a};d.rb=function(a){return"[object String]"==ka.call(a)};d.Vd=function(a){return"[object Date]"==ka.call(a)};d.sc=function(a){return"[object Number]"==ka.call(a)};d.Wd=function(a){return!(!a||1!==a.nodeType)};d.gb=function(a){d.g(a,function(b,c){d.Vd(b)?
a[c]=d.Fd(b):d.j(b)&&(a[c]=d.gb(b))});return a};d.timestamp=function(){Date.now=Date.now||function(){return+new Date};return Date.now()};d.Fd=function(a){function b(c){return 10>c?"0"+c:c}return a.getUTCFullYear()+"-"+b(a.getUTCMonth()+1)+"-"+b(a.getUTCDate())+"T"+b(a.getUTCHours())+":"+b(a.getUTCMinutes())+":"+b(a.getUTCSeconds())};d.ba=function(a){var b={};d.g(a,function(c,e){d.rb(c)&&0<c.length&&(b[e]=c)});return b};d.truncate=function(a,b){if("string"===typeof a)var c=a.slice(0,b);else d.isArray(a)?
(c=[],d.g(a,function(e){c.push(d.truncate(e,b))})):d.j(a)?(c={},d.g(a,function(e,f){c[f]=d.truncate(e,b)})):c=a;return c};d.Gb=function(){return function(a){function b(e,f){var g="";var k="";var h=g;(f=f[e])&&"object"===typeof f&&"function"===typeof f.toJSON&&(f=f.toJSON(e));switch(typeof f){case "string":return c(f);case "number":return isFinite(f)?String(f):"null";case "boolean":case "null":return String(f);case "object":if(!f)return"null";g+=" ";e=[];if("[object Array]"===ka.apply(f)){var p=
f.length;for(k=0;k<p;k+=1)e[k]=b(k,f)||"null";return p=0===e.length?"[]":g?"[\n"+g+e.join(",\n"+g)+"\n"+h+"]":"["+e.join(",")+"]"}for(k in f)sa.call(f,k)&&(p=b(k,f))&&e.push(c(k)+(g?": ":":")+p);return p=0===e.length?"{}":g?"{"+e.join(",")+h+"}":"{"+e.join(",")+"}"}}function c(e){var f=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,g={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};f.lastIndex=
0;return f.test(e)?'"'+e.replace(f,function(k){var h=g[k];return"string"===typeof h?h:"\\u"+("0000"+k.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}return b("",{"":a})}}();d.ea=function(){function a(){switch(h){case "t":return f("t"),f("r"),f("u"),f("e"),!0;case "f":return f("f"),f("a"),f("l"),f("s"),f("e"),!1;case "n":return f("n"),f("u"),f("l"),f("l"),null}g('Unexpected "'+h+'"')}function b(){for(;h&&" ">=h;)f()}function c(){var m,t="",w;if('"'===h)for(;f();){if('"'===h)return f(),t;if("\\"===
h)if(f(),"u"===h){for(m=w=0;4>m;m+=1){var u=parseInt(f(),16);if(!isFinite(u))break;w=16*w+u}t+=String.fromCharCode(w)}else if("string"===typeof p[h])t+=p[h];else break;else t+=h}g("Bad string")}function e(){var m="";"-"===h&&(m="-",f("-"));for(;"0"<=h&&"9">=h;)m+=h,f();if("."===h)for(m+=".";f()&&"0"<=h&&"9">=h;)m+=h;if("e"===h||"E"===h){m+=h;f();if("-"===h||"+"===h)m+=h,f();for(;"0"<=h&&"9">=h;)m+=h,f()}m=+m;if(isFinite(m))return m;g("Bad number")}function f(m){m&&m!==h&&g("Expected '"+m+"' instead of '"+
h+"'");h=q.charAt(k);k+=1;return h}function g(m){m=new SyntaxError(m);m.Ve=k;m.text=q;throw m;}var k,h,p={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},q;var n=function(){b();switch(h){case "{":a:{var m={};if("{"===h){f("{");b();if("}"===h){f("}");var t=m;break a}for(;h;){t=c();b();f(":");Object.hasOwnProperty.call(m,t)&&g('Duplicate key "'+t+'"');m[t]=n();b();if("}"===h){f("}");t=m;break a}f(",");b()}}g("Bad object");t=void 0}return t;case "[":a:{t=[];if("["===h){f("[");b();if("]"===
h){f("]");break a}for(;h;){t.push(n());b();if("]"===h){f("]");break a}f(",");b()}}g("Bad array");t=void 0}return t;case '"':return c();case "-":return e();default:return"0"<=h&&"9">=h?e():a()}};return function(m){q=m;k=0;h=" ";m=n();b();h&&g("Syntax error");return m}}();d.pd=function(a){var b=0,c=0,e=[];if(!a)return a;a=d.Ue(a);do{var f=a.charCodeAt(b++);var g=a.charCodeAt(b++);var k=a.charCodeAt(b++);var h=f<<16|g<<8|k;f=h>>18&63;g=h>>12&63;k=h>>6&63;h&=63;e[c++]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(f)+
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(g)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(k)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h)}while(b<a.length);b=e.join("");switch(a.length%3){case 1:b=b.slice(0,-2)+"==";break;case 2:b=b.slice(0,-1)+"="}return b};d.Ue=function(a){a=(a+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n");var b="",c,e;var f=c=0;var g=a.length;for(e=0;e<g;e++){var k=a.charCodeAt(e),h=
null;128>k?c++:h=127<k&&2048>k?String.fromCharCode(k>>6|192,k&63|128):String.fromCharCode(k>>12|224,k>>6&63|128,k&63|128);null!==h&&(c>f&&(b+=a.substring(f,c)),b+=h,f=c=e+1)}c>f&&(b+=a.substring(f,a.length));return b};d.Pa=function(){try{return r.crypto.randomUUID()}catch(c){for(var a=Array(36),b=0;36>b;b++)a[b]=Math.floor(16*Math.random());a[14]=4;a[19]=a[19]&=-5;a[19]=a[19]|=8;a[8]=a[13]=a[18]=a[23]="-";return d.map(a,function(e){return e.toString(16)}).join("")}};var wb="ahrefsbot;ahrefssiteaudit;amazonbot;baiduspider;bingbot;bingpreview;chrome-lighthouse;facebookexternal;petalbot;pinterest;screaming frog;yahoo! slurp;yandex;adsbot-google;apis-google;duplexweb-google;feedfetcher-google;google favicon;google web preview;google-read-aloud;googlebot;googleweblight;mediapartners-google;storebot-google".split(";");
d.qc=function(a){var b;a=a.toLowerCase();for(b=0;b<wb.length;b++)if(-1!==a.indexOf(wb[b]))return!0;return!1};d.Fb=function(a){var b,c,e,f=[];d.l(b)&&(b="&");d.g(a,function(g,k){c=encodeURIComponent(g.toString());e=encodeURIComponent(k);f[f.length]=e+"="+c});return f.join(b)};d.mb=function(a,b){b=b.replace(/[[]/g,"\\[").replace(/[\]]/g,"\\]");a=(new RegExp("[\\?&]"+b+"=([^&#]*)")).exec(a);if(null===a||a&&"string"!==typeof a[1]&&a[1].length)return"";a=a[1];try{a=decodeURIComponent(a)}catch(c){z.error("Skipping decoding for malformed query param: "+
a)}return a.replace(/\+/g," ")};d.cookie={get:function(a){a+="=";for(var b=A.cookie.split(";"),c=0;c<b.length;c++){for(var e=b[c];" "==e.charAt(0);)e=e.substring(1,e.length);if(0===e.indexOf(a))return decodeURIComponent(e.substring(a.length,e.length))}return null},parse:function(a){try{var b=d.ea(d.cookie.get(a))||{}}catch(c){}return b},$e:function(a,b,c,e,f,g,k){var h="",p="",q="";k?h="; domain="+k:e&&(h=(h=Xa(A.location.hostname))?"; domain=."+h:"");c&&(p=new Date,p.setTime(p.getTime()+1E3*c),p=
"; expires="+p.toGMTString());g&&(f=!0,q="; SameSite=None");f&&(q+="; secure");A.cookie=a+"="+encodeURIComponent(b)+p+"; path=/"+h+q},set:function(a,b,c,e,f,g,k){var h="",p="",q="";k?h="; domain="+k:e&&(h=(h=Xa(A.location.hostname))?"; domain=."+h:"");c&&(p=new Date,p.setTime(p.getTime()+864E5*c),p="; expires="+p.toGMTString());g&&(f=!0,q="; SameSite=None");f&&(q+="; secure");a=a+"="+encodeURIComponent(b)+p+"; path=/"+h+q;return A.cookie=a},remove:function(a,b,c){d.cookie.set(a,"",-1,b,!1,!1,c)}};
var Aa=null,Pa=null;d.localStorage=eb(r.localStorage,"localStorage",oa);d.sessionStorage=eb(r.sessionStorage,"sessionStorage",function(a,b){return null===Pa||b?Pa=Ya(a||r.sessionStorage):Pa});d.Ec=function(){function a(c,e,f){return function(g){if(g=g||b(r.event)){var k=!0,h;d.qb(f)&&(h=f(g));g=e.call(c,g);if(!1===h||!1===g)k=!1;return k}}}function b(c){c&&(c.preventDefault=b.preventDefault,c.stopPropagation=b.stopPropagation);return c}b.preventDefault=function(){this.returnValue=!1};b.stopPropagation=
function(){this.cancelBubble=!0};return function(c,e,f,g,k){c?c.addEventListener&&!g?c.addEventListener(e,f,!!k):(e="on"+e,c[e]=a(c,f,c[e])):z.error("No valid element provided to register_event")}}();var Yb=/^(\w*)\[(\w+)([=~\|\^\$\*]?)=?"?([^\]"]*)"?\]$/;d.zd=function(){function a(f){return f.all?f.all:f.getElementsByTagName("*")}function b(f,g){g=" "+g+" ";return 0<=(" "+f.className+" ").replace(e," ").indexOf(g)}function c(f){if(!A.getElementsByTagName)return[];f=f.split(" ");var g,k,h,p,q=[A];
for(k=0;k<f.length;k++){var n=f[k].replace(/^\s+/,"").replace(/\s+$/,"");if(-1<n.indexOf("#")){var m=n.split("#");n=m[0];q=A.getElementById(m[1]);if(!q||n&&q.nodeName.toLowerCase()!=n)return[];q=[q]}else if(-1<n.indexOf(".")){m=n.split(".");n=m[0];var t=m[1];n||(n="*");m=[];for(h=g=0;h<q.length;h++){var w="*"==n?a(q[h]):q[h].getElementsByTagName(n);for(p=0;p<w.length;p++)m[g++]=w[p]}q=[];for(h=n=0;h<m.length;h++)m[h].className&&d.rb(m[h].className)&&b(m[h],t)&&(q[n++]=m[h])}else if(m=n.match(Yb)){n=
m[1];var u=m[2];t=m[3];var G=m[4];n||(n="*");m=[];for(h=g=0;h<q.length;h++)for(w="*"==n?a(q[h]):q[h].getElementsByTagName(n),p=0;p<w.length;p++)m[g++]=w[p];q=[];n=0;switch(t){case "=":t=function(v){return v.getAttribute(u)==G};break;case "~":t=function(v){return v.getAttribute(u).match(new RegExp("\\b"+G+"\\b"))};break;case "|":t=function(v){return v.getAttribute(u).match(new RegExp("^"+G+"-?"))};break;case "^":t=function(v){return 0===v.getAttribute(u).indexOf(G)};break;case "$":t=function(v){return v.getAttribute(u).lastIndexOf(G)==
v.getAttribute(u).length-G.length};break;case "*":t=function(v){return-1<v.getAttribute(u).indexOf(G)};break;default:t=function(v){return v.getAttribute(u)}}q=[];for(h=n=0;h<m.length;h++)t(m[h])&&(q[n++]=m[h])}else{m=[];for(h=g=0;h<q.length;h++)for(w=q[h].getElementsByTagName(n),p=0;p<w.length;p++)m[g++]=w[p];q=m}}return q}var e=/[\t\r\n]/g;return function(f){return d.Wd(f)?[f]:d.j(f)&&!d.l(f.length)?f:c.call(this,f)}}();var Zb="utm_source utm_medium utm_campaign utm_content utm_term utm_id utm_source_platform utm_campaign_id utm_creative_format utm_marketing_tactic".split(" "),
$b="dclid fbclid gclid ko_click_id li_fat_id msclkid sccid ttclid twclid wbraid".split(" ");d.info={ka:function(a){var b="",c={};d.g(Zb,function(e){b=d.mb(A.URL,e);b.length?c[e]=b:void 0!==a&&(c[e]=a)});return c},Wb:function(){var a="",b={};d.g($b,function(c){a=d.mb(A.URL,c);a.length&&(b[c]=a)});return b},ee:function(){return d.extend(d.info.ka(),d.info.Wb())},oe:function(a){return 0===a.search("https?://(.*)google.([^/?]*)")?"google":0===a.search("https?://(.*)bing.com")?"bing":0===a.search("https?://(.*)yahoo.com")?
"yahoo":0===a.search("https?://(.*)duckduckgo.com")?"duckduckgo":null},pe:function(a){var b=d.info.oe(a),c={};null!==b&&(c.$search_engine=b,a=d.mb(a,"yahoo"!=b?"q":"p"),a.length&&(c.mp_keyword=a));return c},Aa:function(a,b,c){b=b||"";return c||d.includes(a," OPR/")?d.includes(a,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(a)?"BlackBerry":d.includes(a,"IEMobile")||d.includes(a,"WPDesktop")?"Internet Explorer Mobile":d.includes(a,"SamsungBrowser/")?"Samsung Internet":d.includes(a,
"Edge")||d.includes(a,"Edg/")?"Microsoft Edge":d.includes(a,"FBIOS")?"Facebook Mobile":d.includes(a,"Chrome")?"Chrome":d.includes(a,"CriOS")?"Chrome iOS":d.includes(a,"UCWEB")||d.includes(a,"UCBrowser")?"UC Browser":d.includes(a,"FxiOS")?"Firefox iOS":d.includes(b,"Apple")?d.includes(a,"Mobile")?"Mobile Safari":"Safari":d.includes(a,"Android")?"Android Mobile":d.includes(a,"Konqueror")?"Konqueror":d.includes(a,"Firefox")?"Firefox":d.includes(a,"MSIE")||d.includes(a,"Trident/")?"Internet Explorer":
d.includes(a,"Gecko")?"Mozilla":""},cb: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+)?)/,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+)?)/}[d.info.Aa(a,b,c)];return void 0===b?null:(a=a.match(b))?parseFloat(a[a.length-2]):null},wc:function(){return/Windows/i.test(H)?/Phone/.test(H)||/WPDesktop/.test(H)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(H)?"iOS":/Android/.test(H)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(H)?"BlackBerry":/Mac/i.test(H)?"Mac OS X":/Linux/.test(H)?
"Linux":/CrOS/.test(H)?"Chrome OS":""},cc: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":""},Dc:function(a){a=a.split("/");return 3<=a.length?a[2]:""},Da:function(){return r.location.href},qa:function(a){"object"!==typeof a&&(a={});return d.extend(d.ba({$os:d.info.wc(),$browser:d.info.Aa(H,W.vendor,ta),$referrer:A.referrer,
$referring_domain:d.info.Dc(A.referrer),$device:d.info.cc(H)}),{$current_url:d.info.Da(),$browser_version:d.info.cb(H,W.vendor,ta),$screen_height:sb.height,$screen_width:sb.width,mp_lib:"web",$lib_version:"2.64.0",$insert_id:za(),time:d.timestamp()/1E3},d.ba(a))},je:function(){return d.extend(d.ba({$os:d.info.wc(),$browser:d.info.Aa(H,W.vendor,ta)}),{$browser_version:d.info.cb(H,W.vendor,ta)})},fe:function(){return d.ba({current_page_title:A.title,current_domain:r.location.hostname,current_url_path:r.location.pathname,
current_url_protocol:r.location.protocol,current_url_search:r.location.search})}};var Jb=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,Ib=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,da=null,ua=null;"undefined"!==typeof JSON&&(da=JSON.stringify,ua=JSON.parse);da=da||d.Gb;ua=ua||d.ea;d.info=d.info;d.info.browser=d.info.Aa;d.info.browserVersion=d.info.cb;d.info.device=d.info.cc;d.info.properties=d.info.qa;d.isBlockedUA=d.qc;d.isEmptyObject=d.Ja;d.isObject=d.j;d.JSONDecode=d.ea;d.JSONEncode=d.Gb;d.toArray=d.ca;d.NPO=U;var Qb=
"clientX clientY offsetX offsetY pageX pageY screenX screenY x y".split(" "),jb=["mp-include"],Ja=["mp-no-track"],ib=Ja.concat(["mp-sensitive"]),Nb="aria-label aria-labelledby aria-describedby href name role title type".split(" "),I=ia("autocapture"),xb={allow_selectors:[],allow_url_regexes:[],block_attrs:[],block_element_callback:null,block_selectors:[],block_url_regexes:[],capture_extra_attrs:[],capture_text_content:!1,scroll_capture_all:!1,scroll_depth_percent_checkpoints:[25,50,75,100],click:!0,
input:!0,pageview:"full-url",scroll:!0,submit:!0},va={$mp_autocapture:!0};J.prototype.B=function(){try{var a=!!A.createElement("div").matches}catch(b){a=!1}a?(this.Qd(),this.Od(),this.Pd(),this.Rd(),this.Sd()):I.u("Autocapture unavailable: missing required DOM APIs")};J.prototype.lb=function(){var a=this.A.h("autocapture");return a?d.j(a)?d.extend({},xb,a):xb:{}};J.prototype.o=function(a){return this.lb()[a]};J.prototype.Ea=function(){var a,b=d.info.Da(),c=this.o("allow_url_regexes")||[];if(c.length){var e=
!1;for(a=0;a<c.length;a++){var f=c[a];try{if(b.match(f)){e=!0;break}}catch(g){return I.u("Error while checking block URL regex: "+f,g),!0}}if(!e)return!0}c=this.o("block_url_regexes")||[];if(!c||!c.length)return!1;for(a=0;a<c.length;a++)try{if(b.match(c[a]))return!0}catch(g){return I.u("Error while checking block URL regex: "+c[a],g),!0}return!1};J.prototype.yc=function(){return this.A.h("autocapture")?this.o("pageview"):this.A.h("track_pageview")};J.prototype.Ab=function(a,b){!this.Ea()&&(a=Ob(a,
{md:this.o("allow_element_callback"),nd:this.o("allow_selectors"),qd:this.o("block_attrs"),rd:this.o("block_element_callback"),sd:this.o("block_selectors"),ud:this.o("capture_extra_attrs"),vd:this.o("capture_text_content"),wd:"$mp_click"===b&&!this.o("click")&&this.A.tc()}))&&(d.extend(a,va),this.A.track(b,a))};J.prototype.Od=function(){r.removeEventListener("click",this.Zd);if(this.o("click")||this.A.h("record_heatmap_data"))I.log("Initializing click tracking"),this.Zd=r.addEventListener("click",
function(a){(this.o("click")||this.A.tc())&&this.Ab(a,"$mp_click")}.bind(this))};J.prototype.Pd=function(){r.removeEventListener("change",this.Yd);this.o("input")&&(I.log("Initializing input tracking"),this.Yd=r.addEventListener("change",function(a){this.o("input")&&this.Ab(a,"$mp_input_change")}.bind(this)))};J.prototype.Qd=function(){r.removeEventListener("popstate",this.be);r.removeEventListener("hashchange",this.$d);r.removeEventListener("mp_locationchange",this.ae);if(this.yc()){I.log("Initializing pageview tracking");
var a="",b=!1;this.Ea()||(b=this.A.Bb(va));b&&(a=d.info.Da());this.be=r.addEventListener("popstate",function(){r.dispatchEvent(new Event("mp_locationchange"))});this.$d=r.addEventListener("hashchange",function(){r.dispatchEvent(new Event("mp_locationchange"))});var c=r.history.pushState;"function"===typeof c&&(r.history.pushState=function(f,g,k){c.call(r.history,f,g,k);r.dispatchEvent(new Event("mp_locationchange"))});var e=r.history.replaceState;"function"===typeof e&&(r.history.replaceState=function(f,
g,k){e.call(r.history,f,g,k);r.dispatchEvent(new Event("mp_locationchange"))});this.ae=r.addEventListener("mp_locationchange",Ba(function(){if(!this.Ea()){var f=d.info.Da(),g=!1,k=f.split("#")[0].split("?")[0]!==a.split("#")[0].split("?")[0],h=this.yc();"full-url"===h?g=f!==a:"url-with-path-and-query-string"===h?g=f.split("#")[0]!==a.split("#")[0]:"url-with-path"===h&&(g=k);g&&(this.A.Bb(va)&&(a=f),k&&(this.Ka=0,I.log("Path change: re-initializing scroll depth checkpoints")))}}.bind(this)))}};J.prototype.Rd=
function(){r.removeEventListener("scrollend",this.ce);this.o("scroll")&&(I.log("Initializing scroll tracking"),this.Ka=0,this.ce=r.addEventListener("scrollend",Ba(function(){if(this.o("scroll")&&!this.Ea()){var a=this.o("scroll_capture_all"),b=(this.o("scroll_depth_percent_checkpoints")||[]).slice().sort(function(h,p){return h-p}),c=r.scrollY,e=d.extend({$scroll_top:c},va);try{var f=A.body.scrollHeight,g=Math.round(c/(f-r.innerHeight)*100);e.$scroll_height=f;e.$scroll_percentage=g;if(g>this.Ka)for(c=
0;c<b.length;c++){var k=b[c];g>=k&&this.Ka<k&&(this.Ka=e.$scroll_checkpoint=k,a=!0)}}catch(h){I.u("Error while calculating scroll percentage",h)}a&&this.A.track("$mp_scroll",e)}}.bind(this))))};J.prototype.Sd=function(){r.removeEventListener("submit",this.de);this.o("submit")&&(I.log("Initializing submit tracking"),this.de=r.addEventListener("submit",function(a){this.o("submit")&&this.Ab(a,"$mp_submit")}.bind(this)))};Za(J);var ac=r.fetch,N=ia("flags"),yb={context:{}};B.prototype.B=function(){ac&&
"undefined"!==typeof Promise&&"undefined"!==typeof Map&&"undefined"!==typeof Set?(this.flags=null,this.dc(),this.Uc=new Set):N.u("Feature Flags unavailable: missing minimum required APIs")};B.prototype.lb=function(){var a=this.la("flags");return a?d.j(a)?d.extend({},yb,a):yb:{}};B.prototype.o=function(a){return this.lb()[a]};B.prototype.isEnabled=function(){return!!this.la("flags")};B.prototype.Sb=function(){this.isEnabled()||N.error("Feature Flags not enabled");return!!this.flags};B.prototype.dc=
function(){if(this.isEnabled()){var a=this.Hd();N.log("Fetching flags for distinct ID: "+a);a={context:d.extend({distinct_id:a},this.o("context"))};this.ec=r.fetch(this.la("api_host")+"/"+this.la("api_routes").flags,{method:"POST",headers:{Authorization:"Basic "+btoa(this.la("token")+":"),"Content-Type":"application/octet-stream"},body:JSON.stringify(a)}).then(function(b){return b.json().then(function(c){c=c.flags;if(!c)throw Error("No flags in API response");var e=new Map;d.g(c,function(f,g){e.set(g,
{key:f.variant_key,data:f.variant_value})});this.flags=e}.bind(this)).catch(function(c){N.error(c)})}.bind(this)).catch(function(){})}};B.prototype.getFeature=function(a,b){return this.ec?this.ec.then(function(){return this.kb(a,b)}.bind(this)).catch(function(c){N.error(c);return b}):new Promise(function(c){N.u("Feature Flags not initialized");c(b)})};B.prototype.kb=function(a,b){if(!this.Sb())return N.log("Flags not loaded yet"),b;var c=this.flags.get(a);if(!c)return N.log('No flag found: "'+a+'"'),
b;this.Me(a,c);return c};B.prototype.hc=function(a,b){return this.getFeature(a,{data:b}).then(function(c){return c.data}).catch(function(c){N.error(c);return b})};B.prototype.ic=function(a,b){return this.kb(a,{data:b}).data};B.prototype.Xd=function(a,b){return this.hc(a).then(function(){return this.rc(a,b)}.bind(this)).catch(function(c){N.error(c);return b})};B.prototype.rc=function(a,b){b=b||!1;var c=this.ic(a,b);!0!==c&&!1!==c&&(N.error('Feature flag "'+a+'" value: '+c+" is not a boolean; returning fallback value: "+
b),c=b);return c};B.prototype.Me=function(a,b){this.Uc.has(a)||(this.Uc.add(a),this.track("$experiment_started",{"Experiment name":a,"Variant name":b.key,$experiment_type:"feature_flag"}))};Za(B);B.prototype.are_features_ready=B.prototype.Sb;B.prototype.get_feature=B.prototype.getFeature;B.prototype.get_feature_data=B.prototype.hc;B.prototype.get_feature_data_sync=B.prototype.ic;B.prototype.get_feature_sync=B.prototype.kb;B.prototype.is_feature_enabled=B.prototype.Xd;B.prototype.is_feature_enabled_sync=
B.prototype.rc;Q.prototype.Ca=function(){};Q.prototype.ib=function(){};Q.prototype.$a=function(){};Q.prototype.B=function(a){this.A=a;return this};Q.prototype.track=function(a,b,c,e){var f=this,g=d.zd(a);if(0===g.length)z.error("The DOM query ("+a+") returned 0 elements");else return d.g(g,function(k){d.Ec(k,this.xc,function(h){var p={},q=f.Ca(c,this),n=f.A.h("track_links_timeout");f.ib(h,this,p);window.setTimeout(f.Tc(e,q,p,!0),n);f.A.track(b,q,f.Tc(e,q,p))})},this),!0};Q.prototype.Tc=function(a,
b,c,e){e=e||!1;var f=this;return function(){c.td||(c.td=!0,a&&!1===a(e,b)||f.$a(c))}};Q.prototype.Ca=function(a,b){return"function"===typeof a?a(b):d.extend({},a)};d.pc(ba,Q);ba.prototype.Ca=function(a,b){var c=ba.He.Ca.apply(this,arguments);b.href&&(c.url=b.href);return c};ba.prototype.ib=function(a,b,c){c.uc=2===a.which||a.metaKey||a.ctrlKey||"_blank"===b.target;c.href=b.href;c.uc||a.preventDefault()};ba.prototype.$a=function(a){a.uc||setTimeout(function(){window.location=a.href},0)};d.pc(na,Q);
na.prototype.ib=function(a,b,c){c.element=b;a.preventDefault()};na.prototype.$a=function(a){setTimeout(function(){a.element.submit()},0)};var bc=ia("lock");Va.prototype.Eb=function(a,b){return new this.Cc(d.bind(function(c,e){function f(){function K(){u.removeItem(M);u.getItem(v)===q&&u.removeItem(v);u.getItem(G)===q&&u.removeItem(G)}u.setItem(M,"1");a().then(function(X){K();c(X)}).catch(function(X){K();e(X)})}function g(){u.setItem(G,q);h(k,function(){u.getItem(G)===q?f():p(function(){u.getItem(v)!==
q?g():h(function(){return!u.getItem(M)},f)})})}function k(){var K=u.getItem(v);if(K&&K!==q)return!1;u.setItem(v,q);if(u.getItem(v)===q)return!0;oa(u,!0)||e(Error("localStorage support dropped while acquiring lock"));return!1}function h(K,X){K()?X():p(function(){h(K,X)})}function p(K){(new Date).getTime()-n>w?(bc.error("Timeout waiting for mutex on "+m+"; clearing lock. ["+q+"]"),u.removeItem(M),u.removeItem(v),g()):setTimeout(function(){try{K()}catch(X){e(X)}},t*(Math.random()+.1))}var q=b||(new Date).getTime()+
"|"+Math.random(),n=(new Date).getTime(),m=this.aa,t=this.Bc,w=this.zb,u=this.storage,G=m+":X",v=m+":Y",M=m+":Z";try{if(oa(u,!0))g();else throw Error("localStorage support check failed");}catch(K){e(K)}},this))};fa.prototype.B=function(){return D.resolve()};fa.prototype.setItem=function(a,b){return new D(d.bind(function(c,e){try{this.storage.setItem(a,da(b))}catch(f){e(f)}c()},this))};fa.prototype.getItem=function(a){return new D(d.bind(function(b,c){try{var e=ua(this.storage.getItem(a))}catch(f){c(f)}b(e)},
this))};fa.prototype.removeItem=function(a){return new D(d.bind(function(b,c){try{this.storage.removeItem(a)}catch(e){c(e)}b()},this))};var Wa=ia("batch");O.prototype.U=function(){return this.pb?D.resolve():this.R.B().then(d.bind(function(){this.pb=!0},this)).catch(d.bind(function(a){this.m("Error initializing queue persistence. Disabling persistence",a);this.pb=!0;this.F=!1},this))};O.prototype.enqueue=function(a,b){a={id:za(),flushAfter:(new Date).getTime()+2*b,payload:a};if(this.F)return this.Bd(a);
this.K.push(a);return D.resolve(!0)};O.prototype.Lb=function(a){var b=d.bind(function(){return this.U().then(d.bind(function(){return this.ta()},this)).then(d.bind(function(c){return this.vb(c.concat(a))},this)).then(d.bind(function(c){c&&(this.K=this.K.concat(a));return c},this)).catch(d.bind(function(c){this.m("Error enqueueing items",c,a);return!1},this))},this);return this.lock.Eb(b,this.Na).catch(d.bind(function(c){this.m("Error acquiring storage lock",c);return!1},this))};O.prototype.Dd=function(a){var b=
this.K.slice(0,a);return this.F&&b.length<a?this.U().then(d.bind(function(){return this.ta()},this)).then(d.bind(function(c){if(c.length){var e={};d.g(b,function(k){e[k.id]=!0});for(var f=0;f<c.length;f++){var g=c[f];if((new Date).getTime()>g.flushAfter&&!e[g.id]&&(g.he=!0,b.push(g),b.length>=a))break}}return b},this)):D.resolve(b)};O.prototype.ke=function(a){var b={};d.g(a,function(e){b[e]=!0});this.K=Ua(this.K,b);if(this.F){var c=d.bind(function(){return this.U().then(d.bind(function(){return this.ta()},
this)).then(d.bind(function(e){e=Ua(e,b);return this.vb(e)},this)).then(d.bind(function(){return this.ta()},this)).then(d.bind(function(e){for(var f=0;f<e.length;f++){var g=e[f];if(g.id&&b[g.id])throw Error("Item not removed from storage");}return!0},this)).catch(d.bind(function(e){this.m("Error removing items",e,a);return!1},this))},this);return this.lock.Eb(c,this.Na).catch(d.bind(function(e){this.m("Error acquiring storage lock",e);return oa(this.lock.storage,!0)?!1:c().then(d.bind(function(f){return f?
f:this.R.removeItem(this.aa).then(function(){return f})},this)).catch(d.bind(function(f){this.m("Error clearing queue",f);return!1},this))},this))}return D.resolve(!0)};O.prototype.Te=function(a){this.K=Ta(this.K,a);return this.F?this.lock.Eb(d.bind(function(){return this.U().then(d.bind(function(){return this.ta()},this)).then(d.bind(function(b){b=Ta(b,a);return this.vb(b)},this)).catch(d.bind(function(b){this.m("Error updating items",a,b);return!1},this))},this),this.Na).catch(d.bind(function(b){this.m("Error acquiring storage lock",
b);return!1},this)):D.resolve(!0)};O.prototype.ta=function(){return this.U().then(d.bind(function(){return this.R.getItem(this.aa)},this)).then(d.bind(function(a){a&&!d.isArray(a)&&(this.m("Invalid storage entry:",a),a=null);return a||[]},this)).catch(d.bind(function(a){this.m("Error retrieving queue",a);return[]},this))};O.prototype.vb=function(a){return this.U().then(d.bind(function(){return this.R.setItem(this.aa,a)},this)).then(function(){return!0}).catch(d.bind(function(b){this.m("Error saving queue",
b);return!1},this))};O.prototype.clear=function(){this.K=[];return this.F?this.U().then(d.bind(function(){return this.R.removeItem(this.aa)},this)):D.resolve()};var la=ia("batch");L.prototype.enqueue=function(a){return this.ra.enqueue(a,this.Ga)};L.prototype.start=function(){this.stopped=!1;this.eb=0;return this.flush()};L.prototype.stop=function(){this.stopped=!0;this.yb&&(clearTimeout(this.yb),this.yb=null)};L.prototype.clear=function(){return this.ra.clear()};L.prototype.Gc=function(){this.T=this.P.batch_size};
L.prototype.Z=function(){this.Ic(this.P.batch_flush_interval_ms)};L.prototype.Ic=function(a){this.Ga=a;this.stopped||(this.yb=setTimeout(d.bind(function(){this.stopped||this.flush()},this),this.Ga))};L.prototype.te=function(a,b){return new D(d.bind(function(c){this.re(a,b,c)},this))};L.prototype.flush=function(a){if(this.ub)return la.log("Flush: Request already in progress"),D.resolve();this.ub=!0;a=a||{};var b=this.P.batch_request_timeout_ms,c=(new Date).getTime(),e=this.T;return this.ra.Dd(e).then(d.bind(function(f){var g=
f.length===e,k=[],h={};d.g(f,function(m){var t=m.payload;this.za&&!m.he&&(t=this.za(t));if(t){t.event&&t.properties&&(t.properties=d.extend({},t.properties,{mp_sent_by_lib_version:"2.64.0"}));var w=!0,u=m.id;u?5<(this.V[u]||0)&&(this.m("[dupe] item ID sent too many times, not sending",{item:m,T:f.length,Ke:this.V[u]}),w=!1):this.m("[dupe] found item with no ID",{item:m});w&&k.push(t)}h[m.id]=t},this);if(1>k.length)return this.ub=!1,this.Z(),D.resolve();var p=d.bind(function(){return this.ra.ke(d.map(f,
function(m){return m.id})).then(d.bind(function(m){d.g(f,d.bind(function(t){var w=t.id;w?(this.V[w]=this.V[w]||0,this.V[w]++,5<this.V[w]&&this.m("[dupe] item ID sent too many times",{item:t,T:f.length,Ke:this.V[w]})):this.m("[dupe] found item with no ID while removing",{item:t})},this));if(m)return this.eb=0,this.fc&&!g?(this.Z(),D.resolve()):this.flush();5<++this.eb?(this.m("Too many queue failures; disabling batching system."),this.De()):this.Z();return D.resolve()},this))},this),q=d.bind(function(m){this.ub=
!1;try{if(a.Wc)return this.ra.Te(h);if(d.j(m)&&"timeout"===m.error&&(new Date).getTime()-c>=b)return this.m("Network timeout; retrying"),this.flush();var t;if(t=d.j(m)){var w;if(!(w=500<=m.Ia||429===m.Ia)){var u;if(u=0>=m.Ia){var G=r.navigator.onLine;u=!(d.l(G)||G)}w=u}t=w||"timeout"===m.error}if(t){var v=2*this.Ga;m.Hc&&(v=1E3*parseInt(m.Hc,10)||v);v=Math.min(6E5,v);this.m("Error; retry in "+v+" ms");this.Ic(v);return D.resolve()}if(d.j(m)&&413===m.Ia){if(1<f.length)return this.T=Math.min(this.T,
Math.max(1,Math.floor(e/2)),f.length-1),this.m("413 response; reducing batch size to "+this.T),this.Z(),D.resolve();this.m("Single-event request too large; dropping",f);this.Gc()}return p()}catch(M){this.m("Error handling API response",M),this.Z()}},this),n={method:"POST",$c:!0,Nd:!0,Sc:b};a.Wc&&(n.Cb="sendBeacon");la.log("MIXPANEL REQUEST:",k);return this.te(k,n).then(q)},this)).catch(d.bind(function(f){this.m("Error flushing request queue",f);this.Z()},this))};L.prototype.m=function(a,b){la.error.apply(la.error,
arguments);if(this.X)try{b instanceof Error||(b=Error(a)),this.X(a,b)}catch(c){la.error(c)}};var zb={Kc:function(a,b){var c={},e={};d.j(a)?d.g(a,function(f,g){this.M(g)||(e[g]=f)},this):e[a]=b;c.$set=e;return c},Xc:function(a){var b={},c=[];d.isArray(a)||(a=[a]);d.g(a,function(e){this.M(e)||c.push(e)},this);b.$unset=c;return b},Nc:function(a,b){var c={},e={};d.j(a)?d.g(a,function(f,g){this.M(g)||(e[g]=f)},this):e[a]=b;c.$set_once=e;return c},Vc:function(a,b){var c={},e={};d.j(a)?d.g(a,function(f,
g){this.M(g)||(e[g]=d.isArray(f)?f:[f])},this):e[a]=d.isArray(b)?b:[b];c.$union=e;return c},od:function(a,b){var c={},e={};d.j(a)?d.g(a,function(f,g){this.M(g)||(e[g]=f)},this):e[a]=b;c.$append=e;return c},Fc:function(a,b){var c={},e={};d.j(a)?d.g(a,function(f,g){this.M(g)||(e[g]=f)},this):e[a]=b;c.$remove=e;return c},Xe:function(){return{$delete:""}}};d.extend(C.prototype,zb);C.prototype.ja=function(a,b,c){this.i=a;this.Wa=b;this.Va=c};C.prototype.set=ca(function(a,b,c){var e=this.Kc(a,b);d.j(a)&&
(c=b);return this.s(e,c)});C.prototype.$=ca(function(a,b,c){var e=this.Nc(a,b);d.j(a)&&(c=b);return this.s(e,c)});C.prototype.Oa=ca(function(a,b){a=this.Xc(a);return this.s(a,b)});C.prototype.va=ca(function(a,b,c){d.j(a)&&(c=b);a=this.Vc(a,b);return this.s(a,c)});C.prototype["delete"]=ca(function(a){return this.s({$delete:""},a)});C.prototype.remove=ca(function(a,b,c){a=this.Fc(a,b);return this.s(a,c)});C.prototype.s=function(a,b){a.$group_key=this.Wa;a.$group_id=this.Va;a.$token=this.C("token");
a=d.gb(a);return this.i.Za({type:"groups",data:a,endpoint:this.C("api_host")+"/"+this.C("api_routes").groups,bb:this.i.I.groups},b)};C.prototype.M=function(a){return"$group_key"===a||"$group_id"===a};C.prototype.C=function(a){return this.i.h(a)};C.prototype.toString=function(){return this.i.toString()+".group."+this.Wa+"."+this.Va};C.prototype.remove=C.prototype.remove;C.prototype.set=C.prototype.set;C.prototype.set_once=C.prototype.$;C.prototype.union=C.prototype.va;C.prototype.unset=C.prototype.Oa;
C.prototype.toString=C.prototype.toString;d.extend(x.prototype,zb);x.prototype.ja=function(a){this.i=a};x.prototype.set=V(function(a,b,c){var e=this.Kc(a,b);d.j(a)&&(c=b);this.C("save_referrer")&&this.i.persistence.Db(document.referrer);e.$set=d.extend({},d.info.je(),e.$set);return this.s(e,c)});x.prototype.$=V(function(a,b,c){var e=this.Nc(a,b);d.j(a)&&(c=b);return this.s(e,c)});x.prototype.Oa=V(function(a,b){a=this.Xc(a);return this.s(a,b)});x.prototype.oc=V(function(a,b,c){var e={},f={};d.j(a)?
(d.g(a,function(g,k){this.M(k)||(isNaN(parseFloat(g))?z.error("Invalid increment value passed to mixpanel.people.increment - must be a number"):f[k]=g)},this),c=b):(d.l(b)&&(b=1),f[a]=b);e.$add=f;return this.s(e,c)});x.prototype.append=V(function(a,b,c){d.j(a)&&(c=b);a=this.od(a,b);return this.s(a,c)});x.prototype.remove=V(function(a,b,c){d.j(a)&&(c=b);a=this.Fc(a,b);return this.s(a,c)});x.prototype.va=V(function(a,b,c){d.j(a)&&(c=b);a=this.Vc(a,b);return this.s(a,c)});x.prototype.Oe=V(function(a,
b,c){if(!d.sc(a)&&(a=parseFloat(a),isNaN(a))){z.error("Invalid value passed to mixpanel.people.track_charge - must be a number");return}return this.append("$transactions",d.extend({$amount:a},b),c)});x.prototype.Ub=function(a){return this.set("$transactions",[],a)};x.prototype.bc=function(){if(this.Xa()){var a={$delete:this.i.O()};return this.s(a)}z.error("mixpanel.people.delete_user() requires you to call identify() first")};x.prototype.toString=function(){return this.i.toString()+".people"};x.prototype.s=
function(a,b){a.$token=this.C("token");a.$distinct_id=this.i.O();var c=this.i.H("$device_id"),e=this.i.H("$user_id"),f=this.i.H("$had_persisted_distinct_id");c&&(a.$device_id=c);e&&(a.$user_id=e);f&&(a.$had_persisted_distinct_id=f);c=d.gb(a);return this.Xa()?this.i.Za({type:"people",data:c,endpoint:this.C("api_host")+"/"+this.C("api_routes").engage,bb:this.i.I.tb},b):(this.ed(a),d.l(b)||(this.C("verbose")?b({status:-1,error:null}):b(-1)),d.truncate(c,255))};x.prototype.C=function(a){return this.i.h(a)};
x.prototype.Xa=function(){return!0===this.i.ga.mc};x.prototype.ed=function(a){"$set"in a?this.i.persistence.G("$set",a):"$set_once"in a?this.i.persistence.G("$set_once",a):"$unset"in a?this.i.persistence.G("$unset",a):"$add"in a?this.i.persistence.G("$add",a):"$append"in a?this.i.persistence.G("$append",a):"$remove"in a?this.i.persistence.G("$remove",a):"$union"in a?this.i.persistence.G("$union",a):z.error("Invalid call to _enqueue():",a)};x.prototype.ha=function(a,b,c,e){var f=this,g=d.extend({},
this.i.persistence.oa(a)),k=g;d.l(g)||!d.j(g)||d.Ja(g)||(f.i.persistence.J(a,g),f.i.persistence.save(),e&&(k=e(g)),b.call(f,k,function(h,p){0===h&&f.i.persistence.G(a,g);d.l(c)||c(h,p)}))};x.prototype.fd=function(a,b,c,e,f,g,k){var h=this;this.ha("$set",this.set,a);this.ha("$set_once",this.$,e);this.ha("$unset",this.Oa,g,function(n){return d.keys(n)});this.ha("$add",this.oc,b);this.ha("$union",this.va,f);a=this.i.persistence.oa("$append");if(!d.l(a)&&d.isArray(a)&&a.length)for(b=function(n,m){0===
n&&h.i.persistence.G("$append",p);d.l(c)||c(n,m)},e=a.length-1;0<=e;e--){a=this.i.persistence.oa("$append");var p=a.pop();h.i.persistence.save();d.Ja(p)||h.append(p,b)}a=this.i.persistence.oa("$remove");if(!d.l(a)&&d.isArray(a)&&a.length)for(b=function(n,m){0===n&&h.i.persistence.G("$remove",q);d.l(k)||k(n,m)},e=a.length-1;0<=e;e--){a=this.i.persistence.oa("$remove");var q=a.pop();h.i.persistence.save();d.Ja(q)||h.remove(q,b)}};x.prototype.M=function(a){return"$distinct_id"===a||"$token"===a||"$device_id"===
a||"$user_id"===a||"$had_persisted_distinct_id"===a};x.prototype.set=x.prototype.set;x.prototype.set_once=x.prototype.$;x.prototype.unset=x.prototype.Oa;x.prototype.increment=x.prototype.oc;x.prototype.append=x.prototype.append;x.prototype.remove=x.prototype.remove;x.prototype.union=x.prototype.va;x.prototype.track_charge=x.prototype.Oe;x.prototype.clear_charges=x.prototype.Ub;x.prototype.delete_user=x.prototype.bc;x.prototype.toString=x.prototype.toString;var cc="__mps __mpso __mpus __mpa __mpap __mpr __mpu $people_distinct_id __alias __timers".split(" ");
y.prototype.qa=function(){var a={};this.load();d.g(this.props,function(b,c){d.ob(cc,c)||(a[c]=b)});return a};y.prototype.load=function(){if(!this.disabled){var a=this.storage.parse(this.name);a&&(this.props=d.extend({},a))}};y.prototype.upgrade=function(){if(this.storage===d.localStorage){var a=d.cookie.parse(this.name);d.cookie.remove(this.name);d.cookie.remove(this.name,!0);a&&this.L(a)}else this.storage===d.cookie&&(a=d.localStorage.parse(this.name),d.localStorage.remove(this.name),a&&this.L(a))};
y.prototype.save=function(){this.disabled||this.storage.set(this.name,da(this.props),this.jb,this.fb,this.Jc,this.$b,this.Ba)};y.prototype.La=function(a){this.load();return this.props[a]};y.prototype.remove=function(){this.storage.remove(this.name,!1,this.Ba);this.storage.remove(this.name,!0,this.Ba)};y.prototype.clear=function(){this.remove();this.props={}};y.prototype.L=function(a,b,c){return d.j(a)?("undefined"===typeof b&&(b="None"),this.jb="undefined"===typeof c?this.ac:c,this.load(),d.g(a,function(e,
f){this.props.hasOwnProperty(f)&&this.props[f]!==b||(this.props[f]=e)},this),this.save(),!0):!1};y.prototype.register=function(a,b){return d.j(a)?(this.jb="undefined"===typeof b?this.ac:b,this.load(),d.extend(this.props,a),this.save(),!0):!1};y.prototype.unregister=function(a){this.load();a in this.props&&(delete this.props[a],this.save())};y.prototype.Zc=function(a){this.register(d.info.pe(a))};y.prototype.Db=function(a){this.L({$initial_referrer:a||"$direct",$initial_referring_domain:d.info.Dc(a)||
"$direct"},"")};y.prototype.Ld=function(){return d.ba({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})};y.prototype.Yc=function(a){this.ac=this.jb=a.cookie_expiration;this.Mc(a.disable_persistence);this.ve(a.cookie_domain);this.we(a.cross_site_cookie);this.xe(a.cross_subdomain_cookie);this.Ae(a.secure_cookie)};y.prototype.Mc=function(a){(this.disabled=a)?this.remove():this.save()};y.prototype.ve=function(a){a!==this.Ba&&(this.remove(),
this.Ba=a,this.save())};y.prototype.we=function(a){a!==this.$b&&(this.$b=a,this.remove(),this.save())};y.prototype.xe=function(a){a!==this.fb&&(this.fb=a,this.remove(),this.save())};y.prototype.Jd=function(){return this.fb};y.prototype.Ae=function(a){a!==this.Jc&&(this.Jc=a?!0:!1,this.remove(),this.save())};y.prototype.G=function(a,b){var c=this.xa(a);a=b[a];var e=this.S("$set"),f=this.S("$set_once"),g=this.S("$unset"),k=this.S("$add"),h=this.S("$union"),p=this.S("$remove",[]),q=this.S("$append",
[]);"__mps"===c?(d.extend(e,a),this.J("$add",a),this.J("$union",a),this.J("$unset",a)):"__mpso"===c?(d.g(a,function(n,m){m in f||(f[m]=n)}),this.J("$unset",a)):"__mpus"===c?d.g(a,function(n){d.g([e,f,k,h],function(m){n in m&&delete m[n]});d.g(q,function(m){n in m&&delete m[n]});g[n]=!0}):"__mpa"===c?(d.g(a,function(n,m){m in e?e[m]+=n:(m in k||(k[m]=0),k[m]+=n)},this),this.J("$unset",a)):"__mpu"===c?(d.g(a,function(n,m){d.isArray(n)&&(m in h||(h[m]=[]),d.g(n,function(t){d.ob(h[m],t)||h[m].push(t)}))}),
this.J("$unset",a)):"__mpr"===c?(p.push(a),this.J("$append",a)):"__mpap"===c&&(q.push(a),this.J("$unset",a));z.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):");z.log(b);this.save()};y.prototype.J=function(a,b){var c=this.props[this.xa(a)];d.l(c)||d.g(b,function(e,f){"$append"===a||"$remove"===a?d.g(c,function(g){g[f]===e&&delete g[f]}):delete c[f]},this)};y.prototype.oa=function(a){return this.La(this.xa(a))};y.prototype.xa=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";z.error("Invalid queue:",a)};y.prototype.S=function(a,b){a=this.xa(a);b=d.l(b)?{}:b;return this.props[a]||(this.props[a]=b)};y.prototype.ye=function(a){var b=(new Date).getTime(),c=this.La("__timers")||{};c[a]=b;this.props.__timers=c;this.save()};y.prototype.le=function(a){var b=(this.La("__timers")||{})[a];d.l(b)||(delete this.props.__timers[a],this.save());
return b};var dc=["mixpanelRecordingEvents","mixpanelRecordingRegistry"];T.prototype.Nb=function(){return new D(function(a,b){var c=r.indexedDB.open("mixpanelBrowserDb",1);c.onerror=function(){b(c.error)};c.onsuccess=function(){a(c.result)};c.onupgradeneeded=function(e){var f=e.target.result;dc.forEach(function(g){f.createObjectStore(g)})}})};T.prototype.B=function(){if(!r.indexedDB)return D.reject("indexedDB is not supported in this browser");this.W||(this.W=this.Nb());return this.W.then(function(a){return a instanceof
r.IDBDatabase?D.resolve():D.reject(a)})};T.prototype.Ma=function(a,b){function c(f){return new D(function(g,k){var h=f.transaction(e,a);h.oncomplete=function(){g(h)};h.onabort=h.onerror=function(){k(h.error)};b(h.objectStore(e))})}var e=this.Fe;return this.W.then(c).catch(function(f){return f&&"InvalidStateError"===f.name?(this.W=this.Nb(),this.W.then(c)):D.reject(f)}.bind(this))};T.prototype.setItem=function(a,b){return this.Ma("readwrite",function(c){c.put(b,a)})};T.prototype.getItem=function(a){var b;
return this.Ma("readonly",function(c){b=c.get(a)}).then(function(){return b.result})};T.prototype.removeItem=function(a){return this.Ma("readwrite",function(b){b.delete(a)})};T.prototype.getAll=function(){var a;return this.Ma("readonly",function(b){a=b.getAll()}).then(function(){return a.result})};var xa,E,ea=r.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,Ra=!ea&&-1===H.indexOf("MSIE")&&-1===H.indexOf("Mozilla"),wa=null;W.sendBeacon&&(wa=function(){return W.sendBeacon.apply(W,arguments)});
var Ab={track:"track/",engage:"engage/",groups:"groups/",record:"record/",flags:"flags/"},Bb={api_host:"https://api-js.mixpanel.com",api_routes:Ab,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:ha,flags:!1,persistence:"cookie",persistence_name:"",cookie_domain:"",cookie_name:"",loaded:ha,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,batch_requests:!0,batch_size:50,batch_flush_interval_ms:5E3,batch_request_timeout_ms:9E4,
batch_autostart:!0,hooks:{},record_block_class:/^(mp-block|fs-exclude|amp-block|rr-block|ph-no-capture)$/,record_block_selector:"img, video",record_canvas:!1,record_collect_fonts:!1,record_heatmap_data:!1,record_idle_timeout_ms:18E5,record_mask_text_class:/^(mp-mask|fs-mask|amp-mask|rr-mask|ph-mask)$/,record_mask_text_selector:"*",record_max_ms:864E5,record_min_ms:0,record_sessions_percent:0,recorder_src:"https://cdn.mxpnl.com/libs/mixpanel-recorder.min.js"},Qa=!1;l.prototype.B=function(a,b,c){if(d.l(c))this.v("You must name your new library: init(token, config, name)");
else if("mixpanel"===c)this.v("You must initialize the main mixpanel object right after you include the Mixpanel js snippet");else return a=ma(a,b,c),E[c]=a,a.ya(),a};l.prototype.ja=function(a,b,c){b=b||{};this.__loaded=!0;this.config={};var e={};"api_payload_format"in b||(b.api_host||Bb.api_host).match(/\.mixpanel\.com/)&&(e.api_payload_format="json");this.Lc(d.extend({},Bb,e,b,{name:c,token:a,callback_fn:("mixpanel"===c?c:"mixpanel."+c)+"._jsc"}));this._jsc=ha;this.Ra=[];this.Sa=[];this.Qa=[];this.ga=
{disable_all_events:!1,identify_called:!1};this.I={};if(this.fa=this.h("batch_requests"))if(d.localStorage.na(!0)&&ea){if(this.Td(),wa&&r.addEventListener){var f=d.bind(function(){this.I.Y.stopped||this.I.Y.flush({Wc:!0})},this);r.addEventListener("pagehide",function(g){g.persisted&&f()});r.addEventListener("visibilitychange",function(){"hidden"===A.visibilityState&&f()})}}else this.fa=!1,z.log("Turning off Mixpanel request-queueing; needs XHR and localStorage support"),d.g(this.jc(),function(g){z.log("Clearing batch queue "+
g.sa);d.localStorage.remove(g.sa)});this.persistence=this.cookie=new y(this.config);this.da={};this.gd();a=d.Pa();this.O()||this.L({distinct_id:"$device:"+a,$device_id:a},"");this.flags=new B({Gd:d.bind(this.h,this),Id:d.bind(this.O,this),Se:d.bind(this.track,this)});this.flags.B();this.flags=this.flags;this.ab=new J(this);this.ab.B();this.hd();this.Jb()};l.prototype.hd=function(){if(d.sessionStorage.na())try{var a=this.h("name")+"_"+this.h("token"),b="mp_tab_id_"+a,c="mp_gen_new_tab_id_"+a;!d.sessionStorage.get(c)&&
d.sessionStorage.get(b)||d.sessionStorage.set(b,"$tab-"+d.Pa());d.sessionStorage.set(c,"1");this.Ie=d.sessionStorage.get(b);r.addEventListener("beforeunload",function(){d.sessionStorage.remove(c)})}catch(e){this.v("Error initializing tab id",e)}else this.v("Session storage is not supported, cannot keep track of unique tab ID.")};l.prototype.lc=function(){return this.Ie||null};l.prototype.jd=function(){var a=new T("mixpanelRecordingRegistry"),b=this.lc();return a.B().then(function(){return a.getAll()}).then(function(c){for(var e=
0;e<c.length;e++){var f=c[e],g=Date.now();if(!f||g>f.maxExpires||g>f.idleExpires||c[e].tabId===b)return!0}return!1}).catch(d.bind(function(c){this.v("Error checking recording registry",c)},this))};l.prototype.Jb=Y(function(a){if(r.MutationObserver){var b=d.bind(function(e){var f=d.bind(function(){this.D=this.D||new r.__mp_recorder(this);this.D.resumeRecording(e)},this);d.l(r.__mp_recorder)?Sa(this.h("recorder_src"),f):f()},this),c=0<this.h("record_sessions_percent")&&100*Math.random()<=this.h("record_sessions_percent");
a||c?b(!0):this.jd().then(function(e){e&&b(!1)})}else z.u("Browser does not support MutationObserver; skipping session recording")});l.prototype.Ce=function(){this.Jb(!0)};l.prototype.Rc=function(){this.D&&this.D.stopRecording()};l.prototype.ie=function(){this.D&&this.D.pauseRecording()};l.prototype.ne=function(){this.D&&this.D.resumeRecording()};l.prototype.tc=function(){return this.Ua()&&this.h("record_heatmap_data")};l.prototype.kc=function(){var a={},b=this.Ua();b&&(a.$mp_replay_id=b);return a};
l.prototype.Md=function(){var a=null,b=this.Ua();b&&(a="https://mixpanel.com/projects/replay-redirect?"+d.Fb({replay_id:b,distinct_id:this.O(),token:this.h("token")}));return a};l.prototype.Ua=function(){var a=null;this.D&&(a=this.D.replayId);return a||null};l.prototype.ad=function(){return this.D};l.prototype.ya=function(){this.h("loaded")(this);this.Rb();this.people.$(this.persistence.Ld());if(this.h("store_google")&&this.h("stop_utm_persistence")){var a=d.info.ka(null);d.g(a,function(b,c){this.unregister(c)}.bind(this))}};
l.prototype.Rb=function(){this.persistence.Zc(A.referrer);this.h("store_google")&&!this.h("stop_utm_persistence")&&this.register(d.info.ka());this.h("save_referrer")&&this.persistence.Db(A.referrer)};l.prototype.dd=function(){d.g(this.Ra,function(a){this.Ya.apply(this,a)},this);this.ma()||d.g(this.Sa,function(a){this.s.apply(this,a)},this);delete this.Ra;delete this.Sa};l.prototype.Ya=function(a,b){if(this.h("img"))return this.v("You can't use DOM tracking functions with img = true."),!1;if(!Qa)return this.Ra.push([a,
b]),!1;a=(new a).B(this);return a.track.apply(a,b)};l.prototype.Ob=function(a,b){if(d.l(a))return null;if(ea)return function(g){a(g,b)};var c=this._jsc,e=""+Math.floor(1E8*Math.random()),f=this.h("callback_fn")+"["+e+"]";c[e]=function(g){delete c[e];a(g,b)};return f};l.prototype.s=function(a,b,c,e){var f=!0;if(Ra)return this.Sa.push(arguments),f;var g={method:this.h("api_method"),Cb:this.h("api_transport"),$c:this.h("verbose")},k=null;e||!d.qb(c)&&"string"!==typeof c||(e=c,c=null);c=d.extend(g,c||
{});ea||(c.method="GET");g="POST"===c.method;var h=wa&&g&&"sendbeacon"===c.Cb.toLowerCase(),p=c.$c;b.verbose&&(p=!0);this.h("test")&&(b.test=1);p&&(b.verbose=1);this.h("img")&&(b.img=1);if(!ea)if(e)b.callback=e;else if(p||this.h("test"))b.callback="(function(){})";b.ip=this.h("ip")?1:0;b._=(new Date).getTime().toString();g&&(k="data="+encodeURIComponent(b.data),delete b.data);a+="?"+d.Fb(b);var q=this;if("img"in b)k=A.createElement("img"),k.src=a,A.body.appendChild(k);else if(h){try{f=wa(a,k)}catch(w){q.v(w),
f=!1}try{e&&e(f?1:0)}catch(w){q.v(w)}}else if(ea)try{var n=new XMLHttpRequest;n.open(c.method,a,!0);var m=this.h("xhr_headers");g&&(m["Content-Type"]="application/x-www-form-urlencoded");d.g(m,function(w,u){n.setRequestHeader(u,w)});if(c.Sc&&"undefined"!==typeof n.timeout){n.timeout=c.Sc;var t=(new Date).getTime()}n.withCredentials=!0;n.onreadystatechange=function(){if(4===n.readyState)if(200===n.status){if(e)if(p){try{var w=d.ea(n.responseText)}catch(u){if(q.v(u),c.Nd)w=n.responseText;else return}e(w)}else e(Number(n.responseText))}else w=
n.timeout&&!n.status&&(new Date).getTime()-t>=n.timeout?"timeout":"Bad HTTP status: "+n.status+" "+n.statusText,q.v(w),e&&(p?e({status:0,Ia:n.status,error:w,Hc:(n.responseHeaders||{})["Retry-After"]}):e(0))};n.send(k)}catch(w){q.v(w),f=!1}else k=A.createElement("script"),k.type="text/javascript",k.async=!0,k.defer=!0,k.src=a,m=A.getElementsByTagName("script")[0],m.parentNode.insertBefore(k,m);return f};l.prototype.Ta=function(a){function b(k,h){d.g(k,function(p){if(d.isArray(p[0])){var q=h;d.g(p,
function(n){q=q[n[0]].apply(q,n.slice(1))})}else this[p[0]].apply(this,p.slice(1))},h)}var c,e=[],f=[],g=[];d.g(a,function(k){k&&(c=k[0],d.isArray(c)?g.push(k):"function"===typeof k?k.call(this):d.isArray(k)&&"alias"===c?e.push(k):d.isArray(k)&&-1!==c.indexOf("track")&&"function"===typeof this[c]?g.push(k):f.push(k))},this);b(e,this);b(f,this);b(g,this)};l.prototype.Tb=function(){return!!this.I.Y};l.prototype.jc=function(){var a="__mpq_"+this.h("token"),b=this.h("api_routes");return this.Hb=this.Hb||
{Y:{type:"events",endpoint:"/"+b.track,sa:a+"_ev"},tb:{type:"people",endpoint:"/"+b.engage,sa:a+"_pp"},groups:{type:"groups",endpoint:"/"+b.groups,sa:a+"_gr"}}};l.prototype.Td=function(){if(!this.Tb()){var a=d.bind(function(c){return new L(c.sa,{P:this.config,X:this.h("error_reporter"),se:d.bind(function(e,f,g){this.s(this.h("api_host")+c.endpoint,this.Kb(e),f,this.Ob(g,e))},this),za:d.bind(function(e){return this.Qb("before_send_"+c.type,e)},this),Ee:d.bind(this.xb,this),F:!0})},this),b=this.jc();
this.I={Y:a(b.Y),tb:a(b.tb),groups:a(b.groups)}}this.h("batch_autostart")&&this.wb()};l.prototype.wb=function(){this.bd=!0;this.Tb()&&(this.fa=!0,d.g(this.I,function(a){a.start()}))};l.prototype.xb=function(){this.fa=!1;d.g(this.I,function(a){a.stop();a.clear()})};l.prototype.push=function(a){this.Ta([a])};l.prototype.disable=function(a){"undefined"===typeof a?this.ga.yd=!0:this.Qa=this.Qa.concat(a)};l.prototype.Kb=function(a){a=da(a);"base64"===this.h("api_payload_format")&&(a=d.pd(a));return{data:a}};
l.prototype.Za=function(a,b){var c=d.truncate(a.data,255),e=a.endpoint,f=a.bb,g=a.Be,k=a.ue||{};b=b||ha;var h=!0,p=d.bind(function(){k.Qc||(c=this.Qb("before_send_"+a.type,c));return c?(z.log("MIXPANEL REQUEST:"),z.log(c),this.s(e,this.Kb(c),k,this.Ob(b,c))):null},this);this.fa&&!g?f.enqueue(c).then(function(q){q?b(1,c):p()}):h=p();return h&&c};l.prototype.track=Y(function(a,b,c,e){e||"function"!==typeof c||(e=c,c=null);c=c||{};var f=c.transport;f&&(c.Cb=f);f=c.send_immediately;"function"!==typeof e&&
(e=ha);if(d.l(a))this.v("No event name provided to mixpanel.track");else if(this.Mb(a))e(0);else{b=d.extend({},b);b.token=this.h("token");var g=this.persistence.le(a);d.l(g)||(b.$duration=parseFloat((((new Date).getTime()-g)/1E3).toFixed(3)));this.Rb();g=this.h("track_marketing")?d.info.ee():{};b=d.extend({},d.info.qa({mp_loader:this.h("mp_loader")}),g,this.persistence.qa(),this.da,this.kc(),b);g=this.h("property_blacklist");d.isArray(g)?d.g(g,function(k){delete b[k]}):this.v("Invalid value for property_blacklist config: "+
g);return this.Za({type:"events",data:{event:a,properties:b},endpoint:this.h("api_host")+"/"+this.h("api_routes").track,bb:this.I.Y,Be:f,ue:c},e)}});l.prototype.ze=Y(function(a,b,c){d.isArray(b)||(b=[b]);var e={};e[a]=b;this.register(e);return this.people.set(a,b,c)});l.prototype.kd=Y(function(a,b,c){var e=this.H(a),f={};void 0===e?(f[a]=[b],this.register(f)):-1===e.indexOf(b)&&(e.push(b),f[a]=e,this.register(f));return this.people.va(a,b,c)});l.prototype.me=Y(function(a,b,c){var e=this.H(a);if(void 0!==
e){var f=e.indexOf(b);-1<f&&(e.splice(f,1),this.register({Ye:e}));0===e.length&&this.unregister(a)}return this.people.remove(a,b,c)});l.prototype.Re=Y(function(a,b,c,e){var f=d.extend({},b||{});d.g(c,function(g,k){null!==g&&void 0!==g&&(f[k]=g)});return this.track(a,f,e)});l.prototype.cd=function(a,b){return a+"_"+JSON.stringify(b)};l.prototype.Kd=function(a,b){var c=this.cd(a,b),e=this.Ib[c];if(void 0===e||e.Wa!==a||e.Va!==b)e=new C,e.ja(this,a,b),this.Ib[c]=e;return e};l.prototype.Bb=Y(function(a,
b){"object"!==typeof a&&(a={});b=b||{};b=b.event_name||"$mp_web_page_view";var c=d.extend(d.info.fe(),d.info.ka(),d.info.Wb());a=d.extend({},c,a);return this.track(b,a)});l.prototype.Qe=function(){return this.Ya.call(this,ba,arguments)};l.prototype.Pe=function(){return this.Ya.call(this,na,arguments)};l.prototype.Je=function(a){d.l(a)?this.v("No event name provided to mixpanel.time_event"):this.Mb(a)||this.persistence.ye(a)};var Fb={persistent:!0};l.prototype.register=function(a,b){b=ya(b);b.persistent?
this.persistence.register(a,b.days):d.extend(this.da,a)};l.prototype.L=function(a,b,c){c=ya(c);c.persistent?this.persistence.L(a,b,c.days):("undefined"===typeof b&&(b="None"),d.g(a,function(e,f){this.da.hasOwnProperty(f)&&this.da[f]!==b||(this.da[f]=e)},this))};l.prototype.unregister=function(a,b){b=ya(b);b.persistent?this.persistence.unregister(a):delete this.da[a]};l.prototype.Pb=function(a,b){var c={};c[a]=b;this.register(c)};l.prototype.nb=function(a,b,c,e,f,g,k,h){var p=this.O();if(a&&p!==a){if("string"===
typeof a&&0===a.indexOf("$device:"))return this.v("distinct_id cannot have $device: prefix"),-1;this.register({$user_id:a})}this.H("$device_id")||this.L({$had_persisted_distinct_id:!0,$device_id:p},"");a!==p&&a!==this.H("__alias")&&(this.unregister("__alias"),this.register({distinct_id:a}));this.ga.mc=!0;this.people.fd(b,c,e,f,g,k,h);a!==p&&this.track("$identify",{distinct_id:a,$anon_distinct_id:p},{Qc:!0});a!==p&&this.flags.dc()};l.prototype.reset=function(){this.persistence.clear();this.ga.mc=!1;
var a=d.Pa();this.L({distinct_id:"$device:"+a,$device_id:a},"")};l.prototype.O=function(){return this.H("distinct_id")};l.prototype.ld=function(a,b){if(a===this.H("$people_distinct_id"))return this.v("Attempting to create alias for existing People user - aborting."),-2;var c=this;d.l(b)&&(b=this.O());if(a!==b)return this.Pb("__alias",a),this.track("$create_alias",{alias:a,distinct_id:b},{Qc:!0},function(){c.nb(a)});this.v("alias matches current distinct_id - skipping api call.");this.nb(a);return-1};
l.prototype.ge=function(a){this.Pb("mp_name_tag",a)};l.prototype.Lc=function(a){d.j(a)&&(d.extend(this.config,a),a.batch_size&&d.g(this.I,function(b){b.Gc()}),this.h("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.h("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.Yc(this.config),S=S||this.h("debug"),("autocapture"in a||"record_heatmap_data"in a)&&this.ab&&this.ab.B())};l.prototype.h=function(a){return this.config[a]};
l.prototype.Qb=function(a){var b=(this.config.hooks[a]||Gb).apply(this,aa.call(arguments,1));"undefined"===typeof b&&(this.v(a+" hook did not return a value"),b=null);return b};l.prototype.H=function(a){return this.persistence.La([a])};l.prototype.toString=function(){var a=this.h("name");"mixpanel"!==a&&(a="mixpanel."+a);return a};l.prototype.Mb=function(a){return d.qc(H)||this.ga.yd||d.ob(this.Qa,a)};l.prototype.gd=function(){"localStorage"===this.h("opt_out_tracking_persistence_type")&&d.localStorage.na()&&
(!this.Ha()&&this.Ha({persistence_type:"cookie"})&&this.vc({enable_persistence:!1}),!this.ma()&&this.ma({persistence_type:"cookie"})&&this.sb({clear_persistence:!1}),this.Vb({persistence_type:"cookie",enable_persistence:!1}));this.ma()?this.wa({clear_persistence:!0}):this.Ha()||!this.h("opt_out_tracking_by_default")&&!d.cookie.get("mp_optout")||(d.cookie.remove("mp_optout"),this.sb({clear_persistence:this.h("opt_out_persistence_by_default")}))};l.prototype.wa=function(a){if(a&&a.clear_persistence)a=
!0;else if(a&&a.enable_persistence)a=!1;else return;this.h("disable_persistence")||this.persistence.disabled===a||this.persistence.Mc(a);a?(this.xb(),this.Rc()):this.bd&&this.wb()};l.prototype.ia=function(a,b){b=d.extend({track:d.bind(this.track,this),persistence_type:this.h("opt_out_tracking_persistence_type"),cookie_prefix:this.h("opt_out_tracking_cookie_prefix"),cookie_expiration:this.h("cookie_expiration"),cross_site_cookie:this.h("cross_site_cookie"),cross_subdomain_cookie:this.h("cross_subdomain_cookie"),
cookie_domain:this.h("cookie_domain"),secure_cookie:this.h("secure_cookie"),ignore_dnt:this.h("ignore_dnt")},b);d.localStorage.na()||(b.persistence_type="cookie");return a(this.h("token"),{track:b.track,Le:b.track_event_name,Ne:b.track_properties,Ac:b.persistence_type,zc:b.cookie_prefix,Xb:b.cookie_domain,Yb:b.cookie_expiration,xd:b.cross_site_cookie,Zb:b.cross_subdomain_cookie,qe:b.secure_cookie,nc:b.ignore_dnt})};l.prototype.vc=function(a){a=d.extend({enable_persistence:!0},a);this.ia(Sb,a);this.wa(a)};
l.prototype.sb=function(a){a=d.extend({clear_persistence:!0,delete_user:!0},a);a.delete_user&&this.people&&this.people.Xa()&&(this.people.bc(),this.people.Ub());this.ia(Tb,a);this.wa(a)};l.prototype.Ha=function(a){return this.ia(Ub,a)};l.prototype.ma=function(a){return this.ia(mb,a)};l.prototype.Vb=function(a){a=d.extend({enable_persistence:!0},a);this.ia(Wb,a);this.wa(a)};l.prototype.v=function(a,b){z.error.apply(z.error,arguments);try{b||a instanceof Error||(a=Error(a)),this.h("error_reporter")(a,
b)}catch(c){z.error(c)}};l.prototype.init=l.prototype.B;l.prototype.reset=l.prototype.reset;l.prototype.disable=l.prototype.disable;l.prototype.time_event=l.prototype.Je;l.prototype.track=l.prototype.track;l.prototype.track_links=l.prototype.Qe;l.prototype.track_forms=l.prototype.Pe;l.prototype.track_pageview=l.prototype.Bb;l.prototype.register=l.prototype.register;l.prototype.register_once=l.prototype.L;l.prototype.unregister=l.prototype.unregister;l.prototype.identify=l.prototype.nb;l.prototype.alias=
l.prototype.ld;l.prototype.name_tag=l.prototype.ge;l.prototype.set_config=l.prototype.Lc;l.prototype.get_config=l.prototype.h;l.prototype.get_property=l.prototype.H;l.prototype.get_distinct_id=l.prototype.O;l.prototype.toString=l.prototype.toString;l.prototype.opt_out_tracking=l.prototype.sb;l.prototype.opt_in_tracking=l.prototype.vc;l.prototype.has_opted_out_tracking=l.prototype.ma;l.prototype.has_opted_in_tracking=l.prototype.Ha;l.prototype.clear_opt_in_out_tracking=l.prototype.Vb;l.prototype.get_group=
l.prototype.Kd;l.prototype.set_group=l.prototype.ze;l.prototype.add_group=l.prototype.kd;l.prototype.remove_group=l.prototype.me;l.prototype.track_with_groups=l.prototype.Re;l.prototype.start_batch_senders=l.prototype.wb;l.prototype.stop_batch_senders=l.prototype.xb;l.prototype.start_session_recording=l.prototype.Ce;l.prototype.stop_session_recording=l.prototype.Rc;l.prototype.pause_session_recording=l.prototype.ie;l.prototype.resume_session_recording=l.prototype.ne;l.prototype.get_session_recording_properties=
l.prototype.kc;l.prototype.get_session_replay_url=l.prototype.Md;l.prototype.get_tab_id=l.prototype.lc;l.prototype.DEFAULT_API_ROUTES=Ab;l.prototype.__get_recorder=l.prototype.ad;y.prototype.properties=y.prototype.qa;y.prototype.update_search_keyword=y.prototype.Zc;y.prototype.update_referrer_info=y.prototype.Db;y.prototype.get_cross_subdomain=y.prototype.Jd;y.prototype.clear=y.prototype.clear;var R={};(function(a){Sa=a;xa=1;E=r.mixpanel;d.l(E)?z.u('"mixpanel" object not initialized. Ensure you are using the latest version of the Mixpanel JS Library along with the snippet we provide.'):
E.__loaded||E.config&&E.persistence?z.u("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>(E.__SV||0)?z.u("Version mismatch; please ensure you're using the latest version of the Mixpanel code snippet."):(d.g(E._i,function(b){b&&d.isArray(b)&&(R[b[b.length-1]]=ma.apply(this,b))}),Db(),E.init(),d.g(R,function(b){b.ya()}),Cb())})(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)})})()