PageSourceSearch

https://cloud8-choons.fly.dev/_next/static/chunks/3a9b48acfb5017ac.js

js cloud8-choons.fly.dev collected 2026-10-03 08:13:40 UTC 211,689 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,22372,e=>{"use strict";var t=e.i(47167),i=e.i(43476),s=e.i(932),r=e.i(82399),n=e.i(10862),a=e.i(18566),o="u">typeof window?window:void 0,l="u">typeof globalThis?globalThis:o;"u"<typeof self&&(l.self=l),"u"<typeof File&&(l.File=function(){});var u=Array.prototype,c=u.forEach,h=u.indexOf,d=null==l?void 0:l.navigator,p=null==l?void 0:l.document,f=null==l?void 0:l.location,g=null==l?void 0:l.fetch,v=null!=l&&l.XMLHttpRequest&&"withCredentials"in new l.XMLHttpRequest?l.XMLHttpRequest:void 0,_=null==l?void 0:l.AbortController,m=null==d?void 0:d.userAgent,y=null!=o?o:{},b={DEBUG:!1,LIB_VERSION:"1.358.0"};function w(e,t,i,s,r,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(s,r)}function E(e){return function(){var t=this,i=arguments;return new Promise(function(s,r){var n=e.apply(t,i);function a(e){w(n,s,r,a,o,"next",e)}function o(e){w(n,s,r,a,o,"throw",e)}a(void 0)})}}function x(){return(x=Object.assign.bind()).apply(null,arguments)}function S(e,t){if(null==e)return{};var i={};for(var s in e)if(({}).hasOwnProperty.call(e,s)){if(-1!==t.indexOf(s))continue;i[s]=e[s]}return i}var k=["$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"],P=["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"],O=function(e,t){if(void 0===t&&(t=[]),!e)return!1;var i=e.toLowerCase();return P.concat(t).some(e=>{var t=e.toLowerCase();return -1!==i.indexOf(t)})};function C(e,t){return -1!==e.indexOf(t)}var T=function(e){return e.trim()},F=function(e){return e.replace(/^\$/,"")},$=Array.isArray,I=Object.prototype,R=I.hasOwnProperty,A=I.toString,M=$||function(e){return"[object Array]"===A.call(e)},D=e=>"function"==typeof e,L=e=>e===Object(e)&&!M(e),N=e=>{if(L(e)){for(var t in e)if(R.call(e,t))return!1;return!0}return!1},j=e=>void 0===e,q=e=>"[object String]"==A.call(e),U=e=>q(e)&&0===e.trim().length,H=e=>null===e,B=e=>j(e)||H(e),G=e=>"[object Number]"==A.call(e)&&e==e,z=e=>G(e)&&e>0,V=e=>"[object Boolean]"===A.call(e),W=e=>C(k,e);function K(e){return null===e||"object"!=typeof e}function Q(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function Y(e){return!j(Event)&&function(e,t){try{return e instanceof t}catch(e){return!1}}(e,Event)}var J=[!0,"true",1,"1","yes"],X=[!1,"false",0,"0","no"];function Z(e,t,i,s,r){return t>i&&(s.warn("min cannot be greater than max."),t=i),G(e)?e>i?(s.warn(" cannot be  greater than max: "+i+". Using max value instead."),i):e<t?(s.warn(" cannot be less than min: "+t+". Using min value instead."),t):e:(s.warn(" must be a number. using max or fallback. max: "+i+", fallback: "+r),Z(r||i,t,i,s))}class ee{constructor(e){this.t={},this.i=e.i,this.o=Z(e.bucketSize,0,100,e.h),this.m=Z(e.refillRate,0,this.o,e.h),this.S=Z(e.refillInterval,0,864e5,e.h)}$(e,t){var i=Math.floor((t-e.lastAccess)/this.S);if(i>0){var s=i*this.m;e.tokens=Math.min(e.tokens+s,this.o),e.lastAccess=e.lastAccess+i*this.S}}consumeRateLimit(e){var t,i=Date.now(),s=String(e),r=this.t[s];return r?this.$(r,i):(r={tokens:this.o,lastAccess:i},this.t[s]=r),0===r.tokens||(r.tokens--,0===r.tokens&&(null==(t=this.i)||t.call(this,e)),0===r.tokens)}stop(){this.t={}}}var et,ei,es,er="Mobile",en="Android",ea="Tablet",eo=en+" "+ea,el="iPad",eu="Ap
1ple",ec=eu+" Watch",eh="Safari",ed="BlackBerry",ep="Samsung",ef=ep+"Browser",eg=ep+" Internet",ev="Chrome",e_=ev+" OS",em=ev+" iOS",ey="Internet Explorer",eb=ey+" "+er,ew="Opera",eE=ew+" Mini",ex="Edge",eS="Microsoft "+ex,ek="Firefox",eP=ek+" iOS",eO="Nintendo",eC="PlayStation",eT="Xbox",eF=en+" "+er,e$=er+" "+eh,eI="Windows",eR=eI+" Phone",eA="Nokia",eM="Ouya",eD="Generic",eL=eD+" "+er.toLowerCase(),eN=eD+" "+ea.toLowerCase(),ej="Konqueror",eq="(\\d+(\\.\\d+)?)",eU=RegExp("Version/"+eq),eH=RegExp(eT,"i"),eB=RegExp(eC+" \\w+","i"),eG=RegExp(eO+" \\w+","i"),ez=RegExp(ed+"|PlayBook|BB10","i"),eV={"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"},eW=function(e,t){var i;return t=t||"",C(e," OPR/")&&C(e,"Mini")?eE:C(e," OPR/")?ew:ez.test(e)?ed:C(e,"IE"+er)||C(e,"WPDesktop")?eb:C(e,ef)?eg:C(e,ex)||C(e,"Edg/")?eS:C(e,"FBIOS")?"Facebook "+er:C(e,"UCWEB")||C(e,"UCBrowser")?"UC Browser":C(e,"CriOS")?em:C(e,"CrMo")||C(e,ev)?ev:C(e,en)&&C(e,eh)?eF:C(e,"FxiOS")?eP:C(e.toLowerCase(),ej.toLowerCase())?ej:(i=t)&&C(i,eu)||C(e,eh)&&!C(e,ev)&&!C(e,en)?C(e,er)?e$:eh:C(e,ek)?ek:C(e,"MSIE")||C(e,"Trident/")?ey:C(e,"Gecko")?ek:""},eK={[eb]:[RegExp("rv:"+eq)],[eS]:[RegExp(ex+"?\\/"+eq)],[ev]:[RegExp("("+ev+"|CrMo)\\/"+eq)],[em]:[RegExp("CriOS\\/"+eq)],"UC Browser":[RegExp("(UCBrowser|UCWEB)\\/"+eq)],[eh]:[eU],[e$]:[eU],[ew]:[RegExp("(Opera|OPR)\\/"+eq)],[ek]:[RegExp(ek+"\\/"+eq)],[eP]:[RegExp("FxiOS\\/"+eq)],[ej]:[RegExp("Konqueror[:/]?"+eq,"i")],[ed]:[RegExp(ed+" "+eq),eU],[eF]:[RegExp("android\\s"+eq,"i")],[eg]:[RegExp(ef+"\\/"+eq)],[ey]:[RegExp("(rv:|MSIE )"+eq)],Mozilla:[RegExp("rv:"+eq)]},eQ=function(e,t){var i=eK[eW(e,t)];if(j(i))return null;for(var s=0;s<i.length;s++){var r=i[s],n=e.match(r);if(n)return parseFloat(n[n.length-2])}return null},eY=[[RegExp(eT+"; "+eT+" (.*?)[);]","i"),e=>[eT,e&&e[1]||""]],[RegExp(eO,"i"),[eO,""]],[RegExp(eC,"i"),[eC,""]],[ez,[ed,""]],[RegExp(eI,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[eR,""];if(new RegExp(er).test(t)&&!/IEMobile\b/.test(t))return[eI+" "+er,""];var i=/Windows NT ([0-9.]+)/i.exec(t);if(i&&i[1]){var s=eV[i[1]]||"";return/arm/i.test(t)&&(s="RT"),[eI,s]}return[eI,""]}],[/((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=j(e[2])?e[3]:e[2]),["watchOS",t]}],[RegExp("("+en+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+en+")","i"),e=>e&&e[2]?[en,[e[2],e[3],e[4]||"0"].join(".")]:[en,""]],[/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/,[e_,""]],[/Linux|debian/i,["Linux",""]]],eJ=function(e){return eG.test(e)?eO:eB.test(e)?eC:eH.test(e)?eT:RegExp(eM,"i").test(e)?eM:RegExp("("+eR+"|WPDesktop)","i").test(e)?eR:/iPad/.test(e)?el:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?ec:ez.test(e)?ed:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":RegExp(eA,"i").test(e)?eA:/(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(er).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)?en:eo:RegExp("(pda|"+er+")","i").test(e)?eL:RegExp(ea,"i").test(e)&&!RegExp(ea+" pc","i").test(e)?eN:""},eX=e=>e instanceof Error;class eZ{constructor(e,t,i){void 0===i&&(i=[]),this.coercers=e,this.stackParser=t,this.modifiers=i}buildFromUnknown(e,t){void 0===t&&(t={});var i=t&&t.mechanism||{handled:!0,type:"generic"},s=this.buildCoercingContext(i,t,0).apply(e),r=this.buildParsingContext(t),n=this.parseStacktrace(s,r);return{$exception_list:this.convertToExceptionList(n,i),$exception_level:"error"}}modifyFrames(e){var t=this;return E(function*(){for(var i of e)i.stacktrace&&i.stacktrace.frames&&M(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,s;return null!=e.cause&&(i=this.parseStacktrace(e.cause,t)),""!=e.stack&&null!=e.stack&&(s=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?t.ski
1pFirstLines:0),t.chunkIdMap)),x({},e,{cause:i,stack:s})}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 E(function*(){var i=e;for(var s of t.modifiers)i=yield s(i);return i})()}convertToExceptionList(e,t){var i,s,r,n={type:e.type,value:e.value,mechanism:{type:null!=(i=t.type)?i:"generic",handled:null==(s=t.handled)||s,synthetic:null!=(r=e.synthetic)&&r}};e.stack&&(n.stacktrace={type:"raw",frames:e.stack});var a=[n];return null!=e.cause&&a.push(...this.convertToExceptionList(e.cause,x({},t,{handled:!0}))),a}buildParsingContext(e){var t;return{chunkIdMap:function(e){var t=globalThis._posthogChunkIds;if(t){var i=Object.keys(t);return es&&i.length===ei||(ei=i.length,es=i.reduce((i,s)=>{et||(et={});var r=et[s];if(r)i[r[0]]=r[1];else for(var n=e(s),a=n.length-1;a>=0;a--){var o=n[a],l=null==o?void 0:o.filename,u=t[s];if(l&&u){i[l]=u,et[s]=[l,u];break}}return i},{})),es}}(this.stackParser),skipFirstLines:null!=(t=e.skipFirstLines)?t:1}}buildCoercingContext(e,t,i){void 0===i&&(i=0);var s=(i,s)=>{if(s<=4){var r=this.buildCoercingContext(e,t,s);return this.applyCoercers(i,r)}};return x({},t,{syntheticException:0==i?t.syntheticException:void 0,mechanism:e,apply:e=>s(e,i),next:e=>s(e,i+1)})}}function e0(e,t,i,s,r){var n={platform:e,filename:t,function:"<anonymous>"===i?"?":i,in_app:!0};return j(s)||(n.lineno=s),j(r)||(n.colno=r),n}var e1=(e,t)=>{var i=-1!==e.indexOf("safari-extension"),s=-1!==e.indexOf("safari-web-extension");return i||s?[-1!==e.indexOf("@")?e.split("@")[0]:"?",i?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},e2=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,e3=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,e5=/\((\S*)(?::(\d+))(?::(\d+))\)/,e6=(e,t)=>{var i=e2.exec(e);if(i){var[,s,r,n]=i;return e0(t,s,"?",+r,+n)}var a=e3.exec(e);if(a){if(a[2]&&0===a[2].indexOf("eval")){var o=e5.exec(a[2]);o&&(a[2]=o[1],a[3]=o[2],a[4]=o[3])}var[l,u]=e1(a[1]||"?",a[2]);return e0(t,u,l,a[3]?+a[3]:void 0,a[4]?+a[4]:void 0)}},e4=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,e8=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,e7=(e,t)=>{var i=e4.exec(e);if(i){if(i[3]&&i[3].indexOf(" > eval")>-1){var s=e8.exec(i[3]);s&&(i[1]=i[1]||"eval",i[3]=s[1],i[4]=s[2],i[5]="")}var r=i[3],n=i[1]||"?";return[n,r]=e1(n,r),e0(t,r,n,i[4]?+i[4]:void 0,i[5]?+i[5]:void 0)}},e9=/\(error: (.*)\)/;class te{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,t){var i=q(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:i?e.stack:void 0,cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return this.isDOMError(e)?"DOMError":"DOMException"}getValue(e){var t=e.name||(this.isDOMError(e)?"DOMError":"DOMException");return e.message?t+": "+e.message:t}isDOMException(e){return Q(e,"DOMException")}isDOMError(e){return Q(e,"DOMError")}}class tt{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 ti{match(e){return Q(e,"ErrorEvent")&&null!=e.error}coerce(e,t){var i;return t.apply(e.error)||{type:"ErrorEvent",value:e.message,stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}}var ts=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class tr{match(e){return"string"==typeof e}coerce(e,t){var i,[s,r]=this.getInfos(e);return{type:null!=s?s:"Error",value:null!=r?r:e,stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}getInfos(e){var t="Error",i=e,s=e.match(ts);return s&&(t=s[1],i=s[2]),[t,i]}}var tn=["fatal","error","warning","log","info","debug"];function ta(e,t){void 0===t&&(t=40);var i=Object.keys(e);if(i.sort(),!i.length)return"[object has no keys]";for(var s=i.length;s>0;s--){var r=i.slice(0,s).join(", ");
1if(!(r.length>t))return s===i.length||r.length<=t?r:r.slice(0,t)+"..."}return""}class to{match(e){return"object"==typeof e&&null!==e}coerce(e,t){var i,s=this.getErrorPropertyFromObject(e);return s?t.apply(s):{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 Y(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: "+ta(e)}isSeverityLevel(e){return q(e)&&!U(e)&&tn.indexOf(e)>=0}getErrorPropertyFromObject(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var i=e[t];if(eX(i))return i}}getObjectClassName(e){try{var t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){return}}}class tl{match(e){return Y(e)}coerce(e,t){var i,s=e.constructor.name;return{type:s,value:s+" captured as exception with keys: "+ta(e),stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}}class tu{match(e){return K(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 tc{match(e){return Q(e,"PromiseRejectionEvent")}coerce(e,t){var i,s=this.getUnhandledRejectionReason(e);return K(s)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(s),stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}:t.apply(s)}getUnhandledRejectionReason(e){if(K(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 th=function(e,t){var{debugEnabled:i}=void 0===t?{}:t,s={k:function(t){if(o&&(b.DEBUG||y.POSTHOG_DEBUG||i)&&!j(o.console)&&o.console){for(var s=("__rrweb_original__"in o.console[t])?o.console[t].__rrweb_original__:o.console[t],r=arguments.length,n=Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];s(e,...n)}},info:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];s.k("log",...t)},warn:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];s.k("warn",...t)},error:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];s.k("error",...t)},critical:function(){for(var t=arguments.length,i=Array(t),s=0;s<t;s++)i[s]=arguments[s];console.error(e,...i)},uninitializedWarning:e=>{s.error("You must initialize PostHog before calling "+e)},createLogger:(t,i)=>th(e+" "+t,i)};return s},td=th("[PostHog.js]"),tp=td.createLogger,tf=tp("[ExternalScriptsLoader]"),tg=(e,t,i)=>{if(e.config.disable_external_dependency_loading)return tf.warn(t+" was requested but loading of external scripts is disabled."),i("Loading of external scripts is disabled");var s=null==p?void 0:p.querySelectorAll("script");if(s){for(var r,n=0;n<s.length;n++)if(r=function(){if(s[n].src===t){var e=s[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 r.v}var a=()=>{if(!p)return i("document not found");var s=p.createElement("script");if(s.type="text/javascript",s.crossOrigin="anonymous",s.src=t,s.onload=e=>{s.__posthog_loading_callback_fired=!0,i(void 0,e)},s.onerror=e=>i(e),e.config.prepare_external_dependency_script&&(s=e.config.prepare_external_dependency_script(s)),!s)return i("prepare_external_dependency_script returned null");if("head"===e.config.external_scripts_inject_target)p.head.appendChild(s);else{var r,n=p.querySelectorAll("body > script");n.length>0?null==(r=n[0].parentNode)||r.insertBefore(s,n[0]):p.body.appendChild(s)}};null!=p&&p.body?a():null==p||p.addEventListener("DOMContentLoaded",a)};y.__PosthogExtensions__=y.__PosthogExtensions__||{},y.__PosthogExtensions__.loadExternalDependency=(e,t,i)=>{var s="/static/"+t+".js?v="+e.version;"remote-config"===t&&(s="/array/"+e.config.token+"/config.js"),"toolbar"===t&&(s=s+"&t="+3e5*Math.floor(Date.now()/3e5));var r=e.requestRouter.endpointFor("assets",s);tg(e,r,i)},y.__PosthogExtensions__.loadSiteApp=(e,t,i)=>{var s=e.requestRouter.endpointFor("api",t);tg(e,s,i)};var tv={};function t_(e,t,i){if(M(e)){if(c&&e.forEach===c)e.forEach(t,i);else if("length"in e&&e.length===+e.length){for(var s=0,r=e.length;s<r;s++)if(s in e&&t.call(i,e[s],s)===tv)return}}}function tm(e,t,i){if(!B(e)){if(M(e))return t_(e,t,i);if(e instanceof FormData){for(var s of e.entries())if(t.call(i,s[1],s[0])===tv)return}
vendor: 5,808 bytes, line 1
1else for(var r in e)if(R.call(e,r)&&t.call(i,e[r],r)===tv)return}}var ty=function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];return t_(i,function(t){for(var i in t)void 0!==t[i]&&(e[i]=t[i])}),e},tb=function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];return t_(i,function(t){t_(t,function(t){e.push(t)})}),e};function tw(e){for(var t=Object.keys(e),i=t.length,s=Array(i);i--;)s[i]=[t[i],e[t[i]]];return s}var tE=function(e){try{return e()}catch(e){return}},tx=function(e){return function(){try{for(var t=arguments.length,i=Array(t),s=0;s<t;s++)i[s]=arguments[s];return e.apply(this,i)}catch(e){td.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),td.critical(e)}}},tS=function(e){var t={};return tm(e,function(e,i){(q(e)&&e.length>0||G(e))&&(t[i]=e)}),t},tk=["herokuapp.com","vercel.app","netlify.app"];function tP(e,t){for(var i=0;i<e.length;i++)if(t(e[i]))return e[i]}function tO(e,t,i,s){var{capture:r=!1,passive:n=!0}=null!=s?s:{};null==e||e.addEventListener(t,i,{capture:r,passive:n})}function tC(e){return"ph_toolbar_internal"===e.name}var tT="$people_distinct_id",tF="__alias",t$="__timers",tI="$autocapture_disabled_server_side",tR="$heatmaps_enabled_server_side",tA="$exception_capture_enabled_server_side",tM="$error_tracking_suppression_rules",tD="$error_tracking_capture_extension_exceptions",tL="$web_vitals_enabled_server_side",tN="$dead_clicks_enabled_server_side",tj="$product_tours_enabled_server_side",tq="$web_vitals_allowed_metrics",tU="$session_recording_remote_config",tH="$sesid",tB="$session_is_sampled",tG="$enabled_feature_flags",tz="$early_access_features",tV="$feature_flag_details",tW="$stored_person_properties",tK="$stored_group_properties",tQ="$surveys",tY="$flag_call_reported",tJ="$feature_flag_errors",tX="$feature_flag_evaluated_at",tZ="$user_state",t0="$client_session_props",t1="$capture_rate_limit",t2="$initial_campaign_params",t3="$initial_referrer_info",t5="$initial_person_info",t6="$epp",t4="__POSTHOG_TOOLBAR__",t8="$posthog_cookieless",t7=[tT,tF,"__cmpns",t$,"$session_recording_enabled_server_side",tR,tH,tG,tM,tZ,tz,tV,tK,tW,tQ,tY,tJ,tX,t0,t1,t2,t3,t6,t5];Math.trunc||(Math.trunc=function(e){return e<0?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return G(e)&&isFinite(e)&&Math.floor(e)===e});var t9="0123456789abcdef";class ie{constructor(e){if(this.bytes=e,16!==e.length)throw TypeError("not 128-bit length")}static fromFieldsV7(e,t,i,s){if(!Number.isInteger(e)||!Number.isInteger(t)||!Number.isInteger(i)||!Number.isInteger(s)||e<0||t<0||i<0||s<0||e>0xffffffffffff||t>4095||i>0x3fffffff||s>0xffffffff)throw RangeError("invalid field value");var r=new Uint8Array(16);return r[0]=e/0x10000000000,r[1]=e/0x100000000,r[2]=e/0x1000000,r[3]=e/65536,r[4]=e/256,r[5]=e,r[6]=112|t>>>8,r[7]=t,r[8]=128|i>>>24,r[9]=i>>>16,r[10]=i>>>8,r[11]=i,r[12]=s>>>24,r[13]=s>>>16,r[14]=s>>>8,r[15]=s,new ie(r)}toString(){for(var e="",t=0;t<this.bytes.length;t++)e=e+t9.charAt(this.bytes[t]>>>4)+t9.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 ie(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 it{constructor(){this.P=0,this.T=0,this.R=new ir}generate(){var e=this.generateOrAbort();if(j(e)){this.P=0;var t=this.generateOrAbort();if(j(t))throw Error("Could not generate UUID after timestamp reset");return t}return e}generateOrAbort(){var e=Date.now();if(e>this.P)this.P=e,this.I();else{if(!(e+1e4>this.P))return;this.T++,this.T>0x3ffffffffff&&(this.P++,this.I())}return ie.fromFieldsV7(this.P,Math.trunc(this.T/0x40000000),0x3fffffff&this.T,this.R.nextUint32())}I(){this.T=1024*this.R.nextUint32()+(1023&this.R.nextUint32())}}var ii,is=e=>{if("u">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};o&&!j(o.crypto)&&crypto.getRandomValues&&(is=e=>crypto.getRandomValues(e));class ir{constructor(){this.C=new Uint32Array(8),this.O=1/0}nextUint32(){return this.O>=this.C.length&&(is(this.C),this.O=0),this.C[this.O++]}}var ia=()=>io().toString(),io=()=>(ii||(ii=new it)).generate(),il="",iu=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,ic={F:()=>!!p,M:function(e){td.error("cookieStore error: "+e)},A:function(e){if(p){try{for(var t=e+"=",i=p.cookie.split(";").filter(e=>e.length),s=0;s<i.length;s++){for(var r=i[s];" "==r.charAt(0);)r=r.substring(1,r.length);if(0===r.indexOf(t))return decodeURIComponent(r.substring(t.length,r.length))}}catch(e){}return null}},D:function(e){var t;try{t=JSON.parse(ic.A(e))||{}}catch(e){}return t},L:function(e,t,i,s,r){if(p)try{var n="",a="",o=function(e,t){if(t){var i=function(e,t){if(void 0===t&&(t=p),il)return il;if(!t||["localhost","127.0.0.1"].includes(e))return"";for(var i=e.split("."),s=Math.min(i.length,8),r="dmn_chk_"+ia();!il&&s--;){var n=i.slice(s).join("."),a=r+"=1;domain=."+n+";path=/";t.cookie=a+";max-age=3",t.cookie.includes(r)&&(t.cookie=a+";max-age=0",il=n)}return il}(e);if(!i){var s,r=(s=e.match(iu))?s[0]:"";r!==i&&td.info("Warning: cookie subdomain discovery mismatch",r,i),i=r}return i?"; domain=."+i:""}return""}(p.location.hostname,s);if(i){var l=new Date;l.setTime(l.getTime()+24*i*36e5),n="; expires="+l.toUTCString()}r&&(a="; secure");var u=e+"="+encodeURIComponent(JSON.stringify(t))+n+"; SameSite=Lax; path=/"+o+a;return u.length>3686.4&&td.warn("cookieStore warning: large cookie, len="+u.length),p.cookie=u,u}catch(e){return}}
1,j:function(e,t){if(null!=p&&p.cookie)try{ic.L(e,"",-1,t)}catch(e){return}}},ih=null,id={F:function(){if(!H(ih))return ih;var e=!0;if(j(o))e=!1;else try{var t="__mplssupport__";id.L(t,"xyz"),'"xyz"'!==id.A(t)&&(e=!1),id.j(t)}catch(t){e=!1}return e||td.error("localStorage unsupported; falling back to cookie store"),ih=e,e},M:function(e){td.error("localStorage error: "+e)},A:function(e){try{return null==o?void 0:o.localStorage.getItem(e)}catch(e){id.M(e)}return null},D:function(e){try{return JSON.parse(id.A(e))||{}}catch(e){}return null},L:function(e,t){try{null==o||o.localStorage.setItem(e,JSON.stringify(t))}catch(e){id.M(e)}},j:function(e){try{null==o||o.localStorage.removeItem(e)}catch(e){id.M(e)}}},ip=["$device_id","distinct_id",tH,tB,t6,t5,tZ],ig={},iv={F:function(){return!0},M:function(e){td.error("memoryStorage error: "+e)},A:function(e){return ig[e]||null},D:function(e){return ig[e]||null},L:function(e,t){ig[e]=t},j:function(e){delete ig[e]}},i_=null,im={F:function(){if(!H(i_))return i_;if(i_=!0,j(o))i_=!1;else try{var e="__support__";im.L(e,"xyz"),'"xyz"'!==im.A(e)&&(i_=!1),im.j(e)}catch(e){i_=!1}return i_},M:function(e){td.error("sessionStorage error: ",e)},A:function(e){try{return null==o?void 0:o.sessionStorage.getItem(e)}catch(e){im.M(e)}return null},D:function(e){try{return JSON.parse(im.A(e))||null}catch(e){}return null},L:function(e,t){try{null==o||o.sessionStorage.setItem(e,JSON.stringify(t))}catch(e){im.M(e)}},j:function(e){try{null==o||o.sessionStorage.removeItem(e)}catch(e){im.M(e)}}},iy=((nh={})[nh.PENDING=-1]="PENDING",nh[nh.DENIED=0]="DENIED",nh[nh.GRANTED=1]="GRANTED",nh);class ib{constructor(e){this._instance=e}get N(){return this._instance.config}get consent(){return this.U()?iy.DENIED:this.H}isOptedOut(){return"always"===this.N.cookieless_mode||this.consent===iy.DENIED||this.consent===iy.PENDING&&(this.N.opt_out_capturing_by_default||"on_reject"===this.N.cookieless_mode)}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===iy.DENIED}optInOut(e){this.B.L(this.q,+!!e,this.N.cookie_expiration,this.N.cross_subdomain_cookie,this.N.secure_cookie)}reset(){this.B.j(this.q,this.N.cross_subdomain_cookie)}get q(){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 H(){var e=this.B.A(this.q);return C(J,e)?iy.GRANTED:C(X,e)?iy.DENIED:iy.PENDING}get B(){if(!this.V){var e=this.N.opt_out_capturing_persistence_type;this.V="localStorage"===e?id:ic;var t="localStorage"===e?ic:id;t.A(this.q)&&(this.V.A(this.q)||this.optInOut(C(J,t.A(this.q))),t.j(this.q,this.N.cross_subdomain_cookie))}return this.V}U(){return!!this.N.respect_dnt&&!!tP([null==d?void 0:d.doNotTrack,null==d?void 0:d.msDoNotTrack,y.doNotTrack],e=>C(J,e))}}var iw=tp("[Dead Clicks]"),iE=()=>!0,ix=e=>{var t,i=!(null==(t=e.instance.persistence)||!t.get_property(tN)),s=e.instance.config.capture_dead_clicks;return V(s)?s:!!L(s)||i};class iS{get lazyLoadedDeadClicksAutocapture(){return this.W}constructor(e,t,i){this.instance=e,this.isEnabled=t,this.onCapture=i,this.startIfEnabledOrStop()}onRemoteConfig(e){"captureDeadClicks"in e&&(this.instance.persistence&&this.instance.persistence.register({[tN]:e.captureDeadClicks}),this.startIfEnabledOrStop())}startIfEnabledOrStop(){this.isEnabled(this)?this.G(()=>{this.Y()}):this.stop()}G(e){var t,i;null!=(t=y.__PosthogExtensions__)&&t.initDeadClicksAutocapture&&e(),null==(i=y.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this.instance,"dead-clicks-autocapture",t=>{t?iw.error("failed to load script",t):e()})}Y(){var e;if(p){if(!this.W&&null!=(e=y.__PosthogExtensions__)&&e.initDeadClicksAutocapture){var t=L(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};t.__onCapture=this.onCapture,this.W=y.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,t),this.W.start(p),iw.info("starting...")}}else iw.error("`document` not found. Cannot start.")}stop(){this.W&&(this.W.stop(),this.W=void 0,iw.info("stopping..."))}}var ik=tp("[SegmentIntegration]"),iP="posthog-js";function iO(e,t){var{organization:i,projectId:s,prefix:r,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=e.requestRouter.endpointFor("ui","/project/"+e.config.token+"/pers
1on/"+e.get_distinct_id());t.tags["PostHog Person URL"]=o,e.sessionRecordingStarted()&&(t.tags["PostHog Recording URL"]=e.get_session_replay_url({withTimestamp:!0}));var l,u,c,h,d,p,f=(null==(l=t.exception)?void 0:l.values)||[],g=f.map(e=>x({},e,{stacktrace:e.stacktrace?x({},e.stacktrace,{type:"raw",frames:(e.stacktrace.frames||[]).map(e=>x({},e,{platform:"web:javascript"}))}):void 0})),v={$exception_message:(null==(u=f[0])?void 0:u.value)||t.message,$exception_type:null==(c=f[0])?void 0:c.type,$exception_level:t.level,$exception_list:g,$sentry_event_id:t.event_id,$sentry_exception:t.exception,$sentry_exception_message:(null==(h=f[0])?void 0:h.value)||t.message,$sentry_exception_type:null==(d=f[0])?void 0:d.type,$sentry_tags:t.tags};return i&&s&&(v.$sentry_url=(r||"https://sentry.io/organizations/")+i+"/issues/?project="+s+"&query="+t.event_id),a&&(null==(p=e.exceptions)||p.sendExceptionEvent(v)),t}}class iC{constructor(e,t,i,s,r,n){this.name=iP,this.setupOnce=function(a){a(iO(e,{organization:t,projectId:i,prefix:s,severityAllowList:r,sendExceptionsToPostHog:null==n||n}))}}}class iT{constructor(e){this.J=(e,t,i)=>{i&&(i.noSessionId||i.activityTimeout||i.sessionPastMaximumLength)&&(td.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:e,changeReason:i}),this.K=void 0,this._instance.scrollManager.resetContext())},this._instance=e,this.X()}X(){var e;this.Z=null==(e=this._instance.sessionManager)?void 0:e.onSessionId(this.J)}destroy(){var e;null==(e=this.Z)||e.call(this),this.Z=void 0}doPageView(e,t){var i,s=this.tt(e,t);return this.K={pathname:null!=(i=null==o?void 0:o.location.pathname)?i:"",pageViewId:t,timestamp:e},this._instance.scrollManager.resetContext(),s}doPageLeave(e){var t;return this.tt(e,null==(t=this.K)?void 0:t.pageViewId)}doEvent(){var e;return{$pageview_id:null==(e=this.K)?void 0:e.pageViewId}}tt(e,t){var i=this.K;if(!i)return{$pageview_id:t};var s={$pageview_id:t,$prev_pageview_id:i.pageViewId},r=this._instance.scrollManager.getContext();if(r&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:n,lastScrollY:a,maxScrollY:o,maxContentHeight:l,lastContentY:u,maxContentY:c}=r;if(!(j(n)||j(a)||j(o)||j(l)||j(u)||j(c))){n=Math.ceil(n),a=Math.ceil(a),o=Math.ceil(o),l=Math.ceil(l),u=Math.ceil(u),c=Math.ceil(c);var h=n<=1?1:Z(a/n,0,1,td),d=n<=1?1:Z(o/n,0,1,td),p=l<=1?1:Z(u/l,0,1,td),f=l<=1?1:Z(c/l,0,1,td);s=ty(s,{$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:u,$prev_pageview_last_content_percentage:p,$prev_pageview_max_content:c,$prev_pageview_max_content_percentage:f})}}return i.pathname&&(s.$prev_pageview_pathname=i.pathname),i.timestamp&&(s.$prev_pageview_duration=(e.getTime()-i.timestamp.getTime())/1e3),s}}var iF=((nd={}).GZipJS="gzip-js",nd.Base64="base64",nd),i$=e=>{var t=null==p?void 0:p.createElement("a");return j(t)?null:(t.href=e,t)},iI=function(e,t){void 0===t&&(t="&");var i,s,r=[];return tm(e,function(e,t){j(e)||j(t)||"undefined"===t||(i=encodeURIComponent(e instanceof File?e.name:e.toString()),s=encodeURIComponent(t),r[r.length]=s+"="+i)}),r.join(t)},iR=function(e,t){for(var i,s=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),r=0;r<s.length;r++){var n=s[r].split("=");if(n[0]===t){i=n;break}}if(!M(i)||i.length<2)return"";var a=i[1];try{a=decodeURIComponent(a)}catch(e){td.error("Skipping decoding for malformed query param: "+a)}return a.replace(/\+/g," ")},iA=function(e,t,i){if(!e||!t||!t.length)return e;for(var s=e.split("#"),r=s[0]||"",n=s[1],a=r.split("?"),o=a[1],l=a[0],u=(o||"").split("&"),c=[],h=0;h<u.length;h++){var d=u[h].split("=");M(d)&&(t.includes(d[0])?c.push(d[0]+"="+i):c.push(u[h]))}var p=l;return null!=o&&(p+="?"+c.join("&")),null!=n&&(p+="#"+n),p},iM=function(e,t){var i=e.match(RegExp(t+"=([^&]*)"));return i?i[1]:null},iD="https?://(.*)",iL=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],iN=tb(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],iL),ij="<masked>
1",iq=["li_fat_id"];function iU(e,t,i){if(!p)return{};var s,r=t?tb([],iL,i||[]):[],n=iH(iA(p.URL,r,ij),e);return ty((s={},tm(iq,function(e){var t=ic.A(e);s[e]=t||null}),s),n)}function iH(e,t){var i=iN.concat(t||[]),s={};return tm(i,function(t){var i=iR(e,t);s[t]=i||null}),s}function iB(e){var t=e?0===e.search(iD+"google.([^/?]*)")?"google":0===e.search(iD+"bing.com")?"bing":0===e.search(iD+"yahoo.com")?"yahoo":0===e.search(iD+"duckduckgo.com")?"duckduckgo":null:null,i={};if(!H(t)){i.$search_engine=t;var s=p?iR(p.referrer,"yahoo"!=t?"q":"p"):"";s.length&&(i.ph_keyword=s)}return i}function iG(){return navigator.language||navigator.userLanguage}function iz(){return(null==p?void 0:p.referrer)||"$direct"}function iV(e,t){var i=e?tb([],iL,t||[]):[],s=null==f?void 0:f.href.substring(0,1e3);return{r:iz().substring(0,1e3),u:s?iA(s,i,ij):void 0}}function iW(e){var t,{r:i,u:s}=e,r={$referrer:i,$referring_domain:null==i?void 0:"$direct"==i?"$direct":null==(t=i$(i))?void 0:t.host};if(s){r.$current_url=s;var n=i$(s);r.$host=null==n?void 0:n.host,r.$pathname=null==n?void 0:n.pathname,ty(r,iH(s))}return i&&ty(r,iB(i)),r}function iK(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}}var iQ=tp("[FeatureFlags]"),iY=tp("[FeatureFlags]",{debugEnabled:!0}),iJ="$active_feature_flags",iX="$override_feature_flags",iZ="$feature_flag_payloads",i0="$override_feature_flag_payloads",i1="$feature_flag_request_id",i2=e=>{var t={};for(var[i,s]of tw(e||{}))s&&(t[i]=s);return t},i3=((np={}).FeatureFlags="feature_flags",np.Recordings="recordings",np);class i5{constructor(e){this.it=!1,this.et=!1,this.rt=!1,this.st=!1,this.nt=!1,this.ot=!1,this.ut=!1,this.ht=!1,this._instance=e,this.featureFlagEventHandlers=[]}dt(){var e,t;return null!=(e=null==(t=this._instance.persistence)?void 0:t.vt(this._instance.config.feature_flag_cache_ttl_ms))&&e}ct(){return!!this.dt()&&(this.ht||this.rt||(this.ht=!0,iQ.warn("Feature flag cache is stale, triggering refresh..."),this.reloadFeatureFlags()),!0)}ft(){var e,t=null!=(e=this._instance.config.evaluation_contexts)?e:this._instance.config.evaluation_environments;return!this._instance.config.evaluation_environments||this._instance.config.evaluation_contexts||this.ut||(iQ.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this.ut=!0),null!=t&&t.length?t.filter(e=>{var t=e&&"string"==typeof e&&e.trim().length>0;return t||iQ.error("Invalid evaluation context found:",e,"Expected non-empty string"),t}):[]}_t(){return this.ft().length>0}get hasLoadedFlags(){return this.et}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var e=this._instance.get_property(tV),t=this._instance.get_property(iX),i=this._instance.get_property(i0);if(!i&&!t)return e||{};var s=ty({},e||{});for(var r of[...new Set([...Object.keys(i||{}),...Object.keys(t||{})])]){var n,a,o=s[r],l=null==t?void 0:t[r],u=j(l)?null!=(n=null==o?void 0:o.enabled)&&n:!!l,c=j(l)?o.variant:"string"==typeof l?l:void 0,h=null==i?void 0:i[r],d=x({},o,{enabled:u,variant:u?null!=c?c:null==o?void 0:o.variant:void 0});u!==(null==o?void 0:o.enabled)&&(d.original_enabled=null==o?void 0:o.enabled),c!==(null==o?void 0:o.variant)&&(d.original_variant=null==o?void 0:o.variant),h&&(d.metadata=x({},null==o?void 0:o.metadata,{payload:h,original_payload:null==o||null==(a=o.metadata)?void 0:a.payload})),s[r]=d}return this.it||(iQ.warn(" Overriding feature flag details!",{flagDetails:e,overriddenPayloads:i,finalDetails:s}),this.it=!0),s}getFlagVariants(){var e=this._instance.get_property(tG),t=this._instance.get_property(iX);if(!t)return e||{};for(var i=ty({},e),s=Object.keys(t),r=0;r<s.length;r++)i[s[r]]=t[s[r]];return this.it||(iQ.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:i}),this.it=!0),i}getFlagPayloads(){var e=this._instance.get_property(iZ),t=this._instance.get_property(i0);if(!t)return e||{};for(var i=ty({},e||{}),s=Object.keys(t),r=0;r<s.length;r++)i[s[r]]=t[s[r]];return this.it||(iQ.warn(" Overriding feature flag payloads!",{flagPayloads:e,overriddenPayloads:t,finalPayloads:i}),this.it=!0),i}reloadFeatureFlags(){this.st||this._instance.config.advanced_disable_feature_flags||this.bt||(this._instance.yt.emit("featureFlagsReloading",!0),this.bt=setTimeout(()=>{this.wt()},5))}Et(){clearTimeout(this.bt),this.bt=void 0}ensureFlagsLoaded(){this.et||this.rt||this.bt||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this.st=e}wt(e){var t;if(this.Et(),!this._instance.xt())if(this.rt)this.nt=!0;else{var i=this._instance.config.token,s=this._instance.get_property("$device_id"),r={token:i,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:x({},(null==(t=this._instance.persistence)?void 0:t.get_initial_props())||{},this._instance.get_property(tW)||{}),group_properties:this._instance.get_property(tK),timezone:iK()};H(s)||j(s)||(r.$device_id=s),(null!=e&&e.disableFlags||this._instance.config.advanced_disable_feature_flags)&&(r.disable_flags=!0),this._t()&&(r.evaluation_contexts=this.ft()
1);var n=this._instance.config.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":"",a=this._instance.requestRouter.endpointFor("flags","/flags/?v=2"+n);this.rt=!0,this._instance._send_request({method:"POST",url:a,data:r,compression:this._instance.config.disable_compression?void 0:iF.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:e=>{var t,i,s,n=!0;if(200===e.statusCode&&(this.nt||(this.$anon_distinct_id=void 0),n=!1),this.rt=!1,!r.disable_flags||this.nt){this.ot=!n;var a,o=[];e.error?e.error instanceof Error?o.push("AbortError"===e.error.name?"timeout":"connection_error"):o.push("unknown_error"):200!==e.statusCode&&o.push("api_error_"+e.statusCode),null!=(t=e.json)&&t.errorsWhileComputingFlags&&o.push("errors_while_computing_flags");var l=!(null==(i=e.json)||null==(i=i.quotaLimited)||!i.includes(i3.FeatureFlags));(l&&o.push("quota_limited"),null==(s=this._instance.persistence)||s.register({[tJ]:o}),l)?iQ.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."):(r.disable_flags||this.receivedFeatureFlags(null!=(a=e.json)?a:{},n),this.nt&&(this.nt=!1,this.wt()))}}})}}getFeatureFlag(e,t){var i;if(void 0===t&&(t={}),!t.fresh||this.ot)if(this.et||this.getFlags()&&this.getFlags().length>0){if(!this.ct()){var s=this.getFeatureFlagResult(e,t);return null!=(i=null==s?void 0:s.variant)?i:null==s?void 0:s.enabled}}else iQ.warn('getFeatureFlag for key "'+e+"\" failed. Feature flags didn't load in time.")}getFeatureFlagDetails(e){return this.getFlagsWithDetails()[e]}getFeatureFlagPayload(e){var t=this.getFeatureFlagResult(e,{send_event:!1});return null==t?void 0:t.payload}getFeatureFlagResult(e,t){if(void 0===t&&(t={}),!t.fresh||this.ot)if(this.et||this.getFlags()&&this.getFlags().length>0){if(!this.ct()){var i=this.getFlagVariants(),s=e in i,r=i[e],n=this.getFlagPayloads()[e],a=String(r),o=this._instance.get_property(i1)||void 0,l=this._instance.get_property(tX)||void 0,u=this._instance.get_property(tY)||{};if((t.send_event||!("send_event"in t))&&(!(e in u)||!u[e].includes(a))){M(u[e])?u[e].push(a):u[e]=[a],null==(p=this._instance.persistence)||p.register({[tY]:u});var c=this.getFeatureFlagDetails(e),h=[...null!=(f=this._instance.get_property(tJ))?f:[]];j(r)&&h.push("flag_missing");var d={$feature_flag:e,$feature_flag_response:r,$feature_flag_payload:n||null,$feature_flag_request_id:o,$feature_flag_evaluated_at:l,$feature_flag_bootstrapped_response:(null==(g=this._instance.config.bootstrap)||null==(g=g.featureFlags)?void 0:g[e])||null,$feature_flag_bootstrapped_payload:(null==(v=this._instance.config.bootstrap)||null==(v=v.featureFlagPayloads)?void 0:v[e])||null,$used_bootstrap_value:!this.ot};j(null==c||null==(_=c.metadata)?void 0:_.version)||(d.$feature_flag_version=c.metadata.version);var p,f,g,v,_,m,y,b,w,E,x,S=null!=(m=null==c||null==(y=c.reason)?void 0:y.description)?m:null==c||null==(b=c.reason)?void 0:b.code;S&&(d.$feature_flag_reason=S),null!=c&&null!=(w=c.metadata)&&w.id&&(d.$feature_flag_id=c.metadata.id),j(null==c?void 0:c.original_variant)&&j(null==c?void 0:c.original_enabled)||(d.$feature_flag_original_response=j(c.original_variant)?c.original_enabled:c.original_variant),null!=c&&null!=(E=c.metadata)&&E.original_payload&&(d.$feature_flag_original_payload=null==c||null==(x=c.metadata)?void 0:x.original_payload),h.length&&(d.$feature_flag_error=h.join(",")),this._instance.capture("$feature_flag_called",d)}if(s){var k=n;if(!j(n))try{k=JSON.parse(n)}catch(e){}return{key:e,enabled:!!r,variant:"string"==typeof r?r:void 0,payload:k}}}}else iQ.warn('getFeatureFlagResult for key "'+e+"\" failed. Feature flags didn't load in time.")}getRemoteConfigPayload(e,t){var i=this._instance.config.token,s={distinct_id:this._instance.get_distinct_id(),token:i};this._t()&&(s.evaluation_contexts=this.ft()),this._instance._send_request({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2"),data:s,compression:this._instance.config.disable_compression?void 0:iF.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:i=>{var s,r=null==(s=i.json)?void 0:s.featureFlagPayloads;t((null==r?void 0:r[e])||void 0)}})}isFeatureEnabled(e,t){if(void 0===t&&(t={}),!t.fresh||this.ot){if(this.et||this.getFlags()&&this.getFlags().length>0){var i=this.getFeatureFlag(e,t);return j(i)?void 0:!!i}iQ.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.et=!0;var i=this.getFlagVariants(),s=this.getFlagPayloads(),r=this.getFlagsWithDetails();!function(e,t,i,s,r){void 0===i&&(i={}),void 0===s&&(s={}),void 0===r&&(r={});var n,a=((n=e.flags)?(e.featureFlags=Object.fromEntries(Object.keys(n).map(e=>{var t;return[e,null!=(t=n[e].variant)?t:n[e].enabled]})),e.featureFlagPayloads=Object.fromEntries(Object.keys(n).filter(e=>n[e].enabled).filter(e=>{var t;return null==(t=n[e].metadata)?void 0:t.payload}).map(e=>{var t;return[e,null==(t=n[e].metadata)?void 0:t.payload]}))):iQ.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),e),o=a.flags,l=a.featureFlags,u=a.featureFlagPayloads;if(l){var c=e.requestId,h=e.evaluatedAt;if(M(l)){iQ.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var d={};if(l)for(var p=0;p<l.length;p++)d[l[p]]=!0;t&&t.register({[iJ]:l,[tG]:d})}else{var f=l,g=u,v=o;if(e.errorsWhileComputingFlags)if(o){var _=new Set(Object.keys(o).filter(e=>{var t;return!(null!=(t=o[e])&&t.failed)}));f=x({},i,Object.fromEntries(Object.entries(f).filter(e=>{var[t]=e;return _.has(t)}))),g=x({},s,Object.fromEntries(Object.entries(g||{}).filter(e=>{var[t]=e;return _.has(t)}))),v=x({},r,Object.fromEntries(Object.entries(v||{}).filter(e=>{var[t]=e;return _.has(t)})))}else f=x({},i,f),g=x({},s,g),v=x({},r,v);t&&t.register(x({[iJ]:Object.keys(i2(f)),[tG]:f||{},[iZ]:g||{},[tV]:v||{}},c?{[i1]:c}:{},h?{[tX]:h}:{}))}}}(e,this._instance.persistence,i,s,r),t||(this.ht=!1),this.St(t)}}override(e,t){void 0===t&&(t=!1),iQ.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:e,suppressWarning:t})}overrideFeatureFlags(e){if(!this._instance.__loaded||!this._instance.persistence)return iQ.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(!1===e)return this._instance.persistence.unregister(iX),this._instance.persistence.unregister(i0),this.St(),iY.info("All overrides cleared");if(e&&"object"==typeof e&&("flags"in e||"payloads"in e)){var t;if(this.it=!!(null!=(t=e.suppressWarning)&&t),"flags"in e){if(!1===e.flags)this._instance.persistence.unregister(iX),iY.info("Flag overrides cleared");else if(e.flags){if(M(e.flags)){for(var i={},s=0;s<e.flags.length;s++)i[e.flags[s]]=!0;this._instance.persistence.register({[iX]:i})}else this._instance.persistence.register({[iX]:e.flags});iY.info("Flag overrides set",{flags:e.flags})}}return"payloads"in e&&(!1===e.payloads?(this._instance.persistence.unregister(i0),iY.info("Payload overrides cleared")):e.payloads&&(this._instance.persistence.register({[i0]:e.payloads}),iY.info("Payload overrides set",{payloads:e.payloads}))),void this.St()}this.St()}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.et){var{flags:t,flagVariants:i}=this.$t();e(t,i)}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,t,i){var s,r=(this._instance.get_property(tz)||[]).find(t=>t.flagKey===e),n={["$feature_enrollment/"+e]:t},a={$feature_flag:e,$feature_enrollment:t,$set:n};r&&(a.$early_access_feature_name=r.name),i&&(a.$feature_enrollment_stage=i),this._instance.capture("$feature_enrollment_update",a),this.setPersonPropertiesForFlags(n,!1);var o=x({},this.getFlagVariants(),{[e]:t});null==(s=this._instance.persistence)||s.register({[iJ]:Object.keys(i2(o)),[tG]:o}),this.St()}getEarlyAccessFeatures(e,t,i){void 0===t&&(t=!1);var s=this._instance.get_property(tz),r=i?"&"+i.map(e=>"stage="+e).join("&"):"";if(s&&!t)return e(s);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this._instance.config.token+r),method:"GET",callback:t=>{var i,s;if(t.json){var r=t.json.earlyAccessFeatures;return null==(i=this._instance.persistence)||i.unregister(tz),null==(s=this._instance.persistence)||s.register({[tz]:r}),e(r)}}})}$t(){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),{})}}St(e){var{flags:t,flagVariants:i}=this.$t();
1this.featureFlagEventHandlers.forEach(s=>s(t,i,{errorsLoading:e}))}setPersonPropertiesForFlags(e,t){void 0===t&&(t=!0);var i=this._instance.get_property(tW)||{};this._instance.register({[tW]:x({},i,e)}),t&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister(tW)}setGroupPropertiesForFlags(e,t){void 0===t&&(t=!0);var i=this._instance.get_property(tK)||{};0!==Object.keys(i).length&&Object.keys(i).forEach(t=>{i[t]=x({},i[t],e[t]),delete e[t]}),this._instance.register({[tK]:x({},i,e)}),t&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){var t=this._instance.get_property(tK)||{};this._instance.register({[tK]:x({},t,{[e]:{}})})}else this._instance.unregister(tK)}reset(){this.et=!1,this.rt=!1,this.st=!1,this.nt=!1,this.ot=!1,this.$anon_distinct_id=void 0,this.Et(),this.it=!1}}var i6=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"];class i4{constructor(e,t){this.N=e,this.props={},this.kt=!1,this.Pt=(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.B=this.Tt(e),this.load(),e.debug&&td.info("Persistence loaded",e.persistence,x({},this.props)),this.update_config(e,e,t),this.save()}isDisabled(){return!!this.Rt}Tt(e){-1===i6.indexOf(e.persistence.toLowerCase())&&(td.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var t,i,s=(void 0===(t=e.cookie_persisted_properties||[])&&(t=[]),i=[...ip,...t],x({},id,{D:function(e){try{var t={};try{t=ic.D(e)||{}}catch(e){}var i=ty(t,JSON.parse(id.A(e)||"{}"));return id.L(e,i),i}catch(e){}return null},L:function(e,t,s,r,n,a){try{id.L(e,t,void 0,void 0,a);var o={};i.forEach(e=>{t[e]&&(o[e]=t[e])}),Object.keys(o).length&&ic.L(e,o,s,r,n,a)}catch(e){id.M(e)}},j:function(e,t){try{null==o||o.localStorage.removeItem(e),ic.j(e,t)}catch(e){id.M(e)}}})),r=e.persistence.toLowerCase();return"localstorage"===r&&id.F()?id:"localstorage+cookie"===r&&s.F()?s:"sessionstorage"===r&&im.F()?im:"memory"===r?iv:"cookie"===r?ic:s.F()?s:ic}vt(e){var t=null!=e?e:this.N.feature_flag_cache_ttl_ms;if(!t||t<=0)return!1;var i=this.props[tX];return!i||"number"!=typeof i||Date.now()-i>t}properties(){var e={};return tm(this.props,(t,i)=>{if(i===tG&&L(t)){if(!this.vt())for(var s,r=Object.keys(t),n=0;n<r.length;n++)e["$feature/"+r[n]]=t[r[n]]}else s=!1,(H(t7)?s:h&&t7.indexOf===h?-1!=t7.indexOf(i):(tm(t7,function(e){if(s||(s=e===i))return tv}),s))||(e[i]=t)}),e}load(){if(!this.Rt){var e=this.B.D(this.Pt);e&&(this.props=ty({},e))}}save(){this.Rt||this.B.L(this.Pt,this.props,this.It,this.Ct,this.Ot,this.N.debug)}remove(){this.B.j(this.Pt,!1),this.B.j(this.Pt,!0)}clear(){this.remove(),this.props={}}register_once(e,t,i){if(L(e)){j(t)&&(t="None"),this.It=j(i)?this.Ft:i;var s=!1;if(tm(e,(e,i)=>{this.props.hasOwnProperty(i)&&this.props[i]!==t||(this.props[i]=e,s=!0)}),s)return this.save(),!0}return!1}register(e,t){if(L(e)){this.It=j(t)?this.Ft:t;var i=!1;if(tm(e,(t,s)=>{e.hasOwnProperty(s)&&this.props[s]!==t&&(this.props[s]=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.kt){var e=iU(this.N.custom_campaign_params,this.N.mask_personal_data_properties,this.N.custom_personal_data_properties);N(tS(e))||this.register(e),this.kt=!0}}update_search_keyword(){var e;this.register((e=null==p?void 0:p.referrer)?iB(e):{})}update_referrer_info(){var e;this.register_once({$referrer:iz(),$referring_domain:null!=p&&p.referrer&&(null==(e=i$(p.referrer))?void 0:e.host)||"$direct"},void 0)}set_initial_person_info(){this.props[t2]||this.props[t3]||this.register_once({[t5]:iV(this.N.mask_personal_data_properties,this.N.custom_personal_data_properties)},void 0)}get_initial_props(){var e={};tm([t3,t2],t=>{var i=this.props[t];i&&tm(i,function(t,i){e["$initial_"+F(i)]=t})});var t,i,s=this.props[t5];return s&&ty(e,(t=iW(s),i={},tm(t,function(e,t){i["$initial_"+F(t)]=e}),i)),e}safe_merge(e){return tm(this.props,function(t,i){i in e||(e[i]=t)}),e}
1update_config(e,t,i){if(this.Ft=this.It=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||!((e,t)=>{if(e.length!==t.length)return!1;var i=[...e].sort(),s=[...t].sort();return i.every((e,t)=>e===s[t])})(e.cookie_persisted_properties||[],t.cookie_persisted_properties||[])){var s=this.Tt(e),r=this.props;this.clear(),this.B=s,this.props=r,this.save()}}set_disabled(e){this.Rt=e,this.Rt?this.remove():this.save()}set_cross_subdomain(e){e!==this.Ct&&(this.Ct=e,this.remove(),this.save())}set_secure(e){e!==this.Ot&&(this.Ot=e,this.remove(),this.save())}set_event_timer(e,t){var i=this.props[t$]||{};i[e]=t,this.props[t$]=i,this.save()}remove_event_timer(e){var t=(this.props[t$]||{})[e];return j(t)||(delete this.props[t$][e],this.save()),t}get_property(e){return this.props[e]}set_property(e,t){this.props[e]=t,this.save()}}var i8="events",i7="cancelEvents",i9="survey shown",se="survey sent",st="popover",si=((nf={}).SHOWN="product tour shown",nf.DISMISSED="product tour dismissed",nf.COMPLETED="product tour completed",nf.STEP_SHOWN="product tour step shown",nf.STEP_COMPLETED="product tour step completed",nf.BUTTON_CLICKED="product tour button clicked",nf.STEP_SELECTOR_FAILED="product tour step selector failed",nf.BANNER_CONTAINER_SELECTOR_FAILED="product tour banner container selector failed",nf.BANNER_ACTION_CLICKED="product tour banner action clicked",nf),ss=((ng={}).TOUR_ID="$product_tour_id",ng.TOUR_NAME="$product_tour_name",ng.TOUR_ITERATION="$product_tour_iteration",ng.TOUR_RENDER_REASON="$product_tour_render_reason",ng.TOUR_STEP_ID="$product_tour_step_id",ng.TOUR_STEP_ORDER="$product_tour_step_order",ng.TOUR_STEP_TYPE="$product_tour_step_type",ng.TOUR_DISMISS_REASON="$product_tour_dismiss_reason",ng.TOUR_BUTTON_TEXT="$product_tour_button_text",ng.TOUR_BUTTON_ACTION="$product_tour_button_action",ng.TOUR_BUTTON_LINK="$product_tour_button_link",ng.TOUR_BUTTON_TOUR_ID="$product_tour_button_tour_id",ng.TOUR_STEPS_COUNT="$product_tour_steps_count",ng.TOUR_STEP_SELECTOR="$product_tour_step_selector",ng.TOUR_STEP_SELECTOR_FOUND="$product_tour_step_selector_found",ng.TOUR_STEP_ELEMENT_TAG="$product_tour_step_element_tag",ng.TOUR_STEP_ELEMENT_ID="$product_tour_step_element_id",ng.TOUR_STEP_ELEMENT_CLASSES="$product_tour_step_element_classes",ng.TOUR_STEP_ELEMENT_TEXT="$product_tour_step_element_text",ng.TOUR_ERROR="$product_tour_error",ng.TOUR_MATCHES_COUNT="$product_tour_matches_count",ng.TOUR_FAILURE_PHASE="$product_tour_failure_phase",ng.TOUR_WAITED_FOR_ELEMENT="$product_tour_waited_for_element",ng.TOUR_WAIT_DURATION_MS="$product_tour_wait_duration_ms",ng.TOUR_BANNER_SELECTOR="$product_tour_banner_selector",ng.TOUR_LINKED_SURVEY_ID="$product_tour_linked_survey_id",ng.USE_MANUAL_SELECTOR="$use_manual_selector",ng.INFERENCE_DATA_PRESENT="$inference_data_present",ng.TOUR_LAST_SEEN_DATE="$product_tour_last_seen_date",ng.TOUR_TYPE="$product_tour_type",ng),sr=tp("[RateLimiter]");class sn{constructor(e){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=e=>{var t=e.text;if(t&&t.length)try{(JSON.parse(t).quota_limited||[]).forEach(e=>{sr.info((e||"events")+" is quota limited."),this.serverLimits[e]=(new Date).getTime()+6e4})}catch(e){return void sr.warn('could not rate limit - continuing. Error: "'+(null==e?void 0:e.message)+'"',{text:t})}},this.instance=e,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){var e;return(null==(e=this.instance.config.rate_limiting)?void 0:e.events_per_second)||10}get captureEventsBurstLimit(){var e;return Math.max((null==(e=this.instance.config.rate_limiting)?void 0:e.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}clientRateLimitContext(e){void 0===e&&(e=!1);var t,i,s,{captureEventsBurstLimit:r,captureEventsPerSecond:n}=this,a=(new Date).getTime(),o=null!=(t=null==(i=this.instance.persistence)?void 0:i.get_property(t1))?t:{tokens:r,last:a};o.tokens+=(a-o.last)/1e3*n,o.last=a,o.tokens>r&&(o.tokens=r);var l=o.tokens<1;return l||e||(o.tokens=Math.max(0,o.tokens-1)),!l||this.lastEventRateLimited||e||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+n+" events per second and "+r+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=l,null==(s=this.instance.persistence)||s.set_property(t1,o),{isRateLimited:l,remainingTokens:o.tokens}}isServerRateLimited(e){var t=this.serverLimits[e||"events"]||!1;return!1!==t&&(new Date).getTime()<t}}var sa=tp("[RemoteConfig]");class so{constructor(e){this._instance=e}get remoteConfig(){var e;return null==(e=y._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.config}Mt(e){var t,i;null!=(t=y.__PosthogExtensions__)&&t.loadExternalDependency?null==(i=y.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"remote-config",()=>e(this.remoteConfig)):e()}At(e){this._instance._send_request({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 sa.info("Using preloaded remote config",this.remoteConfig),this.Dt(this.remoteConfig),void this.Lt();if(this._instance.xt())return void sa.warn("Remote config is disabled. Falling back to local config.");this.Mt(e=>{e?(this.Dt(e),this.Lt()):(sa.info("No config found after loading remote JS config. Falling back to JSON."),this.At(e=>{this.Dt(e),this.Lt()}))})}catch(e){sa.error("Error loading remote config",e)}}stop(){this.jt&&(clearInterval(this.jt),this.jt=void 0)}refresh(){this._instance.xt()||"hidden"===(null==p?void 0:p.visibilityState)||this._instance.featureFlags.reloadFeatureFlags()}Lt(){var e;if(!this.jt){var t=null!=(e=this._instance.config.remote_config_refresh_interval_ms)?e:3e5;0!==t&&(this.jt=setInterval(()=>{this.refresh()},t))}}Dt(e){e||sa.error("Failed to fetch remote config from PostHog."),this._instance.Dt(null!=e?e:{}),!1!==(null==e?void 0:e.hasFeatureFlags)&&(this._instance.config.advanced_disable_feature_flags_on_first_load||this._instance.featureFlags.ensureFlagsLoaded())}}var sl=Uint8Array,su=Uint16Array,sc=Uint32Array,sh=new sl([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]),sd=new sl([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]),sp=new sl([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),sf=function(e,t){for(var i=new su(31),s=0;s<31;++s)i[s]=t+=1<<e[s-1];var r=new sc(i[30]);for(s=1;s<30;++s)for(var n=i[s];n<i[s+1];++n)r[n]=n-i[s]<<5|s;return[i,r]},sg=sf(sh,2),sv=sg[0],s_=sg[1];sv[28]=258,s_[258]=28;for(var sm=sf(sd,0)[1],sy=new su(32768),sb=0;sb<32768;++sb){var sw=(43690&sb)>>>1|(21845&sb)<<1;sw=(61680&(sw=(52428&sw)>>>2|(13107&sw)<<2))>>>4|(3855&sw)<<4,sy[sb]=((65280&sw)>>>8|(255&sw)<<8)>>>1}var sE=function(e,t,i){for(var s=e.length,r=0,n=new su(t);r<s;++r)++n[e[r]-1];var a,o=new su(t);for(r=0;r<t;++r)o[r]=o[r-1]+n[r-1]<<1;if(i){a=new su(1<<t);var l=15-t;for(r=0;r<s;++r)if(e[r])for(var u=r<<4|e[r],c=t-e[r],h=o[e[r]-1]++<<c,d=h|(1<<c)-1;h<=d;++h)a[sy[h]>>>l]=u}else for(a=new su(s),r=0;r<s;++r)a[r]=sy[o[e[r]-1]++]>>>15-e[r];return a},sx=new sl(288);for(sb=0;sb<144;++sb)sx[sb]=8;for(sb=144;sb<256;++sb)sx[sb]=9;for(sb=256;sb<280;++sb)sx[sb]=7;for(sb=280;sb<288;++sb)sx[sb]=8;var sS=new sl(32);for(sb=0;sb<32;++sb)sS[sb]=5;var sk=sE(sx,9,0),sP=sE(sS,5,0),sO=function(e){return(e/8|0)+(7&e&&1)},sC=function(e,t,i){(null==i||i>e.length)&&(i=e.length);var s=new(e instanceof su?su:e instanceof sc?sc:sl)(i-t);return s.set(e.subarray(t,i)),s},sT=function(e,t,i){i<<=7&t;var s=t/8|0;e[s]|=i,e[s+1]|=i>>>8},sF=function(e,t,i){i<<=7&t;var s=t/8|0;e[s]|=i,e[s+1]|=i>>>8,e[s+2]|=i>>>16},s$=function(e,t){for(var i=[],s=0;s<e.length;++s)e[s]&&i.push({s:s,f:e[s]});var r=i.length,n=i.slice();if(!r)return[new sl(0),0];if(1==r){var a=new sl(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],u=0,c=1,h=2;for(i[0]={s:-1,f:o.f+l.f,l:o,r:l};c!=r-1;)o=i[i[u].f<i[h].f?u++:h++],l=i[u!=c&&i[u].f<i[h].f?u++:h++],i[c++]={s:-1,f:o.f+l.f,l:o,r:l};var d=n[0].s;for(s=1;s<r;++s)n[s].s>d&&(d=n[s].s);var p=new su(d+1),f=sI(i[c-1],p,0);if(f>t){s=0;var g=0,v=f-t,_=1<<v;for(n.sort(function(e,t){return p[t.s]-p[e.s]||e.f-t.f});s<r;++s){var m=n[s].s;if(!(p[m]>t))break;g+=_-(1<<f-p[m]),p[m]=t}for(g>>>=v;g>0;){var y=n[s].s;p[y]<t?g-=1<<t-p[y]++-1:++s}for(;s>=0&&g;--s){var b=n[s].s;p[b]==t&&(--p[b],++g)}f=t}return[new sl(p),f]},sI=function(e,t,i){return -1==e.s?Math.max(sI(e.l,t,i+1),sI(e.r,t,i+1)):t[e.s]=i},sR=function(e){for(var t=e.length;t&&!e[--t];);for(var i=new su(++t),s=0,r=e[0],n=1,a=function(e){i[s++]=e},o=1;o<=t;++o)if(e[o]==r&&o!=t)++n;else{if(!r&&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(r),--n;n>6;n-=6)a(8304);n>2&&(a(n-3<<5|8208),n=0)}for(;n--;)a(r);n=1,r=e[o]}return[i.subarray(0,s),t]},sA=function(e,t){for(var i=0,s=0;s<t.length;++s)i+=e[s]*t[s];return i},sM=function(e,t,i){var s=i.length,r=sO(t+2);e[r]=255&s,e[r+1]=s>>>8,e[r+2]=255^e[r],e[r+3]=255^e[r+1];for(var n=0;n<s;++n)e[r+n+4]=i[n];return 8*(r+4+s)},sD=function(e,t,i,s,r,n,a,o,l,u,c){sT(t,c++,i),++r[256];for(var h=s$(r,15),d=h[0],p=h[1],f=s$(n,15),g=f[0],v=f[1],_=sR(d),m=_[0],y=_[1],b=sR(g),w=b[0],E=b[1],x=new su(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=s$(x,7),P=k[0],O=k[1],C=19;C>4&&!P[sp[C-1]];--C);var T,F,$,I,R=u+5<<3,A=sA(r,sx)+sA(n,sS)+a,M=sA(r,d)+sA(n,g)+a+14+3*C+sA(x,P)+(2*x[16]+3*x[17]+7*x[18]);if(R<=A&&R<=M)return sM(t,c,e.subarray(l,l+u));if(sT(t,c,1+(M<A)),c+=2,M<A){T=sE(d,p,0),F=d,$=sE(g,v,0),I=g;var D=sE(P,O,0);for(sT(t,c,y-257),sT(t,c+5,E-1),sT(t,c+10,C-4),c+=14,S=0;S<C;++S)sT(t,c+3*S,P[sp[S]]);c+=3*C;for(var L=[m,w],N=0;N<2;++N){var j=L[N];for(S=0;S<j.length;++S){var q=31&j[S];sT(t,c,D[q]),c+=P[q],q>
115&&(sT(t,c,j[S]>>>5&127),c+=j[S]>>>12)}}}else T=sk,F=sx,$=sP,I=sS;for(S=0;S<o;++S)if(s[S]>255){sF(t,c,T[(q=s[S]>>>18&31)+257]),c+=F[q+257],q>7&&(sT(t,c,s[S]>>>23&31),c+=sh[q]);var U=31&s[S];sF(t,c,$[U]),c+=I[U],U>3&&(sF(t,c,s[S]>>>5&8191),c+=sd[U])}else sF(t,c,T[s[S]]),c+=F[s[S]];return sF(t,c,T[256]),c+F[256]},sL=new sc([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),sN=function(){for(var e=new sc(256),t=0;t<256;++t){for(var i=t,s=9;--s;)i=(1&i&&0xedb88320)^i>>>1;e[t]=i}return e}(),sj=function(e,t,i){for(;i;++t)e[t]=i,i>>>=8},sq=function(e){var t,i,s,r,n="";for(t=i=0,s=(e=(e+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n")).length,r=0;r<s;r++){var a=e.charCodeAt(r),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),H(o)||(i>t&&(n+=e.substring(t,i)),n+=o,t=i=r+1)}return i>t&&(n+=e.substring(t,e.length)),n},sU=!!v||!!g,sH=function(e,t,i){void 0===i&&(i=!0);var s,[r,n]=e.split("?"),a=x({},t),o=null!=(s=null==n?void 0:n.split("&").map(e=>{var t,[s,r]=e.split("="),n=i&&null!=(t=a[s])?t:r;return delete a[s],s+"="+n}))?s:[],l=iI(a);return l&&o.push(l),r+"?"+o.join("&")},sB=(e,t)=>JSON.stringify(e,(e,t)=>"bigint"==typeof t?t.toString():t,t),sG=e=>{var{data:t,compression:i}=e;if(t){if(i===iF.GZipJS){var s,r,n,a,o,l,u,c,h=(s=function(e,t){var i=e.length;if("u">typeof TextEncoder)return(new TextEncoder).encode(e);for(var s=new sl(e.length+(e.length>>>1)),r=0,n=function(e){s[r++]=e},a=0;a<i;++a){if(r+5>s.length){var o=new sl(r+8+(i-a<<1));o.set(s),s=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 sC(s,0,r)}(sB(t)),r={mtime:0},n=0xffffffff,a={p:function(e){for(var t=n,i=0;i<e.length;++i)t=sN[255&t^e[i]]^t>>>8;n=t},d:function(){return 0xffffffff^n}},o=s.length,a.p(s),c=(l=10+(r.filename&&r.filename.length+1||0),u=function(e,t,i,s,r,n){var a=e.length,o=new sl(s+a+5*(1+Math.floor(a/7e3))+8),l=o.subarray(s,o.length-8),u=0;if(!t||a<8)for(var c=0;c<=a;c+=65535){var h=c+65535;h<a?u=sM(l,u,e.subarray(c,h)):(l[c]=n,u=sM(l,u,e.subarray(c,a)))}else{for(var d=sL[t-1],p=d>>>13,f=8191&d,g=(1<<i)-1,v=new su(32768),_=new su(g+1),m=Math.ceil(i/3),y=2*m,b=function(t){return(e[t]^e[t+1]<<m^e[t+2]<<y)&g},w=new sc(25e3),E=new su(288),x=new su(32),S=0,k=0,P=(c=0,0),O=0,C=0;c<a;++c){var T=b(c),F=32767&c,$=_[T];if(v[F]=$,_[T]=F,O<=c){var I=a-c;if((S>7e3||P>24576)&&I>423){u=sD(e,l,0,w,E,x,k,P,C,c-C,u),P=S=k=0,C=c;for(var R=0;R<286;++R)E[R]=0;for(R=0;R<30;++R)x[R]=0}var A=2,M=0,D=f,L=F-$&32767;if(I>2&&T==b(c-L))for(var N=Math.min(p,I)-1,j=Math.min(32767,c),q=Math.min(258,I);L<=j&&--D&&F!=$;){if(e[c+A]==e[c+A-L]){for(var U=0;U<q&&e[c+U]==e[c+U-L];++U);if(U>A){if(A=U,M=L,U>N)break;var H=Math.min(L,U-2),B=0;for(R=0;R<H;++R){var G=c-L+R+32768&32767,z=G-v[G]+32768&32767;z>B&&(B=z,$=G)}}}L+=(F=$)-($=v[F])+32768&32767}if(M){w[P++]=0x10000000|s_[A]<<18|sm[M];var V=31&s_[A],W=31&sm[M];k+=sh[V]+sd[W],++E[257+V],++x[W],O=c+A,++S}else w[P++]=e[c],++E[e[c]]}}u=sD(e,l,n,w,E,x,k,P,C,c-C,u)}return sC(o,0,s+sO(u)+8)}(s,null==r.level?6:r.level,null==r.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):12+r.mem,l,8,!0)).length,function(e,t){var i=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:2*(9==t.level),e[9]=3,0!=t.mtime&&sj(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),i){e[3]=8;for(var s=0;s<=i.length;++s)e[s+10]=i.charCodeAt(s)}}(u,r),sj(u,c-8,a.d()),sj(u,c-4,o),u);return{contentType:"text/plain",body:h.buffer.slice(h.byteOffset,h.byteOffset+h.byteLength),estimatedSize:h.byteLength}}if(i===iF.Base64){let e;var d="data="+encodeURIComponent("string"==typeof(e=function(e){var t,i,s,r,n,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=0,l=0,u="",c=[];if(!e)return e;e=sq(e);do t=(n=e.charCodeAt(o++)<<16|e.charCodeAt(o++)<<8|e.charCodeAt(o++))>>18&63,i=n>>12&63,s=n>>6&63,r=63&n,c[l++]=a.charAt(t)+a.charAt(i)+a.charAt(s)+a.charAt(r);while(o<e.length)switch(u=c.join(""),e.length%3){case 1:u=u.slice(0,-2)+"==";break;case 2:u=u.slice(0,-1)+"="}return u}(sB(t)))?e:sB(e));return{contentType:"application/x-www-form-urlencoded",body:d,estimatedSize:new Blob([d]).size}}var p=sB(t);return{contentType:"application/json",body:p,estimatedSize:new Blob([p]).size}}},sz=[];g&&sz.push({transport:"fetch",method:e=>{var t,i,{contentType:s,body:r,estimatedSize:n}=null!=(t=sG(e))?t:{},a=new Headers;tm(e.headers,function(e,t){a.append(t,e)}),s&&a.append("Content-Type",s);var o=e.url,l=null;if(_){var u=new _;l={signal:u.signal,timeout:setTimeout(()=>u.abort(),e.timeout)}}g(o,x({method:(null==e?void 0:e.method)||"GET",headers:a,keepalive:"POST"===e.method&&52428.8>(n||0),body:r,signal:null==(i=l)?void 0:i.signal},e.fetchOptions)).then(t=>t.text().then(i=>{var s={statusCode:t.status,text:i};if(200===t.status)try{s.json=JSON.parse(i)}catch(e){td.error(e)}null==e.callback||e.callback(s)})).catch(t=>{td.error(t),null==e.callback||e.callback({statusCode:0,error:t})}).finally(()=>l?clearTimeout(l.timeout):null)}}),v&&sz.push({transport:"XHR",method:e=>{var t,i=new v;i.open(e.method||"GET",e.url,!0);var{contentType:s,body:r}=null!=(t=sG(e))?t:{};tm(e.headers,function(e,t){i.setRequestHeader(t,e)}),s&&i.setRequestHeader("Content-Type",s),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};
1if(200===i.status)try{t.json=JSON.parse(i.responseText)}catch(e){}null==e.callback||e.callback(t)}},i.send(r)}}),null!=d&&d.sendBeacon&&sz.push({transport:"sendBeacon",method:e=>{var t=sH(e.url,{beacon:"1"});try{var i,{contentType:s,body:r}=null!=(i=sG(e))?i:{},n="string"==typeof r?new Blob([r],{type:s}):r;d.sendBeacon(t,n)}catch(e){}}});class sV{constructor(e,t){this.Nt=!0,this.Ut=[],this.zt=Z((null==t?void 0:t.flush_interval_ms)||3e3,250,5e3,td.createLogger("flush interval"),3e3),this.Ht=e}enqueue(e){this.Ut.push(e),this.Bt||this.qt()}unload(){this.Vt();var e=Object.values(this.Ut.length>0?this.Wt():{});[...e.filter(e=>0===e.url.indexOf("/e")),...e.filter(e=>0!==e.url.indexOf("/e"))].map(e=>{this.Ht(x({},e,{transport:"sendBeacon"}))})}enable(){this.Nt=!1,this.qt()}qt(){var e=this;this.Nt||(this.Bt=setTimeout(()=>{if(this.Vt(),this.Ut.length>0){var t=this.Wt();for(var i in t)!function(){var s=t[i],r=(new Date).getTime();s.data&&M(s.data)&&tm(s.data,e=>{e.offset=Math.abs(e.timestamp-r),delete e.timestamp}),e.Ht(s)}()}},this.zt))}Vt(){clearTimeout(this.Bt),this.Bt=void 0}Wt(){var e={};return tm(this.Ut,t=>{var i,s=(t?t.batchKey:null)||t.url;j(e[s])&&(e[s]=x({},t,{data:[]})),null==(i=e[s].data)||i.push(t.data)}),this.Ut=[],e}}var sW=["retriesPerformedSoFar"];class sK{constructor(e){this.Gt=!1,this.Yt=3e3,this.Ut=[],this._instance=e,this.Ut=[],this.Jt=!0,!j(o)&&"onLine"in o.navigator&&(this.Jt=o.navigator.onLine,this.Kt=()=>{this.Jt=!0,this.Xt()},this.Qt=()=>{this.Jt=!1},tO(o,"online",this.Kt),tO(o,"offline",this.Qt))}get length(){return this.Ut.length}retriableRequest(e){var{retriesPerformedSoFar:t}=e,i=S(e,sW);z(t)&&(i.url=sH(i.url,{retry_count:t})),this._instance._send_request(x({},i,{callback:e=>{200!==e.statusCode&&(e.statusCode<400||e.statusCode>=500)&&(null!=t?t:0)<10?this.Zt(x({retriesPerformedSoFar:t},i)):null==i.callback||i.callback(e)}}))}Zt(e){var t,i,s,r=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=r+1;var n=(s=(Math.random()-.5)*((i=Math.min(18e5,t=3e3*Math.pow(2,r)))-t/2),Math.ceil(i+s)),a=Date.now()+n;this.Ut.push({retryAt:a,requestOptions:e});var o="Enqueued failed request for retry in "+n;navigator.onLine||(o+=" (Browser is offline)"),td.warn(o),this.Gt||(this.Gt=!0,this.ti())}ti(){(this.ii&&clearTimeout(this.ii),0===this.Ut.length)?(this.Gt=!1,this.ii=void 0):this.ii=setTimeout(()=>{this.Jt&&this.Ut.length>0&&this.Xt(),this.ti()},this.Yt)}Xt(){var e=Date.now(),t=[],i=this.Ut.filter(i=>i.retryAt<e||(t.push(i),!1));if(this.Ut=t,i.length>0)for(var{requestOptions:s}of i)this.retriableRequest(s)}unload(){for(var{requestOptions:e}of(this.ii&&(clearTimeout(this.ii),this.ii=void 0),this.Gt=!1,j(o)||(this.Kt&&(o.removeEventListener("online",this.Kt),this.Kt=void 0),this.Qt&&(o.removeEventListener("offline",this.Qt),this.Qt=void 0)),this.Ut))try{this._instance._send_request(x({},e,{transport:"sendBeacon"}))}catch(e){td.error(e)}this.Ut=[]}}class sQ{constructor(e){this.ei=()=>{this.ri||(this.ri={});var e,t,i,s,r=this.scrollElement(),n=this.scrollY(),a=r?Math.max(0,r.scrollHeight-r.clientHeight):0,o=n+((null==r?void 0:r.clientHeight)||0),l=(null==r?void 0:r.scrollHeight)||0;this.ri.lastScrollY=Math.ceil(n),this.ri.maxScrollY=Math.max(n,null!=(e=this.ri.maxScrollY)?e:0),this.ri.maxScrollHeight=Math.max(a,null!=(t=this.ri.maxScrollHeight)?t:0),this.ri.lastContentY=o,this.ri.maxContentY=Math.max(o,null!=(i=this.ri.maxContentY)?i:0),this.ri.maxContentHeight=Math.max(l,null!=(s=this.ri.maxContentHeight)?s:0)},this._instance=e}getContext(){return this.ri}resetContext(){var e=this.ri;return setTimeout(this.ei,0),e}startMeasuringScrollPosition(){tO(o,"scroll",this.ei,{capture:!0}),tO(o,"scrollend",this.ei,{capture:!0}),tO(o,"resize",this.ei)}scrollElement(){if(!this._instance.config.scroll_root_selector)return null==o?void 0:o.document.documentElement;for(var e of M(this._instance.config.scroll_root_selector)?this._instance.config.scroll_root_selector:[this._instance.config.scroll_root_selector]){var t=null==o?void 0:o.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 o&&(o.scrollY||o.pageYOffset||o.document.documentElement.scrollTop)||0}scrollX(){if(this._instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollLeft||0}return o&&(o.scrollX||o.pageXOffset||o.document.documentElement.scrollLeft)||0}}var sY=e=>iV(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,s){this.si=e=>{var t=this.ni();if(!t||t.sessionId!==e){var i={sessionId:e,props:this.oi(this._instance)};this.ai.register({[t0]:i})}},this._instance=e,this.li=t,this.ai=i,this.oi=s||sY,this.li.onSessionId(this.si)}ni(){return this.ai.props[t0]}getSetOnceProps(){var e,t=null==(e=this.ni())?void 0:e.props;return t?"r"in t?iW(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 tm(tS(this.getSetOnceProps()),(t,i)=>{"$current_url"===i&&(i="url"),e["$session_entry_"+F(i)]=t}),e}}class sX{constructor(){this.ui={},this.ui={}}on(e,t){return this.ui[e]||(this.ui[e]=[]),this.ui[e].push(t),()=>{this.ui[e]=this.ui[e].filter(e=>e!==t)}}emit(e,t){for(var i of this.ui[e]||[])i(t);for(var s of this.ui["*"]||[])s(e,t)}}var sZ=tp("[SessionId]");class s0{on(e,t){return this.hi.on(e,t)}constructor(e,t,i){if(this.di=[],this.vi=void 0,this.hi=new sX,this.ci=(e,t)=>!(!z(e)||!z(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.N=e.config,this.ai=e.persistence,this.fi=void 0,this.pi=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.gi=t||ia,this.mi=i||ia;var s,r=this.N.persistence_name||this.N.token,n=this.N.session_idle_timeout_seconds||1800;if(this._sessionTimeoutMs=1e3*Z(n,60,36e3,sZ.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.bi(),this.yi="ph_"+r+"_window_id",this.wi="ph_"+r+"_primary_window_exists",this.Ei()){var a=im.D(this.yi),o=im.D(this.wi);a&&!o?this.fi=a:im.j(this.yi),im.L(this.wi,!0)}if(null!=(s=this.N.bootstrap)&&s.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.N.bootstrap.sessionID);this.xi(this.N.bootstrap.sessionID,(new Date).getTime(),l)}catch(e){sZ.error("Invalid sessionID in bootstrap",e)}this.Si()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return j(this.di)&&(this.di=[]),this.di.push(e),this.pi&&e(this.pi,this.fi),()=>{this.di=this.di.filter(t=>t!==e)}}Ei(){return"memory"!==this.N.persistence&&!this.ai.Rt&&im.F()}$i(e){e!==this.fi&&(this.fi=e,this.Ei()&&im.L(this.yi,e))}ki(){return this.fi?this.fi:this.Ei()?im.D(this.yi):null}xi(e,t,i){e===this.pi&&t===this._sessionActivityTimestamp&&i===this._sessionStartTimestamp||(this._sessionStartTimestamp=i,this._sessionActivityTimestamp=t,this.pi=e,this.ai.register({[tH]:[t,e,i]}))}Pi(){var e=this.ai.props[tH];return M(e)&&2===e.length&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.xi(null,null,null)}destroy(){clearTimeout(this.Ti),this.Ti=void 0,this.vi&&o&&(o.removeEventListener("beforeunload",this.vi,{capture:!1}),this.vi=void 0),this.di=[]}Si(){this.vi=()=>{this.Ei()&&im.j(this.wi)},tO(o,"beforeunload",this.vi,{capture:!1})}checkAndGetSessionAndWindowId(e,t){if(void 0===e&&(e=!1),void 0===t&&(t=null),"always"===this.N.cookieless_mode)throw Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var i=t||(new Date).getTime(),[s,r,n]=this.Pi(),a=this.ki(),o=z(n)&&Math.abs(i-n)>864e5,l=!1,u=!r,c=!u&&!e&&this.ci(i,s);u||c||o?(r=this.gi(),a=this.mi(),sZ.info("new session ID generated",{sessionId:r,windowId:a,changeReason:{noSessionId:u,activityTimeout:c,sessionPastMaximumLength:o}}),n=i,l=!0):a||(a=this.mi(),l=!0);var h=z(s)&&e&&!o?s:i,d=z(n)?n:(new Date).getTime();return this.$i(a),this.xi(r,h,d),e||this.bi(),l&&this.di.forEach(e=>e(r,a,l?{noSessionId:u,activityTimeout:c,sessionPastMaximumLength:o}:void 0)),{sessionId:r,windowId:a,sessionStartTimestamp:d,changeReason:l?{noSessionId:u,activityTimeout:c,sessionPastMaximumLength:o}:void 0,lastActivityTimestamp:s}}bi(){clearTimeout(this.Ti),this.Ti=setTimeout(()=>{var[e]=this.Pi();if(this.ci((new Date).getTime(),e)){var t=this.pi;
1this.resetSessionId(),this.hi.emit("forcedIdleReset",{idleSessionId:t})}},1.1*this.sessionTimeoutMs)}}var s1=function(e,t){if(!e)return!1;var i=e.userAgent;if(i&&O(i,t))return!0;try{var s=null==e?void 0:e.userAgentData;if(null!=s&&s.brands&&s.brands.some(e=>O(null==e?void 0:e.brand,t)))return!0}catch(e){}return!!e.webdriver},s2=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 s3(e,t,i){return sB({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:i})}var s5={exact:(e,t)=>t.some(t=>e.some(e=>t===e)),is_not:(e,t)=>t.every(t=>e.every(e=>t!==e)),regex:(e,t)=>t.some(t=>e.some(e=>s2(t,e))),not_regex:(e,t)=>t.every(t=>e.every(e=>!s2(t,e))),icontains:(e,t)=>t.map(s6).some(t=>e.map(s6).some(e=>t.includes(e))),not_icontains:(e,t)=>t.map(s6).every(t=>e.map(s6).every(e=>!t.includes(e))),gt:(e,t)=>t.some(t=>{var i=parseFloat(t);return!isNaN(i)&&e.some(e=>i>parseFloat(e))}),lt:(e,t)=>t.some(t=>{var i=parseFloat(t);return!isNaN(i)&&e.some(e=>i<parseFloat(e))})},s6=e=>e.toLowerCase();function s4(e,t){return!e||Object.entries(e).every(e=>{var[i,s]=e,r=null==t?void 0:t[i];if(j(r)||H(r))return!1;var n=[String(r)],a=s5[s.operator];return!!a&&a(s.values,n)})}var s8=((nv={}).US="us",nv.EU="eu",nv.CUSTOM="custom",nv),s7="i.posthog.com";class s9{constructor(e){this.Ri={},this.instance=e}get apiHost(){var e=this.instance.config.api_host.trim().replace(/\/$/,"");return"https://app.posthog.com"===e?"https://us.i.posthog.com":e}get flagsApiHost(){var e=this.instance.config.flags_api_host;return e?e.trim().replace(/\/$/,""):this.apiHost}get uiHost(){var e,t=null==(e=this.instance.config.ui_host)?void 0:e.replace(/\/$/,"");return t||(t=this.apiHost.replace("."+s7,".posthog.com")),"https://app.posthog.com"===t?"https://us.posthog.com":t}get region(){return this.Ri[this.apiHost]||(/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.Ri[this.apiHost]=s8.US:/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.Ri[this.apiHost]=s8.EU:this.Ri[this.apiHost]=s8.CUSTOM),this.Ri[this.apiHost]}endpointFor(e,t){if(void 0===t&&(t=""),t&&(t="/"===t[0]?t:"/"+t),"ui"===e)return this.uiHost+t;if("flags"===e)return this.flagsApiHost+t;if(this.region===s8.CUSTOM)return this.apiHost+t;var i=s7+t;switch(e){case"assets":return"https://"+this.region+"-assets."+i;case"api":return"https://"+this.region+"."+i}}}var re=tp("[Surveys]"),rt="seenSurvey_",ri=e=>{var t;return t=""+rt+e.id,e.current_iteration&&e.current_iteration>0&&(t=""+rt+e.id+"_"+e.current_iteration),t},rs=["popover","widget","api"],rr={ignoreConditions:!1,ignoreDelay:!1,displayType:st},rn=tp("[PostHog ExternalIntegrations]"),ra={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class ro{constructor(e){this._instance=e}G(e,t){var i;null==(i=y.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,e,e=>{if(e)return rn.error("failed to load script",e);t()})}startIfEnabledOrStop(){var e,t=this,i=function(e){var i,s,n;!r||null!=(i=y.__PosthogExtensions__)&&null!=(i=i.integrations)&&i[e]||t.G(ra[e],()=>{var i;null==(i=y.__PosthogExtensions__)||null==(i=i.integrations)||null==(i=i[e])||i.start(t._instance)}),!r&&null!=(s=y.__PosthogExtensions__)&&null!=(s=s.integrations)&&s[e]&&(null==(n=y.__PosthogExtensions__)||null==(n=n.integrations)||null==(n=n[e])||n.stop())};for(var[s,r]of Object.entries(null!=(e=this._instance.config.integrations)?e:{}))i(s)}}var rl={},ru=0,rc=()=>{},rh="posthog",rd=!sU&&-1===(null==m?void 0:m.indexOf("MSIE"))&&-1===(null==m?void 0:m.indexOf("Mozilla")),rp=e=>{var t;return x({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,token:"",autocapture:!0,cross_subdomain_cookie:function(e){var t=null==e?void 0:e.hostname;if(!q(t))return!1;var i=t.split(".").slice(-2).join(".");for(var s of tk)if(i===s)return!1;return!0}(null==p?void 0:p.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:rc,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:null!=e?e:"unset",__preview_deferred_init_extensions:!1,debug:f&&q(null==f?void 0:f.search)&&-1!==f.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_conversations:!1,disable_product_tours:!1,disable_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:"https:"===(null==o||null==(t=o.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,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;td.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:rc,__preview_eager_load_replay:!1},{rageclick:!(e&&e>="2025-11-30")||{content_ignorelist:!0},capture_pageview:!(e&&e>="2025-05-24")||"history_change",session_recording:e&&e>="2025-11-30"?{strictMinimumDuration:!0}:{},external_scripts_inject_target:e&&e>="2026-01-30"?"head":"body",internal_or_test_user_hostname:e&&e>="2026-01-30"?/^(localhost|127\.0\.0\.1)$/:void 0})},rf=e=>{var t={};j(e.process_person)||(t.person_profiles=e.process_person),j(e.xhr_headers)||(t.request_headers=e.x
1hr_headers),j(e.cookie_name)||(t.persistence_name=e.cookie_name),j(e.disable_cookie)||(t.disable_persistence=e.disable_cookie),j(e.store_google)||(t.save_campaign_params=e.store_google),j(e.verbose)||(t.debug=e.verbose);var i=ty({},t,e);return M(e.property_blacklist)&&(j(e.property_denylist)?i.property_denylist=e.property_blacklist:M(e.property_denylist)?i.property_denylist=[...e.property_blacklist,...e.property_denylist]:td.error("Invalid value for property_denylist config: "+e.property_denylist)),i};class rg{constructor(){this.__forceAllowLocalhost=!1}get Ii(){return this.__forceAllowLocalhost}set Ii(e){td.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}class rv{Ci(e,t){if(e){var i=this.Oi.indexOf(e);-1!==i&&this.Oi.splice(i,1)}return this.Oi.push(t),null==t.initialize||t.initialize(),t}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 rg,this.Fi=!1,this.version=b.LIB_VERSION,this.yt=new sX,this.Oi=[],this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=rp(),this.SentryIntegration=iC,this.sentryIntegration=e=>{var t;return t=iO(this,e),{name:iP,processEvent:e=>t(e)}},this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.Mi=!1,this.Ai=null,this.Di=null,this.Li=null,this.featureFlags=new i5(this),this.scrollManager=new sQ(this),this.pageViewManager=new iT(this),this.rateLimiter=new sn(this),this.requestRouter=new s9(this),this.consent=new ib(this),this.externalIntegrations=new ro(this);var e,t=null!=(e=rv.__defaultExtensionClasses)?e:{};this.toolbar=t.toolbar&&new t.toolbar(this),this.surveys=t.surveys&&new t.surveys(this),this.conversations=t.conversations&&new t.conversations(this),this.logs=t.logs&&new t.logs(this),this.experiments=t.experiments&&new t.experiments(this),this.exceptions=t.exceptions&&new t.exceptions(this),this.people={set:(e,t,i)=>{var s=q(e)?{[e]:t}:e;this.setPersonProperties(s),null==i||i({})},set_once:(e,t,i)=>{var s=q(e)?{[e]:t}:e;this.setPersonProperties(void 0,s),null==i||i({})}},this.on("eventCaptured",e=>td.info('send "'+(null==e?void 0:e.event)+'"',e))}init(e,t,i){if(i&&i!==rh){var s,r=null!=(s=rl[i])?s:new rv;return r._init(e,t,i),rl[i]=r,rl[rh][i]=r,r}return this._init(e,t,i)}_init(e,t,i){if(void 0===t&&(t={}),j(e)||U(e))return td.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},t.debug=this.ji(t.debug),this.Ni=t,this.Ui=[],t.person_profiles?this.Di=t.person_profiles:t.process_person&&(this.Di=t.process_person),this.set_config(ty({},rp(t.defaults),rf(t),{name:i,token:e})),this.config.on_xhr_error&&td.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=t.disable_compression?void 0:iF.GZipJS;var s=this.zi();this.persistence=new i4(this.config,s),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new i4(x({},this.config,{persistence:"sessionStorage"}),s);var r=x({},this.persistence.props),n=x({},this.sessionPersistence.props);this.register({$initialization_time:(new Date).toISOString()}),this.Hi=new sV(e=>this.Bi(e),this.config.request_queue_config),this.qi=new sK(this),this.__request_queue=[];var a="always"===this.config.cookieless_mode||"on_reject"===this.config.cookieless_mode&&this.consent.isExplicitlyOptedOut();if(a||(this.sessionManager=new s0(this),this.sessionPropsManager=new sJ(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(td.info("Deferring extension initialization to improve startup performance"),setTimeout(()=>{this.Vi(a)},0)):(td.info("Initializing extensions synchronously"),this.Vi(a)),b.DEBUG=b.DEBUG||this.config.debug,b.DEBUG&&td.info("Starting in debug mode",{this:this,config:t,thisC:x({},this.config),p:r,s:n}
1),void 0!==(null==(l=t.bootstrap)?void 0:l.distinctID)){var l,u,c,h=this.config.get_device_id(ia()),d=null!=(u=t.bootstrap)&&u.isIdentifiedID?h:t.bootstrap.distinctID;this.persistence.set_property(tZ,null!=(c=t.bootstrap)&&c.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:t.bootstrap.distinctID,$device_id:d})}if(this.Wi()){var p,f,g=Object.keys((null==(p=t.bootstrap)?void 0:p.featureFlags)||{}).filter(e=>{var i;return!(null==(i=t.bootstrap)||null==(i=i.featureFlags)||!i[e])}).reduce((e,i)=>{var s;return e[i]=(null==(s=t.bootstrap)||null==(s=s.featureFlags)?void 0:s[i])||!1,e},{}),v=Object.keys((null==(f=t.bootstrap)?void 0:f.featureFlagPayloads)||{}).filter(e=>g[e]).reduce((e,i)=>{var s,r;return null!=(s=t.bootstrap)&&null!=(s=s.featureFlagPayloads)&&s[i]&&(e[i]=null==(r=t.bootstrap)||null==(r=r.featureFlagPayloads)?void 0:r[i]),e},{});this.featureFlags.receivedFeatureFlags({featureFlags:g,featureFlagPayloads:v})}if(a)this.register_once({distinct_id:t8,$device_id:null},"");else if(!this.get_distinct_id()){var _=this.config.get_device_id(ia());this.register_once({distinct_id:_,$device_id:_},""),this.persistence.set_property(tZ,"anonymous")}return tO(o,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),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 s=i=>{var s=()=>i.anonymousId()||ia();e.config.get_device_id=s,i.id()&&(e.register({distinct_id:i.id(),$device_id:s()}),e.persistence.set_property(tZ,"identified")),t()},r=i.user();"then"in r&&D(r.then)?r.then(s):s(r)}(e,()=>{var s;i.register((Promise&&Promise.resolve||ik.warn("This browser does not have Promise support, and can not use the segment integration"),s=(t,i)=>{if(!i)return t;t.event.userId||t.event.anonymousId===e.get_distinct_id()||(ik.info("No userId set, resetting PostHog"),e.reset()),t.event.userId&&t.event.userId!==e.get_distinct_id()&&(ik.info("UserId set, identifying with PostHog"),e.identify(t.event.userId));var s=e.calculateEventProperties(i,t.event.properties);return t.event.properties=Object.assign({},s,t.event.properties),t},{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:e=>s(e,e.event.event),page:e=>s(e,"$pageview"),identify:e=>s(e,"$identify"),screen:e=>s(e,"$screen")})).then(()=>{t()})})}(this,()=>this.Gi()):this.Gi(),D(this.config._onCapture)&&this.config._onCapture!==rc&&(td.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",e=>this.config._onCapture(e.event,e))),this.config.ip&&td.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}Vi(e){var t,i,s,r,n,a,o=performance.now(),l=x({},rv.__defaultExtensionClasses,this.config.__extensionClasses),u=[];l.exceptions&&this.Oi.push(this.exceptions=null!=(t=this.exceptions)?t:new l.exceptions(this)),l.historyAutocapture&&this.Oi.push(this.historyAutocapture=new l.historyAutocapture(this)),l.tracingHeaders&&this.Oi.push(new l.tracingHeaders(this)),l.siteApps&&this.Oi.push(this.siteApps=new l.siteApps(this)),l.sessionRecording&&!e&&this.Oi.push(this.sessionRecording=new l.sessionRecording(this)),this.config.disable_scroll_properties||u.push(()=>{this.scrollManager.startMeasuringScrollPosition()}),l.autocapture&&this.Oi.push(this.autocapture=new l.autocapture(this)),l.surveys&&this.Oi.push(this.surveys=null!=(i=this.surveys)?i:new l.surveys(this)),l.logs&&this.Oi.push(this.logs=null!=(s=this.logs)?s:new l.logs(this)),l.conversations&&this.Oi.push(this.conversations=null!=(r=this.conversations)?r:new l.conversations(this)),l.productTours&&this.Oi.push(this.productTours=new l.productTours(this)),l.heatmaps&&this.Oi.push(this.heatmaps=new l.heatmaps(this)),l.webVitalsAutocapture&&this.Oi.push(this.webVitalsAutocapture=new l.webVitalsAutocapture(this)),l.exceptionObserver&&this.Oi.push(this.exceptionObserver=new l.exceptionObserver(this)),l.deadClicksAutocapture&&this.Oi.push(this.deadClicksAutocapture=new l.deadClicksAutocapture(this,ix)),l.toolbar&&this.Oi.push(this.toolbar=null!=(n=this.toolbar)?n:new l.toolbar(this)),l.experiments&&this.Oi.push(this.experiments=null!=(a=this.experiments)?a:new l.experiments(this)),this.Oi.forEac
1h(e=>{e.initialize&&u.push(()=>{null==e.initialize||e.initialize()})}),u.push(()=>{if(this.Yi){var e=this.Yi;this.Yi=void 0,this.Dt(e)}}),this.Ji(u,o)}Ji(e,t){for(;e.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-t>=30&&e.length>0)return void setTimeout(()=>{this.Ji(e,t)},0);var i=e.shift();if(i)try{i()}catch(e){td.error("Error initializing extension:",e)}}var s=Math.round(performance.now()-t);this.register_for_session({$sdk_debug_extensions_init_method:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",$sdk_debug_extensions_init_time_ms:s}),this.config.__preview_deferred_init_extensions&&td.info("PostHog extensions initialized ("+s+"ms)")}Dt(e){var t;p&&p.body?(this.config.__preview_deferred_init_extensions&&(this.Yi=e),this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=C(e.supportedCompression,iF.GZipJS)?iF.GZipJS:C(e.supportedCompression,iF.Base64)?iF.Base64:void 0),null!=(t=e.analytics)&&t.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),this.set_config({person_profiles:this.Di?this.Di:"identified_only"}),this.Oi.forEach(t=>null==t.onRemoteConfig?void 0:t.onRemoteConfig(e))):(td.info("document not ready yet, trying again in 500 milliseconds..."),setTimeout(()=>{this.Dt(e)},500))}Gi(){try{this.config.loaded(this)}catch(e){td.critical("`loaded` function failed",e)}if(this.Ki(),this.config.internal_or_test_user_hostname&&null!=f&&f.hostname){var e=f.hostname,t=this.config.internal_or_test_user_hostname;("string"==typeof t?e===t:t.test(e))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout(()=>{(this.consent.isOptedIn()||"always"===this.config.cookieless_mode)&&this.Xi()},1),this.Qi=new so(this),this.Qi.load()}Ki(){var e;this.is_capturing()&&this.config.request_batching&&(null==(e=this.Hi)||e.enable())}_dom_loaded(){this.is_capturing()&&t_(this.__request_queue,e=>this.Bi(e)),this.__request_queue=[],this.Ki()}_handle_unload(){var e,t,i;null==(e=this.surveys)||e.handlePageUnload(),this.config.request_batching?(this.Zi()&&this.capture("$pageleave"),null==(t=this.Hi)||t.unload(),null==(i=this.qi)||i.unload()):this.Zi()&&this.capture("$pageleave",null,{transport:"sendBeacon"})}_send_request(e){this.__loaded&&(rd?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)||(e.transport=e.transport||this.config.api_transport,e.url=sH(e.url,{ip:+!!this.config.ip}),e.headers=x({},this.config.request_headers,e.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,(e=>{var t,i,s,r=x({},e);r.timeout=r.timeout||6e4,r.url=sH(r.url,{_:(new Date).getTime().toString(),ver:b.LIB_VERSION,compression:r.compression});var n=null!=(t=r.transport)?t:"fetch",a=sz.filter(e=>!r.disableTransport||!e.transport||!r.disableTransport.includes(e.transport)),o=null!=(i=null==(s=tP(a,e=>e.transport===n))?void 0:s.method)?i:a[0].method;if(!o)throw Error("No available transport method");o(r)})(x({},e,{callback:t=>{var i,s;this.rateLimiter.checkForLimiting(t),t.statusCode>=400&&(null==(i=(s=this.config).on_request_error)||i.call(s,t)),null==e.callback||e.callback(t)}}))))}Bi(e){this.qi?this.qi.retriableRequest(e):this._send_request(e)}_execute_array(e){ru++;try{var t,i=[],s=[],r=[];t_(e,e=>{e&&(t=e[0],M(t)?r.push(e):D(e)?e.call(this):M(e)&&"alias"===t?i.push(e):M(e)&&-1!==t.indexOf("capture")&&D(this[t])?r.push(e):s.push(e))});var n=function(e,t){t_(e,function(e){if(M(e[0])){var i=t;tm(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(s,this),n(r,this)}finally{ru--}}Wi(){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){if(ru>0&&M(e)&&q(e[0])){var t=rv.prototype[e[0]];D(t)&&t.apply(this,e.slice(1))}else this._execute_array([e])}capture(e,t,i){var s;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.Hi){if(this.is_capturing())if(!j(e)&&q(e)){var r=!this.config.opt_out_useragent_filter&&this._is_bot();if(!(r&&!this.config.__preview_capture_bot_pageviews)){var n=null!=i&&i.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(null==n||!n.isRateLimited){null!=t&&t.$current_url&&!q(null==t?void 0:t.$current_url)&&(td.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),null==t||delete t.$current_url),"$exception"!==e||null!=i&&i.te||td.warn("Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),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 a=new Date,o=(null==i?void 0:i.timestamp)||a,l=ia(),u={uuid:l,event:e,properties:this.calculateEventProperties(e,t||{},o,l)};"$pageview"===e&&this.config.__preview_capture_bot_pageviews&&r&&(u.event="$bot_pageview",u.properties.$browser_type="bot"),n&&(u.properties.$lib_rate_limit_remaining_tokens=n.remainingTokens),(null==i?void 0:i.$set)&&(u.$set=null==i?void 0:i.$set);var c,h="$groupidentify"!==e,d=this.ie(null==i?void 0:i.$set_once,h);if(d&&(u.$set_once=d),(p=u,f=null!=i&&i._noTruncate?null:this.config.properties_string_max_length,g=e=>
1q(e)&&!H(f)?e.slice(0,f):e,v=new Set,u=function e(t,i){var s;return t!==Object(t)?g?g(t,i):t:v.has(t)?void 0:(v.add(t),M(t)?(s=[],t_(t,t=>{s.push(e(t))})):(s={},tm(t,(t,i)=>{v.has(t)||(s[i]=e(t,i))})),s)}(p)).timestamp=o,j(null==i?void 0:i.timestamp)||(u.properties.$event_time_override_provided=!0,u.properties.$event_time_override_system_time=a),"survey dismissed"===e||e===se){var p,f,g,v,_,m,y,b=null==t?void 0:t.$survey_id,w=null==t?void 0:t.$survey_iteration;c={id:b,current_iteration:w},localStorage.getItem(ri(c))||localStorage.setItem(ri(c),"true"),u.$set=x({},u.$set,{[(_={id:b,current_iteration:w},y="$survey_"+(m=e===se?"responded":"dismissed")+"/"+_.id,_.current_iteration&&_.current_iteration>0&&(y="$survey_"+m+"/"+_.id+"/"+_.current_iteration),y)]:!0})}else e===i9&&(u.$set=x({},u.$set,{$survey_last_seen_date:(new Date).toISOString()}));if(e===si.SHOWN){var E=null==t?void 0:t[ss.TOUR_TYPE];E&&(u.$set=x({},u.$set,{[ss.TOUR_LAST_SEEN_DATE+"/"+E]:(new Date).toISOString()}))}var S=x({},u.properties.$set,u.$set);if(N(S)||this.setPersonPropertiesForFlags(S),!B(this.config.before_send)){var k=this.ee(u);if(!k)return;u=k}this.yt.emit("eventCaptured",u);var P={method:"POST",url:null!=(s=null==i?void 0:i._url)?s:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:u,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.Bi(P):this.Hi.enqueue(P),u}td.critical("This capture call is ignored due to client rate limiting.")}}else td.error("No event name provided to posthog.capture")}else td.uninitializedWarning("posthog.capture")}_addCaptureHook(e){return this.on("eventCaptured",t=>e(t.event,t))}calculateEventProperties(e,t,i,s,r){if(i=i||new Date,!this.persistence||!this.sessionPersistence)return t;var n,a=r?void 0:this.persistence.remove_event_timer(e),l=x({},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 u=x({},this.persistence.properties(),this.sessionPersistence.properties());return l.distinct_id=u.distinct_id,(!q(l.distinct_id)&&!G(l.distinct_id)||U(l.distinct_id))&&td.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),l}var c,h=function(e,t){if(!m)return{};var i,s,r,n,a,l,u,c,h,d,p,g=e?tb([],iL,t||[]):[],[v,_]=function(e){for(var t=0;t<eY.length;t++){var[i,s]=eY[t],r=i.exec(e),n=r&&(D(s)?s(r,e):s);if(n)return n}return["",""]}(m);return ty(tS({$os:v,$os_version:_,$browser:eW(m,navigator.vendor),$device:eJ(m),$device_type:(l={userAgentDataPlatform:null==(i=navigator)||null==(i=i.userAgentData)?void 0:i.platform,maxTouchPoints:null==(s=navigator)?void 0:s.maxTouchPoints,screenWidth:null==o||null==(r=o.screen)?void 0:r.width,screenHeight:null==o||null==(n=o.screen)?void 0:n.height,devicePixelRatio:null==o?void 0:o.devicePixelRatio},(p=eJ(m))===el||p===eo||"Kobo"===p||"Kindle Fire"===p||p===eN?ea:p===eO||p===eT||p===eC||p===eM?"Console":p===ec?"Wearable":p?er:"Android"===(null==l?void 0:l.userAgentDataPlatform)&&(null!=(u=null==l?void 0:l.maxTouchPoints)?u:0)>0?Math.min(null!=(c=null==l?void 0:l.screenWidth)?c:0,null!=(h=null==l?void 0:l.screenHeight)?h:0)/(null!=(d=null==l?void 0:l.devicePixelRatio)?d:1)>=600?ea:er:"Desktop"),$timezone:iK(),$timezone_offset:function(){try{return(new Date).getTimezoneOffset()}catch(e){return}}()}),{$current_url:iA(null==f?void 0:f.href,g,ij),$host:null==f?void 0:f.host,$pathname:null==f?void 0:f.pathname,$raw_user_agent:m.length>1e3?m.substring(0,997)+"...":m,$browser_version:eQ(m,navigator.vendor),$browser_language:iG(),$browser_language_prefix:"string"==typeof(a=iG())?a.split("-")[0]:void 0,$screen_height:null==o?void 0:o.screen.height,$screen_width:null==o?void 0:o.screen.width,$viewport_height:null==o?void 0:o.innerHeight,$viewport_width:null==o?void 0:o.innerWidth,$lib:"web",$lib_version:b.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:d,windowId:g}=this.sessionManager.checkAndGetSessionAndWindowId(r,i.getTime());l.$session_id=d,l.$window_id=g}this.sessionPropsManager&&ty(l,this.sessionPropsManager.getSessionProps());try{this.sessionRecording&&ty(l,this.sessionRecording.sdkDebugProperties),l.$sdk_debug_retry_queue_size=null==(n=this.qi)?void 0:n.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),c="$pageview"!==e||r?"$pageleave"!==e||r?this.pageViewM
1anager.doEvent():this.pageViewManager.doPageLeave(i):this.pageViewManager.doPageView(i,s),l=ty(l,c),"$pageview"===e&&p&&(l.title=p.title),!j(a)){var v=i.getTime()-a;l.$duration=parseFloat((v/1e3).toFixed(3))}m&&this.config.opt_out_useragent_filter&&(l.$browser_type=this._is_bot()?"bot":"browser"),(l=ty({},h,this.persistence.properties(),this.sessionPersistence.properties(),l)).$is_identified=this._isIdentified(),M(this.config.property_denylist)?tm(this.config.property_denylist,function(e){delete l[e]}):td.error("Invalid value for property_denylist config: "+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var _=this.config.sanitize_properties;_&&(td.error("sanitize_properties is deprecated. Use before_send instead"),l=_(l,e));var y=this.re();return l.$process_person_profile=y,y&&!r&&this.se("_calculate_event_properties"),l}ie(e,t){if(void 0===t&&(t=!0),!this.persistence||!this.re()||this.Fi)return e;var i,s=ty({},this.persistence.get_initial_props(),(null==(i=this.sessionPropsManager)?void 0:i.getSetOnceProps())||{},e||{}),r=this.config.sanitize_properties;return r&&(td.error("sanitize_properties is deprecated. Use before_send instead"),s=r(s,"$set_once")),t&&(this.Fi=!0),N(s)?void 0:s}register(e,t){var i;null==(i=this.persistence)||i.register(e,t)}register_once(e,t,i){var s;null==(s=this.persistence)||s.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)}ne(e,t){this.register({[e]:t})}getFeatureFlag(e,t){return this.featureFlags.getFeatureFlag(e,t)}getFeatureFlagPayload(e){return this.featureFlags.getFeatureFlagPayload(e)}getFeatureFlagResult(e,t){return this.featureFlags.getFeatureFlagResult(e,t)}isFeatureEnabled(e,t){return this.featureFlags.isFeatureEnabled(e,t)}reloadFeatureFlags(){this.featureFlags.reloadFeatureFlags()}updateFlags(e,t,i){var s=null!=i&&i.merge?this.featureFlags.getFlagVariants():{},r=null!=i&&i.merge?this.featureFlags.getFlagPayloads():{},n=x({},s,e),a=x({},r,t),o={};for(var[l,u]of Object.entries(n)){var c="string"==typeof u;o[l]={key:l,enabled:!!c||!!u,variant:c?u:void 0,reason:void 0,metadata:j(null==a?void 0:a[l])?void 0:{id:0,version:void 0,description:void 0,payload:a[l]}}}this.featureFlags.receivedFeatureFlags({flags:o})}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.yt.on(e,t)}onFeatureFlags(e){return this.featureFlags.onFeatureFlags(e)}onSurveysLoaded(e){return this.surveys?this.surveys.onSurveysLoaded(e):(e([],{isLoaded:!1,error:"Surveys module not available"}),()=>{})}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?this.surveys.getSurveys(e,t):e([],{isLoaded:!1,error:"Surveys module not available"})}getActiveMatchingSurveys(e,t){void 0===t&&(t=!1),this.surveys?this.surveys.getActiveMatchingSurveys(e,t):e([],{isLoaded:!1,error:"Surveys module not available"})}renderSurvey(e,t){var i;null==(i=this.surveys)||i.renderSurvey(e,t)}displaySurvey(e,t){var i;void 0===t&&(t=rr),null==(i=this.surveys)||i.displaySurvey(e,t)}cancelPendingSurvey(e){var t;null==(t=this.surveys)||t.cancelPendingSurvey(e)}canRenderSurvey(e){var t,i;return null!=(t=null==(i=this.surveys)?void 0:i.canRenderSurvey(e))?t:{visible:!1,disabledReason:"Surveys module not available"}}canRenderSurveyAsync(e,t){var i,s;return void 0===t&&(t=!1),null!=(i=null==(s=this.surveys)?void 0:s.canRenderSurveyAsync(e,t))?i:Promise.resolve({visible:!1,disabledReason:"Surveys module not available"})}identify(e,t,i){if(!this.__loaded||!this.persistence)return td.uninitializedWarning("posthog.identify");if(G(e)&&(e=e.toString(),td.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()))td.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!==t8){if(this.se("posthog.identify")){var s=this.get_distinct_id();this.register({$user_id:e}),this.get_property("$device_id")||this.register_once({$had_persisted_distinct_id:!0,$device_id:s},""),e!==s&&e!==this.get_property(tF)&&(this.unregister(tF),this.register({distinct_id:e}));var r="anonymous"===(this.persistence.get_property(tZ)||"anonymous");e!==s&&r?(this.persistence.set_property(tZ,"identified"),this.setPersonPropertiesForFlags(x({},i||{},t||{}),!1),this.capture("$identify",{distinct_id:e,$anon_distinct_id:s},{$set:t||{},$set_once:i||{}}),this.Li=s3(e,t,i),this.featureFlags.setAnonymousDistinctId(s)):(t||i)&&this.setPersonProperties(t,i),e!==s&&(this.reloadFeatureFlags(),this.unregister(tY))}}else td.critical('The string "'+t8+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.');else td.error("Unique user id has not been set in posthog.identify")}setPersonProperties(e,t){if((e||t)&&this.se("posthog.setPersonProperties")){var i=s3(this.get_distinct_id(),e,t);this.Li!==i?(this.setPersonPropertiesForFlags(x({},t||{},e||{})),this.capture("$set",{$set:e||{},$set_once:t||{}}),this.Li=i):td.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}group(e,t,i){if(e&&t){var s=this.getGroups();s[e]!==t&&this.resetGroupPropertiesForFlags(e),this.register({$groups:x({},s,{[e]:t})}),i&&(this.capture("$groupidentify",{$group_type:e,$group_key:t,$group_set:i}),this.setGroupPropertiesForFlags({[e]:i})),s[e]===t||i||this.reloadFeatureFlags()}else td.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.se("posthog.setGroupPropertiesForFlags")&&this.featureFlags.setGroupPropertiesForFlags(e,t)}resetGroupPropertiesForFlags(e){this.featureFlags.resetGroupPropertiesForFlags(e)}reset(e){if(td.info("reset"),!this.__loaded)return td.uninitializedWarning("posthog.reset");var t,i,s,r,n,a,o=this.get_property("$device_id");if(this.consent.reset(),null==(t=this.persistence)||t.clear(),null==(i=this.sessionPersistence)||i.clear(),null==(s=this.surveys)||s.reset(),null==(r=this.Qi)||r.stop(),this.featureFlags.reset(),null==(n=this.persistence)||n.set_property(tZ,"anonymous"),null==(a=this.sessionManager)||a.resetSessionId(),this.Li=null,"always"===this.config.cookieless_mode)this.register_once({distinct_id:t8,$device_id:null},"");else{var l=this.config.get_device_id(ia());this.register_once({distinct_id:l,$device_id:e?l:o},"")}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),s=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+t);if(null!=e&&e.withTimestamp&&i){var r,n=null!=(r=e.timestampLookBack)?r:10;if(!i)return s;s+="?t="+Math.max(Math.floor(((new Date).getTime()-i)/1e3)-n,0)}return s}alias(e,t){return e===this.get_property(tT)?(td.critical("Attempting to create alias for existing People user - aborting."),-2):this.se("posthog.alias")?(j(t)&&(t=this.get_distinct_id()),e!==t?(this.ne(tF,e),this.capture("$create_alias",{alias:e,distinct_id:t})):(td.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}set_config(e){var t=x({},this.config);if(L(e)){ty(this.config,rf(e));var i,s,r,n,a,o,l,u,c,h=this.zi();null==(i=this.persistence)||i.update_config(this.config,t,h),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new i4(x({},this.config,{persistence:"sessionStorage"}),h);var d=this.ji(this.config.debug);V(d)&&(this.config.debug=d),V(this.config.debug)&&(this.config.debug?(b.DEBUG=!0,id.F()&&id.L("ph_debug","true"),td.info("set_config",{config:e,oldConfig:t,newConfig:x({},this.config)})):(b.DEBUG=!1,id.F()&&id.j("ph_debug"))),null==(s=this.exceptionObserver)||s.onConfigChange(),null==(r=this.sessionRecording)||r.startIfEnabledOrStop(),null==(n=this.autocapture)||n.startIfEnabled(),null==(a=this.heatmaps)||a.startIfEnabled(),null==(o=this.exceptionObserver)||o.startIfEnabledOrStop(),null==(l=this.deadClicksAutocapture)||l.startIfEnabledOrStop(),null==(u=this.surveys)||u.loadIfEnabled(),this.oe(),null==(c=this.externalIntegrations)||c.startIfEnabledOrStop()}}startSessionRecording(e){var t,i,s,r,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==(s=this.sessionRecording)||s.overrideLinkedFlag()),o.url_trigger&&(null==(r=this.sessionRecording)||r.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){if(this.exceptions){var i=Error("PostHog syntheticException"),s=this.exceptions.buildProperties(e,{handled:!0,syntheticException:i});return this.exceptions.sendExceptionEvent(x({},s,t))}}startExceptionAutocapture(e){this.set_config({capture_exceptions:null==e||e})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(e){var t,i;return null!=(t=null==(i=this.toolbar)?void 0:i.loadToolbar(e))&&t}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:rh;return t!==rh&&(t=rh+"."+t),t}_isIdentified(){var e,t;return"identified"===(null==(e=this.persistence)?void 0:e.get_property(tZ))||"identified"===(null==(t=this.sessionPersistence)?void 0:t.get_property(tZ))}re(){var e,t;return!("never"===this.config.person_profiles||"identified_only"===this.config.person_profiles&&
1!this._isIdentified()&&N(this.getGroups())&&(null==(e=this.persistence)||null==(e=e.props)||!e[tF])&&(null==(t=this.persistence)||null==(t=t.props)||!t[t6]))}Zi(){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.re()||this.se("posthog.createPersonProfile")&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.se("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})}se(e){return"never"===this.config.person_profiles?(td.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.ne(t6,!0),!0)}zi(){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}oe(){var e,t,i,s,r=this.zi();return(null==(e=this.persistence)?void 0:e.Rt)!==r&&(null==(i=this.persistence)||i.set_disabled(r)),(null==(t=this.sessionPersistence)?void 0:t.Rt)!==r&&(null==(s=this.sessionPersistence)||s.set_disabled(r)),r}opt_in_capturing(e){var t;if("always"!==this.config.cookieless_mode){if("on_reject"===this.config.cookieless_mode&&this.consent.isExplicitlyOptedOut()){this.reset(!0),null==(r=this.sessionManager)||r.destroy(),null==(n=this.pageViewManager)||n.destroy(),this.sessionManager=new s0(this),this.pageViewManager=new iT(this),this.persistence&&(this.sessionPropsManager=new sJ(this,this.sessionManager,this.persistence));var i,s,r,n,a,o,l,u=null!=(a=null==(o=this.config.__extensionClasses)?void 0:o.sessionRecording)?a:null==(l=rv.__defaultExtensionClasses)?void 0:l.sessionRecording;u&&(this.sessionRecording=this.Ci(this.sessionRecording,new u(this)))}this.consent.optInOut(!0),this.oe(),this.Ki(),null==(t=this.sessionRecording)||t.startIfEnabledOrStop(),"on_reject"==this.config.cookieless_mode&&(null==(i=this.surveys)||i.loadIfEnabled()),(j(null==e?void 0:e.captureEventName)||null!=e&&e.captureEventName)&&this.capture(null!=(s=null==e?void 0:e.captureEventName)?s:"$opt_in",null==e?void 0:e.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Xi()}else td.warn('Consent opt in/out is not valid with cookieless_mode="always" and will be ignored')}opt_out_capturing(){var e,t,i;"always"!==this.config.cookieless_mode?("on_reject"===this.config.cookieless_mode&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.oe(),"on_reject"===this.config.cookieless_mode&&(this.register({distinct_id:t8,$device_id:null}),null==(e=this.sessionManager)||e.destroy(),null==(t=this.pageViewManager)||t.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,null==(i=this.sessionRecording)||i.stopRecording(),this.sessionRecording=void 0,this.Xi())):td.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===iy.GRANTED?"granted":e===iy.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.oe()}_is_bot(){return d?s1(d,this.config.custom_blocked_useragents):void 0}Xi(){p&&("visible"===p.visibilityState?this.Mi||(this.Mi=!0,this.capture("$pageview",{title:p.title},{send_instantly:!0}),this.Ai&&(p.removeEventListener("visibilitychange",this.Ai),this.Ai=null)):this.Ai||(this.Ai=this.Xi.bind(this),tO(p,"visibilitychange",this.Ai)))}debug(e){!1===e?(null==o||o.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(null==o||o.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),this.set_config({debug:!0}))}xt(){var e,t,i,s,r=this.Ni||{};return"advanced_disable_flags"in r?!!r.advanced_disable_flags:!1!==this.config.advanced_disable_flags?!!this.config.advanced_disable_flags:!0===this.config.advanced_disable_decide?(td.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 r&&!B(r[e]),s=t in r&&!B(r[t]),i?r[e]:!!s&&(td&&td.warn("Config field '"+t+"' is deprecated. Please use '"+e+"' instead. The old field will be removed in a future major version."),r[t]))}ee(e){if(B(this.config.before_send))return e;var t=M(this.config.before_send)?this.config.before_send:[this.config.before_send],i=e;for(var s of t){if(B(i=s(i))){var r="Event '"+e.event+"' was rejected in beforeSend function";return W(e.event)?td.warn(r+". This can cause unexpected behavior."):td.info(r),null}i.properties&&!N(i.properties)||td.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}return i}getPageViewId(){var e;
1return null==(e=this.pageViewManager.K)?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)})}ji(e){var t=V(e)&&!e,i=id.F()&&"true"===id.A("ph_debug");return!t&&(!!i||e)}}function r_(e){return e instanceof Element&&(e.id===t4||!(null==e.closest||!e.closest(".toolbar-global-fade-container")))}function rm(e){return!!e&&1===e.nodeType}function ry(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function rb(e){return!!e&&3===e.nodeType}function rw(e){return!!e&&11===e.nodeType}function rE(e){return e?T(e).split(/\s+/):[]}function rx(e){var t=null==o?void 0:o.location.href;return!!(t&&e&&e.some(e=>t.match(e)))}function rS(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 rE(t)}function rk(e){return B(e)?null:T(e).split(/(\s+)/).filter(e=>rB(e)).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function rP(e){var t="";return rM(e)&&!rD(e)&&e.childNodes&&e.childNodes.length&&tm(e.childNodes,function(e){var i;rb(e)&&e.textContent&&(t+=null!=(i=rk(e.textContent))?i:"")}),T(t)}function rO(e){var t;return j(e.target)?e.srcElement||null:null!=(t=e.target)&&t.shadowRoot?e.composedPath()[0]||null:e.target||null}rv.__defaultExtensionClasses={},function(e,t){for(var i=0;i<t.length;i++)e.prototype[t[i]]=tx(e.prototype[t[i]])}(rv,["identify"]);var rC=["a","button","form","input","select","textarea","label"];function rT(e,t){if(j(t))return!0;var i,s=function(e){if(t.some(t=>e.matches(t)))return{v:!0}};for(var r of e)if(i=s(r))return i.v;return!1}function rF(e){var t=e.parentNode;return!(!t||!rm(t))&&t}var r$=["next","previous","prev",">","<"],rI=[".ph-no-rageclick",".ph-no-capture"],rR=e=>!e||ry(e,"html")||!rm(e),rA=(e,t)=>{if(!o||rR(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var i=!1,s=[e],r=e;r.parentNode&&!ry(r,"body");)if(rw(r.parentNode))s.push(r.parentNode.host),r=r.parentNode.host;else{var n=rF(r);if(!n)break;if(t||rC.indexOf(n.tagName.toLowerCase())>-1)i=!0;else{var a=o.getComputedStyle(n);a&&"pointer"===a.getPropertyValue("cursor")&&(i=!0)}s.push(n),r=n}return{parentIsUsefulElement:i,targetElementList:s}};function rM(e){for(var t=e;t.parentNode&&!ry(t,"body");t=t.parentNode){var i=rS(t);if(C(i,"ph-sensitive")||C(i,"ph-no-capture"))return!1}if(C(rS(e),"ph-include"))return!0;var s=e.type||"";if(q(s))switch(s.toLowerCase()){case"hidden":case"password":return!1}var r=e.name||e.id||"";return!(q(r)&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(r.replace(/[^a-zA-Z0-9]/g,"")))}function rD(e){return!!(ry(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||ry(e,"select")||ry(e,"textarea")||"true"===e.getAttribute("contenteditable"))}var rL="(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})",rN=RegExp("^(?:"+rL+")$"),rj=new RegExp(rL),rq="\\d{3}-?\\d{2}-?\\d{4}",rU=RegExp("^("+rq+")$"),rH=RegExp("("+rq+")");function rB(e,t){return void 0===t&&(t=!0),!(B(e)||q(e)&&(e=T(e),(t?rN:rj).test((e||"").replace(/[- ]/g,""))||(t?rU:rH).test(e)))&&!0}function rG(e){var t=rP(e);return rB(t=(t+" "+function e(t){var i="";return t&&t.childNodes&&t.childNodes.length&&tm(t.childNodes,function(t){var s;if(t&&"span"===(null==(s=t.tagName)?void 0:s.toLowerCase()))try{var r=rP(t);i=(i+" "+r).trim(),t.childNodes&&t.childNodes.length&&(i=(i+" "+e(t)).trim())}catch(e){td.error("[AutoCapture]",e)}}),i}(e)).trim())?t:""}function rz(e){return e.replace(/"|\\"/g,'\\"')}class rV{constructor(e){this.disabled=!1===e;var t=L(e)?e:{};this.thresholdPx=t.threshold_px||30,this.timeoutMs=t.timeout_ms||1e3,this.clickCount=t.click_count||3,this.clicks=[]}isRageClick(e,t,i){if(this.disabled)return!1;var s=this.clicks[this.clicks.length-1];if(s&&Math.abs(e-s.x)+Math.abs(t-s.y)<this.thresholdPx&&i-s.timestamp<this.timeoutMs){if(this.clicks.push({x:e,y:t,timestamp:i}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:e,y:t,timestamp:i}];return!1}}var rW="$copy_autocapture",rK=tp("[AutoCapture]");function rQ(e,t){return t.length>e?t.slice(0,e)+"...":t}var rY=tp("[ExceptionAutocapture]");function rJ(e,t,i){try{if(!(t in e))return()=>{};var s=e[t],r=i(s);return D(r)&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=r,()=>{e[t]=s}}catch(e){return()=>{}}}var rX=tp("[TracingHeaders]"),rZ=tp("[Web Vitals]");tp("[SessionRecording]");var r0="[SessionRecording]",r1=tp(r0),r2=tp("[Heatmaps]");function r3(e){return L(e)&&"clientX"in e&&"clientY"in e&&G(e.clientX)&&G(e.clientY)}var r5=tp("[Product Tours]"),r6="ph_product_tours",r4=["$set_once","$set"],r8=tp("[SiteApps]");function r7(e,t,i){if(B(e))return!1;switch(i){case"exact":return e===t;case"contains":return RegExp(t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*"),"i").test(e);case"regex":try{return new RegExp(t).test(e)}catch(e){return!1}default:return!1}}class r9{constructor(e){this.ae=new sX,this.le=(e,t)=>
vendor: 4,184 bytes, line 1
1this.ue(e,t)&&this.he(e,t)&&this.de(e,t)&&this.ve(e,t),this.ue=(e,t)=>null==t||!t.event||(null==e?void 0:e.event)===(null==t?void 0:t.event),this._instance=e,this.ce=new Set,this.fe=new Set}init(){var e,t;j(null==(e=this._instance)?void 0:e._addCaptureHook)||null==(t=this._instance)||t._addCaptureHook((e,t)=>{this.on(e,t)})}register(e){var t,i;if(!j(null==(t=this._instance)?void 0:t._addCaptureHook)&&(e.forEach(e=>{var t,i;null==(t=this.fe)||t.add(e),null==(i=e.steps)||i.forEach(e=>{var t;null==(t=this.ce)||t.add((null==e?void 0:e.event)||"")})}),null!=(i=this._instance)&&i.autocapture)){var s,r=new Set;e.forEach(e=>{var t;null==(t=e.steps)||t.forEach(e=>{null!=e&&e.selector&&r.add(null==e?void 0:e.selector)})}),null==(s=this._instance)||s.autocapture.setElementSelectors(r)}}on(e,t){var i;null!=t&&0!=e.length&&(this.ce.has(e)||this.ce.has(null==t?void 0:t.event))&&this.fe&&(null==(i=this.fe)?void 0:i.size)>0&&this.fe.forEach(e=>{this.pe(t,e)&&this.ae.emit("actionCaptured",e.name)})}_e(e){this.onAction("actionCaptured",t=>e(t))}pe(e,t){if(null==(null==t?void 0:t.steps))return!1;for(var i of t.steps)if(this.le(e,i))return!0;return!1}onAction(e,t){return this.ae.on(e,t)}he(e,t){if(null!=t&&t.url){var i,s=null==e||null==(i=e.properties)?void 0:i.$current_url;if(!s||"string"!=typeof s||!r7(s,t.url,t.url_matching||"contains"))return!1}return!0}de(e,t){return!!this.ge(e,t)&&!!this.me(e,t)&&!!this.be(e,t)}ge(e,t){if(null==t||!t.href)return!0;var i=this.ye(e);if(i.length>0)return i.some(e=>r7(e.href,t.href,t.href_matching||"exact"));var s,r,n=(null==e||null==(s=e.properties)?void 0:s.$elements_chain)||"";return!!n&&r7((r=n.match(/(?::|")href="(.*?)"/))?r[1]:"",t.href,t.href_matching||"exact")}me(e,t){if(null==t||!t.text)return!0;var i=this.ye(e);if(i.length>0)return i.some(e=>r7(e.text,t.text,t.text_matching||"exact")||r7(e.$el_text,t.text,t.text_matching||"exact"));var s,r,n,a,o=(null==e||null==(s=e.properties)?void 0:s.$elements_chain)||"";return!!o&&(r=function(e){for(var t,i=[],s=/(?::|")text="(.*?)"/g;!B(t=s.exec(e));)i.includes(t[1])||i.push(t[1]);return i}(o),n=t.text,a=t.text_matching||"exact",r.some(e=>r7(e,n,a)))}be(e,t){if(null==t||!t.selector)return!0;var i,s,r=null==e||null==(i=e.properties)?void 0:i.$element_selectors;if(null!=r&&r.includes(t.selector))return!0;var n=(null==e||null==(s=e.properties)?void 0:s.$elements_chain)||"";if(t.selector_regex&&n)try{return new RegExp(t.selector_regex).test(n)}catch(e){}return!1}ye(e){var t;return null==(null==e||null==(t=e.properties)?void 0:t.$elements)?[]:null==e?void 0:e.properties.$elements}ve(e,t){return null==t||!t.properties||0===t.properties.length||s4(t.properties.reduce((e,t)=>{var i=M(t.value)?t.value.map(String):null!=t.value?[String(t.value)]:[];return e[t.key]={values:i,operator:t.operator||"exact"},e},{}),null==e?void 0:e.properties)}}class ne{constructor(e){this._instance=e,this.we=new Map,this.Ee=new Map,this.xe=new Map}Se(e,t){return!!e&&s4(e.propertyFilters,null==t?void 0:t.properties)}$e(e,t){var i=new Map;return e.forEach(e=>{var s;null==(s=e.conditions)||null==(s=s[t])||null==(s=s.values)||s.forEach(t=>{if(null!=t&&t.name){var s=i.get(t.name)||[];s.push(e.id),i.set(t.name,s)}})}),i}ke(e,t,i){var s=(i===i8?this.we:this.Ee).get(e),r=[];return this.Pe(e=>{r=e.filter(e=>null==s?void 0:s.includes(e.id))}),r.filter(s=>{var r,n=null==(r=s.conditions)||null==(r=r[i])||null==(r=r.values)?void 0:r.find(t=>t.name===e);return this.Se(n,t)})}register(e){var t;j(null==(t=this._instance)?void 0:t._addCaptureHook)||(this.Te(e),this.Re(e))}Re(e){var t=e.filter(e=>{var t,i;return(null==(t=e.conditions)?void 0:t.actions)&&(null==(i=e.conditions)||null==(i=i.actions)||null==(i=i.values)?void 0:i.length)>0});0!==t.length&&(null==this.Ie&&(this.Ie=new r9(this._instance),this.Ie.init(),this.Ie._e(e=>{this.onAction(e)})),t.forEach(e=>{var t,i,s,r,n;e.conditions&&null!=(t=e.conditions)&&t.actions&&null!=(i=e.conditions)&&null!=(i=i.actions)&&i.values&&(null==(s=e.conditions)||null==(s=s.actions)||null==(s=s.values)?void 0:s.length)>0&&(null==(r=this.Ie)||r.register(e.conditions.actions.values),null==(n=e.conditions)||null==(n=n.actions)||null==(n=n.values)||n.forEac
1h(t=>{if(t&&t.name){var i=this.xe.get(t.name);i&&i.push(e.id),this.xe.set(t.name,i||[e.id])}}))}))}Te(e){var t,i=e.filter(e=>{var t,i;return(null==(t=e.conditions)?void 0:t.events)&&(null==(i=e.conditions)||null==(i=i.events)||null==(i=i.values)?void 0:i.length)>0}),s=e.filter(e=>{var t,i;return(null==(t=e.conditions)?void 0:t.cancelEvents)&&(null==(i=e.conditions)||null==(i=i.cancelEvents)||null==(i=i.values)?void 0:i.length)>0});(0!==i.length||0!==s.length)&&(null==(t=this._instance)||t._addCaptureHook((e,t)=>{this.onEvent(e,t)}),this.we=this.$e(e,i8),this.Ee=this.$e(e,i7))}onEvent(e,t){var i,s=this.Ce(),r=this.Oe(),n=this.Fe(),a=(null==(i=this._instance)||null==(i=i.persistence)?void 0:i.props[r])||[];if(n===e&&t&&a.length>0){s.info("event matched, removing item from activated items",{event:e,eventPayload:t,existingActivatedItems:a});var o,l,u=(null==t||null==(o=t.properties)?void 0:o.$survey_id)||(null==t||null==(l=t.properties)?void 0:l.$product_tour_id);if(u){var c=a.indexOf(u);c>=0&&(a.splice(c,1),this.Me(a))}}else{if(this.Ee.has(e)){var h=this.ke(e,t,i7);h.length>0&&(s.info("cancel event matched, cancelling items",{event:e,itemsToCancel:h.map(e=>e.id)}),h.forEach(e=>{var t=a.indexOf(e.id);t>=0&&a.splice(t,1),this.Ae(e.id)}),this.Me(a))}if(this.we.has(e)){s.info("event name matched",{event:e,eventPayload:t,items:this.we.get(e)});var d=this.ke(e,t,i8);this.Me(a.concat(d.map(e=>e.id)||[]))}}}onAction(e){var t,i=this.Oe(),s=(null==(t=this._instance)||null==(t=t.persistence)?void 0:t.props[i])||[];this.xe.has(e)&&this.Me(s.concat(this.xe.get(e)||[]))}Me(e){var t,i=this.Ce(),s=this.Oe(),r=[...new Set(e)].filter(e=>!this.De(e));i.info("updating activated items",{activatedItems:r}),null==(t=this._instance)||null==(t=t.persistence)||t.register({[s]:r})}getActivatedIds(){var e,t=this.Oe();return(null==(e=this._instance)||null==(e=e.persistence)?void 0:e.props[t])||[]}getEventToItemsMap(){return this.we}Le(){return this.Ie}}class nt extends ne{constructor(e){super(e)}Oe(){return"$surveys_activated"}Fe(){return i9}Pe(e){var t;null==(t=this._instance)||t.getSurveys(e)}Ae(e){var t;null==(t=this._instance)||t.cancelPendingSurvey(e)}Ce(){return re}De(){return!1}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}}var ni=null!=o&&o.location?iM(o.location.hash,"__posthog")||iM(location.hash,"state"):null,ns="_postHogToolbarParams",nr=tp("[Toolbar]"),nn=((n_=nn||{})[n_.UNINITIALIZED=0]="UNINITIALIZED",n_[n_.LOADING=1]="LOADING",n_[n_.LOADED=2]="LOADED",n_),na=tp("[Error tracking]"),no={icontains:(e,t)=>!!o&&t.href.toLowerCase().indexOf(e.toLowerCase())>-1,not_icontains:(e,t)=>!!o&&-1===t.href.toLowerCase().indexOf(e.toLowerCase()),regex:(e,t)=>!!o&&s2(t.href,e),not_regex:(e,t)=>!!o&&!s2(t.href,e),exact:(e,t)=>t.href===e,is_not:(e,t)=>t.href!==e};class nl{constructor(e){var t=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(e){void 0===e&&(e=!1),t.getWebExperiments(e=>{nl.je("retrieved web experiments from the server"),t.Ne=new Map,e.forEach(e=>{if(e.feature_flag_key){t.Ne&&(nl.je("setting flag key ",e.feature_flag_key," to web experiment ",e),null==(i=t.Ne)||i.set(e.feature_flag_key,e));var i,s=t._instance.getFeatureFlag(e.feature_flag_key);q(s)&&e.variants[s]&&t.Ue(e.name,s,e.variants[s].transforms)}else if(e.variants)for(var r in e.variants){var n=e.variants[r];nl.ze(n)&&t.Ue(e.name,r,n.transforms)}})},e)},this._instance=e,this._instance.onFeatureFlags(e=>{this.onFeatureFlags(e)})}initialize(){}onFeatureFlags(e){if(this._is_bot())nl.je("Refusing to render web experiment since the viewer is a likely bot");else if(!this._instance.config.disable_web_experiments){if(B(this.Ne))return this.Ne=new Map,this.loadIfEnabled(),void this.previewWebExperiment();nl.je("applying feature flags",e),e.forEach(e=>{var t;if(this.Ne&&null!=(t=this.Ne)&&t.has(e)){var i,s=this._instance.getFeatureFlag(e),r=null==(i=this.Ne)?void 0:i.get(e);s&&null!=r&&r.variants[s]&&this.Ue(r.name,s,r.variants[s].transforms)}})}}previewWebExperiment(){var e=nl.getWindowLocation();if(null!=e&&e.search){var t=iR(null==e?void 0:e.search,"__experiment_id"),i=iR(null==e?void 0:e.search,"__experiment_variant");t&&i&&(nl.je("previewing web experiments "+t+" && "+i),this.getWebExperiments(e=>{this.He(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 s=this._instance.get_property("$web_experiments");if(s&&!t)return e(s);this._instance._send_request({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([])})}He(e,t,i){var s=i.filter(t=>t.id===e);s&&s.length>0&&(nl.je("Previewing web experiment ["+s[0].name+"] with variant ["+t+"]"),this.Ue(s[0].name,t,s[0].variants[t].transforms))}static ze(e){return!B(e.conditions)&&nl.Be(e)&&nl.qe(e)}static Be(e){if(B(e.conditions)||B(null==(t=e.conditions)?void 0:t.url))return!0;var t,i,s,r,n=nl.getWindowLocation();return!!n&&(null==(i=e.conditions)||!i.url||no[null!=(s=null==(r=e.conditions)?void 0:r.urlMatchType)?s:"icontains"](e.conditions.url,n))}
1static getWindowLocation(){return null==o?void 0:o.location}static qe(e){if(B(e.conditions)||B(null==(i=e.conditions)?void 0:i.utm))return!0;var t=iU();if(t.utm_source){var i,s,r,n,a,o,l,u,c,h=null==(s=e.conditions)||null==(s=s.utm)||!s.utm_campaign||(null==(r=e.conditions)||null==(r=r.utm)?void 0:r.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,f=null==(u=e.conditions)||null==(u=u.utm)||!u.utm_term||(null==(c=e.conditions)||null==(c=c.utm)?void 0:c.utm_term)==t.utm_term;return h&&p&&f&&d}return!1}static je(e){for(var t=arguments.length,i=Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];td.info("[WebExperiments] "+e,i)}Ue(e,t,i){this._is_bot()?nl.je("Refusing to render web experiment since the viewer is a likely bot"):"control"!==t?i.forEach(i=>{if(i.selector){nl.je("applying transform of variant "+t+" for experiment "+e+" ",i);var s,r=null==(s=document)?void 0:s.querySelectorAll(i.selector);null==r||r.forEach(e=>{i.html&&(e.innerHTML=i.html),i.css&&e.setAttribute("style",i.css)})}}):nl.je("Control variants leave the page unmodified.")}_is_bot(){return d&&this._instance?s1(d,this._instance.config.custom_blocked_useragents):void 0}}var nu=tp("[Conversations]"),nc=x({},{sessionRecording:class{get started(){var e;return!(null==(e=this.Ve)||!e.isStarted)}get status(){return this.Ve?this.Ve.status:this.We?this.Ge?"lazy_loading":"disabled":"pending_config"}constructor(e){if(this._forceAllowLocalhostNetworkCapture=!1,this.We=!1,this.Ye=!1,this.Je=void 0,this._instance=e,!this._instance.sessionManager)throw r1.error("started without valid sessionManager"),Error(r0+" started without valid sessionManager. This is a bug.");if("always"===this._instance.config.cookieless_mode)throw Error(r0+' cannot be used with cookieless_mode="always"')}initialize(){this.startIfEnabledOrStop()}get Ge(){var e,t=!(null==(e=this._instance.get_property(tU))||!e.enabled),i=!this._instance.config.disable_session_recording,s=this._instance.config.disable_session_recording||this._instance.consent.isOptedOut();return o&&t&&i&&!s}startIfEnabledOrStop(e){var t;if(this.We&&(!this.Ge||null==(t=this.Ve)||!t.isStarted)){var i=!j(Object.assign)&&!j(Array.from);this.Ge&&i?(this.Ke(e),r1.info("starting")):this.stopRecording()}}Ke(e){var t,i,s;this.Ge&&(null!=y&&null!=(t=y.__PosthogExtensions__)&&null!=(t=t.rrweb)&&t.record&&null!=(i=y.__PosthogExtensions__)&&i.initSessionRecording?this.Xe(e):null==(s=y.__PosthogExtensions__)||null==s.loadExternalDependency||s.loadExternalDependency(this._instance,this.Qe,t=>{if(t)return r1.error("could not load recorder",t);this.Xe(e)}))}stopRecording(){var e,t;null==(e=this.Je)||e.call(this),this.Je=void 0,null==(t=this.Ve)||t.stop()}Ze(){var e;null==(e=this._instance.persistence)||e.unregister(tB)}tr(e,t){if(B(e))return null;var i=G(e)?e:parseFloat(e);return"number"==typeof i&&Number.isFinite(i)&&i>=0&&i<=1?i:(r1.warn(t+" must be between 0 and 1. Ignoring invalid value:",e),null)}ir(e){if(this._instance.persistence){var t,i,s=this._instance.persistence,r=()=>{var t,i=!1===e.sessionRecording?void 0:e.sessionRecording,r=this.tr(null==(t=this._instance.config.session_recording)?void 0:t.sampleRate,"session_recording.sampleRate"),n=this.tr(null==i?void 0:i.sampleRate,"remote config sampleRate"),a=null!=r?r:n;B(a)&&this.Ze();var o=null==i?void 0:i.minimumDurationMilliseconds;s.register({[tU]:x({cache_timestamp:Date.now(),enabled:!!i},i,{networkPayloadCapture:x({capturePerformance:e.capturePerformance},null==i?void 0:i.networkPayloadCapture),canvasRecording:{enabled:null==i?void 0:i.recordCanvas,fps:null==i?void 0:i.canvasFps,quality:null==i?void 0:i.canvasQuality},sampleRate:a,minimumDurationMilliseconds:j(o)?null:o,endpoint:null==i?void 0:i.endpoint,triggerMatchType:null==i?void 0:i.triggerMatchType,masking:null==i?void 0:i.masking,urlTriggers:null==i?void 0:i.urlTriggers})})};r(),null==(t=this.Je)||t.call(this),this.Je=null==(i=this._instance.sessionManager)?void 0:i.onSessionId(r)}}onRemoteConfig(e){"sessionRecording"in e?!1!==e.sessionRecording?(this.Ye=!1,this.ir(e),this.We=!0,this.startIfEnabledOrStop()):this.We=!0:r1.info("skipping remote config with no sessionRecording",e)}log(e,t){var i;void 0===t&&(t="log"),null!=(i=this.Ve)&&i.log?this.Ve.log(e,t):r1.warn("log called before recorder was ready")}get Qe(){var e,t,i=null==(e=this._instance)||null==(e=e.persistence)?void 0:e.get_property(tU);return(null==i||null==(t=i.scriptConfig)?void 0:t.script)||"lazy-recorder"}er(){var e,t=this._instance.get_property(tU);if(!t)return!1;var i=null!=(e=("object"==typeof t?t:JSON.parse(t)).cache_timestamp)?e:Date.now();return Date.now()-i<=3e5}Xe(e){var t,i;if(null==(t=y.__PosthogExtensions__)||!t.initSessionRecording)throw Error("Called on script loaded before session recording is available");this.Ve||(this.Ve=null==(i=y.__PosthogExtensions__)?void 0:i.initSessionRecording(this._instance),this.Ve._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),this.er()?this.Ve.start(e):this.Ye||(this.Ye=!0,r1.info("persisted remote config is stale, requesting fresh config before starting"),new so(this._instance).load())}onRRwebEmit(e){var t;null==(t=this.Ve)||null==t.onRRwebEmit||t.onRRwebEmit(e)}overrideLinkedFlag(){var e,t;this.Ve||null==(t=this._instance.persistence)||t.register({$replay_override_linked_flag:!0}),null==(e=this.Ve)||e.overrideLinkedFlag()}overrideSampling(){var e,t;this.Ve||null==(t=this._instance.persistence)||t.register({$replay_override_sampling:!0}),null==(e=this.Ve)||e.overrideSampling()}overrideTrigger(e){var t,i;this.Ve||null==(i=this._instance.persistence)||i.register({["url"===e?"$replay_override_url_trigger":"$replay_override_event_trigger"]:!0}
1),null==(t=this.Ve)||t.overrideTrigger(e)}get sdkDebugProperties(){var e;return(null==(e=this.Ve)?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(e,t){var i;return!(null==(i=this.Ve)||!i.tryAddCustomEvent(e,t))}}},{autocapture:class{constructor(e){this.rr=!1,this.sr=null,this.nr=!1,this.instance=e,this.rageclicks=new rV(e.config.rageclick),this.ar=null}initialize(){this.startIfEnabled()}get N(){var e,t,i=L(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}lr(){if(this.isBrowserSupported()){if(o&&p){var e=e=>{e=e||(null==o?void 0:o.event);try{this.ur(e)}catch(e){rK.error("Failed to capture event",e)}};if(tO(p,"submit",e,{capture:!0}),tO(p,"change",e,{capture:!0}),tO(p,"click",e,{capture:!0}),this.N.capture_copied_text){var t=e=>{e=e||(null==o?void 0:o.event),this.ur(e,rW)};tO(p,"copy",t,{capture:!0}),tO(p,"cut",t,{capture:!0})}}}else rK.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.rr&&(this.lr(),this.rr=!0)}onRemoteConfig(e){e.elementsChainAsString&&(this.nr=e.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[tI]:!!e.autocapture_opt_out}),this.sr=!!e.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(e){this.ar=e}getElementSelectors(e){var t,i=[];return null==(t=this.ar)||t.forEach(t=>{var s=null==p?void 0:p.querySelectorAll(t);null==s||s.forEach(s=>{e===s&&i.push(t)})}),i}get isEnabled(){var e,t,i=null==(e=this.instance.persistence)?void 0:e.props[tI];if(H(this.sr)&&!V(i)&&!this.instance.xt())return!1;var s=null!=(t=this.sr)?t:!!i;return!!this.instance.config.autocapture&&!s}ur(e,t){if(void 0===t&&(t="$autocapture"),this.isEnabled){var i,s=rO(e);rb(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,e.timeStamp||(new Date).getTime())&&function(e,t){if(!o||rR(e)||(V(t)?(i=!!t&&rI,s=void 0):(i=null!=(r=null==t?void 0:t.css_selector_ignorelist)?r:rI,s=null==t?void 0:t.content_ignorelist),!1===i))return!1;var i,s,r,{targetElementList:n}=rA(e,!1);return!function(e,t){var i;if(!1===e||j(e))return!1;if(!0===e)i=r$;else{if(!M(e))return!1;if(e.length>10)return td.error("[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching."),!1;i=e.map(e=>e.toLowerCase())}return t.some(e=>{var{safeText:t,ariaLabel:s}=e;return i.some(e=>t.includes(e)||s.includes(e))})}(s,n.map(e=>{var t;return{safeText:rP(e).toLowerCase(),ariaLabel:(null==(t=e.getAttribute("aria-label"))?void 0:t.toLowerCase().trim())||""}}))&&!rT(n,i)}(s,this.instance.config.rageclick)&&this.ur(e,"$rageclick");var r=t===rW;if(s&&function(e,t,i,s,r){if(void 0===i&&(i=void 0),!o||rR(e)||null!=(n=i)&&n.url_allowlist&&!rx(i.url_allowlist)||null!=(a=i)&&a.url_ignorelist&&rx(i.url_ignorelist))return!1;if(null!=(l=i)&&l.dom_event_allowlist){var n,a,l,u,c=i.dom_event_allowlist;if(c&&!c.some(e=>t.type===e))return!1}var{parentIsUsefulElement:h,targetElementList:d}=rA(e,s);if(!function(e,t){var i=null==t?void 0:t.element_allowlist;if(j(i))return!0;var s,r=function(e){if(i.some(t=>e.tagName.toLowerCase()===t))return{v:!0}};for(var n of e)if(s=r(n))return s.v;return!1}(d,i)||!rT(d,null==(u=i)?void 0:u.css_selector_allowlist))return!1;var p=o.getComputedStyle(e);if(p&&"pointer"===p.getPropertyValue("cursor")&&"click"===t.type)return!0;var f=e.tagName.toLowerCase();switch(f){case"html":return!1;case"form":return(r||["submit"]).indexOf(t.type)>=0;case"input":case"select":case"textarea":return(r||["change","click"]).indexOf(t.type)>=0;default:return h?(r||["click"]).indexOf(t.type)>=0:(r||["click"]).indexOf(t.type)>=0&&(rC.indexOf(f)>-1||"true"===e.getAttribute("contenteditable"))}}(s,e,this.N,r,r?["copy","cut"]:void 0)){var{props:n,explicitNoCapture:a}=function(e,t){for(var i,s,{e:r,maskAllElementAttributes:n,maskAllText:a,elementAttributeIgnoreList:l,elementsC
1hainAsString:u}=t,c=[e],h=e;h.parentNode&&!ry(h,"body");)rw(h.parentNode)?(c.push(h.parentNode.host),h=h.parentNode.host):(c.push(h.parentNode),h=h.parentNode);var d,p=[],f={},g=!1,v=!1;if(tm(c,e=>{var t=rM(e);"a"===e.tagName.toLowerCase()&&(g=e.getAttribute("href"),g=t&&g&&rB(g)&&g),C(rS(e),"ph-no-capture")&&(v=!0),p.push(function(e,t,i,s){var r=e.tagName.toLowerCase(),n={tag_name:r};rC.indexOf(r)>-1&&!i&&("a"===r.toLowerCase()||"button"===r.toLowerCase()?n.$el_text=rQ(1024,rG(e)):n.$el_text=rQ(1024,rP(e)));var a=rS(e);a.length>0&&(n.classes=a.filter(function(e){return""!==e})),tm(e.attributes,function(i){var r;if((!rD(e)||-1!==["name","id","class","aria-label"].indexOf(i.name))&&(null==s||!s.includes(i.name))&&!t&&rB(i.value)&&(!q(r=i.name)||"_ngcontent"!==r.substring(0,10)&&"_nghost"!==r.substring(0,7))){var a=i.value;"class"===i.name&&(a=rE(a).join(" ")),n["attr__"+i.name]=rQ(1024,a)}});for(var o=1,l=1,u=e;u=function(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!rm(t))return t}(u);)o++,u.tagName===e.tagName&&l++;return n.nth_child=o,n.nth_of_type=l,n}(e,n,a,l)),ty(f,function(e){if(!rM(e))return{};var t={};return tm(e.attributes,function(e){if(e.name&&0===e.name.indexOf("data-ph-capture-attribute")){var i=e.name.replace("data-ph-capture-attribute-",""),s=e.value;i&&s&&rB(s)&&(t[i]=s)}}),t}(e))}),v)return{props:{},explicitNoCapture:v};if(a||("a"===e.tagName.toLowerCase()||"button"===e.tagName.toLowerCase()?p[0].$el_text=rG(e):p[0].$el_text=rP(e)),g){p[0].attr__href=g;var _,m,y=null==(_=i$(g))?void 0:_.host,b=null==o||null==(m=o.location)?void 0:m.host;y&&b&&y!==b&&(d=g)}return{props:ty({$event_type:r.type,$ce_version:1},u?{}:{$elements:p},{$elements_chain:p.map(e=>{var t,i,s,r={text:null==(i=e.$el_text)?void 0:i.slice(0,400),tag_name:e.tag_name,href:null==(s=e.attr__href)?void 0:s.slice(0,2048),attr_class:(t=e.attr__class)?M(t)?t:rE(t):void 0,attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return tw(e).filter(e=>{var[t]=e;return 0===t.indexOf("attr__")}).forEach(e=>{var[t,i]=e;return r.attributes[t]=i}),r}).map(e=>{var t,i,s="";if(e.tag_name&&(s+=e.tag_name),e.attr_class)for(var r of(e.attr_class.sort(),e.attr_class))s+="."+r.replace(/"/g,"");var n=x({},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 tw(n).sort((e,t)=>{var[i]=e,[s]=t;return i.localeCompare(s)}).forEach(e=>{var[t,i]=e;return a[rz(t.toString())]=rz(i.toString())}),s+=":",s+=tw(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"===r.type?{$external_click_url:d}:{},f)}}(s,{e:e,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.N.element_attribute_ignorelist,elementsChainAsString:this.nr});if(a)return!1;var l=this.getElementSelectors(s);if(l&&l.length>0&&(n.$element_selectors=l),t===rW){var u,c=rk(null==o||null==(u=o.getSelection())?void 0:u.toString()),h=e.type||"clipboard";if(!c)return!1;n.$selected_content=c,n.$copy_type=h}return this.instance.capture(t,n),!0}}}isBrowserSupported(){return D(null==p?void 0:p.querySelectorAll)}},historyAutocapture:class{constructor(e){var t;this._instance=e,this.hr=(null==o||null==(t=o.location)?void 0:t.pathname)||""}initialize(){this.startIfEnabled()}get isEnabled(){return"history_change"===this._instance.config.capture_pageview}startIfEnabled(){this.isEnabled&&(td.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.dr&&this.dr(),this.dr=void 0,td.info("History API monitoring stopped")}monitorHistoryChanges(){var e,t;if(o&&o.history){var i=this;null!=(e=o.history.pushState)&&e.__posthog_wrapped__||rJ(o.history,"pushState",e=>function(t,s,r){e.call(this,t,s,r),i.vr("pushState")}),null!=(t=o.history.replaceState)&&t.__posthog_wrapped__||rJ(o.history,"replaceState",e=>function(t,s,r){e.call(this,t,s,r),i.vr("replaceState")}),this.cr()}}vr(e){try{var t,i=null==o||null==(t=o.location)?void 0:t.pathname;if(!i)return;i!==this.hr&&this.isEnabled&&this._instance.capture("$pageview",{navigation_type:e}),this.hr=i}catch(t){td.error("Error capturing "+e+" pageview",t)}}cr(){if(!this.dr){var e=()=>{this.vr("popstate")};tO(o,"popstate",e),this.dr=()=>{o&&o.removeEventListener("popstate",e)}}}},heatmaps:class{constructor(e){var t;this.pr=!1,this.rr=!1,this._r=null,this.instance=e,this.pr=!(null==(t=this.instance.persistence)||!t.props[tR]),this.rageclicks=new rV(e.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){var e=5e3;return L(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 B(this.instance.config.capture_heatmaps)?B(this.instance.config.enable_heatmaps)?this.pr:this.instance.config.enable_heatmaps:!1!==this.instance.config.capture_heatmaps}startIfEnabled(){if(this.isEnabled)this.rr||(r2.info("starting..."),this.gr(),this.mr());else{var e;clearInterval(null!=(e=this._r)?e:void 0),this.br(),this.getAndClearBuffer()}}onRemoteConfig(e){if("heatmaps"in e){var t=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[tR]:t}),this.pr=t,this.startIfEnabled()}}getAndClearBuffer(){var e=this.C;return this.C=void 0,e}yr(e){this.wr(e.originalEvent,"deadclick")}mr(){this._r&&clearInterval(this._r),this._r="visible"===(null==p?void 0:p.visibilityState)?setInterval(this.Xt.bind(this),this.flushIntervalMilliseconds):null}gr(){o&&p&&(this.Er=this.Xt.bind(this),tO(o,"beforeunload",this.Er),this.Sr=e=>this.wr(e||(null==o?void 0:o.event)),tO(p,"click",this.Sr,{capture:!0}),this.$r=e=>this.kr(e||(null==o?void 0:o.event)),tO(p,"mousemove",this.$r,{capture:!0}),this.Pr=new iS(this.instance,iE,this.yr.bind(this)),this.Pr.startIfEnabledOrStop(),this.Tr=this.mr.bind(this),tO(p,"visibilitychange",this.Tr),this.rr=!0)}br(){var e;o&&p&&(this.Er&&o.removeEventListener("beforeunload",this.Er),this.Sr&&p.removeEventListener("click",this.Sr,{capture:!0}),this.$r&&p.removeEventListener("mousemove",this.$r,{capture:!0}),this.Tr&&p.removeEventListener("visibilitychange",this.Tr),clearTimeout(this.Rr),null==(e=this.Pr)||e.stop(),this.rr=!1)}Ir(e,t){var i=this.instance.scrollManager.scrollY(),s=this.instance.scrollManager.scrollX(),r=this.instance.scrollManager.scrollElement(),n=function(e,t,i){for(var s=e;
1s&&rm(s)&&!ry(s,"body")&&s!==i;){if(C(t,null==o?void 0:o.getComputedStyle(s).position))return!0;s=rF(s)}return!1}(rO(e),["fixed","sticky"],r);return{x:e.clientX+(n?0:s),y:e.clientY+(n?0:i),target_fixed:n,type:t}}wr(e,t){var i;if(void 0===t&&(t="click"),!r_(e.target)&&r3(e)){var s=this.Ir(e,t);null!=(i=this.rageclicks)&&i.isRageClick(e.clientX,e.clientY,(new Date).getTime())&&this.Cr(x({},s,{type:"rageclick"})),this.Cr(s)}}kr(e){!r_(e.target)&&r3(e)&&(clearTimeout(this.Rr),this.Rr=setTimeout(()=>{this.Cr(this.Ir(e,"mousemove"))},500))}Cr(e){if(o){var t=o.location.href,i=this.instance.config.mask_personal_data_properties,s=this.instance.config.custom_personal_data_properties,r=iA(t,i?tb([],iL,s||[]):[],ij);this.C=this.C||{},this.C[r]||(this.C[r]=[]),this.C[r].push(e)}}Xt(){this.C&&!N(this.C)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:iS,webVitalsAutocapture:class{constructor(e){var t;this.pr=!1,this.rr=!1,this.C={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.Or=()=>{clearTimeout(this.Fr),0!==this.C.metrics.length&&(this._instance.capture("$web_vitals",this.C.metrics.reduce((e,t)=>x({},e,{["$web_vitals_"+t.name+"_event"]:x({},t),["$web_vitals_"+t.name+"_value"]:t.value}),{})),this.C={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.Mr=e=>{var t,i=null==(t=this._instance.sessionManager)?void 0:t.checkAndGetSessionAndWindowId(!0);if(j(i))rZ.error("Could not read session ID. Dropping metrics!");else{this.C=this.C||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var s=this.Ar();j(s)||(B(null==e?void 0:e.name)||B(null==e?void 0:e.value)?rZ.error("Invalid metric received",e):this.Dr&&e.value>=this.Dr?rZ.error("Ignoring metric with value >= "+this.Dr,e):(this.C.url!==s&&(this.Or(),this.Fr=setTimeout(this.Or,this.flushToCaptureTimeoutMs)),j(this.C.url)&&(this.C.url=s),this.C.firstMetricTimestamp=j(this.C.firstMetricTimestamp)?Date.now():this.C.firstMetricTimestamp,e.attribution&&e.attribution.interactionTargetElement&&(e.attribution.interactionTargetElement=void 0),this.C.metrics.push(x({},e,{$current_url:s,$session_id:i.sessionId,$window_id:i.windowId,timestamp:Date.now()})),this.C.metrics.length===this.allowedMetrics.length&&this.Or()))}},this.Lr=()=>{if(!this.rr){var e,t,i,s,r=y.__PosthogExtensions__;j(r)||j(r.postHogWebVitalsCallbacks)||({onLCP:e,onCLS:t,onFCP:i,onINP:s}=r.postHogWebVitalsCallbacks),e&&t&&i&&s?(this.allowedMetrics.indexOf("LCP")>-1&&e(this.Mr.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&t(this.Mr.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&i(this.Mr.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&s(this.Mr.bind(this)),this.rr=!0):rZ.error("web vitals callbacks not loaded - not starting")}},this._instance=e,this.pr=!(null==(t=this._instance.persistence)||!t.props[tL]),this.startIfEnabled()}get allowedMetrics(){var e,t,i=L(this._instance.config.capture_performance)?null==(e=this._instance.config.capture_performance)?void 0:e.web_vitals_allowed_metrics:void 0;return B(i)?(null==(t=this._instance.persistence)?void 0:t.props[tq])||["CLS","FCP","INP","LCP"]:i}get flushToCaptureTimeoutMs(){return(L(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals_delayed_flush_ms:void 0)||5e3}get useAttribution(){var e=L(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals_attribution:void 0;return null!=e&&e}get Dr(){var e=L(this._instance.config.capture_performance)&&G(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==f?void 0:f.protocol;if("http:"!==e&&"https:"!==e)return rZ.info("Web Vitals are disabled on non-http/https protocols"),!1;var t=L(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals:V(this._instance.config.capture_performance)?this._instance.config.capture_performance:void 0;return V(t)?t:this.pr}startIfEnabled(){this.isEnabled&&!this.rr&&(rZ.info("enabled, starting..."),this.G(this.Lr))}onRemoteConfig(e){if("capturePerformance"in e){var t=L(e.capturePerformance)&&!!e.capturePerformance.web_vitals,i=L(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[tL]:t}),this._instance.persistence.register({[tq]:i})),this.pr=t,this.startIfEnabled()}}G(e){var t,i;if(null!=(t=y.__PosthogExtensions__)&&t.postHogWebVitalsCallbacks)e();else{var s=this.useAttribution?"web-vitals-with-attribution":"web-vitals";null==(i=y.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,s,t=>{t?rZ.error("failed to load script",t):e()})}}Ar(){var e=o?o.location.href:void 0;if(e){var t=this._instance.config.mask_personal_data_properties,i=this._instance.config.custom_personal_data_properties;return iA(e,t?tb([],iL,i||[]):[],ij)}rZ.error("Could not determine current URL")}}},{exceptionObserver:class{constructor(e){var t,i,s;this.Lr=()=>{var e;if(o&&this.isEnabled&&null!=(e=y.__PosthogExtensions__)&&e.errorWrappingFunctions){var t=y.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,i=y.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,s=y.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.jr&&this.N.capture_unhandled_errors&&(this.jr=t(this.captureException.bind(this))),!this.Nr&&this.N.capture_unhandled_rejections&&(this.Nr=i(this.captureException.bind(this))),!this.Ur&&this.N.capture_console_errors&&(this.Ur=s(this.captureException.bind(this)))}catch(e){rY.error("failed to start",e),this.zr()}}},this._instance=e,this.Hr=!(null==(t=this._instance.persistence)||!t.props[tA]),this.Br=new ee({refillRate:null!=(i=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)?i:1,bucketSize:null!=(s=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)?s:10,refillInterval:1e4,h:rY}),this.N=this.qr(),this.startIfEnabledOrStop()}qr(){var e=this._instance.config.capture_exceptions,t={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return L(e)?t=x({},t,e):(j(e)?this.Hr:e)&&(t=x({},t,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),t}get isEnabled(){return this.N.capture_console_errors||this.N.capture_unhandled_errors||this.N.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(rY.info("enabled"),this.zr(),this.G(this.Lr)):this.zr()}G(e){var t,i;
1null!=(t=y.__PosthogExtensions__)&&t.errorWrappingFunctions&&e(),null==(i=y.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"exception-autocapture",t=>{if(t)return rY.error("failed to load script",t);e()})}zr(){var e,t,i;null==(e=this.jr)||e.call(this),this.jr=void 0,null==(t=this.Nr)||t.call(this),this.Nr=void 0,null==(i=this.Ur)||i.call(this),this.Ur=void 0}onRemoteConfig(e){if("autocaptureExceptions"in e){var t=e.autocaptureExceptions;this.Hr=!!t,this._instance.persistence&&this._instance.persistence.register({[tA]:this.Hr}),this.N=this.qr(),this.startIfEnabledOrStop()}}onConfigChange(){this.N=this.qr()}captureException(e){var t,i,s,r=null!=(t=null==e||null==(i=e.$exception_list)||null==(i=i[0])?void 0:i.type)?t:"Exception";this.Br.consumeRateLimit(r)?rY.info("Skipping exception capture because of client rate limiting.",{exception:r}):null==(s=this._instance.exceptions)||s.sendExceptionEvent(e)}},exceptions:class{constructor(e){var t,i;this.Vr=[],this.Wr=new eZ([new te,new tc,new ti,new tt,new tl,new to,new tr,new tu],function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];return function(t,s){void 0===s&&(s=0);for(var r=[],n=t.split("\n"),a=s;a<n.length;a++){var o=n[a];if(!(o.length>1024)){var l=e9.test(o)?o.replace(e9,"$1"):o;if(!l.match(/\S*Error: /)){for(var u of i){var c=u(l,e);if(c){r.push(c);break}}if(r.length>=50)break}}}if(!r.length)return[];var h=Array.from(r);return h.reverse(),h.slice(0,50).map(e=>x({},e,{filename:e.filename||(h[h.length-1]||{}).filename,function:e.function||"?"}))}}("web:javascript",e6,e7)),this._instance=e,this.Vr=null!=(t=null==(i=this._instance.persistence)?void 0:i.get_property(tM))?t:[]}onRemoteConfig(e){var t,i,s;if("errorTracking"in e){var r=null!=(t=null==(i=e.errorTracking)?void 0:i.suppressionRules)?t:[],n=null==(s=e.errorTracking)?void 0:s.captureExtensionExceptions;this.Vr=r,this._instance.persistence&&this._instance.persistence.register({[tM]:this.Vr,[tD]:n})}}get Gr(){var e,t=!!this._instance.get_property(tD),i=this._instance.config.error_tracking.captureExtensionExceptions;return null!=(e=null!=i?i:t)&&e}buildProperties(e,t){return this.Wr.buildFromUnknown(e,{syntheticException:null==t?void 0:t.syntheticException,mechanism:{handled:null==t?void 0:t.handled}})}sendExceptionEvent(e){var t=e.$exception_list;if(this.Yr(t)){if(this.Jr(t))return void na.info("Skipping exception capture because a suppression rule matched");if(!this.Gr&&this.Kr(t))return void na.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.Xr(t))return void na.info("Skipping exception capture because it was thrown by the PostHog SDK")}return this._instance.capture("$exception",e,{_noTruncate:!0,_batchKey:"exceptionEvent",te:!0})}Jr(e){if(0===e.length)return!1;var t=e.reduce((e,t)=>{var{type:i,value:s}=t;return q(i)&&i.length>0&&e.$exception_types.push(i),q(s)&&s.length>0&&e.$exception_values.push(s),e},{$exception_types:[],$exception_values:[]});return this.Vr.some(e=>{var i=e.values.map(e=>{var i,s=s5[e.operator],r=M(e.value)?e.value:[e.value],n=null!=(i=t[e.key])?i:[];return r.length>0&&s(r,n)});return"OR"===e.type?i.some(Boolean):i.every(Boolean)})}Kr(e){return e.flatMap(e=>{var t,i;return null!=(t=null==(i=e.stacktrace)?void 0:i.frames)?t:[]}).some(e=>e.filename&&e.filename.startsWith("chrome-extension://"))}Xr(e){if(e.length>0){var t,i,s,r,n=null!=(t=null==(i=e[0].stacktrace)?void 0:i.frames)?t:[],a=n[n.length-1];return null!=(s=null==a||null==(r=a.filename)?void 0:r.includes("posthog.com/static"))&&s}return!1}Yr(e){return!B(e)&&M(e)}}},{productTours:class{constructor(e){this.Qr=null,this.Zr=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){"productTours"in e&&(this._instance.persistence&&this._instance.persistence.register({[tj]:!!e.productTours}),this.loadIfEnabled())}loadIfEnabled(){var e,t;this.Qr||(e=this._instance).config.disable_product_tours||null==(t=e.persistence)||!t.get_property(tj)||this.G(()=>this.ts())}G(e){var t,i;null!=(t=y.__PosthogExtensions__)&&t.generateProductTours?e():null==(i=y.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"product-tours",t=>{t?r5.error("Could not load product tours script",t):e()})}ts(){var e;!this.Qr&&null!=(e=y.__PosthogExtensions__)&&e.generateProductTours&&(this.Qr=y.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(e,t){if(void 0===t&&(t=!1),!M(this.Zr)||t){var i=this._instance.persistence;if(i){var s=i.props[r6];if(M(s)&&!t)return this.Zr=s,void e(s,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",callback:t=>{var s=t.statusCode;if(200!==s||!t.json){var r="Product Tours API could not be loaded, status: "+s;return r5.error(r),void e([],{isLoaded:!1,error:r})}var n=M(t.json.product_tours)?t.json.product_tours:[];this.Zr=n,i&&i.register({[r6]:n}),e(n,{isLoaded:!0})}})}else e(this.Zr,{isLoaded:!0})}getActiveProductTours(e){B(this.Qr)?e([],{isLoaded:!1,error:"Product tours not loaded"}):this.Qr.getActiveProductTours(e)}showProductTour(e){var t;null==(t=this.Qr)||t.showTourById(e)}previewTour(e){this.Qr?this.Qr.previewTour(e):this.G(()=>{var t;this.ts(),null==(t=this.Qr)||t.previewTour(e)})}dismissProductTour(){var e;null==(e=this.Qr)||e.dismissTour("user_clicked_skip")}nextStep(){var e;null==(e=this.Qr)||e.nextStep()}previousStep(){var e;null==(e=this.Qr)||e.previousStep()}clearCache(){var e;this.Zr=null,null==(e=this._instance.persistence)||e.unregister(r6)}resetTour(e){var t;null==(t=this.Qr)||t.resetTour(e)}resetAllTours(){var e;null==(e=this.Qr)||e.resetAllTours()}cancelPendingTour(e){var t;null==(t=this.Qr)||t.cancelPendingTour(e)}}},{siteApps:class{constructor(e){this._instance=e,this.es=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}rs(e,t){if(t){var i=this.globalsForEvent(t);this.es.push(i),this.es.length>1e3&&(this.es=this.es.slice(10))}}get siteAppLoaders(){var e;return null==(e=y._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.siteApps}initialize(){if(this.isEnabled){var e=this._instance._addCaptureHook(this.rs.bind(this));this.ss=()=>{e(),this.es=[],this.ss=void 0}}}globalsForEvent(e){if(!e)throw Error("Event payload is required");var t,i,s,r,n,a,o,l={},u=this._instance.get_property("$groups")||[];for(var[c,h]of Object.entries(this._instance.get_property("$stored_group_properties")||{}))l[c]={id:u[c],type:c,properties:h};var{$set_once:d,$set:p}=e;return{event:x({},S(e,r4),{properties:x({},e.properties,p?{$set:x({},null!=(t=null==(i=e.properties)?void 0:i.$set)?t:{},p)}:{},d?{$set_once:x({},null!=(s=null==(r=e.properties)?void 0:r.$set_once)?s:{},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.es.length&&(r8.info("Processing "+this.es.length+" events for site app with id "+e.id),this.es.forEac
1h(e=>null==t.processEvent?void 0:t.processEvent(e)),t.processedBuffer=!0),Object.values(this.apps).every(e=>e.processedBuffer||e.errored)&&(null==(i=this.ss)||i.call(this))},s=!1,r=r=>{t.errored=!r,t.loaded=!0,r8.info("Site app with id "+e.id+" "+(r?"loaded":"errored")),s&&i()};try{var{processEvent:n}=e.init({posthog:this._instance,callback:e=>{r(e)}});n&&(t.processEvent=n),s=!0}catch(t){r8.error("Error while initializing PostHog app with config id "+e.id,t),r(!1)}if(s&&t.loaded)try{i()}catch(i){r8.error("Error while processing buffered events PostHog app with config id "+e.id,i),t.errored=!0}}ns(){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)}os(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){r8.error("Error while processing event "+e.event+" for site app "+i.id,t)}}}onRemoteConfig(e){var t,i,s,r=this;if(null!=(t=this.siteAppLoaders)&&t.length)return this.isEnabled?(this.ns(),void this._instance.on("eventCaptured",e=>this.os(e))):void r8.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if(null==(i=this.ss)||i.call(this),null!=(s=e.siteApps)&&s.length)if(this.isEnabled){var n=function(e){var t;y["__$$ph_site_app_"+e]=r._instance,null==(t=y.__PosthogExtensions__)||null==t.loadSiteApp||t.loadSiteApp(r._instance,o,t=>{if(t)return r8.error("Error while initializing PostHog app with config id "+e,t)})};for(var{id:a,url:o}of e.siteApps)n(a)}else r8.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}},{tracingHeaders:class{constructor(e){this.ls=void 0,this.us=void 0,this.Lr=()=>{var e,t;j(this.ls)&&(null==(e=y.__PosthogExtensions__)||null==(e=e.tracingHeadersPatchFns)||e._patchXHR(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager)),j(this.us)&&(null==(t=y.__PosthogExtensions__)||null==(t=t.tracingHeadersPatchFns)||t._patchFetch(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager))},this._instance=e}initialize(){this.startIfEnabledOrStop()}G(e){var t,i;null!=(t=y.__PosthogExtensions__)&&t.tracingHeadersPatchFns&&e(),null==(i=y.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"tracing-headers",t=>{if(t)return rX.error("failed to load script",t);e()})}startIfEnabledOrStop(){var e,t;this._instance.config.__add_tracing_headers?this.G(this.Lr):(null==(e=this.ls)||e.call(this),null==(t=this.us)||t.call(this),this.ls=void 0,this.us=void 0)}}},{surveys:class{constructor(e){this.hs=void 0,this._surveyManager=null,this.ds=!1,this.vs=[],this.cs=null,this._instance=e,this._surveyEventReceiver=null}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this._instance.config.disable_surveys){var t=e.surveys;if(B(t))return re.warn("Flags not loaded yet. Not loading surveys.");var i=M(t);this.hs=i?t.length>0:t,re.info("flags response received, isSurveysEnabled: "+this.hs),this.loadIfEnabled()}}reset(){localStorage.removeItem("lastSeenSurveyDate");for(var e=[],t=0;t<localStorage.length;t++){var i=localStorage.key(t);(null!=i&&i.startsWith(rt)||null!=i&&i.startsWith("inProgressSurvey_"))&&e.push(i)}e.forEach(e=>localStorage.removeItem(e))}loadIfEnabled(){if(!this._surveyManager)if(this.ds)re.info("Already initializing surveys, skipping...");else if(this._instance.config.disable_surveys)re.info("Disabled. Not loading surveys.");else if(this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())re.info("Not loading surveys in cookieless mode without consent.");else{var e=null==y?void 0:y.__PosthogExtensions__;if(e){if(!j(this.hs)||this._instance.config.advanced_enable_surveys){var t=this.hs||this._instance.config.advanced_enable_surveys;this.ds=!0;try{var i=e.generateSurveys;if(i)return void this.fs(i,t);var s=e.loadExternalDependency;if(!s)return void this.ps("PostHog loadExternalDependency extension not found.");s(this._instance,"surveys",i=>{i||!e.generateSurveys?this.ps("Could not load surveys script",i):this.fs(e.generateSurveys,t)})}catch(e){throw this.ps("Error initializing surveys",e),e}finally{this.ds=!1}}}else re.error("PostHog Extensions not found.")}}fs(e,t){this._surveyManager=e(this._instance,t),this._surveyEventReceiver=new nt(this._instance),re.info("Surveys loaded successfully"),this._s({isLoaded:!0})}ps(e,t){re.error(e,t),this._s({isLoaded:!1,error:e})}onSurveysLoaded(e){return this.vs.push(e),this._surveyManager&&this._s({isLoaded:!0}),()=>{this.vs=this.vs.filter(t=>t!==e)}}getSurveys(e,t){if(void 0===t&&(t=!1),this._instance.config.disable_surveys)return re.info("Disabled. Not loading surveys."),e([]);var i,s=this._instance.get_property(tQ);if(s&&!t)return e(s,{isLoaded:!0});"u">typeof Promise&&this.cs?this.cs.then(t=>{var{surveys:i,context:s}=t;return e(i,s)}):("u">typeof Promise&&(this.cs=new Promise(e=>{i=e})),this._instance._send_request({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.cs=null;var s=t.statusCode;if(200!==s||!t.json){var r="Surveys API could not be loaded, status: "+s;re.error(r);var n={isLoaded:!1,error:r};return e([],n),void(null==i||i({surveys:[],context:n}))}var a,o,l=t.json.surveys||[],u=l.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))});u.length>0&&(null==(o=this._surveyEventReceiver)||o.register(u)),null==(a=this._instance.persistence)||a.register({[tQ]:l});var c={isLoaded:!0};e(l,c),null==i||i({surveys:l,context:c})}}))}
1_s(e){for(var t of this.vs)try{if(!e.isLoaded)return t([],e);this.getSurveys(t)}catch(e){re.error("Error in survey callback",e)}}getActiveMatchingSurveys(e,t){if(void 0===t&&(t=!1),!B(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,t);re.warn("init was not called")}gs(e){var t=null;return this.getSurveys(i=>{var s;t=null!=(s=i.find(t=>t.id===e))?s:null}),t}bs(e){if(B(this._surveyManager))return{eligible:!1,reason:"SDK is not enabled or survey functionality is not yet loaded"};var t="string"==typeof e?this.gs(e):e;return t?this._surveyManager.checkSurveyEligibility(t):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(e){if(B(this._surveyManager))return re.warn("init was not called"),{visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"};var t=this.bs(e);return{visible:t.eligible,disabledReason:t.reason}}canRenderSurveyAsync(e,t){return B(this._surveyManager)?(re.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 s,r=null!=(s=t.find(t=>t.id===e))?s:null;if(r){var n=this.bs(r);i({visible:n.eligible,disabledReason:n.reason})}else i({visible:!1,disabledReason:"Survey not found"})},t)})}renderSurvey(e,t,i){var s;if(B(this._surveyManager))re.warn("init was not called");else{var r="string"==typeof e?this.gs(e):e;if(null!=r&&r.id)if(rs.includes(r.type)){var n=null==p?void 0:p.querySelector(t);if(n)return null!=(s=r.appearance)&&s.surveyPopupDelaySeconds?(re.info("Rendering survey "+r.id+" with delay of "+r.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout(()=>{var e,t;re.info("Rendering survey "+r.id+" with delay of "+(null==(e=r.appearance)?void 0:e.surveyPopupDelaySeconds)+" seconds"),null==(t=this._surveyManager)||t.renderSurvey(r,n,i),re.info("Survey "+r.id+" rendered")},1e3*r.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(r,n,i);re.warn("Survey element not found")}else re.warn("Surveys of type "+r.type+" cannot be rendered in the app");else re.warn("Survey not found")}}displaySurvey(e,t){var i;if(B(this._surveyManager))re.warn("init was not called");else{var s=this.gs(e);if(s){var r=s;if(null!=(i=s.appearance)&&i.surveyPopupDelaySeconds&&t.ignoreDelay&&(r=x({},s,{appearance:x({},s.appearance,{surveyPopupDelaySeconds:0})})),t.displayType!==st&&t.initialResponses&&re.warn("initialResponses is only supported for popover surveys. prefill will not be applied."),!1===t.ignoreConditions){var n=this.canRenderSurvey(s);if(!n.visible)return void re.warn("Survey is not eligible to be displayed: ",n.disabledReason)}"inline"!==t.displayType?this._surveyManager.handlePopoverSurvey(r,t):this.renderSurvey(r,t.selector,t.properties)}else re.warn("Survey not found")}}cancelPendingSurvey(e){B(this._surveyManager)?re.warn("init was not called"):this._surveyManager.cancelSurvey(e)}handlePageUnload(){var e;null==(e=this._surveyManager)||e.handlePageUnload()}}},{toolbar:class{constructor(e){this.instance=e}ys(e){y.ph_toolbar_state=e}ws(){var e;return null!=(e=y.ph_toolbar_state)?e:nn.UNINITIALIZED}initialize(){return this.maybeLoadToolbar()}maybeLoadToolbar(e,t,i){if(void 0===e&&(e=void 0),void 0===t&&(t=void 0),void 0===i&&(i=void 0),tC(this.instance.config)||!o||!p)return!1;e=null!=e?e:o.location,i=null!=i?i:o.history;try{if(!t){try{o.localStorage.setItem("test","test"),o.localStorage.removeItem("test")}catch(e){return!1}t=null==o?void 0:o.localStorage}var s,r=ni||iM(e.hash,"__posthog")||iM(e.hash,"state"),n=r?tE(()=>JSON.parse(atob(decodeURIComponent(r))))||tE(()=>JSON.parse(decodeURIComponent(r))):null;return n&&"ph_authorize"===n.action?((s=n).source="url",s&&Object.keys(s).length>0&&(n.desiredHash?e.hash=n.desiredHash:i?i.replaceState(i.state,"",e.pathname+e.search):e.hash="")):((s=JSON.parse(t.getItem(ns)||"{}")).source="localstorage",delete s.userIntent),!(!s.token||this.instance.config.token!==s.token)&&(this.loadToolbar(s),!0)}catch(e){return!1}}Es(e){var t=y.ph_load_toolbar||y.ph_load_editor;!B(t)&&D(t)?t(e,this.instance):nr.warn("No toolbar load function found")}loadToolbar(e){var t,i=!(null==p||!p.getElementById(t4));if(!o||i)return!1;var s="custom"===this.instance.requestRouter.region&&this.instance.config.advanced_disable_toolbar_metrics,r=x({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor("ui")},s?{instrument:!1}:{});return(o.localStorage.setItem(ns,JSON.stringify(x({},r,{source:void 0}))),this.ws()===nn.LOADED)?this.Es(r):this.ws()===nn.UNINITIALIZED&&(this.ys(nn.LOADING),null==(t=y.__PosthogExtensions__)||null==t.loadExternalDependency||t.loadExternalDependency(this.instance,"toolbar",e=>{e?(nr.error("[Toolbar] Failed to load",e),this.ys(nn.UNINITIALIZED)):(this.ys(nn.LOADED),this.Es(r))}),tO(o,"turbolinks:load",()=>{this.ys(nn.UNINITIALIZED),this.loadToolbar(r)})),!0}xs(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)}}},{experiments:nl},{conversations:class{constructor(e){this.Ss=void 0,this._conversationsManager=null,this.$s=!1,this.ks=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this._instance.config.disable_conversations){var t=e.conversations;B(t)||(V(t)?this.Ss=t:(this.Ss=t.enabled,this.ks=t),this.loadIfEnabled())}}reset(){var e;null==(e=this._conversationsManager)||e.reset(),this._conversationsManager=null,this.Ss=void 0,this.ks=null}loadIfEnabled(){if(!(this._conversationsManager||this.$s||this._instance.config.disable_conversations||tC(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var e=null==y?void 0:y.__PosthogExtensions__;if(e&&!j(this.Ss)&&this.Ss)if(this.ks&&this.ks.token){this.$s=!0;try{var t=e.initConversations;if(t)return this.Ps(t),void(this.$s=!1);var i=e.loadExternalDependency;if(!i)return void this.Ts("PostHog loadExternalDependency extension not found.");i(this._instance,"conversations",t=>{t||!e.initConversations?this.Ts("Could not load conversations script",t):this.Ps(e.initConversations),this.$s=!1})}catch(e){this.Ts("Error initializing conversations",e),this.$s=!1}}else nu.error("Conversations enabled but missing token in remote config.")}}Ps(e){if(this.ks)try{this._conversationsManager=e(this.ks,this._instance),nu.info("Conversations loaded successfully")}catch(e){this.Ts("Error completing conversations initialization",e)}else nu.error("Cannot complete initialization: remote config is null")}Ts(e,t){nu.error(e,t),this._conversationsManager=null,this.$s=!1}show(){this._conversationsManager?this._conversationsManager.show():nu.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return!0===this.Ss&&!H(this._conversationsManager)}isVisible(){var e,t;return null!=(e=null==(t=this._conversationsManager)?void 0:t.isVisible())&&e}sendMessage(e,t,i){var s=this;return E(function*(){return s._conversationsManager?s._conversationsManager.sendMessage(e,t,i):(nu.warn("Conversations not available yet."),null)})()}getMessages(e,t){var i=this;return E(function*(){return i._conversationsManager?i._conversationsManager.getMessages(e,t):(nu.warn("Conversations not available yet."),null)})()}markAsRead(e){var t=this;return E(function*(){return t._conversationsManager?t._conversationsManager.markAsRead(e):(nu.warn("Conversations not available yet."),null)})()}getTickets(e){var t=this;return E(function*(){return t._conversationsManager?t._conversationsManager.getTickets(e):(nu.warn("Conversations not available yet."),null)})()}requestRestoreLink(e){var t=this;return E(function*(){return t._conversationsManager?t._conversationsManager.requestRestoreLink(e):(nu.warn("Conversations not available yet."),null)})()}restoreFromToken(e){var t=this;return E(function*(){return t._conversationsManager?t._conversationsManager.restoreFromToken(e):(nu.warn("Conversations not available yet."),null)})()}restoreFromUrlToken(){var e=this;return E(function*(){return e._conversationsManager?e._conversationsManager.restoreFromUrlToken():(nu.warn("Conversations not available yet."),null)})()}getCurrentTicketId(){var e,t;return null!=(e=null==(t=this._conversationsManager)?void 0:t.getCurrentTicketId())?e:null}getWidgetSessionId(){var e,t;return null!=(e=null==(t=this._conversationsManager)?void 0:t.getWidgetSessionId())?e:null}}},{logs:class{constructor(e){var t;this.Rs=!1,this.Is=!1,this._instance=e,this._instance&&null!=(t=this._instance.config.logs)&&t.captureConsoleLogs&&(this.Rs=!0)}initialize(){this.loadIfEnabled()}onRemoteConfig(e){var t,i=null==(t=e.logs)?void 0:t.captureConsoleLogs;!B(i)&&i&&(this.Rs=!0,this.loadIfEnabled())}reset(){}loadIfEnabled(){if(this.Rs&&!this.Is){var e=tp("[logs]"),t=null==y?void 0:y.__PosthogExtensions__;if(t){var i=t.loadExternalDependency;i?i(this._instance,"logs",i=>{var s;i||null==(s=t.logs)||!s.initializeLogs?e.error("Could not load logs script",i):(t.logs.initializeLogs(this._instance),this.Is=!0)}):e.error("PostHog loadExternalDependency extension not found.")}else e.error("PostHog Extensions not found.")}}}});rv.__defaultExtensionClasses=x({},nc);var nh,nd,np,nf,ng,nv,n_,nm,ny=(nm=rl[rh]=new rv,function(){function e(){e.done||(e.done=!0,rd=!1,tm(rl,function(e){e._dom_loaded()}))}null!=p&&p.addEventListener?"complete"===p.readyState?e():tO(p,"DOMContentLoaded",e,{capture:!1}):o&&td.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")}(),nm),nb=e.i(71645),nw=(0,nb.createContext)({client:ny,bootstrap:void 0});function nE(e){var t,i,s=e.children,r=e.client,n=e.apiKey,a=e.options,o=(0,nb.useRef)(null),l=(0,nb.useMemo)(function(){return r?(n&&console.warn("[PostHog.js] You have provided both `client` and `apiKey` to `PostHogProvider`. `apiKey` will be ignored in favour of `client`."),a&&console.warn("[PostHog.js] You have provided both `client` and `options` to `PostHogProvider`. `options` will be ignored in favour of `client`."),r):(n||console.warn("[PostHog.js] No `apiKey` or `client` were provided to `PostHogProvider`. Using default global `window.posthog` instance. You must initialize it manually. This is not recommended behavior."),ny)},[r,n,JSON.stringify(a)]);return(0,nb.useEffect)(function(){if(!r){var e=o.current;e?(n!==e.apiKey&&console.warn("[PostHog.js] You have provided a different `apiKey` to `PostHogProvider` than the one that was already initialized. This is not supported by our provider and we'll keep using the previous key. If you need to toggle between API Keys you need to control the `client` yourself and pass it in as a prop rather than an `apiKey` prop."),a&&!function e(t,i,s){if(void 0===s&&(s=new WeakMap),t===i)return!0;
1if("object"!=typeof t||null===t||"object"!=typeof i||null===i)return!1;if(s.has(t)&&s.get(t)===i)return!0;s.set(t,i);var r=Object.keys(t),n=Object.keys(i);if(r.length!==n.length)return!1;for(var a=0;a<r.length;a++){var o=r[a];if(!n.includes(o)||!e(t[o],i[o],s))return!1}return!0}(a,e.options)&&ny.set_config(a)):(ny.__loaded&&console.warn("[PostHog.js] `posthog` was already loaded elsewhere. This may cause issues."),ny.init(n,a)),o.current={apiKey:n,options:null!=a?a:{}}}},[r,n,JSON.stringify(a)]),nb.default.createElement(nw.Provider,{value:{client:l,bootstrap:null!=(t=null==a?void 0:a.bootstrap)?t:null==(i=null==r?void 0:r.config)?void 0:i.bootstrap}},s)}var nx=function(e){return"function"==typeof e},nS=function(e,t){return(nS=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)};"function"==typeof SuppressedError&&SuppressedError;var nk={componentStack:null,exceptionEvent:null,error:null},nP=nb.default.Component;if("function"!=typeof nP&&null!==nP)throw TypeError("Class extends value "+String(nP)+" is not a constructor or null");function nO(){this.constructor=nC}function nC(e){var t=nP.call(this,e)||this;return t.state=nk,t}function nT(e){let t,r,n,a=(0,s.c)(4),{children:o}=e;return a[0]===Symbol.for("react.memo_cache_sentinel")?(t=[],a[0]=t):t=a[0],(0,nb.useEffect)(nF,t),a[1]===Symbol.for("react.memo_cache_sentinel")?(r=(0,i.jsx)(nI,{}),a[1]=r):r=a[1],a[2]!==o?(n=(0,i.jsxs)(nE,{client:ny,children:[r,o]}),a[2]=o,a[3]=n):n=a[3],n}function nF(){if(!r.IS_DEMO_MODE&&t.default.env.NEXT_PUBLIC_POSTHOG_KEY){ny.init(t.default.env.NEXT_PUBLIC_POSTHOG_KEY,{api_host:"/relay-OsR8",ui_host:"https://us.posthog.com",autocapture:!1,capture_pageview:!1,capture_pageleave:!0,capture_performance:!1,capture_heatmaps:!1});let e=(0,n.getClientId)();ny.identify(e)}}function n$(){let e,t,i=(0,s.c)(5),r=(0,a.usePathname)(),n=(0,a.useSearchParams)(),o=(0,nb.useContext)(nw).client;return i[0]!==r||i[1]!==o||i[2]!==n?(e=()=>{if(r&&o){let e=window.origin+r,t=n.toString();t&&(e+="?"+t),o.capture("$pageview",{$current_url:e})}},t=[r,n,o],i[0]=r,i[1]=o,i[2]=n,i[3]=e,i[4]=t):(e=i[3],t=i[4]),(0,nb.useEffect)(e,t),null}function nI(){let e,t=(0,s.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsx)(nb.Suspense,{fallback:null,children:(0,i.jsx)(n$,{})}),t[0]=e):e=t[0],e}nS(nC,nP),nC.prototype=null===nP?Object.create(nP):(nO.prototype=nP.prototype,new nO),nC.prototype.componentDidCatch=function(e,t){var i,s=this.props.additionalProperties;nx(s)?i=s(e):"object"==typeof s&&(i=s);var r=this.context.client.captureException(e,i),n=t.componentStack;this.setState({error:e,componentStack:null!=n?n:null,exceptionEvent:r})},nC.prototype.render=function(){var e=this.props,t=e.children,i=e.fallback,s=this.state;if(null==s.componentStack)return nx(t)?t():t;var r=nx(i)?nb.default.createElement(i,{error:s.error,componentStack:s.componentStack,exceptionEvent:s.exceptionEvent}):i;return nb.default.isValidElement(r)?r:(console.warn("[PostHog.js][PostHogErrorBoundary] Invalid fallback prop, provide a valid React element or a function that returns a valid React element."),nb.default.createElement(nb.default.Fragment,null))},nC.contextType=nw,e.s(["PostHogProvider",()=>nT],22372)},63847,e=>{"use strict";let t,i,s,r,n,a;var o=e.i(43476),l=e.i(932);e.i(47167);var u={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},c=new class{#e=u;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},h="u"<typeof window||"Deno"in globalThis;function d(){}function p(e,t){return"function"==typeof e?e(t):e}function f(e,t){let{type:i="all",exact:s,fetchStatus:r,predicate:n,queryKey:a,stale:o}=e;if(a){if(s){if(t.queryHash!==v(a,t.options))return!1}else if(!m(t.queryKey,a))return!1}if("all"!==i){let e=t.isActive();if("active"===i&&!e||"inactive"===i&&e)return!1}return("boolean"!=typeof o||t.isStale()===o)&&(!r||r===t.state.fetchStatus)&&(!n||!!n(t))}function g(e,t){let{exact:i,status:s,predicate:r,mutationKey:n}=e;if(n){if(!t.options.mutationKey)return!1;if(i){if(_(t.options.mutationKey)!==_(n))return!1}else if(!m(t.options.mutationKey,n))return!1}return(!s||t.state.status===s)&&(!r||!!r(t))}function v(e,t){return(t?.queryKeyHashFn||_)(e)}function _(e){return JSON.stringify(e,(e,t)=>w(t)?Object.keys(t).sort().reduce((e,i)=>(e[i]=t[i],e),{}):t)}function m(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&Object.keys(t).every(i=>m(e[i],t[i]))}var y=Object.prototype.hasOwnProperty;function b(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function w(e){if(!E(e))return!1;let t=e.constructor;if(void 0===t)return!0;let i=t.prototype;return!!E(i)&&!!i.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype}function E(e){return"[object Object]"===Object.prototype.toString.call(e)}function x(e,t,i=0){let s=[...e,t];return i&&s.length>i?s.slice(1):s}function S(e,t,i=0){let s=[t,...e];return i&&s.length>i?s.slice(0,-1):s}var k=Symbol();function P(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==k?e.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`))}var O=(t=[],i=0,s=e=>{e()},r=e=>{e()},n=function(e){setTimeout(e,0)},{batch:e=>{let a;i++;try{a=e()}finally{let e;--i||(e=t,t=[],e.length&&n(()=>{r(()=>
1{e.forEach(e=>{s(e)})})}))}return a},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a=e=>{i?t.push(e):n(()=>{s(e)})},setNotifyFunction:e=>{s=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{n=e}}),C=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},T=new class extends C{#i;#s;#r;constructor(){super(),this.#r=e=>{if(!h&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#s||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#s?.(),this.#s=void 0)}setEventListener(e){this.#r=e,this.#s?.(),this.#s=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#i!==e&&(this.#i=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#i?this.#i:globalThis.document?.visibilityState!=="hidden"}},F=new class extends C{#n=!0;#s;#r;constructor(){super(),this.#r=e=>{if(!h&&window.addEventListener){let t=()=>e(!0),i=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",i)}}}}onSubscribe(){this.#s||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#s?.(),this.#s=void 0)}setEventListener(e){this.#r=e,this.#s?.(),this.#s=e(this.setOnline.bind(this))}setOnline(e){this.#n!==e&&(this.#n=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#n}};function $(e){return Math.min(1e3*2**e,3e4)}function I(e){return(e??"online")!=="online"||F.isOnline()}var R=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function A(e){let t,i=!1,s=0,r=function(){let e,t,i=new Promise((i,s)=>{e=i,t=s});function s(e){Object.assign(i,e),delete i.resolve,delete i.reject}return i.status="pending",i.catch(()=>{}),i.resolve=t=>{s({status:"fulfilled",value:t}),e(t)},i.reject=e=>{s({status:"rejected",reason:e}),t(e)},i}(),n=()=>T.isFocused()&&("always"===e.networkMode||F.isOnline())&&e.canRun(),a=()=>I(e.networkMode)&&e.canRun(),o=e=>{"pending"===r.status&&(t?.(),r.resolve(e))},l=e=>{"pending"===r.status&&(t?.(),r.reject(e))},u=()=>new Promise(i=>{t=e=>{("pending"!==r.status||n())&&i(e)},e.onPause?.()}).then(()=>{t=void 0,"pending"===r.status&&e.onContinue?.()}),d=()=>{let t;if("pending"!==r.status)return;let a=0===s?e.initialPromise:void 0;try{t=a??e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(o).catch(t=>{if("pending"!==r.status)return;let a=e.retry??3*!h,o=e.retryDelay??$,p="function"==typeof o?o(s,t):o,f=!0===a||"number"==typeof a&&s<a||"function"==typeof a&&a(s,t);i||!f?l(t):(s++,e.onFail?.(s,t),new Promise(e=>{c.setTimeout(e,p)}).then(()=>n()?void 0:u()).then(()=>{i?l(t):d()}))})};return{promise:r,status:()=>r.status,cancel:t=>{if("pending"===r.status){let i=new R(t);l(i),e.onCancel?.(i)}},continue:()=>(t?.(),r),cancelRetry:()=>{i=!0},continueRetry:()=>{i=!1},canStart:a,start:()=>(a()?d():u().then(d),r)}}var M=class{#a;destroy(){this.clearGcTimeout()}scheduleGc(){var e;this.clearGcTimeout(),"number"==typeof(e=this.gcTime)&&e>=0&&e!==1/0&&(this.#a=c.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(h?1/0:3e5))}clearGcTimeout(){this.#a&&(c.clearTimeout(this.#a),this.#a=void 0)}},D=class extends M{#o;#l;#u;#c;#h;#d;#p;constructor(e){super(),this.#p=!1,this.#d=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#c=e.client,this.#u=this.#c.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#o=N(this.options),this.state=e.state??this.#o,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#h?.promise}setOptions(e){if(this.options={...this.#d,...e},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){let e=N(this.options);void 0!==e.data&&(this.setState(L(e.data,e.dataUpdatedAt)),this.#o=e)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#u.remove(this)}setData(e,t){var i,s;let r=(i=this.state.data,"function"==typeof(s=this.options).structuralSharing?s.structuralSharing(i,e):!1!==s.structuralSharing?function e(t,i,s=0){if(t===i)return t;if(s>500)return i;
1let r=b(t)&&b(i);if(!r&&!(w(t)&&w(i)))return i;let n=(r?t:Object.keys(t)).length,a=r?i:Object.keys(i),o=a.length,l=r?Array(o):{},u=0;for(let c=0;c<o;c++){let o=r?c:a[c],h=t[o],d=i[o];if(h===d){l[o]=h,(r?c<n:y.call(t,o))&&u++;continue}if(null===h||null===d||"object"!=typeof h||"object"!=typeof d){l[o]=d;continue}let p=e(h,d,s+1);l[o]=p,p===h&&u++}return n===o&&u===n?t:l}(i,e):e);return this.#f({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e,t){this.#f({type:"setState",state:e,setStateOptions:t})}cancel(e){let t=this.#h?.promise;return this.#h?.cancel(e),t?t.then(d).catch(d):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#o)}isActive(){return this.observers.some(e=>{var t;return!1!==(t=e.options.enabled,"function"==typeof t?t(this):t)})}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===k||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===p(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(e=0){return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!Math.max(this.state.dataUpdatedAt+(e||0)-Date.now(),0))}onFocus(){let e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#h?.continue()}onOnline(){let e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#h?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#u.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#h&&(this.#p?this.#h.cancel({revert:!0}):this.#h.cancelRetry()),this.scheduleGc()),this.#u.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#f({type:"invalidate"})}async fetch(e,t){let i;if("idle"!==this.state.fetchStatus&&this.#h?.status()!=="rejected"){if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#h)return this.#h.continueRetry(),this.#h.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let s=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#p=!0,s.signal)})},n=()=>{let e,i=P(this.options,t),s=(r(e={client:this.#c,queryKey:this.queryKey,meta:this.meta}),e);return(this.#p=!1,this.options.persister)?this.options.persister(i,s,this):i(s)},a=(r(i={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#c,state:this.state,fetchFn:n}),i);this.options.behavior?.onFetch(a,this),this.#l=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#f({type:"fetch",meta:a.fetchOptions?.meta}),this.#h=A({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof R&&e.revert&&this.setState({...this.#l,fetchStatus:"idle"}),s.abort()},onFail:(e,t)=>{this.#f({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#f({type:"pause"})},onContinue:()=>{this.#f({type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#h.start();if(void 0===e)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#u.config.onSuccess?.(e,this),this.#u.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof R){if(e.silent)return this.#h.promise;else if(e.revert){if(void 0===this.state.data)throw e;return this.state.data}}throw this.#f({type:"error",error:e}),this.#u.config.onError?.(e,this),this.#u.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#f(e){let t=t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":var i;return{...t,...(i=t.data,{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:I(this.options.networkMode)?"fetching":"paused",...void 0===i&&{error:null,status:"pending"}}),fetchMeta:e.meta??null};case"success":let s={...t,...L(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#l=e.manual?s:void 0,s;case"error":let r=e.error;
vendor: 4,668 bytes, line 1
1return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}};this.state=t(this.state),O.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#u.notify({query:this,type:"updated",action:e})})}};function L(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function N(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,i=void 0!==t,s=i?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:i?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var j=class extends C{constructor(e={}){super(),this.config=e,this.#g=new Map}#g;build(e,t,i){let s=t.queryKey,r=t.queryHash??v(s,t),n=this.get(r);return n||(n=new D({client:e,queryKey:s,queryHash:r,options:e.defaultQueryOptions(t),state:i,defaultOptions:e.getQueryDefaults(s)}),this.add(n)),n}add(e){this.#g.has(e.queryHash)||(this.#g.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#g.get(e.queryHash);t&&(e.destroy(),t===e&&this.#g.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){O.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#g.get(e)}getAll(){return[...this.#g.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>f(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>f(e,t)):t}notify(e){O.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){O.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){O.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},q=class extends M{#c;#v;#_;#h;constructor(e){super(),this.#c=e.client,this.mutationId=e.mutationId,this.#_=e.mutationCache,this.#v=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#v.includes(e)||(this.#v.push(e),this.clearGcTimeout(),this.#_.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#v=this.#v.filter(t=>t!==e),this.scheduleGc(),this.#_.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#v.length||("pending"===this.state.status?this.scheduleGc():this.#_.remove(this))}continue(){return this.#h?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#f({type:"continue"})},i={client:this.#c,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#h=A({fn:()=>this.options.mutationFn?this.options.mutationFn(e,i):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#f({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#f({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#_.canRun(this)});let s="pending"===this.state.status,r=!this.#h.canStart();try{if(s)t();else{this.#f({type:"pending",variables:e,isPaused:r}),this.#_.config.onMutate&&await this.#_.config.onMutate(e,this,i);let t=await this.options.onMutate?.(e,i);t!==this.state.context&&this.#f({type:"pending",context:t,variables:e,isPaused:r})}let n=await this.#h.start();return await this.#_.config.onSuccess?.(n,e,this.state.context,this,i),await this.options.onSuccess?.(n,e,this.state.context,i),await this.#_.config.onSettled?.(n,null,this.state.variables,this.state.context,this,i),await this.options.onSettled?.(n,null,e,this.state.context,i),this.#f({type:"success",data:n}),n}catch(t){try{await this.#_.config.onError?.(t,e,this.state.context,this,i)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,i)}catch(e){Promise.reject(e)}try{await this.#_.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,i)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,i)}catch(e){Promise.reject(e)}throw this.#f({type:"error",error:t}),t}finally{this.#_.runNext(this)}}#f(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};
1case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),O.batch(()=>{this.#v.forEach(t=>{t.onMutationUpdate(e)}),this.#_.notify({mutation:this,type:"updated",action:e})})}},U=class extends C{constructor(e={}){super(),this.config=e,this.#m=new Set,this.#y=new Map,this.#b=0}#m;#y;#b;build(e,t,i){let s=new q({client:e,mutationCache:this,mutationId:++this.#b,options:e.defaultMutationOptions(t),state:i});return this.add(s),s}add(e){this.#m.add(e);let t=H(e);if("string"==typeof t){let i=this.#y.get(t);i?i.push(e):this.#y.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#m.delete(e)){let t=H(e);if("string"==typeof t){let i=this.#y.get(t);if(i)if(i.length>1){let t=i.indexOf(e);-1!==t&&i.splice(t,1)}else i[0]===e&&this.#y.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){let t=H(e);if("string"!=typeof t)return!0;{let i=this.#y.get(t),s=i?.find(e=>"pending"===e.state.status);return!s||s===e}}runNext(e){let t=H(e);if("string"!=typeof t)return Promise.resolve();{let i=this.#y.get(t)?.find(t=>
vendor: 4,231 bytes, line 1
1t!==e&&t.state.isPaused);return i?.continue()??Promise.resolve()}}clear(){O.batch(()=>{this.#m.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#m.clear(),this.#y.clear()})}getAll(){return Array.from(this.#m)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>g(t,e))}findAll(e={}){return this.getAll().filter(t=>g(e,t))}notify(e){O.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return O.batch(()=>Promise.all(e.map(e=>e.continue().catch(d))))}};function H(e){return e.options.scope?.id}function B(e){return{onFetch:(t,i)=>{let s=t.options,r=t.fetchOptions?.meta?.fetchMore?.direction,n=t.state.data?.pages||[],a=t.state.data?.pageParams||[],o={pages:[],pageParams:[]},l=0,u=async()=>{let i=!1,u=P(t.options,t.fetchOptions),c=async(e,s,r)=>{if(i)return Promise.reject();if(null==s&&e.pages.length)return Promise.resolve(e);let n=(()=>{var e,n;let a,o,l={client:t.client,queryKey:t.queryKey,pageParam:s,direction:r?"backward":"forward",meta:t.options.meta};return e=()=>t.signal,n=()=>i=!0,o=!1,Object.defineProperty(l,"signal",{enumerable:!0,get:()=>(a??=e(),o||(o=!0,a.aborted?n():a.addEventListener("abort",n,{once:!0})),a)}),l})(),a=await u(n),{maxPages:o}=t.options,l=r?S:x;return{pages:l(e.pages,a,o),pageParams:l(e.pageParams,s,o)}};if(r&&n.length){let e="backward"===r,t={pages:n,pageParams:a},i=(e?function(e,{pages:t,pageParams:i}){return t.length>0?e.getPreviousPageParam?.(t[0],t,i[0],i):void 0}:G)(s,t);o=await c(t,i,e)}else{let t=e??n.length;do{let e=0===l?a[0]??s.initialPageParam:G(s,o);if(l>0&&null==e)break;o=await c(o,e),l++}while(l<t)}return o};t.options.persister?t.fetchFn=()=>t.options.persister?.(u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},i):t.fetchFn=u}}}function G(e,{pages:t,pageParams:i}){let s=t.length-1;return t.length>0?e.getNextPageParam(t[s],t,i[s],i):void 0}var z=class{#w;#_;#d;#E;#x;#S;#k;#P;constructor(e={}){this.#w=e.queryCache||new j,this.#_=e.mutationCache||new U,this.#d=e.defaultOptions||{},this.#E=new Map,this.#x=new Map,this.#S=0}mount(){this.#S++,1===this.#S&&(this.#k=T.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#w.onFocus())}),this.#P=F.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#w.onOnline())}))}unmount(){this.#S--,0===this.#S&&(this.#k?.(),this.#k=void 0,this.#P?.(),this.#P=void 0)}isFetching(e){return this.#w.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#_.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#w.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),i=this.#w.build(this,t),s=i.state.data;return void 0===s?this.fetchQuery(e):(e.revalidateIfStale&&i.isStaleByTime(p(t.staleTime,i))&&this.prefetchQuery(t),Promise.resolve(s))}getQueriesData(e){return this.#w.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,i){let s=this.defaultQueryOptions({queryKey:e}),r=this.#w.get(s.queryHash),n=r?.state.data,a="function"==typeof t?t(n):t;if(void 0!==a)return this.#w.build(this,s).setData(a,{...i,manual:!0})}setQueriesData(e,t,i){return O.batch(()=>this.#w.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,i)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#w.get(t.queryHash)?.state}removeQueries(e){let t=this.#w;O.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let i=this.#w;return O.batch(()=>(i.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){let i={revert:!0,...t};return Promise.all(O.batch(()=>this.#w.findAll(e).map(e=>e.cancel(i)))).then(d).catch(d)}invalidateQueries(e,t={}){return O.batch(()=>(this.#w.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t))}refetchQueries(e,t={}){let i={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(O.batch(()=>this.#w.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,i);return i.throwOnError||(t=t.catch(d)),"paused"===e.state.fetchStatus?Promise.resolve():t}
1))).then(d)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let i=this.#w.build(this,t);return i.isStaleByTime(p(t.staleTime,i))?i.fetch(t):Promise.resolve(i.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(d).catch(d)}fetchInfiniteQuery(e){return e.behavior=B(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(d).catch(d)}ensureInfiniteQueryData(e){return e.behavior=B(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return F.isOnline()?this.#_.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#w}getMutationCache(){return this.#_}getDefaultOptions(){return this.#d}setDefaultOptions(e){this.#d=e}setQueryDefaults(e,t){this.#E.set(_(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#E.values()],i={};return t.forEach(t=>{m(e,t.queryKey)&&Object.assign(i,t.defaultOptions)}),i}setMutationDefaults(e,t){this.#x.set(_(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#x.values()],i={};return t.forEach(t=>{m(e,t.mutationKey)&&Object.assign(i,t.defaultOptions)}),i}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#d.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=v(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===k&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#d.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#w.clear(),this.#_.clear()}},V=e.i(71645),W=V.createContext(void 0),K=({client:e,children:t})=>(V.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,o.jsx)(W.Provider,{value:e,children:t}));function Q(){return new z}e.s(["default",0,e=>{let t,i=(0,l.c)(3),{children:s}=e,[r]=(0,V.useState)(Q);return i[0]!==s||i[1]!==r?(t=(0,o.jsx)(K,{client:r,children:s}),i[0]=s,i[1]=r,i[2]=t):t=i[2],t}],63847)},79272,e=>{"use strict";var t=e.i(43476),i=e.i(932),s=e.i(71645),r=(e,t,i,s,r,n,a,o)=>{let l=document.documentElement,u=["light","dark"];function c(t){var i;(Array.isArray(e)?e:[e]).forEach(e=>{let i="class"===e,s=i&&n?r.map(e=>n[e]||e):r;i?(l.classList.remove(...s),l.classList.add(n&&n[t]?n[t]:t)):l.setAttribute(e,t)}),i=t,o&&u.includes(i)&&(l.style.colorScheme=i)}if(s)c(s);else try{let e=localStorage.getItem(t)||i,s=a&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;c(s)}catch(e){}},n=s.createContext(void 0),a={setTheme:e=>{},themes:[]};s.memo(({forcedTheme:e,storageKey:t,attribute:i,enableSystem:n,enableColorScheme:a,defaultTheme:o,value:l,themes:u,nonce:c,scriptProps:h})=>{let d=JSON.stringify([i,t,o,e,u,l,n,a]).slice(1,-1);return s.createElement("script",{...h,suppressHydrationWarning:!0,nonce:"u"<typeof window?c:"",dangerouslySetInnerHTML:{__html:`(${r.toString()})(${d})`}})});var o=e.i(46696);let l=e=>{var r;let l,u,c,h=(0,i.c)(6);h[0]!==e?({...l}=e,h[0]=e,h[1]=l):l=h[1];let{theme:d}=null!=(r=s.useContext(n))?r:a,p=void 0===d?"dark":d;return h[2]===Symbol.for("react.memo_cache_sentinel")?(u={classNames:{toast:"group toast group-[.toaster]:bg-neutral-800 group-[.toaster]:text-neutral-100 group-[.toaster]:border group-[.toaster]:border-neutral-700/50 group-[.toaster]:rounded-md group-[.toaster]:shadow-md group-[.toaster]:p-3 group-[.toaster]:text-sm",description:"group-[.toast]:text-neutral-400 group-[.toast]:text-xs",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground group-[.toast]:px-3 group-[.toast]:py-1 group-[.toast]:rounded-md group-[.toast]:text-xs group-[.toast]:font-medium hover:group-[.toast]:bg-primary/90",cancelButton:"group-[.toast]:bg-neutral-700 group-[.toast]:text-neutral-300 group-[.toast]:px-3 group-[.toast]:py-1 group-[.toast]:rounded-md group-[.toast]:text-xs group-[.toast]:font-medium hover:group-[.toast]:bg-neutral-600"}},h[2]=u):u=h[2],h[3]!==l||h[4]!==p?(c=(0,t.jsx)(o.Toaster,{theme:p,className:"toaster group",position:"top-right",toastOptions:u,...l}),h[3]=l,h[4]=p,h[5]=c):c=h[5],c};e.s(["Toaster",()=>l],79272)},43880,e=>{"use strict";var t=e.i(47167),i=e.i(71645);function s(){return"u">typeof window}function r(){return"production"}function n(){return(s()?window.vam:r())||"production"}function a(){return"production"===n()}function o(){return"development"===n()}function l(e,t,i){var r,n;if(!s()){let e="[Vercel Web Analytics] Please import `track` from `@vercel/analytics/server` when using this function in a server environment";if(a())console.warn(e);else throw Error(e);return}if(!t){null==(r=window.va)||r.call(window,"event",{name:e,options:i});return}try{let s=function(e,t){if(!e)return;let i=e,s=[];for(let[r,n]of Object.entries(e))"object"==typeof n&&null!==n&&(t.strip?i=function(e,{[e]:t,...i}){return i}(r,i):s.push(r));if(s.length>0&&!t.strip)throw Error(`The following properties are not valid: ${s.join(", ")}. Only strings, numbers, booleans, and null are allowed.`);return i}
1(t,{strip:a()});null==(n=window.va)||n.call(window,"event",{name:e,data:s,options:i})}catch(e){e instanceof Error&&o()&&console.error(e)}}function u(e){return(0,i.useEffect)(()=>{var t;e.beforeSend&&(null==(t=window.va)||t.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]),(0,i.useEffect)(()=>{!function(e={debug:!0}){var t;if(!s())return;!function(e="auto"){if("auto"===e){window.vam=r();return}window.vam=e}(e.mode),window.va||(window.va=function(...e){(window.vaq=window.vaq||[]).push(e)}),e.beforeSend&&(null==(t=window.va)||t.call(window,"beforeSend",e.beforeSend));let i=e.scriptSrc?e.scriptSrc:o()?"https://va.vercel-scripts.com/v1/script.debug.js":e.basePath?`${e.basePath}/insights/script.js`:"/_vercel/insights/script.js";if(document.head.querySelector(`script[src*="${i}"]`))return;let n=document.createElement("script");n.src=i,n.defer=!0,n.dataset.sdkn="@vercel/analytics"+(e.framework?`/${e.framework}`:""),n.dataset.sdkv="1.6.1",e.disableAutoTrack&&(n.dataset.disableAutoTrack="1"),e.endpoint?n.dataset.endpoint=e.endpoint:e.basePath&&(n.dataset.endpoint=`${e.basePath}/insights`),e.dsn&&(n.dataset.dsn=e.dsn),n.onerror=()=>{let e=o()?"Please check if any ad blockers are enabled and try again.":"Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";console.log(`[Vercel Web Analytics] Failed to load script from ${i}. ${e}`)},o()&&!1===e.debug&&(n.dataset.debug="false"),document.head.appendChild(n)}({framework:e.framework||"react",basePath:e.basePath??function(){if(void 0!==t.default&&void 0!==t.default.env)return t.default.env.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}(),...void 0!==e.route&&{disableAutoTrack:!0},...e})},[]),(0,i.useEffect)(()=>{e.route&&e.path&&function({route:e,path:t}){var i;null==(i=window.va)||i.call(window,"pageview",{route:e,path:t})}({route:e.route,path:e.path})},[e.route,e.path]),null}e.s(["Analytics",()=>u,"track",()=>l])}]);

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.