!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="fbf1e41c-40da-4710-9a80-2a07d5f1c8fa",e._sentryDebugIdIdentifier="sentry-dbid-fbf1e41c-40da-4710-9a80-2a07d5f1c8fa")}catch(e){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"5cc39ff0a985d6f66a98410b913ec7b348ceb6f6"},(self.webpackChunkta_tipping=self.webpackChunkta_tipping||[]).push([[415],{e5e75f1889959f276f6b:e=>{var t,r={DEBUG:!1,LIB_VERSION:"2.51.0"};if("undefined"===typeof window){var i={hostname:""};t={navigator:{userAgent:""},document:{location:i,referrer:""},screen:{width:0,height:0},location:i}}else t=window;var o,n,s,a,c,p,u,_,h,l,d,f=Array.prototype,g=Function.prototype,y=Object.prototype,m=f.slice,v=y.toString,b=y.hasOwnProperty,k=t.console,w=t.navigator,x=t.document,S=t.opera,q=t.screen,E=w.userAgent,O=g.bind,I=f.forEach,D=f.indexOf,A=f.map,T=Array.isArray,B={},U={trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},$={log:function(){if(r.DEBUG&&!U.isUndefined(k)&&k)try{k.log.apply(k,arguments)}catch(e){U.each(arguments,(function(e){k.log(e)}))}},warn:function(){if(r.DEBUG&&!U.isUndefined(k)&&k){var e=["Mixpanel warning:"].concat(U.toArray(arguments));try{k.warn.apply(k,e)}catch(t){U.each(e,(function(e){k.warn(e)}))}}},error:function(){if(r.DEBUG&&!U.isUndefined(k)&&k){var e=["Mixpanel error:"].concat(U.toArray(arguments));try{k.error.apply(k,e)}catch(t){U.each(e,(function(e){k.error(e)}))}}},critical:function(){if(!U.isUndefined(k)&&k){var e=["Mixpanel error:"].concat(U.toArray(arguments));try{k.error.apply(k,e)}catch(t){U.each(e,(function(e){k.error(e)}))}}}},P=function(e,t){return function(){return arguments[0]="["+t+"] "+arguments[0],e.apply($,arguments)}},C=function(e){return{log:P($.log,e),error:P($.error,e),critical:P($.critical,e)}};U.bind=function(e,t){var r,i;if(O&&e.bind===O)return O.apply(e,m.call(arguments,1));if(!U.isFunction(e))throw new TypeError;return r=m.call(arguments,2),i=function(){if(!(this instanceof i))return e.apply(t,r.concat(m.call(arguments)));var o={};o.prototype=e.prototype;var n=new o;o.prototype=null;var s=e.apply(n,r.concat(m.call(arguments)));return Object(s)===s?s:n},i},U.each=function(e,t,r){if(null!==e&&void 0!==e)if(I&&e.forEach===I)e.forEach(t,r);else if(e.length===+e.length){for(var i=0,o=e.length;i0&&(t[r]=e)})),t},U.truncate=function(e,t){var r;return"string"===typeof e?r=e.slice(0,t):U.isArray(e)?(r=[],U.each(e,(function(e){r.push(U.truncate(e,t))}))):U.isObject(e)?(r={},U.each(e,(function(e,i){r[i]=U.truncate(e,t)}))):r=e,r},U.JSONEncode=function(e){var t=function(e){var t=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,r={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return t.lastIndex=0,t.test(e)?'"'+e.replace(t,(function(e){var t=r[e];return"string"===typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'},r=function(e,i){var o="",n=0,s="",a="",c=0,p=o,u=[],_=i[e];switch(_&&"object"===typeof _&&"function"===typeof _.toJSON&&(_=_.toJSON(e)),typeof _){case"string":return t(_);case"number":return isFinite(_)?String(_):"null";case"boolean":case"null":return String(_);case"object":if(!_)return"null";if(o+=" ",u=[],"[object Array]"===v.apply(_)){for(c=_.length,n=0;n="0"&&n<="9";)t+=n,u();if("."===n)for(t+=".";u()&&n>="0"&&n<="9";)t+=n;if("e"===n||"E"===n)for(t+=n,u(),"-"!==n&&"+"!==n||(t+=n,u());n>="0"&&n<="9";)t+=n,u();if(e=+t,isFinite(e))return e;p("Bad number")},h=function(){var e,t,r,i="";if('"'===n)for(;u();){if('"'===n)return u(),i;if("\\"===n)if(u(),"u"===n){for(r=0,t=0;t<4&&(e=parseInt(u(),16),isFinite(e));t+=1)r=16*r+e;i+=String.fromCharCode(r)}else{if("string"!==typeof c[n])break;i+=c[n]}else i+=n}p("Bad string")},l=function(){for(;n&&n<=" ";)u()},a=function(){switch(l(),n){case"{":return function(){var e,t={};if("{"===n){if(u("{"),l(),"}"===n)return u("}"),t;for(;n;){if(e=h(),l(),u(":"),Object.hasOwnProperty.call(t,e)&&p('Duplicate key "'+e+'"'),t[e]=a(),l(),"}"===n)return u("}"),t;u(","),l()}}p("Bad object")}();case"[":return function(){var e=[];if("["===n){if(u("["),l(),"]"===n)return u("]"),e;for(;n;){if(e.push(a()),l(),"]"===n)return u("]"),e;u(","),l()}}p("Bad array")}();case'"':return h();case"-":return _();default:return n>="0"&&n<="9"?_():function(){switch(n){case"t":return u("t"),u("r"),u("u"),u("e"),!0;case"f":return u("f"),u("a"),u("l"),u("s"),u("e"),!1;case"n":return u("n"),u("u"),u("l"),u("l"),null}p('Unexpected "'+n+'"')}()}},function(e){var t;return s=e,o=0,n=" ",t=a(),l(),n&&p("Syntax error"),t}),U.base64Encode=function(e){var t,r,i,o,n,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a=0,c=0,p="",u=[];if(!e)return e;e=U.utf8Encode(e);do{t=(n=e.charCodeAt(a++)<<16|e.charCodeAt(a++)<<8|e.charCodeAt(a++))>>18&63,r=n>>12&63,i=n>>6&63,o=63&n,u[c++]=s.charAt(t)+s.charAt(r)+s.charAt(i)+s.charAt(o)}while(a127&&s<2048?String.fromCharCode(s>>6|192,63&s|128):String.fromCharCode(s>>12|224,s>>6&63|128,63&s|128),null!==a&&(r>t&&(n+=e.substring(t,r)),n+=a,t=r=o+1)}return r>t&&(n+=e.substring(t,e.length)),n},U.UUID=(d=function(){var e,r=1*new Date;if(t.performance&&t.performance.now)e=t.performance.now();else for(e=0;r==1*new Date;)e++;return r.toString(16)+Math.floor(e).toString(16)},function(){var e=(q.height*q.width).toString(16);return d()+"-"+Math.random().toString(16).replace(".","")+"-"+function(){var e,t,r=E,i=[],o=0;function n(e,t){var r,o=0;for(r=0;r=4&&(o=n(o,i),i=[]);return i.length>0&&(o=n(o,i)),o.toString(16)}()+"-"+e+"-"+d()});var j=["ahrefsbot","ahrefssiteaudit","baiduspider","bingbot","bingpreview","chrome-lighthouse","facebookexternal","petalbot","pinterest","screaming frog","yahoo! slurp","yandexbot","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google"];U.isBlockedUA=function(e){var t;for(e=e.toLowerCase(),t=0;t=0}function i(t){if(!x.getElementsByTagName)return[];var i,o,n,s,a,c,p,u,_,h,l=t.split(" "),d=[x];for(c=0;c-1){n=(o=i.split("#"))[0];var f=o[1],g=x.getElementById(f);if(!g||n&&g.nodeName.toLowerCase()!=n)return[];d=[g]}else if(i.indexOf(".")>-1){n=(o=i.split("."))[0];var y=o[1];for(n||(n="*"),s=[],a=0,p=0;p-1};break;default:v=function(e){return e.getAttribute(b)}}for(d=[],h=0,p=0;p=3?t[2]:""},currentUrl:function(){return t.location.href},properties:function(e){return"object"!==typeof e&&(e={}),U.extend(U.strip_empty_properties({$os:U.info.os(),$browser:U.info.browser(E,w.vendor,S),$referrer:x.referrer,$referring_domain:U.info.referringDomain(x.referrer),$device:U.info.device(E)}),{$current_url:U.info.currentUrl(),$browser_version:U.info.browserVersion(E,w.vendor,S),$screen_height:q.height,$screen_width:q.width,mp_lib:"web",$lib_version:r.LIB_VERSION,$insert_id:z(),time:U.timestamp()/1e3},U.strip_empty_properties(e))},people_properties:function(){return U.extend(U.strip_empty_properties({$os:U.info.os(),$browser:U.info.browser(E,w.vendor,S)}),{$browser_version:U.info.browserVersion(E,w.vendor,S)})},mpPageViewProperties:function(){return U.strip_empty_properties({current_page_title:x.title,current_domain:t.location.hostname,current_url_path:t.location.pathname,current_url_protocol:t.location.protocol,current_url_search:t.location.search})}};var z=function(e){var t=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return e?t.substring(0,e):t},J=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,Q=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,H=function(e){var t=Q,r=e.split("."),i=r[r.length-1];(i.length>4||"com"===i||"org"===i)&&(t=J);var o=e.match(t);return o?o[0]:""},K=null,G=null;"undefined"!==typeof JSON&&(K=JSON.stringify,G=JSON.parse),K=K||U.JSONEncode,G=G||U.JSONDecode,U.toArray=U.toArray,U.isObject=U.isObject,U.JSONEncode=U.JSONEncode,U.JSONDecode=U.JSONDecode,U.isBlockedUA=U.isBlockedUA,U.isEmptyObject=U.isEmptyObject,U.info=U.info,U.info.device=U.info.device,U.info.browser=U.info.browser,U.info.browserVersion=U.info.browserVersion,U.info.properties=U.info.properties;var V=function(){};V.prototype.create_properties=function(){},V.prototype.event_handler=function(){},V.prototype.after_track_handler=function(){},V.prototype.init=function(e){return this.mp=e,this},V.prototype.track=function(e,t,r,i){var o=this,n=U.dom_query(e);if(0!==n.length)return U.each(n,(function(e){U.register_event(e,this.override_event,(function(e){var n={},s=o.create_properties(r,this),a=o.mp.get_config("track_links_timeout");o.event_handler(e,this,n),window.setTimeout(o.track_callback(i,s,n,!0),a),o.mp.track(t,s,o.track_callback(i,s,n))}))}),this),!0;$.error("The DOM query ("+e+") returned 0 elements")},V.prototype.track_callback=function(e,t,r,i){i=i||!1;var o=this;return function(){r.callback_fired||(r.callback_fired=!0,e&&!1===e(i,t)||o.after_track_handler(t,r,i))}},V.prototype.create_properties=function(e,t){return"function"===typeof e?e(t):U.extend({},e)};var W=function(){this.override_event="click"};U.inherit(W,V),W.prototype.create_properties=function(e,t){var r=W.superclass.create_properties.apply(this,arguments);return t.href&&(r.url=t.href),r},W.prototype.event_handler=function(e,t,r){r.new_tab=2===e.which||e.metaKey||e.ctrlKey||"_blank"===t.target,r.href=t.href,r.new_tab||e.preventDefault()},W.prototype.after_track_handler=function(e,t){t.new_tab||setTimeout((function(){window.location=t.href}),0)};var X=function(){this.override_event="submit"};U.inherit(X,V),X.prototype.event_handler=function(e,t,r){r.element=t,e.preventDefault()},X.prototype.after_track_handler=function(e,t){setTimeout((function(){t.element.submit()}),0)};var Y=C("lock"),Z=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||window.localStorage,this.pollIntervalMS=t.pollIntervalMS||100,this.timeoutMS=t.timeoutMS||2e3};Z.prototype.withLock=function(e,t,r){r||"function"===typeof t||(r=t,t=null);var i=r||(new Date).getTime()+"|"+Math.random(),o=(new Date).getTime(),n=this.storageKey,s=this.pollIntervalMS,a=this.timeoutMS,c=this.storage,p=n+":X",u=n+":Y",_=n+":Z",h=function(e){t&&t(e)},l=function(e){if((new Date).getTime()-o>a)return Y.error("Timeout waiting for mutex on "+n+"; clearing lock. ["+i+"]"),c.removeItem(_),c.removeItem(u),void g();setTimeout((function(){try{e()}catch(e){h(e)}}),s*(Math.random()+.1))},d=function(e,t){e()?t():l((function(){d(e,t)}))},f=function(){var e=c.getItem(u);if(e&&e!==i)return!1;if(c.setItem(u,i),c.getItem(u)===i)return!0;if(!N(c,!0))throw new Error("localStorage support dropped while acquiring lock");return!1},g=function(){c.setItem(p,i),d(f,(function(){c.getItem(p)!==i?l((function(){c.getItem(u)===i?d((function(){return!c.getItem(_)}),y):g()})):y()}))},y=function(){c.setItem(_,"1");try{e()}finally{c.removeItem(_),c.getItem(u)===i&&c.removeItem(u),c.getItem(p)===i&&c.removeItem(p)}};try{if(!N(c,!0))throw new Error("localStorage support check failed");g()}catch(e){h(e)}};var ee=C("batch"),te=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||window.localStorage,this.reportError=t.errorReporter||U.bind(ee.error,ee),this.lock=new Z(e,{storage:this.storage}),this.pid=t.pid||null,this.memQueue=[]};te.prototype.enqueue=function(e,t,r){var i={id:z(),flushAfter:(new Date).getTime()+2*t,payload:e};this.lock.withLock(U.bind((function(){var t;try{var o=this.readFromStorage();o.push(i),(t=this.saveToStorage(o))&&this.memQueue.push(i)}catch(r){this.reportError("Error enqueueing item",e),t=!1}r&&r(t)}),this),U.bind((function(e){this.reportError("Error acquiring storage lock",e),r&&r(!1)}),this),this.pid)},te.prototype.fillBatch=function(e){var t=this.memQueue.slice(0,e);if(t.lengthn.flushAfter&&!i[n.id]&&(n.orphaned=!0,t.push(n),t.length>=e))break}}}return t};var re=function(e,t){var r=[];return U.each(e,(function(e){e.id&&!t[e.id]&&r.push(e)})),r};te.prototype.removeItemsByID=function(e,t){var r={};U.each(e,(function(e){r[e]=!0})),this.memQueue=re(this.memQueue,r);var i=U.bind((function(){var t;try{var i=this.readFromStorage();if(i=re(i,r),t=this.saveToStorage(i)){i=this.readFromStorage();for(var o=0;o5&&(this.reportError("[dupe] item ID sent too many times, not sending",{item:e,batchSize:n.length,timesSent:this.itemIdsSentSuccessfully[o]}),i=!1):this.reportError("[dupe] found item with no ID",{item:e}),i&&s.push(t)}a[e.id]=t}),this),s.length<1)return void this.resetFlush();this.requestInProgress=!0;var c=U.bind((function(r){this.requestInProgress=!1;try{var s=!1;if(e.unloading)this.queue.updatePayloads(a);else if(U.isObject(r)&&"timeout"===r.error&&(new Date).getTime()-i>=t)this.reportError("Network timeout; retrying"),this.flush();else if(U.isObject(r)&&r.xhr_req&&(r.xhr_req.status>=500||429===r.xhr_req.status||"timeout"===r.error)){var c=2*this.flushInterval,p=r.xhr_req.responseHeaders;if(p){var u=p["Retry-After"];u&&(c=1e3*parseInt(u,10)||c)}c=Math.min(6e5,c),this.reportError("Error; retry in "+c+" ms"),this.scheduleFlush(c)}else if(U.isObject(r)&&r.xhr_req&&413===r.xhr_req.status)if(n.length>1){var _=Math.max(1,Math.floor(o/2));this.batchSize=Math.min(this.batchSize,_,n.length-1),this.reportError("413 response; reducing batch size to "+this.batchSize),this.resetFlush()}else this.reportError("Single-event request too large; dropping",n),this.resetBatchSize(),s=!0;else s=!0;s&&(this.queue.removeItemsByID(U.map(n,(function(e){return e.id})),U.bind((function(e){e?(this.consecutiveRemovalFailures=0,this.flush()):(this.reportError("Failed to remove items from queue"),++this.consecutiveRemovalFailures>5?(this.reportError("Too many queue failures; disabling batching system."),this.stopAllBatching()):this.resetFlush())}),this)),U.each(n,U.bind((function(e){var t=e.id;t?(this.itemIdsSentSuccessfully[t]=this.itemIdsSentSuccessfully[t]||0,this.itemIdsSentSuccessfully[t]++,this.itemIdsSentSuccessfully[t]>5&&this.reportError("[dupe] item ID sent too many times",{item:e,batchSize:n.length,timesSent:this.itemIdsSentSuccessfully[t]})):this.reportError("[dupe] found item with no ID while removing",{item:e})}),this)))}catch(e){this.reportError("Error handling API response",e),this.resetFlush()}}),this),p={method:"POST",verbose:!0,ignore_json_errors:!0,timeout_ms:t};e.unloading&&(p.transport="sendBeacon"),oe.log("MIXPANEL REQUEST:",s),this.sendRequest(s,p,c)}catch(e){this.reportError("Error flushing request queue",e),this.resetFlush()}},ne.prototype.reportError=function(e,t){if(oe.error.apply(oe.error,arguments),this.errorReporter)try{t instanceof Error||(t=new Error(e)),this.errorReporter(e,t)}catch(t){oe.error(t)}};var se="__mp_opt_in_out_";function ae(e,t){me(!0,e,t)}function ce(e,t){me(!1,e,t)}function pe(e,t){return"1"===ye(e,t)}function ue(e,r){if(function(e){if(e&&e.ignoreDnt)return!1;var r=e&&e.window||t,i=r.navigator||{},o=!1;return U.each([i.doNotTrack,i.msDoNotTrack,r.doNotTrack],(function(e){U.includes([!0,1,"1","yes"],e)&&(o=!0)})),o}(r))return $.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;var i="0"===ye(e,r);return i&&$.warn("You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data."),i}function _e(e){return ve(e,(function(e){return this.get_config(e)}))}function he(e){return ve(e,(function(e){return this._get_config(e)}))}function le(e){return ve(e,(function(e){return this._get_config(e)}))}function de(e,t){fe(t=t||{}).remove(ge(e,t),!!t.crossSubdomainCookie,t.cookieDomain)}function fe(e){return"localStorage"===(e=e||{}).persistenceType?U.localStorage:U.cookie}function ge(e,t){return((t=t||{}).persistencePrefix||se)+e}function ye(e,t){return fe(t).get(ge(e,t))}function me(e,t,r){U.isString(t)&&t.length?(fe(r=r||{}).set(ge(t,r),e?1:0,U.isNumber(r.cookieExpiration)?r.cookieExpiration:null,!!r.crossSubdomainCookie,!!r.secureCookie,!!r.crossSiteCookie,r.cookieDomain),r.track&&e&&r.track(r.trackEventName||"$opt_in",r.trackProperties,{send_immediately:!0})):$.error("gdpr."+(e?"optIn":"optOut")+" called with an invalid token")}function ve(e,t){return function(){var r=!1;try{var i=t.call(this,"token"),o=t.call(this,"ignore_dnt"),n=t.call(this,"opt_out_tracking_persistence_type"),s=t.call(this,"opt_out_tracking_cookie_prefix"),a=t.call(this,"window");i&&(r=ue(i,{ignoreDnt:o,persistenceType:n,persistencePrefix:s,window:a}))}catch(e){$.error("Unexpected error when checking tracking opt-out status: "+e)}if(!r)return e.apply(this,arguments);var c=arguments[arguments.length-1];"function"===typeof c&&c(0)}}var be="$set",ke="$set_once",we="$unset",xe="$add",Se="$append",qe="$union",Ee="$remove",Oe={set_action:function(e,t){var r={},i={};return U.isObject(e)?U.each(e,(function(e,t){this._is_reserved_property(t)||(i[t]=e)}),this):i[e]=t,r[be]=i,r},unset_action:function(e){var t={},r=[];return U.isArray(e)||(e=[e]),U.each(e,(function(e){this._is_reserved_property(e)||r.push(e)}),this),t[we]=r,t},set_once_action:function(e,t){var r={},i={};return U.isObject(e)?U.each(e,(function(e,t){this._is_reserved_property(t)||(i[t]=e)}),this):i[e]=t,r[ke]=i,r},union_action:function(e,t){var r={},i={};return U.isObject(e)?U.each(e,(function(e,t){this._is_reserved_property(t)||(i[t]=U.isArray(e)?e:[e])}),this):i[e]=U.isArray(t)?t:[t],r[qe]=i,r},append_action:function(e,t){var r={},i={};return U.isObject(e)?U.each(e,(function(e,t){this._is_reserved_property(t)||(i[t]=e)}),this):i[e]=t,r[Se]=i,r},remove_action:function(e,t){var r={},i={};return U.isObject(e)?U.each(e,(function(e,t){this._is_reserved_property(t)||(i[t]=e)}),this):i[e]=t,r[Ee]=i,r},delete_action:function(){var e={$delete:""};return e}},Ie=function(){};U.extend(Ie.prototype,Oe),Ie.prototype._init=function(e,t,r){this._mixpanel=e,this._group_key=t,this._group_id=r},Ie.prototype.set=le((function(e,t,r){var i=this.set_action(e,t);return U.isObject(e)&&(r=t),this._send_request(i,r)})),Ie.prototype.set_once=le((function(e,t,r){var i=this.set_once_action(e,t);return U.isObject(e)&&(r=t),this._send_request(i,r)})),Ie.prototype.unset=le((function(e,t){var r=this.unset_action(e);return this._send_request(r,t)})),Ie.prototype.union=le((function(e,t,r){U.isObject(e)&&(r=t);var i=this.union_action(e,t);return this._send_request(i,r)})),Ie.prototype.delete=le((function(e){var t=this.delete_action();return this._send_request(t,e)})),Ie.prototype.remove=le((function(e,t,r){var i=this.remove_action(e,t);return this._send_request(i,r)})),Ie.prototype._send_request=function(e,t){e.$group_key=this._group_key,e.$group_id=this._group_id,e.$token=this._get_config("token");var r=U.encodeDates(e);return this._mixpanel._track_or_batch({type:"groups",data:r,endpoint:this._get_config("api_host")+"/"+this._get_config("api_routes").groups,batcher:this._mixpanel.request_batchers.groups},t)},Ie.prototype._is_reserved_property=function(e){return"$group_key"===e||"$group_id"===e},Ie.prototype._get_config=function(e){return this._mixpanel.get_config(e)},Ie.prototype.toString=function(){return this._mixpanel.toString()+".group."+this._group_key+"."+this._group_id},Ie.prototype.remove=Ie.prototype.remove,Ie.prototype.set=Ie.prototype.set,Ie.prototype.set_once=Ie.prototype.set_once,Ie.prototype.union=Ie.prototype.union,Ie.prototype.unset=Ie.prototype.unset,Ie.prototype.toString=Ie.prototype.toString;var De=function(){};U.extend(De.prototype,Oe),De.prototype._init=function(e){this._mixpanel=e},De.prototype.set=he((function(e,t,r){var i=this.set_action(e,t);return U.isObject(e)&&(r=t),this._get_config("save_referrer")&&this._mixpanel.persistence.update_referrer_info(document.referrer),i[be]=U.extend({},U.info.people_properties(),i[be]),this._send_request(i,r)})),De.prototype.set_once=he((function(e,t,r){var i=this.set_once_action(e,t);return U.isObject(e)&&(r=t),this._send_request(i,r)})),De.prototype.unset=he((function(e,t){var r=this.unset_action(e);return this._send_request(r,t)})),De.prototype.increment=he((function(e,t,r){var i={},o={};return U.isObject(e)?(U.each(e,(function(e,t){if(!this._is_reserved_property(t)){if(isNaN(parseFloat(e)))return void $.error("Invalid increment value passed to mixpanel.people.increment - must be a number");o[t]=e}}),this),r=t):(U.isUndefined(t)&&(t=1),o[e]=t),i[xe]=o,this._send_request(i,r)})),De.prototype.append=he((function(e,t,r){U.isObject(e)&&(r=t);var i=this.append_action(e,t);return this._send_request(i,r)})),De.prototype.remove=he((function(e,t,r){U.isObject(e)&&(r=t);var i=this.remove_action(e,t);return this._send_request(i,r)})),De.prototype.union=he((function(e,t,r){U.isObject(e)&&(r=t);var i=this.union_action(e,t);return this._send_request(i,r)})),De.prototype.track_charge=he((function(e,t,r){if(U.isNumber(e)||(e=parseFloat(e),!isNaN(e)))return this.append("$transactions",U.extend({$amount:e},t),r);$.error("Invalid value passed to mixpanel.people.track_charge - must be a number")})),De.prototype.clear_charges=function(e){return this.set("$transactions",[],e)},De.prototype.delete_user=function(){if(this._identify_called()){var e={$delete:this._mixpanel.get_distinct_id()};return this._send_request(e)}$.error("mixpanel.people.delete_user() requires you to call identify() first")},De.prototype.toString=function(){return this._mixpanel.toString()+".people"},De.prototype._send_request=function(e,t){e.$token=this._get_config("token"),e.$distinct_id=this._mixpanel.get_distinct_id();var r=this._mixpanel.get_property("$device_id"),i=this._mixpanel.get_property("$user_id"),o=this._mixpanel.get_property("$had_persisted_distinct_id");r&&(e.$device_id=r),i&&(e.$user_id=i),o&&(e.$had_persisted_distinct_id=o);var n=U.encodeDates(e);return this._identify_called()?this._mixpanel._track_or_batch({type:"people",data:n,endpoint:this._get_config("api_host")+"/"+this._get_config("api_routes").engage,batcher:this._mixpanel.request_batchers.people},t):(this._enqueue(e),U.isUndefined(t)||(this._get_config("verbose")?t({status:-1,error:null}):t(-1)),U.truncate(n,255))},De.prototype._get_config=function(e){return this._mixpanel.get_config(e)},De.prototype._identify_called=function(){return!0===this._mixpanel._flags.identify_called},De.prototype._enqueue=function(e){be in e?this._mixpanel.persistence._add_to_people_queue(be,e):ke in e?this._mixpanel.persistence._add_to_people_queue(ke,e):we in e?this._mixpanel.persistence._add_to_people_queue(we,e):xe in e?this._mixpanel.persistence._add_to_people_queue(xe,e):Se in e?this._mixpanel.persistence._add_to_people_queue(Se,e):Ee in e?this._mixpanel.persistence._add_to_people_queue(Ee,e):qe in e?this._mixpanel.persistence._add_to_people_queue(qe,e):$.error("Invalid call to _enqueue():",e)},De.prototype._flush_one_queue=function(e,t,r,i){var o=this,n=U.extend({},this._mixpanel.persistence.load_queue(e)),s=n;U.isUndefined(n)||!U.isObject(n)||U.isEmptyObject(n)||(o._mixpanel.persistence._pop_from_people_queue(e,n),o._mixpanel.persistence.save(),i&&(s=i(n)),t.call(o,s,(function(t,i){0===t&&o._mixpanel.persistence._add_to_people_queue(e,n),U.isUndefined(r)||r(t,i)})))},De.prototype._flush=function(e,t,r,i,o,n,s){var a=this;this._flush_one_queue(be,this.set,e),this._flush_one_queue(ke,this.set_once,i),this._flush_one_queue(we,this.unset,n,(function(e){return U.keys(e)})),this._flush_one_queue(xe,this.increment,t),this._flush_one_queue(qe,this.union,o);var c=this._mixpanel.persistence.load_queue(Se);if(!U.isUndefined(c)&&U.isArray(c)&&c.length)for(var p,u=function(e,t){0===e&&a._mixpanel.persistence._add_to_people_queue(Se,p),U.isUndefined(r)||r(e,t)},_=c.length-1;_>=0;_--)c=this._mixpanel.persistence.load_queue(Se),p=c.pop(),a._mixpanel.persistence.save(),U.isEmptyObject(p)||a.append(p,u);var h=this._mixpanel.persistence.load_queue(Ee);if(!U.isUndefined(h)&&U.isArray(h)&&h.length)for(var l,d=function(e,t){0===e&&a._mixpanel.persistence._add_to_people_queue(Ee,l),U.isUndefined(s)||s(e,t)},f=h.length-1;f>=0;f--)h=this._mixpanel.persistence.load_queue(Ee),l=h.pop(),a._mixpanel.persistence.save(),U.isEmptyObject(l)||a.remove(l,d)},De.prototype._is_reserved_property=function(e){return"$distinct_id"===e||"$token"===e||"$device_id"===e||"$user_id"===e||"$had_persisted_distinct_id"===e},De.prototype.set=De.prototype.set,De.prototype.set_once=De.prototype.set_once,De.prototype.unset=De.prototype.unset,De.prototype.increment=De.prototype.increment,De.prototype.append=De.prototype.append,De.prototype.remove=De.prototype.remove,De.prototype.union=De.prototype.union,De.prototype.track_charge=De.prototype.track_charge,De.prototype.clear_charges=De.prototype.clear_charges,De.prototype.delete_user=De.prototype.delete_user,De.prototype.toString=De.prototype.toString;var Ae,Te,Be="__mps",Ue="__mpso",$e="__mpus",Pe="__mpa",Ce="__mpap",je="__mpr",Me="__mpu",Ne="$people_distinct_id",Fe="__alias",Re="__timers",Le=[Be,Ue,$e,Pe,Ce,je,Me,Ne,Fe,Re],ze=function(e){this.props={},this.campaign_params_saved=!1,e.persistence_name?this.name="mp_"+e.persistence_name:this.name="mp_"+e.token+"_mixpanel";var t=e.persistence;"cookie"!==t&&"localStorage"!==t&&($.critical("Unknown persistence type "+t+"; falling back to cookie"),t=e.persistence="cookie"),"localStorage"===t&&U.localStorage.is_supported()?this.storage=U.localStorage:this.storage=U.cookie,this.load(),this.update_config(e),this.upgrade(),this.save()};ze.prototype.properties=function(){var e={};return this.load(),U.each(this.props,(function(t,r){U.include(Le,r)||(e[r]=t)})),e},ze.prototype.load=function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=U.extend({},e))}},ze.prototype.upgrade=function(){var e,t;this.storage===U.localStorage?(e=U.cookie.parse(this.name),U.cookie.remove(this.name),U.cookie.remove(this.name,!0),e&&this.register_once(e)):this.storage===U.cookie&&(t=U.localStorage.parse(this.name),U.localStorage.remove(this.name),t&&this.register_once(t))},ze.prototype.save=function(){this.disabled||this.storage.set(this.name,U.JSONEncode(this.props),this.expire_days,this.cross_subdomain,this.secure,this.cross_site,this.cookie_domain)},ze.prototype.load_prop=function(e){return this.load(),this.props[e]},ze.prototype.remove=function(){this.storage.remove(this.name,!1,this.cookie_domain),this.storage.remove(this.name,!0,this.cookie_domain)},ze.prototype.clear=function(){this.remove(),this.props={}},ze.prototype.register_once=function(e,t,r){return!!U.isObject(e)&&("undefined"===typeof t&&(t="None"),this.expire_days="undefined"===typeof r?this.default_expiry:r,this.load(),U.each(e,(function(e,r){this.props.hasOwnProperty(r)&&this.props[r]!==t||(this.props[r]=e)}),this),this.save(),!0)},ze.prototype.register=function(e,t){return!!U.isObject(e)&&(this.expire_days="undefined"===typeof t?this.default_expiry:t,this.load(),U.extend(this.props,e),this.save(),!0)},ze.prototype.unregister=function(e){this.load(),e in this.props&&(delete this.props[e],this.save())},ze.prototype.update_search_keyword=function(e){this.register(U.info.searchInfo(e))},ze.prototype.update_referrer_info=function(e){this.register_once({$initial_referrer:e||"$direct",$initial_referring_domain:U.info.referringDomain(e)||"$direct"},"")},ze.prototype.get_referrer_info=function(){return U.strip_empty_properties({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})},ze.prototype.update_config=function(e){this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cookie_domain(e.cookie_domain),this.set_cross_site(e.cross_site_cookie),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie)},ze.prototype.set_disabled=function(e){this.disabled=e,this.disabled?this.remove():this.save()},ze.prototype.set_cookie_domain=function(e){e!==this.cookie_domain&&(this.remove(),this.cookie_domain=e,this.save())},ze.prototype.set_cross_site=function(e){e!==this.cross_site&&(this.cross_site=e,this.remove(),this.save())},ze.prototype.set_cross_subdomain=function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())},ze.prototype.get_cross_subdomain=function(){return this.cross_subdomain},ze.prototype.set_secure=function(e){e!==this.secure&&(this.secure=!!e,this.remove(),this.save())},ze.prototype._add_to_people_queue=function(e,t){var r=this._get_queue_key(e),i=t[e],o=this._get_or_create_queue(be),n=this._get_or_create_queue(ke),s=this._get_or_create_queue(we),a=this._get_or_create_queue(xe),c=this._get_or_create_queue(qe),p=this._get_or_create_queue(Ee,[]),u=this._get_or_create_queue(Se,[]);r===Be?(U.extend(o,i),this._pop_from_people_queue(xe,i),this._pop_from_people_queue(qe,i),this._pop_from_people_queue(we,i)):r===Ue?(U.each(i,(function(e,t){t in n||(n[t]=e)})),this._pop_from_people_queue(we,i)):r===$e?U.each(i,(function(e){U.each([o,n,a,c],(function(t){e in t&&delete t[e]})),U.each(u,(function(t){e in t&&delete t[e]})),s[e]=!0})):r===Pe?(U.each(i,(function(e,t){t in o?o[t]+=e:(t in a||(a[t]=0),a[t]+=e)}),this),this._pop_from_people_queue(we,i)):r===Me?(U.each(i,(function(e,t){U.isArray(e)&&(t in c||(c[t]=[]),c[t]=c[t].concat(e))})),this._pop_from_people_queue(we,i)):r===je?(p.push(i),this._pop_from_people_queue(Se,i)):r===Ce&&(u.push(i),this._pop_from_people_queue(we,i)),$.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):"),$.log(t),this.save()},ze.prototype._pop_from_people_queue=function(e,t){var r=this.props[this._get_queue_key(e)];U.isUndefined(r)||U.each(t,(function(t,i){e===Se||e===Ee?U.each(r,(function(e){e[i]===t&&delete e[i]})):delete r[i]}),this)},ze.prototype.load_queue=function(e){return this.load_prop(this._get_queue_key(e))},ze.prototype._get_queue_key=function(e){return e===be?Be:e===ke?Ue:e===we?$e:e===xe?Pe:e===Se?Ce:e===Ee?je:e===qe?Me:void $.error("Invalid queue:",e)},ze.prototype._get_or_create_queue=function(e,t){var r=this._get_queue_key(e);return t=U.isUndefined(t)?{}:t,this.props[r]||(this.props[r]=t)},ze.prototype.set_event_timer=function(e,t){var r=this.load_prop(Re)||{};r[e]=t,this.props[Re]=r,this.save()},ze.prototype.remove_event_timer=function(e){var t=(this.load_prop(Re)||{})[e];return U.isUndefined(t)||(delete this.props[Re][e],this.save()),t};var Je=function(e){return e},Qe=function(){},He="mixpanel",Ke="base64",Ge="$device:",Ve=t.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,We=!Ve&&-1===E.indexOf("MSIE")&&-1===E.indexOf("Mozilla"),Xe=null;w.sendBeacon&&(Xe=function(){return w.sendBeacon.apply(w,arguments)});var Ye={track:"track/",engage:"engage/",groups:"groups/",record:"record/"},Ze={api_host:"https://api-js.mixpanel.com",api_routes:Ye,api_method:"POST",api_transport:"XHR",api_payload_format:Ke,app_host:"https://mixpanel.com",cdn:"https://cdn.mxpnl.com",cross_site_cookie:!1,cross_subdomain_cookie:!0,error_reporter:Qe,persistence:"cookie",persistence_name:"",cookie_domain:"",cookie_name:"",loaded:Qe,mp_loader:null,track_marketing:!0,track_pageview:!1,skip_first_touch_marketing:!1,store_google:!0,stop_utm_persistence:!0,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:new RegExp("^(mp-block|fs-exclude|amp-block|rr-block|ph-no-capture)$"),record_block_selector:"img, video",record_idle_timeout_ms:18e5,record_mask_text_class:new RegExp("^(mp-mask|fs-mask|amp-mask|rr-mask|ph-mask)$"),record_mask_text_selector:"*",record_max_ms:864e5,record_sessions_percent:0,recorder_src:"https://cdn.mxpnl.com/libs/mixpanel-recorder.min.js"},et=!1,tt=function(){},rt=function(e,t,i){var o,n=i===He?Te:Te[i];if(n&&0===Ae)o=n;else{if(n&&!U.isArray(n))return void $.error("You have already initialized "+i);o=new tt}if(o._cached_groups={},o._init(e,t,i),o.people=new De,o.people._init(o),!o.get_config("skip_first_touch_marketing")){var s=U.info.campaignParams(null),a={},c=!1;U.each(s,(function(e,t){a["initial_"+t]=e,e&&(c=!0)})),c&&o.people.set_once(a)}return r.DEBUG=r.DEBUG||o.get_config("debug"),!U.isUndefined(n)&&U.isArray(n)&&(o._execute_array.call(o.people,n.people),o._execute_array(n)),o};tt.prototype.init=function(e,t,r){if(U.isUndefined(r))this.report_error("You must name your new library: init(token, config, name)");else{if(r!==He){var i=rt(e,t,r);return Te[r]=i,i._loaded(),i}this.report_error("You must initialize the main mixpanel object right after you include the Mixpanel js snippet")}},tt.prototype._init=function(e,r,i){r=r||{},this.__loaded=!0,this.config={};var o={};"api_payload_format"in r||(r.api_host||Ze.api_host).match(/\.mixpanel\.com/)&&(o.api_payload_format="json");if(this.set_config(U.extend({},Ze,o,r,{name:i,token:e,callback_fn:(i===He?i:He+"."+i)+"._jsc"})),this._jsc=Qe,this.__dom_loaded_queue=[],this.__request_queue=[],this.__disabled_events=[],this._flags={disable_all_events:!1,identify_called:!1},this.request_batchers={},this._batch_requests=this.get_config("batch_requests"),this._batch_requests)if(U.localStorage.is_supported(!0)&&Ve){if(this.init_batchers(),Xe&&t.addEventListener){var n=U.bind((function(){this.request_batchers.events.stopped||this.request_batchers.events.flush({unloading:!0})}),this);t.addEventListener("pagehide",(function(e){e.persisted&&n()})),t.addEventListener("visibilitychange",(function(){"hidden"===x.visibilityState&&n()}))}}else this._batch_requests=!1,$.log("Turning off Mixpanel request-queueing; needs XHR and localStorage support"),U.each(this.get_batcher_configs(),(function(e){$.log("Clearing batch queue "+e.queue_key),U.localStorage.remove(e.queue_key)}));this.persistence=this.cookie=new ze(this.config),this.unpersisted_superprops={},this._gdpr_init();var s=U.UUID();this.get_distinct_id()||this.register_once({distinct_id:Ge+s,$device_id:s},"");var a=this.get_config("track_pageview");a&&this._init_url_change_tracking(a),this.get_config("record_sessions_percent")>0&&100*Math.random()<=this.get_config("record_sessions_percent")&&this.start_session_recording()},tt.prototype.start_session_recording=_e((function(){if(t.MutationObserver){var e=U.bind((function(){this._recorder=this._recorder||new t.__mp_recorder(this),this._recorder.startRecording()}),this);if(U.isUndefined(t.__mp_recorder)){var r=x.createElement("script");r.type="text/javascript",r.async=!0,r.onload=e,r.src=this.get_config("recorder_src"),x.head.appendChild(r)}else e()}else $.critical("Browser does not support MutationObserver; skipping session recording")})),tt.prototype.stop_session_recording=function(){this._recorder?this._recorder.stopRecording():$.critical("Session recorder module not loaded")},tt.prototype.get_session_recording_properties=function(){var e={};if(this._recorder){var t=this._recorder.replayId;t&&(e.$mp_replay_id=t)}return e},tt.prototype._loaded=function(){if(this.get_config("loaded")(this),this._set_default_superprops(),this.people.set_once(this.persistence.get_referrer_info()),this.get_config("store_google")&&this.get_config("stop_utm_persistence")){var e=U.info.campaignParams(null);U.each(e,function(e,t){this.unregister(t)}.bind(this))}},tt.prototype._set_default_superprops=function(){this.persistence.update_search_keyword(x.referrer),this.get_config("store_google")&&!this.get_config("stop_utm_persistence")&&this.register(U.info.campaignParams()),this.get_config("save_referrer")&&this.persistence.update_referrer_info(x.referrer)},tt.prototype._dom_loaded=function(){U.each(this.__dom_loaded_queue,(function(e){this._track_dom.apply(this,e)}),this),this.has_opted_out_tracking()||U.each(this.__request_queue,(function(e){this._send_request.apply(this,e)}),this),delete this.__dom_loaded_queue,delete this.__request_queue},tt.prototype._track_dom=function(e,t){if(this.get_config("img"))return this.report_error("You can't use DOM tracking functions with img = true."),!1;if(!et)return this.__dom_loaded_queue.push([e,t]),!1;var r=(new e).init(this);return r.track.apply(r,t)},tt.prototype._init_url_change_tracking=function(e){var r="";if(this.track_pageview()&&(r=U.info.currentUrl()),U.include(["full-url","url-with-path-and-query-string","url-with-path"],e)){t.addEventListener("popstate",(function(){t.dispatchEvent(new Event("mp_locationchange"))})),t.addEventListener("hashchange",(function(){t.dispatchEvent(new Event("mp_locationchange"))}));var i=t.history.pushState;"function"===typeof i&&(t.history.pushState=function(e,r,o){i.call(t.history,e,r,o),t.dispatchEvent(new Event("mp_locationchange"))});var o=t.history.replaceState;"function"===typeof o&&(t.history.replaceState=function(e,r,i){o.call(t.history,e,r,i),t.dispatchEvent(new Event("mp_locationchange"))}),t.addEventListener("mp_locationchange",function(){var t=U.info.currentUrl(),i=!1;("full-url"===e?i=t!==r:"url-with-path-and-query-string"===e?i=t.split("#")[0]!==r.split("#")[0]:"url-with-path"===e&&(i=t.split("#")[0].split("?")[0]!==r.split("#")[0].split("?")[0]),i)&&(this.track_pageview()&&(r=t))}.bind(this))}},tt.prototype._prepare_callback=function(e,t){if(U.isUndefined(e))return null;if(Ve){return function(r){e(r,t)}}var r=this._jsc,i=""+Math.floor(1e8*Math.random()),o=this.get_config("callback_fn")+"["+i+"]";return r[i]=function(o){delete r[i],e(o,t)},o},tt.prototype._send_request=function(e,t,r,i){var o=!0;if(We)return this.__request_queue.push(arguments),o;var n={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")},s=null;i||!U.isFunction(r)&&"string"!==typeof r||(i=r,r=null),r=U.extend(n,r||{}),Ve||(r.method="GET");var a="POST"===r.method,c=Xe&&a&&"sendbeacon"===r.transport.toLowerCase(),p=r.verbose;t.verbose&&(p=!0),this.get_config("test")&&(t.test=1),p&&(t.verbose=1),this.get_config("img")&&(t.img=1),Ve||(i?t.callback=i:(p||this.get_config("test"))&&(t.callback="(function(){})")),t.ip=this.get_config("ip")?1:0,t._=(new Date).getTime().toString(),a&&(s="data="+encodeURIComponent(t.data),delete t.data),e+="?"+U.HTTPBuildQuery(t);var u=this;if("img"in t){var _=x.createElement("img");_.src=e,x.body.appendChild(_)}else if(c){try{o=Xe(e,s)}catch(e){u.report_error(e),o=!1}try{i&&i(o?1:0)}catch(e){u.report_error(e)}}else if(Ve)try{var h=new XMLHttpRequest;h.open(r.method,e,!0);var l=this.get_config("xhr_headers");if(a&&(l["Content-Type"]="application/x-www-form-urlencoded"),U.each(l,(function(e,t){h.setRequestHeader(t,e)})),r.timeout_ms&&"undefined"!==typeof h.timeout){h.timeout=r.timeout_ms;var d=(new Date).getTime()}h.withCredentials=!0,h.onreadystatechange=function(){var e;if(4===h.readyState)if(200===h.status){if(i)if(p){var t;try{t=U.JSONDecode(h.responseText)}catch(e){if(u.report_error(e),!r.ignore_json_errors)return;t=h.responseText}i(t)}else i(Number(h.responseText))}else e=h.timeout&&!h.status&&(new Date).getTime()-d>=h.timeout?"timeout":"Bad HTTP status: "+h.status+" "+h.statusText,u.report_error(e),i&&i(p?{status:0,error:e,xhr_req:h}:0)},h.send(s)}catch(e){u.report_error(e),o=!1}else{var f=x.createElement("script");f.type="text/javascript",f.async=!0,f.defer=!0,f.src=e;var g=x.getElementsByTagName("script")[0];g.parentNode.insertBefore(f,g)}return o},tt.prototype._execute_array=function(e){var t,r=[],i=[],o=[];U.each(e,(function(e){e&&(t=e[0],U.isArray(t)?o.push(e):"function"===typeof e?e.call(this):U.isArray(e)&&"alias"===t?r.push(e):U.isArray(e)&&-1!==t.indexOf("track")&&"function"===typeof this[t]?o.push(e):i.push(e))}),this);var n=function(e,t){U.each(e,(function(e){if(U.isArray(e[0])){var r=t;U.each(e,(function(e){r=r[e[0]].apply(r,e.slice(1))}))}else this[e[0]].apply(this,e.slice(1))}),t)};n(r,this),n(i,this),n(o,this)},tt.prototype.are_batchers_initialized=function(){return!!this.request_batchers.events},tt.prototype.get_batcher_configs=function(){var e="__mpq_"+this.get_config("token"),t=this.get_config("api_routes");return this._batcher_configs=this._batcher_configs||{events:{type:"events",endpoint:"/"+t.track,queue_key:e+"_ev"},people:{type:"people",endpoint:"/"+t.engage,queue_key:e+"_pp"},groups:{type:"groups",endpoint:"/"+t.groups,queue_key:e+"_gr"}},this._batcher_configs},tt.prototype.init_batchers=function(){if(!this.are_batchers_initialized()){var e=U.bind((function(e){return new ne(e.queue_key,{libConfig:this.config,sendRequestFunc:U.bind((function(t,r,i){this._send_request(this.get_config("api_host")+e.endpoint,this._encode_data_for_request(t),r,this._prepare_callback(i,t))}),this),beforeSendHook:U.bind((function(t){return this._run_hook("before_send_"+e.type,t)}),this),errorReporter:this.get_config("error_reporter"),stopAllBatchingFunc:U.bind(this.stop_batch_senders,this)})}),this),t=this.get_batcher_configs();this.request_batchers={events:e(t.events),people:e(t.people),groups:e(t.groups)}}this.get_config("batch_autostart")&&this.start_batch_senders()},tt.prototype.start_batch_senders=function(){this._batchers_were_started=!0,this.are_batchers_initialized()&&(this._batch_requests=!0,U.each(this.request_batchers,(function(e){e.start()})))},tt.prototype.stop_batch_senders=function(){this._batch_requests=!1,U.each(this.request_batchers,(function(e){e.stop(),e.clear()}))},tt.prototype.push=function(e){this._execute_array([e])},tt.prototype.disable=function(e){"undefined"===typeof e?this._flags.disable_all_events=!0:this.__disabled_events=this.__disabled_events.concat(e)},tt.prototype._encode_data_for_request=function(e){var t=U.JSONEncode(e);return this.get_config("api_payload_format")===Ke&&(t=U.base64Encode(t)),{data:t}},tt.prototype._track_or_batch=function(e,t){var r=U.truncate(e.data,255),i=e.endpoint,o=e.batcher,n=e.should_send_immediately,s=e.send_request_options||{};t=t||Qe;var a=!0,c=U.bind((function(){return s.skip_hooks||(r=this._run_hook("before_send_"+e.type,r)),r?($.log("MIXPANEL REQUEST:"),$.log(r),this._send_request(i,this._encode_data_for_request(r),s,this._prepare_callback(t,r))):null}),this);return this._batch_requests&&!n?o.enqueue(r,(function(e){e?t(1,r):c()})):a=c(),a&&r},tt.prototype.track=_e((function(e,t,r,i){i||"function"!==typeof r||(i=r,r=null);var o=(r=r||{}).transport;o&&(r.transport=o);var n=r.send_immediately;if("function"!==typeof i&&(i=Qe),U.isUndefined(e))this.report_error("No event name provided to mixpanel.track");else{if(!this._event_is_disabled(e)){(t=U.extend({},t)).token=this.get_config("token");var s=this.persistence.remove_event_timer(e);if(!U.isUndefined(s)){var a=(new Date).getTime()-s;t.$duration=parseFloat((a/1e3).toFixed(3))}this._set_default_superprops();var c=this.get_config("track_marketing")?U.info.marketingParams():{};t=U.extend({},U.info.properties({mp_loader:this.get_config("mp_loader")}),c,this.persistence.properties(),this.unpersisted_superprops,this.get_session_recording_properties(),t);var p=this.get_config("property_blacklist");U.isArray(p)?U.each(p,(function(e){delete t[e]})):this.report_error("Invalid value for property_blacklist config: "+p);var u={event:e,properties:t};return this._track_or_batch({type:"events",data:u,endpoint:this.get_config("api_host")+"/"+this.get_config("api_routes").track,batcher:this.request_batchers.events,should_send_immediately:n,send_request_options:r},i)}i(0)}})),tt.prototype.set_group=_e((function(e,t,r){U.isArray(t)||(t=[t]);var i={};return i[e]=t,this.register(i),this.people.set(e,t,r)})),tt.prototype.add_group=_e((function(e,t,r){var i=this.get_property(e),o={};return void 0===i?(o[e]=[t],this.register(o)):-1===i.indexOf(t)&&(i.push(t),o[e]=i,this.register(o)),this.people.union(e,t,r)})),tt.prototype.remove_group=_e((function(e,t,r){var i=this.get_property(e);if(void 0!==i){var o=i.indexOf(t);o>-1&&(i.splice(o,1),this.register({group_key:i})),0===i.length&&this.unregister(e)}return this.people.remove(e,t,r)})),tt.prototype.track_with_groups=_e((function(e,t,r,i){var o=U.extend({},t||{});return U.each(r,(function(e,t){null!==e&&void 0!==e&&(o[t]=e)})),this.track(e,o,i)})),tt.prototype._create_map_key=function(e,t){return e+"_"+JSON.stringify(t)},tt.prototype._remove_group_from_cache=function(e,t){delete this._cached_groups[this._create_map_key(e,t)]},tt.prototype.get_group=function(e,t){var r=this._create_map_key(e,t),i=this._cached_groups[r];return void 0!==i&&i._group_key===e&&i._group_id===t||((i=new Ie)._init(this,e,t),this._cached_groups[r]=i),i},tt.prototype.track_pageview=_e((function(e,t){"object"!==typeof e&&(e={});var r=(t=t||{}).event_name||"$mp_web_page_view",i=U.extend(U.info.mpPageViewProperties(),U.info.campaignParams(),U.info.clickParams()),o=U.extend({},i,e);return this.track(r,o)})),tt.prototype.track_links=function(){return this._track_dom.call(this,W,arguments)},tt.prototype.track_forms=function(){return this._track_dom.call(this,X,arguments)},tt.prototype.time_event=function(e){U.isUndefined(e)?this.report_error("No event name provided to mixpanel.time_event"):this._event_is_disabled(e)||this.persistence.set_event_timer(e,(new Date).getTime())};var it={persistent:!0},ot=function(e){var t;return t=U.isObject(e)?e:U.isUndefined(e)?{}:{days:e},U.extend({},it,t)};tt.prototype.register=function(e,t){var r=ot(t);r.persistent?this.persistence.register(e,r.days):U.extend(this.unpersisted_superprops,e)},tt.prototype.register_once=function(e,t,r){var i=ot(r);i.persistent?this.persistence.register_once(e,t,i.days):("undefined"===typeof t&&(t="None"),U.each(e,(function(e,r){this.unpersisted_superprops.hasOwnProperty(r)&&this.unpersisted_superprops[r]!==t||(this.unpersisted_superprops[r]=e)}),this))},tt.prototype.unregister=function(e,t){(t=ot(t)).persistent?this.persistence.unregister(e):delete this.unpersisted_superprops[e]},tt.prototype._register_single=function(e,t){var r={};r[e]=t,this.register(r)},tt.prototype.identify=function(e,t,r,i,o,n,s,a){var c=this.get_distinct_id();if(e&&c!==e){if("string"===typeof e&&0===e.indexOf(Ge))return this.report_error("distinct_id cannot have $device: prefix"),-1;this.register({$user_id:e})}if(!this.get_property("$device_id")){var p=c;this.register_once({$had_persisted_distinct_id:!0,$device_id:p},"")}e!==c&&e!==this.get_property(Fe)&&(this.unregister(Fe),this.register({distinct_id:e})),this._flags.identify_called=!0,this.people._flush(t,r,i,o,n,s,a),e!==c&&this.track("$identify",{distinct_id:e,$anon_distinct_id:c},{skip_hooks:!0})},tt.prototype.reset=function(){this.persistence.clear(),this._flags.identify_called=!1;var e=U.UUID();this.register_once({distinct_id:Ge+e,$device_id:e},"")},tt.prototype.get_distinct_id=function(){return this.get_property("distinct_id")},tt.prototype.alias=function(e,t){if(e===this.get_property(Ne))return this.report_error("Attempting to create alias for existing People user - aborting."),-2;var r=this;return U.isUndefined(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single(Fe,e),this.track("$create_alias",{alias:e,distinct_id:t},{skip_hooks:!0},(function(){r.identify(e)}))):(this.report_error("alias matches current distinct_id - skipping api call."),this.identify(e),-1)},tt.prototype.name_tag=function(e){this._register_single("mp_name_tag",e)},tt.prototype.set_config=function(e){U.isObject(e)&&(U.extend(this.config,e),e.batch_size&&U.each(this.request_batchers,(function(e){e.resetBatchSize()})),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),r.DEBUG=r.DEBUG||this.get_config("debug"))},tt.prototype.get_config=function(e){return this.config[e]},tt.prototype._run_hook=function(e){var t=(this.config.hooks[e]||Je).apply(this,m.call(arguments,1));return"undefined"===typeof t&&(this.report_error(e+" hook did not return a value"),t=null),t},tt.prototype.get_property=function(e){return this.persistence.load_prop([e])},tt.prototype.toString=function(){var e=this.get_config("name");return e!==He&&(e=He+"."+e),e},tt.prototype._event_is_disabled=function(e){return U.isBlockedUA(E)||this._flags.disable_all_events||U.include(this.__disabled_events,e)},tt.prototype._gdpr_init=function(){"localStorage"===this.get_config("opt_out_tracking_persistence_type")&&U.localStorage.is_supported()&&(!this.has_opted_in_tracking()&&this.has_opted_in_tracking({persistence_type:"cookie"})&&this.opt_in_tracking({enable_persistence:!1}),!this.has_opted_out_tracking()&&this.has_opted_out_tracking({persistence_type:"cookie"})&&this.opt_out_tracking({clear_persistence:!1}),this.clear_opt_in_out_tracking({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_tracking()?this._gdpr_update_persistence({clear_persistence:!0}):this.has_opted_in_tracking()||!this.get_config("opt_out_tracking_by_default")&&!U.cookie.get("mp_optout")||(U.cookie.remove("mp_optout"),this.opt_out_tracking({clear_persistence:this.get_config("opt_out_persistence_by_default")}))},tt.prototype._gdpr_update_persistence=function(e){var t;if(e&&e.clear_persistence)t=!0;else{if(!e||!e.enable_persistence)return;t=!1}this.get_config("disable_persistence")||this.persistence.disabled===t||this.persistence.set_disabled(t),t?this.stop_batch_senders():this._batchers_were_started&&this.start_batch_senders()},tt.prototype._gdpr_call_func=function(e,t){return t=U.extend({track:U.bind(this.track,this),persistence_type:this.get_config("opt_out_tracking_persistence_type"),cookie_prefix:this.get_config("opt_out_tracking_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_site_cookie:this.get_config("cross_site_cookie"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),cookie_domain:this.get_config("cookie_domain"),secure_cookie:this.get_config("secure_cookie"),ignore_dnt:this.get_config("ignore_dnt")},t),U.localStorage.is_supported()||(t.persistence_type="cookie"),e(this.get_config("token"),{track:t.track,trackEventName:t.track_event_name,trackProperties:t.track_properties,persistenceType:t.persistence_type,persistencePrefix:t.cookie_prefix,cookieDomain:t.cookie_domain,cookieExpiration:t.cookie_expiration,crossSiteCookie:t.cross_site_cookie,crossSubdomainCookie:t.cross_subdomain_cookie,secureCookie:t.secure_cookie,ignoreDnt:t.ignore_dnt})},tt.prototype.opt_in_tracking=function(e){e=U.extend({enable_persistence:!0},e),this._gdpr_call_func(ae,e),this._gdpr_update_persistence(e)},tt.prototype.opt_out_tracking=function(e){(e=U.extend({clear_persistence:!0,delete_user:!0},e)).delete_user&&this.people&&this.people._identify_called()&&(this.people.delete_user(),this.people.clear_charges()),this._gdpr_call_func(ce,e),this._gdpr_update_persistence(e)},tt.prototype.has_opted_in_tracking=function(e){return this._gdpr_call_func(pe,e)},tt.prototype.has_opted_out_tracking=function(e){return this._gdpr_call_func(ue,e)},tt.prototype.clear_opt_in_out_tracking=function(e){e=U.extend({enable_persistence:!0},e),this._gdpr_call_func(de,e),this._gdpr_update_persistence(e)},tt.prototype.report_error=function(e,t){$.error.apply($.error,arguments);try{t||e instanceof Error||(e=new Error(e)),this.get_config("error_reporter")(e,t)}catch(t){$.error(t)}},tt.prototype.init=tt.prototype.init,tt.prototype.reset=tt.prototype.reset,tt.prototype.disable=tt.prototype.disable,tt.prototype.time_event=tt.prototype.time_event,tt.prototype.track=tt.prototype.track,tt.prototype.track_links=tt.prototype.track_links,tt.prototype.track_forms=tt.prototype.track_forms,tt.prototype.track_pageview=tt.prototype.track_pageview,tt.prototype.register=tt.prototype.register,tt.prototype.register_once=tt.prototype.register_once,tt.prototype.unregister=tt.prototype.unregister,tt.prototype.identify=tt.prototype.identify,tt.prototype.alias=tt.prototype.alias,tt.prototype.name_tag=tt.prototype.name_tag,tt.prototype.set_config=tt.prototype.set_config,tt.prototype.get_config=tt.prototype.get_config,tt.prototype.get_property=tt.prototype.get_property,tt.prototype.get_distinct_id=tt.prototype.get_distinct_id,tt.prototype.toString=tt.prototype.toString,tt.prototype.opt_out_tracking=tt.prototype.opt_out_tracking,tt.prototype.opt_in_tracking=tt.prototype.opt_in_tracking,tt.prototype.has_opted_out_tracking=tt.prototype.has_opted_out_tracking,tt.prototype.has_opted_in_tracking=tt.prototype.has_opted_in_tracking,tt.prototype.clear_opt_in_out_tracking=tt.prototype.clear_opt_in_out_tracking,tt.prototype.get_group=tt.prototype.get_group,tt.prototype.set_group=tt.prototype.set_group,tt.prototype.add_group=tt.prototype.add_group,tt.prototype.remove_group=tt.prototype.remove_group,tt.prototype.track_with_groups=tt.prototype.track_with_groups,tt.prototype.start_batch_senders=tt.prototype.start_batch_senders,tt.prototype.stop_batch_senders=tt.prototype.stop_batch_senders,tt.prototype.start_session_recording=tt.prototype.start_session_recording,tt.prototype.stop_session_recording=tt.prototype.stop_session_recording,tt.prototype.get_session_recording_properties=tt.prototype.get_session_recording_properties,tt.prototype.DEFAULT_API_ROUTES=Ye,ze.prototype.properties=ze.prototype.properties,ze.prototype.update_search_keyword=ze.prototype.update_search_keyword,ze.prototype.update_referrer_info=ze.prototype.update_referrer_info,ze.prototype.get_cross_subdomain=ze.prototype.get_cross_subdomain,ze.prototype.clear=ze.prototype.clear;var nt={},st=function(){Te.init=function(e,r,i){if(i)return Te[i]||(Te[i]=nt[i]=rt(e,r,i),Te[i]._loaded()),Te[i];var o=Te;nt[He]?o=nt[He]:e&&((o=rt(e,r,He))._loaded(),nt[He]=o),Te=o,1===Ae&&(t[He]=Te),U.each(nt,(function(e,t){t!==He&&(Te[t]=e)})),Te._=U}};var at=(Ae=0,Te=new tt,st(),Te.init(),function(){function e(){e.done||(e.done=!0,et=!0,We=!1,U.each(nt,(function(e){e._dom_loaded()})))}if(x.addEventListener)"complete"===x.readyState?e():x.addEventListener("DOMContentLoaded",e,!1);else if(x.attachEvent){x.attachEvent("onreadystatechange",e);var r=!1;try{r=null===t.frameElement}catch(e){}x.documentElement.doScroll&&r&&function t(){try{x.documentElement.doScroll("left")}catch(e){return void setTimeout(t,1)}e()}()}U.register_event(t,"load",e,!0)}(),Te);e.exports=at}}]); //# sourceMappingURL=npm.mixpanel-browser.524a5c4d901f9a99.js.map