posthog-js 1.371.2 → 1.371.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- !function(){"use strict";var e="1.371.2",r="web";function t(){return t=Object.assign?Object.assign.bind():function(e){for(var r=1;arguments.length>r;r++){var t=arguments[r];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},t.apply(null,arguments)}function n(e,r){return-1!==e.indexOf(r)}var i=Object.prototype,o=i.hasOwnProperty,a=i.toString,l=Array.isArray||function(e){return"[object Array]"===a.call(e)},u=e=>e===Object(e)&&!l(e),s=e=>{if(u(e)){for(var r in e)if(o.call(e,r))return!1;return!0}return!1},c=e=>void 0===e,d=e=>c(e)||(e=>null===e)(e),f=e=>"[object Number]"==a.call(e)&&e==e,v=e=>e instanceof FormData;function h(e,r,t,n,i){return r>t&&(n.warn("min cannot be greater than max."),r=t),f(e)?e>t?(n.warn(" cannot be greater than max: "+t+". Using max value instead."),t):r>e?(n.warn(" cannot be less than min: "+r+". Using min value instead."),r):e:(n.warn(" must be a number. using max or fallback. max: "+t+", fallback: "+i),h(t,r,t,n))}class p{constructor(e){this.$t={},this.zt=e.zt,this.Ut=h(e.bucketSize,0,100,e.Yt),this.Wt=h(e.refillRate,0,this.Ut,e.Yt),this.Gt=h(e.refillInterval,0,864e5,e.Yt)}Xt(e,r){var t=Math.floor((r-e.lastAccess)/this.Gt);t>0&&(e.tokens=Math.min(e.tokens+t*this.Wt,this.Ut),e.lastAccess=e.lastAccess+t*this.Gt)}consumeRateLimit(e){var r,t=Date.now(),n=String(e),i=this.$t[n];return i?this.Xt(i,t):this.$t[n]=i={tokens:this.Ut,lastAccess:t},0===i.tokens||(i.tokens--,0===i.tokens&&(null==(r=this.zt)||r.call(this,e)),0===i.tokens)}stop(){this.$t={}}}var g="Mobile",m="iOS",w="Android",_="Tablet",b=w+" "+_,x="iPad",E="Apple",y=E+" Watch",R="Safari",M="BlackBerry",S="Samsung",P=S+"Browser",k=S+" Internet",A="Chrome",O=A+" OS",B=A+" "+m,U="Internet Explorer",I=U+" "+g,T="Opera",D=T+" Mini",N="Edge",C="Microsoft "+N,F="Firefox",W=F+" "+m,j="Nintendo",z="PlayStation",L="Xbox",K=w+" "+g,H=g+" "+R,G="Windows",V=G+" Phone",X="Nokia",q="Ouya",Y="Generic",J=Y+" "+g.toLowerCase(),Q=Y+" "+_.toLowerCase(),Z="Konqueror",ee="(\\d+(\\.\\d+)?)",re=new RegExp("Version/"+ee),te=new RegExp(L,"i"),ne=new RegExp(z+" \\w+","i"),ie=new RegExp(j+" \\w+","i"),oe=new RegExp(M+"|PlayBook|BB10","i"),ae={"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"},le=function(e,r){return r=r||"",n(e," OPR/")&&n(e,"Mini")?D:n(e," OPR/")?T:oe.test(e)?M:n(e,"IE"+g)||n(e,"WPDesktop")?I:n(e,P)?k:n(e,N)||n(e,"Edg/")?C:n(e,"FBIOS")?"Facebook "+g:n(e,"UCWEB")||n(e,"UCBrowser")?"UC Browser":n(e,"CriOS")?B:n(e,"CrMo")||n(e,A)?A:n(e,w)&&n(e,R)?K:n(e,"FxiOS")?W:n(e.toLowerCase(),Z.toLowerCase())?Z:((e,r)=>r&&n(r,E)||function(e){return n(e,R)&&!n(e,A)&&!n(e,w)}(e))(e,r)?n(e,g)?H:R:n(e,F)?F:n(e,"MSIE")||n(e,"Trident/")?U:n(e,"Gecko")?F:""},ue={[I]:[new RegExp("rv:"+ee)],[C]:[new RegExp(N+"?\\/"+ee)],[A]:[new RegExp("("+A+"|CrMo)\\/"+ee)],[B]:[new RegExp("CriOS\\/"+ee)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+ee)],[R]:[re],[H]:[re],[T]:[new RegExp("(Opera|OPR)\\/"+ee)],[F]:[new RegExp(F+"\\/"+ee)],[W]:[new RegExp("FxiOS\\/"+ee)],[Z]:[new RegExp("Konqueror[:/]?"+ee,"i")],[M]:[new RegExp(M+" "+ee),re],[K]:[new RegExp("android\\s"+ee,"i")],[k]:[new RegExp(P+"\\/"+ee)],[U]:[new RegExp("(rv:|MSIE )"+ee)],Mozilla:[new RegExp("rv:"+ee)]},se=function(e,r){var t=le(e,r),n=ue[t];if(c(n))return null;for(var i=0;n.length>i;i++){var o=e.match(n[i]);if(o)return parseFloat(o[o.length-2])}return null},ce=[[new RegExp(L+"; "+L+" (.*?)[);]","i"),e=>[L,e&&e[1]||""]],[new RegExp(j,"i"),[j,""]],[new RegExp(z,"i"),[z,""]],[oe,[M,""]],[new RegExp(G,"i"),(e,r)=>{if(/Phone/.test(r)||/WPDesktop/.test(r))return[V,""];if(new RegExp(g).test(r)&&!/IEMobile\b/.test(r))return[G+" "+g,""];var t=/Windows NT ([0-9.]+)/i.exec(r);if(t&&t[1]){var n=ae[t[1]]||"";return/arm/i.test(r)&&(n="RT"),[G,n]}return[G,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>e&&e[3]?[m,[e[3],e[4],e[5]||"0"].join(".")]:[m,""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var r="";return e&&e.length>=3&&(r=c(e[2])?e[3]:e[2]),["watchOS",r]}],[new RegExp("("+w+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+w+")","i"),e=>e&&e[2]?[w,[e[2],e[3],e[4]||"0"].join(".")]:[w,""]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var r=["Mac OS X",""];return e&&e[1]&&(r[1]=[e[1],e[2],e[3]||"0"].join(".")),r}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[O,""]],[/Linux|debian/i,["Linux",""]]],de=function(e){return ie.test(e)?j:ne.test(e)?z:te.test(e)?L:new RegExp(q,"i").test(e)?q:new RegExp("("+V+"|WPDesktop)","i").test(e)?V:/iPad/.test(e)?x:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?y:oe.test(e)?M:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(X,"i").test(e)?X:/(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(g).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)?w:b:new RegExp("(pda|"+g+")","i").test(e)?J:new RegExp(_,"i").test(e)&&!new RegExp(_+" pc","i").test(e)?Q:""},fe="undefined"!=typeof window?window:void 0,ve="undefined"!=typeof globalThis?globalThis:fe;"undefined"==typeof self&&(ve.self=ve),"undefined"==typeof File&&(ve.File=function(){});var he=null==ve?void 0:ve.navigator,pe=null==ve?void 0:ve.document,ge=null==ve?void 0:ve.location;null!=ve&&ve.XMLHttpRequest&&new ve.XMLHttpRequest;var me=null==he?void 0:he.userAgent,we=null!=fe?fe:{},_e=function(e,r){var{debugEnabled:t}=void 0===r?{}:r,n={C(r){if(fe&&(we.POSTHOG_DEBUG||t)&&!c(fe.console)&&fe.console){for(var n=("__rrweb_original__"in fe.console[r]?fe.console[r].__rrweb_original__:fe.console[r]),i=arguments.length,o=new Array(i>1?i-1:0),a=1;i>a;a++)o[a-1]=arguments[a];n(e,...o)}},info(){for(var e=arguments.length,r=new Array(e),t=0;e>t;t++)r[t]=arguments[t];n.C("log",...r)},warn(){for(var e=arguments.length,r=new Array(e),t=0;e>t;t++)r[t]=arguments[t];n.C("warn",...r)},error(){for(var e=arguments.length,r=new Array(e),t=0;e>t;t++)r[t]=arguments[t];n.C("error",...r)},critical(){for(var r=arguments.length,t=new Array(r),n=0;r>n;n++)t[n]=arguments[n];console.error(e,...t)},uninitializedWarning(e){n.error("You must initialize PostHog before calling "+e)},createLogger:(r,t)=>_e(e+" "+r,t)};return n},be=_e("[PostHog.js]"),xe=be.createLogger;function Ee(e,r){if(!d(e))if(l(e))e.forEach(r);else if(v(e))e.forEach(((e,t)=>r(e,t)));else for(var t in e)o.call(e,t)&&r(e[t],t)}var ye=function(e){for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;r>n;n++)t[n-1]=arguments[n];for(var i of t)for(var o in i)void 0!==i[o]&&(e[o]=i[o]);return e},Re=e=>{var r=null==pe?void 0:pe.createElement("a");return c(r)?null:(r.href=e,r)},$e=function(e,r,t){if(!e||!r||!r.length)return e;for(var n=e.split("#"),i=n[1],o=(n[0]||"").split("?"),a=o[1],u=o[0],s=(a||"").split("&"),c=[],d=0;s.length>d;d++){var f=s[d].split("=");l(f)&&(r.includes(f[0])?c.push(f[0]+"="+t):c.push(s[d]))}var v=u;return null!=a&&(v+="?"+c.join("&")),null!=i&&(v+="#"+i),v};Math.trunc||(Math.trunc=function(e){return 0>e?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return f(e)&&isFinite(e)&&Math.floor(e)===e});class Me{constructor(e){if(this.bytes=e,16!==e.length)throw new TypeError("not 128-bit length")}static fromFieldsV7(e,r,t,n){if(!Number.isInteger(e)||!Number.isInteger(r)||!Number.isInteger(t)||!Number.isInteger(n)||0>e||0>r||0>t||0>n||e>0xffffffffffff||r>4095||t>1073741823||n>4294967295)throw new RangeError("invalid field value");var i=new Uint8Array(16);return i[0]=e/Math.pow(2,40),i[1]=e/Math.pow(2,32),i[2]=e/Math.pow(2,24),i[3]=e/Math.pow(2,16),i[4]=e/Math.pow(2,8),i[5]=e,i[6]=112|r>>>8,i[7]=r,i[8]=128|t>>>24,i[9]=t>>>16,i[10]=t>>>8,i[11]=t,i[12]=n>>>24,i[13]=n>>>16,i[14]=n>>>8,i[15]=n,new Me(i)}toString(){for(var e="",r=0;this.bytes.length>r;r++)e=e+(this.bytes[r]>>>4).toString(16)+(15&this.bytes[r]).toString(16),3!==r&&5!==r&&7!==r&&9!==r||(e+="-");if(36!==e.length)throw new Error("Invalid UUIDv7 was generated");return e}clone(){return new Me(this.bytes.slice(0))}equals(e){return 0===this.compareTo(e)}compareTo(e){for(var r=0;16>r;r++){var t=this.bytes[r]-e.bytes[r];if(0!==t)return Math.sign(t)}return 0}}class Se{constructor(){this.I=0,this.S=0,this.k=new Ae}generate(){var e=this.generateOrAbort();if(c(e)){this.I=0;var r=this.generateOrAbort();if(c(r))throw new Error("Could not generate UUID after timestamp reset");return r}return e}generateOrAbort(){var e=Date.now();if(e>this.I)this.I=e,this.A();else{if(this.I>=e+1e4)return;this.S++,this.S>4398046511103&&(this.I++,this.A())}return Me.fromFieldsV7(this.I,Math.trunc(this.S/Math.pow(2,30)),this.S&Math.pow(2,30)-1,this.k.nextUint32())}A(){this.S=1024*this.k.nextUint32()+(1023&this.k.nextUint32())}}var Pe,ke=e=>{if("undefined"!=typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var r=0;e.length>r;r++)e[r]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};fe&&!c(fe.crypto)&&crypto.getRandomValues&&(ke=e=>crypto.getRandomValues(e));class Ae{constructor(){this.T=new Uint32Array(8),this.N=1/0}nextUint32(){return this.T.length>this.N||(ke(this.T),this.N=0),this.T[this.N++]}}var Oe=()=>(Pe||(Pe=new Se)).generate(),Be="",Ue=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i;function Ie(e,r){if(r){var t=function(e,r){if(void 0===r&&(r=pe),Be)return Be;if(!r)return"";if(["localhost","127.0.0.1"].includes(e))return"";for(var t=e.split("."),n=Math.min(t.length,8),i="dmn_chk_"+Oe().toString();!Be&&n--;){var o=t.slice(n).join("."),a=i+"=1;domain=."+o+";path=/";r.cookie=a+";max-age=3",r.cookie.includes(i)&&(r.cookie=a+";max-age=0",Be=o)}return Be}(e);if(!t){var n=(e=>{var r=e.match(Ue);return r?r[0]:""})(e);n!==t&&be.info("Warning: cookie subdomain discovery mismatch",n,t),t=n}return t?"; domain=."+t:""}return""}var Te={R:()=>!!pe,B(e){be.error("cookieStore error: "+e)},O(e){if(pe){try{for(var r=e+"=",t=pe.cookie.split(";").filter((e=>e.length)),n=0;t.length>n;n++){for(var i=t[n];" "==i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(r))return decodeURIComponent(i.substring(r.length,i.length))}}catch(e){}return null}},Z(e){var r;try{r=JSON.parse(Te.O(e))||{}}catch(e){}return r},M(e,r,t,n,i){if(pe)try{var o="",a="",l=Ie(pe.location.hostname,n);if(t){var u=new Date;u.setTime(u.getTime()+864e5*t),o="; expires="+u.toUTCString()}i&&(a="; secure");var s=e+"="+encodeURIComponent(JSON.stringify(r))+o+"; SameSite=Lax; path=/"+l+a;return s.length>3686.4&&be.warn("cookieStore warning: large cookie, len="+s.length),pe.cookie=s,s}catch(e){return}},F(e,r){if(null!=pe&&pe.cookie)try{Te.M(e,"",-1,r)}catch(e){return}}},De=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],Ne=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid",...De],Ce=["$app_build","$app_name","$app_namespace","$app_version","$browser","$browser_version","$device_type","$current_url","$pathname","$os","$os_name","$os_version","$referring_domain","$referrer","$screen_height","$screen_width","$viewport_height","$viewport_width","$raw_user_agent"],Fe="<masked>",We=["li_fat_id"];function je(e,r,t){if(!pe)return{};var n,i,o,a=r?[...De,...t||[]]:[],u=(n=$e(pe.URL,a,Fe),i=Ne.concat(e||[]),o={},Ee(i,(function(e){var r=function(e,r){for(var t,n=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),i=0;n.length>i;i++){var o=n[i].split("=");if(o[0]===r){t=o;break}}if(!l(t)||2>t.length)return"";var a=t[1];try{a=decodeURIComponent(a)}catch(e){be.error("Skipping decoding for malformed query param: "+a)}return a.replace(/\+/g," ")}(n,e);o[e]=r||null})),o),s=function(){var e={};return Ee(We,(function(r){var t=Te.O(r);e[r]=t||null})),e}();return ye(s,u)}function ze(){return navigator.language||navigator.userLanguage}var Le="$direct";function Ke(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}}function He(){try{return(new Date).getTimezoneOffset()}catch(e){return}}function Ge(t,n){var i,o,l,u;if(!me)return{};var s,c,d,v,h,p,m,w,E,R,M=t?[...De,...n||[]]:[],[S,P]=function(e){for(var r=0;ce.length>r;r++){var[t,n]=ce[r],i=t.exec(e),o=i&&("function"==typeof n?n(i,e):n);if(o)return o}return["",""]}(me);return ye((E={$os:S,$os_version:P,$browser:le(me,navigator.vendor),$device:de(me),$device_type:(c=me,d={userAgentDataPlatform:null==(i=navigator)||null==(i=i.userAgentData)?void 0:i.platform,maxTouchPoints:null==(o=navigator)?void 0:o.maxTouchPoints,screenWidth:null==fe||null==(l=fe.screen)?void 0:l.width,screenHeight:null==fe||null==(u=fe.screen)?void 0:u.height,devicePixelRatio:null==fe?void 0:fe.devicePixelRatio},w=de(c),w===x||w===b||"Kobo"===w||"Kindle Fire"===w||w===Q?_:w===j||w===L||w===z||w===q?"Console":w===y?"Wearable":w?g:"Android"===(null==d?void 0:d.userAgentDataPlatform)&&(null!==(v=null==d?void 0:d.maxTouchPoints)&&void 0!==v?v:0)>0?600>Math.min(null!==(h=null==d?void 0:d.screenWidth)&&void 0!==h?h:0,null!==(p=null==d?void 0:d.screenHeight)&&void 0!==p?p:0)/(null!==(m=null==d?void 0:d.devicePixelRatio)&&void 0!==m?m:1)?g:_:"Desktop"),$timezone:Ke(),$timezone_offset:He()},R={},Ee(E,(function(e,r){("[object String]"==a.call(e)&&e.length>0||f(e))&&(R[r]=e)})),R),{$current_url:$e(null==ge?void 0:ge.href,M,Fe),$host:null==ge?void 0:ge.host,$pathname:null==ge?void 0:ge.pathname,$raw_user_agent:me.length>1e3?me.substring(0,997)+"...":me,$browser_version:se(me,navigator.vendor),$browser_language:ze(),$browser_language_prefix:(s=ze(),"string"==typeof s?s.split("-")[0]:void 0),$screen_height:null==fe?void 0:fe.screen.height,$screen_width:null==fe?void 0:fe.screen.width,$viewport_height:null==fe?void 0:fe.innerHeight,$viewport_width:null==fe?void 0:fe.innerWidth,$lib:r,$lib_version:e,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})}function Ve(e,r){return[...e||[],...l(r)?r:[r]]}function Xe(e,r){return(c(e)?1:e)*r}function qe(e,r){return function(e){for(var r=0,t=0;e.length>t;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return Math.abs(r)}(e)%100<h(100*r,0,100,be)}var Ye=["type"];function Je(e){var{type:r,executionTimeMs:t}=e;return r+(d(t)?"":" ("+t.toFixed(2)+"ms)")}var Qe=xe("[PostHog Action RateLimiting]");function Ze(e,r){console.log(e,r)}function er(e,r,t){if(void 0===t&&(t=5),"object"!=typeof e||"object"!=typeof r)return{};if(e===r)return{};if(!e&&r)return r;if(!r||!e)return{};var n={},i=new Set([...Object.keys(e),...Object.keys(r)]);for(var o of i){var a=e[o],l=r[o];if(c(a))n[o]=l;else if(c(l))n[o]=a;else if(!(a===l||d(a)&&d(l)))if(u(a)&&u(l))if(t>1){var f=er(a,l,t-1);s(f)||(n[o]=f)}else n[o]="max depth reached, checking for changed value";else n[o]=l}return n}var rr,tr,nr,ir=(rr=null,tr=0,nr=null,{info(e){nr!==e&&(tr=0,nr=e),tr++,rr&&clearTimeout(rr),rr=setTimeout((()=>{Qe.info(1===tr?'action "'+e+'" has been rate limited':'action "'+e+'" has been rate limited ('+tr+" times)"),tr=0,rr=null}),1e3)}});function or(e){void 0===e&&(e={});var{maskAction:r,maskState:t,titleFunction:n=Je,logger:i=Ze,include:o={prevState:!0,nextState:!1,changedState:!0},rateLimiterRefillRate:a=1,rateLimiterBucketSize:l=10,__stateComparisonDepth:u}=e,s=new p({refillRate:a,bucketSize:l,refillInterval:1e3,Yt:Qe});return e=>a=>l=>{var c=l,d=e.getState(),f=performance.now(),v=a(c),h=performance.now()-f,p=e.getState(),g=r?r(c):c;if(!g)return v;if(s.consumeRateLimit(c.type))ir.info(c.type);else try{var m=t?t(d,g):d,w=t?t(p,g):p,_=o.changedState?er(m,w,null!=u?u:5):void 0,{type:b}=g,x={type:b,payload:function(e,r){if(null==e)return{};var t={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==r.indexOf(n))continue;t[n]=e[n]}return t}(g,Ye),timestamp:Date.now(),executionTimeMs:h,prevState:o.prevState?m:void 0,nextState:o.nextState?w:void 0,changedState:o.changedState?_:void 0},E=n(x);i(E,x)}catch(e){Qe.error("Error logging state:",e)}return v}}we.posthogCustomizations=Object.freeze({__proto__:null,browserConsoleLogger:Ze,posthogKeaLogger(e){void 0===e&&(e={});var r=or(e);return{name:"posthog-kea-logger",events:{beforeReduxStore(e){e.middleware.push(r)}}}},posthogReduxLogger:or,printAndDropEverything:e=>(console.log("Would have sent event:",e),null),sampleByDistinctId:e=>r=>r&&qe(r.properties.distinct_id,e)?t({},r,{properties:t({},r.properties,{$sample_type:["sampleByDistinctId"],$sample_threshold:e})}):null,sampleByEvent:(e,r)=>i=>{var o,a,l;return i?n(e,i.event)?100*Math.random()<h(100*r,0,100,be)?t({},i,{properties:t({},i.properties,{$sample_type:Ve(null==(o=i.properties)?void 0:o.$sample_type,"sampleByEvent"),$sample_threshold:Xe(null==(a=i.properties)?void 0:a.$sample_threshold,r),$sampled_events:Ve(null==(l=i.properties)?void 0:l.$sampled_events,e)})}):null:i:null},sampleBySessionId:e=>r=>r&&qe(r.properties.$session_id,e)?t({},r,{properties:t({},r.properties,{$sample_type:Ve(r.properties.$sample_type,"sampleBySessionId"),$sample_threshold:Xe(r.properties.$sample_threshold,e)})}):null,sessionRecordingLoggerForPostHogInstance:e=>(r,t)=>{var n;null==e||null==(n=e.sessionRecording)||n.tryAddCustomEvent("app-state",{title:r,stateEvent:t})},setAllPersonProfilePropertiesAsPersonPropertiesForFlags(e){var r,t=ye({},Ge(e.config.mask_personal_data_properties,e.config.custom_personal_data_properties),je(e.config.custom_campaign_params,e.config.mask_personal_data_properties,e.config.custom_personal_data_properties),{$referrer:(null==pe?void 0:pe.referrer)||Le,$referring_domain:null!=pe&&pe.referrer&&(null==(r=Re(pe.referrer))?void 0:r.host)||Le}),i={};Ee(t,(function(e,r){(n(Ne,r)||n(Ce,r))&&(i[r]=e)})),e.setPersonPropertiesForFlags(i)}})}();
1
+ !function(){"use strict";var e="1.371.4",r="web";function t(){return t=Object.assign?Object.assign.bind():function(e){for(var r=1;arguments.length>r;r++){var t=arguments[r];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},t.apply(null,arguments)}function n(e,r){return-1!==e.indexOf(r)}var i=Object.prototype,o=i.hasOwnProperty,a=i.toString,l=Array.isArray||function(e){return"[object Array]"===a.call(e)},u=e=>e===Object(e)&&!l(e),s=e=>{if(u(e)){for(var r in e)if(o.call(e,r))return!1;return!0}return!1},c=e=>void 0===e,d=e=>c(e)||(e=>null===e)(e),f=e=>"[object Number]"==a.call(e)&&e==e,v=e=>e instanceof FormData;function h(e,r,t,n,i){return r>t&&(n.warn("min cannot be greater than max."),r=t),f(e)?e>t?(n.warn(" cannot be greater than max: "+t+". Using max value instead."),t):r>e?(n.warn(" cannot be less than min: "+r+". Using min value instead."),r):e:(n.warn(" must be a number. using max or fallback. max: "+t+", fallback: "+i),h(t,r,t,n))}class p{constructor(e){this.$t={},this.zt=e.zt,this.Ut=h(e.bucketSize,0,100,e.Yt),this.Wt=h(e.refillRate,0,this.Ut,e.Yt),this.Gt=h(e.refillInterval,0,864e5,e.Yt)}Xt(e,r){var t=Math.floor((r-e.lastAccess)/this.Gt);t>0&&(e.tokens=Math.min(e.tokens+t*this.Wt,this.Ut),e.lastAccess=e.lastAccess+t*this.Gt)}consumeRateLimit(e){var r,t=Date.now(),n=String(e),i=this.$t[n];return i?this.Xt(i,t):this.$t[n]=i={tokens:this.Ut,lastAccess:t},0===i.tokens||(i.tokens--,0===i.tokens&&(null==(r=this.zt)||r.call(this,e)),0===i.tokens)}stop(){this.$t={}}}var g="Mobile",m="iOS",w="Android",_="Tablet",b=w+" "+_,x="iPad",E="Apple",y=E+" Watch",R="Safari",M="BlackBerry",S="Samsung",P=S+"Browser",k=S+" Internet",A="Chrome",O=A+" OS",B=A+" "+m,U="Internet Explorer",I=U+" "+g,T="Opera",D=T+" Mini",N="Edge",C="Microsoft "+N,F="Firefox",W=F+" "+m,j="Nintendo",z="PlayStation",L="Xbox",K=w+" "+g,H=g+" "+R,G="Windows",V=G+" Phone",X="Nokia",q="Ouya",Y="Generic",J=Y+" "+g.toLowerCase(),Q=Y+" "+_.toLowerCase(),Z="Konqueror",ee="(\\d+(\\.\\d+)?)",re=new RegExp("Version/"+ee),te=new RegExp(L,"i"),ne=new RegExp(z+" \\w+","i"),ie=new RegExp(j+" \\w+","i"),oe=new RegExp(M+"|PlayBook|BB10","i"),ae={"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"},le=function(e,r){return r=r||"",n(e," OPR/")&&n(e,"Mini")?D:n(e," OPR/")?T:oe.test(e)?M:n(e,"IE"+g)||n(e,"WPDesktop")?I:n(e,P)?k:n(e,N)||n(e,"Edg/")?C:n(e,"FBIOS")?"Facebook "+g:n(e,"UCWEB")||n(e,"UCBrowser")?"UC Browser":n(e,"CriOS")?B:n(e,"CrMo")||n(e,A)?A:n(e,w)&&n(e,R)?K:n(e,"FxiOS")?W:n(e.toLowerCase(),Z.toLowerCase())?Z:((e,r)=>r&&n(r,E)||function(e){return n(e,R)&&!n(e,A)&&!n(e,w)}(e))(e,r)?n(e,g)?H:R:n(e,F)?F:n(e,"MSIE")||n(e,"Trident/")?U:n(e,"Gecko")?F:""},ue={[I]:[new RegExp("rv:"+ee)],[C]:[new RegExp(N+"?\\/"+ee)],[A]:[new RegExp("("+A+"|CrMo)\\/"+ee)],[B]:[new RegExp("CriOS\\/"+ee)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+ee)],[R]:[re],[H]:[re],[T]:[new RegExp("(Opera|OPR)\\/"+ee)],[F]:[new RegExp(F+"\\/"+ee)],[W]:[new RegExp("FxiOS\\/"+ee)],[Z]:[new RegExp("Konqueror[:/]?"+ee,"i")],[M]:[new RegExp(M+" "+ee),re],[K]:[new RegExp("android\\s"+ee,"i")],[k]:[new RegExp(P+"\\/"+ee)],[U]:[new RegExp("(rv:|MSIE )"+ee)],Mozilla:[new RegExp("rv:"+ee)]},se=function(e,r){var t=le(e,r),n=ue[t];if(c(n))return null;for(var i=0;n.length>i;i++){var o=e.match(n[i]);if(o)return parseFloat(o[o.length-2])}return null},ce=[[new RegExp(L+"; "+L+" (.*?)[);]","i"),e=>[L,e&&e[1]||""]],[new RegExp(j,"i"),[j,""]],[new RegExp(z,"i"),[z,""]],[oe,[M,""]],[new RegExp(G,"i"),(e,r)=>{if(/Phone/.test(r)||/WPDesktop/.test(r))return[V,""];if(new RegExp(g).test(r)&&!/IEMobile\b/.test(r))return[G+" "+g,""];var t=/Windows NT ([0-9.]+)/i.exec(r);if(t&&t[1]){var n=ae[t[1]]||"";return/arm/i.test(r)&&(n="RT"),[G,n]}return[G,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>e&&e[3]?[m,[e[3],e[4],e[5]||"0"].join(".")]:[m,""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var r="";return e&&e.length>=3&&(r=c(e[2])?e[3]:e[2]),["watchOS",r]}],[new RegExp("("+w+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+w+")","i"),e=>e&&e[2]?[w,[e[2],e[3],e[4]||"0"].join(".")]:[w,""]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var r=["Mac OS X",""];return e&&e[1]&&(r[1]=[e[1],e[2],e[3]||"0"].join(".")),r}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[O,""]],[/Linux|debian/i,["Linux",""]]],de=function(e){return ie.test(e)?j:ne.test(e)?z:te.test(e)?L:new RegExp(q,"i").test(e)?q:new RegExp("("+V+"|WPDesktop)","i").test(e)?V:/iPad/.test(e)?x:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?y:oe.test(e)?M:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(X,"i").test(e)?X:/(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(g).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)?w:b:new RegExp("(pda|"+g+")","i").test(e)?J:new RegExp(_,"i").test(e)&&!new RegExp(_+" pc","i").test(e)?Q:""},fe="undefined"!=typeof window?window:void 0,ve="undefined"!=typeof globalThis?globalThis:fe;"undefined"==typeof self&&(ve.self=ve),"undefined"==typeof File&&(ve.File=function(){});var he=null==ve?void 0:ve.navigator,pe=null==ve?void 0:ve.document,ge=null==ve?void 0:ve.location;null!=ve&&ve.XMLHttpRequest&&new ve.XMLHttpRequest;var me=null==he?void 0:he.userAgent,we=null!=fe?fe:{},_e=function(e,r){var{debugEnabled:t}=void 0===r?{}:r,n={C(r){if(fe&&(we.POSTHOG_DEBUG||t)&&!c(fe.console)&&fe.console){for(var n=("__rrweb_original__"in fe.console[r]?fe.console[r].__rrweb_original__:fe.console[r]),i=arguments.length,o=new Array(i>1?i-1:0),a=1;i>a;a++)o[a-1]=arguments[a];n(e,...o)}},info(){for(var e=arguments.length,r=new Array(e),t=0;e>t;t++)r[t]=arguments[t];n.C("log",...r)},warn(){for(var e=arguments.length,r=new Array(e),t=0;e>t;t++)r[t]=arguments[t];n.C("warn",...r)},error(){for(var e=arguments.length,r=new Array(e),t=0;e>t;t++)r[t]=arguments[t];n.C("error",...r)},critical(){for(var r=arguments.length,t=new Array(r),n=0;r>n;n++)t[n]=arguments[n];console.error(e,...t)},uninitializedWarning(e){n.error("You must initialize PostHog before calling "+e)},createLogger:(r,t)=>_e(e+" "+r,t)};return n},be=_e("[PostHog.js]"),xe=be.createLogger;function Ee(e,r){if(!d(e))if(l(e))e.forEach(r);else if(v(e))e.forEach(((e,t)=>r(e,t)));else for(var t in e)o.call(e,t)&&r(e[t],t)}var ye=function(e){for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;r>n;n++)t[n-1]=arguments[n];for(var i of t)for(var o in i)void 0!==i[o]&&(e[o]=i[o]);return e},Re=e=>{var r=null==pe?void 0:pe.createElement("a");return c(r)?null:(r.href=e,r)},$e=function(e,r,t){if(!e||!r||!r.length)return e;for(var n=e.split("#"),i=n[1],o=(n[0]||"").split("?"),a=o[1],u=o[0],s=(a||"").split("&"),c=[],d=0;s.length>d;d++){var f=s[d].split("=");l(f)&&(r.includes(f[0])?c.push(f[0]+"="+t):c.push(s[d]))}var v=u;return null!=a&&(v+="?"+c.join("&")),null!=i&&(v+="#"+i),v};Math.trunc||(Math.trunc=function(e){return 0>e?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return f(e)&&isFinite(e)&&Math.floor(e)===e});class Me{constructor(e){if(this.bytes=e,16!==e.length)throw new TypeError("not 128-bit length")}static fromFieldsV7(e,r,t,n){if(!Number.isInteger(e)||!Number.isInteger(r)||!Number.isInteger(t)||!Number.isInteger(n)||0>e||0>r||0>t||0>n||e>0xffffffffffff||r>4095||t>1073741823||n>4294967295)throw new RangeError("invalid field value");var i=new Uint8Array(16);return i[0]=e/Math.pow(2,40),i[1]=e/Math.pow(2,32),i[2]=e/Math.pow(2,24),i[3]=e/Math.pow(2,16),i[4]=e/Math.pow(2,8),i[5]=e,i[6]=112|r>>>8,i[7]=r,i[8]=128|t>>>24,i[9]=t>>>16,i[10]=t>>>8,i[11]=t,i[12]=n>>>24,i[13]=n>>>16,i[14]=n>>>8,i[15]=n,new Me(i)}toString(){for(var e="",r=0;this.bytes.length>r;r++)e=e+(this.bytes[r]>>>4).toString(16)+(15&this.bytes[r]).toString(16),3!==r&&5!==r&&7!==r&&9!==r||(e+="-");if(36!==e.length)throw new Error("Invalid UUIDv7 was generated");return e}clone(){return new Me(this.bytes.slice(0))}equals(e){return 0===this.compareTo(e)}compareTo(e){for(var r=0;16>r;r++){var t=this.bytes[r]-e.bytes[r];if(0!==t)return Math.sign(t)}return 0}}class Se{constructor(){this.I=0,this.S=0,this.k=new Ae}generate(){var e=this.generateOrAbort();if(c(e)){this.I=0;var r=this.generateOrAbort();if(c(r))throw new Error("Could not generate UUID after timestamp reset");return r}return e}generateOrAbort(){var e=Date.now();if(e>this.I)this.I=e,this.A();else{if(this.I>=e+1e4)return;this.S++,this.S>4398046511103&&(this.I++,this.A())}return Me.fromFieldsV7(this.I,Math.trunc(this.S/Math.pow(2,30)),this.S&Math.pow(2,30)-1,this.k.nextUint32())}A(){this.S=1024*this.k.nextUint32()+(1023&this.k.nextUint32())}}var Pe,ke=e=>{if("undefined"!=typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var r=0;e.length>r;r++)e[r]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};fe&&!c(fe.crypto)&&crypto.getRandomValues&&(ke=e=>crypto.getRandomValues(e));class Ae{constructor(){this.T=new Uint32Array(8),this.N=1/0}nextUint32(){return this.T.length>this.N||(ke(this.T),this.N=0),this.T[this.N++]}}var Oe=()=>(Pe||(Pe=new Se)).generate(),Be="",Ue=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i;function Ie(e,r){if(r){var t=function(e,r){if(void 0===r&&(r=pe),Be)return Be;if(!r)return"";if(["localhost","127.0.0.1"].includes(e))return"";for(var t=e.split("."),n=Math.min(t.length,8),i="dmn_chk_"+Oe().toString();!Be&&n--;){var o=t.slice(n).join("."),a=i+"=1;domain=."+o+";path=/";r.cookie=a+";max-age=3",r.cookie.includes(i)&&(r.cookie=a+";max-age=0",Be=o)}return Be}(e);if(!t){var n=(e=>{var r=e.match(Ue);return r?r[0]:""})(e);n!==t&&be.info("Warning: cookie subdomain discovery mismatch",n,t),t=n}return t?"; domain=."+t:""}return""}var Te={R:()=>!!pe,B(e){be.error("cookieStore error: "+e)},O(e){if(pe){try{for(var r=e+"=",t=pe.cookie.split(";").filter((e=>e.length)),n=0;t.length>n;n++){for(var i=t[n];" "==i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(r))return decodeURIComponent(i.substring(r.length,i.length))}}catch(e){}return null}},Z(e){var r;try{r=JSON.parse(Te.O(e))||{}}catch(e){}return r},M(e,r,t,n,i){if(pe)try{var o="",a="",l=Ie(pe.location.hostname,n);if(t){var u=new Date;u.setTime(u.getTime()+864e5*t),o="; expires="+u.toUTCString()}i&&(a="; secure");var s=e+"="+encodeURIComponent(JSON.stringify(r))+o+"; SameSite=Lax; path=/"+l+a;return s.length>3686.4&&be.warn("cookieStore warning: large cookie, len="+s.length),pe.cookie=s,s}catch(e){return}},F(e,r){if(null!=pe&&pe.cookie)try{Te.M(e,"",-1,r)}catch(e){return}}},De=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],Ne=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid",...De],Ce=["$app_build","$app_name","$app_namespace","$app_version","$browser","$browser_version","$device_type","$current_url","$pathname","$os","$os_name","$os_version","$referring_domain","$referrer","$screen_height","$screen_width","$viewport_height","$viewport_width","$raw_user_agent"],Fe="<masked>",We=["li_fat_id"];function je(e,r,t){if(!pe)return{};var n,i,o,a=r?[...De,...t||[]]:[],u=(n=$e(pe.URL,a,Fe),i=Ne.concat(e||[]),o={},Ee(i,(function(e){var r=function(e,r){for(var t,n=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),i=0;n.length>i;i++){var o=n[i].split("=");if(o[0]===r){t=o;break}}if(!l(t)||2>t.length)return"";var a=t[1];try{a=decodeURIComponent(a)}catch(e){be.error("Skipping decoding for malformed query param: "+a)}return a.replace(/\+/g," ")}(n,e);o[e]=r||null})),o),s=function(){var e={};return Ee(We,(function(r){var t=Te.O(r);e[r]=t||null})),e}();return ye(s,u)}function ze(){return navigator.language||navigator.userLanguage}var Le="$direct";function Ke(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}}function He(){try{return(new Date).getTimezoneOffset()}catch(e){return}}function Ge(t,n){var i,o,l,u;if(!me)return{};var s,c,d,v,h,p,m,w,E,R,M=t?[...De,...n||[]]:[],[S,P]=function(e){for(var r=0;ce.length>r;r++){var[t,n]=ce[r],i=t.exec(e),o=i&&("function"==typeof n?n(i,e):n);if(o)return o}return["",""]}(me);return ye((E={$os:S,$os_version:P,$browser:le(me,navigator.vendor),$device:de(me),$device_type:(c=me,d={userAgentDataPlatform:null==(i=navigator)||null==(i=i.userAgentData)?void 0:i.platform,maxTouchPoints:null==(o=navigator)?void 0:o.maxTouchPoints,screenWidth:null==fe||null==(l=fe.screen)?void 0:l.width,screenHeight:null==fe||null==(u=fe.screen)?void 0:u.height,devicePixelRatio:null==fe?void 0:fe.devicePixelRatio},w=de(c),w===x||w===b||"Kobo"===w||"Kindle Fire"===w||w===Q?_:w===j||w===L||w===z||w===q?"Console":w===y?"Wearable":w?g:"Android"===(null==d?void 0:d.userAgentDataPlatform)&&(null!==(v=null==d?void 0:d.maxTouchPoints)&&void 0!==v?v:0)>0?600>Math.min(null!==(h=null==d?void 0:d.screenWidth)&&void 0!==h?h:0,null!==(p=null==d?void 0:d.screenHeight)&&void 0!==p?p:0)/(null!==(m=null==d?void 0:d.devicePixelRatio)&&void 0!==m?m:1)?g:_:"Desktop"),$timezone:Ke(),$timezone_offset:He()},R={},Ee(E,(function(e,r){("[object String]"==a.call(e)&&e.length>0||f(e))&&(R[r]=e)})),R),{$current_url:$e(null==ge?void 0:ge.href,M,Fe),$host:null==ge?void 0:ge.host,$pathname:null==ge?void 0:ge.pathname,$raw_user_agent:me.length>1e3?me.substring(0,997)+"...":me,$browser_version:se(me,navigator.vendor),$browser_language:ze(),$browser_language_prefix:(s=ze(),"string"==typeof s?s.split("-")[0]:void 0),$screen_height:null==fe?void 0:fe.screen.height,$screen_width:null==fe?void 0:fe.screen.width,$viewport_height:null==fe?void 0:fe.innerHeight,$viewport_width:null==fe?void 0:fe.innerWidth,$lib:r,$lib_version:e,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})}function Ve(e,r){return[...e||[],...l(r)?r:[r]]}function Xe(e,r){return(c(e)?1:e)*r}function qe(e,r){return function(e){for(var r=0,t=0;e.length>t;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return Math.abs(r)}(e)%100<h(100*r,0,100,be)}var Ye=["type"];function Je(e){var{type:r,executionTimeMs:t}=e;return r+(d(t)?"":" ("+t.toFixed(2)+"ms)")}var Qe=xe("[PostHog Action RateLimiting]");function Ze(e,r){console.log(e,r)}function er(e,r,t){if(void 0===t&&(t=5),"object"!=typeof e||"object"!=typeof r)return{};if(e===r)return{};if(!e&&r)return r;if(!r||!e)return{};var n={},i=new Set([...Object.keys(e),...Object.keys(r)]);for(var o of i){var a=e[o],l=r[o];if(c(a))n[o]=l;else if(c(l))n[o]=a;else if(!(a===l||d(a)&&d(l)))if(u(a)&&u(l))if(t>1){var f=er(a,l,t-1);s(f)||(n[o]=f)}else n[o]="max depth reached, checking for changed value";else n[o]=l}return n}var rr,tr,nr,ir=(rr=null,tr=0,nr=null,{info(e){nr!==e&&(tr=0,nr=e),tr++,rr&&clearTimeout(rr),rr=setTimeout((()=>{Qe.info(1===tr?'action "'+e+'" has been rate limited':'action "'+e+'" has been rate limited ('+tr+" times)"),tr=0,rr=null}),1e3)}});function or(e){void 0===e&&(e={});var{maskAction:r,maskState:t,titleFunction:n=Je,logger:i=Ze,include:o={prevState:!0,nextState:!1,changedState:!0},rateLimiterRefillRate:a=1,rateLimiterBucketSize:l=10,__stateComparisonDepth:u}=e,s=new p({refillRate:a,bucketSize:l,refillInterval:1e3,Yt:Qe});return e=>a=>l=>{var c=l,d=e.getState(),f=performance.now(),v=a(c),h=performance.now()-f,p=e.getState(),g=r?r(c):c;if(!g)return v;if(s.consumeRateLimit(c.type))ir.info(c.type);else try{var m=t?t(d,g):d,w=t?t(p,g):p,_=o.changedState?er(m,w,null!=u?u:5):void 0,{type:b}=g,x={type:b,payload:function(e,r){if(null==e)return{};var t={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==r.indexOf(n))continue;t[n]=e[n]}return t}(g,Ye),timestamp:Date.now(),executionTimeMs:h,prevState:o.prevState?m:void 0,nextState:o.nextState?w:void 0,changedState:o.changedState?_:void 0},E=n(x);i(E,x)}catch(e){Qe.error("Error logging state:",e)}return v}}we.posthogCustomizations=Object.freeze({__proto__:null,browserConsoleLogger:Ze,posthogKeaLogger(e){void 0===e&&(e={});var r=or(e);return{name:"posthog-kea-logger",events:{beforeReduxStore(e){e.middleware.push(r)}}}},posthogReduxLogger:or,printAndDropEverything:e=>(console.log("Would have sent event:",e),null),sampleByDistinctId:e=>r=>r&&qe(r.properties.distinct_id,e)?t({},r,{properties:t({},r.properties,{$sample_type:["sampleByDistinctId"],$sample_threshold:e})}):null,sampleByEvent:(e,r)=>i=>{var o,a,l;return i?n(e,i.event)?100*Math.random()<h(100*r,0,100,be)?t({},i,{properties:t({},i.properties,{$sample_type:Ve(null==(o=i.properties)?void 0:o.$sample_type,"sampleByEvent"),$sample_threshold:Xe(null==(a=i.properties)?void 0:a.$sample_threshold,r),$sampled_events:Ve(null==(l=i.properties)?void 0:l.$sampled_events,e)})}):null:i:null},sampleBySessionId:e=>r=>r&&qe(r.properties.$session_id,e)?t({},r,{properties:t({},r.properties,{$sample_type:Ve(r.properties.$sample_type,"sampleBySessionId"),$sample_threshold:Xe(r.properties.$sample_threshold,e)})}):null,sessionRecordingLoggerForPostHogInstance:e=>(r,t)=>{var n;null==e||null==(n=e.sessionRecording)||n.tryAddCustomEvent("app-state",{title:r,stateEvent:t})},setAllPersonProfilePropertiesAsPersonPropertiesForFlags(e){var r,t=ye({},Ge(e.config.mask_personal_data_properties,e.config.custom_personal_data_properties),je(e.config.custom_campaign_params,e.config.mask_personal_data_properties,e.config.custom_personal_data_properties),{$referrer:(null==pe?void 0:pe.referrer)||Le,$referring_domain:null!=pe&&pe.referrer&&(null==(r=Re(pe.referrer))?void 0:r.host)||Le}),i={};Ee(t,(function(e,r){(n(Ne,r)||n(Ce,r))&&(i[r]=e)})),e.setPersonPropertiesForFlags(i)}})}();
2
2
  //# sourceMappingURL=customizations.full.js.map