(function() { var k=void 0,l=!0,r=null,C=!1;function V(){return function(){}} (function(){function ub(){function a(){if(!a.pd)Ma=a.pd=l,Na=C,c.a(J,function(a){a.Tc()})}function b(){try{v.documentElement.doScroll("left")}catch(d){setTimeout(b,1);return}a()}if(v.addEventListener)"complete"===v.readyState?a():v.addEventListener("DOMContentLoaded",a,C);else if(v.attachEvent){v.attachEvent("onreadystatechange",a);var d=C;try{d=j.frameElement===r}catch(g){}v.documentElement.doScroll&&d&&b()}c.uc(j,"load",a,l)}function vb(){y.init=function(a,b,d){if(d)return y[d]||(y[d]=J[d]=ca(a, b,d),y[d].va()),y[d];d=y;if(J.mixpanel)d=J.mixpanel;else if(a)d=ca(a,b,"mixpanel"),d.va(),J.mixpanel=d;y=d;1===ta&&(j.mixpanel=y);wb()}}function wb(){c.a(J,function(a,b){"mixpanel"!==b&&(y[b]=a)});y._=c}function ua(a){a=c.g(a)?a:c.e(a)?{}:{days:a};return c.extend({},xb,a)}function ca(a,b,d){var g,f="mixpanel"===d?y:y[d];if(f&&0===ta)g=f;else{if(f&&!c.isArray(f)){s.error("You have already initialized "+d);return}g=new e}g.Fb={};g.fa(a,b,d);g.people=new n;g.people.fa(g);if(!g.c("skip_first_touch_marketing")){var a= c.info.ga(r),h={},t=C;c.a(a,function(a,b){(h["initial_"+b]=a)&&(t=l)});t&&g.people.V(h)}K=K||g.c("debug");!c.e(f)&&c.isArray(f)&&(g.Sa.call(g.people,f.people),g.Sa(f));return g}function e(){}function yb(a){return a}function Oa(a){throw Error(a+" not available in this build.");}function L(a){this.R=r;this.se=a}function o(a){this.props={};this.Ke=C;this.name=a.persistence_name?"mp_"+a.persistence_name:"mp_"+a.token+"_mixpanel";var b=a.persistence;if("cookie"!==b&&"localStorage"!==b)s.m("Unknown persistence type "+ b+"; falling back to cookie"),b=a.persistence="cookie";this.o="localStorage"===b&&c.localStorage.ia()?c.localStorage:c.cookie;this.load();this.Nc(a);this.Fe();this.save()}function n(){}function x(){}function F(a,b){this.S=b.S;this.ma=new G(a,{S:c.bind(this.h,this),K:b.K,Ec:b.Ec,Fc:b.Fc,v:b.v,Da:b.Da});this.J=b.J;this.ee=b.fe;this.wa=b.wa;this.qe=b.re;this.M=this.J.batch_size;this.Ea=this.J.batch_flush_interval_ms;this.pa=!this.J.batch_autostart;this.bb=0;this.Q={};this.ac=b.ac||C;this.Wc=r}function Pa(a, b){var d=[];c.a(a,function(a){var c=a.id;if(c in b){if(c=b[c],c!==r)a.payload=c,d.push(a)}else d.push(a)});return d}function Qa(a,b){var d=[];c.a(a,function(a){a.id&&!b[a.id]&&d.push(a)});return d}function G(a,b){b=b||{};this.W=a;if(this.v=b.v)this.K=b.K||new W,this.Ka=new Ra(a,{o:b.Ec||j.localStorage,xb:b.Fc});this.h=b.S||c.bind(Sa.error,Sa);this.Ma=b.Ma||r;this.F=[];this.mb=C;this.rd=b.Da?zb(c.bind(this.Ib,this),b.Da):c.bind(function(a){return this.Ib([a])},this)}function W(a){this.o=a||localStorage} function Ra(a,b){b=b||{};this.W=a;this.o=b.o||j.localStorage;this.rc=b.rc||100;this.xb=b.xb||2E3;this.sc=b.sc||w}function da(){this.nc="submit"}function S(){this.nc="click"}function I(){}function E(a){this.B=a}function X(){}function Ta(a){var b=Ab,d=a.split("."),d=d[d.length-1];if(4a?"0"+a:a}return a.getUTCFullYear()+"-"+b(a.getUTCMonth()+1)+"-"+b(a.getUTCDate())+"T"+b(a.getUTCHours())+":"+b(a.getUTCMinutes())+":"+b(a.getUTCSeconds())};c.X=function(a){var b={};c.a(a,function(a,g){c.ob(a)&&0=i;)f()}function d(){var a,b,d="",c;if('"'===i)for(;f();){if('"'===i)return f(),d;if("\\"===i)if(f(),"u"===i){for(b=c=0;4>b;b+=1){a=parseInt(f(),16); if(!isFinite(a))break;c=16*c+a}d+=String.fromCharCode(c)}else if("string"===typeof m[i])d+=m[i];else break;else d+=i}h("Bad string")}function c(){var a;a="";"-"===i&&(a="-",f("-"));for(;"0"<=i&&"9">=i;)a+=i,f();if("."===i)for(a+=".";f()&&"0"<=i&&"9">=i;)a+=i;if("e"===i||"E"===i){a+=i;f();if("-"===i||"+"===i)a+=i,f();for(;"0"<=i&&"9">=i;)a+=i,f()}a=+a;if(isFinite(a))return a;h("Bad number")}function f(a){a&&a!==i&&h("Expected '"+a+"' instead of '"+i+"'");i=p.charAt(e);e+=1;return i}function h(a){a= new SyntaxError(a);a.Ie=e;a.text=p;throw a;}var e,i,m={'"':'"',"\\":"\\","/":"/",b:"\u0008",f:"\u000c",n:"\n",r:"\r",t:"\t"},p,q;q=function(){b();switch(i){case "{":var e;a:{var t,m={};if("{"===i){f("{");b();if("}"===i){f("}");e=m;break a}for(;i;){t=d();b();f(":");Object.hasOwnProperty.call(m,t)&&h('Duplicate key "'+t+'"');m[t]=q();b();if("}"===i){f("}");e=m;break a}f(",");b()}}h("Bad object")}return e;case "[":a:{e=[];if("["===i){f("[");b();if("]"===i){f("]");t=e;break a}for(;i;){e.push(q());b(); if("]"===i){f("]");t=e;break a}f(",");b()}}h("Bad array")}return t;case '"':return d();case "-":return c();default:return"0"<=i&&"9">=i?c():a()}};return function(a){p=a;e=0;i=" ";a=q();b();i&&h("Syntax error");return a}}();c.ed=function(a){var b,d,g,f,h=0,e=0,i="",i=[];if(!a)return a;a=c.Ge(a);do b=a.charCodeAt(h++),d=a.charCodeAt(h++),g=a.charCodeAt(h++),f=b<<16|d<<8|g,b=f>>18&63,d=f>>12&63,g=f>>6&63,f&=63,i[e++]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(b)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(d)+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(g)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(f);while(he?c++:i=127e?String.fromCharCode(e>>6|192,e&63|128):String.fromCharCode(e>> 12|224,e>>6&63|128,e&63|128);i!==r&&(c>d&&(b+=a.substring(d,c)),b+=i,d=c=h+1)}c>d&&(b+=a.substring(d,a.length));return b};c.Oa=function(){function a(){function a(b,d){var c,g=0;for(c=0;cthis.Ia)for(d=0;d=t&&this.Ian?(Ub.error("Timeout waiting for mutex on "+u+"; clearing lock. ["+j+"]"),o.removeItem(w),o.removeItem(v), e()):setTimeout(function(){try{a()}catch(b){g(b)}},A*(Math.random()+0.1))}var j=b||(new Date).getTime()+"|"+Math.random(),q=(new Date).getTime(),u=this.W,A=this.rc,n=this.xb,o=this.o,s=u+":X",v=u+":Y",w=u+":Z";try{if(ea(o,l))e();else throw Error("localStorage support check failed");}catch(x){g(x)}},this))};W.prototype.A=function(){return w.resolve()};W.prototype.setItem=function(a,b){return new w(c.bind(function(c,g){try{this.o.setItem(a,pa(b))}catch(f){g(f)}c()},this))};W.prototype.getItem=function(a){return new w(c.bind(function(b, c){var g;try{g=qa(this.o.getItem(a))}catch(f){c(f)}b(g)},this))};W.prototype.removeItem=function(a){return new w(c.bind(function(b,c){try{this.o.removeItem(a)}catch(g){c(g)}b()},this))};var Sa=fa("batch");G.prototype.O=function(){return this.mb?w.resolve():this.K.A().then(c.bind(function(){this.mb=l},this)).catch(c.bind(function(a){this.h("Error initializing queue persistence. Disabling persistence",a);this.mb=l;this.v=C},this))};G.prototype.fb=function(a,b){var c={id:va(),flushAfter:(new Date).getTime()+ 2*b,payload:a};if(this.v)return this.rd(c);this.F.push(c);return w.resolve(l)};G.prototype.Ib=function(a){return this.Ka.Cb(c.bind(function(){return this.O().then(c.bind(function(){return this.oa()},this)).then(c.bind(function(b){return this.tb(b.concat(a))},this)).then(c.bind(function(b){if(b)this.F=this.F.concat(a);return b},this)).catch(c.bind(function(b){this.h("Error enqueueing items",b,a);return C},this))},this),this.Ma).catch(c.bind(function(a){this.h("Error acquiring storage lock",a);return C}, this))};G.prototype.td=function(a){var b=this.F.slice(0,a);return this.v&&b.lengthe.flushAfter&&!g[e.id]&&(e.Vd=l,b.push(e),b.length>=a))break}}return b},this)):w.resolve(b)};G.prototype.Yd=function(a){var b={};c.a(a,function(a){b[a]=l});this.F=Qa(this.F,b);if(this.v){var d=c.bind(function(){return this.O().then(c.bind(function(){return this.oa()}, this)).then(c.bind(function(a){a=Qa(a,b);return this.tb(a)},this)).then(c.bind(function(){return this.oa()},this)).then(c.bind(function(a){for(var c=0;ct.length)return this.sb=C,this.U(),w.resolve();var m=c.bind(function(){return this.ma.Yd(c.map(f,function(a){return a.id})).then(c.bind(function(a){c.a(f, c.bind(function(a){var b=a.id;b?(this.Q[b]=this.Q[b]||0,this.Q[b]++,5=b)return this.h("Network timeout; retrying"),this.flush();var h;if(h=c.g(e)){var t;if(!(t=500<=e.Ga)){var q;if(!(q=429===e.Ga)){var p;if(p=0>=e.Ga){var n=j.navigator.onLine;p=!(c.e(n)||n)}q=p||"timeout"===e.error}t=q}h=t}if(h){var o=2*this.Ea;e.xc&&(o=1E3*parseInt(e.xc,10)||o);o=Math.min(6E5,o);this.h("Error; retry in "+o+" ms");this.yc(o);return w.resolve()}if(c.g(e)&&413===e.Ga){if(1e.maxExpires||h>e.idleExpires||a[c].tabId===b)return l}return C}).catch(c.bind(function(a){this.l("Error checking recording registry",a)},this))};e.prototype.Gb=Q(function(a){if(j.MutationObserver){var b=c.bind(function(a){var b=c.bind(function(){this.u=this.u||new j.__mp_recorder(this);this.u.resumeRecording(a)},this);c.e(j.__mp_recorder)?Oa(this.c("recorder_src"), b):b()},this),d=0=n.timeout?"timeout":"Bad HTTP status: "+n.status+" "+n.statusText,p.l(a),e&&(m?e({status:0,Ga:n.status,error:a,xc:(n.responseHeaders||{})["Retry-After"]}):e(0))};n.send(j)}catch(x){p.l(x),f=C}else j=v.createElement("script"),j.type="text/javascript",j.async=l,j.defer=l,j.src=a,s=v.getElementsByTagName("script")[0],s.parentNode.insertBefore(j,s);return f};e.prototype.Sa=function(a){function b(a,b){c.a(a, function(a){if(c.isArray(a[0])){var d=b;c.a(a,function(a){d=d[a[0]].apply(d,a.slice(1))})}else this[a[0]].apply(this,a.slice(1))},b)}var d,e=[],f=[],h=[];c.a(a,function(a){a&&(d=a[0],c.isArray(d)?h.push(a):"function"===typeof a?a.call(this):c.isArray(a)&&"alias"===d?e.push(a):c.isArray(a)&&-1!==d.indexOf("track")&&"function"===typeof this[d]?h.push(a):f.push(a))},this);b(e,this);b(f,this);b(h,this)};e.prototype.Qb=function(){return!!this.C.T};e.prototype.bc=function(){var a="__mpq_"+this.c("token"), b=this.c("api_routes");return this.Eb=this.Eb||{T:{type:"events",N:"/"+b.track,na:a+"_ev"},qb:{type:"people",N:"/"+b.engage,na:a+"_pp"},jb:{type:"groups",N:"/"+b.groups,na:a+"_gr"}}};e.prototype.Hd=function(){if(!this.Qb()){var a=c.bind(function(a){return new F(a.na,{J:this.config,S:this.c("error_reporter"),fe:c.bind(function(b,c,e){this.k(this.c("api_host")+a.N,this.Hb(b),c,this.Mb(e,b))},this),wa:c.bind(function(b){return this.Ob("before_send_"+a.type,b)},this),re:c.bind(this.vb,this),v:l,Da:10})}, this),b=this.bc();this.C={T:a(b.T),qb:a(b.qb),jb:a(b.jb)}}this.c("batch_autostart")&&this.ub()};e.prototype.ub=function(){this.Rc=l;if(this.Qb())this.ba=l,c.a(this.C,function(a){a.start()})};e.prototype.vb=function(){this.ba=C;c.a(this.C,function(a){a.stop();a.clear()})};e.prototype.push=function(a){this.Sa([a])};e.prototype.disable=function(a){"undefined"===typeof a?this.ca.nd=l:this.Pa=this.Pa.concat(a)};e.prototype.Hb=function(a){a=c.sa(a);"base64"===this.c("api_payload_format")&&(a=c.ed(a));return{data:a}}; e.prototype.Xa=function(a,b){var d=c.truncate(a.data,255),e=a.N,f=a.$a,h=a.oe,j=a.he||{},b=b||X,i=l,m=c.bind(function(){j.Gc||(d=this.Ob("before_send_"+a.type,d));return d?(s.log("MIXPANEL REQUEST:"),s.log(d),this.k(e,this.Hb(d),j,this.Mb(b,d))):r},this);this.ba&&!h?f.fb(d).then(function(a){a?b(1,d):m()}):i=m();return i&&d};e.prototype.p=Q(function(a,b,d,e){!e&&"function"===typeof d&&(e=d,d=r);var d=d||{},f=d.transport;if(f)d.Ab=f;f=d.send_immediately;"function"!==typeof e&&(e=X);if(c.e(a))this.l("No event name provided to mixpanel.track"); else if(this.Jb(a))e(0);else{b=c.extend({},b);b.token=this.c("token");var h=this.persistence.Zd(a);c.e(h)||(b.$duration=parseFloat((((new Date).getTime()-h)/1E3).toFixed(3)));this.Pb();h=this.c("track_marketing")?c.info.Sd():{};b=c.extend({},c.info.la({mp_loader:this.c("mp_loader")}),h,this.persistence.la(),this.Z,this.cc(),b);h=this.c("property_blacklist");c.isArray(h)?c.a(h,function(a){delete b[a]}):this.l("Invalid value for property_blacklist config: "+h);return this.Xa({type:"events",data:{event:a, properties:b},N:this.c("api_host")+"/"+this.c("api_routes").track,$a:this.C.T,oe:f,he:d},e)}});e.prototype.me=Q(function(a,b,d){c.isArray(b)||(b=[b]);var e={};e[a]=b;this.q(e);return this.people.set(a,b,d)});e.prototype.$c=Q(function(a,b,c){var e=this.z(a),f={};e===k?(f[a]=[b],this.q(f)):-1===e.indexOf(b)&&(e.push(b),f[a]=e,this.q(f));return this.people.ra(a,b,c)});e.prototype.$d=Q(function(a,b,c){var e=this.z(a);if(e!==k){var f=e.indexOf(b);-1(y.__SV|| 0)?s.m("Version mismatch; please ensure you're using the latest version of the Mixpanel code snippet."):(c.a(y._i,function(a){a&&c.isArray(a)&&(J[a[a.length-1]]=ca.apply(this,a))}),vb(),y.init(),c.a(J,function(a){a.va()}),ub())})(function(a,b){var c=document.createElement("script");c.type="text/javascript";c.async=l;c.onload=b;c.src=a;document.head.appendChild(c)})})(); })();