PageSourceSearch

https://saurabhdhar.vercel.app/_next/static/chunks/2341.6aa0d7c6ac5cdf98.js

js saurabhdhar.vercel.app collected 2026-10-03 07:40:44 UTC 155,177 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2341],{72341:(e,t,i)=>{i.r(t),i.d(t,{COPY_AUTOCAPTURE_EVENT:()=>tL,Compression:()=>tD,DisplaySurveyType:()=>sO,PostHog:()=>np,SurveyEventName:()=>sI,SurveyEventProperties:()=>sF,SurveyPosition:()=>sx,SurveyQuestionBranchingType:()=>sP,SurveyQuestionType:()=>sk,SurveySchedule:()=>s$,SurveyType:()=>sS,SurveyWidgetType:()=>sE,default:()=>n_,posthog:()=>n_,severityLevels:()=>tN});var r="undefined"!=typeof window?window:void 0,s="undefined"!=typeof globalThis?globalThis:r,n=Array.prototype,a=n.forEach,o=n.indexOf,l=null==s?void 0:s.navigator,c=null==s?void 0:s.document,u=null==s?void 0:s.location,h=null==s?void 0:s.fetch,d=null!=s&&s.XMLHttpRequest&&"withCredentials"in new s.XMLHttpRequest?s.XMLHttpRequest:void 0,p=null==s?void 0:s.AbortController,g=null==l?void 0:l.userAgent,_=null!=r?r:{},v={DEBUG:!1,LIB_VERSION:"1.274.3"};function f(e,t,i,r,s,n,a){try{var o=e[n](a),l=o.value}catch(e){return void i(e)}o.done?t(l):Promise.resolve(l).then(r,s)}function m(e){return function(){var t=this,i=arguments;return new Promise(function(r,s){var n=e.apply(t,i);function a(e){f(n,r,s,a,o,"next",e)}function o(e){f(n,r,s,a,o,"throw",e)}a(void 0)})}}function y(){return(y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var r in i)({}).hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e}).apply(null,arguments)}function b(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 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()},S=function(e){return e.replace(/^\$/,"")},k=Array.isArray,P=Object.prototype,$=P.hasOwnProperty,I=P.toString,F=k||function(e){return"[object Array]"===I.call(e)},O=e=>"function"==typeof e,R=e=>e===Object(e)&&!F(e),C=e=>{if(R(e)){for(var t in e)if($.call(e,t))return!1;return!0}return!1},T=e=>void 0===e,A=e=>"[object String]"==I.call(e),M=e=>A(e)&&0===e.trim().length,L=e=>null===e,D=e=>T(e)||L(e),N=e=>"[object Number]"==I.call(e),j=e=>"[object Boolean]"===I.call(e),q=e=>e instanceof FormData,U=e=>E(w,e);function H(e){return null===e||"object"!=typeof e}function B(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function G(e){return!T(Event)&&function(e,t){try{return e instanceof t}catch(e){return!1}}(e,Event)}var W=[!0,"true",1,"1","yes"],V=e=>E(W,e),z=[!1,"false",0,"0","no"];function X(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),X(s||i,t,i,r))}class Y{constructor(e){this.t=e,this.i={},this.o=()=>{Object.keys(this.i).forEach(e=>{var t=this.h(e)+this.m;t>=this.S?delete this.i[e]:this.$(e,t)})},this.h=e=>this.i[String(e)],this.$=(e,t)=>{this.i[String(e)]=t},this.consumeRateLimit=e=>{var t,i,r=null!=(t=this.h(e))?t:this.S;if(0===(r=Math.max(r-1,0)))return!0;this.$(e,r);var s=0===r;return s&&(null==(i=this.k)||i.call(this,e)),s},this.k=this.t.k,this.S=X(this.t.bucketSize,0,100,this.t.P),this.m=X(this.t.refillRate,0,this.S,this.t.P),this.I=X(this.t.refillInterval,0,864e5,this.t.P),this.R=setInterval(()=>{this.o()},this.I)}stop(){this.R&&(clearInterval(this.R),this.R=void 0)}}var J,K,Z,Q=e=>e instanceof Error;function ee(e,t,i,r){var s={platform:"web:javascript",filename:e,function:"<anonymous>"===t?"?":t,in_app:!0};return T(i)||(s.lineno=i),T(r)||(s.colno=r),s}var et=(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]},ei=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,er=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,es=/\((\S*)(?::(\d+))(?::(\d+))\)/,en=e=>{var t=ei.exec(e);if(t){var[,i,r,s]=t;return ee(i,"?",+r,+s)}var n=er.exec(e);if(n){if(n[2]&&0===n[2].indexOf("eval")){var a=es.exec(n[2]);a&&(n[2]=a[1],n[3]=a[2],n[4]=a[3])}var[o,l]=et(n[1]||"?",n[2]);return ee(l,o,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},ea=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,eo=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,el=e=>{var t=ea.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){var i=eo.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}var r=t[3],s=t[1]||"?";return[s,r]=et(s,r),ee(r,s,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},ec=/\(error: (.*)\)/;class eu{constructor(e,t,i){void 0===e&&(e=[]),void 0===t&&(t=[]),void 0===i&&(i=[]),this.coercers=e,this.modifiers=i,this.stackParser=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return function(e,i){void 0===i&&(i=0);for(var r=[],s=e.split("\n"),n=i;n<s.length;n++){var a=s[n];if(!(a.length>1024)){var o=ec.test(a)?a.replace(ec,"$1"):a;if(!o.match(/\S*Error: /)){for(var l of t){var c=l(o);if(c){r.push(c);break}}if(r.length>=50)break}}}if(!r.length)return[];var u=Array.from(r);return u.reverse(),u.slice(0,50).map(e=>y({},e,{filename:e.filename||(u[u.length-1]||{}).filename,function:e.function||"?"}))}}(...t)}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 m(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)),y({},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 m(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 a=[n];return null!=e.cause&&a.push(...this.convertToExceptionList(e.cause,y({},t,{handled:!0}))),a}buildParsingContext(){return{chunkIdMap:function(e){var t=globalThis._posthogChunkIds;if(t){var i=Object.keys(t);return Z&&i.length===K||(K=i.length,Z=i.reduce((i,r)=>{J||(J={});var s=J[r];if(s)i[s[0]]=s[1];else for(var n=e(r),a=n.length-1;a>=0;a--){var o=n[a],l=null==o?void 0:o.filename,c=t[r];
vendor: 10,948 bytes, line 1
1if(l&&c){i[l]=c,J[r]=[l,c];break}}return i},{})),Z}}(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 y({},t,{syntheticException:0==i?t.syntheticException:void 0,mechanism:e,apply:e=>r(e,i),next:e=>r(e,i+1)})}}class eh{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 B(e,"DOMException")}isDOMError(e){return B(e,"DOMError")}}class ed{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 ep{constructor(){}match(e){return B(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 eg=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class e_{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(eg);return r&&(t=r[1],i=r[2]),[t,i]}}var ev=["fatal","error","warning","log","info","debug"];function ef(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 em{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 G(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: "+ef(e)}isSeverityLevel(e){return A(e)&&!M(e)&&ev.indexOf(e)>=0}getErrorPropertyFromObject(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var i=e[t];if(Q(i))return i}}getObjectClassName(e){try{var t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){return}}}class ey{match(e){return G(e)}coerce(e,t){var i,r=e.constructor.name;return{type:r,value:r+" captured as exception with keys: "+ef(e),stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}}class eb{match(e){return H(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 ew{match(e){return B(e,"PromiseRejectionEvent")}coerce(e,t){var i,r=this.getUnhandledRejectionReason(e);return H(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(H(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 eE=e=>{var t={T:function(t){if(r&&(v.DEBUG||_.POSTHOG_DEBUG)&&!T(r.console)&&r.console){for(var i=("__rrweb_original__"in r.console[t])?r.console[t].__rrweb_original__:r.console[t],s=arguments.length,n=Array(s>1?s-1:0),a=1;a<s;a++)n[a-1]=arguments[a];i(e,...n)}},info:function(){for(var e=arguments.length,i=Array(e),r=0;r<e;r++)i[r]=arguments[r];t.T("log",...i)},warn:function(){for(var e=arguments.length,i=Array(e),r=0;r<e;r++)i[r]=arguments[r];t.T("warn",...i)},error:function(){for(var e=arguments.length,i=Array(e),r=0;r<e;r++)i[r]=arguments[r];t.T("error",...i)},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=>{t.error("You must initialize PostHog before calling "+e)},createLogger:t=>eE(e+" "+t)};return t},ex=eE("[PostHog.js]"),eS=ex.createLogger,ek=eS("[ExternalScriptsLoader]"),eP=(e,t,i)=>{if(e.config.disable_external_dependency_loading)return ek.warn(t+" was requested but loading of external scripts is disabled."),i("Loading of external scripts is disabled");var r=null==c?void 0:c.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 a=()=>{if(!c)return i("document not found");var r=c.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=c.querySelectorAll("body > script");n.length>0?null==(s=n[0].parentNode)||s.insertBefore(r,n[0]):c.body.appendChild(r)};null!=c&&c.body?a():null==c||c.addEventListener("DOMContentLoaded",a)};_.__PosthogExtensions__=_.__PosthogExtensions__||{},_.__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);eP(e,s,i)},_.__PosthogExtensions__.loadSiteApp=(e,t,i)=>{var r=e.requestRouter.endpointFor("api",t);eP(e,r,i)};var e$={};function eI(e,t,i){if(F(e)){if(a&&e.forEach===a)e.forEach(t,i);else if("length"in e&&e.length===+e.length){for(var r=0,s=e.length;r<s;r++)if(r in e&&t.call(i,e[r],r)===e$)return}}}function eF(e,t,i){if(!D(e)){if(F(e))return eI(e,t,i);if(q(e)){for(var r of e.entries())if(t.call(i,r[1],r[0])===e$)return}else for(var s in e)if($.call(e,s)&&t.call(i,e[s],s)===e$)return}}var eO=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 eI(i,function(t){for(var i in t)void 0!==t[i]&&(e[i]=t[i])}),e},eR=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 eI(i,function(t){eI(t,function(t){e.push(t)})}),e};function eC(e){for(var t=Object.keys(e),i=t.length,r=Array(i);i--;)r[i]=[t[i],e[t[i]]];return r}var eT=function(e){try{return e()}catch(e){return}},eA=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){ex.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),ex.critical(e)}}},eM=function(e){var t={};return eF(e,function(e,i){(A(e)&&e.length>0||N(e))&&(t[i]=e)}),t},eL=["herokuapp.com","vercel.app","netlify.app"];function eD(e,t){for(var i=0;i<e.length;i++)if(t(e[i]))return e[i]}function eN(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 ej="$people_distinct_id",eq="__alias",eU="__timers",eH="$autocapture_disabled_server_side",eB="$heatmaps_enabled_server_side",eG="$exception_capture_enabled_server_side",eW="$error_tracking_suppression_rules",eV="$error_tracking_capture_extension_exceptions",ez="$web_vitals_enabled_server_side",eX="$dead_clicks_enabled_server_side",eY="$web_vitals_allowed_metrics",eJ="$session_recording_remote_config",eK="$sesid",eZ="$session_is_sampled",eQ="$enabled_feature_flags",e0="$early_access_features",e1="$feature_flag_details",e2="$stored_person_properties",e3="$stored_group_properties",e5="$surveys",e8="$surveys_activated",e6="$flag_call_reported",e4="$user_state",e7="$client_session_props",e9="$capture_rate_limit",te="$initial_campaign_params",tt="$initial_referrer_info",ti="$initial_person_info",tr="$epp",ts="__POSTHOG_TOOLBAR__",tn="$posthog_cookieless",ta=[ej,eq,"__cmpns",eU,"$session_recording_enabled_server_side",eB,eK,eQ,eW,e4,e0,e1,e3,e2,e5,e6,e7,e9,te,tt,tr,ti];function to(e){return e instanceof Element&&(e.id===ts||!(null==e.closest||!e.closest(".toolbar-global-fade-container")))}function tl(e){return!!e&&1===e.nodeType}function tc(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function tu(e){return!!e&&3===e.nodeType}function th(e){return!!e&&11===e.nodeType}function td(e){return e?x(e).split(/\s+/):[]}function tp(e){var t=null==r?void 0:r.location.href;return!!(t&&e&&e.some(e=>t.match(e)))}function tg(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 td(t)}function t_(e){return D(e)?null:x(e).split(/(\s+)/).filter(e=>tC(e)).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function tv(e){var t="";return tS(e)&&!tk(e)&&e.childNodes&&e.childNodes.length&&eF(e.childNodes,function(e){var i;tu(e)&&e.textContent&&(t+=null!=(i=t_(e.textContent))?i:"")}),x(t)}function tf(e){var t;return T(e.target)?e.srcElement||null:null!=(t=e.target)&&t.shadowRoot?e.composedPath()[0]||null:e.target||null}var tm=["a","button","form","input","select","textarea","label"];function ty(e,t){if(T(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 tb(e){var t=e.parentNode;return!(!t||!tl(t))&&t}var tw=[".ph-no-rageclick",".ph-no-capture"],tE=e=>!e||tc(e,"html")||!tl(e),tx=(e,t)=>{if(!r||tE(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var i=!1,s=[e],n=e;n.parentNode&&!tc(n,"body");)if(th(n.parentNode))s.push(n.parentNode.host),n=n.parentNode.host;else{var a=tb(n);if(!a)break;if(t||tm.indexOf(a.tagName.toLowerCase())>-1)i=!0;else{var o=r.getComputedStyle(a);o&&"pointer"===o.getPropertyValue("cursor")&&(i=!0)}s.push(a),n=a}return{parentIsUsefulElement:i,targetElementList:s}};function tS(e){for(var t=e;t.parentNode&&!tc(t,"body");t=t.parentNode){var i=tg(t);if(E(i,"ph-sensitive")||E(i,"ph-no-capture"))return!1}if(E(tg(e),"ph-include"))return!0;var r=e.type||"";if(A(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}
1var 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!!(tc(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||tc(e,"select")||tc(e,"textarea")||"true"===e.getAttribute("contenteditable"))}var tP="(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})",t$=RegExp("^(?:"+tP+")$"),tI=new RegExp(tP),tF="\\d{3}-?\\d{2}-?\\d{4}",tO=RegExp("^("+tF+")$"),tR=RegExp("("+tF+")");function tC(e,t){return void 0===t&&(t=!0),!(D(e)||A(e)&&(e=x(e),(t?t$:tI).test((e||"").replace(/[- ]/g,""))||(t?tO:tR).test(e)))&&!0}function tT(e){var t=tv(e);return tC(t=(t+" "+function e(t){var i="";return t&&t.childNodes&&t.childNodes.length&&eF(t.childNodes,function(t){var r;if(t&&"span"===(null==(r=t.tagName)?void 0:r.toLowerCase()))try{var s=tv(t);i=(i+" "+s).trim(),t.childNodes&&t.childNodes.length&&(i=(i+" "+e(t)).trim())}catch(e){ex.error("[AutoCapture]",e)}}),i}(e)).trim())?t:""}function tA(e){return e.replace(/"|\\"/g,'\\"')}class tM{constructor(){this.clicks=[]}isRageClick(e,t,i){var r=this.clicks[this.clicks.length-1];if(r&&Math.abs(e-r.x)+Math.abs(t-r.y)<30&&i-r.timestamp<1e3){if(this.clicks.push({x:e,y:t,timestamp:i}),3===this.clicks.length)return!0}else this.clicks=[{x:e,y:t,timestamp:i}];return!1}}var tL="$copy_autocapture",tD=function(e){return e.GZipJS="gzip-js",e.Base64="base64",e}({}),tN=["fatal","error","warning","log","info","debug"],tj=e=>{var t=null==c?void 0:c.createElement("a");return T(t)?null:(t.href=e,t)},tq=function(e,t){void 0===t&&(t="&");var i,r,s=[];return eF(e,function(e,t){T(e)||T(t)||"undefined"===t||(i=encodeURIComponent(e instanceof File?e.name:e.toString()),r=encodeURIComponent(t),s[s.length]=r+"="+i)}),s.join(t)},tU=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 a=i[1];try{a=decodeURIComponent(a)}catch(e){ex.error("Skipping decoding for malformed query param: "+a)}return a.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],a=s.split("?"),o=a[1],l=a[0],c=(o||"").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!=o&&(p+="?"+u.join("&")),null!=n&&(p+="#"+n),p},tB=function(e,t){var i=e.match(RegExp(t+"=([^&]*)"));return i?i[1]:null},tG=eS("[AutoCapture]");function tW(e,t){return t.length>e?t.slice(0,e)+"...":t}class tV{constructor(e){this.C=!1,this.O=null,this.rageclicks=new tM,this.F=!1,this.instance=e,this.M=null}get A(){var e,t,i=R(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}j(){if(this.isBrowserSupported()){if(r&&c){var e=e=>{e=e||(null==r?void 0:r.event);try{this.D(e)}catch(e){tG.error("Failed to capture event",e)}};if(eN(c,"submit",e,{capture:!0}),eN(c,"change",e,{capture:!0}),eN(c,"click",e,{capture:!0}),this.A.capture_copied_text){var t=e=>{e=e||(null==r?void 0:r.event),this.D(e,tL)};eN(c,"copy",t,{capture:!0}),eN(c,"cut",t,{capture:!0})}}}else tG.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.C&&(this.j(),this.C=!0)}onRemoteConfig(e){e.elementsChainAsString&&(this.F=e.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[eH]:!!e.autocapture_opt_out}),this.O=!!e.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(e){this.M=e}getElementSelectors(e){var t,i=[];return null==(t=this.M)||t.forEach(t=>{var r=null==c?void 0:c.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.O)&&!j(i)&&!this.instance.L())return!1;var r=null!=(t=this.O)?t:!!i;return!!this.instance.config.autocapture&&!r}D(e,t){if(void 0===t&&(t="$autocapture"),this.isEnabled){var i,s=tf(e);tu(s)&&(s=s.parentNode||null),"$autocapture"===t&&"click"===e.type&&e instanceof MouseEvent&&this.instance.config.rageclick&&null!=(i=this.rageclicks)&&i.isRageClick(e.clientX,e.clientY,(new Date).getTime())&&function(e,t){if(!r||tE(e)||!1===(i=j(t)?!!t&&tw:null!=(s=null==t?void 0:t.css_selector_ignorelist)?s:tw))return!1;var i,s,{targetElementList:n}=tx(e,!1);return!ty(n,i)}(s,this.instance.config.rageclick)&&this.D(e,"$rageclick");var n=t===tL;if(s&&function(e,t,i,s,n){if(void 0===i&&(i=void 0),!r||tE(e)||null!=(a=i)&&a.url_allowlist&&!tp(i.url_allowlist)||null!=(o=i)&&o.url_ignorelist&&tp(i.url_ignorelist))return!1;if(null!=(l=i)&&l.dom_event_allowlist){var a,o,l,c,u=i.dom_event_allowlist;if(u&&!u.some(e=>t.type===e))return!1}var{parentIsUsefulElement:h,targetElementList:d}=tx(e,s);if(!function(e,t){var i=null==t?void 0:t.element_allowlist;if(T(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,i)||!ty(d,null==(c=i)?void 0:c.css_selector_allowlist))return!1;var p=r.getComputedStyle(e);
1if(p&&"pointer"===p.getPropertyValue("cursor")&&"click"===t.type)return!0;var g=e.tagName.toLowerCase();switch(g){case"html":return!1;case"form":return(n||["submit"]).indexOf(t.type)>=0;case"input":case"select":case"textarea":return(n||["change","click"]).indexOf(t.type)>=0;default:return h?(n||["click"]).indexOf(t.type)>=0:(n||["click"]).indexOf(t.type)>=0&&(tm.indexOf(g)>-1||"true"===e.getAttribute("contenteditable"))}}(s,e,this.A,n,n?["copy","cut"]:void 0)){var{props:a,explicitNoCapture:o}=function(e,t){for(var i,s,{e:n,maskAllElementAttributes:a,maskAllText:o,elementAttributeIgnoreList:l,elementsChainAsString:c}=t,u=[e],h=e;h.parentNode&&!tc(h,"body");)th(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(eF(u,e=>{var t=tS(e);"a"===e.tagName.toLowerCase()&&(_=e.getAttribute("href"),_=t&&_&&tC(_)&&_),E(tg(e),"ph-no-capture")&&(v=!0),p.push(function(e,t,i,r){var s=e.tagName.toLowerCase(),n={tag_name:s};tm.indexOf(s)>-1&&!i&&("a"===s.toLowerCase()||"button"===s.toLowerCase()?n.$el_text=tW(1024,tT(e)):n.$el_text=tW(1024,tv(e)));var a=tg(e);a.length>0&&(n.classes=a.filter(function(e){return""!==e})),eF(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 a=i.value;"class"===i.name&&(a=td(a).join(" ")),n["attr__"+i.name]=tW(1024,a)}});for(var o=1,l=1,c=e;c=function(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!tl(t));return t}(c);)o++,c.tagName===e.tagName&&l++;return n.nth_child=o,n.nth_of_type=l,n}(e,a,o,l)),eO(g,function(e){if(!tS(e))return{};var t={};return eF(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(o||("a"===e.tagName.toLowerCase()||"button"===e.tagName.toLowerCase()?p[0].$el_text=tT(e):p[0].$el_text=tv(e)),_){p[0].attr__href=_;var f,m,b=null==(f=tj(_))?void 0:f.host,w=null==r||null==(m=r.location)?void 0:m.host;b&&w&&b!==w&&(d=_)}return{props:eO({$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:td(t):void 0,attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return eC(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=y({},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),a={};return eC(n).sort((e,t)=>{var[i]=e,[r]=t;return i.localeCompare(r)}).forEach(e=>{var[t,i]=e;return a[tA(t.toString())]=tA(i.toString())}),r+=":",r+=eC(a).map(e=>{var[t,i]=e;return t+'="'+i+'"'}).join("")}).join(";")},null!=(i=p[0])&&i.$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.A.element_attribute_ignorelist,elementsChainAsString:this.F});if(o)return!1;var l=this.getElementSelectors(s);if(l&&l.length>0&&(a.$element_selectors=l),t===tL){var c,u=t_(null==r||null==(c=r.getSelection())?void 0:c.toString()),h=e.type||"clipboard";if(!u)return!1;a.$selected_content=u,a.$copy_type=h}return this.instance.capture(t,a),!0}}}isBrowserSupported(){return O(null==c?void 0:c.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 tz="0123456789abcdef";class tX{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 tX(s)}toString(){for(var e="",t=0;t<this.bytes.length;t++)e=e+tz.charAt(this.bytes[t]>>>4)+tz.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 tX(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 tY{constructor(){this.N=0,this.U=0,this.H=new tZ}generate(){var e=this.generateOrAbort();if(T(e)){this.N=0;var t=this.generateOrAbort();if(T(t))throw Error("Could not generate UUID after timestamp reset");return t}return e}generateOrAbort(){var e=Date.now();if(e>this.N)this.N=e,this.B();else{if(!(e+1e4>this.N))return;this.U++,this.U>0x3ffffffffff&&(this.N++,this.B())}return tX.fromFieldsV7(this.N,Math.trunc(this.U/0x40000000),0x3fffffff&this.U,this.H.nextUint32())}B(){this.U=1024*this.H.nextUint32()+(1023&this.H.nextUint32())}}var tJ,tK=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};r&&!T(r.crypto)&&crypto.getRandomValues&&(tK=e=>crypto.getRandomValues(e));
vendor: 14,609 bytes, line 1
1class tZ{constructor(){this.q=new Uint32Array(8),this.W=1/0}nextUint32(){return this.W>=this.q.length&&(tK(this.q),this.W=0),this.q[this.W++]}}var tQ=()=>t0().toString(),t0=()=>(tJ||(tJ=new tY)).generate(),t1="",t2=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,t3={G:()=>!!c,V:function(e){ex.error("cookieStore error: "+e)},J:function(e){if(c){try{for(var t=e+"=",i=c.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}},K:function(e){var t;try{t=JSON.parse(t3.J(e))||{}}catch(e){}return t},Y:function(e,t,i,r,s){if(c)try{var n="",a="",o=function(e,t){if(t){var i=function(e,t){if(void 0===t&&(t=c),t1)return t1;if(!t||["localhost","127.0.0.1"].includes(e))return"";for(var i=e.split("."),r=Math.min(i.length,8),s="dmn_chk_"+tQ();!t1&&r--;){var n=i.slice(r).join("."),a=s+"=1;domain=."+n+";path=/";t.cookie=a+";max-age=3",t.cookie.includes(s)&&(t.cookie=a+";max-age=0",t1=n)}return t1}(e);if(!i){var r,s=(r=e.match(t2))?r[0]:"";s!==i&&ex.info("Warning: cookie subdomain discovery mismatch",s,i),i=s}return i?"; domain=."+i:""}return""}(c.location.hostname,r);if(i){var l=new Date;l.setTime(l.getTime()+24*i*36e5),n="; expires="+l.toUTCString()}s&&(a="; secure");var u=e+"="+encodeURIComponent(JSON.stringify(t))+n+"; SameSite=Lax; path=/"+o+a;return u.length>3686.4&&ex.warn("cookieStore warning: large cookie, len="+u.length),c.cookie=u,u}catch(e){return}},X:function(e,t){if(null!=c&&c.cookie)try{t3.Y(e,"",-1,t)}catch(e){return}}},t5=null,t8={G:function(){if(!L(t5))return t5;var e=!0;if(T(r))e=!1;else try{var t="__mplssupport__";t8.Y(t,"xyz"),'"xyz"'!==t8.J(t)&&(e=!1),t8.X(t)}catch(t){e=!1}return e||ex.error("localStorage unsupported; falling back to cookie store"),t5=e,e},V:function(e){ex.error("localStorage error: "+e)},J:function(e){try{return null==r?void 0:r.localStorage.getItem(e)}catch(e){t8.V(e)}return null},K:function(e){try{return JSON.parse(t8.J(e))||{}}catch(e){}return null},Y:function(e,t){try{null==r||r.localStorage.setItem(e,JSON.stringify(t))}catch(e){t8.V(e)}},X:function(e){try{null==r||r.localStorage.removeItem(e)}catch(e){t8.V(e)}}},t6=["distinct_id",eK,eZ,tr,ti],t4=y({},t8,{K:function(e){try{var t={};try{t=t3.K(e)||{}}catch(e){}var i=eO(t,JSON.parse(t8.J(e)||"{}"));return t8.Y(e,i),i}catch(e){}return null},Y:function(e,t,i,r,s,n){try{t8.Y(e,t,void 0,void 0,n);var a={};t6.forEach(e=>{t[e]&&(a[e]=t[e])}),Object.keys(a).length&&t3.Y(e,a,i,r,s,n)}catch(e){t8.V(e)}},X:function(e,t){try{null==r||r.localStorage.removeItem(e),t3.X(e,t)}catch(e){t8.V(e)}}}),t7={},t9={G:function(){return!0},V:function(e){ex.error("memoryStorage error: "+e)},J:function(e){return t7[e]||null},K:function(e){return t7[e]||null},Y:function(e,t){t7[e]=t},X:function(e){delete t7[e]}},ie=null,it={G:function(){if(!L(ie))return ie;if(ie=!0,T(r))ie=!1;else try{var e="__support__";it.Y(e,"xyz"),'"xyz"'!==it.J(e)&&(ie=!1),it.X(e)}catch(e){ie=!1}return ie},V:function(e){ex.error("sessionStorage error: ",e)},J:function(e){try{return null==r?void 0:r.sessionStorage.getItem(e)}catch(e){it.V(e)}return null},K:function(e){try{return JSON.parse(it.J(e))||null}catch(e){}return null},Y:function(e,t){try{null==r||r.sessionStorage.setItem(e,JSON.stringify(t))}catch(e){it.V(e)}},X:function(e){try{null==r||r.sessionStorage.removeItem(e)}catch(e){it.V(e)}}},ii=function(e){return e[e.PENDING=-1]="PENDING",e[e.DENIED=0]="DENIED",e[e.GRANTED=1]="GRANTED",e}({});class ir{constructor(e){this._instance=e}get A(){return this._instance.config}get consent(){return this.Z()?ii.DENIED:this.tt}isOptedOut(){return"always"===this.A.cookieless_mode||this.consent===ii.DENIED||this.consent===ii.PENDING&&(this.A.opt_out_capturing_by_default||"on_reject"===this.A.cookieless_mode)}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===ii.DENIED}optInOut(e){this.it.Y(this.et,+!!e,this.A.cookie_expiration,this.A.cross_subdomain_cookie,this.A.secure_cookie)}reset(){this.it.X(this.et,this.A.cross_subdomain_cookie)}get et(){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 tt(){var e=this.it.J(this.et);return V(e)?ii.GRANTED:E(z,e)?ii.DENIED:ii.PENDING}get it(){if(!this.rt){var e=this.A.opt_out_capturing_persistence_type;this.rt="localStorage"===e?t8:t3;var t="localStorage"===e?t3:t8;t.J(this.et)&&(this.rt.J(this.et)||this.optInOut(V(t.J(this.et))),t.X(this.et,this.A.cross_subdomain_cookie))}return this.rt}Z(){return!!this.A.respect_dnt&&!!eD([null==l?void 0:l.doNotTrack,null==l?void 0:l.msDoNotTrack,_.doNotTrack],e=>V(e))}}var is=eS("[Dead Clicks]"),ia=()=>!0,io=e=>{var t,i=!(null==(t=e.instance.persistence)||!t.get_property(eX)),r=e.instance.config.capture_dead_clicks;return j(r)?r:i};class il{get lazyLoadedDeadClicksAutocapture(){return this.st}constructor(e,t,i){this.instance=e,this.isEnabled=t,this.onCapture=i,this.startIfEnabled()}onRemoteConfig(e){this.instance.persistence&&this.instance.persistence.register({[eX]:null==e?void 0:e.captureDeadClicks}),this.startIfEnabled()}startIfEnabled(){this.isEnabled(this)&&this.nt(()=>{this.ot()})}nt(e){var t,i;null!=(t=_.__PosthogExtensions__)&&t.initDeadClicksAutocapture&&e(),null==(i=_.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this.instance,"dead-clicks-autocapture",t=>{t?is.error("failed to load script",t):e()})}ot(){var e;if(c){if(!this.st&&null!=(e=_.__PosthogExtensions__)&&e.initDeadClicksAutocapture){var t=R(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};t.__onCapture=this.onCapture,this.st=_.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,t),this.st.start(c),is.info("starting...")}}else is.error("`document` not found. Cannot start.")}stop(){this.st&&(this.st.stop(),this.st=void 0,is.info("stopping..."))}}var ic=eS("[ExceptionAutocapture]");class iu{constructor(e){var t,i,s;this.lt=()=>{var e;if(r&&this.isEnabled&&null!=(e=_.__PosthogExtensions__)&&e.errorWrappingFunctions){var t=_.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,i=_.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,s=_.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.ut&&this.A.capture_unhandled_errors&&(this.ut=t(this.captureException.bind(this))),!this.ht&&this.A.capture_unhandled_rejections&&(this.ht=i(this.captureException.bind(this))),!this.dt&&this.A.capture_console_errors&&(this.dt=s(this.captureException.bind(this)))}catch(e){ic.error("failed to start",e),this.vt()}}},this._instance=e,this.ct=!(null==(t=this._instance.persistence)||!t.props[eG]),this.A=this.ft(),this.gt=new Y({refillRate:null!=(i=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)?i:1,bucketSize:null!=(s=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)?s:10,refillInterval:1e4,P:ic}),this.startIfEnabled()}ft(){var e=this._instance.config.capture_exceptions,t={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return R(e)?t=y({},t,e):(T(e)?this.ct:e)&&(t=y({},t,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),t}get isEnabled(){return this.A.capture_console_errors||this.A.capture_unhandled_errors||this.A.capture_unhandled_rejections}startIfEnabled(){this.isEnabled&&(ic.info("enabled"),this.nt(this.lt))}nt(e){var t,i;null!=(t=_.__PosthogExtensions__)&&t.errorWrappingFunctions&&e(),null==(i=_.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"exception-autocapture",t=>{if(t)return ic.error("failed to load script",t);e()})}vt(){var e,t,i;null==(e=this.ut)||e.call(this),this.ut=void 0,null==(t=this.ht)||t.call(this),this.ht=void 0,null==(i=this.dt)||i.call(this),this.dt=void 0}onRemoteConfig(e){var t=e.autocaptureExceptions;this.ct=!!t,this.A=this.ft(),this._instance.persistence&&this._instance.persistence.register({[eG]:this.ct}),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.gt.consumeRateLimit(r)?ic.info("Skipping exception capture because of client rate limiting.",{exception:r}):this._instance.exceptions.sendExceptionEvent(e)}}function ih(e,t,i){try{if(!(t in e))return()=>{};var r=e[t],s=i(r);return O(s)&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=s,()=>{e[t]=r}}catch(e){return()=>{}}}class id{constructor(e){var t;this._instance=e,this._t=(null==r||null==(t=r.location)?void 0:t.pathname)||""}get isEnabled(){return"history_change"===this._instance.config.capture_pageview}startIfEnabled(){this.isEnabled&&(ex.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.yt&&this.yt(),this.yt=void 0,ex.info("History API monitoring stopped")}monitorHistoryChanges(){var e,t;if(r&&r.history){var i=this;null!=(e=r.history.pushState)&&e.__posthog_wrapped__||ih(r.history,"pushState",e=>function(t,r,s){e.call(this,t,r,s),i.bt("pushState")}),null!=(t=r.history.replaceState)&&t.__posthog_wrapped__||ih(r.history,"replaceState",e=>function(t,r,s){e.call(this,t,r,s),i.bt("replaceState")}),this.wt()}}bt(e){try{var t,i=null==r||null==(t=r.location)?void 0:t.pathname;if(!i)return;i!==this._t&&this.isEnabled&&this._instance.capture("$pageview",{navigation_type:e}),this._t=i}catch(t){ex.error("Error capturing "+e+" pageview",t)}}wt(){if(!this.yt){var e=()=>{this.bt("popstate")};eN(r,"popstate",e),this.yt=()=>{r&&r.removeEventListener("popstate",e)}}}}var ip=eS("[SegmentIntegration]"),ig="posthog-js";function i_(e,t){var{organization:i,projectId:r,prefix:s,severityAllowList:n=["error"],sendExceptionsToPostHog:a=!0}=void 0===t?{}:t;return t=>{if(!("*"===n||n.includes(t.level))||!e.__loaded)return t;t.tags||(t.tags={});var o,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==(o=t.exception)?void 0:o.values)||[],g=p.map(e=>y({},e,{stacktrace:e.stacktrace?y({},e.stacktrace,{type:"raw",frames:(e.stacktrace.frames||[]).map(e=>y({},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_personURL:d,$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),a&&e.exceptions.sendExceptionEvent(_),t}}class iv{constructor(e,t,i,r,s,n){this.name=ig,this.setupOnce=function(a){a(i_(e,{organization:t,projectId:i,prefix:r,severityAllowList:s,sendExceptionsToPostHog:null==n||n}))}}}var im=null!=r&&r.location?tB(r.location.hash,"__posthog")||tB(location.hash,"state"):null,iy="_postHogToolbarParams",ib=eS("[Toolbar]"),iw=function(e){return e[e.UNINITIALIZED=0]="UNINITIALIZED",e[e.LOADING=1]="LOADING",e[e.LOADED=2]="LOADED",e}(iw||{});class iE{constructor(e){this.instance=e}St(e){_.ph_toolbar_state=e}xt(){var e;return null!=(e=_.ph_toolbar_state)?e:iw.UNINITIALIZED}maybeLoadToolbar(e,t,i){if(void 0===e&&(e=void 0),void 0===t&&(t=void 0),void 0===i&&(i=void 0),!r||!c)return!1;e=null!=e?e:r.location,i=null!=i?i:r.history;try{if(!t){try{r.localStorage.setItem("test","test"),r.localStorage.removeItem("test")}catch(e){return!1}t=null==r?void 0:r.localStorage}var s,n=im||tB(e.hash,"__posthog")||tB(e.hash,"state"),a=n?eT(()=>JSON.parse(atob(decodeURIComponent(n))))||eT(()=>JSON.parse(decodeURIComponent(n))):null;return a&&"ph_authorize"===a.action?((s=a).source="url",s&&Object.keys(s).length>0&&(a.desiredHash?e.hash=a.desiredHash:i?i.replaceState(i.state,"",e.pathname+e.search):e.hash="")):((s=JSON.parse(t.getItem(iy)||"{}")).source="localstorage",delete s.userIntent),!(!s.token||this.instance.config.token!==s.token)&&(this.loadToolbar(s),!0)}catch(e){return!1}}Et(e){var t=_.ph_load_toolbar||_.ph_load_editor;!D(t)&&O(t)?t(e,this.instance):ib.warn("No toolbar load function found")}loadToolbar(e){var t,i=!(null==c||!c.getElementById(ts));if(!r||i)return!1;var s="custom"===this.instance.requestRouter.region&&this.instance.config.advanced_disable_toolbar_metrics,n=y({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor("ui")},s?{instrument:!1}:{});return(r.localStorage.setItem(iy,JSON.stringify(y({},n,{source:void 0}))),this.xt()===iw.LOADED)?this.Et(n):this.xt()===iw.UNINITIALIZED&&(this.St(iw.LOADING),null==(t=_.__PosthogExtensions__)||null==t.loadExternalDependency||t.loadExternalDependency(this.instance,"toolbar",e=>{if(e)return ib.error("[Toolbar] Failed to load",e),void this.St(iw.UNINITIALIZED);this.St(iw.LOADED),this.Et(n)}),eN(r,"turbolinks:load",()=>{this.St(iw.UNINITIALIZED),this.loadToolbar(n)})),!0}$t(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 ix=eS("[TracingHeaders]");class iS{constructor(e){this.kt=void 0,this.Pt=void 0,this.lt=()=>{var e,t;T(this.kt)&&(null==(e=_.__PosthogExtensions__)||null==(e=e.tracingHeadersPatchFns)||e._patchXHR(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager)),T(this.Pt)&&(null==(t=_.__PosthogExtensions__)||null==(t=t.tracingHeadersPatchFns)||t._patchFetch(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager))},this._instance=e}nt(e){var t,i;null!=(t=_.__PosthogExtensions__)&&t.tracingHeadersPatchFns&&e(),null==(i=_.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"tracing-headers",t=>{if(t)return ix.error("failed to load script",t);e()})}startIfEnabledOrStop(){var e,t;this._instance.config.__add_tracing_headers?this.nt(this.lt):(null==(e=this.kt)||e.call(this),null==(t=this.Pt)||t.call(this),this.kt=void 0,this.Pt=void 0)}}var ik=eS("[Web Vitals]");class iP{constructor(e){var t;this.It=!1,this.C=!1,this.q={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.Rt=()=>{clearTimeout(this.Tt),0!==this.q.metrics.length&&(this._instance.capture("$web_vitals",this.q.metrics.reduce((e,t)=>
1y({},e,{["$web_vitals_"+t.name+"_event"]:y({},t),["$web_vitals_"+t.name+"_value"]:t.value}),{})),this.q={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.Ct=e=>{var t,i=null==(t=this._instance.sessionManager)?void 0:t.checkAndGetSessionAndWindowId(!0);if(T(i))ik.error("Could not read session ID. Dropping metrics!");else{this.q=this.q||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var r=this.Ot();T(r)||(D(null==e?void 0:e.name)||D(null==e?void 0:e.value)?ik.error("Invalid metric received",e):this.Ft&&e.value>=this.Ft?ik.error("Ignoring metric with value >= "+this.Ft,e):(this.q.url!==r&&(this.Rt(),this.Tt=setTimeout(this.Rt,this.flushToCaptureTimeoutMs)),T(this.q.url)&&(this.q.url=r),this.q.firstMetricTimestamp=T(this.q.firstMetricTimestamp)?Date.now():this.q.firstMetricTimestamp,e.attribution&&e.attribution.interactionTargetElement&&(e.attribution.interactionTargetElement=void 0),this.q.metrics.push(y({},e,{$current_url:r,$session_id:i.sessionId,$window_id:i.windowId,timestamp:Date.now()})),this.q.metrics.length===this.allowedMetrics.length&&this.Rt()))}},this.lt=()=>{var e,t,i,r,s=_.__PosthogExtensions__;T(s)||T(s.postHogWebVitalsCallbacks)||({onLCP:e,onCLS:t,onFCP:i,onINP:r}=s.postHogWebVitalsCallbacks),e&&t&&i&&r?(this.allowedMetrics.indexOf("LCP")>-1&&e(this.Ct.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&t(this.Ct.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&i(this.Ct.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&r(this.Ct.bind(this)),this.C=!0):ik.error("web vitals callbacks not loaded - not starting")},this._instance=e,this.It=!(null==(t=this._instance.persistence)||!t.props[ez]),this.startIfEnabled()}get allowedMetrics(){var e,t,i=R(this._instance.config.capture_performance)?null==(e=this._instance.config.capture_performance)?void 0:e.web_vitals_allowed_metrics:void 0;return T(i)?(null==(t=this._instance.persistence)?void 0:t.props[eY])||["CLS","FCP","INP","LCP"]:i}get flushToCaptureTimeoutMs(){return(R(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals_delayed_flush_ms:void 0)||5e3}get Ft(){var e=R(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==u?void 0:u.protocol;if("http:"!==e&&"https:"!==e)return ik.info("Web Vitals are disabled on non-http/https protocols"),!1;var t=R(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.It}startIfEnabled(){this.isEnabled&&!this.C&&(ik.info("enabled, starting..."),this.nt(this.lt))}onRemoteConfig(e){var t=R(e.capturePerformance)&&!!e.capturePerformance.web_vitals,i=R(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[ez]:t}),this._instance.persistence.register({[eY]:i})),this.It=t,this.startIfEnabled()}nt(e){var t,i;null!=(t=_.__PosthogExtensions__)&&t.postHogWebVitalsCallbacks&&e(),null==(i=_.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"web-vitals",t=>{t?ik.error("failed to load script",t):e()})}Ot(){var e=r?r.location.href:void 0;return e||ik.error("Could not determine current URL"),e}}var i$=eS("[Heatmaps]");function iI(e){return R(e)&&"clientX"in e&&"clientY"in e&&N(e.clientX)&&N(e.clientY)}class iF{constructor(e){var t;this.rageclicks=new tM,this.It=!1,this.C=!1,this.Mt=null,this.instance=e,this.It=!(null==(t=this.instance.persistence)||!t.props[eB])}get flushIntervalMilliseconds(){var e=5e3;return R(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 T(this.instance.config.capture_heatmaps)?T(this.instance.config.enable_heatmaps)?this.It:this.instance.config.enable_heatmaps:!1!==this.instance.config.capture_heatmaps}startIfEnabled(){if(this.isEnabled)this.C||(i$.info("starting..."),this.At(),this.Mt=setInterval(this.jt.bind(this),this.flushIntervalMilliseconds));else{var e,t;clearInterval(null!=(e=this.Mt)?e:void 0),null==(t=this.Dt)||t.stop(),this.getAndClearBuffer()}}onRemoteConfig(e){var t=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[eB]:t}),this.It=t,this.startIfEnabled()}getAndClearBuffer(){var e=this.q;return this.q=void 0,e}Lt(e){this.Nt(e.originalEvent,"deadclick")}At(){r&&c&&(eN(r,"beforeunload",this.jt.bind(this)),eN(c,"click",e=>this.Nt(e||(null==r?void 0:r.event)),{capture:!0}),eN(c,"mousemove",e=>this.Ut(e||(null==r?void 0:r.event)),{capture:!0}),this.Dt=new il(this.instance,ia,this.Lt.bind(this)),this.Dt.startIfEnabled(),this.C=!0)}zt(e,t){var i=this.instance.scrollManager.scrollY(),s=this.instance.scrollManager.scrollX(),n=this.instance.scrollManager.scrollElement(),a=function(e,t,i){for(var s=e;
vendor: 5,820 bytes, line 1
1s&&tl(s)&&!tc(s,"body")&&s!==i;){if(E(t,null==r?void 0:r.getComputedStyle(s).position))return!0;s=tb(s)}return!1}(tf(e),["fixed","sticky"],n);return{x:e.clientX+(a?0:s),y:e.clientY+(a?0:i),target_fixed:a,type:t}}Nt(e,t){var i;if(void 0===t&&(t="click"),!to(e.target)&&iI(e)){var r=this.zt(e,t);null!=(i=this.rageclicks)&&i.isRageClick(e.clientX,e.clientY,(new Date).getTime())&&this.Ht(y({},r,{type:"rageclick"})),this.Ht(r)}}Ut(e){!to(e.target)&&iI(e)&&(clearTimeout(this.Bt),this.Bt=setTimeout(()=>{this.Ht(this.zt(e,"mousemove"))},500))}Ht(e){if(r){var t=r.location.href;this.q=this.q||{},this.q[t]||(this.q[t]=[]),this.q[t].push(e)}}jt(){this.q&&!C(this.q)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}}class iO{constructor(e){this._instance=e}doPageView(e,t){var i,s=this.qt(e,t);return this.Wt={pathname:null!=(i=null==r?void 0:r.location.pathname)?i:"",pageViewId:t,timestamp:e},this._instance.scrollManager.resetContext(),s}doPageLeave(e){var t;return this.qt(e,null==(t=this.Wt)?void 0:t.pageViewId)}doEvent(){var e;return{$pageview_id:null==(e=this.Wt)?void 0:e.pageViewId}}qt(e,t){var i=this.Wt;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:a,maxScrollY:o,maxContentHeight:l,lastContentY:c,maxContentY:u}=s;if(!(T(n)||T(a)||T(o)||T(l)||T(c)||T(u))){n=Math.ceil(n),a=Math.ceil(a),o=Math.ceil(o),l=Math.ceil(l),c=Math.ceil(c),u=Math.ceil(u);var h=n<=1?1:X(a/n,0,1,ex),d=n<=1?1:X(o/n,0,1,ex),p=l<=1?1:X(c/l,0,1,ex),g=l<=1?1:X(u/l,0,1,ex);r=eO(r,{$prev_pageview_last_scroll:a,$prev_pageview_last_scroll_percentage:h,$prev_pageview_max_scroll:o,$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 iR=Uint8Array,iC=Uint16Array,iT=Uint32Array,iA=new iR([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]),iM=new iR([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]),iL=new iR([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),iD=function(e,t){for(var i=new iC(31),r=0;r<31;++r)i[r]=t+=1<<e[r-1];var s=new iT(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]},iN=iD(iA,2),ij=iN[0],iq=iN[1];ij[28]=258,iq[258]=28;for(var iU=iD(iM,0)[1],iH=new iC(32768),iB=0;iB<32768;++iB){var iG=(43690&iB)>>>1|(21845&iB)<<1;iG=(61680&(iG=(52428&iG)>>>2|(13107&iG)<<2))>>>4|(3855&iG)<<4,iH[iB]=((65280&iG)>>>8|(255&iG)<<8)>>>1}var iW=function(e,t,i){for(var r=e.length,s=0,n=new iC(t);s<r;++s)++n[e[s]-1];var a,o=new iC(t);for(s=0;s<t;++s)o[s]=o[s-1]+n[s-1]<<1;if(i){a=new iC(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=o[e[s]-1]++<<u,d=h|(1<<u)-1;h<=d;++h)a[iH[h]>>>l]=c}else for(a=new iC(r),s=0;s<r;++s)a[s]=iH[o[e[s]-1]++]>>>15-e[s];return a},iV=new iR(288);for(iB=0;iB<144;++iB)iV[iB]=8;for(iB=144;iB<256;++iB)iV[iB]=9;for(iB=256;iB<280;++iB)iV[iB]=7;for(iB=280;iB<288;++iB)iV[iB]=8;var iz=new iR(32);for(iB=0;iB<32;++iB)iz[iB]=5;var iX=iW(iV,9,0),iY=iW(iz,5,0),iJ=function(e){return(e/8|0)+(7&e&&1)},iK=function(e,t,i){(null==i||i>e.length)&&(i=e.length);var r=new(e instanceof iC?iC:e instanceof iT?iT:iR)(i-t);return r.set(e.subarray(t,i)),r},iZ=function(e,t,i){i<<=7&t;var r=t/8|0;e[r]|=i,e[r+1]|=i>>>8},iQ=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},i0=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 iR(0),0];if(1==s){var a=new iR(i[0].s+1);return a[i[0].s]=1,[a,1]}i.sort(function(e,t){return e.f-t.f}),i.push({s:-1,f:25001});var o=i[0],l=i[1],c=0,u=1,h=2;for(i[0]={s:-1,f:o.f+l.f,l:o,r:l};u!=s-1;)o=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:o.f+l.f,l:o,r:l};var d=n[0].s;for(r=1;r<s;++r)n[r].s>d&&(d=n[r].s);var p=new iC(d+1),g=i1(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 iR(p),g]},i1=function(e,t,i){return -1==e.s?Math.max(i1(e.l,t,i+1),i1(e.r,t,i+1)):t[e.s]=i},i2=function(e){for(var t=e.length;t&&!e[--t];);for(var i=new iC(++t),r=0,s=e[0],n=1,a=function(e){i[r++]=e},o=1;o<=t;++o)if(e[o]==s&&o!=t)++n;else{if(!s&&n>2){for(;n>138;n-=138)a(32754);n>2&&(a(n>10?n-11<<5|28690:n-3<<5|12305),n=0)}else if(n>3){for(a(s),--n;n>6;n-=6)a(8304);n>2&&(a(n-3<<5|8208),n=0)}for(;n--;)a(s);n=1,s=e[o]}return[i.subarray(0,r),t]},i3=function(e,t){for(var i=0,r=0;r<t.length;++r)i+=e[r]*t[r];return i},i5=function(e,t,i){var r=i.length,s=iJ(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)},i8=function(e,t,i,r,s,n,a,o,l,c,u){iZ(t,u++,i),++s[256];for(var h=i0(s,15),d=h[0],p=h[1],g=i0(n,15),_=g[0],v=g[1],f=i2(d),m=f[0],y=f[1],b=i2(_),w=b[0],E=b[1],x=new iC(19),S=0;S<m.length;++S)x[31&m[S]]++;for(S=0;S<w.length;++S)x[31&w[S]]++;for(var k=i0(x,7),P=k[0],$=k[1],I=19;I>4&&!P[iL[I-1]];--I);var F,O,R,C,T=c+5<<3,A=i3(s,iV)+i3(n,iz)+a,M=i3(s,d)+i3(n,_)+a+14+3*I+i3(x,P)+(2*x[16]+3*x[17]+7*x[18]);if(T<=A&&T<=M)return i5(t,u,e.subarray(l,l+c));if(iZ(t,u,1+(M<A)),u+=2,M<A){F=iW(d,p,0),O=d,R=iW(_,v,0),C=_;var L=iW(P,$,0);for(iZ(t,u,y-257),iZ(t,u+5,E-1),iZ(t,u+10,I-4),u+=14,S=0;S<I;++S)iZ(t,u+3*S,P[iL[S]]);u+=3*I;for(var D=[m,w],N=0;N<2;++N){var j=D[N];for(S=0;S<j.length;++S){var q=31&j[S];iZ(t,u,L[q]),u+=P[q],q>
115&&(iZ(t,u,j[S]>>>5&127),u+=j[S]>>>12)}}}else F=iX,O=iV,R=iY,C=iz;for(S=0;S<o;++S)if(r[S]>255){iQ(t,u,F[(q=r[S]>>>18&31)+257]),u+=O[q+257],q>7&&(iZ(t,u,r[S]>>>23&31),u+=iA[q]);var U=31&r[S];iQ(t,u,R[U]),u+=C[U],U>3&&(iQ(t,u,r[S]>>>5&8191),u+=iM[U])}else iQ(t,u,F[r[S]]),u+=O[r[S]];return iQ(t,u,F[256]),u+O[256]},i6=new iT([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),i4=function(){for(var e=new iT(256),t=0;t<256;++t){for(var i=t,r=9;--r;)i=(1&i&&0xedb88320)^i>>>1;e[t]=i}return e}(),i7=function(e,t,i){for(;i;++t)e[t]=i,i>>>=8},i9=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 a=e.charCodeAt(s),o=null;a<128?i++:o=a>127&&a<2048?String.fromCharCode(a>>6|192,63&a|128):String.fromCharCode(a>>12|224,a>>6&63|128,63&a|128),L(o)||(i>t&&(n+=e.substring(t,i)),n+=o,t=i=s+1)}return i>t&&(n+=e.substring(t,e.length)),n},re=!!d||!!h,rt="text/plain",ri=(e,t)=>{var[i,r]=e.split("?"),s=y({},t);null==r||r.split("&").forEach(e=>{var[t]=e.split("=");delete s[t]});var n=tq(s);return i+"?"+(n=n?(r?r+"&":"")+n:r)},rr=(e,t)=>JSON.stringify(e,(e,t)=>"bigint"==typeof t?t.toString():t,t),rs=e=>{var{data:t,compression:i}=e;if(t){if(i===tD.GZipJS){var r=new Blob([function(e,t){void 0===t&&(t={});var i=(s=0xffffffff,{p:function(e){for(var t=s,i=0;i<e.length;++i)t=i4[255&t^e[i]]^t>>>8;s=t},d:function(){return 0xffffffff^s}}),r=e.length;i.p(e);var s,n,a,o,l=(n=t,a=10+((o=t).filename&&o.filename.length+1||0),function(e,t,i,r,s,n){var a=e.length,o=new iR(r+
1a+5*(1+Math.floor(a/7e3))+8),l=o.subarray(r,o.length-s),c=0;if(!t||a<8)for(var u=0;u<=a;u+=65535){var h=u+65535;h<a?c=i5(l,c,e.subarray(u,h)):(l[u]=n,c=i5(l,c,e.subarray(u,a)))}else{for(var d=i6[t-1],p=d>>>13,g=8191&d,_=(1<<i)-1,v=new iC(32768),f=new iC(_+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 iT(25e3),E=new iC(288),x=new iC(32),S=0,k=0,P=(u=0,0),$=0,I=0;u<a;++u){var F=b(u),O=32767&u,R=f[F];if(v[O]=R,f[F]=O,$<=u){var C=a-u;if((S>7e3||P>24576)&&C>423){c=i8(e,l,0,w,E,x,k,P,I,u-I,c),P=S=k=0,I=u;for(var T=0;T<286;++T)E[T]=0;for(T=0;T<30;++T)x[T]=0}var A=2,M=0,L=g,D=O-R&32767;if(C>2&&F==b(u-D))for(var N=Math.min(p,C)-1,j=Math.min(32767,u),q=Math.min(258,C);D<=j&&--L&&O!=R;){if(e[u+A]==e[u+A-D]){for(var U=0;U<q&&e[u+U]==e[u+U-D];++U);if(U>A){if(A=U,M=D,U>N)break;var H=Math.min(D,U-2),B=0;for(T=0;T<H;++T){var G=u-D+T+32768&32767,W=G-v[G]+32768&32767;W>B&&(B=W,R=G)}}}D+=(O=R)-(R=v[O])+32768&32767}if(M){w[P++]=0x10000000|iq[A]<<18|iU[M];var V=31&iq[A],z=31&iU[M];k+=iA[V]+iM[z],++E[257+V],++x[z],$=u+A,++S}else w[P++]=e[u],++E[e[u]]}}c=i8(e,l,n,w,E,x,k,P,I,u-I,c)}return iK(o,0,r+iJ(c)+s)}(e,null==n.level?6:n.level,null==n.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+n.mem,a,8,!0)),c=l.length;return 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&&i7(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)}}(l,t),i7(l,c-8,i.d()),i7(l,c-4,r),l}(function(e,t){var i=e.length;if("undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e);for(var r=new iR(e.length+(e.length>>>1)),s=0,n=function(e){r[s++]=e},a=0;a<i;++a){if(s+5>r.length){var o=new iR(s+8+(i-a<<1));o.set(r),r=o}var l=e.charCodeAt(a);l<128?n(l):(l<2048?n(192|l>>>6):(l>55295&&l<57344?(n(240|(l=65536+(1047552&l)|1023&e.charCodeAt(++a))>>>18),n(128|l>>>12&63)):n(224|l>>>12),n(128|l>>>6&63)),n(128|63&l))}return iK(r,0,s)}(rr(t)),{mtime:0})],{type:rt});return{contentType:rt,body:r,estimatedSize:r.size}}if(i===tD.Base64){var s=(e=>"data="+encodeURIComponent("string"==typeof e?e:rr(e)))(function(e){var t,i,r,s,n,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=0,l=0,c="",u=[];if(!e)return e;e=i9(e);do t=(n=e.charCodeAt(o++)<<16|e.charCodeAt(o++)<<8|e.charCodeAt(o++))>>18&63,i=n>>12&63,r=n>>6&63,s=63&n,u[l++]=a.charAt(t)+a.charAt(i)+a.charAt(r)+a.charAt(s);while(o<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}(rr(t)));return{contentType:"application/x-www-form-urlencoded",body:s,estimatedSize:new Blob([s]).size}}var n=rr(t);return{contentType:"application/json",body:n,estimatedSize:new Blob([n]).size}}},rn=[];h&&rn.push({transport:"fetch",method:e=>{var t,i,{contentType:r,body:s,estimatedSize:n}=null!=(t=rs(e))?t:{},a=new Headers;eF(e.headers,function(e,t){a.append(t,e)}),r&&a.append("Content-Type",r);var o=e.url,l=null;if(p){var c=new p;l={signal:c.signal,timeout:setTimeout(()=>c.abort(),e.timeout)}}h(o,y({method:(null==e?void 0:e.method)||"GET",headers:a,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){ex.error(e)}null==e.callback||e.callback(r)})).catch(t=>{ex.error(t),null==e.callback||e.callback({statusCode:0,text:t})}).finally(()=>l?clearTimeout(l.timeout):null)}}),d&&rn.push({transport:"XHR",method:e=>{var t,i=new d;i.open(e.method||"GET",e.url,!0);var{contentType:r,body:s}=null!=(t=rs(e))?t:{};eF(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!=l&&l.sendBeacon&&rn.push({transport:"sendBeacon",method:e=>{var t=ri(e.url,{beacon:"1"});try{var i,{contentType:r,body:s}=null!=(i=rs(e))?i:{},n="string"==typeof s?new Blob([s],{type:r}):s;l.sendBeacon(t,n)}catch(e){}}});var ra=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 ro(e,t,i){return rr({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:i})}var rl={exact:(e,t)=>
1t.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=>ra(t,e))),not_regex:(e,t)=>t.every(t=>e.every(e=>!ra(t,e))),icontains:(e,t)=>t.map(rc).some(t=>e.map(rc).some(e=>t.includes(e))),not_icontains:(e,t)=>t.map(rc).every(t=>e.map(rc).every(e=>!t.includes(e)))},rc=e=>e.toLowerCase(),ru=eS("[Error tracking]");class rh{constructor(e){var t,i;this.Gt=[],this.Vt=new eu([new eh,new ew,new ep,new ed,new ey,new em,new e_,new eb],[en,el]),this._instance=e,this.Gt=null!=(t=null==(i=this._instance.persistence)?void 0:i.get_property(eW))?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.Gt=s,this._instance.persistence&&this._instance.persistence.register({[eW]:this.Gt,[eV]:n})}get Jt(){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.Vt.buildFromUnknown(e,{syntheticException:null==t?void 0:t.syntheticException,mechanism:{handled:null==t?void 0:t.handled}})}sendExceptionEvent(e){if(this.Kt(e))ru.info("Skipping exception capture because a suppression rule matched");else{if(this.Jt||!this.Yt(e))return this._instance.capture("$exception",e,{_noTruncate:!0,_batchKey:"exceptionEvent"});ru.info("Skipping exception capture because it was thrown by an extension")}}Kt(e){var t=e.$exception_list;if(!t||!F(t)||0===t.length)return!1;var i=t.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.Gt.some(e=>{var t=e.values.map(e=>{var t,r=rl[e.operator],s=F(e.value)?e.value:[e.value],n=null!=(t=i[e.key])?t:[];return s.length>0&&r(s,n)});return"OR"===e.type?t.some(Boolean):t.every(Boolean)})}Yt(e){var t=e.$exception_list;return!(!t||!F(t))&&t.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://"))}}var rd="Mobile",rp="Android",rg="Tablet",r_=rp+" "+rg,rv="iPad",rf="Apple",rm=rf+" Watch",ry="Safari",rb="BlackBerry",rw="Samsung",rE=rw+"Browser",rx=rw+" Internet",rS="Chrome",rk=rS+" OS",rP=rS+" iOS",r$="Internet Explorer",rI=r$+" "+rd,rF="Opera",rO=rF+" Mini",rR="Edge",rC="Microsoft "+rR,rT="Firefox",rA=rT+" iOS",rM="Nintendo",rL="PlayStation",rD="Xbox",rN=rp+" "+rd,rj=rd+" "+ry,rq="Windows",rU=rq+" Phone",rH="Nokia",rB="Ouya",rG="Generic",rW=rG+" "+rd.toLowerCase(),rV=rG+" "+rg.toLowerCase(),rz="Konqueror",rX="(\\d+(\\.\\d+)?)",rY=RegExp("Version/"+rX),rJ=RegExp(rD,"i"),rK=RegExp(rL+" \\w+","i"),rZ=RegExp(rM+" \\w+","i"),rQ=RegExp(rb+"|PlayBook|BB10","i"),r0={"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"},r1=(e,t)=>t&&E(t,rf)||function(e){return E(e,ry)&&!E(e,rS)&&!E(e,rp)}(e),r2=function(e,t){return t=t||"",E(e," OPR/")&&E(e,"Mini")?rO:E(e," OPR/")?rF:rQ.test(e)?rb:E(e,"IE"+rd)||E(e,"WPDesktop")?rI:E(e,rE)?rx:E(e,rR)||E(e,"Edg/")?rC:E(e,"FBIOS")?"Facebook "+rd:E(e,"UCWEB")||E(e,"UCBrowser")?"UC Browser":E(e,"CriOS")?rP:E(e,"CrMo")||E(e,rS)?rS:E(e,rp)&&E(e,ry)?rN:E(e,"FxiOS")?rA:E(e.toLowerCase(),rz.toLowerCase())?rz:r1(e,t)?E(e,rd)?rj:ry:E(e,rT)?rT:E(e,"MSIE")||E(e,"Trident/")?r$:E(e,"Gecko")?rT:""},r3={[rI]:[RegExp("rv:"+rX)],[rC]:[RegExp(rR+"?\\/"+rX)],[rS]:[RegExp("("+rS+"|CrMo)\\/"+rX)],[rP]:[RegExp("CriOS\\/"+rX)],"UC Browser":[RegExp("(UCBrowser|UCWEB)\\/"+rX)],[ry]:[rY],[rj]:[rY],[rF]:[RegExp("(Opera|OPR)\\/"+rX)],[rT]:[RegExp(rT+"\\/"+rX)],[rA]:[RegExp("FxiOS\\/"+rX)],[rz]:[RegExp("Konqueror[:/]?"+rX,"i")],[rb]:[RegExp(rb+" "+rX),rY],[rN]:[RegExp("android\\s"+rX,"i")],[rx]:[RegExp(rE+"\\/"+rX)],[r$]:[RegExp("(rv:|MSIE )"+rX)],Mozilla:[RegExp("rv:"+rX)]},r5=function(e,t){var i=r3[r2(e,t)];if(T(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},r8=[[RegExp(rD+"; "+rD+" (.*?)[);]","i"),e=>[rD,e&&e[1]||""]],[RegExp(rM,"i"),[rM,""]],[RegExp(rL,"i"),[rL,""]],[rQ,[rb,""]],[RegExp(rq,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[rU,""];if(new RegExp(rd).test(t)&&!/IEMobile\b/.test(t))return[rq+" "+rd,""];var i=/Windows NT ([0-9.]+)/i.exec(t);if(i&&i[1]){var r=r0[i[1]]||"";return/arm/i.test(t)&&(r="RT"),[rq,r]}return[rq,""]}],[/((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=T(e[2])?e[3]:e[2]),["watchOS",t]}],[RegExp("("+rp+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+rp+")","i"),e=>e&&e[2]?[rp,[e[2],e[3],e[4]||"0"].join(".")]:[rp,""]],[/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/,[rk,""]],[/Linux|debian/i,["Linux",""]]],r6=function(e){return rZ.test(e)?rM:rK.test(e)?rL:rJ.test(e)?rD:RegExp(rB,"i").test(e)?rB:RegExp("("+rU+"|WPDesktop)","i").test(e)?rU:/iPad/.test(e)?rv:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?rm:rQ.test(e)?rb:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":RegExp(rH,"i").test(e)?rH:/(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(rd).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)?rp:r_:rp:RegExp("(pda|"+rd+")","i").test(e)?rW:
1RegExp(rg,"i").test(e)&&!RegExp(rg+" pc","i").test(e)?rV:""},r4="https?://(.*)",r7=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],r9=eR(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],r7),se="<masked>",st=["li_fat_id"];function si(e,t,i){if(!c)return{};var r,s=t?eR([],r7,i||[]):[],n=sr(tH(c.URL,s,se),e);return eO((r={},eF(st,function(e){var t=t3.J(e);r[e]=t||null}),r),n)}function sr(e,t){var i=r9.concat(t||[]),r={};return eF(i,function(t){var i=tU(e,t);r[t]=i||null}),r}function ss(e){var t=e?0===e.search(r4+"google.([^/?]*)")?"google":0===e.search(r4+"bing.com")?"bing":0===e.search(r4+"yahoo.com")?"yahoo":0===e.search(r4+"duckduckgo.com")?"duckduckgo":null:null,i={};if(!L(t)){i.$search_engine=t;var r=c?tU(c.referrer,"yahoo"!=t?"q":"p"):"";r.length&&(i.ph_keyword=r)}return i}function sn(){return navigator.language||navigator.userLanguage}function sa(){return(null==c?void 0:c.referrer)||"$direct"}function so(e,t){var i=e?eR([],r7,t||[]):[],r=null==u?void 0:u.href.substring(0,1e3);return{r:sa().substring(0,1e3),u:r?tH(r,i,se):void 0}}function sl(e){var t,{r:i,u:r}=e,s={$referrer:i,$referring_domain:null==i?void 0:"$direct"==i?"$direct":null==(t=tj(i))?void 0:t.host};if(r){s.$current_url=r;var n=tj(r);s.$host=null==n?void 0:n.host,s.$pathname=null==n?void 0:n.pathname,eO(s,sr(r))}return i&&eO(s,ss(i)),s}function sc(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}}var su=eS("[FeatureFlags]"),sh="$active_feature_flags",sd="$override_feature_flags",sp="$feature_flag_payloads",sg="$override_feature_flag_payloads",s_="$feature_flag_request_id",sv=e=>{var t={};for(var[i,r]of eC(e||{}))r&&(t[i]=r);return t},sf=e=>{var t=e.flags;return t?(e.featureFlags=Object.fromEntries(Object.keys(t).map(e=>{var i;return[e,null!=(i=t[e].variant)?i:t[e].enabled]})),e.featureFlagPayloads=Object.fromEntries(Object.keys(t).filter(e=>t[e].enabled).filter(e=>{var i;return null==(i=t[e].metadata)?void 0:i.payload}).map(e=>{var i;return[e,null==(i=t[e].metadata)?void 0:i.payload]}))):su.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),e},sm=function(e){return e.FeatureFlags="feature_flags",e.Recordings="recordings",e}({});class sy{constructor(e){this.Xt=!1,this.Qt=!1,this.Zt=!1,this.ti=!1,this.ii=!1,this.ei=!1,this.ri=!1,this._instance=e,this.featureFlagEventHandlers=[]}si(){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||su.error("Invalid evaluation environment found:",e,"Expected non-empty string"),t}):[]}ni(){return this.si().length>0}flags(){if(this._instance.config.__preview_remote_config)this.ei=!0;else{var e=!this.oi&&(this._instance.config.advanced_disable_feature_flags||this._instance.config.advanced_disable_feature_flags_on_first_load);this.ai({disableFlags:e})}}get hasLoadedFlags(){return this.Qt}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var e=this._instance.get_property(e1),t=this._instance.get_property(sd),i=this._instance.get_property(sg);if(!i&&!t)return e||{};var r=eO({},e||{});for(var s of[...new Set([...Object.keys(i||{}),...Object.keys(t||{})])]){var n,a,o=r[s],l=null==t?void 0:t[s],c=T(l)?null!=(n=null==o?void 0:o.enabled)&&n:!!l,u=T(l)?o.variant:"string"==typeof l?l:void 0,h=null==i?void 0:i[s],d=y({},o,{enabled:c,variant:c?null!=u?u:null==o?void 0:o.variant:void 0});c!==(null==o?void 0:o.enabled)&&(d.original_enabled=null==o?void 0:o.enabled),u!==(null==o?void 0:o.variant)&&(d.original_variant=null==o?void 0:o.variant),h&&(d.metadata=y({},null==o?void 0:o.metadata,{payload:h,original_payload:null==o||null==(a=o.metadata)?void 0:a.payload})),r[s]=d}return this.Xt||(su.warn(" Overriding feature flag details!",{flagDetails:e,overriddenPayloads:i,finalDetails:r}),this.Xt=!0),r}getFlagVariants(){var e=this._instance.get_property(eQ),t=this._instance.get_property(sd);if(!t)return e||{};for(var i=eO({},e),r=Object.keys(t),s=0;s<r.length;s++)i[r[s]]=t[r[s]];return this.Xt||(su.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:i}),this.Xt=!0),i}getFlagPayloads(){var e=this._instance.get_property(sp),t=this._instance.get_property(sg);if(!t)return e||{};for(var i=eO({},e||{}),r=Object.keys(t),s=0;s<r.length;s++)i[r[s]]=t[r[s]];return this.Xt||(su.warn(" Overriding feature flag payloads!",{flagPayloads:e,overriddenPayloads:t,finalPayloads:i}),this.Xt=!0),i}reloadFeatureFlags(){this.ti||this._instance.config.advanced_disable_feature_flags||this.oi||(this.oi=setTimeout(()=>{this.ai()},5))}li(){clearTimeout(this.oi),this.oi=void 0}ensureFlagsLoaded(){this.Qt||this.Zt||this.oi||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this.ti=e}ai(e){var t;if(this.li(),!this._instance.L())if(this.Zt)this.ii=!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:y({},(null==(t=this._instance.persistence)?void 0:t.get_initial_props())||{},this._instance.get_property(e2)||{}),group_properties:this._instance.get_property(e3)};(null!=e&&e.disableFlags||this._instance.config.advanced_disable_feature_flags)&&(i.disable_flags=!0),this.ni()&&(i.evaluation_environments=this.si());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("api",(r?"/flags/?v=2":"/flags/?v=2&config=true")+s);r&&(i.timezone=sc()),this.Zt=!0,this._instance.ui({method:"POST",url:n,data:i,compression:this._instance.config.disable_compression?void 0:tD.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:e=>{var t,r,s,n=!0;200===e.statusCode&&(this.ii||(this.$anon_distinct_id=void 0),n=!1),this.Zt=!1,this.ei||(this.ei=!0,this._instance.hi(null!=(s=e.json)?s:{})),(!i.disable_flags||this.ii)&&((this.ri=!n,e.json&&null!=(r=e.json.quotaLimited)&&r.includes(sm.FeatureFlags))?su.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.ii&&(this.ii=!1,this.ai())))}})}}getFeatureFlag(e,t){if(void 0===t&&(t={}),this.Qt||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(e6)||{};if((t.send_event||!("send_event"in t))&&(!(e in n)||!n[e].includes(r))){F(n[e])?n[e].push(r):n[e]=[r],null==(l=this._instance.persistence)||l.register({[e6]:n}
1);var a=this.getFeatureFlagDetails(e),o={$feature_flag:e,$feature_flag_response:i,$feature_flag_payload:this.getFeatureFlagPayload(e)||null,$feature_flag_request_id:s,$feature_flag_bootstrapped_response:(null==(c=this._instance.config.bootstrap)||null==(c=c.featureFlags)?void 0:c[e])||null,$feature_flag_bootstrapped_payload:(null==(u=this._instance.config.bootstrap)||null==(u=u.featureFlagPayloads)?void 0:u[e])||null,$used_bootstrap_value:!this.ri};T(null==a||null==(h=a.metadata)?void 0:h.version)||(o.$feature_flag_version=a.metadata.version);var l,c,u,h,d,p,g,_,v,f,m=null!=(d=null==a||null==(p=a.reason)?void 0:p.description)?d:null==a||null==(g=a.reason)?void 0:g.code;m&&(o.$feature_flag_reason=m),null!=a&&null!=(_=a.metadata)&&_.id&&(o.$feature_flag_id=a.metadata.id),T(null==a?void 0:a.original_variant)&&T(null==a?void 0:a.original_enabled)||(o.$feature_flag_original_response=T(a.original_variant)?a.original_enabled:a.original_variant),null!=a&&null!=(v=a.metadata)&&v.original_payload&&(o.$feature_flag_original_payload=null==a||null==(f=a.metadata)?void 0:f.original_payload),this._instance.capture("$feature_flag_called",o)}return i}su.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.ni()&&(r.evaluation_environments=this.si()),this._instance.ui({method:"POST",url:this._instance.requestRouter.endpointFor("api","/flags/?v=2&config=true"),data:r,compression:this._instance.config.disable_compression?void 0:tD.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.Qt||this.getFlags()&&this.getFlags().length>0){var i=this.getFeatureFlag(e,t);return T(i)?void 0:!!i}su.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.Qt=!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=sf(e),a=n.flags,o=n.featureFlags,l=n.featureFlagPayloads;if(o){var c=e.requestId;if(F(o)){su.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var u={};if(o)for(var h=0;h<o.length;h++)u[o[h]]=!0;t&&t.register({[sh]:o,[eQ]:u})}else{var d=o,p=l,g=a;e.errorsWhileComputingFlags&&(d=y({},i,d),p=y({},r,p),g=y({},s,g)),t&&t.register(y({[sh]:Object.keys(sv(d)),[eQ]:d||{},[sp]:p||{},[e1]:g||{}},c?{[s_]:c}:{}))}}}(e,this._instance.persistence,i,r,s),this.di(t)}}override(e,t){void 0===t&&(t=!1),su.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:e,suppressWarning:t})}overrideFeatureFlags(e){if(!this._instance.__loaded||!this._instance.persistence)return su.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(!1===e)return this._instance.persistence.unregister(sd),this._instance.persistence.unregister(sg),void this.di();if(e&&"object"==typeof e&&("flags"in e||"payloads"in e)){var t;if(this.Xt=!!(null!=(t=e.suppressWarning)&&t),"flags"in e){if(!1===e.flags)this._instance.persistence.unregister(sd);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})}return"payloads"in e&&(!1===e.payloads?this._instance.persistence.unregister(sg):e.payloads&&this._instance.persistence.register({[sg]:e.payloads})),void this.di()}this.di()}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.Qt){var{flags:t,flagVariants:i}=this.vi();e(t,i)}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,t,i){var r,s=(this._instance.get_property(e0)||[]).find(t=>t.flagKey===e),n={["$feature_enrollment/"+e]:t},a={$feature_flag:e,$feature_enrollment:t,$set:n};s&&(a.$early_access_feature_name=s.name),i&&(a.$feature_enrollment_stage=i),this._instance.capture("$feature_enrollment_update",a),this.setPersonPropertiesForFlags(n,!1);var o=y({},this.getFlagVariants(),{[e]:t});null==(r=this._instance.persistence)||r.register({[sh]:Object.keys(sv(o)),[eQ]:o}),this.di()}getEarlyAccessFeatures(e,t,i){void 0===t&&(t=!1);var r=this._instance.get_property(e0),s=i?"&"+i.map(e=>"stage="+e).join("&"):"";if(r&&!t)return e(r);this._instance.ui({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(e0),null==(r=this._instance.persistence)||r.register({[e0]:s}),e(s)}}})}vi(){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),{})}}di(e){var{flags:t,flagVariants:i}=this.vi();
vendor: 5,439 bytes, line 1
1this.featureFlagEventHandlers.forEach(r=>r(t,i,{errorsLoading:e}))}setPersonPropertiesForFlags(e,t){void 0===t&&(t=!0);var i=this._instance.get_property(e2)||{};this._instance.register({[e2]:y({},i,e)}),t&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister(e2)}setGroupPropertiesForFlags(e,t){void 0===t&&(t=!0);var i=this._instance.get_property(e3)||{};0!==Object.keys(i).length&&Object.keys(i).forEach(t=>{i[t]=y({},i[t],e[t]),delete e[t]}),this._instance.register({[e3]:y({},i,e)}),t&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){var t=this._instance.get_property(e3)||{};this._instance.register({[e3]:y({},t,{[e]:{}})})}else this._instance.unregister(e3)}reset(){this.Qt=!1,this.Zt=!1,this.ti=!1,this.ii=!1,this.ei=!1,this.ri=!1,this.$anon_distinct_id=void 0,this.li(),this.Xt=!1}}var sb=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"];class sw{constructor(e,t){this.A=e,this.props={},this.ci=!1,this.fi=(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.it=this.pi(e),this.load(),e.debug&&ex.info("Persistence loaded",e.persistence,y({},this.props)),this.update_config(e,e,t),this.save()}isDisabled(){return!!this.gi}pi(e){-1===sb.indexOf(e.persistence.toLowerCase())&&(ex.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var t=e.persistence.toLowerCase();return"localstorage"===t&&t8.G()?t8:"localstorage+cookie"===t&&t4.G()?t4:"sessionstorage"===t&&it.G()?it:"memory"===t?t9:"cookie"===t?t3:t4.G()?t4:t3}properties(){var e={};return eF(this.props,function(t,i){if(i===eQ&&R(t))for(var r,s=Object.keys(t),n=0;n<s.length;n++)e["$feature/"+s[n]]=t[s[n]];else r=!1,(L(ta)?r:o&&ta.indexOf===o?-1!=ta.indexOf(i):(eF(ta,function(e){if(r||(r=e===i))return e$}),r))||(e[i]=t)}),e}load(){if(!this.gi){var e=this.it.K(this.fi);e&&(this.props=eO({},e))}}save(){this.gi||this.it.Y(this.fi,this.props,this.mi,this.yi,this.bi,this.A.debug)}remove(){this.it.X(this.fi,!1),this.it.X(this.fi,!0)}clear(){this.remove(),this.props={}}register_once(e,t,i){if(R(e)){T(t)&&(t="None"),this.mi=T(i)?this.wi:i;var r=!1;if(eF(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(R(e)){this.mi=T(t)?this.wi:t;var i=!1;if(eF(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.ci){var e=si(this.A.custom_campaign_params,this.A.mask_personal_data_properties,this.A.custom_personal_data_properties);C(eM(e))||this.register(e),this.ci=!0}}update_search_keyword(){var e;this.register((e=null==c?void 0:c.referrer)?ss(e):{})}update_referrer_info(){var e;this.register_once({$referrer:sa(),$referring_domain:null!=c&&c.referrer&&(null==(e=tj(c.referrer))?void 0:e.host)||"$direct"},void 0)}set_initial_person_info(){this.props[te]||this.props[tt]||this.register_once({[ti]:so(this.A.mask_personal_data_properties,this.A.custom_personal_data_properties)},void 0)}get_initial_props(){var e={};eF([tt,te],t=>{var i=this.props[t];i&&eF(i,function(t,i){e["$initial_"+S(i)]=t})});var t,i,r=this.props[ti];return r&&eO(e,(t=sl(r),i={},eF(t,function(e,t){i["$initial_"+S(t)]=e}),i)),e}safe_merge(e){return eF(this.props,function(t,i){i in e||(e[i]=t)}),e}update_config(e,t,i){if(this.wi=this.mi=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.pi(e),s=this.props;this.clear(),this.it=r,this.props=s,this.save()}}set_disabled(e){this.gi=e,this.gi?this.remove():this.save()}set_cross_subdomain(e){e!==this.yi&&(this.yi=e,this.remove(),this.save())}set_secure(e){e!==this.bi&&(this.bi=e,this.remove(),this.save())}set_event_timer(e,t){var i=this.props[eU]||{};i[e]=t,this.props[eU]=i,this.save()}remove_event_timer(e){var t=(this.props[eU]||{})[e];return T(t)||(delete this.props[eU][e],this.save()),t}get_property(e){return this.props[e]}set_property(e,t){this.props[e]=t,this.save()}}var sE=function(e){return e.Button="button",e.Tab="tab",e.Selector="selector",e}({}),sx=function(e){return e.TopLeft="top_left",e.TopRight="top_right",e.TopCenter="top_center",e.MiddleLeft="middle_left",e.MiddleRight="middle_right",e.MiddleCenter="middle_center",e.Left="left",e.Center="center",e.Right="right",e.NextToTrigger="next_to_trigger",e}({}),sS=function(e){return e.Popover="popover",e.API="api",e.Widget="widget",e.ExternalSurvey="external_survey",e}({}),sk=function(e){return e.Open="open",e.MultipleChoice="multiple_choice",e.SingleChoice="single_choice",e.Rating="rating",e.Link="link",e}({}),sP=function(e){return e.NextQuestion="next_question",e.End="end",e.ResponseBased="response_based",e.SpecificQuestion="specific_question",e}({}),s$=function(e){return e.Once="once",e.Recurring="recurring",e.Always="always",e}({}),sI=function(e){return e.SHOWN="survey shown",e.DISMISSED="survey dismissed",e.SENT="survey sent",e}({}),sF=function(e){return e.SURVEY_ID="$survey_id",e.SURVEY_NAME="$survey_name",e.SURVEY_RESPONSE="$survey_response",e.SURVEY_ITERATION="$survey_iteration",e.SURVEY_ITERATION_
1START_DATE="$survey_iteration_start_date",e.SURVEY_PARTIALLY_COMPLETED="$survey_partially_completed",e.SURVEY_SUBMISSION_ID="$survey_submission_id",e.SURVEY_QUESTIONS="$survey_questions",e.SURVEY_COMPLETED="$survey_completed",e}({}),sO=function(e){return e.Popover="popover",e.Inline="inline",e}({});class sR{constructor(){this.Si={},this.Si={}}on(e,t){return this.Si[e]||(this.Si[e]=[]),this.Si[e].push(t),()=>{this.Si[e]=this.Si[e].filter(e=>e!==t)}}emit(e,t){for(var i of this.Si[e]||[])i(t);for(var r of this.Si["*"]||[])r(e,t)}}class sC{constructor(e){this.xi=new sR,this.Ei=(e,t)=>this.$i(e,t)&&this.ki(e,t)&&this.Pi(e,t),this.$i=(e,t)=>null==t||!t.event||(null==e?void 0:e.event)===(null==t?void 0:t.event),this._instance=e,this.Ii=new Set,this.Ri=new Set}init(){var e,t;T(null==(e=this._instance)?void 0:e.Ti)||null==(t=this._instance)||t.Ti((e,t)=>{this.on(e,t)})}register(e){var t,i;if(!T(null==(t=this._instance)?void 0:t.Ti)&&(e.forEach(e=>{var t,i;null==(t=this.Ri)||t.add(e),null==(i=e.steps)||i.forEach(e=>{var t;null==(t=this.Ii)||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.Ii.has(e)||this.Ii.has(null==t?void 0:t.event))&&this.Ri&&(null==(i=this.Ri)?void 0:i.size)>0&&this.Ri.forEach(e=>{this.Ci(t,e)&&this.xi.emit("actionCaptured",e.name)})}Oi(e){this.onAction("actionCaptured",t=>e(t))}Ci(e,t){if(null==(null==t?void 0:t.steps))return!1;for(var i of t.steps)if(this.Ei(e,i))return!0;return!1}onAction(e,t){return this.xi.on(e,t)}ki(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.Fi(r,null==t?void 0:t.url,(null==t?void 0:t.url_matching)||"contains"))return!1}return!0}static Fi(e,t,i){switch(i){case"regex":return!!r&&ra(e,t);case"exact":return t===e;case"contains":return ra(e,sC.Mi(t).replace(/_/g,".").replace(/%/g,".*"));default:return!1}}static Mi(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}Pi(e,t){if((null!=t&&t.href||null!=t&&t.tag_name||null!=t&&t.text)&&!this.Ai(e).some(e=>!(null!=t&&t.href&&!sC.Fi(e.href||"",null==t?void 0:t.href,(null==t?void 0:t.href_matching)||"exact"))&&(null==t||!t.tag_name||e.tag_name===(null==t?void 0:t.tag_name))&&!(null!=t&&t.text&&!sC.Fi(e.text||"",null==t?void 0:t.text,(null==t?void 0:t.text_matching)||"exact")&&!sC.Fi(e.$el_text||"",null==t?void 0:t.text,(null==t?void 0:t.text_matching)||"exact"))))return!1;if(null!=t&&t.selector){var i,r=null==e||null==(i=e.properties)?void 0:i.$element_selectors;if(!r||!r.includes(null==t?void 0:t.selector))return!1}return!0}Ai(e){return null==(null==e?void 0:e.properties.$elements)?[]:null==e?void 0:e.properties.$elements}}var sT=eS("[Surveys]"),sA="seenSurvey_",sM=(e,t)=>{var i="$survey_"+t+"/"+e.id;return e.current_iteration&&e.current_iteration>0&&(i="$survey_"+t+"/"+e.id+"/"+e.current_iteration),i},sL=e=>{var t=""+sA+e.id;return e.current_iteration&&e.current_iteration>0&&(t=""+sA+e.id+"_"+e.current_iteration),t},sD=[sS.Popover,sS.Widget,sS.API],sN={ignoreConditions:!1,ignoreDelay:!1,displayType:sO.Popover};class sj{constructor(e){this._instance=e,this.ji=new Map,this.Di=new Map}register(e){var t;T(null==(t=this._instance)?void 0:t.Ti)||(this.Li(e),this.Ni(e))}Ni(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.Ui&&(this.Ui=new sC(this._instance),this.Ui.init(),this.Ui.Oi(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.Ui)||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.Di.get(t.name);i&&i.push(e.id),this.Di.set(t.name,i||[e.id])}}))}))}Li(e){var t;0!==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}).length&&(null==(t=this._instance)||t.Ti((e,t)=>{this.onEvent(e,t)}
1),e.forEach(e=>{var t;null==(t=e.conditions)||null==(t=t.events)||null==(t=t.values)||t.forEach(t=>{if(t&&t.name){var i=this.ji.get(t.name);i&&i.push(e.id),this.ji.set(t.name,i||[e.id])}})}))}onEvent(e,t){var i,r,s=(null==(i=this._instance)||null==(i=i.persistence)?void 0:i.props[e8])||[];if(sI.SHOWN===e&&t&&s.length>0){sT.info("survey event matched, removing survey from activated surveys",{event:e,eventPayload:t,existingActivatedSurveys:s});var n,a=null==t||null==(n=t.properties)?void 0:n.$survey_id;if(a){var o=s.indexOf(a);o>=0&&(s.splice(o,1),this.zi(s))}}else if(this.ji.has(e)){sT.info("survey event name matched",{event:e,eventPayload:t,surveys:this.ji.get(e)});var l=[];null==(r=this._instance)||r.getSurveys(t=>{l=t.filter(t=>{var i;return null==(i=this.ji.get(e))?void 0:i.includes(t.id)})});var c=l.filter(i=>{var r,s=null==(r=i.conditions)||null==(r=r.events)||null==(r=r.values)?void 0:r.find(t=>t.name===e);return!!s&&(!s.propertyFilters||Object.entries(s.propertyFilters).every(e=>{var i,[r,s]=e,n=null==t||null==(i=t.properties)?void 0:i[r];if(T(n)||L(n))return!1;var a=[String(n)],o=rl[s.operator];return o?o(s.values,a):(sT.warn("Unknown property comparison operator: "+s.operator),!1)}))});this.zi(s.concat(c.map(e=>e.id)||[]))}}onAction(e){var t,i=(null==(t=this._instance)||null==(t=t.persistence)?void 0:t.props[e8])||[];this.Di.has(e)&&this.zi(i.concat(this.Di.get(e)||[]))}zi(e){var t;sT.info("updating activated surveys",{activatedSurveys:e}),null==(t=this._instance)||null==(t=t.persistence)||t.register({[e8]:[...new Set(e)]})}getSurveys(){var e;return(null==(e=this._instance)||null==(e=e.persistence)?void 0:e.props[e8])||[]}getEventToSurveys(){return this.ji}Hi(){return this.Ui}}class sq{constructor(e){this.Bi=void 0,this._surveyManager=null,this.qi=!1,this.Wi=!1,this.Gi=[],this._instance=e,this._surveyEventReceiver=null}onRemoteConfig(e){if(!this._instance.config.disable_surveys){var t=e.surveys;if(D(t))return sT.warn("Flags not loaded yet. Not loading surveys.");var i=F(t);this.Bi=i?t.length>0:t,sT.info("flags response received, isSurveysEnabled: "+this.Bi),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.Wi)sT.info("Already initializing surveys, skipping...");else if(this._instance.config.disable_surveys)sT.info("Disabled. Not loading surveys.");else if(this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())sT.info("Not loading surveys in cookieless mode without consent.");else{var e=null==_?void 0:_.__PosthogExtensions__;if(e){if(!T(this.Bi)||this._instance.config.advanced_enable_surveys){var t=this.Bi||this._instance.config.advanced_enable_surveys;this.Wi=!0;try{var i=e.generateSurveys;if(i)return void this.Vi(i,t);var r=e.loadExternalDependency;if(!r)return void this.Ji("PostHog loadExternalDependency extension not found.");r(this._instance,"surveys",i=>{i||!e.generateSurveys?this.Ji("Could not load surveys script",i):this.Vi(e.generateSurveys,t)})}catch(e){throw this.Ji("Error initializing surveys",e),e}finally{this.Wi=!1}}}else sT.error("PostHog Extensions not found.")}}Vi(e,t){this._surveyManager=e(this._instance,t),this._surveyEventReceiver=new sj(this._instance),sT.info("Surveys loaded successfully"),this.Ki({isLoaded:!0})}Ji(e,t){sT.error(e,t),this.Ki({isLoaded:!1,error:e})}onSurveysLoaded(e){return this.Gi.push(e),this._surveyManager&&this.Ki({isLoaded:!0}),()=>{this.Gi=this.Gi.filter(t=>t!==e)}}getSurveys(e,t){if(void 0===t&&(t=!1),this._instance.config.disable_surveys)return sT.info("Disabled. Not loading surveys."),e([]);var i=this._instance.get_property(e5);if(i&&!t)return e(i,{isLoaded:!0});if(this.qi)return e([],{isLoaded:!1,error:"Surveys are already being loaded"});try{this.qi=!0,this._instance.ui({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.qi=!1;var i=t.statusCode;if(200!==i||!t.json){var r="Surveys API could not be loaded, status: "+i;return sT.error(r),e([],{isLoaded:!1,error:r})}var s,n,a=t.json.surveys||[],o=a.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 o.length>0&&(null==(n=this._surveyEventReceiver)||n.register(o)),null==(s=this._instance.persistence)||s.register({[e5]:a}),e(a,{isLoaded:!0})}})}catch(e){throw this.qi=!1,e}}
vendor: 5,915 bytes, line 1
1Ki(e){for(var t of this.Gi)try{if(!e.isLoaded)return t([],e);this.getSurveys(t)}catch(e){sT.error("Error in survey callback",e)}}getActiveMatchingSurveys(e,t){if(void 0===t&&(t=!1),!D(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,t);sT.warn("init was not called")}Yi(e){var t=null;return this.getSurveys(i=>{var r;t=null!=(r=i.find(t=>t.id===e))?r:null}),t}Xi(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.Yi(e):e;return t?this._surveyManager.checkSurveyEligibility(t):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(e){if(D(this._surveyManager))return sT.warn("init was not called"),{visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"};var t=this.Xi(e);return{visible:t.eligible,disabledReason:t.reason}}canRenderSurveyAsync(e,t){return D(this._surveyManager)?(sT.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.Xi(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))sT.warn("init was not called");else{var r="string"==typeof e?this.Yi(e):e;if(null!=r&&r.id)if(sD.includes(r.type)){var s=null==c?void 0:c.querySelector(t);if(s)return null!=(i=r.appearance)&&i.surveyPopupDelaySeconds?(sT.info("Rendering survey "+r.id+" with delay of "+r.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout(()=>{var e,t;sT.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),sT.info("Survey "+r.id+" rendered")},1e3*r.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(r,s);sT.warn("Survey element not found")}else sT.warn("Surveys of type "+r.type+" cannot be rendered in the app");else sT.warn("Survey not found")}}displaySurvey(e,t){var i;if(D(this._surveyManager))sT.warn("init was not called");else{var r=this.Yi(e);if(r){var s=r;if(null!=(i=r.appearance)&&i.surveyPopupDelaySeconds&&t.ignoreDelay&&(s=y({},r,{appearance:y({},r.appearance,{surveyPopupDelaySeconds:0})})),!1===t.ignoreConditions){var n=this.canRenderSurvey(r);if(!n.visible)return void sT.warn("Survey is not eligible to be displayed: ",n.disabledReason)}t.displayType!==sO.Inline?this._surveyManager.handlePopoverSurvey(s):this.renderSurvey(s,t.selector)}else sT.warn("Survey not found")}}}var sU=eS("[RateLimiter]");class sH{constructor(e){var t,i;this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=e=>{var t=e.text;if(t&&t.length)try{(JSON.parse(t).quota_limited||[]).forEach(e=>{sU.info((e||"events")+" is quota limited."),this.serverLimits[e]=(new Date).getTime()+6e4})}catch(e){return void sU.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(e9))?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 a=n.tokens<1;return a||e||(n.tokens=Math.max(0,n.tokens-1)),!a||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=a,null==(r=this.instance.persistence)||r.set_property(e9,n),{isRateLimited:a,remainingTokens:n.tokens}}isServerRateLimited(e){var t=this.serverLimits[e||"events"]||!1;return!1!==t&&(new Date).getTime()<t}}var sB=eS("[RemoteConfig]");class sG{constructor(e){this._instance=e}get remoteConfig(){var e;return null==(e=_._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.config}Qi(e){var t,i;null!=(t=_.__PosthogExtensions__)&&t.loadExternalDependency?null==(i=_.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"remote-config",()=>e(this.remoteConfig)):(sB.error("PostHog Extensions not found. Cannot load remote config."),e())}Zi(e){this._instance.ui({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 sB.info("Using preloaded remote config",this.remoteConfig),void this.hi(this.remoteConfig);if(this._instance.L())return void sB.warn("Remote config is disabled. Falling back to local config.");this.Qi(e=>{if(!e)return sB.info("No config found after loading remote JS config. Falling back to JSON."),void this.Zi(e=>{this.hi(e)});this.hi(e)})}catch(e){sB.error("Error loading remote config",e)}}hi(e){e?this._instance.config.__preview_remote_config?(this._instance.hi(e),!1!==e.hasFeatureFlags&&this._instance.featureFlags.ensureFlagsLoaded()):sB.info("__preview_remote_config is disabled. Logging config instead",e):sB.error("Failed to fetch remote config from PostHog.")}}class sW{constructor(e,t){this.te=!0,this.ie=[],this.ee=X((null==t?void 0:t.flush_interval_ms)||3e3,250,5e3,ex.createLogger("flush interval"),3e3),this.re=e}
1enqueue(e){this.ie.push(e),this.se||this.ne()}unload(){this.oe();var e=Object.values(this.ie.length>0?this.ae():{});[...e.filter(e=>0===e.url.indexOf("/e")),...e.filter(e=>0!==e.url.indexOf("/e"))].map(e=>{this.re(y({},e,{transport:"sendBeacon"}))})}enable(){this.te=!1,this.ne()}ne(){var e=this;this.te||(this.se=setTimeout(()=>{if(this.oe(),this.ie.length>0){var t=this.ae();for(var i in t)!function(){var r=t[i],s=(new Date).getTime();r.data&&F(r.data)&&eF(r.data,e=>{e.offset=Math.abs(e.timestamp-s),delete e.timestamp}),e.re(r)}()}},this.ee))}oe(){clearTimeout(this.se),this.se=void 0}ae(){var e={};return eF(this.ie,t=>{var i,r=(t?t.batchKey:null)||t.url;T(e[r])&&(e[r]=y({},t,{data:[]})),null==(i=e[r].data)||i.push(t.data)}),this.ie=[],e}}var sV=["retriesPerformedSoFar"];class sz{constructor(e){this.le=!1,this.ue=3e3,this.ie=[],this._instance=e,this.ie=[],this.he=!0,!T(r)&&"onLine"in r.navigator&&(this.he=r.navigator.onLine,eN(r,"online",()=>{this.he=!0,this.jt()}),eN(r,"offline",()=>{this.he=!1}))}get length(){return this.ie.length}retriableRequest(e){var{retriesPerformedSoFar:t}=e,i=b(e,sV);N(t)&&t>0&&(i.url=ri(i.url,{retry_count:t})),this._instance.ui(y({},i,{callback:e=>{200!==e.statusCode&&(e.statusCode<400||e.statusCode>=500)&&(null!=t?t:0)<10?this.de(y({retriesPerformedSoFar:t},i)):null==i.callback||i.callback(e)}}))}de(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)),a=Date.now()+n;this.ie.push({retryAt:a,requestOptions:e});var o="Enqueued failed request for retry in "+n;navigator.onLine||(o+=" (Browser is offline)"),ex.warn(o),this.le||(this.le=!0,this.ve())}ve(){this.ce&&clearTimeout(this.ce),this.ce=setTimeout(()=>{this.he&&this.ie.length>0&&this.jt(),this.ve()},this.ue)}jt(){var e=Date.now(),t=[],i=this.ie.filter(i=>i.retryAt<e||(t.push(i),!1));if(this.ie=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.ie))try{this._instance.ui(y({},e,{transport:"sendBeacon"}))}catch(e){ex.error(e)}this.ie=[]}}class sX{constructor(e){this.fe=()=>{this.pe||(this.pe={});var e,t,i,r,s=this.scrollElement(),n=this.scrollY(),a=s?Math.max(0,s.scrollHeight-s.clientHeight):0,o=n+((null==s?void 0:s.clientHeight)||0),l=(null==s?void 0:s.scrollHeight)||0;this.pe.lastScrollY=Math.ceil(n),this.pe.maxScrollY=Math.max(n,null!=(e=this.pe.maxScrollY)?e:0),this.pe.maxScrollHeight=Math.max(a,null!=(t=this.pe.maxScrollHeight)?t:0),this.pe.lastContentY=o,this.pe.maxContentY=Math.max(o,null!=(i=this.pe.maxContentY)?i:0),this.pe.maxContentHeight=Math.max(l,null!=(r=this.pe.maxContentHeight)?r:0)},this._instance=e}getContext(){return this.pe}resetContext(){var e=this.pe;return setTimeout(this.fe,0),e}startMeasuringScrollPosition(){eN(r,"scroll",this.fe,{capture:!0}),eN(r,"scrollend",this.fe,{capture:!0}),eN(r,"resize",this.fe)}scrollElement(){if(!this._instance.config.scroll_root_selector)return null==r?void 0:r.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 t=null==r?void 0:r.document.querySelector(e);if(t)return t}}scrollY(){if(this._instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollTop||0}return r&&(r.scrollY||r.pageYOffset||r.document.documentElement.scrollTop)||0}scrollX(){if(this._instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollLeft||0}return r&&(r.scrollX||r.pageXOffset||r.document.documentElement.scrollLeft)||0}}var sY=e=>so(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.ge=e=>{var t=this._e();if(!t||t.sessionId!==e){var i={sessionId:e,props:this.me(this._instance)};this.ye.register({[e7]:i})}},this._instance=e,this.be=t,this.ye=i,this.me=r||sY,this.be.onSessionId(this.ge)}_e(){return this.ye.props[e7]}getSetOnceProps(){var e,t=null==(e=this._e())?void 0:e.props;return t?"r"in t?sl(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 eF(eM(this.getSetOnceProps()),(t,i)=>{"$current_url"===i&&(i="url"),e["$session_entry_"+S(i)]=t}),e}}var sK=eS("[SessionId]");class sZ{on(e,t){return this.we.on(e,t)}constructor(e,t,i){if(this.Se=[],this.we=new sR,this.xe=(e,t)=>Math.abs(e-t)>
1this.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.A=e.config,this.ye=e.persistence,this.Ee=void 0,this.$e=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.ke=t||tQ,this.Pe=i||tQ;var r,s=this.A.persistence_name||this.A.token,n=this.A.session_idle_timeout_seconds||1800;if(this._sessionTimeoutMs=1e3*X(n,60,36e3,sK.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.Ie(),this.Re="ph_"+s+"_window_id",this.Te="ph_"+s+"_primary_window_exists",this.Ce()){var a=it.K(this.Re),o=it.K(this.Te);a&&!o?this.Ee=a:it.X(this.Re),it.Y(this.Te,!0)}if(null!=(r=this.A.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.A.bootstrap.sessionID);this.Oe(this.A.bootstrap.sessionID,(new Date).getTime(),l)}catch(e){sK.error("Invalid sessionID in bootstrap",e)}this.Fe()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return T(this.Se)&&(this.Se=[]),this.Se.push(e),this.$e&&e(this.$e,this.Ee),()=>{this.Se=this.Se.filter(t=>t!==e)}}Ce(){return"memory"!==this.A.persistence&&!this.ye.gi&&it.G()}Me(e){e!==this.Ee&&(this.Ee=e,this.Ce()&&it.Y(this.Re,e))}Ae(){return this.Ee?this.Ee:this.Ce()?it.K(this.Re):null}Oe(e,t,i){e===this.$e&&t===this._sessionActivityTimestamp&&i===this._sessionStartTimestamp||(this._sessionStartTimestamp=i,this._sessionActivityTimestamp=t,this.$e=e,this.ye.register({[eK]:[t,e,i]}))}je(){if(this.$e&&this._sessionActivityTimestamp&&this._sessionStartTimestamp)return[this._sessionActivityTimestamp,this.$e,this._sessionStartTimestamp];var e=this.ye.props[eK];return F(e)&&2===e.length&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.Oe(null,null,null)}Fe(){eN(r,"beforeunload",()=>{this.Ce()&&it.X(this.Te)},{capture:!1})}checkAndGetSessionAndWindowId(e,t){if(void 0===e&&(e=!1),void 0===t&&(t=null),"always"===this.A.cookieless_mode)throw Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var i=t||(new Date).getTime(),[r,s,n]=this.je(),a=this.Ae(),o=N(n)&&n>0&&Math.abs(i-n)>864e5,l=!1,c=!s,u=!e&&this.xe(i,r);c||u||o?(s=this.ke(),a=this.Pe(),sK.info("new session ID generated",{sessionId:s,windowId:a,changeReason:{noSessionId:c,activityTimeout:u,sessionPastMaximumLength:o}}),n=i,l=!0):a||(a=this.Pe(),l=!0);var h=0===r||!e||o?i:r,d=0===n?(new Date).getTime():n;return this.Me(a),this.Oe(s,h,d),e||this.Ie(),l&&this.Se.forEach(e=>e(s,a,l?{noSessionId:c,activityTimeout:u,sessionPastMaximumLength:o}:void 0)),{sessionId:s,windowId:a,sessionStartTimestamp:d,changeReason:l?{noSessionId:c,activityTimeout:u,sessionPastMaximumLength:o}:void 0,lastActivityTimestamp:r}}Ie(){clearTimeout(this.De),this.De=setTimeout(()=>{var[e]=this.je();if(this.xe((new Date).getTime(),e)){var t=this.$e;this.resetSessionId(),this.we.emit("forcedIdleReset",{idleSessionId:t})}},1.1*this.sessionTimeoutMs)}}var sQ=["$set_once","$set"],s0=eS("[SiteApps]");class s1{constructor(e){this._instance=e,this.Le=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}Ne(e,t){if(t){var i=this.globalsForEvent(t);this.Le.push(i),this.Le.length>1e3&&(this.Le=this.Le.slice(10))}}get siteAppLoaders(){var e;return null==(e=_._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.siteApps}init(){if(this.isEnabled){var e=this._instance.Ti(this.Ne.bind(this));this.Ue=()=>{e(),this.Le=[],this.Ue=void 0}}}globalsForEvent(e){if(!e)throw Error("Event payload is required");var t,i,r,s,n,a,o,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:y({},b(e,sQ),{properties:y({},e.properties,p?{$set:y({},null!=(t=null==(i=e.properties)?void 0:i.$set)?t:{},p)}:{},d?{$set_once:y({},null!=(r=null==(s=e.properties)?void 0:s.$set_once)?r:{},d)}:{}),elements_chain:null!=(n=null==(a=e.properties)?void 0:a.$elements_chain)?n:"",distinct_id:null==(o=e.properties)?void 0:o.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.Le.length&&(s0.info("Processing "+this.Le.length+" events for site app with id "+e.id),this.Le.forEach(e
vendor: 4,497 bytes, line 1
1=>null==t.processEvent?void 0:t.processEvent(e)),t.processedBuffer=!0),Object.values(this.apps).every(e=>e.processedBuffer||e.errored)&&(null==(i=this.Ue)||i.call(this))},r=!1,s=s=>{t.errored=!s,t.loaded=!0,s0.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){s0.error("Error while initializing PostHog app with config id "+e.id,t),s(!1)}if(r&&t.loaded)try{i()}catch(i){s0.error("Error while processing buffered events PostHog app with config id "+e.id,i),t.errored=!0}}ze(){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)}He(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){s0.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.ze(),void this._instance.on("eventCaptured",e=>this.He(e))):void s0.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if(null==(i=this.Ue)||i.call(this),null!=(r=e.siteApps)&&r.length)if(this.isEnabled){var n=function(e){var t;_["__$$ph_site_app_"+e]=s._instance,null==(t=_.__PosthogExtensions__)||null==t.loadSiteApp||t.loadSiteApp(s._instance,o,t=>{if(t)return s0.error("Error while initializing PostHog app with config id "+e,t)})};for(var{id:a,url:o}of e.siteApps)n(a)}else s0.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}var s2=["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"],s3=function(e,t){if(!e)return!1;var i=e.toLowerCase();return s2.concat(t||[]).some(e=>{var t=e.toLowerCase();return -1!==i.indexOf(t)})},s5=function(e,t){if(!e)return!1;var i=e.userAgent;if(i&&s3(i,t))return!0;try{var r=null==e?void 0:e.userAgentData;if(null!=r&&r.brands&&r.brands.some(e=>s3(null==e?void 0:e.brand,t)))return!0}catch(e){}return!!e.webdriver},s8=function(e){return e.US="us",e.EU="eu",e.CUSTOM="custom",e}({}),s6="i.posthog.com";class s4{constructor(e){this.Be={},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 uiHost(){var e,t=null==(e=this.instance.config.ui_host)?void 0:e.replace(/\/$/,"");return t||(t=this.apiHost.replace("."+s6,".posthog.com")),"https://app.posthog.com"===t?"https://us.posthog.com":t}get region(){return this.Be[this.apiHost]||(/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.Be[this.apiHost]=s8.US:/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.Be[this.apiHost]=s8.EU:this.Be[this.apiHost]=s8.CUSTOM),this.Be[this.apiHost]}endpointFor(e,t){if(void 0===t&&(t=""),t&&(t="/"===t[0]?t:"/"+t),"ui"===e)return this.uiHost+t;if(this.region===s8.CUSTOM)return this.apiHost+t;var i=s6+t;switch(e){case"assets":return"https://"+this.region+"-assets."+i;case"api":return"https://"+this.region+"."+i}}}var s7={icontains:(e,t)=>!!r&&t.href.toLowerCase().indexOf(e.toLowerCase())>-1,not_icontains:(e,t)=>!!r&&-1===t.href.toLowerCase().indexOf(e.toLowerCase()),regex:(e,t)=>!!r&&ra(t.href,e),not_regex:(e,t)=>!!r&&!ra(t.href,e),exact:(e,t)=>
1t.href===e,is_not:(e,t)=>t.href!==e};class s9{constructor(e){var t=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(e){void 0===e&&(e=!1),t.getWebExperiments(e=>{s9.qe("retrieved web experiments from the server"),t.We=new Map,e.forEach(e=>{if(e.feature_flag_key){t.We&&(s9.qe("setting flag key ",e.feature_flag_key," to web experiment ",e),null==(i=t.We)||i.set(e.feature_flag_key,e));var i,r=t._instance.getFeatureFlag(e.feature_flag_key);A(r)&&e.variants[r]&&t.Ge(e.name,r,e.variants[r].transforms)}else if(e.variants)for(var s in e.variants){var n=e.variants[s];s9.Ve(n)&&t.Ge(e.name,s,n.transforms)}})},e)},this._instance=e,this._instance.onFeatureFlags(e=>{this.onFeatureFlags(e)})}onFeatureFlags(e){if(this._is_bot())s9.qe("Refusing to render web experiment since the viewer is a likely bot");else if(!this._instance.config.disable_web_experiments){if(D(this.We))return this.We=new Map,this.loadIfEnabled(),void this.previewWebExperiment();s9.qe("applying feature flags",e),e.forEach(e=>{var t;if(this.We&&null!=(t=this.We)&&t.has(e)){var i,r=this._instance.getFeatureFlag(e),s=null==(i=this.We)?void 0:i.get(e);r&&null!=s&&s.variants[r]&&this.Ge(s.name,r,s.variants[r].transforms)}})}}previewWebExperiment(){var e=s9.getWindowLocation();if(null!=e&&e.search){var t=tU(null==e?void 0:e.search,"__experiment_id"),i=tU(null==e?void 0:e.search,"__experiment_variant");t&&i&&(s9.qe("previewing web experiments "+t+" && "+i),this.getWebExperiments(e=>{this.Je(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.ui({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([])})}Je(e,t,i){var r=i.filter(t=>t.id===e);r&&r.length>0&&(s9.qe("Previewing web experiment ["+r[0].name+"] with variant ["+t+"]"),this.Ge(r[0].name,t,r[0].variants[t].transforms))}static Ve(e){return!D(e.conditions)&&s9.Ke(e)&&s9.Ye(e)}static Ke(e){if(D(e.conditions)||D(null==(t=e.conditions)?void 0:t.url))return!0;var t,i,r,s,n=s9.getWindowLocation();return!!n&&(null==(i=e.conditions)||!i.url||s7[null!=(r=null==(s=e.conditions)?void 0:s.urlMatchType)?r:"icontains"](e.conditions.url,n))}
vendor: 8,329 bytes, line 1
1static getWindowLocation(){return null==r?void 0:r.location}static Ye(e){if(D(e.conditions)||D(null==(i=e.conditions)?void 0:i.utm))return!0;var t=si();if(t.utm_source){var i,r,s,n,a,o,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==(a=e.conditions)||null==(a=a.utm)?void 0:a.utm_source)==t.utm_source,p=null==(o=e.conditions)||null==(o=o.utm)||!o.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 qe(e){for(var t=arguments.length,i=Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];ex.info("[WebExperiments] "+e,i)}Ge(e,t,i){this._is_bot()?s9.qe("Refusing to render web experiment since the viewer is a likely bot"):"control"!==t?i.forEach(i=>{if(i.selector){s9.qe("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)})}}):s9.qe("Control variants leave the page unmodified.")}_is_bot(){return l&&this._instance?s5(l,this._instance.config.custom_blocked_useragents):void 0}}var ne=eS("[PostHog ExternalIntegrations]"),nt={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class ni{constructor(e){this._instance=e}nt(e,t){var i;null==(i=_.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,e,e=>{if(e)return ne.error("failed to load script",e);t()})}startIfEnabledOrStop(){var e,t=this,i=function(e){var i,r,n;!s||null!=(i=_.__PosthogExtensions__)&&null!=(i=i.integrations)&&i[e]||t.nt(nt[e],()=>{var i;null==(i=_.__PosthogExtensions__)||null==(i=i.integrations)||null==(i=i[e])||i.start(t._instance)}),!s&&null!=(r=_.__PosthogExtensions__)&&null!=(r=r.integrations)&&r[e]&&(null==(n=_.__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 nr="[SessionRecording]",ns=eS(nr);class nn{get started(){var e;return!(null==(e=this.Xe)||!e.isStarted)}get status(){return this.Xe?this.Xe.status:this.Qe&&!this.Ze?"disabled":"lazy_loading"}constructor(e){if(this._forceAllowLocalhostNetworkCapture=!1,this.Qe=!1,this.tr=void 0,this._instance=e,!this._instance.sessionManager)throw ns.error("started without valid sessionManager"),Error(nr+" started without valid sessionManager. This is a bug.");if("always"===this._instance.config.cookieless_mode)throw Error(nr+' cannot be used with cookieless_mode="always"')}get Ze(){var e,t=!(null==(e=this._instance.get_property(eJ))||!e.enabled),i=!this._instance.config.disable_session_recording,s=this._instance.config.disable_session_recording||this._instance.consent.isOptedOut();return r&&t&&i&&!s}startIfEnabledOrStop(e){var t;if(!this.Ze||null==(t=this.Xe)||!t.isStarted){var i=!T(Object.assign)&&!T(Array.from);this.Ze&&i?(this.ir(e),ns.info("starting")):this.stopRecording()}}ir(e){var t,i,r;this.Ze&&(null!=_&&null!=(t=_.__PosthogExtensions__)&&null!=(t=t.rrweb)&&t.record&&null!=(i=_.__PosthogExtensions__)&&i.initSessionRecording?this.er(e):null==(r=_.__PosthogExtensions__)||null==r.loadExternalDependency||r.loadExternalDependency(this._instance,this.rr,t=>{if(t)return ns.error("could not load recorder",t);this.er(e)}))}stopRecording(){var e,t;null==(e=this.tr)||e.call(this),this.tr=void 0,null==(t=this.Xe)||t.stop()}sr(){var e;null==(e=this._instance.persistence)||e.unregister(eZ)}nr(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.sr();var n=null==t?void 0:t.minimumDurationMilliseconds;r.register({[eJ]:y({enabled:!!t},t,{networkPayloadCapture:y({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:T(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.tr)||t.call(this),this.tr=null==(i=this._instance.sessionManager)?void 0:i.onSessionId(s)}}onRemoteConfig(e){"sessionRecording"in e?!1!==e.sessionRecording?(this.nr(e),this.Qe=!0,this.startIfEnabledOrStop()):this.Qe=!0:ns.info("skipping remote config with no sessionRecording",e)}log(e,t){var i;void 0===t&&(t="log"),null!=(i=this.Xe)&&i.log?this.Xe.log(e,t):ns.warn("log called before recorder was ready")}get rr(){var e,t,i=null==(e=this._instance)||null==(e=e.persistence)?void 0:e.get_property(eJ);return(null==i||null==(t=i.scriptConfig)?void 0:t.script)||"lazy-recorder"}er(e){var t,i;if(null==(t=_.__PosthogExtensions__)||!t.initSessionRecording)throw Error("Called on script loaded before session recording is available");this.Xe||(this.Xe=null==(i=_.__PosthogExtensions__)?void 0:i.initSessionRecording(this._instance),this.Xe._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),this.Xe.start(e)}onRRwebEmit(e){var t;null==(t=this.Xe)||null==t.onRRwebEmit||t.onRRwebEmit(e)}overrideLinkedFlag(){var e;null==(e=this.Xe)||e.overrideLinkedFlag()}overrideSampling(){var e;null==(e=this.Xe)||e.overrideSampling()}overrideTrigger(e){var t;null==(t=this.Xe)||t.overrideTrigger(e)}get sdkDebugProperties(){var e;return(null==(e=this.Xe)?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(e,t){var i;return!(null==(i=this.Xe)||!i.tryAddCustomEvent(e,t))}}var na={},no=()=>{},nl="posthog",nc=!re&&-1===(null==g?void 0:g.indexOf("MSIE"))&&-1===(null==g?void 0:g.indexOf("Mozilla")),nu=e=>{var t;return{api_host:"https://us.i.posthog.com",ui_host:null,token:"",autocapture:!0,rageclick:!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 eL)if(i===r)return!1;return!0}(null==c?void 0:c.location),persistence:"localStorage+cookie",persistence_name:"",loaded:no,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageview:"2025-05-24"!==e||"history_change",capture_pageleave:"if_capture_pageview",defaults:null!=e?e:"unset",debug:u&&A(null==u?void 0:u.search)&&-1!==u.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_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:"https:"===(null==r||null==(t=r.location)?void 0:t.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,session_recording:{},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;ex.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:no,__preview_eager_load_replay:!1}},nh=e=>{var t={};T(e.process_person)||(t.person_profiles=e.process_person),T(e.xhr_headers)||(t.request_headers=e.x
1hr_headers),T(e.cookie_name)||(t.persistence_name=e.cookie_name),T(e.disable_cookie)||(t.disable_persistence=e.disable_cookie),T(e.store_google)||(t.save_campaign_params=e.store_google),T(e.verbose)||(t.debug=e.verbose);var i=eO({},t,e);return F(e.property_blacklist)&&(T(e.property_denylist)?i.property_denylist=e.property_blacklist:F(e.property_denylist)?i.property_denylist=[...e.property_blacklist,...e.property_denylist]:ex.error("Invalid value for property_denylist config: "+e.property_denylist)),i};class nd{constructor(){this.__forceAllowLocalhost=!1}get ar(){return this.__forceAllowLocalhost}set ar(e){ex.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}class np{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 nd,this.lr=!1,this.version=v.LIB_VERSION,this.ur=new sR,this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=nu(),this.SentryIntegration=iv,this.sentryIntegration=e=>(function(e,t){var i=i_(e,t);return{name:ig,processEvent:e=>i(e)}})(this,e),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.hr=!1,this.dr=null,this.vr=null,this.cr=null,this.featureFlags=new sy(this),this.toolbar=new iE(this),this.scrollManager=new sX(this),this.pageViewManager=new iO(this),this.surveys=new sq(this),this.experiments=new s9(this),this.exceptions=new rh(this),this.rateLimiter=new sH(this),this.requestRouter=new s4(this),this.consent=new ir(this),this.externalIntegrations=new ni(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=>ex.info('send "'+(null==e?void 0:e.event)+'"',e))}init(e,t,i){if(i&&i!==nl){var r,s=null!=(r=na[i])?r:new np;return s._init(e,t,i),na[i]=s,na[nl][i]=s,s}return this._init(e,t,i)}_init(e,t,i){if(void 0===t&&(t={}),T(e)||M(e))return ex.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 ex.warn("You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},this.pr=t,this.gr=[],t.person_profiles&&(this.vr=t.person_profiles),this.set_config(eO({},nu(t.defaults),nh(t),{name:i,token:e})),this.config.on_xhr_error&&ex.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=t.disable_compression?void 0:tD.GZipJS;var s=this._r();this.persistence=new sw(this.config,s),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new sw(y({},this.config,{persistence:"sessionStorage"}),s);var n=y({},this.persistence.props),a=y({},this.sessionPersistence.props);this.register({$initialization_time:(new Date).toISOString()}),this.mr=new sW(e=>this.yr(e),this.config.request_queue_config),this.br=new sz(this),this.__request_queue=[];var o="always"===this.config.cookieless_mode||"on_reject"===this.config.cookieless_mode&&this.consent.isExplicitlyOptedOut();if(o||(this.sessionManager=new sZ(this),this.sessionPropsManager=new sJ(this,this.sessionManager,this.persistence)),new iS(this).startIfEnabledOrStop(),this.siteApps=new s1(this),null==(l=this.siteApps)||l.init(),o||(this.sessionRecording=new nn(this),this.sessionRecording.startIfEnabledOrStop()),this.config.disable_scroll_properties||this.scrollManager.startMeasuringScrollPosition(),this.autocapture=new tV(this),this.autocapture.startIfEnabled(),this.surveys.loadIfEnabled(),this.heatmaps=new iF(this),this.heatmaps.startIfEnabled(),this.webVitalsAutocapture=new iP(this),this.exceptionObserver=new iu(this),this.exceptionObserver.startIfEnabled(),this.deadClicksAutocapture=new il(this,io),this.deadClicksAutocapture.startIfEnabled(),this.historyAutocapture=new id(this),this.historyAutocapture.startIfEnabled(),v.DEBUG=v.DEBUG||this.config.debug,v.DEBUG&&ex.info("Starting in debug mode",{this:this,config:t,thisC:y({},this.config),p:n,s:a}
vendor: 5,070 bytes, line 1
1),void 0!==(null==(c=t.bootstrap)?void 0:c.distinctID)){var l,c,u,h,d=this.config.get_device_id(tQ()),p=null!=(u=t.bootstrap)&&u.isIdentifiedID?d:t.bootstrap.distinctID;this.persistence.set_property(e4,null!=(h=t.bootstrap)&&h.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:t.bootstrap.distinctID,$device_id:p})}if(this.wr()){var g,_,f=Object.keys((null==(g=t.bootstrap)?void 0:g.featureFlags)||{}).filter(e=>{var i;return!(null==(i=t.bootstrap)||null==(i=i.featureFlags)||!i[e])}).reduce((e,i)=>{var r;return e[i]=(null==(r=t.bootstrap)||null==(r=r.featureFlags)?void 0:r[i])||!1,e},{}),m=Object.keys((null==(_=t.bootstrap)?void 0:_.featureFlagPayloads)||{}).filter(e=>f[e]).reduce((e,i)=>{var r,s;return null!=(r=t.bootstrap)&&null!=(r=r.featureFlagPayloads)&&r[i]&&(e[i]=null==(s=t.bootstrap)||null==(s=s.featureFlagPayloads)?void 0:s[i]),e},{});this.featureFlags.receivedFeatureFlags({featureFlags:f,featureFlagPayloads:m})}if(o)this.register_once({distinct_id:tn,$device_id:null},"");else if(!this.get_distinct_id()){var b=this.config.get_device_id(tQ());this.register_once({distinct_id:b,$device_id:b},""),this.persistence.set_property(e4,"anonymous")}return eN(r,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),this.toolbar.maybeLoadToolbar(),t.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()||tQ();e.config.get_device_id=r,i.id()&&(e.register({distinct_id:i.id(),$device_id:r()}),e.persistence.set_property(e4,"identified")),t()},s=i.user();"then"in s&&O(s.then)?s.then(e=>r(e)):r(s)}(e,()=>{var r;i.register((Promise&&Promise.resolve||ip.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()||(ip.info("No userId set, resetting PostHog"),e.reset()),t.event.userId&&t.event.userId!==e.get_distinct_id()&&(ip.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.Sr()):this.Sr(),O(this.config._onCapture)&&this.config._onCapture!==no&&(ex.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",e=>this.config._onCapture(e.event,e))),this.config.ip&&ex.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}hi(e){var t,i,r,s,n,a,o,l;if(!c||!c.body)return ex.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout(()=>{this.hi(e)},500);this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=E(e.supportedCompression,tD.GZipJS)?tD.GZipJS:E(e.supportedCompression,tD.Base64)?tD.Base64:void 0),null!=(t=e.analytics)&&t.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),this.set_config({person_profiles:this.vr?this.vr:"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),null==(a=this.webVitalsAutocapture)||a.onRemoteConfig(e),null==(o=this.exceptionObserver)||o.onRemoteConfig(e),this.exceptions.onRemoteConfig(e),null==(l=this.deadClicksAutocapture)||l.onRemoteConfig(e)}Sr(){try{this.config.loaded(this)}catch(e){ex.critical("`loaded` function failed",e)}this.Er(),this.config.capture_pageview&&setTimeout(()=>{(this.consent.isOptedIn()||"always"===this.config.cookieless_mode)&&this.$r()},1),new sG(this).load(),this.featureFlags.flags()}Er(){var e;this.is_capturing()&&this.config.request_batching&&(null==(e=this.mr)||e.enable())}_dom_loaded(){this.is_capturing()&&eI(this.__request_queue,e=>this.yr(e)),this.__request_queue=[],this.Er()}_handle_unload(){var e,t;this.config.request_batching?(this.kr()&&this.capture("$pageleave"),null==(e=this.mr)||e.unload(),null==(t=this.br)||t.unload()):this.kr()&&this.capture("$pageleave",null,{transport:"sendBeacon"})}ui(e){this.__loaded&&(nc?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)||(e.transport=e.transport||this.config.api_transport,e.url=ri(e.url,{ip:+!!this.config.ip}),e.headers=y({},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,
1(e=>{var t,i,r,s=y({},e);s.timeout=s.timeout||6e4,s.url=ri(s.url,{_:(new Date).getTime().toString(),ver:v.LIB_VERSION,compression:s.compression});var n=null!=(t=s.transport)?t:"fetch",a=rn.filter(e=>!s.disableTransport||!e.transport||!s.disableTransport.includes(e.transport)),o=null!=(i=null==(r=eD(a,e=>e.transport===n))?void 0:r.method)?i:a[0].method;if(!o)throw Error("No available transport method");o(s)})(y({},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)}}))))}yr(e){this.br?this.br.retriableRequest(e):this.ui(e)}_execute_array(e){var t,i=[],r=[],s=[];eI(e,e=>{e&&(F(t=e[0])?s.push(e):O(e)?e.call(this):F(e)&&"alias"===t?i.push(e):F(e)&&-1!==t.indexOf("capture")&&O(this[t])?s.push(e):r.push(e))});var n=function(e,t){eI(e,function(e){if(F(e[0])){var i=t;eF(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)}wr(){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.mr){if(this.is_capturing())if(!T(e)&&A(e)){if(this.config.opt_out_useragent_filter||!this._is_bot()){var s=null!=i&&i.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(null==s||!s.isRateLimited){null!=t&&t.$current_url&&!A(null==t?void 0:t.$current_url)&&(ex.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 n,a,o,l,c=new Date,u=(null==i?void 0:i.timestamp)||c,h=tQ(),d={uuid:h,event:e,properties:this.calculateEventProperties(e,t||{},u,h)};s&&(d.properties.$lib_rate_limit_remaining_tokens=s.remainingTokens),(null==i?void 0:i.$set)&&(d.$set=null==i?void 0:i.$set);var p,g=this.Pr(null==i?void 0:i.$set_once);if(g&&(d.$set_once=g),(n=d,a=null!=i&&i._noTruncate?null:this.config.properties_string_max_length,o=e=>A(e)&&!L(a)?e.slice(0,a):e,l=new Set,d=function e(t,i){var r;return t!==Object(t)?o?o(t,i):t:l.has(t)?void 0:(l.add(t),F(t)?(r=[],eI(t,t=>{r.push(e(t))})):(r={},eF(t,(t,i)=>{l.has(t)||(r[i]=e(t,i))})),r)}(n)).timestamp=u,T(null==i?void 0:i.timestamp)||(d.properties.$event_time_override_provided=!0,d.properties.$event_time_override_system_time=c),e===sI.DISMISSED||e===sI.SENT){var _=null==t?void 0:t[sF.SURVEY_ID],v=null==t?void 0:t[sF.SURVEY_ITERATION];p={id:_,current_iteration:v},localStorage.getItem(sL(p))||localStorage.setItem(sL(p),"true"),d.$set=y({},d.$set,{[sM({id:_,current_iteration:v},e===sI.SENT?"responded":"dismissed")]:!0})}var f=y({},d.properties.$set,d.$set);if(C(f)||this.setPersonPropertiesForFlags(f),!D(this.config.before_send)){var m=this.Ir(d);if(!m)return;d=m}this.ur.emit("eventCaptured",d);var b={method:"POST",url:null!=(r=null==i?void 0:i._url)?r:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:d,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.yr(b):this.mr.enqueue(b),d}ex.critical("This capture call is ignored due to client rate limiting.")}}else ex.error("No event name provided to posthog.capture")}else ex.uninitializedWarning("posthog.capture")}Ti(e){return this.on("eventCaptured",t=>e(t.event,t))}calculateEventProperties(e,t,i,s,n){if(i=i||new Date,!this.persistence||!this.sessionPersistence)return t;var a,o=n?void 0:this.persistence.remove_event_timer(e),l=y({},t);if(l.token=this.config.token,l.$config_defaults=this.config.defaults,("always"==this.config.cookieless_mode||"on_reject"==this.config.cookieless_mode&&this.consent.isExplicitlyOptedOut())&&(l.$cookieless_mode=!0),"$snapshot"===e){var h=y({},this.persistence.properties(),this.sessionPersistence.properties());return l.distinct_id=h.distinct_id,(!A(l.distinct_id)&&!N(l.distinct_id)||M(l.distinct_id))&&ex.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),l}var d,p=function(e,t){if(!g)return{};var i,s,n=e?eR([],r7,t||[]):[],[a,o]=function(e){for(var t=0;t<r8.length;t++){var[i,r]=r8[t],s=i.exec(e),n=s&&(O(r)?r(s,e):r);if(n)return n}return["",""]}(g);return eO(eM({$os:a,$os_version:o,$browser:r2(g,navigator.vendor),$device:r6(g),$device_type:(s=r6(g))===rv||s===r_||"Kobo"===s||"Kindle Fire"===s||s===rV?rg:s===rM||s===rD||s===rL||s===rB?"Console":s===rm?"Wearable":s?rd:"Desktop",$timezone:sc(),$timezone_offset:function(){try{return(new Date).getTimezoneOffset()}catch(e){return}}()}),{$current_url:tH(null==u?void 0:u.href,n,se),$host:null==u?void 0:u.host,$pathname:null==u?void 0:u.pathname,$raw_user_agent:g.length>1e3?g.substring(0,997)+"...":g,$browser_version:r5(g,navigator.vendor),$browser_language:sn(),$browser_language_prefix:"string"==typeof(i=sn())?i.split("-")[0]:void 0,$screen_height:null==r?void 0:r.screen.height,$screen_width:null==r?void 0:r.screen.width,$viewport_height:null==r?void 0:r.innerHe
vendor: 4,122 bytes, line 1
1ight,$viewport_width:null==r?void 0:r.innerWidth,$lib:"web",$lib_version:v.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:_,windowId:f}=this.sessionManager.checkAndGetSessionAndWindowId(n,i.getTime());l.$session_id=_,l.$window_id=f}this.sessionPropsManager&&eO(l,this.sessionPropsManager.getSessionProps());try{this.sessionRecording&&eO(l,this.sessionRecording.sdkDebugProperties),l.$sdk_debug_retry_queue_size=null==(a=this.br)?void 0:a.length}catch(e){l.$sdk_debug_error_capturing_properties=String(e)}if(this.requestRouter.region===s8.CUSTOM&&(l.$lib_custom_api_host=this.config.api_host),d="$pageview"!==e||n?"$pageleave"!==e||n?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(i):this.pageViewManager.doPageView(i,s),l=eO(l,d),"$pageview"===e&&c&&(l.title=c.title),!T(o)){var m=i.getTime()-o;l.$duration=parseFloat((m/1e3).toFixed(3))}g&&this.config.opt_out_useragent_filter&&(l.$browser_type=this._is_bot()?"bot":"browser"),(l=eO({},p,this.persistence.properties(),this.sessionPersistence.properties(),l)).$is_identified=this._isIdentified(),F(this.config.property_denylist)?eF(this.config.property_denylist,function(e){delete l[e]}):ex.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&&(ex.error("sanitize_properties is deprecated. Use before_send instead"),l=b(l,e));var w=this.Rr();return l.$process_person_profile=w,w&&!n&&this.Tr("_calculate_event_properties"),l}Pr(e){if(!this.persistence||!this.Rr()||this.lr)return e;var t,i=eO({},this.persistence.get_initial_props(),(null==(t=this.sessionPropsManager)?void 0:t.getSetOnceProps())||{},e||{}),r=this.config.sanitize_properties;return r&&(ex.error("sanitize_properties is deprecated. Use before_send instead"),i=r(i,"$set_once")),this.lr=!0,C(i)?void 0:i}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)}Cr(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.ur.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=sN),this.surveys.displaySurvey(e,t)}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 ex.uninitializedWarning("posthog.identify");if(N(e)&&(e=e.toString(),ex.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()))ex.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and n
1ot a hardcoded string.');else if(e!==tn){if(this.Tr("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(eq)&&(this.unregister(eq),this.register({distinct_id:e}));var s="anonymous"===(this.persistence.get_property(e4)||"anonymous");e!==r&&s?(this.persistence.set_property(e4,"identified"),this.setPersonPropertiesForFlags(y({},i||{},t||{}),!1),this.capture("$identify",{distinct_id:e,$anon_distinct_id:r},{$set:t||{},$set_once:i||{}}),this.cr=ro(e,t,i),this.featureFlags.setAnonymousDistinctId(r)):(t||i)&&this.setPersonProperties(t,i),e!==r&&(this.reloadFeatureFlags(),this.unregister(e6))}}else ex.critical('The string "'+tn+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.');else ex.error("Unique user id has not been set in posthog.identify")}setPersonProperties(e,t){if((e||t)&&this.Tr("posthog.setPersonProperties")){var i=ro(this.get_distinct_id(),e,t);this.cr!==i?(this.setPersonPropertiesForFlags(y({},t||{},e||{})),this.capture("$set",{$set:e||{},$set_once:t||{}}),this.cr=i):ex.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}group(e,t,i){if(e&&t){if(this.Tr("posthog.group")){var r=this.getGroups();r[e]!==t&&this.resetGroupPropertiesForFlags(e),this.register({$groups:y({},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 ex.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.Tr("posthog.setGroupPropertiesForFlags")&&this.featureFlags.setGroupPropertiesForFlags(e,t)}resetGroupPropertiesForFlags(e){this.featureFlags.resetGroupPropertiesForFlags(e)}reset(e){if(ex.info("reset"),!this.__loaded)return ex.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(e4,"anonymous"),null==(s=this.sessionManager)||s.resetSessionId(),this.cr=null,"always"===this.config.cookieless_mode)this.register_once({distinct_id:tn,$device_id:null},"");else{var a=this.config.get_device_id(tQ());this.register_once({distinct_id:a,$device_id:e?a: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(ej)?(ex.critical("Attempting to create alias for existing People user - aborting."),-2):this.Tr("posthog.alias")?(T(t)&&(t=this.get_distinct_id()),e!==t?(this.Cr(eq,e),this.capture("$create_alias",{alias:e,distinct_id:t})):(ex.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}set_config(e){var t=y({},this.config);if(R(e)){eO(this.config,nh(e));var i,r,s,n,a,o=this._r();null==(i=this.persistence)||i.update_config(this.config,t,o),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new sw(y({},this.config,{persistence:"sessionStorage"}),o),t8.G()&&"true"===t8.J("ph_debug")&&(this.config.debug=!0),this.config.debug&&(v.DEBUG=!0,ex.info("set_config",{config:e,oldConfig:t,newConfig:y({},this.config)})),null==(r=this.sessionRecording)||r.startIfEnabledOrStop(),null==(s=this.autocapture)||s.startIfEnabled(),null==(n=this.heatmaps)||n.startIfEnabled(),this.surveys.loadIfEnabled(),this.Or(),null==(a=this.externalIntegrations)||a.startIfEnabledOrStop()}}startSessionRecording(e){var t,i,r,s,n,a=!0===e,o={sampling:a||!(null==e||!e.sampling),linked_flag:a||!(null==e||!e.linked_flag),url_trigger:a||!(null==e||!e.url_trigger),event_trigger:a||!(null==e||!e.event_trigger)};Object.values(o).some(Boolean)&&(null==(t=this.sessionManager)||t.checkAndGetSessionAndWindowId(),o.sampling&&(null==(i=this.sessionRecording)||i.overrideSampling()),o.linked_flag&&(null==(r=this.sessionRecording)||r.overrideLinkedFlag()),o.url_trigger&&(null==(s=this.sessionRecording)||s.overrideTrigger("url")),o.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(y({},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:nl;return t!==nl&&(t=nl+"."+t),t}_isIdentified(){var e,t;return"identified"===(null==(e=this.persistence)?void 0:e.get_property(e4))||"identified"===(null==(t=this.sessionPersistence)?void 0:t.get_property(e4))}Rr(){var e,t;return!("never"===this.config.person_profiles||"identified_only"===this.config.person_profiles&&
1!this._isIdentified()&&C(this.getGroups())&&(null==(e=this.persistence)||null==(e=e.props)||!e[eq])&&(null==(t=this.persistence)||null==(t=t.props)||!t[tr]))}kr(){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.Rr()||this.Tr("posthog.createPersonProfile")&&this.setPersonProperties({},{})}Tr(e){return"never"===this.config.person_profiles?(ex.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.Cr(tr,!0),!0)}_r(){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}Or(){var e,t,i,r,s=this._r();return(null==(e=this.persistence)?void 0:e.gi)!==s&&(null==(i=this.persistence)||i.set_disabled(s)),(null==(t=this.sessionPersistence)?void 0:t.gi)!==s&&(null==(r=this.sessionPersistence)||r.set_disabled(s)),s}opt_in_capturing(e){if("always"!==this.config.cookieless_mode){var t;"on_reject"===this.config.cookieless_mode&&this.consent.isExplicitlyOptedOut()&&(this.reset(!0),this.sessionManager=new sZ(this),this.persistence&&(this.sessionPropsManager=new sJ(this,this.sessionManager,this.persistence)),this.sessionRecording=new nn(this),this.sessionRecording.startIfEnabledOrStop()),this.consent.optInOut(!0),this.Or(),this.Er(),"on_reject"==this.config.cookieless_mode&&this.surveys.loadIfEnabled(),(T(null==e?void 0:e.captureEventName)||null!=e&&e.captureEventName)&&this.capture(null!=(t=null==e?void 0:e.captureEventName)?t:"$opt_in",null==e?void 0:e.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.$r()}else ex.warn('Consent opt in/out is not valid with cookieless_mode="always" and will be ignored')}opt_out_capturing(){var e;"always"!==this.config.cookieless_mode?("on_reject"===this.config.cookieless_mode&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.Or(),"on_reject"===this.config.cookieless_mode&&(this.register({distinct_id:tn,$device_id:null}),this.sessionManager=void 0,this.sessionPropsManager=void 0,null==(e=this.sessionRecording)||e.stopRecording(),this.sessionRecording=void 0,this.$r())):ex.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===ii.GRANTED?"granted":e===ii.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.Or()}_is_bot(){return l?s5(l,this.config.custom_blocked_useragents):void 0}$r(){c&&("visible"===c.visibilityState?this.hr||(this.hr=!0,this.capture("$pageview",{title:c.title},{send_instantly:!0}),this.dr&&(c.removeEventListener("visibilitychange",this.dr),this.dr=null)):this.dr||(this.dr=this.$r.bind(this),eN(c,"visibilitychange",this.dr)))}debug(e){!1===e?(null==r||r.console.log("You've disabled debug mode."),localStorage&&localStorage.removeItem("ph_debug"),this.set_config({debug:!1})):(null==r||r.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)`."),localStorage&&localStorage.setItem("ph_debug","true"),this.set_config({debug:!0}))}L(){var e,t,i,r,s=this.pr||{};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?(ex.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&&!T(s[e]),r=t in s&&!T(s[t]),i?s[e]:!!r&&(ex&&ex.warn("Config field '"+t+"' is deprecated. Please use '"+e+"' instead. The old field will be removed in a future major version."),s[t]))}Ir(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 U(e.event)?ex.warn(s+". This can cause unexpected behavior."):ex.info(s),null}i.properties&&!C(i.properties)||ex.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}return i}getPageViewId(){var e;
vendor: 710 bytes, line 1
1return null==(e=this.pageViewManager.Wt)?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)})}}!function(e,t){for(var i=0;i<t.length;i++)e.prototype[t[i]]=eA(e.prototype[t[i]])}(np,["identify"]);var ng,n_=(ng=na[nl]=new np,function(){function e(){e.done||(e.done=!0,nc=!1,eF(na,function(e){e._dom_loaded()}))}null!=c&&c.addEventListener?"complete"===c.readyState?e():eN(c,"DOMContentLoaded",e,{capture:!1}):r&&ex.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")}(),ng)}}]);

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.