posthog-js
Advanced tools
Comparing version 1.190.0 to 1.190.1
@@ -1,2 +0,2 @@ | ||
!function(){"use strict";var e;!function(e){e.GZipJS="gzip-js",e.Base64="base64"}(e||(e={}));var r=Array.isArray,n=Object.prototype,t=n.hasOwnProperty,i=n.toString,o=r||function(e){return"[object Array]"===i.call(e)},a=e=>void 0===e,s=e=>null===e,l=e=>"[object Number]"==i.call(e),u={DEBUG:!1,LIB_VERSION:"1.190.0"},c="undefined"!=typeof window?window:void 0,p="undefined"!=typeof globalThis?globalThis:c,f=Array.prototype.forEach,d=null==p?void 0:p.navigator,g=null==p?void 0:p.document,v=null==p?void 0:p.location;null==p||p.fetch,null!=p&&p.XMLHttpRequest&&"withCredentials"in new p.XMLHttpRequest&&p.XMLHttpRequest,null==p||p.AbortController;var h=null==d?void 0:d.userAgent,w=null!=c?c:{},_="[PostHog.js]",m={_log:function(e){if(c&&w.POSTHOG_DEBUG&&!a(c.console)&&c.console){for(var r=("__rrweb_original__"in c.console[e]?c.console[e].__rrweb_original__:c.console[e]),n=arguments.length,t=new Array(n>1?n-1:0),i=1;i<n;i++)t[i-1]=arguments[i];r(_,...t)}},info:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];m._log("log",...r)},warn:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];m._log("warn",...r)},error:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];m._log("error",...r)},critical:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];console.error(_,...r)},uninitializedWarning:e=>{m.error("You must initialize PostHog before calling ".concat(e))}},b={};function $(e,r,n){if(o(e))if(f&&e.forEach===f)e.forEach(r,n);else if("length"in e&&e.length===+e.length)for(var t=0,i=e.length;t<i;t++)if(t in e&&r.call(n,e[t],t)===b)return}function E(e,r,n){if(!a(i=e)&&!s(i)){var i;if(o(e))return $(e,r,n);if((e=>e instanceof FormData)(e)){for(var l of e.entries())if(r.call(n,l[1],l[0])===b)return}else for(var u in e)if(t.call(e,u)&&r.call(n,e[u],u)===b)return}}var y=function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),t=1;t<r;t++)n[t-1]=arguments[t];return $(n,(function(r){for(var n in r)void 0!==r[n]&&(e[n]=r[n])})),e};function P(e,r){return-1!==e.indexOf(r)}var x=function(e){var r={};return E(e,(function(e,n){var t;t=e,"[object String]"==i.call(t)&&e.length>0&&(r[n]=e)})),r},O=function(e){return e.replace(/^\$/,"")},R=e=>{var r=null==g?void 0:g.createElement("a");return a(r)?null:(r.href=e,r)},S=function(e,r){for(var n,t=((e.split("#")[0]||"").split("?")[1]||"").split("&"),i=0;i<t.length;i++){var a=t[i].split("=");if(a[0]===r){n=a;break}}if(!o(n)||n.length<2)return"";var s=n[1];try{s=decodeURIComponent(s)}catch(e){m.error("Skipping decoding for malformed query param: "+s)}return s.replace(/\+/g," ")},B="Mobile",I="iOS",A="Android",k="Tablet",j=A+" "+k,C="iPad",M="Apple",F=M+" Watch",T="Safari",D="BlackBerry",L="Samsung",U=L+"Browser",z=L+" Internet",W="Chrome",N=W+" OS",H=W+" "+I,X="Internet Explorer",V=X+" "+B,q="Opera",G=q+" Mini",K="Edge",Z="Microsoft "+K,Q="Firefox",J=Q+" "+I,Y="Nintendo",ee="PlayStation",re="Xbox",ne=A+" "+B,te=B+" "+T,ie="Windows",oe=ie+" Phone",ae="Nokia",se="Ouya",le="Generic",ue=le+" "+B.toLowerCase(),ce=le+" "+k.toLowerCase(),pe="Konqueror",fe="(\\d+(\\.\\d+)?)",de=new RegExp("Version/"+fe),ge=new RegExp(re,"i"),ve=new RegExp(ee+" \\w+","i"),he=new RegExp(Y+" \\w+","i"),we=new RegExp(D+"|PlayBook|BB10","i"),_e={"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"};var me=(e,r)=>r&&P(r,M)||function(e){return P(e,T)&&!P(e,W)&&!P(e,A)}(e),be=function(e,r){return r=r||"",P(e," OPR/")&&P(e,"Mini")?G:P(e," OPR/")?q:we.test(e)?D:P(e,"IE"+B)||P(e,"WPDesktop")?V:P(e,U)?z:P(e,K)||P(e,"Edg/")?Z:P(e,"FBIOS")?"Facebook "+B:P(e,"UCWEB")||P(e,"UCBrowser")?"UC Browser":P(e,"CriOS")?H:P(e,"CrMo")?W:P(e,A)&&P(e,T)?ne:P(e,W)?W:P(e,"FxiOS")?J:P(e.toLowerCase(),pe.toLowerCase())?pe:me(e,r)?P(e,B)?te:T:P(e,Q)?Q:P(e,"MSIE")||P(e,"Trident/")?X:P(e,"Gecko")?Q:""},$e={[V]:[new RegExp("rv:"+fe)],[Z]:[new RegExp(K+"?\\/"+fe)],[W]:[new RegExp("("+W+"|CrMo)\\/"+fe)],[H]:[new RegExp("CriOS\\/"+fe)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+fe)],[T]:[de],[te]:[de],[q]:[new RegExp("(Opera|OPR)\\/"+fe)],[Q]:[new RegExp(Q+"\\/"+fe)],[J]:[new RegExp("FxiOS\\/"+fe)],[pe]:[new RegExp("Konqueror[:/]?"+fe,"i")],[D]:[new RegExp(D+" "+fe),de],[ne]:[new RegExp("android\\s"+fe,"i")],[z]:[new RegExp(U+"\\/"+fe)],[X]:[new RegExp("(rv:|MSIE )"+fe)],Mozilla:[new RegExp("rv:"+fe)]},Ee=[[new RegExp(re+"; "+re+" (.*?)[);]","i"),e=>[re,e&&e[1]||""]],[new RegExp(Y,"i"),[Y,""]],[new RegExp(ee,"i"),[ee,""]],[we,[D,""]],[new RegExp(ie,"i"),(e,r)=>{if(/Phone/.test(r)||/WPDesktop/.test(r))return[oe,""];if(new RegExp(B).test(r)&&!/IEMobile\b/.test(r))return[ie+" "+B,""];var n=/Windows NT ([0-9.]+)/i.exec(r);if(n&&n[1]){var t=n[1],i=_e[t]||"";return/arm/i.test(r)&&(i="RT"),[ie,i]}return[ie,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>{if(e&&e[3]){var r=[e[3],e[4],e[5]||"0"];return[I,r.join(".")]}return[I,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var r="";return e&&e.length>=3&&(r=a(e[2])?e[3]:e[2]),["watchOS",r]}],[new RegExp("("+A+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+A+")","i"),e=>{if(e&&e[2]){var r=[e[2],e[3],e[4]||"0"];return[A,r.join(".")]}return[A,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var r=["Mac OS X",""];if(e&&e[1]){var n=[e[1],e[2],e[3]||"0"];r[1]=n.join(".")}return r}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[N,""]],[/Linux|debian/i,["Linux",""]]],ye=function(e){return he.test(e)?Y:ve.test(e)?ee:ge.test(e)?re:new RegExp(se,"i").test(e)?se:new RegExp("("+oe+"|WPDesktop)","i").test(e)?oe:/iPad/.test(e)?C:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?F:we.test(e)?D:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(ae,"i").test(e)?ae:/(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(B).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)?A:j:A:new RegExp("(pda|"+B+")","i").test(e)?ue:new RegExp(k,"i").test(e)&&!new RegExp(k+" pc","i").test(e)?ce:""},Pe="https?://(.*)",xe=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gclid","gad_source","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","mc_cid","igshid","ttclid","rdt_cid"],Oe=["$app_build","$app_name","$app_namespace","$app_version","$browser","$browser_version","$device_type","$current_url","$pathname","$os","$os_name","$os_version","$referring_domain","$referrer"],Re={campaignParams:function(e){return g?this._campaignParamsFromUrl(g.URL,e):{}},_campaignParamsFromUrl:function(e,r){var n=xe.concat(r||[]),t={};return E(n,(function(r){var n=S(e,r);t[r]=n||null})),t},_searchEngine:function(e){return e?0===e.search(Pe+"google.([^/?]*)")?"google":0===e.search(Pe+"bing.com")?"bing":0===e.search(Pe+"yahoo.com")?"yahoo":0===e.search(Pe+"duckduckgo.com")?"duckduckgo":null:null},_searchInfoFromReferrer:function(e){var r=Re._searchEngine(e),n="yahoo"!=r?"q":"p",t={};if(!s(r)){t.$search_engine=r;var i=g?S(g.referrer,n):"";i.length&&(t.ph_keyword=i)}return t},searchInfo:function(){var e=null==g?void 0:g.referrer;return e?this._searchInfoFromReferrer(e):{}},browser:be,browserVersion:function(e,r){var n=be(e,r),t=$e[n];if(a(t))return null;for(var i=0;i<t.length;i++){var o=t[i],s=e.match(o);if(s)return parseFloat(s[s.length-2])}return null},browserLanguage:function(){return navigator.language||navigator.userLanguage},os:function(e){for(var r=0;r<Ee.length;r++){var[n,t]=Ee[r],i=n.exec(e),o=i&&("function"==typeof t?t(i,e):t);if(o)return o}return["",""]},device:ye,deviceType:function(e){var r=ye(e);return r===C||r===j||"Kobo"===r||"Kindle Fire"===r||r===ce?k:r===Y||r===re||r===ee||r===se?"Console":r===F?"Wearable":r?B:"Desktop"},referrer:function(){return(null==g?void 0:g.referrer)||"$direct"},referringDomain:function(){var e;return null!=g&&g.referrer&&(null===(e=R(g.referrer))||void 0===e?void 0:e.host)||"$direct"},referrerInfo:function(){return{$referrer:this.referrer(),$referring_domain:this.referringDomain()}},initialPersonInfo:function(){return{r:this.referrer().substring(0,1e3),u:null==v?void 0:v.href.substring(0,1e3)}},initialPersonPropsFromInfo:function(e){var r,{r:n,u:t}=e,i={$initial_referrer:n,$initial_referring_domain:null==n?void 0:"$direct"==n?"$direct":null===(r=R(n))||void 0===r?void 0:r.host};if(t){i.$initial_current_url=t;var o=R(t);i.$initial_host=null==o?void 0:o.host,i.$initial_pathname=null==o?void 0:o.pathname,E(this._campaignParamsFromUrl(t),(function(e,r){i["$initial_"+O(r)]=e}))}n&&E(this._searchInfoFromReferrer(n),(function(e,r){i["$initial_"+O(r)]=e}));return i},timezone:function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}},properties:function(){if(!h)return{};var[e,r]=Re.os(h);return y(x({$os:e,$os_version:r,$browser:Re.browser(h,navigator.vendor),$device:Re.device(h),$device_type:Re.deviceType(h),$timezone:Re.timezone()}),{$current_url:null==v?void 0:v.href,$host:null==v?void 0:v.host,$pathname:null==v?void 0:v.pathname,$raw_user_agent:h.length>1e3?h.substring(0,997)+"...":h,$browser_version:Re.browserVersion(h,navigator.vendor),$browser_language:Re.browserLanguage(),$screen_height:null==c?void 0:c.screen.height,$screen_width:null==c?void 0:c.screen.width,$viewport_height:null==c?void 0:c.innerHeight,$viewport_width:null==c?void 0:c.innerWidth,$lib:"web",$lib_version:u.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})},people_properties:function(){if(!h)return{};var[e,r]=Re.os(h);return y(x({$os:e,$os_version:r,$browser:Re.browser(h,navigator.vendor)}),{$browser_version:Re.browserVersion(h,navigator.vendor)})}};function Se(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function Be(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Se(Object(n),!0).forEach((function(r){Ie(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Se(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function Ie(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Ae(e,r,n,t){return l(e)?e>n?n:e<r?r:e:n}function ke(e,r){return[...e||[],...o(r)?r:[r]]}function je(e,r){return(a(e)?1:e)*r}function Ce(e,r){return function(e){for(var r=0,n=0;n<e.length;n++)r=(r<<5)-r+e.charCodeAt(n),r|=0;return Math.abs(r)}(e)%100<Ae(100*r,0,100)}var Me=Object.freeze({__proto__:null,sampleByDistinctId:function(e){return r=>r&&Ce(r.properties.distinct_id,e)?Be(Be({},r),{},{properties:Be(Be({},r.properties),{},{$sample_type:["sampleByDistinctId"],$sample_threshold:e})}):null},sampleByEvent:function(e,r){return n=>{var t,i,o;return n?P(e,n.event)?100*Math.random()<Ae(100*r,0,100)?Be(Be({},n),{},{properties:Be(Be({},n.properties),{},{$sample_type:ke(null===(t=n.properties)||void 0===t?void 0:t.$sample_type,"sampleByEvent"),$sample_threshold:je(null===(i=n.properties)||void 0===i?void 0:i.$sample_threshold,r),$sampled_events:ke(null===(o=n.properties)||void 0===o?void 0:o.$sampled_events,e)})}):null:n:null}},sampleBySessionId:function(e){return r=>r&&Ce(r.properties.$session_id,e)?Be(Be({},r),{},{properties:Be(Be({},r.properties),{},{$sample_type:ke(r.properties.$sample_type,"sampleBySessionId"),$sample_threshold:je(r.properties.$sample_threshold,e)})}):null},setAllPersonProfilePropertiesAsPersonPropertiesForFlags:e=>{var r=y({},Re.properties(),Re.campaignParams(),Re.referrerInfo()),n={};E(r,(function(e,r){(P(xe,r)||P(Oe,r))&&(n[r]=e)})),e.setPersonPropertiesForFlags(n)}});w.posthogCustomizations=Me}(); | ||
!function(){"use strict";var e;!function(e){e.GZipJS="gzip-js",e.Base64="base64"}(e||(e={}));var r=Array.isArray,n=Object.prototype,t=n.hasOwnProperty,i=n.toString,o=r||function(e){return"[object Array]"===i.call(e)},a=e=>void 0===e,s=e=>null===e,l=e=>"[object Number]"==i.call(e),u={DEBUG:!1,LIB_VERSION:"1.190.1"},c="undefined"!=typeof window?window:void 0,p="undefined"!=typeof globalThis?globalThis:c,f=Array.prototype.forEach,d=null==p?void 0:p.navigator,g=null==p?void 0:p.document,v=null==p?void 0:p.location;null==p||p.fetch,null!=p&&p.XMLHttpRequest&&"withCredentials"in new p.XMLHttpRequest&&p.XMLHttpRequest,null==p||p.AbortController;var h=null==d?void 0:d.userAgent,w=null!=c?c:{},_="[PostHog.js]",m={_log:function(e){if(c&&w.POSTHOG_DEBUG&&!a(c.console)&&c.console){for(var r=("__rrweb_original__"in c.console[e]?c.console[e].__rrweb_original__:c.console[e]),n=arguments.length,t=new Array(n>1?n-1:0),i=1;i<n;i++)t[i-1]=arguments[i];r(_,...t)}},info:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];m._log("log",...r)},warn:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];m._log("warn",...r)},error:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];m._log("error",...r)},critical:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];console.error(_,...r)},uninitializedWarning:e=>{m.error("You must initialize PostHog before calling ".concat(e))}},b={};function $(e,r,n){if(o(e))if(f&&e.forEach===f)e.forEach(r,n);else if("length"in e&&e.length===+e.length)for(var t=0,i=e.length;t<i;t++)if(t in e&&r.call(n,e[t],t)===b)return}function E(e,r,n){if(!a(i=e)&&!s(i)){var i;if(o(e))return $(e,r,n);if((e=>e instanceof FormData)(e)){for(var l of e.entries())if(r.call(n,l[1],l[0])===b)return}else for(var u in e)if(t.call(e,u)&&r.call(n,e[u],u)===b)return}}var y=function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),t=1;t<r;t++)n[t-1]=arguments[t];return $(n,(function(r){for(var n in r)void 0!==r[n]&&(e[n]=r[n])})),e};function P(e,r){return-1!==e.indexOf(r)}var x=function(e){var r={};return E(e,(function(e,n){var t;t=e,"[object String]"==i.call(t)&&e.length>0&&(r[n]=e)})),r},O=function(e){return e.replace(/^\$/,"")},R=e=>{var r=null==g?void 0:g.createElement("a");return a(r)?null:(r.href=e,r)},S=function(e,r){for(var n,t=((e.split("#")[0]||"").split("?")[1]||"").split("&"),i=0;i<t.length;i++){var a=t[i].split("=");if(a[0]===r){n=a;break}}if(!o(n)||n.length<2)return"";var s=n[1];try{s=decodeURIComponent(s)}catch(e){m.error("Skipping decoding for malformed query param: "+s)}return s.replace(/\+/g," ")},B="Mobile",I="iOS",A="Android",k="Tablet",j=A+" "+k,C="iPad",M="Apple",F=M+" Watch",T="Safari",D="BlackBerry",L="Samsung",U=L+"Browser",z=L+" Internet",W="Chrome",N=W+" OS",H=W+" "+I,X="Internet Explorer",V=X+" "+B,q="Opera",G=q+" Mini",K="Edge",Z="Microsoft "+K,Q="Firefox",J=Q+" "+I,Y="Nintendo",ee="PlayStation",re="Xbox",ne=A+" "+B,te=B+" "+T,ie="Windows",oe=ie+" Phone",ae="Nokia",se="Ouya",le="Generic",ue=le+" "+B.toLowerCase(),ce=le+" "+k.toLowerCase(),pe="Konqueror",fe="(\\d+(\\.\\d+)?)",de=new RegExp("Version/"+fe),ge=new RegExp(re,"i"),ve=new RegExp(ee+" \\w+","i"),he=new RegExp(Y+" \\w+","i"),we=new RegExp(D+"|PlayBook|BB10","i"),_e={"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"};var me=(e,r)=>r&&P(r,M)||function(e){return P(e,T)&&!P(e,W)&&!P(e,A)}(e),be=function(e,r){return r=r||"",P(e," OPR/")&&P(e,"Mini")?G:P(e," OPR/")?q:we.test(e)?D:P(e,"IE"+B)||P(e,"WPDesktop")?V:P(e,U)?z:P(e,K)||P(e,"Edg/")?Z:P(e,"FBIOS")?"Facebook "+B:P(e,"UCWEB")||P(e,"UCBrowser")?"UC Browser":P(e,"CriOS")?H:P(e,"CrMo")?W:P(e,A)&&P(e,T)?ne:P(e,W)?W:P(e,"FxiOS")?J:P(e.toLowerCase(),pe.toLowerCase())?pe:me(e,r)?P(e,B)?te:T:P(e,Q)?Q:P(e,"MSIE")||P(e,"Trident/")?X:P(e,"Gecko")?Q:""},$e={[V]:[new RegExp("rv:"+fe)],[Z]:[new RegExp(K+"?\\/"+fe)],[W]:[new RegExp("("+W+"|CrMo)\\/"+fe)],[H]:[new RegExp("CriOS\\/"+fe)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+fe)],[T]:[de],[te]:[de],[q]:[new RegExp("(Opera|OPR)\\/"+fe)],[Q]:[new RegExp(Q+"\\/"+fe)],[J]:[new RegExp("FxiOS\\/"+fe)],[pe]:[new RegExp("Konqueror[:/]?"+fe,"i")],[D]:[new RegExp(D+" "+fe),de],[ne]:[new RegExp("android\\s"+fe,"i")],[z]:[new RegExp(U+"\\/"+fe)],[X]:[new RegExp("(rv:|MSIE )"+fe)],Mozilla:[new RegExp("rv:"+fe)]},Ee=[[new RegExp(re+"; "+re+" (.*?)[);]","i"),e=>[re,e&&e[1]||""]],[new RegExp(Y,"i"),[Y,""]],[new RegExp(ee,"i"),[ee,""]],[we,[D,""]],[new RegExp(ie,"i"),(e,r)=>{if(/Phone/.test(r)||/WPDesktop/.test(r))return[oe,""];if(new RegExp(B).test(r)&&!/IEMobile\b/.test(r))return[ie+" "+B,""];var n=/Windows NT ([0-9.]+)/i.exec(r);if(n&&n[1]){var t=n[1],i=_e[t]||"";return/arm/i.test(r)&&(i="RT"),[ie,i]}return[ie,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>{if(e&&e[3]){var r=[e[3],e[4],e[5]||"0"];return[I,r.join(".")]}return[I,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var r="";return e&&e.length>=3&&(r=a(e[2])?e[3]:e[2]),["watchOS",r]}],[new RegExp("("+A+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+A+")","i"),e=>{if(e&&e[2]){var r=[e[2],e[3],e[4]||"0"];return[A,r.join(".")]}return[A,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var r=["Mac OS X",""];if(e&&e[1]){var n=[e[1],e[2],e[3]||"0"];r[1]=n.join(".")}return r}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[N,""]],[/Linux|debian/i,["Linux",""]]],ye=function(e){return he.test(e)?Y:ve.test(e)?ee:ge.test(e)?re:new RegExp(se,"i").test(e)?se:new RegExp("("+oe+"|WPDesktop)","i").test(e)?oe:/iPad/.test(e)?C:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?F:we.test(e)?D:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(ae,"i").test(e)?ae:/(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(B).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)?A:j:A:new RegExp("(pda|"+B+")","i").test(e)?ue:new RegExp(k,"i").test(e)&&!new RegExp(k+" pc","i").test(e)?ce:""},Pe="https?://(.*)",xe=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gclid","gad_source","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","mc_cid","igshid","ttclid","rdt_cid"],Oe=["$app_build","$app_name","$app_namespace","$app_version","$browser","$browser_version","$device_type","$current_url","$pathname","$os","$os_name","$os_version","$referring_domain","$referrer"],Re={campaignParams:function(e){return g?this._campaignParamsFromUrl(g.URL,e):{}},_campaignParamsFromUrl:function(e,r){var n=xe.concat(r||[]),t={};return E(n,(function(r){var n=S(e,r);t[r]=n||null})),t},_searchEngine:function(e){return e?0===e.search(Pe+"google.([^/?]*)")?"google":0===e.search(Pe+"bing.com")?"bing":0===e.search(Pe+"yahoo.com")?"yahoo":0===e.search(Pe+"duckduckgo.com")?"duckduckgo":null:null},_searchInfoFromReferrer:function(e){var r=Re._searchEngine(e),n="yahoo"!=r?"q":"p",t={};if(!s(r)){t.$search_engine=r;var i=g?S(g.referrer,n):"";i.length&&(t.ph_keyword=i)}return t},searchInfo:function(){var e=null==g?void 0:g.referrer;return e?this._searchInfoFromReferrer(e):{}},browser:be,browserVersion:function(e,r){var n=be(e,r),t=$e[n];if(a(t))return null;for(var i=0;i<t.length;i++){var o=t[i],s=e.match(o);if(s)return parseFloat(s[s.length-2])}return null},browserLanguage:function(){return navigator.language||navigator.userLanguage},os:function(e){for(var r=0;r<Ee.length;r++){var[n,t]=Ee[r],i=n.exec(e),o=i&&("function"==typeof t?t(i,e):t);if(o)return o}return["",""]},device:ye,deviceType:function(e){var r=ye(e);return r===C||r===j||"Kobo"===r||"Kindle Fire"===r||r===ce?k:r===Y||r===re||r===ee||r===se?"Console":r===F?"Wearable":r?B:"Desktop"},referrer:function(){return(null==g?void 0:g.referrer)||"$direct"},referringDomain:function(){var e;return null!=g&&g.referrer&&(null===(e=R(g.referrer))||void 0===e?void 0:e.host)||"$direct"},referrerInfo:function(){return{$referrer:this.referrer(),$referring_domain:this.referringDomain()}},initialPersonInfo:function(){return{r:this.referrer().substring(0,1e3),u:null==v?void 0:v.href.substring(0,1e3)}},initialPersonPropsFromInfo:function(e){var r,{r:n,u:t}=e,i={$initial_referrer:n,$initial_referring_domain:null==n?void 0:"$direct"==n?"$direct":null===(r=R(n))||void 0===r?void 0:r.host};if(t){i.$initial_current_url=t;var o=R(t);i.$initial_host=null==o?void 0:o.host,i.$initial_pathname=null==o?void 0:o.pathname,E(this._campaignParamsFromUrl(t),(function(e,r){i["$initial_"+O(r)]=e}))}n&&E(this._searchInfoFromReferrer(n),(function(e,r){i["$initial_"+O(r)]=e}));return i},timezone:function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}},properties:function(){if(!h)return{};var[e,r]=Re.os(h);return y(x({$os:e,$os_version:r,$browser:Re.browser(h,navigator.vendor),$device:Re.device(h),$device_type:Re.deviceType(h),$timezone:Re.timezone()}),{$current_url:null==v?void 0:v.href,$host:null==v?void 0:v.host,$pathname:null==v?void 0:v.pathname,$raw_user_agent:h.length>1e3?h.substring(0,997)+"...":h,$browser_version:Re.browserVersion(h,navigator.vendor),$browser_language:Re.browserLanguage(),$screen_height:null==c?void 0:c.screen.height,$screen_width:null==c?void 0:c.screen.width,$viewport_height:null==c?void 0:c.innerHeight,$viewport_width:null==c?void 0:c.innerWidth,$lib:"web",$lib_version:u.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})},people_properties:function(){if(!h)return{};var[e,r]=Re.os(h);return y(x({$os:e,$os_version:r,$browser:Re.browser(h,navigator.vendor)}),{$browser_version:Re.browserVersion(h,navigator.vendor)})}};function Se(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function Be(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Se(Object(n),!0).forEach((function(r){Ie(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Se(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function Ie(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Ae(e,r,n,t){return l(e)?e>n?n:e<r?r:e:n}function ke(e,r){return[...e||[],...o(r)?r:[r]]}function je(e,r){return(a(e)?1:e)*r}function Ce(e,r){return function(e){for(var r=0,n=0;n<e.length;n++)r=(r<<5)-r+e.charCodeAt(n),r|=0;return Math.abs(r)}(e)%100<Ae(100*r,0,100)}var Me=Object.freeze({__proto__:null,sampleByDistinctId:function(e){return r=>r&&Ce(r.properties.distinct_id,e)?Be(Be({},r),{},{properties:Be(Be({},r.properties),{},{$sample_type:["sampleByDistinctId"],$sample_threshold:e})}):null},sampleByEvent:function(e,r){return n=>{var t,i,o;return n?P(e,n.event)?100*Math.random()<Ae(100*r,0,100)?Be(Be({},n),{},{properties:Be(Be({},n.properties),{},{$sample_type:ke(null===(t=n.properties)||void 0===t?void 0:t.$sample_type,"sampleByEvent"),$sample_threshold:je(null===(i=n.properties)||void 0===i?void 0:i.$sample_threshold,r),$sampled_events:ke(null===(o=n.properties)||void 0===o?void 0:o.$sampled_events,e)})}):null:n:null}},sampleBySessionId:function(e){return r=>r&&Ce(r.properties.$session_id,e)?Be(Be({},r),{},{properties:Be(Be({},r.properties),{},{$sample_type:ke(r.properties.$sample_type,"sampleBySessionId"),$sample_threshold:je(r.properties.$sample_threshold,e)})}):null},setAllPersonProfilePropertiesAsPersonPropertiesForFlags:e=>{var r=y({},Re.properties(),Re.campaignParams(),Re.referrerInfo()),n={};E(r,(function(e,r){(P(xe,r)||P(Oe,r))&&(n[r]=e)})),e.setPersonPropertiesForFlags(n)}});w.posthogCustomizations=Me}(); | ||
//# sourceMappingURL=customizations.full.js.map |
{ | ||
"name": "posthog-js", | ||
"version": "1.190.0", | ||
"version": "1.190.1", | ||
"description": "Posthog-js allows you to automatically capture usage and send events to PostHog.", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/PostHog/posthog-js", |
{ | ||
"name": "posthog-js", | ||
"version": "1.190.0", | ||
"version": "1.190.1", | ||
"description": "Posthog-js allows you to automatically capture usage and send events to PostHog.", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/PostHog/posthog-js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package