"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[806],{8891:function(e){var t,i={DEBUG:!1,LIB_VERSION:"2.41.0"};if("undefined"===typeof window){var r={hostname:""};t={navigator:{userAgent:""},document:{location:r,referrer:""},screen:{width:0,height:0},location:r}}else t=window;var o=Array.prototype,n=Function.prototype,s=Object.prototype,a=o.slice,c=s.toString,p=s.hasOwnProperty,_=t.console,u=t.navigator,l=t.document,h=t.opera,d=t.screen,f=u.userAgent,g=n.bind,m=o.forEach,v=o.indexOf,y=o.map,b=Array.isArray,k={},w={trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},x={log:function(){if(i.DEBUG&&!w.isUndefined(_)&&_)try{_.log.apply(_,arguments)}catch(e){w.each(arguments,(function(e){_.log(e)}))}},warn:function(){if(i.DEBUG&&!w.isUndefined(_)&&_){var e=["Mixpanel warning:"].concat(w.toArray(arguments));try{_.warn.apply(_,e)}catch(t){w.each(e,(function(e){_.warn(e)}))}}},error:function(){if(i.DEBUG&&!w.isUndefined(_)&&_){var e=["Mixpanel error:"].concat(w.toArray(arguments));try{_.error.apply(_,e)}catch(t){w.each(e,(function(e){_.error(e)}))}}},critical:function(){if(!w.isUndefined(_)&&_){var e=["Mixpanel error:"].concat(w.toArray(arguments));try{_.error.apply(_,e)}catch(t){w.each(e,(function(e){_.error(e)}))}}}},I=function(e,t){return function(){return arguments[0]="["+t+"] "+arguments[0],e.apply(x,arguments)}},T=function(e){return{log:I(x.log,e),error:I(x.error,e),critical:I(x.critical,e)}};w.bind=function(e,t){var i,r;if(g&&e.bind===g)return g.apply(e,a.call(arguments,1));if(!w.isFunction(e))throw new TypeError;return i=a.call(arguments,2),r=function(){if(!(this instanceof r))return e.apply(t,i.concat(a.call(arguments)));var o={};o.prototype=e.prototype;var n=new o;o.prototype=null;var s=e.apply(n,i.concat(a.call(arguments)));return Object(s)===s?s:n}},w.bind_instance_methods=function(e){for(var t in e)"function"===typeof e[t]&&(e[t]=w.bind(e[t],e))},w.each=function(e,t,i){if(null!==e&&void 0!==e)if(m&&e.forEach===m)e.forEach(t,i);else if(e.length===+e.length){for(var r=0,o=e.length;r/g,">").replace(/"/g,""").replace(/'/g,"'")),t},w.extend=function(e){return w.each(a.call(arguments,1),(function(t){for(var i in t)void 0!==t[i]&&(e[i]=t[i])})),e},w.isArray=b||function(e){return"[object Array]"===c.call(e)},w.isFunction=function(e){try{return/^\s*\bfunction\b/.test(e)}catch(t){return!1}},w.isArguments=function(e){return!(!e||!p.call(e,"callee"))},w.toArray=function(e){return e?e.toArray?e.toArray():w.isArray(e)||w.isArguments(e)?a.call(e):w.values(e):[]},w.map=function(e,t,i){if(y&&e.map===y)return e.map(t,i);var r=[];return w.each(e,(function(e){r.push(t.call(i,e))})),r},w.keys=function(e){var t=[];return null===e||w.each(e,(function(e,i){t[t.length]=i})),t},w.values=function(e){var t=[];return null===e||w.each(e,(function(e){t[t.length]=e})),t},w.include=function(e,t){var i=!1;return null===e?i:v&&e.indexOf===v?-1!=e.indexOf(t):(w.each(e,(function(e){if(i||(i=e===t))return k})),i)},w.includes=function(e,t){return-1!==e.indexOf(t)},w.inherit=function(e,t){return e.prototype=new t,e.prototype.constructor=e,e.superclass=t.prototype,e},w.isObject=function(e){return e===Object(e)&&!w.isArray(e)},w.isEmptyObject=function(e){if(w.isObject(e)){for(var t in e)if(p.call(e,t))return!1;return!0}return!1},w.isUndefined=function(e){return void 0===e},w.isString=function(e){return"[object String]"==c.call(e)},w.isDate=function(e){return"[object Date]"==c.call(e)},w.isNumber=function(e){return"[object Number]"==c.call(e)},w.isElement=function(e){return!(!e||1!==e.nodeType)},w.encodeDates=function(e){return w.each(e,(function(t,i){w.isDate(t)?e[i]=w.formatDate(t):w.isObject(t)&&(e[i]=w.encodeDates(t))})),e},w.timestamp=function(){return Date.now=Date.now||function(){return+new Date},Date.now()},w.formatDate=function(e){function t(e){return e<10?"0"+e:e}return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())},w.safewrap=function(e){return function(){try{return e.apply(this,arguments)}catch(t){x.critical("Implementation error. Please turn on debug and contact support@mixpanel.com."),i.DEBUG&&x.critical(t)}}},w.safewrap_class=function(e,t){for(var i=0;i0&&(t[i]=e)})),t},w.truncate=function(e,t){var i;return"string"===typeof e?i=e.slice(0,t):w.isArray(e)?(i=[],w.each(e,(function(e){i.push(w.truncate(e,t))}))):w.isObject(e)?(i={},w.each(e,(function(e,r){i[r]=w.truncate(e,t)}))):i=e,i},w.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,i={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return t.lastIndex=0,t.test(e)?'"'+e.replace(t,(function(e){var t=i[e];return"string"===typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'},i=function(e,r){var o="",n=0,s="",a="",_=0,u=o,l=[],h=r[e];switch(h&&"object"===typeof h&&"function"===typeof h.toJSON&&(h=h.toJSON(e)),typeof h){case"string":return t(h);case"number":return isFinite(h)?String(h):"null";case"boolean":case"null":return String(h);case"object":if(!h)return"null";if(o+=" ",l=[],"[object Array]"===c.apply(h)){for(_=h.length,n=0;n<_;n+=1)l[n]=i(n,h)||"null";return a=0===l.length?"[]":o?"[\n"+o+l.join(",\n"+o)+"\n"+u+"]":"["+l.join(",")+"]",o=u,a}for(s in h)p.call(h,s)&&(a=i(s,h))&&l.push(t(s)+(o?": ":":")+a);return a=0===l.length?"{}":o?"{"+l.join(",")+u+"}":"{"+l.join(",")+"}",o=u,a}};return i("",{"":e})},w.JSONDecode=function(){var e,t,i,r,o={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},n=function(t){var r=new SyntaxError(t);throw r.at=e,r.text=i,r},s=function(r){return r&&r!==t&&n("Expected '"+r+"' instead of '"+t+"'"),t=i.charAt(e),e+=1,t},a=function(){var e,i="";for("-"===t&&(i="-",s("-"));t>="0"&&t<="9";)i+=t,s();if("."===t)for(i+=".";s()&&t>="0"&&t<="9";)i+=t;if("e"===t||"E"===t)for(i+=t,s(),"-"!==t&&"+"!==t||(i+=t,s());t>="0"&&t<="9";)i+=t,s();if(e=+i,isFinite(e))return e;n("Bad number")},c=function(){var e,i,r,a="";if('"'===t)for(;s();){if('"'===t)return s(),a;if("\\"===t)if(s(),"u"===t){for(r=0,i=0;i<4&&(e=parseInt(s(),16),isFinite(e));i+=1)r=16*r+e;a+=String.fromCharCode(r)}else{if("string"!==typeof o[t])break;a+=o[t]}else a+=t}n("Bad string")},p=function(){for(;t&&t<=" ";)s()};return r=function(){switch(p(),t){case"{":return function(){var e,i={};if("{"===t){if(s("{"),p(),"}"===t)return s("}"),i;for(;t;){if(e=c(),p(),s(":"),Object.hasOwnProperty.call(i,e)&&n('Duplicate key "'+e+'"'),i[e]=r(),p(),"}"===t)return s("}"),i;s(","),p()}}n("Bad object")}();case"[":return function(){var e=[];if("["===t){if(s("["),p(),"]"===t)return s("]"),e;for(;t;){if(e.push(r()),p(),"]"===t)return s("]"),e;s(","),p()}}n("Bad array")}();case'"':return c();case"-":return a();default:return t>="0"&&t<="9"?a():function(){switch(t){case"t":return s("t"),s("r"),s("u"),s("e"),!0;case"f":return s("f"),s("a"),s("l"),s("s"),s("e"),!1;case"n":return s("n"),s("u"),s("l"),s("l"),null}n('Unexpected "'+t+'"')}()}},function(o){var s;return i=o,e=0,t=" ",s=r(),p(),t&&n("Syntax error"),s}}(),w.base64Encode=function(e){var t,i,r,o,n,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a=0,c=0,p="",_=[];if(!e)return e;e=w.utf8Encode(e);do{t=(n=e.charCodeAt(a++)<<16|e.charCodeAt(a++)<<8|e.charCodeAt(a++))>>18&63,i=n>>12&63,r=n>>6&63,o=63&n,_[c++]=s.charAt(t)+s.charAt(i)+s.charAt(r)+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&&(i>t&&(n+=e.substring(t,i)),n+=a,t=i=o+1)}return i>t&&(n+=e.substring(t,e.length)),n},w.UUID=function(){var e=function(){for(var e=1*new Date,t=0;e==1*new Date;)t++;return e.toString(16)+t.toString(16)};return function(){var t=(d.height*d.width).toString(16);return e()+"-"+Math.random().toString(16).replace(".","")+"-"+function(){var e,t,i=f,r=[],o=0;function n(e,t){var i,o=0;for(i=0;i=4&&(o=n(o,r),r=[]);return r.length>0&&(o=n(o,r)),o.toString(16)}()+"-"+t+"-"+e()}}();var O=["baiduspider","bingbot","bingpreview","facebookexternal","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"];w.isBlockedUA=function(e){var t;for(e=e.toLowerCase(),t=0;t=0}function r(t){if(!l.getElementsByTagName)return[];var r,o,n,s,a,c,p,_,u,h,d=t.split(" "),f=[l];for(c=0;c-1){n=(o=r.split("#"))[0];var g=o[1],m=l.getElementById(g);if(!m||n&&m.nodeName.toLowerCase()!=n)return[];f=[m]}else if(r.indexOf(".")>-1){n=(o=r.split("."))[0];var v=o[1];for(n||(n="*"),s=[],a=0,p=0;p-1};break;default:b=function(e){return e.getAttribute(k)}}for(f=[],h=0,p=0;p=3?t[2]:""},properties:function(){return w.extend(w.strip_empty_properties({$os:w.info.os(),$browser:w.info.browser(f,u.vendor,h),$referrer:l.referrer,$referring_domain:w.info.referringDomain(l.referrer),$device:w.info.device(f)}),{$current_url:t.location.href,$browser_version:w.info.browserVersion(f,u.vendor,h),$screen_height:d.height,$screen_width:d.width,mp_lib:"web",$lib_version:i.LIB_VERSION,$insert_id:M(),time:w.timestamp()/1e3})},people_properties:function(){return w.extend(w.strip_empty_properties({$os:w.info.os(),$browser:w.info.browser(f,u.vendor,h)}),{$browser_version:w.info.browserVersion(f,u.vendor,h)})},pageviewInfo:function(e){return w.strip_empty_properties({mp_page:e,mp_referrer:l.referrer,mp_browser:w.info.browser(f,u.vendor,h),mp_platform:w.info.os()})}};var M=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},N=w.safewrap((function(e,t,i){e+=t;for(var r=5381,o=0;o>>0)%1004||"com"===r||"org"===r)&&(t=A);var o=e.match(t);return o?o[0]:""},P=null,U=null;"undefined"!==typeof JSON&&(P=JSON.stringify,U=JSON.parse),P=P||w.JSONEncode,U=U||w.JSONDecode,w.toArray=w.toArray,w.isObject=w.isObject,w.JSONEncode=w.JSONEncode,w.JSONDecode=w.JSONDecode,w.isBlockedUA=w.isBlockedUA,w.isEmptyObject=w.isEmptyObject,w.info=w.info,w.info.device=w.info.device,w.info.browser=w.info.browser,w.info.browserVersion=w.info.browserVersion,w.info.properties=w.info.properties;var F=function(){};F.prototype.create_properties=function(){},F.prototype.event_handler=function(){},F.prototype.after_track_handler=function(){},F.prototype.init=function(e){return this.mp=e,this},F.prototype.track=function(e,t,i,r){var o=this,n=w.dom_query(e);if(0!==n.length)return w.each(n,(function(e){w.register_event(e,this.override_event,(function(e){var n={},s=o.create_properties(i,this),a=o.mp.get_config("track_links_timeout");o.event_handler(e,this,n),window.setTimeout(o.track_callback(r,s,n,!0),a),o.mp.track(t,s,o.track_callback(r,s,n))}))}),this),!0;x.error("The DOM query ("+e+") returned 0 elements")},F.prototype.track_callback=function(e,t,i,r){r=r||!1;var o=this;return function(){i.callback_fired||(i.callback_fired=!0,e&&!1===e(r,t)||o.after_track_handler(t,i,r))}},F.prototype.create_properties=function(e,t){return"function"===typeof e?e(t):w.extend({},e)};var H=function(){this.override_event="click"};w.inherit(H,F),H.prototype.create_properties=function(e,t){var i=H.superclass.create_properties.apply(this,arguments);return t.href&&(i.url=t.href),i},H.prototype.event_handler=function(e,t,i){i.new_tab=2===e.which||e.metaKey||e.ctrlKey||"_blank"===t.target,i.href=t.href,i.new_tab||e.preventDefault()},H.prototype.after_track_handler=function(e,t){t.new_tab||setTimeout((function(){window.location=t.href}),0)};var $=function(){this.override_event="submit"};w.inherit($,F),$.prototype.event_handler=function(e,t,i){i.element=t,e.preventDefault()},$.prototype.after_track_handler=function(e,t){setTimeout((function(){t.element.submit()}),0)};var C=T("lock"),j=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||window.localStorage,this.pollIntervalMS=t.pollIntervalMS||100,this.timeoutMS=t.timeoutMS||2e3};j.prototype.withLock=function(e,t,i){i||"function"===typeof t||(i=t,t=null);var r=i||(new Date).getTime()+"|"+Math.random(),o=(new Date).getTime(),n=this.storageKey,s=this.pollIntervalMS,a=this.timeoutMS,c=this.storage,p=n+":X",_=n+":Y",u=n+":Z",l=function(e){t&&t(e)},h=function(e){if((new Date).getTime()-o>a)return C.error("Timeout waiting for mutex on "+n+"; clearing lock. ["+r+"]"),c.removeItem(u),c.removeItem(_),void g();setTimeout((function(){try{e()}catch(t){l(t)}}),s*(Math.random()+.1))},d=function(e,t){e()?t():h((function(){d(e,t)}))},f=function(){var e=c.getItem(_);if(e&&e!==r)return!1;if(c.setItem(_,r),c.getItem(_)===r)return!0;if(!E(c,!0))throw new Error("localStorage support dropped while acquiring lock");return!1},g=function(){c.setItem(p,r),d(f,(function(){c.getItem(p)!==r?h((function(){c.getItem(_)===r?d((function(){return!c.getItem(u)}),m):g()})):m()}))},m=function(){c.setItem(u,"1");try{e()}finally{c.removeItem(u),c.getItem(_)===r&&c.removeItem(_),c.getItem(p)===r&&c.removeItem(p)}};try{if(!E(c,!0))throw new Error("localStorage support check failed");g()}catch(v){l(v)}};var R=T("batch"),z=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||window.localStorage,this.lock=new j(e,{storage:this.storage}),this.pid=t.pid||null,this.memQueue=[]};z.prototype.enqueue=function(e,t,i){var r={id:M(),flushAfter:(new Date).getTime()+2*t,payload:e};this.lock.withLock(w.bind((function(){var t;try{var o=this.readFromStorage();o.push(r),(t=this.saveToStorage(o))&&this.memQueue.push(r)}catch(n){R.error("Error enqueueing item",e),t=!1}i&&i(t)}),this),(function(e){R.error("Error acquiring storage lock",e),i&&i(!1)}),this.pid)},z.prototype.fillBatch=function(e){var t=this.memQueue.slice(0,e);if(t.lengthn.flushAfter&&!r[n.id]&&(n.orphaned=!0,t.push(n),t.length>=e))break}}}return t};var G=function(e,t){var i=[];return w.each(e,(function(e){e.id&&!t[e.id]&&i.push(e)})),i};z.prototype.removeItemsByID=function(e,t){var i={};w.each(e,(function(e){i[e]=!0})),this.memQueue=G(this.memQueue,i),this.lock.withLock(w.bind((function(){var r;try{var o=this.readFromStorage();o=G(o,i),r=this.saveToStorage(o)}catch(n){R.error("Error removing items",e),r=!1}t&&t(r)}),this),(function(e){R.error("Error acquiring storage lock",e),t&&t(!1)}),this.pid)};var L=function(e,t){var i=[];return w.each(e,(function(e){var r=e.id;if(r in t){var o=t[r];null!==o&&(e.payload=o,i.push(e))}else i.push(e)})),i};z.prototype.updatePayloads=function(e,t){this.memQueue=L(this.memQueue,e),this.lock.withLock(w.bind((function(){var i;try{var r=this.readFromStorage();r=L(r,e),i=this.saveToStorage(r)}catch(o){R.error("Error updating items",e),i=!1}t&&t(i)}),this),(function(e){R.error("Error acquiring storage lock",e),t&&t(!1)}),this.pid)},z.prototype.readFromStorage=function(){var e;try{(e=this.storage.getItem(this.storageKey))&&(e=U(e),w.isArray(e)||(R.error("Invalid storage entry:",e),e=null))}catch(t){R.error("Error retrieving queue",t),e=null}return e||[]},z.prototype.saveToStorage=function(e){try{return this.storage.setItem(this.storageKey,P(e)),!0}catch(t){return R.error("Error saving queue",t),!1}},z.prototype.clear=function(){this.memQueue=[],this.storage.removeItem(this.storageKey)};var W=T("batch"),X=function(e,t){this.queue=new z(e,{storage:t.storage}),this.libConfig=t.libConfig,this.sendRequest=t.sendRequestFunc,this.beforeSendHook=t.beforeSendHook,this.batchSize=this.libConfig.batch_size,this.flushInterval=this.libConfig.batch_flush_interval_ms,this.stopped=!this.libConfig.batch_autostart};X.prototype.enqueue=function(e,t){this.queue.enqueue(e,this.flushInterval,t)},X.prototype.start=function(){this.stopped=!1,this.flush()},X.prototype.stop=function(){this.stopped=!0,this.timeoutID&&(clearTimeout(this.timeoutID),this.timeoutID=null)},X.prototype.clear=function(){this.queue.clear()},X.prototype.resetBatchSize=function(){this.batchSize=this.libConfig.batch_size},X.prototype.resetFlush=function(){this.scheduleFlush(this.libConfig.batch_flush_interval_ms)},X.prototype.scheduleFlush=function(e){this.flushInterval=e,this.stopped||(this.timeoutID=setTimeout(w.bind(this.flush,this),this.flushInterval))},X.prototype.flush=function(e){try{if(this.requestInProgress)return void W.log("Flush: Request already in progress");e=e||{};var t=this.libConfig.batch_request_timeout_ms,i=(new Date).getTime(),r=this.batchSize,o=this.queue.fillBatch(r),n=[],s={};if(w.each(o,(function(e){var t=e.payload;this.beforeSendHook&&!e.orphaned&&(t=this.beforeSendHook(t)),t&&n.push(t),s[e.id]=t}),this),n.length<1)return void this.resetFlush();this.requestInProgress=!0;var a=w.bind((function(n){this.requestInProgress=!1;try{var a=!1;if(e.unloading)this.queue.updatePayloads(s);else if(w.isObject(n)&&"timeout"===n.error&&(new Date).getTime()-i>=t)W.error("Network timeout; retrying"),this.flush();else if(w.isObject(n)&&n.xhr_req&&(n.xhr_req.status>=500||n.xhr_req.status<=0)){var c=2*this.flushInterval,p=n.xhr_req.responseHeaders;if(p){var _=p["Retry-After"];_&&(c=1e3*parseInt(_,10)||c)}c=Math.min(6e5,c),W.error("Error; retry in "+c+" ms"),this.scheduleFlush(c)}else if(w.isObject(n)&&n.xhr_req&&413===n.xhr_req.status)if(o.length>1){var u=Math.max(1,Math.floor(r/2));this.batchSize=Math.min(this.batchSize,u,o.length-1),W.error("413 response; reducing batch size to "+this.batchSize),this.resetFlush()}else W.error("Single-event request too large; dropping",o),this.resetBatchSize(),a=!0;else a=!0;a&&this.queue.removeItemsByID(w.map(o,(function(e){return e.id})),w.bind(this.flush,this))}catch(l){W.error("Error handling API response",l),this.resetFlush()}}),this),c={method:"POST",verbose:!0,ignore_json_errors:!0,timeout_ms:t};e.unloading&&(c.transport="sendBeacon"),W.log("MIXPANEL REQUEST:",n),this.sendRequest(n,c,a)}catch(p){W.error("Error flushing request queue",p),this.resetFlush()}};function K(e,t){ne(!0,e,t)}function J(e,t){ne(!1,e,t)}function Y(e,t){return"1"===oe(e,t)}function V(e,i){if(function(e){if(e&&e.ignoreDnt)return!1;var i=e&&e.window||t,r=i.navigator||{},o=!1;return w.each([r.doNotTrack,r.msDoNotTrack,i.doNotTrack],(function(e){w.includes([!0,1,"1","yes"],e)&&(o=!0)})),o}(i))return x.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 r="0"===oe(e,i);return r&&x.warn("You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data."),r}function Q(e){return se(e,(function(e){return this.get_config(e)}))}function Z(e){return se(e,(function(e){return this._get_config(e)}))}function ee(e){return se(e,(function(e){return this._get_config(e)}))}function te(e,t){ie(t=t||{}).remove(re(e,t),!!t.crossSubdomainCookie,t.cookieDomain)}function ie(e){return"localStorage"===(e=e||{}).persistenceType?w.localStorage:w.cookie}function re(e,t){return((t=t||{}).persistencePrefix||"__mp_opt_in_out_")+e}function oe(e,t){return ie(t).get(re(e,t))}function ne(e,t,i){w.isString(t)&&t.length?(ie(i=i||{}).set(re(t,i),e?1:0,w.isNumber(i.cookieExpiration)?i.cookieExpiration:null,!!i.crossSubdomainCookie,!!i.secureCookie,!!i.crossSiteCookie,i.cookieDomain),i.track&&e&&i.track(i.trackEventName||"$opt_in",i.trackProperties,{send_immediately:!0})):x.error("gdpr."+(e?"optIn":"optOut")+" called with an invalid token")}function se(e,t){return function(){var i=!1;try{var r=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");r&&(i=V(r,{ignoreDnt:o,persistenceType:n,persistencePrefix:s,window:a}))}catch(p){x.error("Unexpected error when checking tracking opt-out status: "+p)}if(!i)return e.apply(this,arguments);var c=arguments[arguments.length-1];"function"===typeof c&&c(0)}}var ae="$set",ce="$set_once",pe="$unset",_e="$add",ue="$append",le="$union",he="$remove",de={set_action:function(e,t){var i={},r={};return w.isObject(e)?w.each(e,(function(e,t){this._is_reserved_property(t)||(r[t]=e)}),this):r[e]=t,i.$set=r,i},unset_action:function(e){var t={},i=[];return w.isArray(e)||(e=[e]),w.each(e,(function(e){this._is_reserved_property(e)||i.push(e)}),this),t.$unset=i,t},set_once_action:function(e,t){var i={},r={};return w.isObject(e)?w.each(e,(function(e,t){this._is_reserved_property(t)||(r[t]=e)}),this):r[e]=t,i.$set_once=r,i},union_action:function(e,t){var i={},r={};return w.isObject(e)?w.each(e,(function(e,t){this._is_reserved_property(t)||(r[t]=w.isArray(e)?e:[e])}),this):r[e]=w.isArray(t)?t:[t],i.$union=r,i},append_action:function(e,t){var i={},r={};return w.isObject(e)?w.each(e,(function(e,t){this._is_reserved_property(t)||(r[t]=e)}),this):r[e]=t,i.$append=r,i},remove_action:function(e,t){var i={},r={};return w.isObject(e)?w.each(e,(function(e,t){this._is_reserved_property(t)||(r[t]=e)}),this):r[e]=t,i.$remove=r,i},delete_action:function(){var e={$delete:""};return e}},fe=function(){};w.extend(fe.prototype,de),fe.prototype._init=function(e,t,i){this._mixpanel=e,this._group_key=t,this._group_id=i},fe.prototype.set=ee((function(e,t,i){var r=this.set_action(e,t);return w.isObject(e)&&(i=t),this._send_request(r,i)})),fe.prototype.set_once=ee((function(e,t,i){var r=this.set_once_action(e,t);return w.isObject(e)&&(i=t),this._send_request(r,i)})),fe.prototype.unset=ee((function(e,t){var i=this.unset_action(e);return this._send_request(i,t)})),fe.prototype.union=ee((function(e,t,i){w.isObject(e)&&(i=t);var r=this.union_action(e,t);return this._send_request(r,i)})),fe.prototype.delete=ee((function(e){var t=this.delete_action();return this._send_request(t,e)})),fe.prototype.remove=ee((function(e,t,i){var r=this.remove_action(e,t);return this._send_request(r,i)})),fe.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 i=w.encodeDates(e);return this._mixpanel._track_or_batch({type:"groups",data:i,endpoint:this._get_config("api_host")+"/groups/",batcher:this._mixpanel.request_batchers.groups},t)},fe.prototype._is_reserved_property=function(e){return"$group_key"===e||"$group_id"===e},fe.prototype._get_config=function(e){return this._mixpanel.get_config(e)},fe.prototype.toString=function(){return this._mixpanel.toString()+".group."+this._group_key+"."+this._group_id},fe.prototype.remove=fe.prototype.remove,fe.prototype.set=fe.prototype.set,fe.prototype.set_once=fe.prototype.set_once,fe.prototype.union=fe.prototype.union,fe.prototype.unset=fe.prototype.unset,fe.prototype.toString=fe.prototype.toString;var ge="__mps",me="__mpso",ve="__mpus",ye="__mpa",be="__mpap",ke="__mpr",we="__mpu",xe="$people_distinct_id",Ie="__alias",Te="__cmpns",Oe="__timers",Se=[ge,me,ve,ye,be,ke,we,xe,Ie,Te,Oe],Ee=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&&(x.critical("Unknown persistence type "+t+"; falling back to cookie"),t=e.persistence="cookie"),"localStorage"===t&&w.localStorage.is_supported()?this.storage=w.localStorage:this.storage=w.cookie,this.load(),this.update_config(e),this.upgrade(e),this.save()};Ee.prototype.properties=function(){var e={};return w.each(this.props,(function(t,i){w.include(Se,i)||(e[i]=t)})),e},Ee.prototype.load=function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=w.extend({},e))}},Ee.prototype.upgrade=function(e){var t,i,r=e.upgrade;r&&(t="mp_super_properties","string"===typeof r&&(t=r),i=this.storage.parse(t),this.storage.remove(t),this.storage.remove(t,!0),i&&(this.props=w.extend(this.props,i.all,i.events))),e.cookie_name||"mixpanel"===e.name||(t="mp_"+e.token+"_"+e.name,(i=this.storage.parse(t))&&(this.storage.remove(t),this.storage.remove(t,!0),this.register_once(i))),this.storage===w.localStorage&&(i=w.cookie.parse(this.name),w.cookie.remove(this.name),w.cookie.remove(this.name,!0),i&&this.register_once(i))},Ee.prototype.save=function(){this.disabled||(this._expire_notification_campaigns(),this.storage.set(this.name,w.JSONEncode(this.props),this.expire_days,this.cross_subdomain,this.secure,this.cross_site,this.cookie_domain))},Ee.prototype.remove=function(){this.storage.remove(this.name,!1,this.cookie_domain),this.storage.remove(this.name,!0,this.cookie_domain)},Ee.prototype.clear=function(){this.remove(),this.props={}},Ee.prototype.register_once=function(e,t,i){return!!w.isObject(e)&&("undefined"===typeof t&&(t="None"),this.expire_days="undefined"===typeof i?this.default_expiry:i,w.each(e,(function(e,i){this.props.hasOwnProperty(i)&&this.props[i]!==t||(this.props[i]=e)}),this),this.save(),!0)},Ee.prototype.register=function(e,t){return!!w.isObject(e)&&(this.expire_days="undefined"===typeof t?this.default_expiry:t,w.extend(this.props,e),this.save(),!0)},Ee.prototype.unregister=function(e){e in this.props&&(delete this.props[e],this.save())},Ee.prototype._expire_notification_campaigns=w.safewrap((function(){var e=this.props.__cmpns,t=i.DEBUG?6e4:36e5;if(e){for(var r in e)1*new Date-e[r]>t&&delete e[r];w.isEmptyObject(e)&&delete this.props.__cmpns}})),Ee.prototype.update_campaign_params=function(){this.campaign_params_saved||(this.register_once(w.info.campaignParams()),this.campaign_params_saved=!0)},Ee.prototype.update_search_keyword=function(e){this.register(w.info.searchInfo(e))},Ee.prototype.update_referrer_info=function(e){this.register_once({$initial_referrer:e||"$direct",$initial_referring_domain:w.info.referringDomain(e)||"$direct"},"")},Ee.prototype.get_referrer_info=function(){return w.strip_empty_properties({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})},Ee.prototype.safe_merge=function(e){return w.each(this.props,(function(t,i){i in e||(e[i]=t)})),e},Ee.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)},Ee.prototype.set_disabled=function(e){this.disabled=e,this.disabled?this.remove():this.save()},Ee.prototype.set_cookie_domain=function(e){e!==this.cookie_domain&&(this.remove(),this.cookie_domain=e,this.save())},Ee.prototype.set_cross_site=function(e){e!==this.cross_site&&(this.cross_site=e,this.remove(),this.save())},Ee.prototype.set_cross_subdomain=function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())},Ee.prototype.get_cross_subdomain=function(){return this.cross_subdomain},Ee.prototype.set_secure=function(e){e!==this.secure&&(this.secure=!!e,this.remove(),this.save())},Ee.prototype._add_to_people_queue=function(e,t){var i=this._get_queue_key(e),r=t[e],o=this._get_or_create_queue(ae),n=this._get_or_create_queue(ce),s=this._get_or_create_queue(pe),a=this._get_or_create_queue(_e),c=this._get_or_create_queue(le),p=this._get_or_create_queue(he,[]),_=this._get_or_create_queue(ue,[]);i===ge?(w.extend(o,r),this._pop_from_people_queue(_e,r),this._pop_from_people_queue(le,r),this._pop_from_people_queue(pe,r)):i===me?(w.each(r,(function(e,t){t in n||(n[t]=e)})),this._pop_from_people_queue(pe,r)):i===ve?w.each(r,(function(e){w.each([o,n,a,c],(function(t){e in t&&delete t[e]})),w.each(_,(function(t){e in t&&delete t[e]})),s[e]=!0})):i===ye?(w.each(r,(function(e,t){t in o?o[t]+=e:(t in a||(a[t]=0),a[t]+=e)}),this),this._pop_from_people_queue(pe,r)):i===we?(w.each(r,(function(e,t){w.isArray(e)&&(t in c||(c[t]=[]),c[t]=c[t].concat(e))})),this._pop_from_people_queue(pe,r)):i===ke?(p.push(r),this._pop_from_people_queue(ue,r)):i===be&&(_.push(r),this._pop_from_people_queue(pe,r)),x.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):"),x.log(t),this.save()},Ee.prototype._pop_from_people_queue=function(e,t){var i=this._get_queue(e);w.isUndefined(i)||(w.each(t,(function(t,r){e===ue||e===he?w.each(i,(function(e){e[r]===t&&delete e[r]})):delete i[r]}),this),this.save())},Ee.prototype._get_queue_key=function(e){return e===ae?ge:e===ce?me:e===pe?ve:e===_e?ye:e===ue?be:e===he?ke:e===le?we:void x.error("Invalid queue:",e)},Ee.prototype._get_queue=function(e){return this.props[this._get_queue_key(e)]},Ee.prototype._get_or_create_queue=function(e,t){var i=this._get_queue_key(e);return t=w.isUndefined(t)?{}:t,this.props[i]||(this.props[i]=t)},Ee.prototype.set_event_timer=function(e,t){var i=this.props.__timers||{};i[e]=t,this.props.__timers=i,this.save()},Ee.prototype.remove_event_timer=function(e){var t=(this.props.__timers||{})[e];return w.isUndefined(t)||(delete this.props.__timers[e],this.save()),t};var qe="in",Me="not in",Ne="-",Ae="*",De="/",Be="%",Pe="==",Ue="!=",Fe=">",He="<",$e=">=",Ce="<=",je="boolean",Re="datetime",ze="list",Ge="number",Le="string",We="defined",Xe="not defined";function Ke(e){if(null===e)return null;switch(typeof e){case"object":return w.isDate(e)&&e.getTime()>=0?e.getTime():null;case"boolean":return Number(e);case"number":return e;case"string":return e=Number(e),isNaN(e)?0:e}return null}function Je(e){if(null===e)return!1;switch(typeof e){case"boolean":return e;case"number":return 0!==e;case"string":return e.length>0;case"object":return!!(w.isArray(e)&&e.length>0)||(!!(w.isDate(e)&&e.getTime()>0)||!(!w.isObject(e)||w.isEmptyObject(e)))}return!1}function Ye(e,t){if(!e.operator||-1===[Pe,Ue].indexOf(e.operator)||!e.children||2!==e.children.length)throw"Invalid equality operator "+e;var i=function(e,t){if(null===e&&e===t)return!0;if(typeof e===typeof t)switch(typeof e){case"number":case"string":case"boolean":return e===t;case"object":if(w.isArray(e)&&w.isArray(t))return function(e,t){if(e===t)return!0;if(null===e||null===t)return!1;if(e.length!==t.length)return!1;for(var i=0;i-1;return e.operator===Me?!o:o}(e,t);case"+":return function(e,t){if(!e.operator||"+"!==e.operator||!e.children||e.children.length<2)throw"Invalid operator: PLUS "+e;var i=Ze(e.children[0],t),r=Ze(e.children[1],t);return"number"===typeof i&&"number"===typeof r||"string"===typeof i&&"string"===typeof r?i+r:null}(e,t);case Ne:case Ae:case De:case Be:return function(e,t){if(!e.operator||-1===[Ne,Ae,De,Be].indexOf(e.operator)||!e.children||e.children.length<2)throw"Invalid arithmetic operator "+e;var i=Ze(e.children[0],t),r=Ze(e.children[1],t);if("number"===typeof i&&"number"===typeof r)switch(e.operator){case Ne:return i-r;case Ae:return i*r;case De:return 0!==r?i/r:null;case Be:return 0===r?null:0===i?0:i<0&&r>0||i>0&&r<0?-(Math.floor(i/r)*r-i):i%r;default:throw"Unknown operator: "+e.operator}return null}(e,t);case Pe:case Ue:return Ye(e,t);case Fe:case He:case $e:case Ce:return function(e,t){if(!e.operator||-1===[Fe,$e,He,Ce].indexOf(e.operator)||!e.children||2!==e.children.length)throw"Invalid comparison operator "+e;var i=Ze(e.children[0],t),r=Ze(e.children[1],t);if(typeof i===typeof r)if("number"===typeof r||w.isDate(r))switch(i=Ke(i),r=Ke(r),e.operator){case Fe:return i>r;case $e:return i>=r;case He:return i0;case $e:return o>=0;case He:return o<0;case Ce:return o<=0}}return null}(e,t);case je:return function(e,t){if(!e.operator||e.operator!==je||!e.children||1!==e.children.length)throw"Invalid cast operator: boolean "+e;return Je(Ze(e.children[0],t))}(e,t);case Re:return function(e,t){if(!e.operator||e.operator!==Re||!e.children||1!==e.children.length)throw"Invalid cast operator: datetime "+e;var i=Ze(e.children[0],t);if(null===i)return null;switch(typeof i){case"number":case"string":var r=new Date(i);return isNaN(r.getTime())?null:r;case"object":if(w.isDate(i))return i}return null}(e,t);case ze:return function(e,t){if(!e.operator||e.operator!==ze||!e.children||1!==e.children.length)throw"Invalid cast operator: list "+e;var i=Ze(e.children[0],t);return null===i?null:w.isArray(i)?i:null}(e,t);case Ge:return function(e,t){if(!e.operator||e.operator!==Ge||!e.children||1!==e.children.length)throw"Invalid cast operator: number "+e;return Ke(Ze(e.children[0],t))}(e,t);case Le:return function(e,t){if(!e.operator||e.operator!==Le||!e.children||1!==e.children.length)throw"Invalid cast operator: string "+e;var i=Ze(e.children[0],t);switch(typeof i){case"object":return w.isDate(i)?i.toJSON():JSON.stringify(i)}return String(i)}(e,t);case We:case Xe:return function(e,t){if(!e.operator||-1===[We,Xe].indexOf(e.operator)||!e.children||1!==e.children.length)throw"Invalid defined/not defined operator: "+e;var i=null!==Ze(e.children[0],t);return e.operator===Xe?!i:i}(e,t);case"not":return function(e,t){if(!e.operator||"not"!==e.operator||!e.children||1!==e.children.length)throw"Invalid not operator: "+e;var i=Ze(e.children[0],t);return null===i||("boolean"===typeof i?!i:null)}(e,t)}}function Qe(e,t){if(!e.property||!e.value)throw"Invalid operand: missing required keys "+e;switch(e.property){case"event":return void 0!==t[e.value]?t[e.value]:null;case"literal":return"now"===e.value?new Date:"object"===typeof e.value?function(e){var t=e.window;if(!t||!t.unit||!t.value)throw"Invalid window: missing required keys "+JSON.stringify(e);var i=new Date;switch(t.unit){case"hour":i.setTime(i.getTime()+-1*t.value*60*60*1e3);break;case"day":i.setTime(i.getTime()+-1*t.value*24*60*60*1e3);break;case"week":i.setTime(i.getTime()+-1*t.value*7*24*60*60*1e3);break;case"month":i.setTime(i.getTime()+-1*t.value*30*24*60*60*1e3);break;default:throw"Invalid unit: "+t.unit}return i}(e.value):e.value;default:throw"Invalid operand: Invalid property type "+e.property}}function Ze(e,t){return e.property?Qe(e,t):e.operator?Ve(e,t):void 0}var et=function(e,t){w.bind_instance_methods(this),this.mixpanel=t,this.persistence=this.mixpanel.persistence,this.resource_protocol=this.mixpanel.get_config("inapp_protocol"),this.cdn_host=this.mixpanel.get_config("cdn"),this.campaign_id=w.escapeHTML(e.id),this.message_id=w.escapeHTML(e.message_id),this.body=(w.escapeHTML(e.body)||"").replace(/\n/g,"
"),this.cta=w.escapeHTML(e.cta)||"Close",this.notif_type=w.escapeHTML(e.type)||"takeover",this.style=w.escapeHTML(e.style)||"light",this.title=w.escapeHTML(e.title)||"",this.video_width=et.VIDEO_WIDTH,this.video_height=et.VIDEO_HEIGHT,this.display_triggers=e.display_triggers||[],this.dest_url=e.cta_url||null,this.image_url=e.image_url||null,this.thumb_image_url=e.thumb_image_url||null,this.video_url=e.video_url||null,this.thumb_image_url&&0===this.thumb_image_url.indexOf("//")&&(this.thumb_image_url=this.thumb_image_url.replace("//",this.resource_protocol)),this.clickthrough=!0,this.dest_url||(this.dest_url="#dismiss",this.clickthrough=!1),this.mini="mini"===this.notif_type,this.mini||(this.notif_type="takeover"),this.notif_width=this.mini?et.NOTIF_WIDTH_MINI:et.NOTIF_WIDTH,this._set_client_config(),this.imgs_to_preload=this._init_image_html(),this._init_video()};et.ANIM_TIME=200,et.MARKUP_PREFIX="mixpanel-notification",et.BG_OPACITY=.6,et.NOTIF_TOP=25,et.NOTIF_START_TOP=200,et.NOTIF_WIDTH=388,et.NOTIF_WIDTH_MINI=420,et.NOTIF_HEIGHT_MINI=85,et.THUMB_BORDER_SIZE=5,et.THUMB_IMG_SIZE=60,et.THUMB_OFFSET=Math.round(et.THUMB_IMG_SIZE/2),et.VIDEO_WIDTH=595,et.VIDEO_HEIGHT=334,et.prototype.show=function(){var e=this;this._set_client_config(),this.body_el?(this._init_styles(),this._init_notification_el(),this._preload_images(this._attach_and_animate)):setTimeout((function(){e.show()}),300)},et.prototype.dismiss=w.safewrap((function(){this.marked_as_shown||this._mark_delivery({invisible:!0});var e,t,i,r=this.showing_video?this._get_el("video"):this._get_notification_display_el();this.use_transitions?(this._remove_class("bg","visible"),this._add_class(r,"exiting"),setTimeout(this._remove_notification_el,et.ANIM_TIME)):(this.mini?(e="right",t=20,i=-100):(e="top",t=et.NOTIF_TOP,i=et.NOTIF_START_TOP+et.NOTIF_TOP),this._animate_els([{el:this._get_el("bg"),attr:"opacity",start:et.BG_OPACITY,goal:0},{el:r,attr:"opacity",start:1,goal:0},{el:r,attr:e,start:t,goal:i}],et.ANIM_TIME,this._remove_notification_el))})),et.prototype._add_class=w.safewrap((function(e,t){t=et.MARKUP_PREFIX+"-"+t,"string"===typeof e&&(e=this._get_el(e)),e.className?~(" "+e.className+" ").indexOf(" "+t+" ")||(e.className+=" "+t):e.className=t})),et.prototype._remove_class=w.safewrap((function(e,t){t=et.MARKUP_PREFIX+"-"+t,"string"===typeof e&&(e=this._get_el(e)),e.className&&(e.className=(" "+e.className+" ").replace(" "+t+" ","").replace(/^[\s\xA0]+/,"").replace(/[\s\xA0]+$/,""))})),et.prototype._animate_els=w.safewrap((function(e,t,i,r){var o,n,s,a=this,c=!1,p=1*new Date;for(s=p-(r=r||p),o=0;o=n.start?1:-1;n.val=n.start+_*s/t,"opacity"!==n.attr&&(n.val=Math.round(n.val)),(u>0&&n.val>=n.goal||u<0&&n.val<=n.goal)&&(n.val=n.goal)}if(c){for(o=0;o'):this.img_html="",this.thumb_image_url?(e.push(this.thumb_image_url),this.thumb_img_html=''):this.thumb_img_html=""),e},et.prototype._init_notification_el=function(){var e="",t="",i="",r='';if(this.notification_el=document.createElement("div"),this.notification_el.id=et.MARKUP_PREFIX+"-wrapper",this.mini)e='';else{var o=this.clickthrough||this.show_video?"":'',n=this.show_video?'':"";this._browser_lte("ie",7)&&(o="",n=""),e=''+this.thumb_img_html+'
'+r+'
'+this.img_html+'
'+this.title+'
'+this.body+'
"}this.youtube_video?(t=this.resource_protocol+"www.youtube.com/embed/"+this.youtube_video+"?wmode=transparent&showinfo=0&modestbranding=0&rel=0&autoplay=1&loop=0&vq=hd1080",this.yt_custom&&(t+="&enablejsapi=1&html5=1&controls=0",i='')):this.vimeo_video&&(t=this.resource_protocol+"player.vimeo.com/video/"+this.vimeo_video+"?autoplay=1&title=0&byline=0&portrait=0"),this.show_video&&(this.video_iframe='',i='");var s=i+e;this.flip_animate&&(s=(this.mini?e:"")+'"),this.notification_el.innerHTML=('").replace(/class="/g,'class="'+et.MARKUP_PREFIX+"-").replace(/id="/g,'id="'+et.MARKUP_PREFIX+"-")},et.prototype._init_styles=function(){"dark"===this.style?this.style_vals={bg:"#1d1f25",bg_actions:"#282b32",bg_hover:"#3a4147",bg_light:"#4a5157",border_gray:"#32353c",cancel_opacity:"0.4",mini_hover:"#2a3137",text_title:"#fff",text_main:"#9498a3",text_tagline:"#464851",text_hover:"#ddd"}:this.style_vals={bg:"#fff",bg_actions:"#e7eaee",bg_hover:"#eceff3",bg_light:"#f5f5f5",border_gray:"#e4ecf2",cancel_opacity:"1.0",mini_hover:"#fafafa",text_title:"#5c6578",text_main:"#8b949b",text_tagline:"#ced9e6",text_hover:"#7c8598"};var e="0px 0px 35px 0px rgba(45, 49, 56, 0.7)",t=e,i=e,r=et.THUMB_IMG_SIZE+2*et.THUMB_BORDER_SIZE,o=et.ANIM_TIME/1e3+"s";this.mini&&(e="none");var n={};n["@media only screen and (max-width: "+(et.NOTIF_WIDTH_MINI+20-1)+"px)"]={"#overlay":{display:"none"}};var s={".flipped":{transform:"rotateY(180deg)"},"#overlay":{position:"fixed",top:"0",left:"0",width:"100%",height:"100%",overflow:"auto","text-align":"center","z-index":"10000","font-family":'"Helvetica", "Arial", sans-serif',"-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale"},"#overlay.mini":{height:"0",overflow:"visible"},"#overlay a":{width:"initial",padding:"0","text-decoration":"none","text-transform":"none",color:"inherit"},"#bgwrapper":{position:"relative",width:"100%",height:"100%"},"#bg":{position:"fixed",top:"0",left:"0",width:"100%",height:"100%","min-width":4*this.doc_width+"px","min-height":4*this.doc_height+"px","background-color":"black",opacity:"0.0","-ms-filter":"progid:DXImageTransform.Microsoft.Alpha(Opacity=60)",filter:"alpha(opacity=60)",transition:"opacity "+o},"#bg.visible":{opacity:et.BG_OPACITY},".mini #bg":{width:"0",height:"0","min-width":"0"},"#flipcontainer":{perspective:"1000px",position:"absolute",width:"100%"},"#flipper":{position:"relative","transform-style":"preserve-3d",transition:"0.3s"},"#takeover":{position:"absolute",left:"50%",width:et.NOTIF_WIDTH+"px","margin-left":Math.round(-et.NOTIF_WIDTH/2)+"px","backface-visibility":"hidden",transform:"rotateY(0deg)",opacity:"0.0",top:et.NOTIF_START_TOP+"px",transition:"opacity "+o+", top "+o},"#takeover.visible":{opacity:"1.0",top:et.NOTIF_TOP+"px"},"#takeover.exiting":{opacity:"0.0",top:et.NOTIF_START_TOP+"px"},"#thumbspacer":{height:et.THUMB_OFFSET+"px"},"#thumbborder-wrapper":{position:"absolute",top:-et.THUMB_BORDER_SIZE+"px",left:et.NOTIF_WIDTH/2-et.THUMB_OFFSET-et.THUMB_BORDER_SIZE+"px",width:r+"px",height:r/2+"px",overflow:"hidden"},"#thumbborder":{position:"absolute",width:r+"px",height:r+"px","border-radius":r+"px","background-color":this.style_vals.bg_actions,opacity:"0.5"},"#thumbnail":{position:"absolute",top:"0px",left:et.NOTIF_WIDTH/2-et.THUMB_OFFSET+"px",width:et.THUMB_IMG_SIZE+"px",height:et.THUMB_IMG_SIZE+"px",overflow:"hidden","z-index":"100","border-radius":et.THUMB_IMG_SIZE+"px"},"#mini":{position:"absolute",right:"20px",top:et.NOTIF_TOP+"px",width:this.notif_width+"px",height:2*et.NOTIF_HEIGHT_MINI+"px","margin-top":20-et.NOTIF_HEIGHT_MINI+"px","backface-visibility":"hidden",opacity:"0.0",transform:"rotateX(90deg)",transition:"opacity 0.3s, transform 0.3s, right 0.3s"},"#mini.visible":{opacity:"1.0",transform:"rotateX(0deg)"},"#mini.exiting":{opacity:"0.0",right:"-150px"},"#mainbox":{"border-radius":"4px","box-shadow":e,"text-align":"center","background-color":this.style_vals.bg,"font-size":"14px",color:this.style_vals.text_main},"#mini #mainbox":{height:et.NOTIF_HEIGHT_MINI+"px","margin-top":et.NOTIF_HEIGHT_MINI+"px","border-radius":"3px",transition:"background-color "+o},"#mini-border":{height:et.NOTIF_HEIGHT_MINI+6+"px",width:et.NOTIF_WIDTH_MINI+6+"px",position:"absolute",top:"-3px",left:"-3px","margin-top":et.NOTIF_HEIGHT_MINI+"px","border-radius":"6px",opacity:"0.25","background-color":"#fff","z-index":"-1","box-shadow":i},"#mini-icon":{position:"relative",display:"inline-block",width:"75px",height:et.NOTIF_HEIGHT_MINI+"px","border-radius":"3px 0 0 3px","background-color":this.style_vals.bg_actions,background:"linear-gradient(135deg, "+this.style_vals.bg_light+" 0%, "+this.style_vals.bg_actions+" 100%)",transition:"background-color "+o},"#mini:hover #mini-icon":{"background-color":this.style_vals.mini_hover},"#mini:hover #mainbox":{"background-color":this.style_vals.mini_hover},"#mini-icon-img":{position:"absolute","background-image":"url("+this.thumb_image_url+")",width:"48px",height:"48px",top:"20px",left:"12px"},"#content":{padding:"30px 20px 0px 20px"},"#mini-content":{"text-align":"left",height:et.NOTIF_HEIGHT_MINI+"px",cursor:"pointer"},"#img":{width:"328px","margin-top":"30px","border-radius":"5px"},"#title":{"max-height":"600px",overflow:"hidden","word-wrap":"break-word",padding:"25px 0px 20px 0px","font-size":"19px","font-weight":"bold",color:this.style_vals.text_title},"#body":{"max-height":"600px","margin-bottom":"25px",overflow:"hidden","word-wrap":"break-word","line-height":"21px","font-size":"15px","font-weight":"normal","text-align":"left"},"#mini #body":{display:"inline-block","max-width":"250px",margin:"0 0 0 30px",height:et.NOTIF_HEIGHT_MINI+"px","font-size":"16px","letter-spacing":"0.8px",color:this.style_vals.text_title},"#mini #body-text":{display:"table",height:et.NOTIF_HEIGHT_MINI+"px"},"#mini #body-text div":{display:"table-cell","vertical-align":"middle"},"#tagline":{"margin-bottom":"15px","font-size":"10px","font-weight":"600","letter-spacing":"0.8px",color:"#ccd7e0","text-align":"left"},"#tagline a":{color:this.style_vals.text_tagline,transition:"color "+o},"#tagline a:hover":{color:this.style_vals.text_hover},"#cancel":{position:"absolute",right:"0",width:"8px",height:"8px",padding:"10px","border-radius":"20px",margin:"12px 12px 0 0","box-sizing":"content-box",cursor:"pointer",transition:"background-color "+o},"#mini #cancel":{margin:"7px 7px 0 0"},"#cancel-icon":{width:"8px",height:"8px",overflow:"hidden","background-image":"url("+this.cdn_host+"/site_media/images/icons/notifications/cancel-x.png)",opacity:this.style_vals.cancel_opacity},"#cancel:hover":{"background-color":this.style_vals.bg_hover},"#button":{display:"block",height:"60px","line-height":"60px","text-align":"center","background-color":this.style_vals.bg_actions,"border-radius":"0 0 4px 4px",overflow:"hidden",cursor:"pointer",transition:"background-color "+o},"#button-close":{display:"inline-block",width:"9px",height:"60px","margin-right":"8px","vertical-align":"top","background-image":"url("+this.cdn_host+"/site_media/images/icons/notifications/close-x-"+this.style+".png)","background-repeat":"no-repeat","background-position":"0px 25px"},"#button-play":{display:"inline-block",width:"30px",height:"60px","margin-left":"15px","background-image":"url("+this.cdn_host+"/site_media/images/icons/notifications/play-"+this.style+"-small.png)","background-repeat":"no-repeat","background-position":"0px 15px"},"a#button-link":{display:"inline-block","vertical-align":"top","text-align":"center","font-size":"17px","font-weight":"bold",overflow:"hidden","word-wrap":"break-word",color:this.style_vals.text_title,transition:"color "+o},"#button:hover":{"background-color":this.style_vals.bg_hover,color:this.style_vals.text_hover},"#button:hover a":{color:this.style_vals.text_hover},"#video-noflip":{position:"relative",top:2*-this.video_height+"px"},"#video-flip":{"backface-visibility":"hidden",transform:"rotateY(180deg)"},"#video":{position:"absolute",width:this.video_width-1+"px",height:this.video_height+"px",top:et.NOTIF_TOP+"px","margin-top":"100px",left:"50%","margin-left":Math.round(-this.video_width/2)+"px",overflow:"hidden","border-radius":"5px","box-shadow":t,transform:"translateZ(1px)",transition:"opacity "+o+", top "+o},"#video.exiting":{opacity:"0.0",top:this.video_height+"px"},"#video-holder":{position:"absolute",width:this.video_width-1+"px",height:this.video_height+"px",overflow:"hidden","border-radius":"5px"},"#video-frame":{"margin-left":"-1px",width:this.video_width+"px"},"#video-controls":{opacity:"0",transition:"opacity 0.5s"},"#video:hover #video-controls":{opacity:"1.0"},"#video .video-progress-el":{position:"absolute",bottom:"0",height:"25px","border-radius":"0 0 0 5px"},"#video-progress":{width:"90%"},"#video-progress-total":{width:"100%","background-color":this.style_vals.bg,opacity:"0.7"},"#video-elapsed":{width:"0","background-color":"#6cb6f5",opacity:"0.9"},"#video #video-time":{width:"10%",right:"0","font-size":"11px","line-height":"25px",color:this.style_vals.text_main,"background-color":"#666","border-radius":"0 0 5px 0"}};this._browser_lte("ie",8)&&w.extend(s,{"* html #overlay":{position:"absolute"},"* html #bg":{position:"absolute"},"html, body":{height:"100%"}}),this._browser_lte("ie",7)&&w.extend(s,{"#mini #body":{display:"inline",zoom:"1",border:"1px solid "+this.style_vals.bg_hover},"#mini #body-text":{padding:"20px"},"#mini #mini-icon":{display:"none"}});var a=["backface-visibility","border-radius","box-shadow","opacity","perspective","transform","transform-style","transition"],c=["khtml","moz","ms","o","webkit"];for(var p in s)for(var _=0;_=33||this.browser_versions.firefox>=15)&&this.body_el&&r("backfaceVisibility")&&r("perspective")&&r("transform")},et.prototype._switch_to_video=w.safewrap((function(){var e=this,t=[{el:e._get_notification_display_el(),attr:"opacity",start:1,goal:0},{el:e._get_notification_display_el(),attr:"top",start:et.NOTIF_TOP,goal:-500},{el:e._get_el("video-noflip"),attr:"opacity",start:0,goal:1},{el:e._get_el("video-noflip"),attr:"top",start:2*-e.video_height,goal:0}];if(e.mini){var i=e._get_el("bg"),r=e._get_el("overlay");i.style.width="100%",i.style.height="100%",r.style.width="100%",e._add_class(e._get_notification_display_el(),"exiting"),e._add_class(i,"visible"),t.push({el:e._get_el("bg"),attr:"opacity",start:0,goal:et.BG_OPACITY})}e._get_el("video-holder").innerHTML=e.video_iframe;var o=function(){window.YT&&window.YT.loaded&&e._yt_video_ready(),e.showing_video=!0,e._get_notification_display_el().style.visibility="hidden"};e.flip_animate?(e._add_class("flipper","flipped"),setTimeout(o,et.ANIM_TIME)):e._animate_els(t,et.ANIM_TIME,o)})),et.prototype._track_event=function(e,t,i){this.campaign_id?(t=t||{},t=w.extend(t,{campaign_id:this.campaign_id,message_id:this.message_id,message_type:"web_inapp",message_subtype:this.notif_type}),this.mixpanel.track(e,t,i)):i&&i.call()},et.prototype._yt_video_ready=w.safewrap((function(){var e=this;if(!e.video_inited){e.video_inited=!0;var t=e._get_el("video-elapsed"),i=e._get_el("video-time"),r=e._get_el("video-progress");new window.YT.Player(et.MARKUP_PREFIX+"-video-frame",{events:{onReady:function(o){var n=o.target,s=n.getDuration(),a=function(e){return("00"+e).slice(-2)},c=function(e){var t=Math.round(s-e),r=Math.floor(t/60),o=Math.floor(r/60);t-=60*r,r-=60*o,i.innerHTML="-"+(o?o+":":"")+a(r)+":"+a(t)};c(0),e._video_progress_checker=window.setInterval((function(){var e=n.getCurrentTime();t.style.width=e/s*100+"%",c(e)}),250),w.register_event(r,"click",(function(e){var t=Math.max(0,e.pageX-r.getBoundingClientRect().left);n.seekTo(s*t/r.clientWidth,!0)}))}}})}}));var tt,it,rt=function(){};w.extend(rt.prototype,de),rt.prototype._init=function(e){this._mixpanel=e},rt.prototype.set=Z((function(e,t,i){var r=this.set_action(e,t);return w.isObject(e)&&(i=t),this._get_config("save_referrer")&&this._mixpanel.persistence.update_referrer_info(document.referrer),r.$set=w.extend({},w.info.people_properties(),this._mixpanel.persistence.get_referrer_info(),r.$set),this._send_request(r,i)})),rt.prototype.set_once=Z((function(e,t,i){var r=this.set_once_action(e,t);return w.isObject(e)&&(i=t),this._send_request(r,i)})),rt.prototype.unset=Z((function(e,t){var i=this.unset_action(e);return this._send_request(i,t)})),rt.prototype.increment=Z((function(e,t,i){var r={},o={};return w.isObject(e)?(w.each(e,(function(e,t){if(!this._is_reserved_property(t)){if(isNaN(parseFloat(e)))return void x.error("Invalid increment value passed to mixpanel.people.increment - must be a number");o[t]=e}}),this),i=t):(w.isUndefined(t)&&(t=1),o[e]=t),r.$add=o,this._send_request(r,i)})),rt.prototype.append=Z((function(e,t,i){w.isObject(e)&&(i=t);var r=this.append_action(e,t);return this._send_request(r,i)})),rt.prototype.remove=Z((function(e,t,i){w.isObject(e)&&(i=t);var r=this.remove_action(e,t);return this._send_request(r,i)})),rt.prototype.union=Z((function(e,t,i){w.isObject(e)&&(i=t);var r=this.union_action(e,t);return this._send_request(r,i)})),rt.prototype.track_charge=Z((function(e,t,i){if(w.isNumber(e)||(e=parseFloat(e),!isNaN(e)))return this.append("$transactions",w.extend({$amount:e},t),i);x.error("Invalid value passed to mixpanel.people.track_charge - must be a number")})),rt.prototype.clear_charges=function(e){return this.set("$transactions",[],e)},rt.prototype.delete_user=function(){if(this._identify_called()){var e={$delete:this._mixpanel.get_distinct_id()};return this._send_request(e)}x.error("mixpanel.people.delete_user() requires you to call identify() first")},rt.prototype.toString=function(){return this._mixpanel.toString()+".people"},rt.prototype._send_request=function(e,t){e.$token=this._get_config("token"),e.$distinct_id=this._mixpanel.get_distinct_id();var i=this._mixpanel.get_property("$device_id"),r=this._mixpanel.get_property("$user_id"),o=this._mixpanel.get_property("$had_persisted_distinct_id");i&&(e.$device_id=i),r&&(e.$user_id=r),o&&(e.$had_persisted_distinct_id=o);var n=w.encodeDates(e);return this._identify_called()?this._mixpanel._track_or_batch({type:"people",data:n,endpoint:this._get_config("api_host")+"/engage/",batcher:this._mixpanel.request_batchers.people},t):(this._enqueue(e),w.isUndefined(t)||(this._get_config("verbose")?t({status:-1,error:null}):t(-1)),w.truncate(n,255))},rt.prototype._get_config=function(e){return this._mixpanel.get_config(e)},rt.prototype._identify_called=function(){return!0===this._mixpanel._flags.identify_called},rt.prototype._enqueue=function(e){ae in e?this._mixpanel.persistence._add_to_people_queue(ae,e):ce in e?this._mixpanel.persistence._add_to_people_queue(ce,e):pe in e?this._mixpanel.persistence._add_to_people_queue(pe,e):_e in e?this._mixpanel.persistence._add_to_people_queue(_e,e):ue in e?this._mixpanel.persistence._add_to_people_queue(ue,e):he in e?this._mixpanel.persistence._add_to_people_queue(he,e):le in e?this._mixpanel.persistence._add_to_people_queue(le,e):x.error("Invalid call to _enqueue():",e)},rt.prototype._flush_one_queue=function(e,t,i,r){var o=this,n=w.extend({},this._mixpanel.persistence._get_queue(e)),s=n;w.isUndefined(n)||!w.isObject(n)||w.isEmptyObject(n)||(o._mixpanel.persistence._pop_from_people_queue(e,n),r&&(s=r(n)),t.call(o,s,(function(t,r){0===t&&o._mixpanel.persistence._add_to_people_queue(e,n),w.isUndefined(i)||i(t,r)})))},rt.prototype._flush=function(e,t,i,r,o,n,s){var a=this,c=this._mixpanel.persistence._get_queue(ue),p=this._mixpanel.persistence._get_queue(he);if(this._flush_one_queue(ae,this.set,e),this._flush_one_queue(ce,this.set_once,r),this._flush_one_queue(pe,this.unset,n,(function(e){return w.keys(e)})),this._flush_one_queue(_e,this.increment,t),this._flush_one_queue(le,this.union,o),!w.isUndefined(c)&&w.isArray(c)&&c.length){for(var _,u=function(e,t){0===e&&a._mixpanel.persistence._add_to_people_queue(ue,_),w.isUndefined(i)||i(e,t)},l=c.length-1;l>=0;l--)_=c.pop(),w.isEmptyObject(_)||a.append(_,u);a._mixpanel.persistence.save()}if(!w.isUndefined(p)&&w.isArray(p)&&p.length){for(var h,d=function(e,t){0===e&&a._mixpanel.persistence._add_to_people_queue(he,h),w.isUndefined(s)||s(e,t)},f=p.length-1;f>=0;f--)h=p.pop(),w.isEmptyObject(h)||a.remove(h,d);a._mixpanel.persistence.save()}},rt.prototype._is_reserved_property=function(e){return"$distinct_id"===e||"$token"===e||"$device_id"===e||"$user_id"===e||"$had_persisted_distinct_id"===e},rt.prototype.set=rt.prototype.set,rt.prototype.set_once=rt.prototype.set_once,rt.prototype.unset=rt.prototype.unset,rt.prototype.increment=rt.prototype.increment,rt.prototype.append=rt.prototype.append,rt.prototype.remove=rt.prototype.remove,rt.prototype.union=rt.prototype.union,rt.prototype.track_charge=rt.prototype.track_charge,rt.prototype.clear_charges=rt.prototype.clear_charges,rt.prototype.delete_user=rt.prototype.delete_user,rt.prototype.toString=rt.prototype.toString;var ot=function(e){return e},nt=function(){},st="mixpanel",at=t.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,ct=!at&&-1===f.indexOf("MSIE")&&-1===f.indexOf("Mozilla"),pt=null;u.sendBeacon&&(pt=function(){return u.sendBeacon.apply(u,arguments)});var _t={api_host:"https://api-js.mixpanel.com",api_method:"POST",api_transport:"XHR",app_host:"https://mixpanel.com",cdn:"https://cdn.mxpnl.com",cross_site_cookie:!1,cross_subdomain_cookie:!0,persistence:"cookie",persistence_name:"",cookie_domain:"",cookie_name:"",loaded:nt,store_google:!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:{},inapp_protocol:"//",inapp_link_new_window:!1,ignore_dnt:!1,batch_requests:!1,batch_size:50,batch_flush_interval_ms:5e3,batch_request_timeout_ms:9e4,batch_autostart:!0,hooks:{}},ut=!1,lt=function(){},ht=function(e,t,r){var o,n=r===st?it:it[r];if(n&&0===tt)o=n;else{if(n&&!w.isArray(n))return void x.error("You have already initialized "+r);o=new lt}return o._cached_groups={},o._user_decide_check_complete=!1,o._events_tracked_before_user_decide_check_complete=[],o._init(e,t,r),o.people=new rt,o.people._init(o),i.DEBUG=i.DEBUG||o.get_config("debug"),!w.isUndefined(n)&&w.isArray(n)&&(o._execute_array.call(o.people,n.people),o._execute_array(n)),o},dt=function(e){var t=w.JSONEncode(e);return{data:w.base64Encode(t)}};lt.prototype.init=function(e,t,i){if(w.isUndefined(i))x.error("You must name your new library: init(token, config, name)");else{if(i!==st){var r=ht(e,t,i);return it[i]=r,r._loaded(),r}x.error("You must initialize the main mixpanel object right after you include the Mixpanel js snippet")}},lt.prototype._init=function(e,i,r){i=i||{},this.__loaded=!0,this.config={},this._triggered_notifs=[];var o={},n=i.api_host,s=!!n&&!n.match(/\.mixpanel\.com$/);"batch_requests"in i||s||!N(e,"batch",60)||(o.batch_requests=!0),this.set_config(w.extend({},_t,o,i,{name:r,token:e,callback_fn:(r===st?r:"mixpanel."+r)+"._jsc"})),this._jsc=nt,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&&(w.localStorage.is_supported(!0)&&at?(this.init_batchers(),pt&&t.addEventListener&&t.addEventListener("unload",w.bind((function(){this.request_batchers.events.stopped||this.request_batchers.events.flush({unloading:!0})}),this))):(this._batch_requests=!1,x.log("Turning off Mixpanel request-queueing; needs XHR and localStorage support"))),this.persistence=this.cookie=new Ee(this.config),this.unpersisted_superprops={},this._gdpr_init();var a=w.UUID();this.get_distinct_id()||this.register_once({distinct_id:a,$device_id:a},"")},lt.prototype._loaded=function(){this.get_config("loaded")(this),this._set_default_superprops()},lt.prototype._set_default_superprops=function(){this.persistence.update_search_keyword(l.referrer),this.get_config("store_google")&&this.persistence.update_campaign_params(),this.get_config("save_referrer")&&this.persistence.update_referrer_info(l.referrer)},lt.prototype._dom_loaded=function(){w.each(this.__dom_loaded_queue,(function(e){this._track_dom.apply(this,e)}),this),this.has_opted_out_tracking()||w.each(this.__request_queue,(function(e){this._send_request.apply(this,e)}),this),delete this.__dom_loaded_queue,delete this.__request_queue},lt.prototype._track_dom=function(e,t){if(this.get_config("img"))return x.error("You can't use DOM tracking functions with img = true."),!1;if(!ut)return this.__dom_loaded_queue.push([e,t]),!1;var i=(new e).init(this);return i.track.apply(i,t)},lt.prototype._prepare_callback=function(e,t){if(w.isUndefined(e))return null;if(at){return function(i){e(i,t)}}var i=this._jsc,r=""+Math.floor(1e8*Math.random()),o=this.get_config("callback_fn")+"["+r+"]";return i[r]=function(o){delete i[r],e(o,t)},o},lt.prototype._send_request=function(e,t,i,r){var o=!0;if(ct)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;r||!w.isFunction(i)&&"string"!==typeof i||(r=i,i=null),i=w.extend(n,i||{}),at||(i.method="GET");var a="POST"===i.method,c=pt&&a&&"sendbeacon"===i.transport.toLowerCase(),p=i.verbose;if(t.verbose&&(p=!0),this.get_config("test")&&(t.test=1),p&&(t.verbose=1),this.get_config("img")&&(t.img=1),at||(r?t.callback=r:(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+="?"+w.HTTPBuildQuery(t),"img"in t){var _=l.createElement("img");_.src=e,l.body.appendChild(_)}else if(c){try{o=pt(e,s)}catch(m){x.error(m),o=!1}try{r&&r(o?1:0)}catch(m){x.error(m)}}else if(at)try{var u=new XMLHttpRequest;u.open(i.method,e,!0);var h=this.get_config("xhr_headers");if(a&&(h["Content-Type"]="application/x-www-form-urlencoded"),w.each(h,(function(e,t){u.setRequestHeader(t,e)})),i.timeout_ms&&"undefined"!==typeof u.timeout){u.timeout=i.timeout_ms;var d=(new Date).getTime()}u.withCredentials=!0,u.onreadystatechange=function(){var e;if(4===u.readyState)if(200===u.status){if(r)if(p){var t;try{t=w.JSONDecode(u.responseText)}catch(m){if(x.error(m),!i.ignore_json_errors)return;t=u.responseText}r(t)}else r(Number(u.responseText))}else e=u.timeout&&!u.status&&(new Date).getTime()-d>=u.timeout?"timeout":"Bad HTTP status: "+u.status+" "+u.statusText,x.error(e),r&&r(p?{status:0,error:e,xhr_req:u}:0)},u.send(s)}catch(m){x.error(m),o=!1}else{var f=l.createElement("script");f.type="text/javascript",f.async=!0,f.defer=!0,f.src=e;var g=l.getElementsByTagName("script")[0];g.parentNode.insertBefore(f,g)}return o},lt.prototype._execute_array=function(e){var t,i=[],r=[],o=[];w.each(e,(function(e){e&&(t=e[0],w.isArray(t)?o.push(e):"function"===typeof e?e.call(this):w.isArray(e)&&"alias"===t?i.push(e):w.isArray(e)&&-1!==t.indexOf("track")&&"function"===typeof this[t]?o.push(e):r.push(e))}),this);var n=function(e,t){w.each(e,(function(e){if(w.isArray(e[0])){var i=t;w.each(e,(function(e){i=i[e[0]].apply(i,e.slice(1))}))}else this[e[0]].apply(this,e.slice(1))}),t)};n(i,this),n(r,this),n(o,this)},lt.prototype.are_batchers_initialized=function(){return!!this.request_batchers.events},lt.prototype.init_batchers=function(){var e=this.get_config("token");if(!this.are_batchers_initialized()){var t=w.bind((function(t){return new X("__mpq_"+e+t.queue_suffix,{libConfig:this.config,sendRequestFunc:w.bind((function(e,i,r){this._send_request(this.get_config("api_host")+t.endpoint,dt(e),i,this._prepare_callback(r,e))}),this),beforeSendHook:w.bind((function(e){return this._run_hook("before_send_"+t.type,e)}),this)})}),this);this.request_batchers={events:t({type:"events",endpoint:"/track/",queue_suffix:"_ev"}),people:t({type:"people",endpoint:"/engage/",queue_suffix:"_pp"}),groups:t({type:"groups",endpoint:"/groups/",queue_suffix:"_gr"})}}this.get_config("batch_autostart")&&this.start_batch_senders()},lt.prototype.start_batch_senders=function(){this.are_batchers_initialized()&&(this._batch_requests=!0,w.each(this.request_batchers,(function(e){e.start()})))},lt.prototype.stop_batch_senders=function(){this._batch_requests=!1,w.each(this.request_batchers,(function(e){e.stop(),e.clear()}))},lt.prototype.push=function(e){this._execute_array([e])},lt.prototype.disable=function(e){"undefined"===typeof e?this._flags.disable_all_events=!0:this.__disabled_events=this.__disabled_events.concat(e)},lt.prototype._track_or_batch=function(e,t){var i=w.truncate(e.data,255),r=e.endpoint,o=e.batcher,n=e.should_send_immediately,s=e.send_request_options||{};t=t||nt;var a=!0,c=w.bind((function(){return s.skip_hooks||(i=this._run_hook("before_send_"+e.type,i)),i?(x.log("MIXPANEL REQUEST:"),x.log(i),this._send_request(r,dt(i),s,this._prepare_callback(t,i))):null}),this);return this._batch_requests&&!n?o.enqueue(i,(function(e){e?t(1,i):c()})):a=c(),a&&i},lt.prototype.track=Q((function(e,t,i,r){r||"function"!==typeof i||(r=i,i=null);var o=(i=i||{}).transport;o&&(i.transport=o);var n=i.send_immediately;if("function"!==typeof r&&(r=nt),w.isUndefined(e))x.error("No event name provided to mixpanel.track");else{if(!this._event_is_disabled(e)){(t=t||{}).token=this.get_config("token");var s=this.persistence.remove_event_timer(e);if(!w.isUndefined(s)){var a=(new Date).getTime()-s;t.$duration=parseFloat((a/1e3).toFixed(3))}this._set_default_superprops(),t=w.extend({},w.info.properties(),this.persistence.properties(),this.unpersisted_superprops,t);var c=this.get_config("property_blacklist");w.isArray(c)?w.each(c,(function(e){delete t[e]})):x.error("Invalid value for property_blacklist config: "+c);var p={event:e,properties:t},_=this._track_or_batch({type:"events",data:p,endpoint:this.get_config("api_host")+"/track/",batcher:this.request_batchers.events,should_send_immediately:n,send_request_options:i},r);return this._check_and_handle_triggered_notifications(p),_}r(0)}})),lt.prototype.set_group=Q((function(e,t,i){w.isArray(t)||(t=[t]);var r={};return r[e]=t,this.register(r),this.people.set(e,t,i)})),lt.prototype.add_group=Q((function(e,t,i){var r=this.get_property(e);if(void 0===r){var o={};o[e]=[t],this.register(o)}else-1===r.indexOf(t)&&(r.push(t),this.register(o));return this.people.union(e,t,i)})),lt.prototype.remove_group=Q((function(e,t,i){var r=this.get_property(e);if(void 0!==r){var o=r.indexOf(t);o>-1&&(r.splice(o,1),this.register({group_key:r})),0===r.length&&this.unregister(e)}return this.people.remove(e,t,i)})),lt.prototype.track_with_groups=Q((function(e,t,i,r){var o=w.extend({},t||{});return w.each(i,(function(e,t){null!==e&&void 0!==e&&(o[t]=e)})),this.track(e,o,r)})),lt.prototype._create_map_key=function(e,t){return e+"_"+JSON.stringify(t)},lt.prototype._remove_group_from_cache=function(e,t){delete this._cached_groups[this._create_map_key(e,t)]},lt.prototype.get_group=function(e,t){var i=this._create_map_key(e,t),r=this._cached_groups[i];return void 0!==r&&r._group_key===e&&r._group_id===t||((r=new fe)._init(this,e,t),this._cached_groups[i]=r),r},lt.prototype.track_pageview=function(e){w.isUndefined(e)&&(e=l.location.href),this.track("mp_page_view",w.info.pageviewInfo(e))},lt.prototype.track_links=function(){return this._track_dom.call(this,H,arguments)},lt.prototype.track_forms=function(){return this._track_dom.call(this,$,arguments)},lt.prototype.time_event=function(e){w.isUndefined(e)?x.error("No event name provided to mixpanel.time_event"):this._event_is_disabled(e)||this.persistence.set_event_timer(e,(new Date).getTime())};var ft={persistent:!0},gt=function(e){var t;return t=w.isObject(e)?e:w.isUndefined(e)?{}:{days:e},w.extend({},ft,t)};lt.prototype.register=function(e,t){var i=gt(t);i.persistent?this.persistence.register(e,i.days):w.extend(this.unpersisted_superprops,e)},lt.prototype.register_once=function(e,t,i){var r=gt(i);r.persistent?this.persistence.register_once(e,t,r.days):("undefined"===typeof t&&(t="None"),w.each(e,(function(e,i){this.unpersisted_superprops.hasOwnProperty(i)&&this.unpersisted_superprops[i]!==t||(this.unpersisted_superprops[i]=e)}),this))},lt.prototype.unregister=function(e,t){(t=gt(t)).persistent?this.persistence.unregister(e):delete this.unpersisted_superprops[e]},lt.prototype._register_single=function(e,t){var i={};i[e]=t,this.register(i)},lt.prototype.identify=function(e,t,i,r,o,n,s,a){var c=this.get_distinct_id();if(this.register({$user_id:e}),!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(Ie)&&(this.unregister(Ie),this.register({distinct_id:e})),this._check_and_handle_notifications(this.get_distinct_id()),this._flags.identify_called=!0,this.people._flush(t,i,r,o,n,s,a),e!==c&&this.track("$identify",{distinct_id:e,$anon_distinct_id:c},{skip_hooks:!0})},lt.prototype.reset=function(){this.persistence.clear(),this._flags.identify_called=!1;var e=w.UUID();this.register_once({distinct_id:e,$device_id:e},"")},lt.prototype.get_distinct_id=function(){return this.get_property("distinct_id")},lt.prototype.alias=function(e,t){if(e===this.get_property(xe))return x.critical("Attempting to create alias for existing People user - aborting."),-2;var i=this;return w.isUndefined(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single(Ie,e),this.track("$create_alias",{alias:e,distinct_id:t},{skip_hooks:!0},(function(){i.identify(e)}))):(x.error("alias matches current distinct_id - skipping api call."),this.identify(e),-1)},lt.prototype.name_tag=function(e){this._register_single("mp_name_tag",e)},lt.prototype.set_config=function(e){w.isObject(e)&&(w.extend(this.config,e),e.batch_size&&w.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),i.DEBUG=i.DEBUG||this.get_config("debug"))},lt.prototype.get_config=function(e){return this.config[e]},lt.prototype._run_hook=function(e){var t=(this.config.hooks[e]||ot).apply(this,a.call(arguments,1));return"undefined"===typeof t&&(x.error(e+" hook did not return a value"),t=null),t},lt.prototype.get_property=function(e){return this.persistence.props[e]},lt.prototype.toString=function(){var e=this.get_config("name");return e!==st&&(e="mixpanel."+e),e},lt.prototype._event_is_disabled=function(e){return w.isBlockedUA(f)||this._flags.disable_all_events||w.include(this.__disabled_events,e)},lt.prototype._check_and_handle_triggered_notifications=Q((function(e){if(this._user_decide_check_complete)for(var t=this._triggered_notifs,i=0;i0){this._triggered_notifs=[];var t=[];w.each(e.notifications,(function(e){(e.display_triggers&&e.display_triggers.length>0?this._triggered_notifs:t).push(e)}),this),t.length>0&&this._show_notification.call(this,t[0])}this._handle_user_decide_check_complete()}),this)))}})),lt.prototype._handle_user_decide_check_complete=function(){this._user_decide_check_complete=!0;for(var e=this._events_tracked_before_user_decide_check_complete;e.length>0;){var t=e.shift();this._check_and_handle_triggered_notifications(t)}},lt.prototype._show_notification=function(e){new et(e,this).show()},lt.prototype._gdpr_init=function(){"localStorage"===this.get_config("opt_out_tracking_persistence_type")&&w.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")&&!w.cookie.get("mp_optout")||(w.cookie.remove("mp_optout"),this.opt_out_tracking({clear_persistence:this.get_config("opt_out_persistence_by_default")}))},lt.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&&w.each(this.request_batchers,(function(e){e.clear()}))},lt.prototype._gdpr_call_func=function(e,t){return t=w.extend({track:w.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),w.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})},lt.prototype.opt_in_tracking=function(e){e=w.extend({enable_persistence:!0},e),this._gdpr_call_func(K,e),this._gdpr_update_persistence(e)},lt.prototype.opt_out_tracking=function(e){(e=w.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(J,e),this._gdpr_update_persistence(e)},lt.prototype.has_opted_in_tracking=function(e){return this._gdpr_call_func(Y,e)},lt.prototype.has_opted_out_tracking=function(e){return this._gdpr_call_func(V,e)},lt.prototype.clear_opt_in_out_tracking=function(e){e=w.extend({enable_persistence:!0},e),this._gdpr_call_func(te,e),this._gdpr_update_persistence(e)},lt.prototype.init=lt.prototype.init,lt.prototype.reset=lt.prototype.reset,lt.prototype.disable=lt.prototype.disable,lt.prototype.time_event=lt.prototype.time_event,lt.prototype.track=lt.prototype.track,lt.prototype.track_links=lt.prototype.track_links,lt.prototype.track_forms=lt.prototype.track_forms,lt.prototype.track_pageview=lt.prototype.track_pageview,lt.prototype.register=lt.prototype.register,lt.prototype.register_once=lt.prototype.register_once,lt.prototype.unregister=lt.prototype.unregister,lt.prototype.identify=lt.prototype.identify,lt.prototype.alias=lt.prototype.alias,lt.prototype.name_tag=lt.prototype.name_tag,lt.prototype.set_config=lt.prototype.set_config,lt.prototype.get_config=lt.prototype.get_config,lt.prototype.get_property=lt.prototype.get_property,lt.prototype.get_distinct_id=lt.prototype.get_distinct_id,lt.prototype.toString=lt.prototype.toString,lt.prototype._check_and_handle_notifications=lt.prototype._check_and_handle_notifications,lt.prototype._handle_user_decide_check_complete=lt.prototype._handle_user_decide_check_complete,lt.prototype._show_notification=lt.prototype._show_notification,lt.prototype.opt_out_tracking=lt.prototype.opt_out_tracking,lt.prototype.opt_in_tracking=lt.prototype.opt_in_tracking,lt.prototype.has_opted_out_tracking=lt.prototype.has_opted_out_tracking,lt.prototype.has_opted_in_tracking=lt.prototype.has_opted_in_tracking,lt.prototype.clear_opt_in_out_tracking=lt.prototype.clear_opt_in_out_tracking,lt.prototype.get_group=lt.prototype.get_group,lt.prototype.set_group=lt.prototype.set_group,lt.prototype.add_group=lt.prototype.add_group,lt.prototype.remove_group=lt.prototype.remove_group,lt.prototype.track_with_groups=lt.prototype.track_with_groups,lt.prototype.start_batch_senders=lt.prototype.start_batch_senders,lt.prototype.stop_batch_senders=lt.prototype.stop_batch_senders,Ee.prototype.properties=Ee.prototype.properties,Ee.prototype.update_search_keyword=Ee.prototype.update_search_keyword,Ee.prototype.update_referrer_info=Ee.prototype.update_referrer_info,Ee.prototype.get_cross_subdomain=Ee.prototype.get_cross_subdomain,Ee.prototype.clear=Ee.prototype.clear,w.safewrap_class(lt,["identify","_check_and_handle_notifications","_show_notification"]);var mt={},vt=function(){it.init=function(e,i,r){if(r)return it[r]||(it[r]=mt[r]=ht(e,i,r),it[r]._loaded()),it[r];var o=it;mt.mixpanel?o=mt.mixpanel:e&&((o=ht(e,i,st))._loaded(),mt.mixpanel=o),it=o,1===tt&&(t.mixpanel=it),w.each(mt,(function(e,t){t!==st&&(it[t]=e)})),it._=w}};var yt=(tt=0,it=new lt,vt(),it.init(),function(){function e(){e.done||(e.done=!0,ut=!0,ct=!1,w.each(mt,(function(e){e._dom_loaded()})))}if(l.addEventListener)"complete"===l.readyState?e():l.addEventListener("DOMContentLoaded",e,!1);else if(l.attachEvent){l.attachEvent("onreadystatechange",e);var i=!1;try{i=null===t.frameElement}catch(r){}l.documentElement.doScroll&&i&&function t(){try{l.documentElement.doScroll("left")}catch(r){return void setTimeout(t,1)}e()}()}w.register_event(t,"load",e,!0)}(),it);e.exports=yt}}]);