PageSourceSearch

https://sfxengine.com/_next/static/chunks/86f2b25a1942173d.js

js sfxengine.com collected 2026-09-28 09:31:41 UTC 164,260 bytes, 5 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="c083c4c7-ce3e-6613-b7a5-49e9f3a8b5d6")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,634233,e=>{"use strict";var t="undefined"!=typeof window?window:void 0,i="undefined"!=typeof globalThis?globalThis:t;"undefined"==typeof self&&(i.self=i),"undefined"==typeof File&&(i.File=function(){});var r=Array.prototype,s=r.forEach,n=r.indexOf,o=null==i?void 0:i.navigator,a=null==i?void 0:i.document,l=null==i?void 0:i.location,c=null==i?void 0:i.fetch,u=null!=i&&i.XMLHttpRequest&&"withCredentials"in new i.XMLHttpRequest?i.XMLHttpRequest:void 0,h=null==i?void 0:i.AbortController,d=null==o?void 0:o.userAgent,p=null!=t?t:{},g={DEBUG:!1,LIB_VERSION:"1.306.1"};function _(e,t,i,r,s,n,o){try{var a=e[n](o),l=a.value}catch(e){return void i(e)}a.done?t(l):Promise.resolve(l).then(r,s)}function v(e){return function(){var t=this,i=arguments;return new Promise(function(r,s){var n=e.apply(t,i);function o(e){_(n,r,s,o,a,"next",e)}function a(e){_(n,r,s,o,a,"throw",e)}o(void 0)})}}function f(){return(f=Object.assign.bind()).apply(null,arguments)}function m(e,t){if(null==e)return{};var i={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;i[r]=e[r]}return i}var y=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],b=function(e,t){if(void 0===t&&(t=[]),!e)return!1;var i=e.toLowerCase();return y.concat(t).some(e=>{var t=e.toLowerCase();return -1!==i.indexOf(t)})},w=["$snapshot","$pageview","$pageleave","$set","survey dismissed","survey sent","survey shown","$identify","$groupidentify","$create_alias","$$client_ingestion_warning","$web_experiment_applied","$feature_enrollment_update","$feature_flag_called"];function E(e,t){return -1!==e.indexOf(t)}var x=function(e){return e.trim()},k=function(e){return e.replace(/^\$/,"")},S=Array.isArray,P=Object.prototype,I=P.hasOwnProperty,$=P.toString,F=S||function(e){return"[object Array]"===$.call(e)},T=e=>"function"==typeof e,C=e=>e===Object(e)&&!F(e),R=e=>{if(C(e)){for(var t in e)if(I.call(e,t))return!1;return!0}return!1},O=e=>void 0===e,A=e=>"[object String]"==$.call(e),M=e=>A(e)&&0===e.trim().length,L=e=>null===e,D=e=>O(e)||L(e),N=e=>"[object Number]"==$.call(e),j=e=>"[object Boolean]"===$.call(e),H=e=>E(w,e);function U(e){return null===e||"object"!=typeof e}function q(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function B(e){return!O(Event)&&function(e,t){try{return e instanceof t}catch(e){return!1}}(e,Event)}var V=[!0,"true",1,"1","yes"],G=[!1,"false",0,"0","no"];function W(e,t,i,r,s){return t>i&&(r.warn("min cannot be greater than max."),t=i),N(e)?e>i?(r.warn(" cannot be  greater than max: "+i+". Using max value instead."),i):e<t?(r.warn(" cannot be less than min: "+t+". Using min value instead."),t):e:(r.warn(" must be a number. using max or fallback. max: "+i+", fallback: "+s),W(s||i,t,i,r))}class z{constructor(e){this.t={},this.i=e.i,this.o=W(e.bucketSize,0,100,e.h),this.m=W(e.refillRate,0,this.o,e.h),this.S=W(e.refillInterval,0,864e5,e.h)}$(e,t){var i=Math.floor((t-e.lastAccess)/this.S);if(i>0){var r=i*this.m;e.tokens=Math.min(e.tokens+r,this.o),e.lastAccess=e.lastAccess+i*this.S}}consumeRateLimit(e){var t,i=Date.now(),r=String(e),s=this.t[r];return s?this.$(s,i):(s={tokens:this.o,lastAccess:i},this.t[r]=s),0===s.tokens||(s.tokens--,0===s.tokens&&(null==(t=this.i)||t.call(this,e)),0===s.tokens)}stop(){this.t={}}}var Y,J,X,K=e=>e instanceof Error;class Z{constructor(e,t,i){void 0===i&&(i=[]),this.coercers=e,this.stackParser=t,this.modifiers=i}buildFromUnknown(e,t){void 0===t&&(t={});var i=t&&t.mechanism||{handled:!0,type:"generic"},r=this.buildCoercingContext(i,t,0).apply(e),s=this.buildParsingContext(),n=this.parseStacktrace(r,s);return{$exception_list:this.convertToExceptionList(n,i),$exception_level:"error"}}modifyFrames(e){var t=this;return v(function*(){for(var i of e)i.stacktrace&&i.stacktrace.frames&&F(i.stacktrace.frames)&&(i.stacktrace.frames=yield t.applyModifiers(i.stacktrace.frames));return e})()}coerceFallback(e){var t;return{type:"Error",value:"Unknown error",stack:null==(t=e.syntheticException)?void 0:t.stack,synthetic:!0}}parseStacktrace(e,t){var i,r;return null!=e.cause&&(i=this.parseStacktrace(e.cause,t)),""!=e.stack&&null!=e.stack&&(r=this.applyChunkIds(this.stackParser(e.stack,+!!e.synthetic),t.chunkIdMap)),f({},e,{cause:i,stack:r})}applyChunkIds(e,t){return e.map(e=>(e.filename&&t&&(e.chunk_id=t[e.filename]),e))}applyCoercers(e,t){for(var i of this.coercers)if(i.match(e))return i.coerce(e,t);return this.coerceFallback(t)}applyModifiers(e){var t=this;return v(function*(){var i=e;for(var r of t.modifiers)i=yield r(i);return i})()}convertToExceptionList(e,t){var i,r,s,n={type:e.type,value:e.value,mechanism:{type:null!=(i=t.type)?i:"generic",handled:null==(r=t.handled)||r,synthetic:null!=(s=e.synthetic)&&s}};e.stack&&(n.stacktrace={type:"raw",frames:e.stack});var o=[n];return null!=e.cause&&o.push(...this.convertToExceptionList(e.cause,f({},t,{handled:!0}))),o}buildParsingContext(){return{chunkIdMap:function(e){var t=globalThis._posthogChunkIds;if(t){var i=Object.keys(t);return X&&i.length===J||(J=i.length,X=i.reduce((i,r)=>{Y||(Y={});var s=Y[r];if(s)i[s[0]]=s[1];else for(var n=e(r),o=n.length-1;o>=0;o--){var a=n[o],l=null==a?void 0:a.filename,c=t[r];
vendor: 12,335 bytes, line 2
2if(l&&c){i[l]=c,Y[r]=[l,c];break}}return i},{})),X}}(this.stackParser)}}buildCoercingContext(e,t,i){void 0===i&&(i=0);var r=(i,r)=>{if(r<=4){var s=this.buildCoercingContext(e,t,r);return this.applyCoercers(i,s)}};return f({},t,{syntheticException:0==i?t.syntheticException:void 0,mechanism:e,apply:e=>r(e,i),next:e=>r(e,i+1)})}}function Q(e,t,i,r,s){var n={platform:e,filename:t,function:"<anonymous>"===i?"?":i,in_app:!0};return O(r)||(n.lineno=r),O(s)||(n.colno=s),n}var ee=(e,t)=>{var i=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return i||r?[-1!==e.indexOf("@")?e.split("@")[0]:"?",i?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},et=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,ei=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,er=/\((\S*)(?::(\d+))(?::(\d+))\)/,es=(e,t)=>{var i=et.exec(e);if(i){var[,r,s,n]=i;return Q(t,r,"?",+s,+n)}var o=ei.exec(e);if(o){if(o[2]&&0===o[2].indexOf("eval")){var a=er.exec(o[2]);a&&(o[2]=a[1],o[3]=a[2],o[4]=a[3])}var[l,c]=ee(o[1]||"?",o[2]);return Q(t,c,l,o[3]?+o[3]:void 0,o[4]?+o[4]:void 0)}},en=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,eo=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,ea=(e,t)=>{var i=en.exec(e);if(i){if(i[3]&&i[3].indexOf(" > eval")>-1){var r=eo.exec(i[3]);r&&(i[1]=i[1]||"eval",i[3]=r[1],i[4]=r[2],i[5]="")}var s=i[3],n=i[1]||"?";return[n,s]=ee(n,s),Q(t,s,n,i[4]?+i[4]:void 0,i[5]?+i[5]:void 0)}},el=/\(error: (.*)\)/;class ec{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,t){var i=A(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:i?e.stack:void 0,cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return this.isDOMError(e)?"DOMError":"DOMException"}getValue(e){var t=e.name||(this.isDOMError(e)?"DOMError":"DOMException");return e.message?t+": "+e.message:t}isDOMException(e){return q(e,"DOMException")}isDOMError(e){return q(e,"DOMError")}}class eu{match(e){return e instanceof Error}coerce(e,t){return{type:this.getType(e),value:this.getMessage(e,t),stack:this.getStack(e),cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return e.name||e.constructor.name}getMessage(e,t){var i=e.message;return i.error&&"string"==typeof i.error.message?String(i.error.message):String(i)}getStack(e){return e.stacktrace||e.stack||void 0}}class eh{constructor(){}match(e){return q(e,"ErrorEvent")&&null!=e.error}coerce(e,t){var i;return t.apply(e.error)||{type:"ErrorEvent",value:e.message,stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}}var ed=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class ep{match(e){return"string"==typeof e}coerce(e,t){var i,[r,s]=this.getInfos(e);return{type:null!=r?r:"Error",value:null!=s?s:e,stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}getInfos(e){var t="Error",i=e,r=e.match(ed);return r&&(t=r[1],i=r[2]),[t,i]}}var eg=["fatal","error","warning","log","info","debug"];function e_(e,t){void 0===t&&(t=40);var i=Object.keys(e);if(i.sort(),!i.length)return"[object has no keys]";for(var r=i.length;r>0;r--){var s=i.slice(0,r).join(", ");if(!(s.length>t))return r===i.length||s.length<=t?s:s.slice(0,t)+"..."}return""}class ev{match(e){return"object"==typeof e&&null!==e}coerce(e,t){var i,r=this.getErrorPropertyFromObject(e);return r?t.apply(r):{type:this.getType(e),value:this.getValue(e),stack:null==(i=t.syntheticException)?void 0:i.stack,level:this.isSeverityLevel(e.level)?e.level:"error",synthetic:!0}}getType(e){return B(e)?e.constructor.name:"Error"}getValue(e){if("name"in e&&"string"==typeof e.name){var t="'"+e.name+"' captured as exception";return"message"in e&&"string"==typeof e.message&&(t+=" with message: '"+e.message+"'"),t}if("message"in e&&"string"==typeof e.message)return e.message;var i=this.getObjectClassName(e);return(i&&"Object"!==i?"'"+i+"'":"Object")+" captured as exception with keys: "+e_(e)}isSeverityLevel(e){return A(e)&&!M(e)&&eg.indexOf(e)>=0}getErrorPropertyFromObject(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var i=e[t];if(K(i))return i}}getObjectClassName(e){try{var t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){return}}}class ef{match(e){return B(e)}coerce(e,t){var i,r=e.constructor.name;return{type:r,value:r+" captured as exception with keys: "+e_(e),stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}}class em{match(e){return U(e)}coerce(e,t){var i;return{type:"Error",value:"Primitive value captured as exception: "+String(e),stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}}class ey{match(e){return q(e,"PromiseRejectionEvent")}coerce(e,t){var i,r=this.getUnhandledRejectionReason(e);return U(r)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(r),stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}:t.apply(r)}getUnhandledRejectionReason(e){if(U(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch(e){}return e}}var eb=function(e,i){var{debugEnabled:r}=void 0===i?{}:i,s={k:function(i){if(t&&(g.DEBUG||p.POSTHOG_DEBUG||r)&&!O(t.console)&&t.console){for(var s=("__rrweb_original__"in t.console[i])?t.console[i].__rrweb_original__:t.console[i],n=arguments.length,o=Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];s(e,...o)}},info:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];s.k("log",...t)},warn:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];s.k("warn",...t)},error:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];s.k("error",...t)},critical:function(){for(var t=arguments.length,i=Array(t),r=0;r<t;r++)i[r]=arguments[r];console.error(e,...i)},uninitializedWarning:e=>{s.error("You must initialize PostHog before calling "+e)},createLogger:(t,i)=>eb(e+" "+t,i)};return s},ew=eb("[PostHog.js]"),eE=ew.createLogger,ex=eE("[ExternalScriptsLoader]"),ek=(e,t,i)=>{if(e.config.disable_external_dependency_loading)return ex.warn(t+" was requested but loading of external scripts is disabled."),i("Loading of external scripts is disabled");var r=null==a?void 0:a.querySelectorAll("script");if(r){for(var s,n=0;n<r.length;n++)if(s=function(){if(r[n].src===t){var e=r[n];return e.__posthog_loading_callback_fired?{v:i()}:(e.addEventListener("load",t=>{e.__posthog_loading_callback_fired=!0,i(void 0,t)}),e.onerror=e=>i(e),{v:void 0})}}())return s.v}var o=()=>{if(!a)return i("document not found");var r=a.createElement("script");if(r.type="text/javascript",r.crossOrigin="anonymous",r.src=t,r.onload=e=>{r.__posthog_loading_callback_fired=!0,i(void 0,e)},r.onerror=e=>i(e),e.config.prepare_external_dependency_script&&(r=e.config.prepare_external_dependency_script(r)),!r)return i("prepare_external_dependency_script returned null");var s,n=a.querySelectorAll("body > script");n.length>0?null==(s=n[0].parentNode)||s.insertBefore(r,n[0]):a.body.appendChild(r)};null!=a&&a.body?o():null==a||a.addEventListener("DOMContentLoaded",o)};p.__PosthogExtensions__=p.__PosthogExtensions__||{},p.__PosthogExtensions__.loadExternalDependency=(e,t,i)=>{var r="/static/"+t+".js?v="+e.version;"remote-config"===t&&(r="/array/"+e.config.token+"/config.js"),"toolbar"===t&&(r=r+"&t="+3e5*Math.floor(Date.now()/3e5));var s=e.requestRouter.endpointFor("assets",r);ek(e,s,i)},p.__PosthogExtensions__.loadSiteApp=(e,t,i)=>{var r=e.requestRouter.endpointFor("api",t);ek(e,r,i)};var eS={};function eP(e,t,i){if(F(e)){if(s&&e.forEach===s)e.forEach(t,i);else if("length"in e&&e.length===+e.length){for(var r=0,n=e.length;r<n;r++)if(r in e&&t.call(i,e[r],r)===eS)return}}}function eI(e,t,i){if(!D(e)){if(F(e))return eP(e,t,i);if(e instanceof FormData){for(var r of e.entries())if(t.call(i,r[1],r[0])===eS)return}else for(var s in e)if(I.call(e,s)&&t.call(i,e[s],s)===eS)return}}var e$=function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];return eP(i,function(t){for(var i in t)void 0!==t[i]&&(e[i]=t[i])}),e},eF=function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];return eP(i,function(t){eP(t,function(t){e.push(t)})}),e};function eT(e){for(var t=Object.keys(e),i=t.length,r=Array(i);i--;)r[i]=[t[i],e[t[i]]];return r}var eC=function(e){try{return e()}catch(e){return}},eR=function(e){return function(){try{for(var t=arguments.length,i=Array(t),r=0;r<t;r++)i[r]=arguments[r];return e.apply(this,i)}catch(e){ew.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),ew.critical(e)}}},eO=function(e){var t={};return eI(e,function(e,i){(A(e)&&e.length>0||N(e))&&(t[i]=e)}),t},eA=["herokuapp.com","vercel.app","netlify.app"];function eM(e,t){for(var i=0;i<e.length;i++)if(t(e[i]))return e[i]}function eL(e,t,i,r){var{capture:s=!1,passive:n=!0}=null!=r?r:{};null==e||e.addEventListener(t,i,{capture:s,passive:n})}var eD="$people_distinct_id",eN="__alias",ej="__timers",eH="$autocapture_disabled_server_side",eU="$heatmaps_enabled_server_side",eq="$exception_capture_enabled_server_side",eB="$error_tracking_suppression_rules",eV="$error_tracking_capture_extension_exceptions",eG="$web_vitals_enabled_server_side",eW="$dead_clicks_enabled_server_side",ez="$web_vitals_allowed_metrics",eY="$session_recording_remote_config",eJ="$sesid",eX="$session_is_sampled",eK="$enabled_feature_flags",eZ="$early_access_features",eQ="$feature_flag_details",e0="$stored_person_properties",e1="$stored_group_properties",e2="$surveys",e3="$surveys_activated",e5="$flag_call_reported",e8="$user_state",e6="$client_session_props",e4="$capture_rate_limit",e7="$initial_campaign_params",e9="$initial_referrer_info",te="$initial_person_info",tt="$epp",ti="__POSTHOG_TOOLBAR__",tr="$posthog_cookieless",ts=[eD,eN,"__cmpns",ej,"$session_recording_enabled_server_side",eU,eJ,eK,eB,e8,eZ,eQ,e1,e0,e2,e5,e6,e4,e7,e9,tt,te];function tn(e){return e instanceof Element&&(e.id===ti||!(null==e.closest||!e.closest(".toolbar-global-fade-container")))}function to(e){return!!e&&1===e.nodeType}function ta(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function tl(e){return!!e&&3===e.nodeType}function tc(e){return!!e&&11===e.nodeType}function tu(e){return e?x(e).split(/\s+/):[]}function th(e){var i=null==t?void 0:t.location.href;return!!(i&&e&&e.some(e=>i.match(e)))}function td(e){var t="";switch(typeof e.className){case"string":t=e.className;break;case"object":t=(e.className&&"baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:t=""}return tu(t)}function tp(e){return D(e)?null:x(e).split(/(\s+)/).filter(e=>tC(e)).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function tg(e){var t="";return tx(e)&&!tk(e)&&e.childNodes&&e.childNodes.length&&eI(e.childNodes,function(e){var i;tl(e)&&e.textContent&&(t+=null!=(i=tp(e.textContent))?i:"")}),x(t)}function t_(e){var t;return O(e.target)?e.srcElement||null:null!=(t=e.target)&&t.shadowRoot?e.composedPath()[0]||null:e.target||null}var tv=["a","button","form","input","select","textarea","label"];function tf(e,t){if(O(t))return!0;var i,r=function(e){if(t.some(t=>e.matches(t)))return{v:!0}};for(var s of e)if(i=r(s))return i.v;return!1}function tm(e){var t=e.parentNode;return!(!t||!to(t))&&t}var ty=["next","previous","prev",">","<"],tb=[".ph-no-rageclick",".ph-no-capture"],tw=e=>!e||ta(e,"html")||!to(e),tE=(e,i)=>{if(!t||tw(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var r=!1,s=[e],n=e;n.parentNode&&!ta(n,"body");)if(tc(n.parentNode))s.push(n.parentNode.host),n=n.parentNode.host;else{var o=tm(n);if(!o)break;if(i||tv.indexOf(o.tagName.toLowerCase())>-1)r=!0;else{var a=t.getComputedStyle(o);a&&"pointer"===a.getPropertyValue("cursor")&&(r=!0)}s.push(o),n=o}return{parentIsUsefulElement:r,targetElementList:s}};function tx(e){for(var t=e;t.parentNode&&!ta(t,"body");t=t.parentNode){var i=td(t);if(E(i,"ph-sensitive")||E(i,"ph-no-capture"))return!1}if(E(td(e),"ph-include"))return!0;var r=e.type||"";if(A(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}
2var s=e.name||e.id||"";return!(A(s)&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(s.replace(/[^a-zA-Z0-9]/g,"")))}function tk(e){return!!(ta(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||ta(e,"select")||ta(e,"textarea")||"true"===e.getAttribute("contenteditable"))}var tS="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",tP=RegExp("^(?:"+tS+")$"),tI=new RegExp(tS),t$="\\d{3}-?\\d{2}-?\\d{4}",tF=RegExp("^("+t$+")$"),tT=RegExp("("+t$+")");function tC(e,t){return void 0===t&&(t=!0),!(D(e)||A(e)&&(e=x(e),(t?tP:tI).test((e||"").replace(/[- ]/g,""))||(t?tF:tT).test(e)))&&!0}function tR(e){var t=tg(e);return tC(t=(t+" "+function e(t){var i="";return t&&t.childNodes&&t.childNodes.length&&eI(t.childNodes,function(t){var r;if(t&&"span"===(null==(r=t.tagName)?void 0:r.toLowerCase()))try{var s=tg(t);i=(i+" "+s).trim(),t.childNodes&&t.childNodes.length&&(i=(i+" "+e(t)).trim())}catch(e){ew.error("[AutoCapture]",e)}}),i}(e)).trim())?t:""}function tO(e){return e.replace(/"|\\"/g,'\\"')}class tA{constructor(e){this.disabled=!1===e;var t=C(e)?e:{};this.thresholdPx=t.threshold_px||30,this.timeoutMs=t.timeout_ms||1e3,this.clickCount=t.click_count||3,this.clicks=[]}isRageClick(e,t,i){if(this.disabled)return!1;var r=this.clicks[this.clicks.length-1];if(r&&Math.abs(e-r.x)+Math.abs(t-r.y)<this.thresholdPx&&i-r.timestamp<this.timeoutMs){if(this.clicks.push({x:e,y:t,timestamp:i}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:e,y:t,timestamp:i}];return!1}}var tM="$copy_autocapture",tL=((tY={}).GZipJS="gzip-js",tY.Base64="base64",tY),tD=e=>{var t=null==a?void 0:a.createElement("a");return O(t)?null:(t.href=e,t)},tN=function(e,t){void 0===t&&(t="&");var i,r,s=[];return eI(e,function(e,t){O(e)||O(t)||"undefined"===t||(i=encodeURIComponent(e instanceof File?e.name:e.toString()),r=encodeURIComponent(t),s[s.length]=r+"="+i)}),s.join(t)},tj=function(e,t){for(var i,r=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),s=0;s<r.length;s++){var n=r[s].split("=");if(n[0]===t){i=n;break}}if(!F(i)||i.length<2)return"";var o=i[1];try{o=decodeURIComponent(o)}catch(e){ew.error("Skipping decoding for malformed query param: "+o)}return o.replace(/\+/g," ")},tH=function(e,t,i){if(!e||!t||!t.length)return e;for(var r=e.split("#"),s=r[0]||"",n=r[1],o=s.split("?"),a=o[1],l=o[0],c=(a||"").split("&"),u=[],h=0;h<c.length;h++){var d=c[h].split("=");F(d)&&(t.includes(d[0])?u.push(d[0]+"="+i):u.push(c[h]))}var p=l;return null!=a&&(p+="?"+u.join("&")),null!=n&&(p+="#"+n),p},tU=function(e,t){var i=e.match(RegExp(t+"=([^&]*)"));return i?i[1]:null},tq=eE("[AutoCapture]");function tB(e,t){return t.length>e?t.slice(0,e)+"...":t}class tV{constructor(e){this.P=!1,this.T=null,this.R=!1,this.instance=e,this.rageclicks=new tA(e.config.rageclick),this.C=null}get I(){var e,t,i=C(this.instance.config.autocapture)?this.instance.config.autocapture:{};return i.url_allowlist=null==(e=i.url_allowlist)?void 0:e.map(e=>new RegExp(e)),i.url_ignorelist=null==(t=i.url_ignorelist)?void 0:t.map(e=>new RegExp(e)),i}F(){if(this.isBrowserSupported()){if(t&&a){var e=e=>{e=e||(null==t?void 0:t.event);try{this.M(e)}catch(e){tq.error("Failed to capture event",e)}};if(eL(a,"submit",e,{capture:!0}),eL(a,"change",e,{capture:!0}),eL(a,"click",e,{capture:!0}),this.I.capture_copied_text){var i=e=>{e=e||(null==t?void 0:t.event),this.M(e,tM)};eL(a,"copy",i,{capture:!0}),eL(a,"cut",i,{capture:!0})}}}else tq.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.P&&(this.F(),this.P=!0)}onRemoteConfig(e){e.elementsChainAsString&&(this.R=e.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[eH]:!!e.autocapture_opt_out}),this.T=!!e.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(e){this.C=e}getElementSelectors(e){var t,i=[];return null==(t=this.C)||t.forEach(t=>{var r=null==a?void 0:a.querySelectorAll(t);null==r||r.forEach(r=>{e===r&&i.push(t)})}),i}get isEnabled(){var e,t,i=null==(e=this.instance.persistence)?void 0:e.props[eH];if(L(this.T)&&!j(i)&&!this.instance.O())return!1;var r=null!=(t=this.T)?t:!!i;return!!this.instance.config.autocapture&&!r}M(e,i){if(void 0===i&&(i="$autocapture"),this.isEnabled){var r,s=t_(e);tl(s)&&(s=s.parentNode||null),"$autocapture"===i&&"click"===e.type&&e instanceof MouseEvent&&this.instance.config.rageclick&&null!=(r=this.rageclicks)&&r.isRageClick(e.clientX,e.clientY,e.timeStamp||(new Date).getTime())&&function(e,i){if(!t||tw(e)||(j(i)?(r=!!i&&tb,s=void 0):(r=null!=(n=null==i?void 0:i.css_selector_ignorelist)?n:tb,s=null==i?void 0:i.content_ignorelist),!1===r))return!1;var r,s,n,{targetElementList:o}=tE(e,!1);return!function(e,t){var i;if(!1===e||O(e))return!1;if(!0===e)i=ty;else{if(!F(e))return!1;if(e.length>10)return ew.error("[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching."),!1;i=e.map(e=>e.toLowerCase())}return t.some(e=>{var{safeText:t,ariaLabel:r}=e;return i.some(e=>t.includes(e)||r.includes(e))})}(s,o.map(e=>{var t;return{safeText:tg(e).toLowerCase(),ariaLabel:(null==(t=e.getAttribute("aria-label"))?void 0:t.toLowerCase().trim())||""}}))&&!tf(o,r)}(s,this.instance.config.rageclick)&&this.M(e,"$rageclick");var n=i===tM;if(s&&function(e,i,r,s,n){if(void 0===r&&(r=void 0),!t||tw(e)||null!=(o=r)&&o.url_allowlist&&!th(r.url_allowlist)||null!=(a=r)&&a.url_ignorelist&&th(r.url_ignorelist))return!1;if(null!=(l=r)&&l.dom_event_allowlist){var o,a,l,c,u=r.dom_event_allowlist;if(u&&!u.some(e=>i.type===e))return!1}var{parentIsUsefulElement:h,targetElementList:d}=tE(e,s);if(!function(e,t){var i=null==t?void 0:t.element_allowlist;if(O(i))return!0;var r,s=function(e){if(i.some(t=>e.tagName.toLowerCase()===t))return{v:!0}};for(var n of e)if(r=s(n))return r.v;return!1}(d,r)||!tf(d,null==(c=r)?void 0:c.css_selector_allowlist))return!1;var p=t.getComputedStyle(e);
2if(p&&"pointer"===p.getPropertyValue("cursor")&&"click"===i.type)return!0;var g=e.tagName.toLowerCase();switch(g){case"html":return!1;case"form":return(n||["submit"]).indexOf(i.type)>=0;case"input":case"select":case"textarea":return(n||["change","click"]).indexOf(i.type)>=0;default:return h?(n||["click"]).indexOf(i.type)>=0:(n||["click"]).indexOf(i.type)>=0&&(tv.indexOf(g)>-1||"true"===e.getAttribute("contenteditable"))}}(s,e,this.I,n,n?["copy","cut"]:void 0)){var{props:o,explicitNoCapture:a}=function(e,i){for(var r,s,{e:n,maskAllElementAttributes:o,maskAllText:a,elementAttributeIgnoreList:l,elementsChainAsString:c}=i,u=[e],h=e;h.parentNode&&!ta(h,"body");)tc(h.parentNode)?(u.push(h.parentNode.host),h=h.parentNode.host):(u.push(h.parentNode),h=h.parentNode);var d,p=[],g={},_=!1,v=!1;if(eI(u,e=>{var t=tx(e);"a"===e.tagName.toLowerCase()&&(_=e.getAttribute("href"),_=t&&_&&tC(_)&&_),E(td(e),"ph-no-capture")&&(v=!0),p.push(function(e,t,i,r){var s=e.tagName.toLowerCase(),n={tag_name:s};tv.indexOf(s)>-1&&!i&&("a"===s.toLowerCase()||"button"===s.toLowerCase()?n.$el_text=tB(1024,tR(e)):n.$el_text=tB(1024,tg(e)));var o=td(e);o.length>0&&(n.classes=o.filter(function(e){return""!==e})),eI(e.attributes,function(i){var s;if((!tk(e)||-1!==["name","id","class","aria-label"].indexOf(i.name))&&(null==r||!r.includes(i.name))&&!t&&tC(i.value)&&(!A(s=i.name)||"_ngcontent"!==s.substring(0,10)&&"_nghost"!==s.substring(0,7))){var o=i.value;"class"===i.name&&(o=tu(o).join(" ")),n["attr__"+i.name]=tB(1024,o)}});for(var a=1,l=1,c=e;c=function(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!to(t))return t}(c);)a++,c.tagName===e.tagName&&l++;return n.nth_child=a,n.nth_of_type=l,n}(e,o,a,l)),e$(g,function(e){if(!tx(e))return{};var t={};return eI(e.attributes,function(e){if(e.name&&0===e.name.indexOf("data-ph-capture-attribute")){var i=e.name.replace("data-ph-capture-attribute-",""),r=e.value;i&&r&&tC(r)&&(t[i]=r)}}),t}(e))}),v)return{props:{},explicitNoCapture:v};if(a||("a"===e.tagName.toLowerCase()||"button"===e.tagName.toLowerCase()?p[0].$el_text=tR(e):p[0].$el_text=tg(e)),_){p[0].attr__href=_;var m,y,b=null==(m=tD(_))?void 0:m.host,w=null==t||null==(y=t.location)?void 0:y.host;b&&w&&b!==w&&(d=_)}return{props:e$({$event_type:n.type,$ce_version:1},c?{}:{$elements:p},{$elements_chain:p.map(e=>{var t,i,r,s={text:null==(i=e.$el_text)?void 0:i.slice(0,400),tag_name:e.tag_name,href:null==(r=e.attr__href)?void 0:r.slice(0,2048),attr_class:(t=e.attr__class)?F(t)?t:tu(t):void 0,attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return eT(e).filter(e=>{var[t]=e;return 0===t.indexOf("attr__")}).forEach(e=>{var[t,i]=e;return s.attributes[t]=i}),s}).map(e=>{var t,i,r="";if(e.tag_name&&(r+=e.tag_name),e.attr_class)for(var s of(e.attr_class.sort(),e.attr_class))r+="."+s.replace(/"/g,"");var n=f({},e.text?{text:e.text}:{},{"nth-child":null!=(t=e.nth_child)?t:0,"nth-of-type":null!=(i=e.nth_of_type)?i:0},e.href?{href:e.href}:{},e.attr_id?{attr_id:e.attr_id}:{},e.attributes),o={};return eT(n).sort((e,t)=>{var[i]=e,[r]=t;return i.localeCompare(r)}).forEach(e=>{var[t,i]=e;return o[tO(t.toString())]=tO(i.toString())}),r+=":",r+=eT(o).map(e=>{var[t,i]=e;return t+'="'+i+'"'}).join("")}).join(";")},null!=(r=p[0])&&r.$el_text?{$el_text:null==(s=p[0])?void 0:s.$el_text}:{},d&&"click"===n.type?{$external_click_url:d}:{},g)}}(s,{e:e,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.I.element_attribute_ignorelist,elementsChainAsString:this.R});if(a)return!1;var l=this.getElementSelectors(s);if(l&&l.length>0&&(o.$element_selectors=l),i===tM){var c,u=tp(null==t||null==(c=t.getSelection())?void 0:c.toString()),h=e.type||"clipboard";if(!u)return!1;o.$selected_content=u,o.$copy_type=h}return this.instance.capture(i,o),!0}}}isBrowserSupported(){return T(null==a?void 0:a.querySelectorAll)}}Math.trunc||(Math.trunc=function(e){return e<0?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return N(e)&&isFinite(e)&&Math.floor(e)===e});var tG="0123456789abcdef";class tW{constructor(e){if(this.bytes=e,16!==e.length)throw TypeError("not 128-bit length")}static fromFieldsV7(e,t,i,r){if(!Number.isInteger(e)||!Number.isInteger(t)||!Number.isInteger(i)||!Number.isInteger(r)||e<0||t<0||i<0||r<0||e>0xffffffffffff||t>4095||i>0x3fffffff||r>0xffffffff)throw RangeError("invalid field value");var s=new Uint8Array(16);return s[0]=e/0x10000000000,s[1]=e/0x100000000,s[2]=e/0x1000000,s[3]=e/65536,s[4]=e/256,s[5]=e,s[6]=112|t>>>8,s[7]=t,s[8]=128|i>>>24,s[9]=i>>>16,s[10]=i>>>8,s[11]=i,s[12]=r>>>24,s[13]=r>>>16,s[14]=r>>>8,s[15]=r,new tW(s)}toString(){for(var e="",t=0;t<this.bytes.length;t++)e=e+tG.charAt(this.bytes[t]>>>4)+tG.charAt(15&this.bytes[t]),3!==t&&5!==t&&7!==t&&9!==t||(e+="-");if(36!==e.length)throw Error("Invalid UUIDv7 was generated");return e}clone(){return new tW(this.bytes.slice(0))}equals(e){return 0===this.compareTo(e)}compareTo(e){for(var t=0;t<16;t++){var i=this.bytes[t]-e.bytes[t];if(0!==i)return Math.sign(i)}return 0}}class tz{constructor(){this.A=0,this.D=0,this.j=new tK}generate(){var e=this.generateOrAbort();if(O(e)){this.A=0;var t=this.generateOrAbort();if(O(t))throw Error("Could not generate UUID after timestamp reset");return t}return e}generateOrAbort(){var e=Date.now();if(e>this.A)this.A=e,this.L();else{if(!(e+1e4>this.A))return;this.D++,this.D>
vendor: 10,049 bytes, line 2
20x3ffffffffff&&(this.A++,this.L())}return tW.fromFieldsV7(this.A,Math.trunc(this.D/0x40000000),0x3fffffff&this.D,this.j.nextUint32())}L(){this.D=1024*this.j.nextUint32()+(1023&this.j.nextUint32())}}var tY,tJ,tX=e=>{if("undefined"!=typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw Error("no cryptographically strong RNG available");for(var t=0;t<e.length;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};t&&!O(t.crypto)&&crypto.getRandomValues&&(tX=e=>crypto.getRandomValues(e));class tK{constructor(){this.N=new Uint32Array(8),this.U=1/0}nextUint32(){return this.U>=this.N.length&&(tX(this.N),this.U=0),this.N[this.U++]}}var tZ=()=>tQ().toString(),tQ=()=>(tJ||(tJ=new tz)).generate(),t0="",t1=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,t2={H:()=>!!a,B:function(e){ew.error("cookieStore error: "+e)},q:function(e){if(a){try{for(var t=e+"=",i=a.cookie.split(";").filter(e=>e.length),r=0;r<i.length;r++){for(var s=i[r];" "==s.charAt(0);)s=s.substring(1,s.length);if(0===s.indexOf(t))return decodeURIComponent(s.substring(t.length,s.length))}}catch(e){}return null}},W:function(e){var t;try{t=JSON.parse(t2.q(e))||{}}catch(e){}return t},G:function(e,t,i,r,s){if(a)try{var n="",o="",l=function(e,t){if(t){var i=function(e,t){if(void 0===t&&(t=a),t0)return t0;if(!t||["localhost","127.0.0.1"].includes(e))return"";for(var i=e.split("."),r=Math.min(i.length,8),s="dmn_chk_"+tZ();!t0&&r--;){var n=i.slice(r).join("."),o=s+"=1;domain=."+n+";path=/";t.cookie=o+";max-age=3",t.cookie.includes(s)&&(t.cookie=o+";max-age=0",t0=n)}return t0}(e);if(!i){var r,s=(r=e.match(t1))?r[0]:"";s!==i&&ew.info("Warning: cookie subdomain discovery mismatch",s,i),i=s}return i?"; domain=."+i:""}return""}(a.location.hostname,r);if(i){var c=new Date;c.setTime(c.getTime()+24*i*36e5),n="; expires="+c.toUTCString()}s&&(o="; secure");var u=e+"="+encodeURIComponent(JSON.stringify(t))+n+"; SameSite=Lax; path=/"+l+o;return u.length>3686.4&&ew.warn("cookieStore warning: large cookie, len="+u.length),a.cookie=u,u}catch(e){return}},V:function(e,t){if(null!=a&&a.cookie)try{t2.G(e,"",-1,t)}catch(e){return}}},t3=null,t5={H:function(){if(!L(t3))return t3;var e=!0;if(O(t))e=!1;else try{var i="__mplssupport__";t5.G(i,"xyz"),'"xyz"'!==t5.q(i)&&(e=!1),t5.V(i)}catch(t){e=!1}return e||ew.error("localStorage unsupported; falling back to cookie store"),t3=e,e},B:function(e){ew.error("localStorage error: "+e)},q:function(e){try{return null==t?void 0:t.localStorage.getItem(e)}catch(e){t5.B(e)}return null},W:function(e){try{return JSON.parse(t5.q(e))||{}}catch(e){}return null},G:function(e,i){try{null==t||t.localStorage.setItem(e,JSON.stringify(i))}catch(e){t5.B(e)}},V:function(e){try{null==t||t.localStorage.removeItem(e)}catch(e){t5.B(e)}}},t8=["distinct_id",eJ,eX,tt,te],t6=f({},t5,{W:function(e){try{var t={};try{t=t2.W(e)||{}}catch(e){}var i=e$(t,JSON.parse(t5.q(e)||"{}"));return t5.G(e,i),i}catch(e){}return null},G:function(e,t,i,r,s,n){try{t5.G(e,t,void 0,void 0,n);var o={};t8.forEach(e=>{t[e]&&(o[e]=t[e])}),Object.keys(o).length&&t2.G(e,o,i,r,s,n)}catch(e){t5.B(e)}},V:function(e,i){try{null==t||t.localStorage.removeItem(e),t2.V(e,i)}catch(e){t5.B(e)}}}),t4={},t7={H:function(){return!0},B:function(e){ew.error("memoryStorage error: "+e)},q:function(e){return t4[e]||null},W:function(e){return t4[e]||null},G:function(e,t){t4[e]=t},V:function(e){delete t4[e]}},t9=null,ie={H:function(){if(!L(t9))return t9;if(t9=!0,O(t))t9=!1;else try{var e="__support__";ie.G(e,"xyz"),'"xyz"'!==ie.q(e)&&(t9=!1),ie.V(e)}catch(e){t9=!1}return t9},B:function(e){ew.error("sessionStorage error: ",e)},q:function(e){try{return null==t?void 0:t.sessionStorage.getItem(e)}catch(e){ie.B(e)}return null},W:function(e){try{return JSON.parse(ie.q(e))||null}catch(e){}return null},G:function(e,i){try{null==t||t.sessionStorage.setItem(e,JSON.stringify(i))}catch(e){ie.B(e)}},V:function(e){try{null==t||t.sessionStorage.removeItem(e)}catch(e){ie.B(e)}}},it=((np={})[np.PENDING=-1]="PENDING",np[np.DENIED=0]="DENIED",np[np.GRANTED=1]="GRANTED",np);class ii{constructor(e){this._instance=e}get I(){return this._instance.config}get consent(){return this.J()?it.DENIED:this.K}isOptedOut(){return"always"===this.I.cookieless_mode||this.consent===it.DENIED||this.consent===it.PENDING&&(this.I.opt_out_capturing_by_default||"on_reject"===this.I.cookieless_mode)}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===it.DENIED}optInOut(e){this.Y.G(this.X,+!!e,this.I.cookie_expiration,this.I.cross_subdomain_cookie,this.I.secure_cookie)}reset(){this.Y.V(this.X,this.I.cross_subdomain_cookie)}get X(){var{token:e,opt_out_capturing_cookie_prefix:t,consent_persistence_name:i}=this._instance.config;return i||(t?t+e:"__ph_opt_in_out_"+e)}get K(){var e=this.Y.q(this.X);return E(V,e)?it.GRANTED:E(G,e)?it.DENIED:it.PENDING}get Y(){if(!this.Z){var e=this.I.opt_out_capturing_persistence_type;this.Z="localStorage"===e?t5:t2;var t="localStorage"===e?t2:t5;t.q(this.X)&&(this.Z.q(this.X)||this.optInOut(E(V,t.q(this.X))),t.V(this.X,this.I.cross_subdomain_cookie))}return this.Z}J(){return!!this.I.respect_dnt&&!!eM([null==o?void 0:o.doNotTrack,null==o?void 0:o.msDoNotTrack,p.doNotTrack],e=>E(V,e))}}var ir=eE("[Dead Clicks]"),is=()=>!0,io=e=>{var t,i=!(null==(t=e.instance.persistence)||!t.get_property(eW)),r=e.instance.config.capture_dead_clicks;return j(r)?r:!!C(r)||i};class ia{get lazyLoadedDeadClicksAutocapture(){return this.tt}constructor(e,t,i){this.instance=e,this.isEnabled=t,this.onCapture=i,this.startIfEnabled()}onRemoteConfig(e){this.instance.persistence&&this.instance.persistence.register({[eW]:null==e?void 0:e.captureDeadClicks}),this.startIfEnabled()}startIfEnabled(){this.isEnabled(this)&&this.it(()=>{this.et()})}it(e){var t,i;null!=(t=p.__PosthogExtensions__)&&t.initDeadClicksAutocapture&&e(),null==(i=p.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this.instance,"dead-clicks-autocapture",t=>{t?ir.error("failed to load script",t):e()})}et(){var e;if(a){if(!this.tt&&null!=(e=p.__PosthogExtensions__)&&e.initDeadClicksAutocapture){var t=C(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};t.__onCapture=this.onCapture,this.tt=p.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,t),this.tt.start(a),ir.info("starting...")}}else ir.error("`document` not found. Cannot start.")}stop(){this.tt&&(this.tt.stop(),this.tt=void 0,ir.info("stopping..."))}}var il=eE("[ExceptionAutocapture]");class ic{constructor(e){var i,r,s;this.rt=()=>{var e;if(t&&this.isEnabled&&null!=(e=p.__PosthogExtensions__)&&e.errorWrappingFunctions){var i=p.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,r=p.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,s=p.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.st&&this.I.capture_unhandled_errors&&(this.st=i(this.captureException.bind(this))),!this.nt&&this.I.capture_unhandled_rejections&&(this.nt=r(this.captureException.bind(this))),!this.ot&&this.I.capture_console_errors&&(this.ot=s(this.captureException.bind(this)))}catch(e){il.error("failed to start",e),this.lt()}}},this._instance=e,this.ut=!(null==(i=this._instance.persistence)||!i.props[eq]),this.I=this.ht(),this.dt=new z({refillRate:null!=(r=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)?r:1,bucketSize:null!=(s=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)?s:10,refillInterval:1e4,h:il}),this.startIfEnabled()}ht(){var e=this._instance.config.capture_exceptions,t={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return C(e)?t=f({},t,e):(O(e)?this.ut:e)&&(t=f({},t,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),t}get isEnabled(){return this.I.capture_console_errors||this.I.capture_unhandled_errors||this.I.capture_unhandled_rejections}startIfEnabled(){this.isEnabled&&(il.info("enabled"),this.it(this.rt))}it(e){var t,i;null!=(t=p.__PosthogExtensions__)&&t.errorWrappingFunctions&&e(),null==(i=p.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"exception-autocapture",t=>{if(t)return il.error("failed to load script",t);e()})}lt(){var e,t,i;null==(e=this.st)||e.call(this),this.st=void 0,null==(t=this.nt)||t.call(this),this.nt=void 0,null==(i=this.ot)||i.call(this),this.ot=void 0}onRemoteConfig(e){var t=e.autocaptureExceptions;this.ut=!!t,this.I=this.ht(),this._instance.persistence&&this._instance.persistence.register({[eq]:this.ut}),this.startIfEnabled()}captureException(e){var t,i,r=null!=(t=null==e||null==(i=e.$exception_list)||null==(i=i[0])?void 0:i.type)?t:"Exception";this.dt.consumeRateLimit(r)?il.info("Skipping exception capture because of client rate limiting.",{exception:r}):this._instance.exceptions.sendExceptionEvent(e)}}function iu(e,t,i){try{if(!(t in e))return()=>{};var r=e[t],s=i(r);return T(s)&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=s,()=>{e[t]=r}}catch(e){return()=>{}}}class ih{constructor(e){var i;this._instance=e,this.vt=(null==t||null==(i=t.location)?void 0:i.pathname)||""}get isEnabled(){return"history_change"===this._instance.config.capture_pageview}startIfEnabled(){this.isEnabled&&(ew.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.ct&&this.ct(),this.ct=void 0,ew.info("History API monitoring stopped")}monitorHistoryChanges(){var e,i;if(t&&t.history){var r=this;null!=(e=t.history.pushState)&&e.__posthog_wrapped__||iu(t.history,"pushState",e=>function(t,i,s){e.call(this,t,i,s),r.ft("pushState")}),null!=(i=t.history.replaceState)&&i.__posthog_wrapped__||iu(t.history,"replaceState",e=>function(t,i,s){e.call(this,t,i,s),r.ft("replaceState")}),this.gt()}}ft(e){try{var i,r=null==t||null==(i=t.location)?void 0:i.pathname;if(!r)return;r!==this.vt&&this.isEnabled&&this._instance.capture("$pageview",{navigation_type:e}),this.vt=r}catch(t){ew.error("Error capturing "+e+" pageview",t)}}
2gt(){if(!this.ct){var e=()=>{this.ft("popstate")};eL(t,"popstate",e),this.ct=()=>{t&&t.removeEventListener("popstate",e)}}}}var id=eE("[SegmentIntegration]"),ip="posthog-js";function ig(e,t){var{organization:i,projectId:r,prefix:s,severityAllowList:n=["error"],sendExceptionsToPostHog:o=!0}=void 0===t?{}:t;return t=>{if(!("*"===n||n.includes(t.level))||!e.__loaded)return t;t.tags||(t.tags={});var a,l,c,u,h,d=e.requestRouter.endpointFor("ui","/project/"+e.config.token+"/person/"+e.get_distinct_id());t.tags["PostHog Person URL"]=d,e.sessionRecordingStarted()&&(t.tags["PostHog Recording URL"]=e.get_session_replay_url({withTimestamp:!0}));var p=(null==(a=t.exception)?void 0:a.values)||[],g=p.map(e=>f({},e,{stacktrace:e.stacktrace?f({},e.stacktrace,{type:"raw",frames:(e.stacktrace.frames||[]).map(e=>f({},e,{platform:"web:javascript"}))}):void 0})),_={$exception_message:(null==(l=p[0])?void 0:l.value)||t.message,$exception_type:null==(c=p[0])?void 0:c.type,$exception_level:t.level,$exception_list:g,$sentry_event_id:t.event_id,$sentry_exception:t.exception,$sentry_exception_message:(null==(u=p[0])?void 0:u.value)||t.message,$sentry_exception_type:null==(h=p[0])?void 0:h.type,$sentry_tags:t.tags};return i&&r&&(_.$sentry_url=(s||"https://sentry.io/organizations/")+i+"/issues/?project="+r+"&query="+t.event_id),o&&e.exceptions.sendExceptionEvent(_),t}}class i_{constructor(e,t,i,r,s,n){this.name=ip,this.setupOnce=function(o){o(ig(e,{organization:t,projectId:i,prefix:r,severityAllowList:s,sendExceptionsToPostHog:null==n||n}))}}}var iv=null!=t&&t.location?tU(t.location.hash,"__posthog")||tU(location.hash,"state"):null,im="_postHogToolbarParams",iy=eE("[Toolbar]"),ib=((ng=ib||{})[ng.UNINITIALIZED=0]="UNINITIALIZED",ng[ng.LOADING=1]="LOADING",ng[ng.LOADED=2]="LOADED",ng);class iw{constructor(e){this.instance=e}_t(e){p.ph_toolbar_state=e}yt(){var e;return null!=(e=p.ph_toolbar_state)?e:ib.UNINITIALIZED}maybeLoadToolbar(e,i,r){if(void 0===e&&(e=void 0),void 0===i&&(i=void 0),void 0===r&&(r=void 0),!t||!a)return!1;e=null!=e?e:t.location,r=null!=r?r:t.history;try{if(!i){try{t.localStorage.setItem("test","test"),t.localStorage.removeItem("test")}catch(e){return!1}i=null==t?void 0:t.localStorage}var s,n=iv||tU(e.hash,"__posthog")||tU(e.hash,"state"),o=n?eC(()=>JSON.parse(atob(decodeURIComponent(n))))||eC(()=>JSON.parse(decodeURIComponent(n))):null;return o&&"ph_authorize"===o.action?((s=o).source="url",s&&Object.keys(s).length>0&&(o.desiredHash?e.hash=o.desiredHash:r?r.replaceState(r.state,"",e.pathname+e.search):e.hash="")):((s=JSON.parse(i.getItem(im)||"{}")).source="localstorage",delete s.userIntent),!(!s.token||this.instance.config.token!==s.token)&&(this.loadToolbar(s),!0)}catch(e){return!1}}bt(e){var t=p.ph_load_toolbar||p.ph_load_editor;!D(t)&&T(t)?t(e,this.instance):iy.warn("No toolbar load function found")}loadToolbar(e){var i,r=!(null==a||!a.getElementById(ti));if(!t||r)return!1;var s="custom"===this.instance.requestRouter.region&&this.instance.config.advanced_disable_toolbar_metrics,n=f({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor("ui")},s?{instrument:!1}:{});return(t.localStorage.setItem(im,JSON.stringify(f({},n,{source:void 0}))),this.yt()===ib.LOADED)?this.bt(n):this.yt()===ib.UNINITIALIZED&&(this._t(ib.LOADING),null==(i=p.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this.instance,"toolbar",e=>{e?(iy.error("[Toolbar] Failed to load",e),this._t(ib.UNINITIALIZED)):(this._t(ib.LOADED),this.bt(n))}),eL(t,"turbolinks:load",()=>{this._t(ib.UNINITIALIZED),this.loadToolbar(n)})),!0}wt(e){return this.loadToolbar(e)}maybeLoadEditor(e,t,i){return void 0===e&&(e=void 0),void 0===t&&(t=void 0),void 0===i&&(i=void 0),this.maybeLoadToolbar(e,t,i)}}var iE=eE("[TracingHeaders]");class ix{constructor(e){this.xt=void 0,this.Et=void 0,this.rt=()=>{var e,t;O(this.xt)&&(null==(e=p.__PosthogExtensions__)||null==(e=e.tracingHeadersPatchFns)||e._patchXHR(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager)),O(this.Et)&&(null==(t=p.__PosthogExtensions__)||null==(t=t.tracingHeadersPatchFns)||t._patchFetch(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager))},this._instance=e}it(e){var t,i;null!=(t=p.__PosthogExtensions__)&&t.tracingHeadersPatchFns&&e(),null==(i=p.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"tracing-headers",t=>{if(t)return iE.error("failed to load script",t);e()})}startIfEnabledOrStop(){var e,t;this._instance.config.__add_tracing_headers?this.it(this.rt):(null==(e=this.xt)||e.call(this),null==(t=this.Et)||t.call(this),this.xt=void 0,this.Et=void 0)}}var ik="Mobile",iS="Android",iP="Tablet",iI=iS+" "+iP,i$="iPad",iF="Apple",iT=iF+" Watch",iC="Safari",iR="BlackBerry",iO="Samsung",iA=iO+"Browser",iM=iO+" Internet",iL="Chrome",iD=iL+" OS",iN=iL+" iOS",ij="Internet Explorer",iH=ij+" "+ik,iU="Opera",iq=iU+" Mini",iB="Edge",iV="Microsoft "+iB,iG="Firefox",iW=iG+" iOS",iz="Nintendo",iY="PlayStation",iJ="Xbox",iX=iS+" "+ik,iK=ik+" "+iC,iZ="Windows",iQ=iZ+" Phone",i0="Nokia",i1="Ouya",i2="Generic",i3=i2+" "+ik.toLowerCase(),i5=i2+" "+iP.toLowerCase(),i8="Konqueror",i6="(\\d+(\\.\\d+)?)",i4=RegExp("Version/"+i6),i7=RegExp(iJ,"i"),i9=RegExp(iY+" \\w+","i"),re=RegExp(iz+" \\w+","i"),rt=RegExp(iR+"|PlayBook|BB10","i"),ri={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"},rr=function(e,t){var i;return t=t||"",E(e," OPR/")&&E(e,"Mini")?iq:E(e," OPR/")?iU:rt.test(e)?iR:E(e,"IE"+ik)||E(e,"WPDesktop")?iH:E(e,iA)?iM:E(e,iB)||E(e,"Edg/")?iV:E(e,"FBIOS")?"Facebook "+ik:E(e,"UCWEB")||E(e,"UCBrowser")?"UC Browser":E(e,"CriOS")?iN:E(e,"CrMo")||E(e,iL)?iL:E(e,iS)&&E(e,iC)?iX:E(e,"FxiOS")?iW:E(e.toLowerCase(),i8.toLowerCase())?i8:(i=t)&&E(i,iF)||E(e,iC)&&!E(e,iL)&&!E(e,iS)?E(e,ik)?iK:iC:E(e,iG)?iG:E(e,"MSIE")||E(e,"Trident/")?ij:E(e,"Gecko")?iG:""},rs={[iH]:[RegExp("rv:"+i6)],[iV]:[RegExp(iB+"?\\/"+i6)],[iL]:[RegExp("("+iL+"|
2CrMo)\\/"+i6)],[iN]:[RegExp("CriOS\\/"+i6)],"UC Browser":[RegExp("(UCBrowser|UCWEB)\\/"+i6)],[iC]:[i4],[iK]:[i4],[iU]:[RegExp("(Opera|OPR)\\/"+i6)],[iG]:[RegExp(iG+"\\/"+i6)],[iW]:[RegExp("FxiOS\\/"+i6)],[i8]:[RegExp("Konqueror[:/]?"+i6,"i")],[iR]:[RegExp(iR+" "+i6),i4],[iX]:[RegExp("android\\s"+i6,"i")],[iM]:[RegExp(iA+"\\/"+i6)],[ij]:[RegExp("(rv:|MSIE )"+i6)],Mozilla:[RegExp("rv:"+i6)]},rn=function(e,t){var i=rs[rr(e,t)];if(O(i))return null;for(var r=0;r<i.length;r++){var s=i[r],n=e.match(s);if(n)return parseFloat(n[n.length-2])}return null},ro=[[RegExp(iJ+"; "+iJ+" (.*?)[);]","i"),e=>[iJ,e&&e[1]||""]],[RegExp(iz,"i"),[iz,""]],[RegExp(iY,"i"),[iY,""]],[rt,[iR,""]],[RegExp(iZ,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[iQ,""];if(new RegExp(ik).test(t)&&!/IEMobile\b/.test(t))return[iZ+" "+ik,""];var i=/Windows NT ([0-9.]+)/i.exec(t);if(i&&i[1]){var r=ri[i[1]]||"";return/arm/i.test(t)&&(r="RT"),[iZ,r]}return[iZ,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>e&&e[3]?["iOS",[e[3],e[4],e[5]||"0"].join(".")]:["iOS",""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t="";return e&&e.length>=3&&(t=O(e[2])?e[3]:e[2]),["watchOS",t]}],[RegExp("("+iS+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+iS+")","i"),e=>e&&e[2]?[iS,[e[2],e[3],e[4]||"0"].join(".")]:[iS,""]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var t=["Mac OS X",""];if(e&&e[1]){var i=[e[1],e[2],e[3]||"0"];t[1]=i.join(".")}return t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[iD,""]],[/Linux|debian/i,["Linux",""]]],ra=function(e){return re.test(e)?iz:i9.test(e)?iY:i7.test(e)?iJ:RegExp(i1,"i").test(e)?i1:RegExp("("+iQ+"|WPDesktop)","i").test(e)?iQ:/iPad/.test(e)?i$:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?iT:rt.test(e)?iR:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":RegExp(i0,"i").test(e)?i0:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?!new RegExp(ik).test(e)||/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)?/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?iS:iI:iS:RegExp("(pda|"+ik+")","i").test(e)?i3:RegExp(iP,"i").test(e)&&!RegExp(iP+" pc","i").test(e)?i5:""},rl="https?://(.*)",rc=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],ru=eF(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],rc),rh="<masked>",rd=["li_fat_id"];function rp(e,t,i){if(!a)return{};var r,s=t?eF([],rc,i||[]):[],n=rg(tH(a.URL,s,rh),e);return e$((r={},eI(rd,function(e){var t=t2.q(e);r[e]=t||null}),r),n)}function rg(e,t){var i=ru.concat(t||[]),r={};return eI(i,function(t){var i=tj(e,t);r[t]=i||null}),r}function r_(e){var t=e?0===e.search(rl+"google.([^/?]*)")?"google":0===e.search(rl+"bing.com")?"bing":0===e.search(rl+"yahoo.com")?"yahoo":0===e.search(rl+"duckduckgo.com")?"duckduckgo":null:null,i={};if(!L(t)){i.$search_engine=t;var r=a?tj(a.referrer,"yahoo"!=t?"q":"p"):"";r.length&&(i.ph_keyword=r)}return i}function rv(){return navigator.language||navigator.userLanguage}function rf(){return(null==a?void 0:a.referrer)||"$direct"}function rm(e,t){var i=e?eF([],rc,t||[]):[],r=null==l?void 0:l.href.substring(0,1e3);return{r:rf().substring(0,1e3),u:r?tH(r,i,rh):void 0}}function ry(e){var t,{r:i,u:r}=e,s={$referrer:i,$referring_domain:null==i?void 0:"$direct"==i?"$direct":null==(t=tD(i))?void 0:t.host};if(r){s.$current_url=r;var n=tD(r);s.$host=null==n?void 0:n.host,s.$pathname=null==n?void 0:n.pathname,e$(s,rg(r))}return i&&e$(s,r_(i)),s}function rb(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}}var rw=eE("[Web Vitals]");class rE{constructor(e){var t;this.St=!1,this.P=!1,this.N={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.$t=()=>{clearTimeout(this.kt),0!==this.N.metrics.length&&(this._instance.capture("$web_vitals",this.N.metrics.reduce((e,t)=>
vendor: 15,263 bytes, line 2
2f({},e,{["$web_vitals_"+t.name+"_event"]:f({},t),["$web_vitals_"+t.name+"_value"]:t.value}),{})),this.N={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.Pt=e=>{var t,i=null==(t=this._instance.sessionManager)?void 0:t.checkAndGetSessionAndWindowId(!0);if(O(i))rw.error("Could not read session ID. Dropping metrics!");else{this.N=this.N||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var r=this.Tt();O(r)||(D(null==e?void 0:e.name)||D(null==e?void 0:e.value)?rw.error("Invalid metric received",e):this.Rt&&e.value>=this.Rt?rw.error("Ignoring metric with value >= "+this.Rt,e):(this.N.url!==r&&(this.$t(),this.kt=setTimeout(this.$t,this.flushToCaptureTimeoutMs)),O(this.N.url)&&(this.N.url=r),this.N.firstMetricTimestamp=O(this.N.firstMetricTimestamp)?Date.now():this.N.firstMetricTimestamp,e.attribution&&e.attribution.interactionTargetElement&&(e.attribution.interactionTargetElement=void 0),this.N.metrics.push(f({},e,{$current_url:r,$session_id:i.sessionId,$window_id:i.windowId,timestamp:Date.now()})),this.N.metrics.length===this.allowedMetrics.length&&this.$t()))}},this.rt=()=>{var e,t,i,r,s=p.__PosthogExtensions__;O(s)||O(s.postHogWebVitalsCallbacks)||({onLCP:e,onCLS:t,onFCP:i,onINP:r}=s.postHogWebVitalsCallbacks),e&&t&&i&&r?(this.allowedMetrics.indexOf("LCP")>-1&&e(this.Pt.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&t(this.Pt.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&i(this.Pt.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&r(this.Pt.bind(this)),this.P=!0):rw.error("web vitals callbacks not loaded - not starting")},this._instance=e,this.St=!(null==(t=this._instance.persistence)||!t.props[eG]),this.startIfEnabled()}get allowedMetrics(){var e,t,i=C(this._instance.config.capture_performance)?null==(e=this._instance.config.capture_performance)?void 0:e.web_vitals_allowed_metrics:void 0;return O(i)?(null==(t=this._instance.persistence)?void 0:t.props[ez])||["CLS","FCP","INP","LCP"]:i}get flushToCaptureTimeoutMs(){return(C(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals_delayed_flush_ms:void 0)||5e3}get Rt(){var e=C(this._instance.config.capture_performance)&&N(this._instance.config.capture_performance.__web_vitals_max_value)?this._instance.config.capture_performance.__web_vitals_max_value:9e5;return 0<e&&e<=6e4?9e5:e}get isEnabled(){var e=null==l?void 0:l.protocol;if("http:"!==e&&"https:"!==e)return rw.info("Web Vitals are disabled on non-http/https protocols"),!1;var t=C(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals:j(this._instance.config.capture_performance)?this._instance.config.capture_performance:void 0;return j(t)?t:this.St}startIfEnabled(){this.isEnabled&&!this.P&&(rw.info("enabled, starting..."),this.it(this.rt))}onRemoteConfig(e){var t=C(e.capturePerformance)&&!!e.capturePerformance.web_vitals,i=C(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[eG]:t}),this._instance.persistence.register({[ez]:i})),this.St=t,this.startIfEnabled()}it(e){var t,i;null!=(t=p.__PosthogExtensions__)&&t.postHogWebVitalsCallbacks&&e(),null==(i=p.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"web-vitals",t=>{t?rw.error("failed to load script",t):e()})}Tt(){var e=t?t.location.href:void 0;if(e){var i=this._instance.config.mask_personal_data_properties,r=this._instance.config.custom_personal_data_properties;return tH(e,i?eF([],rc,r||[]):[],rh)}rw.error("Could not determine current URL")}}var rx=eE("[Heatmaps]");function rk(e){return C(e)&&"clientX"in e&&"clientY"in e&&N(e.clientX)&&N(e.clientY)}class rS{constructor(e){var t;this.St=!1,this.P=!1,this.Ct=null,this.instance=e,this.St=!(null==(t=this.instance.persistence)||!t.props[eU]),this.rageclicks=new tA(e.config.rageclick)}get flushIntervalMilliseconds(){var e=5e3;return C(this.instance.config.capture_heatmaps)&&this.instance.config.capture_heatmaps.flush_interval_milliseconds&&(e=this.instance.config.capture_heatmaps.flush_interval_milliseconds),e}get isEnabled(){return O(this.instance.config.capture_heatmaps)?O(this.instance.config.enable_heatmaps)?this.St:this.instance.config.enable_heatmaps:!1!==this.instance.config.capture_heatmaps}startIfEnabled(){if(this.isEnabled)this.P||(rx.info("starting..."),this.It(),this.Ft());else{var e;clearInterval(null!=(e=this.Ct)?e:void 0),this.Mt(),this.getAndClearBuffer()}}onRemoteConfig(e){var t=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[eU]:t}),this.St=t,this.startIfEnabled()}getAndClearBuffer(){var e=this.N;return this.N=void 0,e}Ot(e){this.At(e.originalEvent,"deadclick")}Ft(){this.Ct&&clearInterval(this.Ct),this.Ct="visible"===(null==a?void 0:a.visibilityState)?setInterval(this.Dt.bind(this),this.flushIntervalMilliseconds):null}It(){t&&a&&(this.jt=this.Dt.bind(this),eL(t,"beforeunload",this.jt),this.Lt=e=>this.At(e||(null==t?void 0:t.event)),eL(a,"click",this.Lt,{capture:!0}),this.Nt=e=>this.Ut(e||(null==t?void 0:t.event)),eL(a,"mousemove",this.Nt,{capture:!0}),this.zt=new ia(this.instance,is,this.Ot.bind(this)),this.zt.startIfEnabled(),this.Ht=this.Ft.bind(this),eL(a,"visibilitychange",this.Ht),this.P=!0)}Mt(){var e;t&&a&&(this.jt&&t.removeEventListener("beforeunload",this.jt),this.Lt&&a.removeEventListener("click",this.Lt,{capture:!0}),this.Nt&&a.removeEventListener("mousemove",this.Nt,{capture:!0}),this.Ht&&a.removeEventListener("visibilitychange",this.Ht),clearTimeout(this.Bt),null==(e=this.zt)||e.stop(),this.P=!1)}qt(e,i){var r=this.instance.scrollManager.scrollY(),s=this.instance.scrollManager.scrollX(),n=this.instance.scrollManager.scrollElement(),o=function(e,i,r){for(var s=e;s&&to(s)&&!ta(s,"body")&&s!==r;){if(E(i,null==t?void 0:t.getComputedStyle(s).position))return!0;s=tm(s)}return!1}(t_(e),["fixed","sticky"],n);return{x:e.clientX+(o?0:s),y:e.clientY+(o?0:r),target_fixed:o,type:i}}At(e,t){var i;if(void 0===t&&(t="click"),!tn(e.target)&&rk(e)){var r=this.qt(e,t);null!=(i=this.rageclicks)&&i.isRageClick(e.clientX,e.clientY,(new Date).getTime())&&this.Wt(f({},r,{type:"rageclick"})),this.Wt(r)}}Ut(e){!tn(e.target)&&rk(e)&&(clearTimeout(this.Bt),this.Bt=setTimeout(()=>{this.Wt(this.qt(e,"mousemove"))},500))}Wt(e){if(t){var i=t.location.href,r=this.instance.config.mask_personal_data_properties,s=this.instance.config.custom_personal_data_properties,n=tH(i,r?eF([],rc,s||[]):[],rh);this.N=this.N||{},this.N[n]||(this.N[n]=[]),this.N[n].push(e)}}Dt(){this.N&&!R(this.N)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}}class rP{constructor(e){this._instance=e}doPageView(e,i){var r,s=this.Gt(e,i);return this.Vt={pathname:null!=(r=null==t?void 0:t.location.pathname)?r:"",pageViewId:i,timestamp:e},this._instance.scrollManager.resetContext(),s}doPageLeave(e){var t;return this.Gt(e,null==(t=this.Vt)?void 0:t.pageViewId)}doEvent(){var e;return{$pageview_id:null==(e=this.Vt)?void 0:e.pageViewId}}Gt(e,t){var i=this.Vt;if(!i)return{$pageview_id:t};var r={$pageview_id:t,$prev_pageview_id:i.pageViewId},s=this._instance.scrollManager.getContext();if(s&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:n,lastScrollY:o,maxScrollY:a,maxContentHeight:l,lastContentY:c,maxContentY:u}=s;if(!(O(n)||O(o)||O(a)||O(l)||O(c)||O(u))){n=Math.ceil(n),o=Math.ceil(o),a=Math.ceil(a),l=Math.ceil(l),c=Math.ceil(c),u=Math.ceil(u);var h=n<=1?1:W(o/n,0,1,ew),d=n<=1?1:W(a/n,0,1,ew),p=l<=1?1:W(c/l,0,1,ew),g=l<=1?1:W(u/l,0,1,ew);r=e$(r,{$prev_pageview_last_scroll:o,$prev_pageview_last_scroll_percentage:h,$prev_pageview_max_scroll:a,$prev_pageview_max_scroll_percentage:d,$prev_pageview_last_content:c,$prev_pageview_last_content_percentage:p,$prev_pageview_max_content:u,$prev_pageview_max_content_percentage:g})}}return i.pathname&&(r.$prev_pageview_pathname=i.pathname),i.timestamp&&(r.$prev_pageview_duration=(e.getTime()-i.timestamp.getTime())/1e3),r}}var rI=Uint8Array,r$=Uint16Array,rF=Uint32Array,rT=new rI([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),rC=new rI([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),rR=new rI([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),rO=function(e,t){for(var i=new r$(31),r=0;r<31;++r)i[r]=t+=1<<e[r-1];var s=new rF(i[30]);for(r=1;r<30;++r)for(var n=i[r];n<i[r+1];++n)s[n]=n-i[r]<<5|r;return[i,s]},rA=rO(rT,2),rM=rA[0],rL=rA[1];rM[28]=258,rL[258]=28;for(var rD=rO(rC,0)[1],rN=new r$(32768),rj=0;rj<32768;++rj){var rH=(43690&rj)>>>1|(21845&rj)<<1;rH=(61680&(rH=(52428&rH)>>>2|(13107&rH)<<2))>>>4|(3855&rH)<<4,rN[rj]=((65280&rH)>>>8|(255&rH)<<8)>>>1}var rU=function(e,t,i){for(var r=e.length,s=0,n=new r$(t);s<r;++s)++n[e[s]-1];var o,a=new r$(t);for(s=0;s<t;++s)a[s]=a[s-1]+n[s-1]<<1;if(i){o=new r$(1<<t);var l=15-t;for(s=0;s<r;++s)if(e[s])for(var c=s<<4|e[s],u=t-e[s],h=a[e[s]-1]++<<u,d=h|(1<<u)-1;h<=d;++h)o[rN[h]>>>l]=c}else for(o=new r$(r),s=0;s<r;++s)o[s]=rN[a[e[s]-1]++]>>>15-e[s];return o},rq=new rI(288);for(rj=0;rj<144;++rj)rq[rj]=8;for(rj=144;rj<256;++rj)rq[rj]=9;for(rj=256;rj<280;++rj)rq[rj]=7;for(rj=280;rj<288;++rj)rq[rj]=8;var rB=new rI(32);for(rj=0;rj<32;++rj)rB[rj]=5;var rV=rU(rq,9,0),rG=rU(rB,5,0),rW=function(e){return(e/8|0)+(7&e&&1)},rz=function(e,t,i){(null==i||i>e.length)&&(i=e.length);var r=new(e instanceof r$?r$:e instanceof rF?rF:rI)(i-t);return r.set(e.subarray(t,i)),r},rY=function(e,t,i){i<<=7&t;var r=t/8|0;e[r]|=i,e[r+1]|=i>>>8},rJ=function(e,t,i){i<<=7&t;var r=t/8|0;e[r]|=i,e[r+1]|=i>>>8,e[r+2]|=i>>>16},rX=function(e,t){for(var i=[],r=0;r<e.length;++r)e[r]&&i.push({s:r,f:e[r]});var s=i.length,n=i.slice();if(!s)return[new rI(0),0];if(1==s){var o=new rI(i[0].s+1);return o[i[0].s]=1,[o,1]}i.sort(function(e,t){return e.f-t.f}),i.push({s:-1,f:25001});var a=i[0],l=i[1],c=0,u=1,h=2;for(i[0]={s:-1,f:a.f+l.f,l:a,r:l};u!=s-1;)a=i[i[c].f<i[h].f?c++:h++],l=i[c!=u&&i[c].f<i[h].f?c++:h++],i[u++]={s:-1,f:a.f+l.f,l:a,r:l};var d=n[0].s;for(r=1;r<s;++r)n[r].s>d&&(d=n[r].s);var p=new r$(d+1),g=rK(i[u-1],p,0);if(g>t){r=0;var _=0,v=g-t,f=1<<v;for(n.sort(function(e,t){return p[t.s]-p[e.s]||e.f-t.f});r<s;++r){var m=n[r].s;if(!(p[m]>t))break;_+=f-(1<<g-p[m]),p[m]=t}for(_>>>=v;_>0;){var y=n[r].s;p[y]<t?_-=1<<t-p[y]++-1:++r}for(;r>=0&&_;--r){var b=n[r].s;p[b]==t&&(--p[b],++_)}g=t}return[new rI(p),g]},rK=function(e,t,i){return -1==e.s?Math.max(rK(e.l,t,i+1),rK(e.r,t,i+1)):t[e.s]=i},rZ=function(e){for(var t=e.length;t&&!e[--t];);for(var i=new r$(++t),r=0,s=e[0],n=1,o=function(e){i[r++]=e},a=1;a<=t;++a)if(e[a]==s&&a!=t)++n;else{if(!s&&n>2){for(;n>138;n-=138)o(32754);n>2&&(o(n>10?n-11<<5|28690:n-3<<5|12305),n=0)}else if(n>3){for(o(s),--n;n>6;n-=6)o(8304);n>2&&(o(n-3<<5|8208),n=0)}for(;n--;)o(s);n=1,s=e[a]}return[i.subarray(0,r),t]},rQ=function(e,t){for(var i=0,r=0;r<t.length;++r)i+=e[r]*t[r];return i},r0=function(e,t,i){var r=i.length,s=rW(t+2);e[s]=255&r,e[s+1]=r>>>8,e[s+2]=255^e[s],e[s+3]=255^e[s+1];for(var n=0;n<r;++n)e[s+n+4]=i[n];return 8*(s+4+r)},r1=function(e,t,i,r,s,n,o,a,l,c,u){rY(t,u++,i),++s[256];for(var h=rX(s,15),d=h[0],p=h[1],g=rX(n,15),_=g[0],v=g[1],f=rZ(d),m=f[0],y=f[1],b=rZ(_),w=b[0],E=b[1],x=new r$(19),k=0;k<m.length;++k)x[31&m[k]]++;for(k=0;k<w.length;++k)x[31&w[k]]++;for(var S=rX(x,7),P=S[0],I=S[1],$=19;$>4&&!P[rR[$-1]];--$);var F,T,C,R,O=c+5<<3,A=rQ(s,rq)+rQ(n,rB)+o,M=rQ(s,d)+rQ(n,_)+o+14+3*$+rQ(x,P)+(2*x[16]+3*x[17]+7*x[18]);if(O<=A&&O<=M)return r0(t,u,e.subarray(l,l+c));if(rY(t,u,1+(M<A)),u+=2,M<A){F=rU(d,p,0),T=d,C=rU(_,v,0),R=_;var L=rU(P,I,0);for(rY(t,u,y-257),rY(t,u+5,E-1),rY(t,u+10,$-4),u+=14,k=0;k<$;++k)rY(t,u+3*k,P[rR[k]]);u+=3*$;for(var D=[m,w],N=0;N<2;++N){var j=D[N];for(k=0;k<j.length;++k){var H=31&j[k];rY(t,u,L[H]),u+=P[H],H>15&&(rY(t,u,j[k]>>>5&127),u+=j[k]>>>12)}}}else F=rV,T=rq,C=rG,R=rB;for(k=0;k<a;++k)if(r[k]>255){rJ(t,u,F[(H=r[k]>>>18&31)+257]),u+=T[H+257],H>7&&(rY(t,u,r[k]>>>23&31),u+=rT[H]);var U=31&r[k];rJ(t,u,C[U]),u+=R[U],U>3&&(rJ(t,u,r[k]>>>5&8191),u+=rC[U])}else rJ(t,u,F[r[k]]),u+=T[r[k]];return rJ(t,u,F[256]),u+T[256]},r2=new rF([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),r3=function(){for(var e=new rF(256),t=0;t<256;++t){for(var i=t,r=9;--r;)i=(1&i&&0xedb88320)^i>>>1;e[t]=i}return e}(),r5=function(e,t,i){for(;i;++t)e[t]=i,i>>>=8},r8=function(e){var t,i,r,s,n="";for(t=i=0,r=(e=(e+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n")).length,s=0;s<r;s++){var o=e.charCodeAt(s),a=null;o<128?i++:a=o>127&&o<2048?String.fromCharCode(o>>6|192,63&o|128):String.fromCharCode(o>>12|224,o>>6&63|128,63&o|128),L(a)||(i>t&&(n+=e.substring(t,i)),n+=a,t=i=s+1)}return i>t&&(n+=e.substring(t,e.length)),n},r6=!!u||!!c,r4="text/plain",r7=function(e,t,i){void 0===i&&(i=!0);var r,[s,n]=e.split("?"),o=f({},t),a=null!=(r=null==n?void 0:n.split("&").map(e=>{var t,[r,s]=e.split("="),n=i&&null!=(t=o[r])?t:s;return delete o[r],r+"="+n}))?r:[],l=tN(o);return l&&a.push(l),s+"?"+a.join("&")},r9=(e,t)=>JSON.stringify(e,(e,t)=>"bigint"==typeof t?t.toString():t,t),se=e=>{var{data:t,compression:i}=e;if(t){if(i===tL.GZipJS){var r,s,n,o,a,l,c,u,h=new Blob([(r=function(e,t){var i=e.length;if("undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e);for(var r=new rI(e.length+(e.length>>>1)),s=0,n=function(e){r[s++]=e},o=0;o<i;++o){if(s+5>r.length){var a=new rI(s+8+(i-o<<1));a.set(r),r=a}var l=e.charCodeAt(o);l<128?n(l):(l<2048?n(192|l>>>6):(l>55295&&l<57344?(n(240|(l=65536+(1047552&l)|1023&e.charCodeAt(++o))>>>18),n(128|l>>>12&63)):n(224|l>>>12),n(128|l>>>6&63)),n(128|63&l))}return rz(r,0,s)}(r9(t)),s={mtime:0},n=0xffffffff,o={p:function(e){for(var t=n,i=0;i<e.length;++i)t=r3[255&t^e[i]]^t>>>8;n=t},d:function(){return 0xffffffff^n}},a=r.length,o.p(r),u=(l=10+(s.filename&&s.filename.length+1||0),c=function(e,t,i,r,s,n){var o=e.length,a=new rI(r+o+5*(1+Math.floor(o/7e3))+8),l=a.subarray(r,a.length-8),c=0;if(!t||o<8)for(var u=0;u<=o;u+=65535){var h=u+65535;h<o?c=r0(l,c,e.subarray(u,h)):(l[u]=n,c=r0(l,c,e.subarray(u,o)))}else{for(var d=r2[t-1],p=d>>>13,g=8191&d,_=(1<<i)-1,v=new r$(32768),f=new r$(_+1),m=Math.ceil(i/3),y=2*m,b=function(t){return(e[t]^e[t+1]<<m^e[t+2]<<y)&_},w=new rF(25e3),E=new r$(288),x=new r$(32),k=0,S=0,P=(u=0,0),I=0,$=0;u<o;++u){var F=b(u),T=32767&u,C=f[F];if(v[T]=C,f[F]=T,I<=u){var R=o-u;if((k>7e3||P>24576)&&R>423){c=r1(e,l,0,w,E,x,S,P,$,u-$,c),P=k=S=0,$=u;for(var O=0;O<286;++O)E[O]=0;for(O=0;O<30;++O)x[O]=0}var A=2,M=0,L=g,D=T-C&32767;if(R>2&&F==b(u-D))for(var N=Math.min(p,R)-1,j=Math.min(32767,u),H=Math.min(258,R);D<=j&&--L&&T!=C;){if(e[u+A]==e[u+A-D]){for(var U=0;U<H&&e[u+U]==e[u+U-D];++U);if(U>A){if(A=U,M=D,U>N)break;var q=Math.min(D,U-2),B=0;for(O=0;O<q;++O){var V=u-D+O+32768&32767,G=V-v[V]+32768&32767;G>B&&(B=G,C=V)}}}D+=(T=C)-(C=v[T])+32768&32767}if(M){w[P++]=0x10000000|rL[A]<<18|rD[M];var W=31&rL[A],z=31&rD[M];S+=rT[W]+rC[z],++E[257+W],++x[z],I=u+A,++k}else w[P++]=e[u],++E[e[u]]}}c=r1(e,l,n,w,E,x,S,P,$,u-$,c)}return rz(a,0,r+rW(c)+8)}(r,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(r.length)))):12+s.mem,l,8,!0)).length,function(e,t){var i=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:2*(9==t.level),e[9]=3,0!=t.mtime&&r5(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),i){e[3]=8;for(var r=0;r<=i.length;++r)e[r+10]=i.charCodeAt(r)}}
2(c,s),r5(c,u-8,o.d()),r5(c,u-4,a),c)],{type:r4});return{contentType:r4,body:h,estimatedSize:h.size}}if(i===tL.Base64){let e;var d="data="+encodeURIComponent("string"==typeof(e=function(e){var t,i,r,s,n,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a=0,l=0,c="",u=[];if(!e)return e;e=r8(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,s=63&n,u[l++]=o.charAt(t)+o.charAt(i)+o.charAt(r)+o.charAt(s);while(a<e.length)switch(c=u.join(""),e.length%3){case 1:c=c.slice(0,-2)+"==";break;case 2:c=c.slice(0,-1)+"="}return c}(r9(t)))?e:r9(e));return{contentType:"application/x-www-form-urlencoded",body:d,estimatedSize:new Blob([d]).size}}var p=r9(t);return{contentType:"application/json",body:p,estimatedSize:new Blob([p]).size}}},st=[];c&&st.push({transport:"fetch",method:e=>{var t,i,{contentType:r,body:s,estimatedSize:n}=null!=(t=se(e))?t:{},o=new Headers;eI(e.headers,function(e,t){o.append(t,e)}),r&&o.append("Content-Type",r);var a=e.url,l=null;if(h){var u=new h;l={signal:u.signal,timeout:setTimeout(()=>u.abort(),e.timeout)}}c(a,f({method:(null==e?void 0:e.method)||"GET",headers:o,keepalive:"POST"===e.method&&52428.8>(n||0),body:s,signal:null==(i=l)?void 0:i.signal},e.fetchOptions)).then(t=>t.text().then(i=>{var r={statusCode:t.status,text:i};if(200===t.status)try{r.json=JSON.parse(i)}catch(e){ew.error(e)}null==e.callback||e.callback(r)})).catch(t=>{ew.error(t),null==e.callback||e.callback({statusCode:0,text:t})}).finally(()=>l?clearTimeout(l.timeout):null)}}),u&&st.push({transport:"XHR",method:e=>{var t,i=new u;i.open(e.method||"GET",e.url,!0);var{contentType:r,body:s}=null!=(t=se(e))?t:{};eI(e.headers,function(e,t){i.setRequestHeader(t,e)}),r&&i.setRequestHeader("Content-Type",r),e.timeout&&(i.timeout=e.timeout),e.disableXHRCredentials||(i.withCredentials=!0),i.onreadystatechange=()=>{if(4===i.readyState){var t={statusCode:i.status,text:i.responseText};if(200===i.status)try{t.json=JSON.parse(i.responseText)}catch(e){}null==e.callback||e.callback(t)}},i.send(s)}}),null!=o&&o.sendBeacon&&st.push({transport:"sendBeacon",method:e=>{var t=r7(e.url,{beacon:"1"});try{var i,{contentType:r,body:s}=null!=(i=se(e))?i:{},n="string"==typeof s?new Blob([s],{type:r}):s;o.sendBeacon(t,n)}catch(e){}}});var si=function(e,t){if(!function(e){try{new RegExp(e)}catch(e){return!1}return!0}(t))return!1;try{return new RegExp(t).test(e)}catch(e){return!1}};function sr(e,t,i){return r9({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:i})}var ss={exact:(e,t)=>t.some(t=>e.some(e=>t===e)),is_not:(e,t)=>t.every(t=>e.every(e=>t!==e)),regex:(e,t)=>t.some(t=>e.some(e=>si(t,e))),not_regex:(e,t)=>t.every(t=>e.every(e=>!si(t,e))),icontains:(e,t)=>t.map(sn).some(t=>e.map(sn).some(e=>t.includes(e))),not_icontains:(e,t)=>t.map(sn).every(t=>e.map(sn).every(e=>!t.includes(e)))},sn=e=>e.toLowerCase();function so(e,t){return!e||Object.entries(e).every(e=>{var[i,r]=e,s=null==t?void 0:t[i];if(O(s)||L(s))return!1;var n=[String(s)],o=ss[r.operator];return!!o&&o(r.values,n)})}var sa=eE("[Error tracking]");class sl{constructor(e){var t,i;this.Jt=[],this.Kt=new Z([new ec,new ey,new eh,new eu,new ef,new ev,new ep,new em],function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];return function(t,r){void 0===r&&(r=0);for(var s=[],n=t.split("\n"),o=r;o<n.length;o++){var a=n[o];if(!(a.length>1024)){var l=el.test(a)?a.replace(el,"$1"):a;if(!l.match(/\S*Error: /)){for(var c of i){var u=c(l,e);if(u){s.push(u);break}}if(s.length>=50)break}}}if(!s.length)return[];var h=Array.from(s);return h.reverse(),h.slice(0,50).map(e=>f({},e,{filename:e.filename||(h[h.length-1]||{}).filename,function:e.function||"?"}))}}("web:javascript",es,ea)),this._instance=e,this.Jt=null!=(t=null==(i=this._instance.persistence)?void 0:i.get_property(eB))?t:[]}onRemoteConfig(e){var t,i,r,s=null!=(t=null==(i=e.errorTracking)?void 0:i.suppressionRules)?t:[],n=null==(r=e.errorTracking)?void 0:r.captureExtensionExceptions;this.Jt=s,this._instance.persistence&&this._instance.persistence.register({[eB]:this.Jt,[eV]:n}
2)}get Yt(){var e,t=!!this._instance.get_property(eV),i=this._instance.config.error_tracking.captureExtensionExceptions;return null!=(e=null!=i?i:t)&&e}buildProperties(e,t){return this.Kt.buildFromUnknown(e,{syntheticException:null==t?void 0:t.syntheticException,mechanism:{handled:null==t?void 0:t.handled}})}sendExceptionEvent(e){var t=e.$exception_list;if(this.Xt(t)){if(this.Qt(t))return void sa.info("Skipping exception capture because a suppression rule matched");if(!this.Yt&&this.Zt(t))return void sa.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.ti(t))return void sa.info("Skipping exception capture because it was thrown by the PostHog SDK")}return this._instance.capture("$exception",e,{_noTruncate:!0,_batchKey:"exceptionEvent"})}Qt(e){if(0===e.length)return!1;var t=e.reduce((e,t)=>{var{type:i,value:r}=t;return A(i)&&i.length>0&&e.$exception_types.push(i),A(r)&&r.length>0&&e.$exception_values.push(r),e},{$exception_types:[],$exception_values:[]});return this.Jt.some(e=>{var i=e.values.map(e=>{var i,r=ss[e.operator],s=F(e.value)?e.value:[e.value],n=null!=(i=t[e.key])?i:[];return s.length>0&&r(s,n)});return"OR"===e.type?i.some(Boolean):i.every(Boolean)})}Zt(e){return e.flatMap(e=>{var t,i;return null!=(t=null==(i=e.stacktrace)?void 0:i.frames)?t:[]}).some(e=>e.filename&&e.filename.startsWith("chrome-extension://"))}ti(e){if(e.length>0){var t,i,r,s,n=null!=(t=null==(i=e[0].stacktrace)?void 0:i.frames)?t:[],o=n[n.length-1];return null!=(r=null==o||null==(s=o.filename)?void 0:s.includes("posthog.com/static"))&&r}return!1}Xt(e){return!D(e)&&F(e)}}var sc=eE("[FeatureFlags]"),su=eE("[FeatureFlags]",{debugEnabled:!0}),sh="$active_feature_flags",sd="$override_feature_flags",sp="$feature_flag_payloads",sg="$override_feature_flag_payloads",s_="$feature_flag_request_id",sv="$feature_flag_evaluated_at",sf=e=>{var t={};for(var[i,r]of eT(e||{}))r&&(t[i]=r);return t},sm=((n_={}).FeatureFlags="feature_flags",n_.Recordings="recordings",n_);class sy{constructor(e){this.ii=!1,this.ei=!1,this.ri=!1,this.si=!1,this.ni=!1,this.oi=!1,this.ai=!1,this._instance=e,this.featureFlagEventHandlers=[]}li(){var e=this._instance.config.evaluation_environments;return null!=e&&e.length?e.filter(e=>{var t=e&&"string"==typeof e&&e.trim().length>0;return t||sc.error("Invalid evaluation environment found:",e,"Expected non-empty string"),t}):[]}ui(){return this.li().length>0}flags(){if(this._instance.config.__preview_remote_config)this.oi=!0;else{var e=!this.hi&&(this._instance.config.advanced_disable_feature_flags||this._instance.config.advanced_disable_feature_flags_on_first_load);this.di({disableFlags:e})}}get hasLoadedFlags(){return this.ei}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var e=this._instance.get_property(eQ),t=this._instance.get_property(sd),i=this._instance.get_property(sg);if(!i&&!t)return e||{};var r=e$({},e||{});for(var s of[...new Set([...Object.keys(i||{}),...Object.keys(t||{})])]){var n,o,a=r[s],l=null==t?void 0:t[s],c=O(l)?null!=(n=null==a?void 0:a.enabled)&&n:!!l,u=O(l)?a.variant:"string"==typeof l?l:void 0,h=null==i?void 0:i[s],d=f({},a,{enabled:c,variant:c?null!=u?u:null==a?void 0:a.variant:void 0});c!==(null==a?void 0:a.enabled)&&(d.original_enabled=null==a?void 0:a.enabled),u!==(null==a?void 0:a.variant)&&(d.original_variant=null==a?void 0:a.variant),h&&(d.metadata=f({},null==a?void 0:a.metadata,{payload:h,original_payload:null==a||null==(o=a.metadata)?void 0:o.payload})),r[s]=d}return this.ii||(sc.warn(" Overriding feature flag details!",{flagDetails:e,overriddenPayloads:i,finalDetails:r}),this.ii=!0),r}getFlagVariants(){var e=this._instance.get_property(eK),t=this._instance.get_property(sd);if(!t)return e||{};for(var i=e$({},e),r=Object.keys(t),s=0;s<r.length;s++)i[r[s]]=t[r[s]];return this.ii||(sc.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:i}),this.ii=!0),i}getFlagPayloads(){var e=this._instance.get_property(sp),t=this._instance.get_property(sg);if(!t)return e||{};for(var i=e$({},e||{}),r=Object.keys(t),s=0;s<r.length;s++)i[r[s]]=t[r[s]];return this.ii||(sc.warn(" Overriding feature flag payloads!",{flagPayloads:e,overriddenPayloads:t,finalPayloads:i}),this.ii=!0),i}reloadFeatureFlags(){this.si||this._instance.config.advanced_disable_feature_flags||this.hi||(this.hi=setTimeout(()=>{this.di()},5))}vi(){clearTimeout(this.hi),this.hi=void 0}ensureFlagsLoaded(){this.ei||this.ri||this.hi||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this.si=e}di(e){var t;if(this.vi(),!this._instance.O())if(this.ri)this.ni=!0;else{var i={token:this._instance.config.token,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:f({},(null==(t=this._instance.persistence)?void 0:t.get_initial_props())||{},this._instance.get_property(e0)||{}),group_properties:this._instance.get_property(e1)};(null!=e&&e.disableFlags||this._instance.config.advanced_disable_feature_flags)&&(i.disable_flags=!0),this.ui()&&(i.evaluation_environments=this.li());var r=this._instance.config.__preview_remote_config,s=this._instance.config.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":"",n=this._instance.requestRouter.endpointFor("flags",(r?"/flags/?v=2":"/flags/?v=2&config=true")+s);r&&(i.timezone=rb()),this.ri=!0,this._instance.ci({method:"POST",url:n,data:i,compression:this._instance.config.disable_compression?void 0:tL.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:e=>{var t,r,s,n=!0;200===e.statusCode&&(this.ni||(this.$anon_distinct_id=void 0),n=!1),this.ri=!1,this.oi||(this.oi=!0,this._instance.fi(null!=(s=e.json)?s:{})),(!i.disable_flags||this.ni)&&((this.ai=!n,e.json&&null!=(r=e.json.quotaLimited)&&r.includes(sm.FeatureFlags))?sc.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset.  Please visit https://posthog.com/docs/billing/limits-alerts to learn more."):(i.disable_flags||this.receivedFeatureFlags(null!=(t=e.json)?t:{},n),this.ni&&(this.ni=!1,this.di())))}})}}getFeatureFlag(e,t){if(void 0===t&&(t={}),this.ei||this.getFlags()&&this.getFlags().length>0){var i=this.getFlagVariants()[e],r=""+i,s=this._instance.get_property(s_)||void 0,n=this._instance.get_property(sv)||void 0,o=this._instance.get_property(e5)||{};if((t.send_event||!("send_event"in t))&&(!(e in o)||!o[e].includes(r))){F(o[e])?o[e].push(r):o[e]=[r],null==(c=this._instance.persistence)||c.register({[e5]:o});var a=this.getFeatureFlagDetails(e),l={$feature_flag:e,$feature_flag_response:i,$feature_flag_payload:this.getFeatureFlagPayload(e)||null,$feature_flag_request_id:s,$feature_flag_evaluated_at:n,$feature_flag_bootstrapped_response:(null==(u=this._instance.config.bootstrap)||null==(u=u.featureFlags)?void 0:u[e])||null,$feature_flag_bootstrapped_payload:(null==(h=this._instance.config.bootstrap)||null==(h=h.featureFlagPayloads)?void 0:h[e])||null,$used_bootstrap_value:!this.ai};O(null==a||null==(d=a.metadata)?void 0:d.version)||(l.$feature_flag_version=a.metadata.version);var c,u,h,d,p,g,_,v,f,m,y=null!=(p=null==a||null==(g=a.reason)?void 0:g.description)?p:null==a||null==(_=a.reason)?void 0:_.code;y&&(l.$feature_flag_reason=y),null!=a&&null!=(v=a.metadata)&&v.id&&(l.$feature_flag_id=a.metadata.id),O(null==a?void 0:a.original_variant)&&O(null==a?void 0:a.original_enabled)||(l.$feature_flag_original_response=O(a.original_variant)?a.original_enabled:a.original_variant),null!=a&&null!=(f=a.metadata)&&f.original_payload&&(l.$feature_flag_original_payload=null==a||null==(m
vendor: 22,088 bytes, line 2
2=a.metadata)?void 0:m.original_payload),this._instance.capture("$feature_flag_called",l)}return i}sc.warn('getFeatureFlag for key "'+e+"\" failed. Feature flags didn't load in time.")}getFeatureFlagDetails(e){return this.getFlagsWithDetails()[e]}getFeatureFlagPayload(e){return this.getFlagPayloads()[e]}getRemoteConfigPayload(e,t){var i=this._instance.config.token,r={distinct_id:this._instance.get_distinct_id(),token:i};this.ui()&&(r.evaluation_environments=this.li()),this._instance.ci({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2&config=true"),data:r,compression:this._instance.config.disable_compression?void 0:tL.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:i=>{var r,s=null==(r=i.json)?void 0:r.featureFlagPayloads;t((null==s?void 0:s[e])||void 0)}})}isFeatureEnabled(e,t){if(void 0===t&&(t={}),this.ei||this.getFlags()&&this.getFlags().length>0){var i=this.getFeatureFlag(e,t);return O(i)?void 0:!!i}sc.warn('isFeatureEnabled for key "'+e+"\" failed. Feature flags didn't load in time.")}addFeatureFlagsHandler(e){this.featureFlagEventHandlers.push(e)}removeFeatureFlagsHandler(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(t=>t!==e)}receivedFeatureFlags(e,t){if(this._instance.persistence){this.ei=!0;var i=this.getFlagVariants(),r=this.getFlagPayloads(),s=this.getFlagsWithDetails();!function(e,t,i,r,s){void 0===i&&(i={}),void 0===r&&(r={}),void 0===s&&(s={});var n,o=((n=e.flags)?(e.featureFlags=Object.fromEntries(Object.keys(n).map(e=>{var t;return[e,null!=(t=n[e].variant)?t:n[e].enabled]})),e.featureFlagPayloads=Object.fromEntries(Object.keys(n).filter(e=>n[e].enabled).filter(e=>{var t;return null==(t=n[e].metadata)?void 0:t.payload}).map(e=>{var t;return[e,null==(t=n[e].metadata)?void 0:t.payload]}))):sc.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),e),a=o.flags,l=o.featureFlags,c=o.featureFlagPayloads;if(l){var u=e.requestId,h=e.evaluatedAt;if(F(l)){sc.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var d={};if(l)for(var p=0;p<l.length;p++)d[l[p]]=!0;t&&t.register({[sh]:l,[eK]:d})}else{var g=l,_=c,v=a;e.errorsWhileComputingFlags&&(g=f({},i,g),_=f({},r,_),v=f({},s,v)),t&&t.register(f({[sh]:Object.keys(sf(g)),[eK]:g||{},[sp]:_||{},[eQ]:v||{}},u?{[s_]:u}:{},h?{[sv]:h}:{}))}}}(e,this._instance.persistence,i,r,s),this.pi(t)}}override(e,t){void 0===t&&(t=!1),sc.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:e,suppressWarning:t})}overrideFeatureFlags(e){if(!this._instance.__loaded||!this._instance.persistence)return sc.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(!1===e)return this._instance.persistence.unregister(sd),this._instance.persistence.unregister(sg),this.pi(),su.info("All overrides cleared");if(e&&"object"==typeof e&&("flags"in e||"payloads"in e)){var t;if(this.ii=!!(null!=(t=e.suppressWarning)&&t),"flags"in e){if(!1===e.flags)this._instance.persistence.unregister(sd),su.info("Flag overrides cleared");else if(e.flags){if(F(e.flags)){for(var i={},r=0;r<e.flags.length;r++)i[e.flags[r]]=!0;this._instance.persistence.register({[sd]:i})}else this._instance.persistence.register({[sd]:e.flags});su.info("Flag overrides set",{flags:e.flags})}}return"payloads"in e&&(!1===e.payloads?(this._instance.persistence.unregister(sg),su.info("Payload overrides cleared")):e.payloads&&(this._instance.persistence.register({[sg]:e.payloads}),su.info("Payload overrides set",{payloads:e.payloads}))),void this.pi()}this.pi()}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.ei){var{flags:t,flagVariants:i}=this.gi();e(t,i)}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,t,i){var r,s=(this._instance.get_property(eZ)||[]).find(t=>t.flagKey===e),n={["$feature_enrollment/"+e]:t},o={$feature_flag:e,$feature_enrollment:t,$set:n};s&&(o.$early_access_feature_name=s.name),i&&(o.$feature_enrollment_stage=i),this._instance.capture("$feature_enrollment_update",o),this.setPersonPropertiesForFlags(n,!1);var a=f({},this.getFlagVariants(),{[e]:t});null==(r=this._instance.persistence)||r.register({[sh]:Object.keys(sf(a)),[eK]:a}),this.pi()}getEarlyAccessFeatures(e,t,i){void 0===t&&(t=!1);var r=this._instance.get_property(eZ),s=i?"&"+i.map(e=>"stage="+e).join("&"):"";if(r&&!t)return e(r);this._instance.ci({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this._instance.config.token+s),method:"GET",callback:t=>{var i,r;if(t.json){var s=t.json.earlyAccessFeatures;return null==(i=this._instance.persistence)||i.unregister(eZ),null==(r=this._instance.persistence)||r.register({[eZ]:s}),e(s)}}})}gi(){var e=this.getFlags(),t=this.getFlagVariants();return{flags:e.filter(e=>t[e]),flagVariants:Object.keys(t).filter(e=>t[e]).reduce((e,i)=>(e[i]=t[i],e),{})}}pi(e){var{flags:t,flagVariants:i}=this.gi();this.featureFlagEventHandlers.forEach(r=>r(t,i,{errorsLoading:e}))}setPersonPropertiesForFlags(e,t){void 0===t&&(t=!0);var i=this._instance.get_property(e0)||{};this._instance.register({[e0]:f({},i,e)}),t&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister(e0)}setGroupPropertiesForFlags(e,t){void 0===t&&(t=!0);var i=this._instance.get_property(e1)||{};0!==Object.keys(i).length&&Object.keys(i).forEach(t=>{i[t]=f({},i[t],e[t]),delete e[t]}),this._instance.register({[e1]:f({},i,e)}),t&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){var t=this._instance.get_property(e1)||{};this._instance.register({[e1]:f({},t,{[e]:{}})})}else this._instance.unregister(e1)}reset(){this.ei=!1,this.ri=!1,this.si=!1,this.ni=!1,this.oi=!1,this.ai=!1,this.$anon_distinct_id=void 0,this.vi(),this.ii=!1}}var sb=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"];class sw{constructor(e,t){this.I=e,this.props={},this.mi=!1,this.yi=(e=>{var t="";return e.token&&(t=e.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),e.persistence_name?"ph_"+e.persistence_name:"ph_"+t+"_posthog"})(e),this.Y=this.bi(e),this.load(),e.debug&&ew.info("Persistence loaded",e.persistence,f({},this.props)),this.update_config(e,e,t),this.save()}isDisabled(){return!!this.wi}bi(e){-1===sb.indexOf(e.persistence.toLowerCase())&&(ew.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var t=e.persistence.toLowerCase();return"localstorage"===t&&t5.H()?t5:"localstorage+cookie"===t&&t6.H()?t6:"sessionstorage"===t&&ie.H()?ie:"memory"===t?t7:"cookie"===t?t2:t6.H()?t6:t2}properties(){var e={};return eI(this.props,function(t,i){if(i===eK&&C(t))for(var r,s=Object.keys(t),o=0;o<s.length;o++)e["$feature/"+s[o]]=t[s[o]];else r=!1,(L(ts)?r:n&&ts.indexOf===n?-1!=ts.indexOf(i):(eI(ts,function(e){if(r||(r=e===i))return eS}),r))||(e[i]=t)}),e}load(){if(!this.wi){var e=this.Y.W(this.yi);e&&(this.props=e$({},e))}}save(){this.wi||this.Y.G(this.yi,this.props,this.xi,this.Ei,this.Si,this.I.debug)}remove(){this.Y.V(this.yi,!1),this.Y.V(this.yi,!0)}clear(){this.remove(),this.props={}}register_once(e,t,i){if(C(e)){O(t)&&(t="None"),this.xi=O(i)?this.$i:i;var r=!1;if(eI(e,(e,i)=>{this.props.hasOwnProperty(i)&&this.props[i]!==t||(this.props[i]=e,r=!0)}),r)return this.save(),!0}return!1}register(e,t){if(C(e)){this.xi=O(t)?this.$i:t;var i=!1;if(eI(e,(t,r)=>{e.hasOwnProperty(r)&&this.props[r]!==t&&(this.props[r]=t,i=!0)}),i)return this.save(),!0}return!1}unregister(e){e in this.props&&(delete this.props[e],this.save())}update_campaign_params(){if(!this.mi){var e=rp(this.I.custom_campaign_params,this.I.mask_personal_data_properties,this.I.custom_personal_data_properties);R(eO(e))||this.register(e),this.mi=!0}}update_search_keyword(){var e;this.register((e=null==a?void 0:a.referrer)?r_(e):{})}update_referrer_info(){var e;this.register_once({$referrer:rf(),$referring_domain:null!=a&&a.referrer&&(null==(e=tD(a.referrer))?void 0:e.host)||"$direct"},void 0)}set_initial_person_info(){this.props[e7]||this.props[e9]||this.register_once({[te]:rm(this.I.mask_personal_data_properties,this.I.custom_personal_data_properties)},void 0)}get_initial_props(){var e={};eI([e9,e7],t=>{var i=this.props[t];i&&eI(i,function(t,i){e["$initial_"+k(i)]=t})});var t,i,r=this.props[te];return r&&e$(e,(t=ry(r),i={},eI(t,function(e,t){i["$initial_"+k(t)]=e}),i)),e}safe_merge(e){return eI(this.props,function(t,i){i in e||(e[i]=t)}),e}update_config(e,t,i){if(this.$i=this.xi=e.cookie_expiration,this.set_disabled(e.disable_persistence||!!i),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie),e.persistence!==t.persistence){var r=this.bi(e),s=this.props;this.clear(),this.Y=r,this.props=s,this.save()}}set_disabled(e){this.wi=e,this.wi?this.remove():this.save()}set_cross_subdomain(e){e!==this.Ei&&(this.Ei=e,this.remove(),this.save())}set_secure(e){e!==this.Si&&(this.Si=e,this.remove(),this.save())}set_event_timer(e,t){var i=this.props[ej]||{};i[e]=t,this.props[ej]=i,this.save()}remove_event_timer(e){var t=(this.props[ej]||{})[e];return O(t)||(delete this.props[ej][e],this.save()),t}get_property(e){return this.props[e]}set_property(e,t){this.props[e]=t,this.save()}}var sE=eE("[Product Tours]"),sx="ph_product_tours";class sk{constructor(e){this.ki=null,this.Pi=null,this.Ti=void 0,this.Ri=!1,this._instance=e}onRemoteConfig(e){if(this._instance.config.disable_product_tours)sE.info("Product tours disabled via config");else{var t=e.productTours;D(t)?sE.info("Product tours not enabled in remote config"):(this.Ti=t,sE.info("Remote config received, isProductToursEnabled: "+this.Ti),this.loadIfEnabled())}}loadIfEnabled(){var e;if(!this.Pi)if(this.Ri)sE.info("Already initializing product tours, skipping...");else if(this._instance.config.disable_product_tours)sE.info("Product tours disabled via config");else{var t=null==p?void 0:p.__PosthogExtensions__;if(t){var i=null==(e=this._instance.featureFlags)?void 0:e.isFeatureEnabled("product-tours-2025");if(!O(this.Ti)||i){var r=this.Ti||i;if(r){this.Ri=!0;try{var s=t.generateProductTours;if(s)return void this.Ci(s,r);var n=t.loadExternalDependency;if(!n)return sE.error("PostHog loadExternalDependency extension not found."),void(this.Ri=!1);n(this._instance,"product-tours",e=>{e||!t.generateProductTours?sE.error("Could not load product tours script",e):this.Ci(t.generateProductTours,r),this.Ri=!1})}catch(e){sE.error("Error initializing product tours",e),this.Ri=!1}}else sE.info("Product tours not enabled")}else sE.info("Waiting for remote config or feature flag to enable product tours")}else sE.error("PostHog Extensions not found.")}}Ci(e,t){this.Pi=e(this._instance,t)||null,sE.info("Product tours loaded successfully")}getProductTours(e,t){if(void 0===t&&(t=!1),!F(this.ki)||t){var i=this._instance.persistence;if(i){var r=i.props[sx];if(F(r)&&!t)return this.ki=r,void e(r,{isLoaded:!0})}this._instance.ci({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",callback:t=>{var r=t.statusCode;if(200!==r||!t.json){var s="Product Tours API could not be loaded, status: "+r;return sE.error(s),void e([],{isLoaded:!1,error:s})}var n=F(t.json.product_tours)?t.json.product_tours:[];this.ki=n,i&&i.register({[sx]:n}),e(n,{isLoaded:!0})}})}else e(this.ki,{isLoaded:!0})}getActiveProductTours(e){D(this.Pi)?(sE.warn("Product tours not loaded yet"),e([],{isLoaded:!1,error:"Product tours not loaded"})):this.Pi.getActiveProductTours(e)}showProductTour(e){var t;sE.info("showProductTour("+e+")"),null==(t=this.Pi)||t.showTourById(e)}dismissProductTour(){var e;null==(e=this.Pi)||e.dismissTour("user_clicked_skip")}nextStep(){var e;null==(e=this.Pi)||e.nextStep()}previousStep(){var e;null==(e=this.Pi)||e.previousStep()}clearCache(){this.ki=null;var e=this._instance.persistence;e&&e.unregister(sx)}resetTour(e){var t;null==(t=this.Pi)||t.resetTour(e)}resetAllTours(){var e;null==(e=this.Pi)||e.resetAllTours()}}var sS=((nv={}).Activation="events",nv.Cancellation="cancelEvents",nv),sP=((nf={}).Button="button",nf.Tab="tab",nf.Selector="selector",(nm={}).TopLeft="top_left",nm.TopRight="top_right",nm.TopCenter="top_center",nm.MiddleLeft="middle_left",nm.MiddleRight="middle_right",nm.MiddleCenter="middle_center",nm.Left="left",nm.Center="center",nm.Right="right",nm.NextToTrigger="next_to_trigger",(ny={}).Top="top",ny.Left="left",ny.Right="right",ny.Bottom="bottom",(nb={}).Popover="popover",nb.API="api",nb.Widget="widget",nb.ExternalSurvey="external_survey",nb),sI=((nw={}).Open="open",nw.MultipleChoice="multiple_choice",nw.SingleChoice="single_choice",nw.Rating="rating",nw.Link="link",(nE={}).NextQuestion="next_question",nE.End="end",nE.ResponseBased="response_based",nE.SpecificQuestion="specific_question",(nx={}).Once="once",nx.Recurring="recurring",nx.Always="always",(nk={}).SHOWN="survey shown",nk.DISMISSED="survey dismissed",nk.SENT="survey sent",nk),s$=((nS={}).SURVEY_ID="$survey_id",nS.SURVEY_NAME="$survey_name",nS.SURVEY_RESPONSE="$survey_response",nS.SURVEY_ITERATION="$survey_iteration",nS.SURVEY_ITERATION_START_DATE="$survey_iteration_start_date",nS.SURVEY_PARTIALLY_COMPLETED="$survey_partially_completed",nS.SURVEY_SUBMISSION_ID="$survey_submission_id",nS.SURVEY_QUESTIONS="$survey_questions",nS.SURVEY_COMPLETED="$survey_completed",nS),sF=((nP={}).Popover="popover",nP.Inline="inline",nP);class sT{constructor(){this.Ii={},this.Ii={}}on(e,t){return this.Ii[e]||(this.Ii[e]=[]),this.Ii[e].push(t),()=>{this.Ii[e]=this.Ii[e].filter(e=>e!==t)}}emit(e,t){for(var i of this.Ii[e]||[])i(t);for(var r of this.Ii["*"]||[])r(e,t)}}function sC(e,t,i){if(D(e))return!1;switch(i){case"exact":return e===t;case"contains":return RegExp(t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*"),"i").test(e);case"regex":try{return new RegExp(t).test(e)}catch(e){return!1}default:return!1}}class sR{constructor(e){this.Fi=new sT,this.Mi=(e,t)=>this.Oi(e,t)&&this.Ai(e,t)&&this.Di(e,t)&&this.ji(e,t),this.Oi=(e,t)=>null==t||!t.event||(null==e?void 0:e.event)===(null==t?void 0:t.event),this._instance=e,this.Li=new Set,this.Ni=new Set}init(){var e,t;O(null==(e=this._instance)?void 0:e.Ui)||null==(t=this._instance)||t.Ui((e,t)=>{this.on(e,t)})}register(e){var t,i;if(!O(null==(t=this._instance)?void 0:t.Ui)&&(e.forEach(e=>{var t,i;null==(t=this.Ni)||t.add(e),null==(i=e.steps)||i.forEach(e=>{var t;null==(t=this.Li)||t.add((null==e?void 0:e.event)||"")})}),null!=(i=this._instance)&&i.autocapture)){var r,s=new Set;e.forEach(e=>{var t;null==(t=e.steps)||t.forEach(e=>{null!=e&&e.selector&&s.add(null==e?void 0:e.selector)})}),null==(r=this._instance)||r.autocapture.setElementSelectors(s)}}on(e,t){var i;null!=t&&0!=e.length&&(this.Li.has(e)||this.Li.has(null==t?void 0:t.event))&&this.Ni&&(null==(i=this.Ni)?void 0:i.size)>0&&this.Ni.forEach(e=>{this.zi(t,e)&&this.Fi.emit("actionCaptured",e.name)})}Hi(e){this.onAction("actionCaptured",t=>e(t))}zi(e,t){if(null==(null==t?void 0:t.steps))return!1;for(var i of t.steps)if(this.Mi(e,i))return!0;return!1}onAction(e,t){return this.Fi.on(e,t)}Ai(e,t){if(null!=t&&t.url){var i,r=null==e||null==(i=e.properties)?void 0:i.$current_url;if(!r||"string"!=typeof r||!sC(r,t.url,t.url_matching||"contains"))return!1}return!0}Di(e,t){return!!this.Bi(e,t)&&!!this.qi(e,t)&&!!this.Wi(e,t)}Bi(e,t){if(null==t||!t.href)return!0;var i=this.Gi(e);if(i.length>0)return i.some(e=>sC(e.href,t.href,t.href_matching||"exact"));var r,s,n=(null==e||null==(r=e.properties)?void 0:r.$elements_chain)||"";return!!n&&sC((s=n.match(/(?::|")href="(.*?)"/))?s[1]:"",t.href,t.href_matching||"exact")}qi(e,t){if(null==t||!t.text)return!0;var i=this.Gi(e);if(i.length>0)return i.some(e=>sC(e.text,t.text,t.text_matching||"exact")||sC(e.$el_text,t.text,t.text_matching||"exact"));var r,s,n,o,a=(null==e||null==(r=e.properties)?void 0:r.$elements_chain)||"";return!!a&&(s=function(e){for(var t,i=[],r=/(?::|")text="(.*?)"/g;!D(t=r.exec(e));)i.includes(t[1])||i.push(t[1]);return i}(a),n=t.text,o=t.text_matching||"exact",s.some(e=>sC(e,n,o)))}Wi(e,t){if(null==t||!t.selector)return!0;var i,r,s=null==e||null==(i=e.properties)?void 0:i.$element_selectors;if(null!=s&&s.includes(t.selector))return!0;var n=(null==e||null==(r=e.properties)?void 0:r.$elements_chain)||"";if(t.selector_regex&&n)try{return new RegExp(t.selector_regex).test(n)}catch(e){}return!1}Gi(e){var t;return null==(null==e||null==(t=e.properties)?void 0:t.$elements)?[]:null==e?void 0:e.properties.$elements}ji(e,t){return null==t||!t.properties||0===t.properties.length||so(t.properties.reduce((e,t)=>{var i=F(t.value)?t.value.map(String):null!=t.value?[String(t.value)]:[];return e[t.key]={values:i,operator:t.operator||"exact"},e},{}),null==e?void 0:e.properties)}}var sO=eE("[Surveys]"),sA="seenSurvey_",sM=e=>{var t=""+sA+e.id;return e.current_iteration&&e.current_iteration>0&&(t=""+sA+e.id+"_"+e.current_iteration),t},sL=[sP.Popover,sP.Widget,sP.API],sD={ignoreConditions:!1,ignoreDelay:!1,displayType:sF.Popover};class sN{constructor(e){this._instance=e,this.Vi=new Map,this.Ji=new Map,this.Ki=new Map}Yi(e,t){return!!e&&so(e.propertyFilters,null==t?void 0:t.properties)}Xi(e,t){var i=new Map;return e.forEach(e=>{var r;null==(r=e.conditions)||null==(r=r[t])||null==(r=r.values)||r.forEach(t=>{if(null!=t&&t.name){var r=i.get(t.name)||[];r.push(e.id),i.set(t.name,r)}})}),i}Qi(e,t,i){var r,s=(i===sS.Activation?this.Vi:this.Ji).get(e),n=[];return null==(r=this._instance)||r.getSurveys(e=>{n=e.filter(e=>null==s?void 0:s.includes(e.id))}),n.filter(r=>{var s,n=null==(s=r.conditions)||null==(s=s[i])||null==(s=s.values)?void 0:s.find(t=>t.name===e);return this.Yi(n,t)})}register(e){var t;O(null==(t=this._instance)?void 0:t.Ui)||(this.Zi(e),this.te(e))}te(e){var t=e.filter(e=>{var t,i;return(null==(t=e.conditions)?void 0:t.actions)&&(null==(i=e.conditions)||null==(i=i.actions)||null==(i=i.values)?void 0:i.length)>0});0!==t.length&&(null==this.ie&&(this.ie=new sR(this._instance),this.ie.init(),this.ie.Hi(e=>{this.onAction(e)})),t.forEach(e=>{var t,i,r,s,n;e.conditions&&null!=(t=e.conditions)&&t.actions&&null!=(i=e.conditions)&&null!=(i=i.actions)&&i.values&&(null==(r=e.conditions)||null==(r=r.actions)||null==(r=r.values)?void 0:r.length)>0&&(null==(s=this.ie)||s.register(e.conditions.actions.values),null==(n=e.conditions)||null==(n=n.actions)||null==(n=n.values)||n.forEach(t=>{if(t&&t.name){var i=this.Ki.get(t.name);i&&i.push(e.id),this.Ki.set(t.name,i||[e.id])}}))}))}Zi(e){var t,i=e.filter(e=>{var t,i;return(null==(t=e.conditions)?void 0:t.events)&&(null==(i=e.conditions)||null==(i=i.events)||null==(i=i.values)?void 0:i.length)>0}),r=e.filter(e=>{var t,i;return(null==(t=e.conditions)?void 0:t.cancelEvents)&&(null==(i=e.conditions)||null==(i=i.cancelEvents)||null==(i=i.values)?void 0:i.length)>0});(0!==i.length||0!==r.length)&&(null==(t=this._instance)||t.Ui((e,t)=>{this.onEvent(e,t)}),this.Vi=this.Xi(e,sS.Activation),this.Ji=this.Xi(e,sS.Cancellation))}onEvent(e,t){var i,r=(null==(i=this._instance)||null==(i=i.persistence)?void 0:i.props[e3])||[];if(sI.SHOWN===e&&t&&r.length>0){sO.info("survey event matched, removing survey from activated surveys",{event:e,eventPayload:t,existingActivatedSurveys:r});var s,n=null==t||null==(s=t.properties)?void 0:s.$survey_id;if(n){var o=r.indexOf(n);o>=0&&(r.splice(o,1),this.ee(r))}}else{if(this.Ji.has(e)){var a=this.Qi(e,t,sS.Cancellation);a.length>0&&(sO.info("cancel event matched, cancelling surveys",{event:e,surveysToCancel:a.map(e=>e.id)}),a.forEach(e=>{var t,i=r.indexOf(e.id);i>=0&&r.splice(i,1),null==(t=this._instance)||t.cancelPendingSurvey(e.id)}),this.ee(r))}if(this.Vi.has(e)){sO.info("survey event name matched",{event:e,eventPayload:t,surveys:this.Vi.get(e)});var l=this.Qi(e,t,sS.Activation);this.ee(r.concat(l.map(e=>e.id)||[]))}}}onAction(e){var t,i=(null==(t=this._instance)||null==(t=t.persistence)?void 0:t.props[e3])||[];this.Ki.has(e)&&this.ee(i.concat(this.Ki.get(e)||[]))}ee(e){var t;sO.info("updating activated surveys",{activatedSurveys:e}),null==(t=this._instance)||null==(t=t.persistence)||t.register({[e3]:[...new Set(e)]})}getSurveys(){var e;return(null==(e=this._instance)||null==(e=e.persistence)?void 0:e.props[e3])||[]}getEventToSurveys(){return this.Vi}re(){return this.ie}}class sj{constructor(e){this.se=void 0,this._surveyManager=null,this.ne=!1,this.oe=!1,this.ae=[],this._instance=e,this._surveyEventReceiver=null}onRemoteConfig(e){if(!this._instance.config.disable_surveys){var t=e.surveys;if(D(t))return sO.warn("Flags not loaded yet. Not loading surveys.");var i=F(t);this.se=i?t.length>0:t,sO.info("flags response received, isSurveysEnabled: "+this.se),this.loadIfEnabled()}}reset(){localStorage.removeItem("lastSeenSurveyDate");for(var e=[],t=0;t<localStorage.length;t++){var i=localStorage.key(t);(null!=i&&i.startsWith(sA)||null!=i&&i.startsWith("inProgressSurvey_"))&&e.push(i)}e.forEach(e=>localStorage.removeItem(e))}loadIfEnabled(){if(!this._surveyManager)if(this.oe)sO.info("Already initializing surveys, skipping...");else if(this._instance.config.disable_surveys)sO.info("Disabled. Not loading surveys.");else if(this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())sO.info("Not loading surveys in cookieless mode without consent.");else{var e=null==p?void 0:p.__PosthogExtensions__;if(e){if(!O(this.se)||this._instance.config.advanced_enable_surveys){var t=this.se||this._instance.config.advanced_enable_surveys;this.oe=!0;try{var i=e.generateSurveys;if(i)return void this.le(i,t);var r=e.loadExternalDependency;if(!r)return void this.ue("PostHog loadExternalDependency extension not found.");r(this._instance,"surveys",i=>{i||!e.generateSurveys?this.ue("Could not load surveys script",i):this.le(e.generateSurveys,t)})}catch(e){throw this.ue("Error initializing surveys",e),e}finally{this.oe=!1}}}else sO.error("PostHog Extensions not found.")}}le(e,t){this._surveyManager=e(this._instance,t),this._surveyEventReceiver=new sN(this._instance),sO.
2info("Surveys loaded successfully"),this.he({isLoaded:!0})}ue(e,t){sO.error(e,t),this.he({isLoaded:!1,error:e})}onSurveysLoaded(e){return this.ae.push(e),this._surveyManager&&this.he({isLoaded:!0}),()=>{this.ae=this.ae.filter(t=>t!==e)}}getSurveys(e,t){if(void 0===t&&(t=!1),this._instance.config.disable_surveys)return sO.info("Disabled. Not loading surveys."),e([]);var i=this._instance.get_property(e2);if(i&&!t)return e(i,{isLoaded:!0});if(this.ne)return e([],{isLoaded:!1,error:"Surveys are already being loaded"});try{this.ne=!0,this._instance.ci({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this._instance.config.token),method:"GET",timeout:this._instance.config.surveys_request_timeout_ms,callback:t=>{this.ne=!1;var i=t.statusCode;if(200!==i||!t.json){var r="Surveys API could not be loaded, status: "+i;return sO.error(r),e([],{isLoaded:!1,error:r})}var s,n,o=t.json.surveys||[],a=o.filter(e=>{var t,i;return!(!e.start_date||e.end_date)&&(!(null==(t=e.conditions)||null==(t=t.events)||null==(t=t.values)||!t.length)||!(null==(i=e.conditions)||null==(i=i.actions)||null==(i=i.values)||!i.length))});return a.length>0&&(null==(n=this._surveyEventReceiver)||n.register(a)),null==(s=this._instance.persistence)||s.register({[e2]:o}),e(o,{isLoaded:!0})}})}catch(e){throw this.ne=!1,e}}he(e){for(var t of this.ae)try{if(!e.isLoaded)return t([],e);this.getSurveys(t)}catch(e){sO.error("Error in survey callback",e)}}getActiveMatchingSurveys(e,t){if(void 0===t&&(t=!1),!D(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,t);sO.warn("init was not called")}de(e){var t=null;return this.getSurveys(i=>{var r;t=null!=(r=i.find(t=>t.id===e))?r:null}),t}ve(e){if(D(this._surveyManager))return{eligible:!1,reason:"SDK is not enabled or survey functionality is not yet loaded"};var t="string"==typeof e?this.de(e):e;return t?this._surveyManager.checkSurveyEligibility(t):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(e){if(D(this._surveyManager))return sO.warn("init was not called"),{visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"};var t=this.ve(e);return{visible:t.eligible,disabledReason:t.reason}}canRenderSurveyAsync(e,t){return D(this._surveyManager)?(sO.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"})):new Promise(i=>{this.getSurveys(t=>{var r,s=null!=(r=t.find(t=>t.id===e))?r:null;if(s){var n=this.ve(s);i({visible:n.eligible,disabledReason:n.reason})}else i({visible:!1,disabledReason:"Survey not found"})},t)})}renderSurvey(e,t){var i;if(D(this._surveyManager))sO.warn("init was not called");else{var r="string"==typeof e?this.de(e):e;if(null!=r&&r.id)if(sL.includes(r.type)){var s=null==a?void 0:a.querySelector(t);if(s)return null!=(i=r.appearance)&&i.surveyPopupDelaySeconds?(sO.info("Rendering survey "+r.id+" with delay of "+r.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout(()=>{var e,t;sO.info("Rendering survey "+r.id+" with delay of "+(null==(e=r.appearance)?void 0:e.surveyPopupDelaySeconds)+" seconds"),null==(t=this._surveyManager)||t.renderSurvey(r,s),sO.info("Survey "+r.id+" rendered")},1e3*r.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(r,s);sO.warn("Survey element not found")}else sO.warn("Surveys of type "+r.type+" cannot be rendered in the app");else sO.warn("Survey not found")}}displaySurvey(e,t){var i;if(D(this._surveyManager))sO.warn("init was not called");else{var r=this.de(e);if(r){var s=r;if(null!=(i=r.appearance)&&i.surveyPopupDelaySeconds&&t.ignoreDelay&&(s=f({},r,{appearance:f({},r.appearance,{surveyPopupDelaySeconds:0})})),!1===t.ignoreConditions){var n=this.canRenderSurvey(r);if(!n.visible)return void sO.warn("Survey is not eligible to be displayed: ",n.disabledReason)}t.displayType!==sF.Inline?this._surveyManager.handlePopoverSurvey(s):this.renderSurvey(s,t.selector)}else sO.warn("Survey not found")}}cancelPendingSurvey(e){D(this._surveyManager)?sO.warn("init was not called"):this._surveyManager.cancelSurvey(e)}}var sH=eE("[RateLimiter]");class sU{constructor(e){var t,i;this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=e=>{var t=e.text;
2if(t&&t.length)try{(JSON.parse(t).quota_limited||[]).forEach(e=>{sH.info((e||"events")+" is quota limited."),this.serverLimits[e]=(new Date).getTime()+6e4})}catch(e){return void sH.warn('could not rate limit - continuing. Error: "'+(null==e?void 0:e.message)+'"',{text:t})}},this.instance=e,this.captureEventsPerSecond=(null==(t=e.config.rate_limiting)?void 0:t.events_per_second)||10,this.captureEventsBurstLimit=Math.max((null==(i=e.config.rate_limiting)?void 0:i.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond),this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}clientRateLimitContext(e){void 0===e&&(e=!1);var t,i,r,s=(new Date).getTime(),n=null!=(t=null==(i=this.instance.persistence)?void 0:i.get_property(e4))?t:{tokens:this.captureEventsBurstLimit,last:s};n.tokens+=(s-n.last)/1e3*this.captureEventsPerSecond,n.last=s,n.tokens>this.captureEventsBurstLimit&&(n.tokens=this.captureEventsBurstLimit);var o=n.tokens<1;return o||e||(n.tokens=Math.max(0,n.tokens-1)),!o||this.lastEventRateLimited||e||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+this.captureEventsPerSecond+" events per second and "+this.captureEventsBurstLimit+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=o,null==(r=this.instance.persistence)||r.set_property(e4,n),{isRateLimited:o,remainingTokens:n.tokens}}isServerRateLimited(e){var t=this.serverLimits[e||"events"]||!1;return!1!==t&&(new Date).getTime()<t}}var sq=eE("[RemoteConfig]");class sB{constructor(e){this._instance=e}get remoteConfig(){var e;return null==(e=p._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.config}ce(e){var t,i;null!=(t=p.__PosthogExtensions__)&&t.loadExternalDependency?null==(i=p.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"remote-config",()=>e(this.remoteConfig)):(sq.error("PostHog Extensions not found. Cannot load remote config."),e())}fe(e){this._instance.ci({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback:t=>{e(t.json)}})}load(){try{if(this.remoteConfig)return sq.info("Using preloaded remote config",this.remoteConfig),void this.fi(this.remoteConfig);if(this._instance.O())return void sq.warn("Remote config is disabled. Falling back to local config.");this.ce(e=>{e?this.fi(e):(sq.info("No config found after loading remote JS config. Falling back to JSON."),this.fe(e=>{this.fi(e)}))})}catch(e){sq.error("Error loading remote config",e)}}fi(e){e?this._instance.config.__preview_remote_config?(this._instance.fi(e),!1!==e.hasFeatureFlags&&this._instance.featureFlags.ensureFlagsLoaded()):sq.info("__preview_remote_config is disabled. Logging config instead",e):sq.error("Failed to fetch remote config from PostHog.")}}class sV{constructor(e,t){this.pe=!0,this.ge=[],this._e=W((null==t?void 0:t.flush_interval_ms)||3e3,250,5e3,ew.createLogger("flush interval"),3e3),this.me=e}enqueue(e){this.ge.push(e),this.ye||this.be()}unload(){this.we();var e=Object.values(this.ge.length>0?this.xe():{});[...e.filter(e=>0===e.url.indexOf("/e")),...e.filter(e=>0!==e.url.indexOf("/e"))].map(e=>{this.me(f({},e,{transport:"sendBeacon"}))})}enable(){this.pe=!1,this.be()}be(){var e=this;this.pe||(this.ye=setTimeout(()=>{if(this.we(),this.ge.length>0){var t=this.xe();for(var i in t)!function(){var r=t[i],s=(new Date).getTime();r.data&&F(r.data)&&eI(r.data,e=>{e.offset=Math.abs(e.timestamp-s),delete e.timestamp}),e.me(r)}()}},this._e))}we(){clearTimeout(this.ye),this.ye=void 0}xe(){var e={};return eI(this.ge,t=>{var i,r=(t?t.batchKey:null)||t.url;O(e[r])&&(e[r]=f({},t,{data:[]})),null==(i=e[r].data)||i.push(t.data)}),this.ge=[],e}}var sG=["retriesPerformedSoFar"];class sW{constructor(e){this.Ee=!1,this.Se=3e3,this.ge=[],this._instance=e,this.ge=[],this.$e=!0,!O(t)&&"onLine"in t.navigator&&(this.$e=t.navigator.onLine,this.ke=()=>{this.$e=!0,this.Dt()},this.Pe=()=>{this.$e=!1},eL(t,"online",this.ke),eL(t,"offline",this.Pe))}get length(){return this.ge.length}retriableRequest(e){var{retriesPerformedSoFar:t}=e,i=m(e,sG);N(t)&&t>0&&(i.url=r7(i.url,{retry_count:t})),this._instance.ci(f({},i,{callback:e=>{200!==e.statusCode&&(e.statusCode<400||e.statusCode>=500)&&(null!=t?t:0)<10?this.Te(f({retriesPerformedSoFar:t},i)):null==i.callback||i.callback(e)}}))}Te(e){var t,i,r,s=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=s+1;var n=(r=(Math.random()-.5)*((i=Math.min(18e5,t=3e3*Math.pow(2,s)))-t/2),Math.ceil(i+r)),o=Date.now()+n;this.ge.push({retryAt:o,requestOptions:e});var a="Enqueued failed request for retry in "+n;navigator.onLine||(a+=" (Browser is offline)"),ew.warn(a),this.Ee||(this.Ee=!0,this.Re())}Re(){(this.Ce&&clearTimeout(this.Ce),0===this.ge.length)?(this.Ee=!1,this.Ce=void 0):this.Ce=setTimeout(()=>{this.$e&&this.ge.length>0&&this.Dt(),this.Re()},this.Se)}Dt(){var e=Date.now(),t=[],i=this.ge.filter(i=>i.retryAt<e||(t.push(i),!1));if(this.ge=t,i.length>0)for(var{requestOptions:r}of i)this.retriableRequest(r)}unload(){for(var{requestOptions:e}of(this.Ce&&(clearTimeout(this.Ce),this.Ce=void 0),this.Ee=!1,O(t)||(this.ke&&(t.removeEventListener("online",this.ke),this.ke=void 0),this.Pe&&(t.removeEventListener("offline",this.Pe),this.Pe=void 0)),this.ge))try{this._instance.ci(f({},e,{transport:"sendBeacon"}))}catch(e){ew.error(e)}this.ge=[]}}class sz{constructor(e){this.Ie=()=>{this.Fe||(this.Fe={});var e,t,i,r,s=this.scrollElement(),n=this.scrollY(),o=s?Math.max(0,s.scrollHeight-s.clientHeight):0,a=n+((null==s?void 0:s.clientHeight)||0),l=(null==s?void 0:s.scrollHeight)||0;this.Fe.lastScrollY=Math.ceil(n),this.Fe.maxScrollY=Math.max(n,null!=(e=this.Fe.maxScrollY)?e:0),this.Fe.maxScrollHeight=Math.max(o,null!=(t=this.Fe.maxScrollHeight)?t:0),this.Fe.last
2ContentY=a,this.Fe.maxContentY=Math.max(a,null!=(i=this.Fe.maxContentY)?i:0),this.Fe.maxContentHeight=Math.max(l,null!=(r=this.Fe.maxContentHeight)?r:0)},this._instance=e}getContext(){return this.Fe}resetContext(){var e=this.Fe;return setTimeout(this.Ie,0),e}startMeasuringScrollPosition(){eL(t,"scroll",this.Ie,{capture:!0}),eL(t,"scrollend",this.Ie,{capture:!0}),eL(t,"resize",this.Ie)}scrollElement(){if(!this._instance.config.scroll_root_selector)return null==t?void 0:t.document.documentElement;for(var e of F(this._instance.config.scroll_root_selector)?this._instance.config.scroll_root_selector:[this._instance.config.scroll_root_selector]){var i=null==t?void 0:t.document.querySelector(e);if(i)return i}}scrollY(){if(this._instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollTop||0}return t&&(t.scrollY||t.pageYOffset||t.document.documentElement.scrollTop)||0}scrollX(){if(this._instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollLeft||0}return t&&(t.scrollX||t.pageXOffset||t.document.documentElement.scrollLeft)||0}}var sY=e=>rm(null==e?void 0:e.config.mask_personal_data_properties,null==e?void 0:e.config.custom_personal_data_properties);class sJ{constructor(e,t,i,r){this.Me=e=>{var t=this.Oe();if(!t||t.sessionId!==e){var i={sessionId:e,props:this.Ae(this._instance)};this.De.register({[e6]:i})}},this._instance=e,this.je=t,this.De=i,this.Ae=r||sY,this.je.onSessionId(this.Me)}Oe(){return this.De.props[e6]}getSetOnceProps(){var e,t=null==(e=this.Oe())?void 0:e.props;return t?"r"in t?ry(t):{$referring_domain:t.referringDomain,$pathname:t.initialPathName,utm_source:t.utm_source,utm_campaign:t.utm_campaign,utm_medium:t.utm_medium,utm_content:t.utm_content,utm_term:t.utm_term}:{}}getSessionProps(){var e={};return eI(eO(this.getSetOnceProps()),(t,i)=>{"$current_url"===i&&(i="url"),e["$session_entry_"+k(i)]=t}),e}}var sX=eE("[SessionId]");class sK{on(e,t){return this.Le.on(e,t)}constructor(e,t,i){if(this.Ne=[],this.Ue=void 0,this.Le=new sT,this.ze=(e,t)=>Math.abs(e-t)>this.sessionTimeoutMs,!e.persistence)throw Error("SessionIdManager requires a PostHogPersistence instance");if("always"===e.config.cookieless_mode)throw Error('SessionIdManager cannot be used with cookieless_mode="always"');this.I=e.config,this.De=e.persistence,this.He=void 0,this.Be=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.qe=t||tZ,this.We=i||tZ;var r,s=this.I.persistence_name||this.I.token,n=this.I.session_idle_timeout_seconds||1800;if(this._sessionTimeoutMs=1e3*W(n,60,36e3,sX.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.Ge(),this.Ve="ph_"+s+"_window_id",this.Je="ph_"+s+"_primary_window_exists",this.Ke()){var o=ie.W(this.Ve),a=ie.W(this.Je);o&&!a?this.He=o:ie.V(this.Ve),ie.G(this.Je,!0)}if(null!=(r=this.I.bootstrap)&&r.sessionID)try{var l=(e=>{var t=e.replace(/-/g,"");if(32!==t.length)throw Error("Not a valid UUID");if("7"!==t[12])throw Error("Not a UUIDv7");return parseInt(t.substring(0,12),16)})(this.I.bootstrap.sessionID);this.Ye(this.I.bootstrap.sessionID,(new Date).getTime(),l)}catch(e){sX.error("Invalid sessionID in bootstrap",e)}this.Xe()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return O(this.Ne)&&(this.Ne=[]),this.Ne.push(e),this.Be&&e(this.Be,this.He),()=>{this.Ne=this.Ne.filter(t=>t!==e)}}Ke(){return"memory"!==this.I.persistence&&!this.De.wi&&ie.H()}Qe(e){e!==this.He&&(this.He=e,this.Ke()&&ie.G(this.Ve,e))}Ze(){return this.He?this.He:this.Ke()?ie.W(this.Ve):null}Ye(e,t,i){e===this.Be&&t===this._sessionActivityTimestamp&&i===this._sessionStartTimestamp||(this._sessionStartTimestamp=i,this._sessionActivityTimestamp=t,this.Be=e,this.De.register({[eJ]:[t,e,i]}))}tr(){var e=this.De.props[eJ];return F(e)&&2===e.length&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.Ye(null,null,null)}destroy(){clearTimeout(this.ir),this.ir=void 0,this.Ue&&t&&(t.removeEventListener("beforeunload",this.Ue,{capture:!1}),this.Ue=void 0),this.Ne=[]}Xe(){this.Ue=()=>{this.Ke()&&ie.V(this.Je)},eL(t,"beforeunload",this.Ue,{capture:!1})}
vendor: 5,879 bytes, line 2
2checkAndGetSessionAndWindowId(e,t){if(void 0===e&&(e=!1),void 0===t&&(t=null),"always"===this.I.cookieless_mode)throw Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var i=t||(new Date).getTime(),[r,s,n]=this.tr(),o=this.Ze(),a=N(n)&&n>0&&Math.abs(i-n)>864e5,l=!1,c=!s,u=!c&&!e&&this.ze(i,r);c||u||a?(s=this.qe(),o=this.We(),sX.info("new session ID generated",{sessionId:s,windowId:o,changeReason:{noSessionId:c,activityTimeout:u,sessionPastMaximumLength:a}}),n=i,l=!0):o||(o=this.We(),l=!0);var h=0===r||!e||a?i:r,d=0===n?(new Date).getTime():n;return this.Qe(o),this.Ye(s,h,d),e||this.Ge(),l&&this.Ne.forEach(e=>e(s,o,l?{noSessionId:c,activityTimeout:u,sessionPastMaximumLength:a}:void 0)),{sessionId:s,windowId:o,sessionStartTimestamp:d,changeReason:l?{noSessionId:c,activityTimeout:u,sessionPastMaximumLength:a}:void 0,lastActivityTimestamp:r}}Ge(){clearTimeout(this.ir),this.ir=setTimeout(()=>{var[e]=this.tr();if(this.ze((new Date).getTime(),e)){var t=this.Be;this.resetSessionId(),this.Le.emit("forcedIdleReset",{idleSessionId:t})}},1.1*this.sessionTimeoutMs)}}var sZ=["$set_once","$set"],sQ=eE("[SiteApps]");class s0{constructor(e){this._instance=e,this.er=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}rr(e,t){if(t){var i=this.globalsForEvent(t);this.er.push(i),this.er.length>1e3&&(this.er=this.er.slice(10))}}get siteAppLoaders(){var e;return null==(e=p._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.siteApps}init(){if(this.isEnabled){var e=this._instance.Ui(this.rr.bind(this));this.sr=()=>{e(),this.er=[],this.sr=void 0}}}globalsForEvent(e){if(!e)throw Error("Event payload is required");var t,i,r,s,n,o,a,l={},c=this._instance.get_property("$groups")||[];for(var[u,h]of Object.entries(this._instance.get_property("$stored_group_properties")||{}))l[u]={id:c[u],type:u,properties:h};var{$set_once:d,$set:p}=e;return{event:f({},m(e,sZ),{properties:f({},e.properties,p?{$set:f({},null!=(t=null==(i=e.properties)?void 0:i.$set)?t:{},p)}:{},d?{$set_once:f({},null!=(r=null==(s=e.properties)?void 0:s.$set_once)?r:{},d)}:{}),elements_chain:null!=(n=null==(o=e.properties)?void 0:o.$elements_chain)?n:"",distinct_id:null==(a=e.properties)?void 0:a.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:l}}setupSiteApp(e){var t=this.apps[e.id],i=()=>{var i;!t.errored&&this.er.length&&(sQ.info("Processing "+this.er.length+" events for site app with id "+e.id),this.er.forEach(e=>null==t.processEvent?void 0:t.processEvent(e)),t.processedBuffer=!0),Object.values(this.apps).every(e=>e.processedBuffer||e.errored)&&(null==(i=this.sr)||i.call(this))},r=!1,s=s=>{t.errored=!s,t.loaded=!0,sQ.info("Site app with id "+e.id+" "+(s?"loaded":"errored")),r&&i()};try{var{processEvent:n}=e.init({posthog:this._instance,callback:e=>{s(e)}});n&&(t.processEvent=n),r=!0}catch(t){sQ.error("Error while initializing PostHog app with config id "+e.id,t),s(!1)}if(r&&t.loaded)try{i()}catch(i){sQ.error("Error while processing buffered events PostHog app with config id "+e.id,i),t.errored=!0}}nr(){var e=this.siteAppLoaders||[];for(var t of e)this.apps[t.id]={id:t.id,loaded:!1,errored:!1,processedBuffer:!1};for(var i of e)this.setupSiteApp(i)}ar(e){if(0!==Object.keys(this.apps).length){var t=this.globalsForEvent(e);for(var i of Object.values(this.apps))try{null==i.processEvent||i.processEvent(t)}catch(t){sQ.error("Error while processing event "+e.event+" for site app "+i.id,t)}}}onRemoteConfig(e){var t,i,r,s=this;if(null!=(t=this.siteAppLoaders)&&t.length)return this.isEnabled?(this.nr(),void this._instance.on("eventCaptured",e=>this.ar(e))):void sQ.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if(null==(i=this.sr)||i.call(this),null!=(r=e.siteApps)&&r.length)if(this.isEnabled){var n=function(e){var t;p["__$$ph_site_app_"+e]=s._instance,null==(t=p.__PosthogExtensions__)||null==t.loadSiteApp||t.loadSiteApp(s._instance,a,t=>{if(t)return sQ.error("Error while initializing PostHog app with config id "+e,t)})};for(var{id:o,url:a}of e.siteApps)n(o)}else sQ.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}var s1=function(e,t){if(!e)return!1;var i=e.userAgent;if(i&&b(i,t))return!0;try{var r=null==e?void 0:e.userAgentData;if(null!=r&&r.brands&&r.brands.some(e=>b(null==e?void 0:e.brand,t)))return!0}catch(e){}return!!e.webdriver},s2=((nI={}).US="us",nI.EU="eu",nI.CUSTOM="custom",nI),s3="i.posthog.com";class s5{constructor(e){this.lr={},this.instance=e}get apiHost(){var e=this.instance.config.api_host.trim().replace(/\/$/,"");return"https://app.posthog.com"===e?"https://us.i.posthog.com":e}get flagsApiHost(){var e=this.instance.config.flags_api_host;return e?e.trim().replace(/\/$/,""):this.apiHost}get uiHost(){var e,t=null==(e=this.instance.config.ui_host)?void 0:e.replace(/\/$/,"");return t||(t=this.apiHost.replace("."+s3,".posthog.com")),"https://app.posthog.com"===t?"https://us.posthog.com":t}get region(){return this.lr[this.apiHost]||(/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.lr[this.apiHost]=s2.US:/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.lr[this.apiHost]=s2.EU:this.lr[this.apiHost]=s2.CUSTOM),this.lr[this.apiHost]}endpointFor(e,t){if(void 0===t&&(t=""),t&&(t="/"===t[0]?t:"/"+t),"ui"===e)return this.uiHost+t;if("flags"===e)return this.flagsApiHost+t;if(this.region===s2.CUSTOM)return this.apiHost+t;var i=s3+t;switch(e){case"assets":return"https://"+this.region+"-assets."+i;case"api":return"https://"+this.region+"."+i}}}var s8={icontains:(e,i)=>!!t&&i.href.toLowerCase().indexOf(e.toLowerCase())>-1,not_icontains:(e,i)=>!!t&&-1===i.href.toLowerCase().indexOf(e.toLowerCase()),regex:(e,i)=>!!t&&si(i.href,e),not_regex:(e,i)=>!!t&&!si(i.href,e),exact:(e,t)=>
2t.href===e,is_not:(e,t)=>t.href!==e};class s6{constructor(e){var t=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(e){void 0===e&&(e=!1),t.getWebExperiments(e=>{s6.ur("retrieved web experiments from the server"),t.hr=new Map,e.forEach(e=>{if(e.feature_flag_key){t.hr&&(s6.ur("setting flag key ",e.feature_flag_key," to web experiment ",e),null==(i=t.hr)||i.set(e.feature_flag_key,e));var i,r=t._instance.getFeatureFlag(e.feature_flag_key);A(r)&&e.variants[r]&&t.dr(e.name,r,e.variants[r].transforms)}else if(e.variants)for(var s in e.variants){var n=e.variants[s];s6.vr(n)&&t.dr(e.name,s,n.transforms)}})},e)},this._instance=e,this._instance.onFeatureFlags(e=>{this.onFeatureFlags(e)})}onFeatureFlags(e){if(this._is_bot())s6.ur("Refusing to render web experiment since the viewer is a likely bot");else if(!this._instance.config.disable_web_experiments){if(D(this.hr))return this.hr=new Map,this.loadIfEnabled(),void this.previewWebExperiment();s6.ur("applying feature flags",e),e.forEach(e=>{var t;if(this.hr&&null!=(t=this.hr)&&t.has(e)){var i,r=this._instance.getFeatureFlag(e),s=null==(i=this.hr)?void 0:i.get(e);r&&null!=s&&s.variants[r]&&this.dr(s.name,r,s.variants[r].transforms)}})}}previewWebExperiment(){var e=s6.getWindowLocation();if(null!=e&&e.search){var t=tj(null==e?void 0:e.search,"__experiment_id"),i=tj(null==e?void 0:e.search,"__experiment_variant");t&&i&&(s6.ur("previewing web experiments "+t+" && "+i),this.getWebExperiments(e=>{this.cr(parseInt(t),i,e)},!1,!0))}}loadIfEnabled(){this._instance.config.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(e,t,i){if(this._instance.config.disable_web_experiments&&!i)return e([]);var r=this._instance.get_property("$web_experiments");if(r&&!t)return e(r);this._instance.ci({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this._instance.config.token),method:"GET",callback:t=>200===t.statusCode&&t.json?e(t.json.experiments||[]):e([])})}cr(e,t,i){var r=i.filter(t=>t.id===e);r&&r.length>0&&(s6.ur("Previewing web experiment ["+r[0].name+"] with variant ["+t+"]"),this.dr(r[0].name,t,r[0].variants[t].transforms))}static vr(e){return!D(e.conditions)&&s6.pr(e)&&s6.gr(e)}static pr(e){if(D(e.conditions)||D(null==(t=e.conditions)?void 0:t.url))return!0;var t,i,r,s,n=s6.getWindowLocation();return!!n&&(null==(i=e.conditions)||!i.url||s8[null!=(r=null==(s=e.conditions)?void 0:s.urlMatchType)?r:"icontains"](e.conditions.url,n))}
vendor: 5,991 bytes, line 2
2static getWindowLocation(){return null==t?void 0:t.location}static gr(e){if(D(e.conditions)||D(null==(i=e.conditions)?void 0:i.utm))return!0;var t=rp();if(t.utm_source){var i,r,s,n,o,a,l,c,u,h=null==(r=e.conditions)||null==(r=r.utm)||!r.utm_campaign||(null==(s=e.conditions)||null==(s=s.utm)?void 0:s.utm_campaign)==t.utm_campaign,d=null==(n=e.conditions)||null==(n=n.utm)||!n.utm_source||(null==(o=e.conditions)||null==(o=o.utm)?void 0:o.utm_source)==t.utm_source,p=null==(a=e.conditions)||null==(a=a.utm)||!a.utm_medium||(null==(l=e.conditions)||null==(l=l.utm)?void 0:l.utm_medium)==t.utm_medium,g=null==(c=e.conditions)||null==(c=c.utm)||!c.utm_term||(null==(u=e.conditions)||null==(u=u.utm)?void 0:u.utm_term)==t.utm_term;return h&&p&&g&&d}return!1}static ur(e){for(var t=arguments.length,i=Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];ew.info("[WebExperiments] "+e,i)}dr(e,t,i){this._is_bot()?s6.ur("Refusing to render web experiment since the viewer is a likely bot"):"control"!==t?i.forEach(i=>{if(i.selector){s6.ur("applying transform of variant "+t+" for experiment "+e+" ",i);var r,s=null==(r=document)?void 0:r.querySelectorAll(i.selector);null==s||s.forEach(e=>{i.html&&(e.innerHTML=i.html),i.css&&e.setAttribute("style",i.css)})}}):s6.ur("Control variants leave the page unmodified.")}_is_bot(){return o&&this._instance?s1(o,this._instance.config.custom_blocked_useragents):void 0}}var s4=eE("[PostHog ExternalIntegrations]"),s7={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class s9{constructor(e){this._instance=e}it(e,t){var i;null==(i=p.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,e,e=>{if(e)return s4.error("failed to load script",e);t()})}startIfEnabledOrStop(){var e,t=this,i=function(e){var i,r,n;!s||null!=(i=p.__PosthogExtensions__)&&null!=(i=i.integrations)&&i[e]||t.it(s7[e],()=>{var i;null==(i=p.__PosthogExtensions__)||null==(i=i.integrations)||null==(i=i[e])||i.start(t._instance)}),!s&&null!=(r=p.__PosthogExtensions__)&&null!=(r=r.integrations)&&r[e]&&(null==(n=p.__PosthogExtensions__)||null==(n=n.integrations)||null==(n=n[e])||n.stop())};for(var[r,s]of Object.entries(null!=(e=this._instance.config.integrations)?e:{}))i(r)}}var ne="[SessionRecording]",nt=eE(ne);class ni{get started(){var e;return!(null==(e=this._r)||!e.isStarted)}get status(){return this._r?this._r.status:this.mr&&!this.yr?"disabled":"lazy_loading"}constructor(e){if(this._forceAllowLocalhostNetworkCapture=!1,this.mr=!1,this.br=void 0,this._instance=e,!this._instance.sessionManager)throw nt.error("started without valid sessionManager"),Error(ne+" started without valid sessionManager. This is a bug.");if("always"===this._instance.config.cookieless_mode)throw Error(ne+' cannot be used with cookieless_mode="always"')}get yr(){var e,i=!(null==(e=this._instance.get_property(eY))||!e.enabled),r=!this._instance.config.disable_session_recording,s=this._instance.config.disable_session_recording||this._instance.consent.isOptedOut();return t&&i&&r&&!s}startIfEnabledOrStop(e){var t;if(!this.yr||null==(t=this._r)||!t.isStarted){var i=!O(Object.assign)&&!O(Array.from);this.yr&&i?(this.wr(e),nt.info("starting")):this.stopRecording()}}wr(e){var t,i,r;this.yr&&(null!=p&&null!=(t=p.__PosthogExtensions__)&&null!=(t=t.rrweb)&&t.record&&null!=(i=p.__PosthogExtensions__)&&i.initSessionRecording?this.Er(e):null==(r=p.__PosthogExtensions__)||null==r.loadExternalDependency||r.loadExternalDependency(this._instance,this.Sr,t=>{if(t)return nt.error("could not load recorder",t);this.Er(e)}))}stopRecording(){var e,t;null==(e=this.br)||e.call(this),this.br=void 0,null==(t=this._r)||t.stop()}$r(){var e;null==(e=this._instance.persistence)||e.unregister(eX)}kr(e){if(this._instance.persistence){var t,i,r=this._instance.persistence,s=()=>{var t=!1===e.sessionRecording?void 0:e.sessionRecording,i=null==t?void 0:t.sampleRate,s=D(i)?null:parseFloat(i);D(s)&&this.$r();var n=null==t?void 0:t.minimumDurationMilliseconds;r.register({[eY]:f({enabled:!!t},t,{networkPayloadCapture:f({capturePerformance:e.capturePerformance},null==t?void 0:t.networkPayloadCapture),canvasRecording:{enabled:null==t?void 0:t.recordCanvas,fps:null==t?void 0:t.canvasFps,quality:null==t?void 0:t.canvasQuality},sampleRate:s,minimumDurationMilliseconds:O(n)?null:n,endpoint:null==t?void 0:t.endpoint,triggerMatchType:null==t?void 0:t.triggerMatchType,masking:null==t?void 0:t.masking,urlTriggers:null==t?void 0:t.urlTriggers})})};s(),null==(t=this.br)||t.call(this),this.br=null==(i=this._instance.sessionManager)?void 0:i.onSessionId(s)}}onRemoteConfig(e){"sessionRecording"in e?!1!==e.sessionRecording?(this.kr(e),this.mr=!0,this.startIfEnabledOrStop()):this.mr=!0:nt.info("skipping remote config with no sessionRecording",e)}log(e,t){var i;void 0===t&&(t="log"),null!=(i=this._r)&&i.log?this._r.log(e,t):nt.warn("log called before recorder was ready")}get Sr(){var e,t,i=null==(e=this._instance)||null==(e=e.persistence)?void 0:e.get_property(eY);return(null==i||null==(t=i.scriptConfig)?void 0:t.script)||"lazy-recorder"}Er(e){var t,i;if(null==(t=p.__PosthogExtensions__)||!t.initSessionRecording)throw Error("Called on script loaded before session recording is available");this._r||(this._r=null==(i=p.__PosthogExtensions__)?void 0:i.initSessionRecording(this._instance),this._r._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),this._r.start(e)}onRRwebEmit(e){var t;null==(t=this._r)||null==t.onRRwebEmit||t.onRRwebEmit(e)}overrideLinkedFlag(){var e,t;this._r||null==(t=this._instance.persistence)||t.register({$replay_override_linked_flag:!0}),null==(e=this._r)||e.overrideLinkedFlag()}overrideSampling(){var e,t;this._r||null==(t=this._instance.persistence)||t.register({$replay_override_sampling:!0}),null==(e=this._r)||e.overrideSampling()}overrideTrigger(e){var t,i;this._r||null==(i=this._instance.persistence)||i.register({["url"===e?"$replay_override_url_trigger":"$replay_override_event_trigger"]:!0}
2),null==(t=this._r)||t.overrideTrigger(e)}get sdkDebugProperties(){var e;return(null==(e=this._r)?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(e,t){var i;return!(null==(i=this._r)||!i.tryAddCustomEvent(e,t))}}var nr={},ns=()=>{},nn="posthog",no=!r6&&-1===(null==d?void 0:d.indexOf("MSIE"))&&-1===(null==d?void 0:d.indexOf("Mozilla")),na=e=>{var i;return f({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,token:"",autocapture:!0,cross_subdomain_cookie:function(e){var t=null==e?void 0:e.hostname;if(!A(t))return!1;var i=t.split(".").slice(-2).join(".");for(var r of eA)if(i===r)return!1;return!0}(null==a?void 0:a.location),persistence:"localStorage+cookie",persistence_name:"",loaded:ns,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:null!=e?e:"unset",__preview_deferred_init_extensions:!1,debug:l&&A(null==l?void 0:l.search)&&-1!==l.search.indexOf("__posthog_debug=true")||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_product_tours:!0,disable_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:"https:"===(null==t||null==(i=t.location)?void 0:i.protocol),ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error:e=>{var t="Bad HTTP status: "+e.statusCode+" "+e.text;ew.error(t)},get_device_id:e=>e,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:"identified_only",before_send:void 0,request_queue_config:{flush_interval_ms:3e3},error_tracking:{},_onCapture:ns,__preview_eager_load_replay:!1},{rageclick:!(e&&e>="2025-11-30")||{content_ignorelist:!0},capture_pageview:!(e&&e>="2025-05-24")||"history_change",session_recording:e&&e>="2025-11-30"?{strictMinimumDuration:!0}:{}})},nl=e=>{var t={};O(e.process_person)||(t.person_profiles=e.process_person),O(e.xhr_headers)||(t.request_headers=e.xhr_headers),O(e.cookie_name)||(t.persistence_name=e.cookie_name),O(e.disable_cookie)||(t.disable_persistence=e.disable_cookie),O(e.store_google)||(t.save_campaign_params=e.store_google),O(e.verbose)||(t.debug=e.verbose);var i=e$({},t,e);return F(e.property_blacklist)&&(O(e.property_denylist)?i.property_denylist=e.property_blacklist:F(e.property_denylist)?i.property_denylist=[...e.property_blacklist,...e.property_denylist]:ew.error("Invalid value for property_denylist config: "+e.property_denylist)),i};class nc{constructor(){this.__forceAllowLocalhost=!1}get Pr(){return this.__forceAllowLocalhost}set Pr(e){ew.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}class nu{get decideEndpointWasHit(){var e,t;return null!=(e=null==(t=this.featureFlags)?void 0:t.hasLoadedFlags)&&e}get flagsEndpointWasHit(){var e,t;return null!=(e=null==(t=this.featureFlags)?void 0:t.hasLoadedFlags)&&e}constructor(){this.webPerformance=new nc,this.Tr=!1,this.version=g.LIB_VERSION,this.Rr=new sT,this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=na(),this.SentryIntegration=i_,this.sentryIntegration=e=>{var t;return t=ig(this,e),{name:ip,processEvent:e=>t(e)}},this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.Cr=!1,this.Ir=null,this.Fr=null,this.Mr=null,this.featureFlags=new sy(this),this.toolbar=ne
vendor: 9,167 bytes, line 2
2w iw(this),this.scrollManager=new sz(this),this.pageViewManager=new rP(this),this.surveys=new sj(this),this.productTours=new sk(this),this.experiments=new s6(this),this.exceptions=new sl(this),this.rateLimiter=new sU(this),this.requestRouter=new s5(this),this.consent=new ii(this),this.externalIntegrations=new s9(this),this.people={set:(e,t,i)=>{var r=A(e)?{[e]:t}:e;this.setPersonProperties(r),null==i||i({})},set_once:(e,t,i)=>{var r=A(e)?{[e]:t}:e;this.setPersonProperties(void 0,r),null==i||i({})}},this.on("eventCaptured",e=>ew.info('send "'+(null==e?void 0:e.event)+'"',e))}init(e,t,i){if(i&&i!==nn){var r,s=null!=(r=nr[i])?r:new nu;return s._init(e,t,i),nr[i]=s,nr[nn][i]=s,s}return this._init(e,t,i)}_init(e,i,r){if(void 0===i&&(i={}),O(e)||M(e))return ew.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},i.debug=this.Or(i.debug),this.Ar=i,this.Dr=[],i.person_profiles&&(this.Fr=i.person_profiles),this.set_config(e$({},na(i.defaults),nl(i),{name:r,token:e})),this.config.on_xhr_error&&ew.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=i.disable_compression?void 0:tL.GZipJS;var s=this.jr();this.persistence=new sw(this.config,s),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new sw(f({},this.config,{persistence:"sessionStorage"}),s);var n=f({},this.persistence.props),o=f({},this.sessionPersistence.props);this.register({$initialization_time:(new Date).toISOString()}),this.Lr=new sV(e=>this.Nr(e),this.config.request_queue_config),this.Ur=new sW(this),this.__request_queue=[];var a="always"===this.config.cookieless_mode||"on_reject"===this.config.cookieless_mode&&this.consent.isExplicitlyOptedOut();if(a||(this.sessionManager=new sK(this),this.sessionPropsManager=new sJ(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(ew.info("Deferring extension initialization to improve startup performance"),setTimeout(()=>{this.zr(a)},0)):(ew.info("Initializing extensions synchronously"),this.zr(a)),g.DEBUG=g.DEBUG||this.config.debug,g.DEBUG&&ew.info("Starting in debug mode",{this:this,config:i,thisC:f({},this.config),p:n,s:o}),void 0!==(null==(l=i.bootstrap)?void 0:l.distinctID)){var l,c,u,h=this.config.get_device_id(tZ()),d=null!=(c=i.bootstrap)&&c.isIdentifiedID?h:i.bootstrap.distinctID;this.persistence.set_property(e8,null!=(u=i.bootstrap)&&u.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:i.bootstrap.distinctID,$device_id:d})}if(this.Hr()){var p,_,v=Object.keys((null==(p=i.bootstrap)?void 0:p.featureFlags)||{}).filter(e=>{var t;return!(null==(t=i.bootstrap)||null==(t=t.featureFlags)||!t[e])}).reduce((e,t)=>{var r;return e[t]=(null==(r=i.bootstrap)||null==(r=r.featureFlags)?void 0:r[t])||!1,e},{}),m=Object.keys((null==(_=i.bootstrap)?void 0:_.featureFlagPayloads)||{}).filter(e=>v[e]).reduce((e,t)=>{var r,s;return null!=(r=i.bootstrap)&&null!=(r=r.featureFlagPayloads)&&r[t]&&(e[t]=null==(s=i.bootstrap)||null==(s=s.featureFlagPayloads)?void 0:s[t]),e},{});this.featureFlags.receivedFeatureFlags({featureFlags:v,featureFlagPayloads:m})}if(a)this.register_once({distinct_id:tr,$device_id:null},"");else if(!this.get_distinct_id()){var y=this.config.get_device_id(tZ());this.register_once({distinct_id:y,$device_id:y},""),this.persistence.set_property(e8,"anonymous")}return eL(t,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),this.toolbar.maybeLoadToolbar(),i.segment?function(e,t){var i=e.config.segment;if(!i)return t();!function(e,t){var i=e.config.segment;if(!i)return t();var r=i=>{var r=()=>i.anonymousId()||tZ();e.config.get_device_id=r,i.id()&&(e.register({distinct_id:i.id(),$device_id:r()}),e.persistence.set_property(e8,"identified")),t()},s=i.user();"then"in s&&T(s.then)?s.then(e=>r(e)):r(s)}(e,()=>{var r;i.register((Promise&&Promise.resolve||id.warn("This browser does not have Promise support, and can not use the segment integration"),r=(t,i)=>{if(!i)return t;t.event.userId||t.event.anonymousId===e.get_distinct_id()||(id.info("No userId set, resetting PostHog"),e.reset()),t.event.userId&&t.event.userId!==e.get_distinct_id()&&(id.info("UserId set, identifying with PostHog"),e.identify(t.event.userId));var r=e.calculateEventProperties(i,t.event.properties);return t.event.properties=Object.assign({},r,t.event.properties),t},{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:e=>r(e,e.event.event),page:e=>r(e,"$pageview"),identify:e=>r(e,"$identify"),screen:e=>r(e,"$screen")})).then(()=>{t()})})}(this,()=>this.Br()):this.Br(),T(this.config._onCapture)&&this.config._onCapture!==ns&&(ew.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",e=>this.config._onCapture(e.event,e))),this.config.ip&&ew.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this}zr(e){var t=performance.now();this.historyAutocapture=new ih(this),this.historyAutocapture.startIfEnabled();var i=[];i.push(()=>{new ix(this).startIfEnabledOrStop()}),i.push(()=>{var e;this.siteApps=new s0(this),null==(e=this.siteApps)||e.init()}),e||i.push(()=>{this.sessionRecording=new ni(this),this.sessionRecording.startIfEnabledOrStop()}),this.config.disable_scroll_properties||i.push(()=>{this.scrollManager.startMeasuringScrollPosition()}),i.push(()=>{this.autocapture=new tV(this),this.autocapture.startIfEnabled()}),i.push(()=>{this.surveys.loadIfEnabled()}),i.push(()=>{this.productTours.loadIfEnabled()}),i.push(()=>{this.heatmaps=new rS(this),this.heatmaps.startIfEnabled()}),i.push(()=>{this.webVitalsAutocapture=new rE(this)}),i.push(()=>{this.exceptionObserver=new ic(this),this.exceptionObserver.startIfEnabled()}),i.push(()=>{this.deadClicksAutocapture=new ia(this,io),this.deadClicksAutocapture.startIfEnabled()}),i.push(()=>{if(this.qr){var e=this.qr;this.qr=void 0,this.fi(e)}}),this.Wr(i,t)}Wr(e,t){for(;e.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-t>=30&&e.length>0)return void setTimeout(()=>{this.Wr(e,t)},0);var i=e.shift();if(i)try{i()}catch(e){ew.error("Error initializing extension:",e)}}var r=Math.round(performance.now()-t);this.register_for_session({$sdk_debug_extensions_init_method:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",$sdk_debug_extensions_init_time_ms:r}),this.config.__preview_deferred_init_extensions&&ew.info("PostHog extensions initialized ("+r+"ms)")}fi(e){var t,i,r,s,n,o,l,c;a&&a.body?(this.config.__preview_deferred_init_extensions&&(this.qr=e),this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=E(e.supportedCompression,tL.GZipJS)?tL.GZipJS:E(e.supportedCompression,tL.Base64)?tL.Base64:void 0),null!=(t=e.analytics)&&t.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),this.set_config({person_profiles:this.Fr?this.Fr:"identified_only"}),null==(i=this.siteApps)||i.onRemoteConfig(e),null==(r=this.sessionRecording)||r.onRemoteConfig(e),null==(s=this.autocapture)||s.onRemoteConfig(e),null==(n=this.heatmaps)||n.onRemoteConfig(e),this.surveys.onRemoteConfig(e),this.productTours.onRemoteConfig(e),null==(o=this.webVitalsAutocapture)||o.onRemoteConfig(e),null==(l=this.exceptionObserver)||l.onRemoteConfig(e),this.exceptions.onRemoteConfig(e),null==(c=this.deadClicksAutocapture)||c.onRemoteConfig(e)):(ew.info("document not ready yet, trying again in 500 milliseconds..."),setTimeout(()=>{this.fi(e)},500))}Br(){try{this.config.loaded(this)}catch(e){ew.critical("`loaded` function failed",e)}this.Gr(),this.config.capture_pageview&&setTimeout(()=>{(this.consent.isOptedIn()||"always"===this.config.cookieless_mode)&&this.Vr()},1),new sB(this).load(),this.featureFlags.flags()}Gr(){var e;this.is_capturing()&&this.config.request_batching&&(null==(e=this.Lr)||e.enable())}_dom_loaded(){this.is_capturing()&&eP(this.__request_queue,e=>this.Nr(e)),this.__request_queue=[],this.Gr()}_handle_unload(){var e,t;this.config.request_batching?(this.Jr()&&this.capture("$pageleave"),null==(e=this.Lr)||e.unload(),null==(t=this.Ur)||t.unload()):this.Jr()&&this.capture("$pageleave",null,{transport:"sendBeacon"})}ci(e){this.__loaded&&(no?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)||(e.transport=e.transport||this.config.api_transport,e.url=r7(e.url,{ip:+!!this.config.ip}),e.headers=f({},this.config.request_headers),e.compression="best-available"===e.compression?this.compression:e.compression,e.disableXHRCredentials=this.config.__preview_disable_xhr_credentials,this.config.__preview_disable_beacon&&(e.disableTransport=["sendBeacon"]),e.fetchOptions=e.fetchOptions||this.config.fetch_options,
2(e=>{var t,i,r,s=f({},e);s.timeout=s.timeout||6e4,s.url=r7(s.url,{_:(new Date).getTime().toString(),ver:g.LIB_VERSION,compression:s.compression});var n=null!=(t=s.transport)?t:"fetch",o=st.filter(e=>!s.disableTransport||!e.transport||!s.disableTransport.includes(e.transport)),a=null!=(i=null==(r=eM(o,e=>e.transport===n))?void 0:r.method)?i:o[0].method;if(!a)throw Error("No available transport method");a(s)})(f({},e,{callback:t=>{var i,r;this.rateLimiter.checkForLimiting(t),t.statusCode>=400&&(null==(i=(r=this.config).on_request_error)||i.call(r,t)),null==e.callback||e.callback(t)}}))))}Nr(e){this.Ur?this.Ur.retriableRequest(e):this.ci(e)}_execute_array(e){var t,i=[],r=[],s=[];eP(e,e=>{e&&(F(t=e[0])?s.push(e):T(e)?e.call(this):F(e)&&"alias"===t?i.push(e):F(e)&&-1!==t.indexOf("capture")&&T(this[t])?s.push(e):r.push(e))});var n=function(e,t){eP(e,function(e){if(F(e[0])){var i=t;eI(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(s,this)}Hr(){var e,t;return(null==(e=this.config.bootstrap)?void 0:e.featureFlags)&&Object.keys(null==(t=this.config.bootstrap)?void 0:t.featureFlags).length>0||!1}push(e){this._execute_array([e])}capture(e,t,i){var r;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.Lr){if(this.is_capturing())if(!O(e)&&A(e)){var s=!this.config.opt_out_useragent_filter&&this._is_bot();if(!(s&&!this.config.__preview_capture_bot_pageviews)){var n=null!=i&&i.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(null==n||!n.isRateLimited){null!=t&&t.$current_url&&!A(null==t?void 0:t.$current_url)&&(ew.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),null==t||delete t.$current_url),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var o=new Date,a=(null==i?void 0:i.timestamp)||o,l=tZ(),c={uuid:l,event:e,properties:this.calculateEventProperties(e,t||{},a,l)};"$pageview"===e&&this.config.__preview_capture_bot_pageviews&&s&&(c.event="$bot_pageview",c.properties.$browser_type="bot"),n&&(c.properties.$lib_rate_limit_remaining_tokens=n.remainingTokens),(null==i?void 0:i.$set)&&(c.$set=null==i?void 0:i.$set);var u,h="$groupidentify"!==e,d=this.Kr(null==i?void 0:i.$set_once,h);if(d&&(c.$set_once=d),(p=c,g=null!=i&&i._noTruncate?null:this.config.properties_string_max_length,_=e=>A(e)&&!L(g)?e.slice(0,g):e,v=new Set,c=function e(t,i){var r;return t!==Object(t)?_?_(t,i):t:v.has(t)?void 0:(v.add(t),F(t)?(r=[],eP(t,t=>{r.push(e(t))})):(r={},eI(t,(t,i)=>{v.has(t)||(r[i]=e(t,i))})),r)}(p)).timestamp=a,O(null==i?void 0:i.timestamp)||(c.properties.$event_time_override_provided=!0,c.properties.$event_time_override_system_time=o),e===sI.DISMISSED||e===sI.SENT){var p,g,_,v,m,y,b,w=null==t?void 0:t[s$.SURVEY_ID],E=null==t?void 0:t[s$.SURVEY_ITERATION];u={id:w,current_iteration:E},localStorage.getItem(sM(u))||localStorage.setItem(sM(u),"true"),c.$set=f({},c.$set,{[(m={id:w,current_iteration:E},b="$survey_"+(y=e===sI.SENT?"responded":"dismissed")+"/"+m.id,m.current_iteration&&m.current_iteration>0&&(b="$survey_"+y+"/"+m.id+"/"+m.current_iteration),b)]:!0})}var x=f({},c.properties.$set,c.$set);if(R(x)||this.setPersonPropertiesForFlags(x),!D(this.config.before_send)){var k=this.Yr(c);if(!k)return;c=k}this.Rr.emit("eventCaptured",c);var S={method:"POST",url:null!=(r=null==i?void 0:i._url)?r:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:c,compression:"best-available",batchKey:null==i?void 0:i._batchKey};return!this.config.request_batching||i&&(null==i||!i._batchKey)||null!=i&&i.send_instantly?this.Nr(S):this.Lr.enqueue(S),c}ew.critical("This capture call is ignored due to client rate limiting.")}}else ew.error("No event name provided to posthog.capture")}else ew.uninitializedWarning("posthog.capture")}Ui(e){return this.on("eventCaptured",t=>e(t.event,t))}calculateEventProperties(e,i,r,s,n){if(r=r||new Date,!this.persistence||!this.sessionPersistence)return i;var o,c=n?void 0:this.persistence.remove_event_timer(e),u=f({},i);if(u.token=this.config.token,u.$config_defaults=this.config.defaults,("always"==this.config.cookieless_mode||"on_reject"==this.config.cookieless_mode&&this.consent.isExplicitlyOptedOut())&&(u.$cookieless_mode=!0),"$snapshot"===e){var h=f({},this.persistence.properties(),this.sessionPersistence.properties());return u.distinct_id=h.distinct_id,(!A(u.distinct_id)&&!N(u.distinct_id)||M(u.distinct_id))&&ew.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),u}var p,_=function(e,i){if(!d)return{};var r,s,n=e?eF([],rc,i||[]):[],[o,a]=function(e){for(var t=0;t<ro.length;t++){var[i,r]=ro[t],s=i.exec(e),n=s&&(T(r)?r(s,e):r);if(n)return n}return["",""]}(d);return e$(eO({$os:o,$os_version:a,$browser:rr(d,navigator.vendor),$device:ra(d),$device_type:(s=ra(d))===i$||s===iI||"Kobo"===s||"Kindle Fire"===s||s===i5?iP:s===iz||s===iJ||s===iY||s===i1?"Console":s===iT?"Wearable":s?ik:"Desktop",$timezone:rb(),$timezone_offset:function(){try{return(new Date).getTimezoneOffset()}catch(e){return}}()}),{$current_url:tH(null==l?void 0:l.href,n,rh),$host:null==l?void 0:l.host,$pathname:null==l?void 0:l.pathname,$raw_user_agent:d.length>1e3?d.substring(0,997)+"...":d,$browser_version:rn(d,navigator.vendor),$browser_language:rv(),$browser_language_prefix:"string"==typeof(r=rv())?r.split("-")[0]:void 0,$screen_height:null==t?void 0:t.screen.height,$screen_width:null==t?void 0:t.screen.width,$viewport_height:null==t?void 0:t.innerHe
2ight,$viewport_width:null==t?void 0:t.innerWidth,$lib:"web",$lib_version:g.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})}(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties);if(this.sessionManager){var{sessionId:v,windowId:m}=this.sessionManager.checkAndGetSessionAndWindowId(n,r.getTime());u.$session_id=v,u.$window_id=m}this.sessionPropsManager&&e$(u,this.sessionPropsManager.getSessionProps());try{this.sessionRecording&&e$(u,this.sessionRecording.sdkDebugProperties),u.$sdk_debug_retry_queue_size=null==(o=this.Ur)?void 0:o.length}catch(e){u.$sdk_debug_error_capturing_properties=String(e)}if(this.requestRouter.region===s2.CUSTOM&&(u.$lib_custom_api_host=this.config.api_host),p="$pageview"!==e||n?"$pageleave"!==e||n?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(r):this.pageViewManager.doPageView(r,s),u=e$(u,p),"$pageview"===e&&a&&(u.title=a.title),!O(c)){var y=r.getTime()-c;u.$duration=parseFloat((y/1e3).toFixed(3))}d&&this.config.opt_out_useragent_filter&&(u.$browser_type=this._is_bot()?"bot":"browser"),(u=e$({},_,this.persistence.properties(),this.sessionPersistence.properties(),u)).$is_identified=this._isIdentified(),F(this.config.property_denylist)?eI(this.config.property_denylist,function(e){delete u[e]}):ew.error("Invalid value for property_denylist config: "+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var b=this.config.sanitize_properties;b&&(ew.error("sanitize_properties is deprecated. Use before_send instead"),u=b(u,e));var w=this.Xr();return u.$process_person_profile=w,w&&!n&&this.Qr("_calculate_event_properties"),u}Kr(e,t){if(void 0===t&&(t=!0),!this.persistence||!this.Xr()||this.Tr)return e;var i,r=e$({},this.persistence.get_initial_props(),(null==(i=this.sessionPropsManager)?void 0:i.getSetOnceProps())||{},e||{}),s=this.config.sanitize_properties;return s&&(ew.error("sanitize_properties is deprecated. Use before_send instead"),r=s(r,"$set_once")),t&&(this.Tr=!0),R(r)?void 0:r}register(e,t){var i;null==(i=this.persistence)||i.register(e,t)}register_once(e,t,i){var r;null==(r=this.persistence)||r.register_once(e,t,i)}register_for_session(e){var t;null==(t=this.sessionPersistence)||t.register(e)}unregister(e){var t;null==(t=this.persistence)||t.unregister(e)}unregister_for_session(e){var t;null==(t=this.sessionPersistence)||t.unregister(e)}Zr(e,t){this.register({[e]:t})}getFeatureFlag(e,t){return this.featureFlags.getFeatureFlag(e,t)}getFeatureFlagPayload(e){var t=this.featureFlags.getFeatureFlagPayload(e);try{return JSON.parse(t)}catch(e){return t}}isFeatureEnabled(e,t){return this.featureFlags.isFeatureEnabled(e,t)}reloadFeatureFlags(){this.featureFlags.reloadFeatureFlags()}updateEarlyAccessFeatureEnrollment(e,t,i){this.featureFlags.updateEarlyAccessFeatureEnrollment(e,t,i)}getEarlyAccessFeatures(e,t,i){return void 0===t&&(t=!1),this.featureFlags.getEarlyAccessFeatures(e,t,i)}on(e,t){return this.Rr.on(e,t)}onFeatureFlags(e){return this.featureFlags.onFeatureFlags(e)}onSurveysLoaded(e){return this.surveys.onSurveysLoaded(e)}onSessionId(e){var t,i;return null!=(t=null==(i=this.sessionManager)?void 0:i.onSessionId(e))?t:()=>{}}getSurveys(e,t){void 0===t&&(t=!1),this.surveys.getSurveys(e,t)}getActiveMatchingSurveys(e,t){void 0===t&&(t=!1),this.surveys.getActiveMatchingSurveys(e,t)}renderSurvey(e,t){this.surveys.renderSurvey(e,t)}displaySurvey(e,t){void 0===t&&(t=sD),this.surveys.displaySurvey(e,t)}cancelPendingSurvey(e){this.surveys.cancelPendingSurvey(e)}canRenderSurvey(e){return this.surveys.canRenderSurvey(e)}canRenderSurveyAsync(e,t){return void 0===t&&(t=!1),this.surveys.canRenderSurveyAsync(e,t)}identify(e,t,i){if(!this.__loaded||!this.persistence)return ew.uninitializedWarning("posthog.identify");if(N(e)&&(e=e.toString(),ew.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),e)if(["distinct_id","distinctid"].includes(e.toLowerCase()))ew.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and n
2ot a hardcoded string.');else if(e!==tr){if(this.Qr("posthog.identify")){var r=this.get_distinct_id();this.register({$user_id:e}),this.get_property("$device_id")||this.register_once({$had_persisted_distinct_id:!0,$device_id:r},""),e!==r&&e!==this.get_property(eN)&&(this.unregister(eN),this.register({distinct_id:e}));var s="anonymous"===(this.persistence.get_property(e8)||"anonymous");e!==r&&s?(this.persistence.set_property(e8,"identified"),this.setPersonPropertiesForFlags(f({},i||{},t||{}),!1),this.capture("$identify",{distinct_id:e,$anon_distinct_id:r},{$set:t||{},$set_once:i||{}}),this.Mr=sr(e,t,i),this.featureFlags.setAnonymousDistinctId(r)):(t||i)&&this.setPersonProperties(t,i),e!==r&&(this.reloadFeatureFlags(),this.unregister(e5))}}else ew.critical('The string "'+tr+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.');else ew.error("Unique user id has not been set in posthog.identify")}setPersonProperties(e,t){if((e||t)&&this.Qr("posthog.setPersonProperties")){var i=sr(this.get_distinct_id(),e,t);this.Mr!==i?(this.setPersonPropertiesForFlags(f({},t||{},e||{})),this.capture("$set",{$set:e||{},$set_once:t||{}}),this.Mr=i):ew.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}group(e,t,i){if(e&&t){var r=this.getGroups();r[e]!==t&&this.resetGroupPropertiesForFlags(e),this.register({$groups:f({},r,{[e]:t})}),i&&(this.capture("$groupidentify",{$group_type:e,$group_key:t,$group_set:i}),this.setGroupPropertiesForFlags({[e]:i})),r[e]===t||i||this.reloadFeatureFlags()}else ew.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(e,t){void 0===t&&(t=!0),this.featureFlags.setPersonPropertiesForFlags(e,t)}resetPersonPropertiesForFlags(){this.featureFlags.resetPersonPropertiesForFlags()}setGroupPropertiesForFlags(e,t){void 0===t&&(t=!0),this.Qr("posthog.setGroupPropertiesForFlags")&&this.featureFlags.setGroupPropertiesForFlags(e,t)}resetGroupPropertiesForFlags(e){this.featureFlags.resetGroupPropertiesForFlags(e)}reset(e){if(ew.info("reset"),!this.__loaded)return ew.uninitializedWarning("posthog.reset");var t,i,r,s,n=this.get_property("$device_id");if(this.consent.reset(),null==(t=this.persistence)||t.clear(),null==(i=this.sessionPersistence)||i.clear(),this.surveys.reset(),this.featureFlags.reset(),null==(r=this.persistence)||r.set_property(e8,"anonymous"),null==(s=this.sessionManager)||s.resetSessionId(),this.Mr=null,"always"===this.config.cookieless_mode)this.register_once({distinct_id:tr,$device_id:null},"");else{var o=this.config.get_device_id(tZ());this.register_once({distinct_id:o,$device_id:e?o:n},"")}this.register({$last_posthog_reset:(new Date).toISOString()},1)}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var e,t;return null!=(e=null==(t=this.sessionManager)?void 0:t.checkAndGetSessionAndWindowId(!0).sessionId)?e:""}get_session_replay_url(e){if(!this.sessionManager)return"";var{sessionId:t,sessionStartTimestamp:i}=this.sessionManager.checkAndGetSessionAndWindowId(!0),r=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+t);if(null!=e&&e.withTimestamp&&i){var s,n=null!=(s=e.timestampLookBack)?s:10;if(!i)return r;r+="?t="+Math.max(Math.floor(((new Date).getTime()-i)/1e3)-n,0)}return r}alias(e,t){return e===this.get_property(eD)?(ew.critical("Attempting to create alias for existing People user - aborting."),-2):this.Qr("posthog.alias")?(O(t)&&(t=this.get_distinct_id()),e!==t?(this.Zr(eN,e),this.capture("$create_alias",{alias:e,distinct_id:t})):(ew.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}set_config(e){var t=f({},this.config);if(C(e)){e$(this.config,nl(e));var i,r,s,n,o,a=this.jr();null==(i=this.persistence)||i.update_config(this.config,t,a),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new sw(f({},this.config,{persistence:"sessionStorage"}),a);var l=this.Or(this.config.debug);j(l)&&(this.config.debug=l),j(this.config.debug)&&(this.config.debug?(g.DEBUG=!0,t5.H()&&t5.G("ph_debug","true"),ew.info("set_config",{config:e,oldConfig:t,newConfig:f({},this.config)})):(g.DEBUG=!1,t5.H()&&t5.V("ph_debug"))),null==(r=this.sessionRecording)||r.startIfEnabledOrStop(),null==(s=this.autocapture)||s.startIfEnabled(),null==(n=this.heatmaps)||n.startIfEnabled(),this.surveys.loadIfEnabled(),this.ts(),null==(o=this.externalIntegrations)||o.startIfEnabledOrStop()}}startSessionRecording(e){var t,i,r,s,n,o=!0===e,a={sampling:o||!(null==e||!e.sampling),linked_flag:o||!(null==e||!e.linked_flag),url_trigger:o||!(null==e||!e.url_trigger),event_trigger:o||!(null==e||!e.event_trigger)};Object.values(a).some(Boolean)&&(null==(t=this.sessionManager)||t.checkAndGetSessionAndWindowId(),a.sampling&&(null==(i=this.sessionRecording)||i.overrideSampling()),a.linked_flag&&(null==(r=this.sessionRecording)||r.overrideLinkedFlag()),a.url_trigger&&(null==(s=this.sessionRecording)||s.overrideTrigger("url")),a.event_trigger&&(null==(n=this.sessionRecording)||n.overrideTrigger("event"))),this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var e;return!(null==(e=this.sessionRecording)||!e.started)}captureException(e,t){var i=Error("PostHog syntheticException"),r=this.exceptions.buildProperties(e,{handled:!0,syntheticException:i});return this.exceptions.sendExceptionEvent(f({},r,t))}loadToolbar(e){return this.toolbar.loadToolbar(e)}get_property(e){var t;return null==(t=this.persistence)?void 0:t.props[e]}getSessionProperty(e){var t;return null==(t=this.sessionPersistence)?void 0:t.props[e]}toString(){var e,t=null!=(e=this.config.name)?e:nn;return t!==nn&&(t=nn+"."+t),t}_isIdentified(){var e,t;return"identified"===(null==(e=this.persistence)?void 0:e.get_property(e8))||"identified"===(null==(t=this.sessionPersistence)?void 0:t.get_property(e8))}Xr(){var e,t;return!("never"===this.config.person_profiles||"identified_only"===this.config.person_profiles&&
vendor: 3,134 bytes, line 2
2!this._isIdentified()&&R(this.getGroups())&&(null==(e=this.persistence)||null==(e=e.props)||!e[eN])&&(null==(t=this.persistence)||null==(t=t.props)||!t[tt]))}Jr(){return!0===this.config.capture_pageleave||"if_capture_pageview"===this.config.capture_pageleave&&(!0===this.config.capture_pageview||"history_change"===this.config.capture_pageview)}createPersonProfile(){this.Xr()||this.Qr("posthog.createPersonProfile")&&this.setPersonProperties({},{})}Qr(e){return"never"===this.config.person_profiles?(ew.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.Zr(tt,!0),!0)}jr(){if("always"===this.config.cookieless_mode)return!0;var e=this.consent.isOptedOut(),t=this.config.opt_out_persistence_by_default||"on_reject"===this.config.cookieless_mode;return this.config.disable_persistence||e&&!!t}ts(){var e,t,i,r,s=this.jr();return(null==(e=this.persistence)?void 0:e.wi)!==s&&(null==(i=this.persistence)||i.set_disabled(s)),(null==(t=this.sessionPersistence)?void 0:t.wi)!==s&&(null==(r=this.sessionPersistence)||r.set_disabled(s)),s}opt_in_capturing(e){var t,i,r;"always"!==this.config.cookieless_mode?("on_reject"===this.config.cookieless_mode&&this.consent.isExplicitlyOptedOut()&&(this.reset(!0),null==(i=this.sessionManager)||i.destroy(),this.sessionManager=new sK(this),this.persistence&&(this.sessionPropsManager=new sJ(this,this.sessionManager,this.persistence)),this.sessionRecording=new ni(this),this.sessionRecording.startIfEnabledOrStop()),this.consent.optInOut(!0),this.ts(),this.Gr(),null==(t=this.sessionRecording)||t.startIfEnabledOrStop(),"on_reject"==this.config.cookieless_mode&&this.surveys.loadIfEnabled(),(O(null==e?void 0:e.captureEventName)||null!=e&&e.captureEventName)&&this.capture(null!=(r=null==e?void 0:e.captureEventName)?r:"$opt_in",null==e?void 0:e.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Vr()):ew.warn('Consent opt in/out is not valid with cookieless_mode="always" and will be ignored')}opt_out_capturing(){var e,t;"always"!==this.config.cookieless_mode?("on_reject"===this.config.cookieless_mode&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.ts(),"on_reject"===this.config.cookieless_mode&&(this.register({distinct_id:tr,$device_id:null}),null==(e=this.sessionManager)||e.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,null==(t=this.sessionRecording)||t.stopRecording(),this.sessionRecording=void 0,this.Vr())):ew.warn('Consent opt in/out is not valid with cookieless_mode="always" and will be ignored')}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var e=this.consent.consent;return e===it.GRANTED?"granted":e===it.DENIED?"denied":"pending"}is_capturing(){return"always"===this.config.cookieless_mode||("on_reject"===this.config.cookieless_mode?this.consent.isExplicitlyOptedOut()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.ts()}_is_bot(){return o?s1(o,this.config.custom_blocked_useragents):void 0}
2Vr(){a&&("visible"===a.visibilityState?this.Cr||(this.Cr=!0,this.capture("$pageview",{title:a.title},{send_instantly:!0}),this.Ir&&(a.removeEventListener("visibilitychange",this.Ir),this.Ir=null)):this.Ir||(this.Ir=this.Vr.bind(this),eL(a,"visibilitychange",this.Ir)))}debug(e){!1===e?(null==t||t.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(null==t||t.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),this.set_config({debug:!0}))}O(){var e,t,i,r,s=this.Ar||{};return"advanced_disable_flags"in s?!!s.advanced_disable_flags:!1!==this.config.advanced_disable_flags?!!this.config.advanced_disable_flags:!0===this.config.advanced_disable_decide?(ew.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(t="advanced_disable_decide",i=(e="advanced_disable_flags")in s&&!O(s[e]),r=t in s&&!O(s[t]),i?s[e]:!!r&&(ew&&ew.warn("Config field '"+t+"' is deprecated. Please use '"+e+"' instead. The old field will be removed in a future major version."),s[t]))}Yr(e){if(D(this.config.before_send))return e;var t=F(this.config.before_send)?this.config.before_send:[this.config.before_send],i=e;for(var r of t){if(D(i=r(i))){var s="Event '"+e.event+"' was rejected in beforeSend function";return H(e.event)?ew.warn(s+". This can cause unexpected behavior."):ew.info(s),null}i.properties&&!R(i.properties)||ew.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}return i}getPageViewId(){var e;return null==(e=this.pageViewManager.Vt)?void 0:e.pageViewId}captureTraceFeedback(e,t){this.capture("$ai_feedback",{$ai_trace_id:String(e),$ai_feedback_text:t})}captureTraceMetric(e,t,i){this.capture("$ai_metric",{$ai_trace_id:String(e),$ai_metric_name:t,$ai_metric_value:String(i)})}Or(e){var t=j(e)&&!e,i=t5.H()&&"true"===t5.q("ph_debug");return!t&&(!!i||e)}}for(var nh=["identify"],nd=0;nd<nh.length;nd++)nu.prototype[nh[nd]]=eR(nu.prototype[nh[nd]]);var np,ng,n_,nv,nf,nm,ny,nb,nw,nE,nx,nk,nS,nP,nI,n$,nF=(n$=nr[nn]=new nu,function(){function e(){e.done||(e.done=!0,no=!1,eI(nr,function(e){e._dom_loaded()}))}null!=a&&a.addEventListener?"complete"===a.readyState?e():eL(a,"DOMContentLoaded",e,{capture:!1}):t&&ew.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")}(),n$);e.s(["default",()=>nF])}]);
3
4//# debugId=c083c4c7-ce3e-6613-b7a5-49e9f3a8b5d6
5//# sourceMappingURL=55ddeb5c0ac46387.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.