posthog-js
Advanced tools
Comparing version 1.219.5 to 1.219.6
@@ -1,2 +0,2 @@ | ||
!function(){"use strict";var e="undefined"!=typeof window?window:void 0,r="undefined"!=typeof globalThis?globalThis:e,n=Array.prototype.forEach,t=null==r?void 0:r.navigator,o=null==r?void 0:r.document,i=null==r?void 0:r.location;null==r||r.fetch,null!=r&&r.XMLHttpRequest&&"withCredentials"in new r.XMLHttpRequest&&r.XMLHttpRequest,null==r||r.AbortController;var a,s=null==t?void 0:t.userAgent,l=null!=e?e:{};function u(e,r){return-1!==e.indexOf(r)}!function(e){e.GZipJS="gzip-js",e.Base64="base64"}(a||(a={}));var c=Array.isArray,p=Object.prototype,f=p.hasOwnProperty,d=p.toString,g=c||function(e){return"[object Array]"===d.call(e)},v=e=>void 0===e,h=e=>null===e,m=e=>"[object Number]"==d.call(e),w={DEBUG:!1,LIB_VERSION:"1.219.5"},_=r=>{var n={_log:function(n){if(e&&l.POSTHOG_DEBUG&&!v(e.console)&&e.console){for(var t=("__rrweb_original__"in e.console[n]?e.console[n].__rrweb_original__:e.console[n]),o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];t(r,...i)}},info:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];n._log("log",...r)},warn:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];n._log("warn",...r)},error:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];n._log("error",...r)},critical:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];console.error(r,...n)},uninitializedWarning:e=>{n.error("You must initialize PostHog before calling ".concat(e))},createLogger:e=>_("".concat(r," ").concat(e))};return n},b=_("[PostHog.js]"),P={};function $(e,r,t){if(g(e))if(n&&e.forEach===n)e.forEach(r,t);else if("length"in e&&e.length===+e.length)for(var o=0,i=e.length;o<i;o++)if(o in e&&r.call(t,e[o],o)===P)return}function y(e,r,n){if(!v(t=e)&&!h(t)){var t;if(g(e))return $(e,r,n);if((e=>e instanceof FormData)(e)){for(var o of e.entries())if(r.call(n,o[1],o[0])===P)return}else for(var i in e)if(f.call(e,i)&&r.call(n,e[i],i)===P)return}}var E=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},x=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){$(r,(function(r){e.push(r)}))})),e},O=function(e){var r={};return y(e,(function(e,n){var t;t=e,"[object String]"==d.call(t)&&e.length>0&&(r[n]=e)})),r},R=e=>{var r=null==o?void 0:o.createElement("a");return v(r)?null:(r.href=e,r)},k=function(e,r){for(var n,t=((e.split("#")[0]||"").split("?")[1]||"").split("&"),o=0;o<t.length;o++){var i=t[o].split("=");if(i[0]===r){n=i;break}}if(!g(n)||n.length<2)return"";var a=n[1];try{a=decodeURIComponent(a)}catch(e){b.error("Skipping decoding for malformed query param: "+a)}return a.replace(/\+/g," ")},S=function(e,r,n){if(!e||!r||!r.length)return e;for(var t=e.split("#"),o=t[0]||"",i=t[1],a=o.split("?"),s=a[1],l=a[0],u=(s||"").split("&"),c=[],p=0;p<u.length;p++){var f=u[p].split("=");g(f)&&(r.includes(f[0])?c.push(f[0]+"="+n):c.push(u[p]))}var d=l;return null!=s&&(d+="?"+c.join("&")),null!=i&&(d+="#"+i),d},D="Mobile",B="iOS",I="Android",A="Tablet",j=I+" "+A,F="iPad",T="Apple",C=T+" Watch",M="Safari",L="BlackBerry",z="Samsung",U=z+"Browser",W=z+" Internet",N="Chrome",H=N+" OS",X=N+" "+B,V="Internet Explorer",q=V+" "+D,G="Opera",K=G+" Mini",Z="Edge",Q="Microsoft "+Z,J="Firefox",Y=J+" "+B,ee="Nintendo",re="PlayStation",ne="Xbox",te=I+" "+D,oe=D+" "+M,ie="Windows",ae=ie+" Phone",se="Nokia",le="Ouya",ue="Generic",ce=ue+" "+D.toLowerCase(),pe=ue+" "+A.toLowerCase(),fe="Konqueror",de="(\\d+(\\.\\d+)?)",ge=new RegExp("Version/"+de),ve=new RegExp(ne,"i"),he=new RegExp(re+" \\w+","i"),me=new RegExp(ee+" \\w+","i"),we=new RegExp(L+"|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 be=(e,r)=>r&&u(r,T)||function(e){return u(e,M)&&!u(e,N)&&!u(e,I)}(e),Pe=function(e,r){return r=r||"",u(e," OPR/")&&u(e,"Mini")?K:u(e," OPR/")?G:we.test(e)?L:u(e,"IE"+D)||u(e,"WPDesktop")?q:u(e,U)?W:u(e,Z)||u(e,"Edg/")?Q:u(e,"FBIOS")?"Facebook "+D:u(e,"UCWEB")||u(e,"UCBrowser")?"UC Browser":u(e,"CriOS")?X:u(e,"CrMo")||u(e,N)?N:u(e,I)&&u(e,M)?te:u(e,"FxiOS")?Y:u(e.toLowerCase(),fe.toLowerCase())?fe:be(e,r)?u(e,D)?oe:M:u(e,J)?J:u(e,"MSIE")||u(e,"Trident/")?V:u(e,"Gecko")?J:""},$e={[q]:[new RegExp("rv:"+de)],[Q]:[new RegExp(Z+"?\\/"+de)],[N]:[new RegExp("("+N+"|CrMo)\\/"+de)],[X]:[new RegExp("CriOS\\/"+de)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+de)],[M]:[ge],[oe]:[ge],[G]:[new RegExp("(Opera|OPR)\\/"+de)],[J]:[new RegExp(J+"\\/"+de)],[Y]:[new RegExp("FxiOS\\/"+de)],[fe]:[new RegExp("Konqueror[:/]?"+de,"i")],[L]:[new RegExp(L+" "+de),ge],[te]:[new RegExp("android\\s"+de,"i")],[W]:[new RegExp(U+"\\/"+de)],[V]:[new RegExp("(rv:|MSIE )"+de)],Mozilla:[new RegExp("rv:"+de)]},ye=[[new RegExp(ne+"; "+ne+" (.*?)[);]","i"),e=>[ne,e&&e[1]||""]],[new RegExp(ee,"i"),[ee,""]],[new RegExp(re,"i"),[re,""]],[we,[L,""]],[new RegExp(ie,"i"),(e,r)=>{if(/Phone/.test(r)||/WPDesktop/.test(r))return[ae,""];if(new RegExp(D).test(r)&&!/IEMobile\b/.test(r))return[ie+" "+D,""];var n=/Windows NT ([0-9.]+)/i.exec(r);if(n&&n[1]){var t=n[1],o=_e[t]||"";return/arm/i.test(r)&&(o="RT"),[ie,o]}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[B,r.join(".")]}return[B,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var r="";return e&&e.length>=3&&(r=v(e[2])?e[3]:e[2]),["watchOS",r]}],[new RegExp("("+I+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+I+")","i"),e=>{if(e&&e[2]){var r=[e[2],e[3],e[4]||"0"];return[I,r.join(".")]}return[I,""]}],[/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/,[H,""]],[/Linux|debian/i,["Linux",""]]],Ee=function(e){return me.test(e)?ee:he.test(e)?re:ve.test(e)?ne:new RegExp(le,"i").test(e)?le:new RegExp("("+ae+"|WPDesktop)","i").test(e)?ae:/iPad/.test(e)?F:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?C:we.test(e)?L:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(se,"i").test(e)?se:/(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(D).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)?I:j:I:new RegExp("(pda|"+D+")","i").test(e)?ce:new RegExp(A,"i").test(e)&&!new RegExp(A+" pc","i").test(e)?pe:""},xe="https?://(.*)",Oe=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","irclid","_kx"],Re=x(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],Oe),ke=["$app_build","$app_name","$app_namespace","$app_version","$browser","$browser_version","$device_type","$current_url","$pathname","$os","$os_name","$os_version","$referring_domain","$referrer"],Se="<masked>",De={campaignParams:function(){var{customTrackedParams:e,maskPersonalDataProperties:r,customPersonalDataProperties:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!o)return{};var t=r?x([],Oe,n||[]):[];return this._campaignParamsFromUrl(S(o.URL,t,Se),e)},_campaignParamsFromUrl:function(e,r){var n=Re.concat(r||[]),t={};return y(n,(function(r){var n=k(e,r);t[r]=n||null})),t},_searchEngine:function(e){return e?0===e.search(xe+"google.([^/?]*)")?"google":0===e.search(xe+"bing.com")?"bing":0===e.search(xe+"yahoo.com")?"yahoo":0===e.search(xe+"duckduckgo.com")?"duckduckgo":null:null},_searchInfoFromReferrer:function(e){var r=De._searchEngine(e),n="yahoo"!=r?"q":"p",t={};if(!h(r)){t.$search_engine=r;var i=o?k(o.referrer,n):"";i.length&&(t.ph_keyword=i)}return t},searchInfo:function(){var e=null==o?void 0:o.referrer;return e?this._searchInfoFromReferrer(e):{}},browser:Pe,browserVersion:function(e,r){var n=Pe(e,r),t=$e[n];if(v(t))return null;for(var o=0;o<t.length;o++){var i=t[o],a=e.match(i);if(a)return parseFloat(a[a.length-2])}return null},browserLanguage:function(){return navigator.language||navigator.userLanguage},browserLanguagePrefix:function(){var e=this.browserLanguage();return"string"==typeof e?e.split("-")[0]:void 0},os:function(e){for(var r=0;r<ye.length;r++){var[n,t]=ye[r],o=n.exec(e),i=o&&("function"==typeof t?t(o,e):t);if(i)return i}return["",""]},device:Ee,deviceType:function(e){var r=Ee(e);return r===F||r===j||"Kobo"===r||"Kindle Fire"===r||r===pe?A:r===ee||r===ne||r===re||r===le?"Console":r===C?"Wearable":r?D:"Desktop"},referrer:function(){return(null==o?void 0:o.referrer)||"$direct"},referringDomain:function(){var e;return null!=o&&o.referrer&&(null===(e=R(o.referrer))||void 0===e?void 0:e.host)||"$direct"},referrerInfo:function(){return{$referrer:this.referrer(),$referring_domain:this.referringDomain()}},personInfo:function(){var{maskPersonalDataProperties:e,customPersonalDataProperties:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e?x([],Oe,r||[]):[],t=null==i?void 0:i.href.substring(0,1e3);return{r:this.referrer().substring(0,1e3),u:t?S(t,n,Se):void 0}},personPropsFromInfo:function(e){var r,{r:n,u:t}=e,o={$referrer:n,$referring_domain:null==n?void 0:"$direct"==n?"$direct":null===(r=R(n))||void 0===r?void 0:r.host};if(t){o.$current_url=t;var i=R(t);o.$host=null==i?void 0:i.host,o.$pathname=null==i?void 0:i.pathname;var a=this._campaignParamsFromUrl(t);E(o,a)}if(n){var s=this._searchInfoFromReferrer(n);E(o,s)}return o},initialPersonPropsFromInfo:function(e){var r=this.personPropsFromInfo(e),n={};return y(r,(function(e,r){var t;n["$initial_".concat((t=r,t.replace(/^\$/,"")))]=e})),n},timezone:function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}},timezoneOffset:function(){try{return(new Date).getTimezoneOffset()}catch(e){return}},properties:function(){var{maskPersonalDataProperties:r,customPersonalDataProperties:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s)return{};var t=r?x([],Oe,n||[]):[],[o,a]=De.os(s);return E(O({$os:o,$os_version:a,$browser:De.browser(s,navigator.vendor),$device:De.device(s),$device_type:De.deviceType(s),$timezone:De.timezone(),$timezone_offset:De.timezoneOffset()}),{$current_url:S(null==i?void 0:i.href,t,Se),$host:null==i?void 0:i.host,$pathname:null==i?void 0:i.pathname,$raw_user_agent:s.length>1e3?s.substring(0,997)+"...":s,$browser_version:De.browserVersion(s,navigator.vendor),$browser_language:De.browserLanguage(),$browser_language_prefix:De.browserLanguagePrefix(),$screen_height:null==e?void 0:e.screen.height,$screen_width:null==e?void 0:e.screen.width,$viewport_height:null==e?void 0:e.innerHeight,$viewport_width:null==e?void 0:e.innerWidth,$lib:"web",$lib_version:w.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(!s)return{};var[e,r]=De.os(s);return E(O({$os:e,$os_version:r,$browser:De.browser(s,navigator.vendor)}),{$browser_version:De.browserVersion(s,navigator.vendor)})}};function Be(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 Ie(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Be(Object(n),!0).forEach((function(r){Ae(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Be(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function Ae(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function je(e,r,n,t,o){return m(e)?e>n?n:e<r?r:e:je(n,r,n)}function Fe(e,r){return[...e||[],...g(r)?r:[r]]}function Te(e,r){return(v(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<je(100*r,0,100)}var Me=Object.freeze({__proto__:null,printAndDropEverything:e=>(console.log("Would have sent event:",e),null),sampleByDistinctId:function(e){return r=>r&&Ce(r.properties.distinct_id,e)?Ie(Ie({},r),{},{properties:Ie(Ie({},r.properties),{},{$sample_type:["sampleByDistinctId"],$sample_threshold:e})}):null},sampleByEvent:function(e,r){return n=>{var t,o,i;return n?u(e,n.event)?100*Math.random()<je(100*r,0,100)?Ie(Ie({},n),{},{properties:Ie(Ie({},n.properties),{},{$sample_type:Fe(null===(t=n.properties)||void 0===t?void 0:t.$sample_type,"sampleByEvent"),$sample_threshold:Te(null===(o=n.properties)||void 0===o?void 0:o.$sample_threshold,r),$sampled_events:Fe(null===(i=n.properties)||void 0===i?void 0:i.$sampled_events,e)})}):null:n:null}},sampleBySessionId:function(e){return r=>r&&Ce(r.properties.$session_id,e)?Ie(Ie({},r),{},{properties:Ie(Ie({},r.properties),{},{$sample_type:Fe(r.properties.$sample_type,"sampleBySessionId"),$sample_threshold:Te(r.properties.$sample_threshold,e)})}):null},setAllPersonProfilePropertiesAsPersonPropertiesForFlags:e=>{var r=E({},De.properties({maskPersonalDataProperties:e.config.mask_personal_data_properties,customPersonalDataProperties:e.config.custom_personal_data_properties}),De.campaignParams({customTrackedParams:e.config.custom_campaign_params,maskPersonalDataProperties:e.config.mask_personal_data_properties,customPersonalDataProperties:e.config.custom_personal_data_properties}),De.referrerInfo()),n={};y(r,(function(e,r){(u(Re,r)||u(ke,r))&&(n[r]=e)})),e.setPersonPropertiesForFlags(n)}});l.posthogCustomizations=Me}(); | ||
!function(){"use strict";var e="undefined"!=typeof window?window:void 0,r="undefined"!=typeof globalThis?globalThis:e,n=Array.prototype.forEach,t=null==r?void 0:r.navigator,o=null==r?void 0:r.document,i=null==r?void 0:r.location;null==r||r.fetch,null!=r&&r.XMLHttpRequest&&"withCredentials"in new r.XMLHttpRequest&&r.XMLHttpRequest,null==r||r.AbortController;var a,s=null==t?void 0:t.userAgent,l=null!=e?e:{};function u(e,r){return-1!==e.indexOf(r)}!function(e){e.GZipJS="gzip-js",e.Base64="base64"}(a||(a={}));var c=Array.isArray,p=Object.prototype,f=p.hasOwnProperty,d=p.toString,g=c||function(e){return"[object Array]"===d.call(e)},v=e=>void 0===e,h=e=>null===e,m=e=>"[object Number]"==d.call(e),w={DEBUG:!1,LIB_VERSION:"1.219.6"},_=r=>{var n={_log:function(n){if(e&&l.POSTHOG_DEBUG&&!v(e.console)&&e.console){for(var t=("__rrweb_original__"in e.console[n]?e.console[n].__rrweb_original__:e.console[n]),o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];t(r,...i)}},info:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];n._log("log",...r)},warn:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];n._log("warn",...r)},error:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];n._log("error",...r)},critical:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];console.error(r,...n)},uninitializedWarning:e=>{n.error("You must initialize PostHog before calling ".concat(e))},createLogger:e=>_("".concat(r," ").concat(e))};return n},b=_("[PostHog.js]"),P={};function $(e,r,t){if(g(e))if(n&&e.forEach===n)e.forEach(r,t);else if("length"in e&&e.length===+e.length)for(var o=0,i=e.length;o<i;o++)if(o in e&&r.call(t,e[o],o)===P)return}function y(e,r,n){if(!v(t=e)&&!h(t)){var t;if(g(e))return $(e,r,n);if((e=>e instanceof FormData)(e)){for(var o of e.entries())if(r.call(n,o[1],o[0])===P)return}else for(var i in e)if(f.call(e,i)&&r.call(n,e[i],i)===P)return}}var E=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},x=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){$(r,(function(r){e.push(r)}))})),e},O=function(e){var r={};return y(e,(function(e,n){var t;t=e,"[object String]"==d.call(t)&&e.length>0&&(r[n]=e)})),r},R=e=>{var r=null==o?void 0:o.createElement("a");return v(r)?null:(r.href=e,r)},k=function(e,r){for(var n,t=((e.split("#")[0]||"").split("?")[1]||"").split("&"),o=0;o<t.length;o++){var i=t[o].split("=");if(i[0]===r){n=i;break}}if(!g(n)||n.length<2)return"";var a=n[1];try{a=decodeURIComponent(a)}catch(e){b.error("Skipping decoding for malformed query param: "+a)}return a.replace(/\+/g," ")},S=function(e,r,n){if(!e||!r||!r.length)return e;for(var t=e.split("#"),o=t[0]||"",i=t[1],a=o.split("?"),s=a[1],l=a[0],u=(s||"").split("&"),c=[],p=0;p<u.length;p++){var f=u[p].split("=");g(f)&&(r.includes(f[0])?c.push(f[0]+"="+n):c.push(u[p]))}var d=l;return null!=s&&(d+="?"+c.join("&")),null!=i&&(d+="#"+i),d},D="Mobile",B="iOS",I="Android",A="Tablet",j=I+" "+A,F="iPad",T="Apple",C=T+" Watch",M="Safari",L="BlackBerry",z="Samsung",U=z+"Browser",W=z+" Internet",N="Chrome",H=N+" OS",X=N+" "+B,V="Internet Explorer",q=V+" "+D,G="Opera",K=G+" Mini",Z="Edge",Q="Microsoft "+Z,J="Firefox",Y=J+" "+B,ee="Nintendo",re="PlayStation",ne="Xbox",te=I+" "+D,oe=D+" "+M,ie="Windows",ae=ie+" Phone",se="Nokia",le="Ouya",ue="Generic",ce=ue+" "+D.toLowerCase(),pe=ue+" "+A.toLowerCase(),fe="Konqueror",de="(\\d+(\\.\\d+)?)",ge=new RegExp("Version/"+de),ve=new RegExp(ne,"i"),he=new RegExp(re+" \\w+","i"),me=new RegExp(ee+" \\w+","i"),we=new RegExp(L+"|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 be=(e,r)=>r&&u(r,T)||function(e){return u(e,M)&&!u(e,N)&&!u(e,I)}(e),Pe=function(e,r){return r=r||"",u(e," OPR/")&&u(e,"Mini")?K:u(e," OPR/")?G:we.test(e)?L:u(e,"IE"+D)||u(e,"WPDesktop")?q:u(e,U)?W:u(e,Z)||u(e,"Edg/")?Q:u(e,"FBIOS")?"Facebook "+D:u(e,"UCWEB")||u(e,"UCBrowser")?"UC Browser":u(e,"CriOS")?X:u(e,"CrMo")||u(e,N)?N:u(e,I)&&u(e,M)?te:u(e,"FxiOS")?Y:u(e.toLowerCase(),fe.toLowerCase())?fe:be(e,r)?u(e,D)?oe:M:u(e,J)?J:u(e,"MSIE")||u(e,"Trident/")?V:u(e,"Gecko")?J:""},$e={[q]:[new RegExp("rv:"+de)],[Q]:[new RegExp(Z+"?\\/"+de)],[N]:[new RegExp("("+N+"|CrMo)\\/"+de)],[X]:[new RegExp("CriOS\\/"+de)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+de)],[M]:[ge],[oe]:[ge],[G]:[new RegExp("(Opera|OPR)\\/"+de)],[J]:[new RegExp(J+"\\/"+de)],[Y]:[new RegExp("FxiOS\\/"+de)],[fe]:[new RegExp("Konqueror[:/]?"+de,"i")],[L]:[new RegExp(L+" "+de),ge],[te]:[new RegExp("android\\s"+de,"i")],[W]:[new RegExp(U+"\\/"+de)],[V]:[new RegExp("(rv:|MSIE )"+de)],Mozilla:[new RegExp("rv:"+de)]},ye=[[new RegExp(ne+"; "+ne+" (.*?)[);]","i"),e=>[ne,e&&e[1]||""]],[new RegExp(ee,"i"),[ee,""]],[new RegExp(re,"i"),[re,""]],[we,[L,""]],[new RegExp(ie,"i"),(e,r)=>{if(/Phone/.test(r)||/WPDesktop/.test(r))return[ae,""];if(new RegExp(D).test(r)&&!/IEMobile\b/.test(r))return[ie+" "+D,""];var n=/Windows NT ([0-9.]+)/i.exec(r);if(n&&n[1]){var t=n[1],o=_e[t]||"";return/arm/i.test(r)&&(o="RT"),[ie,o]}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[B,r.join(".")]}return[B,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var r="";return e&&e.length>=3&&(r=v(e[2])?e[3]:e[2]),["watchOS",r]}],[new RegExp("("+I+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+I+")","i"),e=>{if(e&&e[2]){var r=[e[2],e[3],e[4]||"0"];return[I,r.join(".")]}return[I,""]}],[/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/,[H,""]],[/Linux|debian/i,["Linux",""]]],Ee=function(e){return me.test(e)?ee:he.test(e)?re:ve.test(e)?ne:new RegExp(le,"i").test(e)?le:new RegExp("("+ae+"|WPDesktop)","i").test(e)?ae:/iPad/.test(e)?F:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?C:we.test(e)?L:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(se,"i").test(e)?se:/(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(D).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)?I:j:I:new RegExp("(pda|"+D+")","i").test(e)?ce:new RegExp(A,"i").test(e)&&!new RegExp(A+" pc","i").test(e)?pe:""},xe="https?://(.*)",Oe=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","irclid","_kx"],Re=x(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],Oe),ke=["$app_build","$app_name","$app_namespace","$app_version","$browser","$browser_version","$device_type","$current_url","$pathname","$os","$os_name","$os_version","$referring_domain","$referrer"],Se="<masked>",De={campaignParams:function(){var{customTrackedParams:e,maskPersonalDataProperties:r,customPersonalDataProperties:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!o)return{};var t=r?x([],Oe,n||[]):[];return this._campaignParamsFromUrl(S(o.URL,t,Se),e)},_campaignParamsFromUrl:function(e,r){var n=Re.concat(r||[]),t={};return y(n,(function(r){var n=k(e,r);t[r]=n||null})),t},_searchEngine:function(e){return e?0===e.search(xe+"google.([^/?]*)")?"google":0===e.search(xe+"bing.com")?"bing":0===e.search(xe+"yahoo.com")?"yahoo":0===e.search(xe+"duckduckgo.com")?"duckduckgo":null:null},_searchInfoFromReferrer:function(e){var r=De._searchEngine(e),n="yahoo"!=r?"q":"p",t={};if(!h(r)){t.$search_engine=r;var i=o?k(o.referrer,n):"";i.length&&(t.ph_keyword=i)}return t},searchInfo:function(){var e=null==o?void 0:o.referrer;return e?this._searchInfoFromReferrer(e):{}},browser:Pe,browserVersion:function(e,r){var n=Pe(e,r),t=$e[n];if(v(t))return null;for(var o=0;o<t.length;o++){var i=t[o],a=e.match(i);if(a)return parseFloat(a[a.length-2])}return null},browserLanguage:function(){return navigator.language||navigator.userLanguage},browserLanguagePrefix:function(){var e=this.browserLanguage();return"string"==typeof e?e.split("-")[0]:void 0},os:function(e){for(var r=0;r<ye.length;r++){var[n,t]=ye[r],o=n.exec(e),i=o&&("function"==typeof t?t(o,e):t);if(i)return i}return["",""]},device:Ee,deviceType:function(e){var r=Ee(e);return r===F||r===j||"Kobo"===r||"Kindle Fire"===r||r===pe?A:r===ee||r===ne||r===re||r===le?"Console":r===C?"Wearable":r?D:"Desktop"},referrer:function(){return(null==o?void 0:o.referrer)||"$direct"},referringDomain:function(){var e;return null!=o&&o.referrer&&(null===(e=R(o.referrer))||void 0===e?void 0:e.host)||"$direct"},referrerInfo:function(){return{$referrer:this.referrer(),$referring_domain:this.referringDomain()}},personInfo:function(){var{maskPersonalDataProperties:e,customPersonalDataProperties:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e?x([],Oe,r||[]):[],t=null==i?void 0:i.href.substring(0,1e3);return{r:this.referrer().substring(0,1e3),u:t?S(t,n,Se):void 0}},personPropsFromInfo:function(e){var r,{r:n,u:t}=e,o={$referrer:n,$referring_domain:null==n?void 0:"$direct"==n?"$direct":null===(r=R(n))||void 0===r?void 0:r.host};if(t){o.$current_url=t;var i=R(t);o.$host=null==i?void 0:i.host,o.$pathname=null==i?void 0:i.pathname;var a=this._campaignParamsFromUrl(t);E(o,a)}if(n){var s=this._searchInfoFromReferrer(n);E(o,s)}return o},initialPersonPropsFromInfo:function(e){var r=this.personPropsFromInfo(e),n={};return y(r,(function(e,r){var t;n["$initial_".concat((t=r,t.replace(/^\$/,"")))]=e})),n},timezone:function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}},timezoneOffset:function(){try{return(new Date).getTimezoneOffset()}catch(e){return}},properties:function(){var{maskPersonalDataProperties:r,customPersonalDataProperties:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s)return{};var t=r?x([],Oe,n||[]):[],[o,a]=De.os(s);return E(O({$os:o,$os_version:a,$browser:De.browser(s,navigator.vendor),$device:De.device(s),$device_type:De.deviceType(s),$timezone:De.timezone(),$timezone_offset:De.timezoneOffset()}),{$current_url:S(null==i?void 0:i.href,t,Se),$host:null==i?void 0:i.host,$pathname:null==i?void 0:i.pathname,$raw_user_agent:s.length>1e3?s.substring(0,997)+"...":s,$browser_version:De.browserVersion(s,navigator.vendor),$browser_language:De.browserLanguage(),$browser_language_prefix:De.browserLanguagePrefix(),$screen_height:null==e?void 0:e.screen.height,$screen_width:null==e?void 0:e.screen.width,$viewport_height:null==e?void 0:e.innerHeight,$viewport_width:null==e?void 0:e.innerWidth,$lib:"web",$lib_version:w.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(!s)return{};var[e,r]=De.os(s);return E(O({$os:e,$os_version:r,$browser:De.browser(s,navigator.vendor)}),{$browser_version:De.browserVersion(s,navigator.vendor)})}};function Be(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 Ie(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Be(Object(n),!0).forEach((function(r){Ae(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Be(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function Ae(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function je(e,r,n,t,o){return m(e)?e>n?n:e<r?r:e:je(n,r,n)}function Fe(e,r){return[...e||[],...g(r)?r:[r]]}function Te(e,r){return(v(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<je(100*r,0,100)}var Me=Object.freeze({__proto__:null,printAndDropEverything:e=>(console.log("Would have sent event:",e),null),sampleByDistinctId:function(e){return r=>r&&Ce(r.properties.distinct_id,e)?Ie(Ie({},r),{},{properties:Ie(Ie({},r.properties),{},{$sample_type:["sampleByDistinctId"],$sample_threshold:e})}):null},sampleByEvent:function(e,r){return n=>{var t,o,i;return n?u(e,n.event)?100*Math.random()<je(100*r,0,100)?Ie(Ie({},n),{},{properties:Ie(Ie({},n.properties),{},{$sample_type:Fe(null===(t=n.properties)||void 0===t?void 0:t.$sample_type,"sampleByEvent"),$sample_threshold:Te(null===(o=n.properties)||void 0===o?void 0:o.$sample_threshold,r),$sampled_events:Fe(null===(i=n.properties)||void 0===i?void 0:i.$sampled_events,e)})}):null:n:null}},sampleBySessionId:function(e){return r=>r&&Ce(r.properties.$session_id,e)?Ie(Ie({},r),{},{properties:Ie(Ie({},r.properties),{},{$sample_type:Fe(r.properties.$sample_type,"sampleBySessionId"),$sample_threshold:Te(r.properties.$sample_threshold,e)})}):null},setAllPersonProfilePropertiesAsPersonPropertiesForFlags:e=>{var r=E({},De.properties({maskPersonalDataProperties:e.config.mask_personal_data_properties,customPersonalDataProperties:e.config.custom_personal_data_properties}),De.campaignParams({customTrackedParams:e.config.custom_campaign_params,maskPersonalDataProperties:e.config.mask_personal_data_properties,customPersonalDataProperties:e.config.custom_personal_data_properties}),De.referrerInfo()),n={};y(r,(function(e,r){(u(Re,r)||u(ke,r))&&(n[r]=e)})),e.setPersonPropertiesForFlags(n)}});l.posthogCustomizations=Me}(); | ||
//# sourceMappingURL=customizations.full.js.map |
@@ -1,2 +0,2 @@ | ||
!function(){"use strict";function t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function e(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?t(Object(i),!0).forEach((function(t){n(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function n(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var r="undefined"!=typeof window?window:void 0,i="undefined"!=typeof globalThis?globalThis:r,a=Array.prototype.forEach,o=null==i?void 0:i.navigator,l=null==i?void 0:i.document;null==i||i.location,null==i||i.fetch,null!=i&&i.XMLHttpRequest&&"withCredentials"in new i.XMLHttpRequest&&i.XMLHttpRequest,null==i||i.AbortController,null==o||o.userAgent;var s,c=null!=r?r:{};!function(t){t.GZipJS="gzip-js",t.Base64="base64"}(s||(s={}));var u=t=>{var e={_log:function(e){if(r&&c.POSTHOG_DEBUG&&!E(r.console)&&r.console){for(var n=("__rrweb_original__"in r.console[e]?r.console[e].__rrweb_original__:r.console[e]),i=arguments.length,a=new Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=arguments[o];n(t,...a)}},info:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];e._log("log",...n)},warn:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];e._log("warn",...n)},error:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];e._log("error",...n)},critical:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];console.error(t,...n)},uninitializedWarning:t=>{e.error("You must initialize PostHog before calling ".concat(t))},createLogger:e=>u("".concat(t," ").concat(e))};return e},_=u("[PostHog.js]"),h={};function d(t,e,n){if(O(t))if(a&&t.forEach===a)t.forEach(e,n);else if("length"in t&&t.length===+t.length)for(var r=0,i=t.length;r<i;r++)if(r in t&&e.call(n,t[r],r)===h)return}function f(t,e,n){if(!S(t)){if(O(t))return d(t,e,n);if(j(t)){for(var r of t.entries())if(e.call(n,r[1],r[0])===h)return}else for(var i in t)if(k.call(t,i)&&e.call(n,t[i],i)===h)return}}var m=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return d(n,(function(e){for(var n in e)void 0!==e[n]&&(t[n]=e[n])})),t};function v(t){for(var e=Object.keys(t),n=e.length,r=new Array(n);n--;)r[n]=[e[n],t[e[n]]];return r}function g(t,e,n,r){var{capture:i=!1,passive:a=!0}=null!=r?r:{};null==t||t.addEventListener(e,n,{capture:i,passive:a})}function p(t,e){return-1!==t.indexOf(e)}var b=function(t){return t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},y=Array.isArray,C=Object.prototype,k=C.hasOwnProperty,w=C.toString,O=y||function(t){return"[object Array]"===w.call(t)},x=t=>"function"==typeof t,D=t=>x(t)&&-1!==t.toString().indexOf("[native code]"),M=()=>!!r.Zone,E=t=>void 0===t,N=t=>"[object String]"==w.call(t),A=t=>null===t,S=t=>E(t)||A(t),$=t=>"[object Number]"==w.call(t),j=t=>t instanceof FormData;function L(t){return!!t&&1===t.nodeType}function T(t,e){return!!t&&!!t.tagName&&t.tagName.toLowerCase()===e.toLowerCase()}function P(t){return t?b(t).split(/\s+/):[]}function R(t){var e="";switch(typeof t.className){case"string":e=t.className;break;case"object":e=(t.className&&"baseVal"in t.className?t.className.baseVal:null)||t.getAttribute("class")||"";break;default:e=""}return P(e)}function F(t){var e="";return q(t)&&!z(t)&&t.childNodes&&t.childNodes.length&&f(t.childNodes,(function(t){var n,r;(function(t){return!!t&&3===t.nodeType})(t)&&t.textContent&&(e+=null!==(r=t.textContent,n=S(r)?null:b(r).split(/(\s+)/).filter((t=>V(t))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))&&void 0!==n?n:"")})),b(e)}var H=["a","button","form","input","select","textarea","label"];function q(t){for(var e=t;e.parentNode&&!T(e,"body");e=e.parentNode){var n=R(e);if(p(n,"ph-sensitive")||p(n,"ph-no-capture"))return!1}if(p(R(t),"ph-include"))return!0;var r=t.type||"";if(N(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var i=t.name||t.id||"";if(N(i)){if(/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(i.replace(/[^a-zA-Z0-9]/g,"")))return!1}return!0}function z(t){return!!(T(t,"input")&&!["button","checkbox","submit","reset"].includes(t.type)||T(t,"select")||T(t,"textarea")||"true"===t.getAttribute("contenteditable"))}var G="(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})",B=new RegExp("^(?:".concat(G,")$")),W=new RegExp(G),X="\\d{3}-?\\d{2}-?\\d{4}",Z=new RegExp("^(".concat(X,")$")),I=new RegExp("(".concat(X,")"));function V(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(S(t))return!1;if(N(t)){if(t=b(t),(e?B:W).test((t||"").replace(/[- ]/g,"")))return!1;if((e?Z:I).test(t))return!1}return!0}function J(t){var e=F(t);return V(e="".concat(e," ").concat(U(t)).trim())?e:""}function U(t){var e="";return t&&t.childNodes&&t.childNodes.length&&f(t.childNodes,(function(t){var n;if(t&&"span"===(null===(n=t.tagName)||void 0===n?void 0:n.toLowerCase()))try{var r=F(t);e="".concat(e," ").concat(r).trim(),t.childNodes&&t.childNodes.length&&(e="".concat(e," ").concat(U(t)).trim())}catch(t){_.error("[AutoCapture]",t)}})),e}function Y(t){return function(t){var n=t.map((t=>{var n,r,i="";if(t.tag_name&&(i+=t.tag_name),t.attr_class)for(var a of(t.attr_class.sort(),t.attr_class))i+=".".concat(a.replace(/"/g,""));var o=e(e(e(e({},t.text?{text:t.text}:{}),{},{"nth-child":null!==(n=t.nth_child)&&void 0!==n?n:0,"nth-of-type":null!==(r=t.nth_of_type)&&void 0!==r?r:0},t.href?{href:t.href}:{}),t.attr_id?{attr_id:t.attr_id}:{}),t.attributes),l={};return v(o).sort(((t,e)=>{var[n]=t,[r]=e;return n.localeCompare(r)})).forEach((t=>{var[e,n]=t;return l[K(e.toString())]=K(n.toString())})),i+=":",i+=v(o).map((t=>{var[e,n]=t;return"".concat(e,'="').concat(n,'"')})).join("")}));return n.join(";")}(function(t){return t.map((t=>{var e,n,r={text:null===(e=t.$el_text)||void 0===e?void 0:e.slice(0,400),tag_name:t.tag_name,href:null===(n=t.attr__href)||void 0===n?void 0:n.slice(0,2048),attr_class:Q(t),attr_id:t.attr__id,nth_child:t.nth_child,nth_of_type:t.nth_of_type,attributes:{}};return v(t).filter((t=>{var[e]=t;return 0===e.indexOf("attr__")})).forEach((t=>{var[e,n]=t;return r.attributes[e]=n})),r}))}(t))}function K(t){return t.replace(/"|\\"/g,'\\"')}function Q(t){var e=t.attr__class;return e?O(e)?e:P(e):void 0}function tt(t,e){return e.length>t?e.slice(0,t)+"...":e}function et(t){if(t.previousElementSibling)return t.previousElementSibling;var e=t;do{e=e.previousSibling}while(e&&!L(e));return e}function nt(t,e,n,r){var i=t.tagName.toLowerCase(),a={tag_name:i};H.indexOf(i)>-1&&!n&&("a"===i.toLowerCase()||"button"===i.toLowerCase()?a.$el_text=tt(1024,J(t)):a.$el_text=tt(1024,F(t)));var o=R(t);o.length>0&&(a.classes=o.filter((function(t){return""!==t}))),f(t.attributes,(function(n){var i;if((!z(t)||-1!==["name","id","class","aria-label"].indexOf(n.name))&&((null==r||!r.includes(n.name))&&!e&&V(n.value)&&(i=n.name,!N(i)||"_ngcontent"!==i.substring(0,10)&&"_nghost"!==i.substring(0,7)))){var o=n.value;"class"===n.name&&(o=P(o).join(" ")),a["attr__"+n.name]=tt(1024,o)}}));for(var l=1,s=1,c=t;c=et(c);)l++,c.tagName===t.tagName&&s++;return a.nth_child=l,a.nth_of_type=s,a}function rt(t,e){for(var n,i,a,{e:o,maskAllElementAttributes:s,maskAllText:c,elementAttributeIgnoreList:u,elementsChainAsString:_}=e,h=[t],d=t;d.parentNode&&!T(d,"body");)(a=d.parentNode)&&11===a.nodeType?(h.push(d.parentNode.host),d=d.parentNode.host):(h.push(d.parentNode),d=d.parentNode);var v,g,b,y=[],C={},k=!1,w=!1;if(f(h,(t=>{var e=q(t);"a"===t.tagName.toLowerCase()&&(k=t.getAttribute("href"),k=e&&k&&V(k)&&k),p(R(t),"ph-no-capture")&&(w=!0),y.push(nt(t,s,c,u));var n=function(t){if(!q(t))return{};var e={};return f(t.attributes,(function(t){if(t.name&&0===t.name.indexOf("data-ph-capture-attribute")){var n=t.name.replace("data-ph-capture-attribute-",""),r=t.value;n&&r&&V(r)&&(e[n]=r)}})),e}(t);m(C,n)})),w)return{props:{},explicitNoCapture:w};if(c||("a"===t.tagName.toLowerCase()||"button"===t.tagName.toLowerCase()?y[0].$el_text=J(t):y[0].$el_text=F(t)),k){var O,x;y[0].attr__href=k;var D=null===(g=k,b=null==l?void 0:l.createElement("a"),O=E(b)?null:(b.href=g,b))||void 0===O?void 0:O.host,M=null==r||null===(x=r.location)||void 0===x?void 0:x.host;D&&M&&D!==M&&(v=k)}return{props:m({$event_type:o.type,$ce_version:1},_?{}:{$elements:y},{$elements_chain:Y(y)},null!==(n=y[0])&&void 0!==n&&n.$el_text?{$el_text:null===(i=y[0])||void 0===i?void 0:i.$el_text}:{},v&&"click"===o.type?{$external_click_url:v}:{},C)}}var it={};function at(t){return function(t,e){var n=it[t];if(n)return n;var r=e[t];if(D(r)&&!M())return it[t]=r.bind(e);var i=e.document;if(i&&x(i.createElement))try{var a=i.createElement("iframe");a.hidden=!0,i.head.appendChild(a);var o=a.contentWindow;o&&o[t]&&(r=o[t]),i.head.removeChild(a)}catch(e){_.warn("Could not create sandbox iframe for ".concat(t," check, bailing to assignableWindow.").concat(t,": "),e)}return r&&x(r)?it[t]=r.bind(e):r}("MutationObserver",t)}function ot(t){var e,n,r=E((e=t).target)?e.srcElement||null:null!==(n=e.target)&&void 0!==n&&n.shadowRoot?e.composedPath()[0]||null:e.target||null;return r?{node:r,originalEvent:t,timestamp:Date.now()}:null}function lt(t,e){return $(t)&&t>=e}class st{asRequiredConfig(t){var e,n,r,i,a=this._defaultConfig((null==t?void 0:t.__onCapture)||this._captureDeadClick.bind(this));return{element_attribute_ignorelist:null!==(e=null==t?void 0:t.element_attribute_ignorelist)&&void 0!==e?e:a.element_attribute_ignorelist,scroll_threshold_ms:null!==(n=null==t?void 0:t.scroll_threshold_ms)&&void 0!==n?n:a.scroll_threshold_ms,selection_change_threshold_ms:null!==(r=null==t?void 0:t.selection_change_threshold_ms)&&void 0!==r?r:a.selection_change_threshold_ms,mutation_threshold_ms:null!==(i=null==t?void 0:t.mutation_threshold_ms)&&void 0!==i?i:a.mutation_threshold_ms,__onCapture:a.__onCapture}}constructor(t,e){n(this,"_clicks",[]),n(this,"_defaultConfig",(t=>({element_attribute_ignorelist:[],scroll_threshold_ms:100,selection_change_threshold_ms:100,mutation_threshold_ms:2500,__onCapture:t}))),n(this,"_onClick",(t=>{var e=ot(t);A(e)||this._ignoreClick(e)||this._clicks.push(e),this._clicks.length&&E(this._checkClickTimer)&&(this._checkClickTimer=c.setTimeout((()=>{this._checkClicks()}),1e3))})),n(this,"_onScroll",(()=>{var t=Date.now();t%50==0&&this._clicks.forEach((e=>{E(e.scrollDelayMs)&&(e.scrollDelayMs=t-e.timestamp)}))})),n(this,"_onSelectionChange",(()=>{this._lastSelectionChanged=Date.now()})),this.instance=t,this._config=this.asRequiredConfig(e),this._onCapture=this._config.__onCapture}start(t){this._startClickObserver(),this._startScrollObserver(),this._startSelectionChangedObserver(),this._startMutationObserver(t)}_startMutationObserver(t){if(!this._mutationObserver){var e=at(c);this._mutationObserver=new e((t=>{this.onMutation(t)})),this._mutationObserver.observe(t,{attributes:!0,characterData:!0,childList:!0,subtree:!0})}}stop(){var t;null===(t=this._mutationObserver)||void 0===t||t.disconnect(),this._mutationObserver=void 0,c.removeEventListener("click",this._onClick),c.removeEventListener("scroll",this._onScroll,{capture:!0}),c.removeEventListener("selectionchange",this._onSelectionChange)}onMutation(t){this._lastMutation=Date.now()}_startClickObserver(){g(c,"click",this._onClick)}_startScrollObserver(){g(c,"scroll",this._onScroll,{capture:!0})}_startSelectionChangedObserver(){g(c,"selectionchange",this._onSelectionChange)}_ignoreClick(t){return!t||(!!((e=t.node)instanceof Element&&("__POSTHOG_TOOLBAR__"===e.id||null!==(n=e.closest)&&void 0!==n&&n.call(e,".toolbar-global-fade-container")))||(!!this._clicks.some((e=>e.node===t.node&&Math.abs(e.timestamp-t.timestamp)<1e3))||!(!T(t.node,"html")&&L(t.node)&&!H.includes(t.node.tagName.toLowerCase()))));var e,n}_checkClicks(){if(this._clicks.length){clearTimeout(this._checkClickTimer),this._checkClickTimer=void 0;var t=this._clicks;for(var e of(this._clicks=[],t)){var n;e.mutationDelayMs=null!==(n=e.mutationDelayMs)&&void 0!==n?n:this._lastMutation&&e.timestamp<=this._lastMutation?this._lastMutation-e.timestamp:void 0,e.absoluteDelayMs=Date.now()-e.timestamp,e.selectionChangedDelayMs=this._lastSelectionChanged&&e.timestamp<=this._lastSelectionChanged?this._lastSelectionChanged-e.timestamp:void 0;var r=lt(e.scrollDelayMs,this._config.scroll_threshold_ms),i=lt(e.selectionChangedDelayMs,this._config.selection_change_threshold_ms),a=lt(e.mutationDelayMs,this._config.mutation_threshold_ms),o=lt(e.absoluteDelayMs,1.1*this._config.mutation_threshold_ms),l=$(e.scrollDelayMs)&&e.scrollDelayMs<this._config.scroll_threshold_ms,s=$(e.mutationDelayMs)&&e.mutationDelayMs<this._config.mutation_threshold_ms,u=$(e.selectionChangedDelayMs)&&e.selectionChangedDelayMs<this._config.selection_change_threshold_ms;l||s||u||(r||a||o||i?this._onCapture(e,{$dead_click_last_mutation_timestamp:this._lastMutation,$dead_click_event_timestamp:e.timestamp,$dead_click_scroll_timeout:r,$dead_click_mutation_timeout:a,$dead_click_absolute_timeout:o,$dead_click_selection_changed_timeout:i}):e.absoluteDelayMs<this._config.mutation_threshold_ms&&this._clicks.push(e))}this._clicks.length&&E(this._checkClickTimer)&&(this._checkClickTimer=c.setTimeout((()=>{this._checkClicks()}),1e3))}}_captureDeadClick(t,n){this.instance.capture("$dead_click",e(e(e({},n),rt(t.node,{e:t.originalEvent,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this._config.element_attribute_ignorelist,elementsChainAsString:!1}).props),{},{$dead_click_scroll_delay_ms:t.scrollDelayMs,$dead_click_mutation_delay_ms:t.mutationDelayMs,$dead_click_absolute_delay_ms:t.absoluteDelayMs,$dead_click_selection_changed_delay_ms:t.selectionChangedDelayMs}),{timestamp:new Date(t.timestamp)})}}c.__PosthogExtensions__=c.__PosthogExtensions__||{},c.__PosthogExtensions__.initDeadClicksAutocapture=(t,e)=>new st(t,e)}(); | ||
!function(){"use strict";function t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function e(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?t(Object(i),!0).forEach((function(t){n(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function n(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var r="undefined"!=typeof window?window:void 0,i="undefined"!=typeof globalThis?globalThis:r,a=Array.prototype.forEach,o=null==i?void 0:i.navigator,l=null==i?void 0:i.document;null==i||i.location,null==i||i.fetch,null!=i&&i.XMLHttpRequest&&"withCredentials"in new i.XMLHttpRequest&&i.XMLHttpRequest,null==i||i.AbortController,null==o||o.userAgent;var s,c=null!=r?r:{};function u(t,e){return-1!==t.indexOf(e)}!function(t){t.GZipJS="gzip-js",t.Base64="base64"}(s||(s={}));var _=function(t){return t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},h=Array.isArray,d=Object.prototype,f=d.hasOwnProperty,m=d.toString,v=h||function(t){return"[object Array]"===m.call(t)},g=t=>"function"==typeof t,p=t=>g(t)&&-1!==t.toString().indexOf("[native code]"),b=()=>!!r.Zone,y=t=>void 0===t,C=t=>"[object String]"==m.call(t),k=t=>null===t,w=t=>y(t)||k(t),O=t=>"[object Number]"==m.call(t),x=t=>t instanceof FormData,D=t=>{var e={_log:function(e){if(r&&c.POSTHOG_DEBUG&&!y(r.console)&&r.console){for(var n=("__rrweb_original__"in r.console[e]?r.console[e].__rrweb_original__:r.console[e]),i=arguments.length,a=new Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=arguments[o];n(t,...a)}},info:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];e._log("log",...n)},warn:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];e._log("warn",...n)},error:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];e._log("error",...n)},critical:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];console.error(t,...n)},uninitializedWarning:t=>{e.error("You must initialize PostHog before calling ".concat(t))},createLogger:e=>D("".concat(t," ").concat(e))};return e},M=D("[PostHog.js]"),E={};function N(t,e,n){if(v(t))if(a&&t.forEach===a)t.forEach(e,n);else if("length"in t&&t.length===+t.length)for(var r=0,i=t.length;r<i;r++)if(r in t&&e.call(n,t[r],r)===E)return}function A(t,e,n){if(!w(t)){if(v(t))return N(t,e,n);if(x(t)){for(var r of t.entries())if(e.call(n,r[1],r[0])===E)return}else for(var i in t)if(f.call(t,i)&&e.call(n,t[i],i)===E)return}}var S=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return N(n,(function(e){for(var n in e)void 0!==e[n]&&(t[n]=e[n])})),t};function $(t){for(var e=Object.keys(t),n=e.length,r=new Array(n);n--;)r[n]=[e[n],t[e[n]]];return r}function j(t,e,n,r){var{capture:i=!1,passive:a=!0}=null!=r?r:{};null==t||t.addEventListener(e,n,{capture:i,passive:a})}function L(t){return!!t&&1===t.nodeType}function T(t,e){return!!t&&!!t.tagName&&t.tagName.toLowerCase()===e.toLowerCase()}function P(t){return t?_(t).split(/\s+/):[]}function R(t){var e="";switch(typeof t.className){case"string":e=t.className;break;case"object":e=(t.className&&"baseVal"in t.className?t.className.baseVal:null)||t.getAttribute("class")||"";break;default:e=""}return P(e)}function F(t){var e="";return q(t)&&!z(t)&&t.childNodes&&t.childNodes.length&&A(t.childNodes,(function(t){var n,r;(function(t){return!!t&&3===t.nodeType})(t)&&t.textContent&&(e+=null!==(r=t.textContent,n=w(r)?null:_(r).split(/(\s+)/).filter((t=>V(t))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))&&void 0!==n?n:"")})),_(e)}var H=["a","button","form","input","select","textarea","label"];function q(t){for(var e=t;e.parentNode&&!T(e,"body");e=e.parentNode){var n=R(e);if(u(n,"ph-sensitive")||u(n,"ph-no-capture"))return!1}if(u(R(t),"ph-include"))return!0;var r=t.type||"";if(C(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var i=t.name||t.id||"";if(C(i)){if(/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(i.replace(/[^a-zA-Z0-9]/g,"")))return!1}return!0}function z(t){return!!(T(t,"input")&&!["button","checkbox","submit","reset"].includes(t.type)||T(t,"select")||T(t,"textarea")||"true"===t.getAttribute("contenteditable"))}var G="(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})",B=new RegExp("^(?:".concat(G,")$")),W=new RegExp(G),X="\\d{3}-?\\d{2}-?\\d{4}",Z=new RegExp("^(".concat(X,")$")),I=new RegExp("(".concat(X,")"));function V(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(w(t))return!1;if(C(t)){if(t=_(t),(e?B:W).test((t||"").replace(/[- ]/g,"")))return!1;if((e?Z:I).test(t))return!1}return!0}function J(t){var e=F(t);return V(e="".concat(e," ").concat(U(t)).trim())?e:""}function U(t){var e="";return t&&t.childNodes&&t.childNodes.length&&A(t.childNodes,(function(t){var n;if(t&&"span"===(null===(n=t.tagName)||void 0===n?void 0:n.toLowerCase()))try{var r=F(t);e="".concat(e," ").concat(r).trim(),t.childNodes&&t.childNodes.length&&(e="".concat(e," ").concat(U(t)).trim())}catch(t){M.error("[AutoCapture]",t)}})),e}function Y(t){return function(t){var n=t.map((t=>{var n,r,i="";if(t.tag_name&&(i+=t.tag_name),t.attr_class)for(var a of(t.attr_class.sort(),t.attr_class))i+=".".concat(a.replace(/"/g,""));var o=e(e(e(e({},t.text?{text:t.text}:{}),{},{"nth-child":null!==(n=t.nth_child)&&void 0!==n?n:0,"nth-of-type":null!==(r=t.nth_of_type)&&void 0!==r?r:0},t.href?{href:t.href}:{}),t.attr_id?{attr_id:t.attr_id}:{}),t.attributes),l={};return $(o).sort(((t,e)=>{var[n]=t,[r]=e;return n.localeCompare(r)})).forEach((t=>{var[e,n]=t;return l[K(e.toString())]=K(n.toString())})),i+=":",i+=$(o).map((t=>{var[e,n]=t;return"".concat(e,'="').concat(n,'"')})).join("")}));return n.join(";")}(function(t){return t.map((t=>{var e,n,r={text:null===(e=t.$el_text)||void 0===e?void 0:e.slice(0,400),tag_name:t.tag_name,href:null===(n=t.attr__href)||void 0===n?void 0:n.slice(0,2048),attr_class:Q(t),attr_id:t.attr__id,nth_child:t.nth_child,nth_of_type:t.nth_of_type,attributes:{}};return $(t).filter((t=>{var[e]=t;return 0===e.indexOf("attr__")})).forEach((t=>{var[e,n]=t;return r.attributes[e]=n})),r}))}(t))}function K(t){return t.replace(/"|\\"/g,'\\"')}function Q(t){var e=t.attr__class;return e?v(e)?e:P(e):void 0}function tt(t,e){return e.length>t?e.slice(0,t)+"...":e}function et(t){if(t.previousElementSibling)return t.previousElementSibling;var e=t;do{e=e.previousSibling}while(e&&!L(e));return e}function nt(t,e,n,r){var i=t.tagName.toLowerCase(),a={tag_name:i};H.indexOf(i)>-1&&!n&&("a"===i.toLowerCase()||"button"===i.toLowerCase()?a.$el_text=tt(1024,J(t)):a.$el_text=tt(1024,F(t)));var o=R(t);o.length>0&&(a.classes=o.filter((function(t){return""!==t}))),A(t.attributes,(function(n){var i;if((!z(t)||-1!==["name","id","class","aria-label"].indexOf(n.name))&&((null==r||!r.includes(n.name))&&!e&&V(n.value)&&(i=n.name,!C(i)||"_ngcontent"!==i.substring(0,10)&&"_nghost"!==i.substring(0,7)))){var o=n.value;"class"===n.name&&(o=P(o).join(" ")),a["attr__"+n.name]=tt(1024,o)}}));for(var l=1,s=1,c=t;c=et(c);)l++,c.tagName===t.tagName&&s++;return a.nth_child=l,a.nth_of_type=s,a}function rt(t,e){for(var n,i,a,{e:o,maskAllElementAttributes:s,maskAllText:c,elementAttributeIgnoreList:_,elementsChainAsString:h}=e,d=[t],f=t;f.parentNode&&!T(f,"body");)(a=f.parentNode)&&11===a.nodeType?(d.push(f.parentNode.host),f=f.parentNode.host):(d.push(f.parentNode),f=f.parentNode);var m,v,g,p=[],b={},C=!1,k=!1;if(A(d,(t=>{var e=q(t);"a"===t.tagName.toLowerCase()&&(C=t.getAttribute("href"),C=e&&C&&V(C)&&C),u(R(t),"ph-no-capture")&&(k=!0),p.push(nt(t,s,c,_));var n=function(t){if(!q(t))return{};var e={};return A(t.attributes,(function(t){if(t.name&&0===t.name.indexOf("data-ph-capture-attribute")){var n=t.name.replace("data-ph-capture-attribute-",""),r=t.value;n&&r&&V(r)&&(e[n]=r)}})),e}(t);S(b,n)})),k)return{props:{},explicitNoCapture:k};if(c||("a"===t.tagName.toLowerCase()||"button"===t.tagName.toLowerCase()?p[0].$el_text=J(t):p[0].$el_text=F(t)),C){var w,O;p[0].attr__href=C;var x=null===(v=C,g=null==l?void 0:l.createElement("a"),w=y(g)?null:(g.href=v,g))||void 0===w?void 0:w.host,D=null==r||null===(O=r.location)||void 0===O?void 0:O.host;x&&D&&x!==D&&(m=C)}return{props:S({$event_type:o.type,$ce_version:1},h?{}:{$elements:p},{$elements_chain:Y(p)},null!==(n=p[0])&&void 0!==n&&n.$el_text?{$el_text:null===(i=p[0])||void 0===i?void 0:i.$el_text}:{},m&&"click"===o.type?{$external_click_url:m}:{},b)}}var it={};function at(t){return function(t,e){var n=it[t];if(n)return n;var r=e[t];if(p(r)&&!b())return it[t]=r.bind(e);var i=e.document;if(i&&g(i.createElement))try{var a=i.createElement("iframe");a.hidden=!0,i.head.appendChild(a);var o=a.contentWindow;o&&o[t]&&(r=o[t]),i.head.removeChild(a)}catch(e){M.warn("Could not create sandbox iframe for ".concat(t," check, bailing to assignableWindow.").concat(t,": "),e)}return r&&g(r)?it[t]=r.bind(e):r}("MutationObserver",t)}function ot(t){var e,n,r=y((e=t).target)?e.srcElement||null:null!==(n=e.target)&&void 0!==n&&n.shadowRoot?e.composedPath()[0]||null:e.target||null;return r?{node:r,originalEvent:t,timestamp:Date.now()}:null}function lt(t,e){return O(t)&&t>=e}class st{asRequiredConfig(t){var e,n,r,i,a=this._defaultConfig((null==t?void 0:t.__onCapture)||this._captureDeadClick.bind(this));return{element_attribute_ignorelist:null!==(e=null==t?void 0:t.element_attribute_ignorelist)&&void 0!==e?e:a.element_attribute_ignorelist,scroll_threshold_ms:null!==(n=null==t?void 0:t.scroll_threshold_ms)&&void 0!==n?n:a.scroll_threshold_ms,selection_change_threshold_ms:null!==(r=null==t?void 0:t.selection_change_threshold_ms)&&void 0!==r?r:a.selection_change_threshold_ms,mutation_threshold_ms:null!==(i=null==t?void 0:t.mutation_threshold_ms)&&void 0!==i?i:a.mutation_threshold_ms,__onCapture:a.__onCapture}}constructor(t,e){n(this,"_clicks",[]),n(this,"_defaultConfig",(t=>({element_attribute_ignorelist:[],scroll_threshold_ms:100,selection_change_threshold_ms:100,mutation_threshold_ms:2500,__onCapture:t}))),n(this,"_onClick",(t=>{var e=ot(t);k(e)||this._ignoreClick(e)||this._clicks.push(e),this._clicks.length&&y(this._checkClickTimer)&&(this._checkClickTimer=c.setTimeout((()=>{this._checkClicks()}),1e3))})),n(this,"_onScroll",(()=>{var t=Date.now();t%50==0&&this._clicks.forEach((e=>{y(e.scrollDelayMs)&&(e.scrollDelayMs=t-e.timestamp)}))})),n(this,"_onSelectionChange",(()=>{this._lastSelectionChanged=Date.now()})),this.instance=t,this._config=this.asRequiredConfig(e),this._onCapture=this._config.__onCapture}start(t){this._startClickObserver(),this._startScrollObserver(),this._startSelectionChangedObserver(),this._startMutationObserver(t)}_startMutationObserver(t){if(!this._mutationObserver){var e=at(c);this._mutationObserver=new e((t=>{this.onMutation(t)})),this._mutationObserver.observe(t,{attributes:!0,characterData:!0,childList:!0,subtree:!0})}}stop(){var t;null===(t=this._mutationObserver)||void 0===t||t.disconnect(),this._mutationObserver=void 0,c.removeEventListener("click",this._onClick),c.removeEventListener("scroll",this._onScroll,{capture:!0}),c.removeEventListener("selectionchange",this._onSelectionChange)}onMutation(t){this._lastMutation=Date.now()}_startClickObserver(){j(c,"click",this._onClick)}_startScrollObserver(){j(c,"scroll",this._onScroll,{capture:!0})}_startSelectionChangedObserver(){j(c,"selectionchange",this._onSelectionChange)}_ignoreClick(t){return!t||(!!((e=t.node)instanceof Element&&("__POSTHOG_TOOLBAR__"===e.id||null!==(n=e.closest)&&void 0!==n&&n.call(e,".toolbar-global-fade-container")))||(!!this._clicks.some((e=>e.node===t.node&&Math.abs(e.timestamp-t.timestamp)<1e3))||!(!T(t.node,"html")&&L(t.node)&&!H.includes(t.node.tagName.toLowerCase()))));var e,n}_checkClicks(){if(this._clicks.length){clearTimeout(this._checkClickTimer),this._checkClickTimer=void 0;var t=this._clicks;for(var e of(this._clicks=[],t)){var n;e.mutationDelayMs=null!==(n=e.mutationDelayMs)&&void 0!==n?n:this._lastMutation&&e.timestamp<=this._lastMutation?this._lastMutation-e.timestamp:void 0,e.absoluteDelayMs=Date.now()-e.timestamp,e.selectionChangedDelayMs=this._lastSelectionChanged&&e.timestamp<=this._lastSelectionChanged?this._lastSelectionChanged-e.timestamp:void 0;var r=lt(e.scrollDelayMs,this._config.scroll_threshold_ms),i=lt(e.selectionChangedDelayMs,this._config.selection_change_threshold_ms),a=lt(e.mutationDelayMs,this._config.mutation_threshold_ms),o=lt(e.absoluteDelayMs,1.1*this._config.mutation_threshold_ms),l=O(e.scrollDelayMs)&&e.scrollDelayMs<this._config.scroll_threshold_ms,s=O(e.mutationDelayMs)&&e.mutationDelayMs<this._config.mutation_threshold_ms,u=O(e.selectionChangedDelayMs)&&e.selectionChangedDelayMs<this._config.selection_change_threshold_ms;l||s||u||(r||a||o||i?this._onCapture(e,{$dead_click_last_mutation_timestamp:this._lastMutation,$dead_click_event_timestamp:e.timestamp,$dead_click_scroll_timeout:r,$dead_click_mutation_timeout:a,$dead_click_absolute_timeout:o,$dead_click_selection_changed_timeout:i}):e.absoluteDelayMs<this._config.mutation_threshold_ms&&this._clicks.push(e))}this._clicks.length&&y(this._checkClickTimer)&&(this._checkClickTimer=c.setTimeout((()=>{this._checkClicks()}),1e3))}}_captureDeadClick(t,n){this.instance.capture("$dead_click",e(e(e({},n),rt(t.node,{e:t.originalEvent,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this._config.element_attribute_ignorelist,elementsChainAsString:!1}).props),{},{$dead_click_scroll_delay_ms:t.scrollDelayMs,$dead_click_mutation_delay_ms:t.mutationDelayMs,$dead_click_absolute_delay_ms:t.absoluteDelayMs,$dead_click_selection_changed_delay_ms:t.selectionChangedDelayMs}),{timestamp:new Date(t.timestamp)})}}c.__PosthogExtensions__=c.__PosthogExtensions__||{},c.__PosthogExtensions__.initDeadClicksAutocapture=(t,e)=>new st(t,e)}(); | ||
//# sourceMappingURL=dead-clicks-autocapture.js.map |
@@ -1,2 +0,2 @@ | ||
!function(){"use strict";function e(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 r(r){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?e(Object(o),!0).forEach((function(e){n(r,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}))}return r}function n(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}var t="undefined"!=typeof window?window:void 0,o="undefined"!=typeof globalThis?globalThis:t,i=null==o?void 0:o.navigator;null==o||o.document,null==o||o.location,null==o||o.fetch,null!=o&&o.XMLHttpRequest&&"withCredentials"in new o.XMLHttpRequest&&o.XMLHttpRequest,null==o||o.AbortController,null==i||i.userAgent;var a,c=null!=t?t:{};!function(e){e.GZipJS="gzip-js",e.Base64="base64"}(a||(a={}));var l=["fatal","error","warning","log","info","debug"],u=e=>{var r={_log:function(r){if(t&&c.POSTHOG_DEBUG&&!h(t.console)&&t.console){for(var n=("__rrweb_original__"in t.console[r]?t.console[r].__rrweb_original__:t.console[r]),o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];n(e,...i)}},info:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];r._log("log",...n)},warn:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];r._log("warn",...n)},error:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];r._log("error",...n)},critical:function(){for(var r=arguments.length,n=new Array(r),t=0;t<r;t++)n[t]=arguments[t];console.error(e,...n)},uninitializedWarning:e=>{r.error("You must initialize PostHog before calling ".concat(e))},createLogger:r=>u("".concat(e," ").concat(r))};return r},s=u("[PostHog.js]").createLogger,v=Array.isArray,d=Object.prototype.toString,f=v||function(e){return"[object Array]"===d.call(e)},p=e=>"function"==typeof e,g=e=>e===Object(e)&&!f(e),h=e=>void 0===e,y=e=>"[object String]"==d.call(e),E=e=>y(e)&&0===e.trim().length,x=e=>null===e;function _(e){return!h(Event)&&O(e,Event)}function O(e,r){try{return e instanceof r}catch(e){return!1}}function b(e){return x(e)||!g(e)&&!p(e)}function w(e,r){return Object.prototype.toString.call(e)==="[object ".concat(r,"]")}function j(e){return w(e,"DOMError")}var m=/\(error: (.*)\)/,M=50,T="?";function S(e,r,n,t){var o={platform:"web:javascript",filename:e,function:"<anonymous>"===r?T:r,in_app:!0};return h(n)||(o.lineno=n),h(t)||(o.colno=t),o}var P=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,D=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,A=/\((\S*)(?::(\d+))(?::(\d+))\)/,R=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,$=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,k=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];var o=n.sort(((e,r)=>e[0]-r[0])).map((e=>e[1]));return function(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=[],i=e.split("\n"),a=n;a<i.length;a++){var c=i[a];if(!(c.length>1024)){var l=m.test(c)?c.replace(m,"$1"):c;if(!l.match(/\S*Error: /)){for(var u of o){var s=u(l);if(s){t.push(s);break}}if(t.length>=M)break}}}return function(e){if(!e.length)return[];var n=Array.from(e);return n.reverse(),n.slice(0,M).map((e=>r(r({},e),{},{filename:e.filename||U(n).filename,function:e.function||T})))}(t)}}(...[[30,e=>{var r=P.exec(e);if(r){var[,n,t,o]=r;return S(n,T,+t,+o)}var i=D.exec(e);if(i){if(i[2]&&0===i[2].indexOf("eval")){var a=A.exec(i[2]);a&&(i[2]=a[1],i[3]=a[2],i[4]=a[3])}var[c,l]=H(i[1]||T,i[2]);return S(l,c,i[3]?+i[3]:void 0,i[4]?+i[4]:void 0)}}],[50,e=>{var r=R.exec(e);if(r){if(r[3]&&r[3].indexOf(" > eval")>-1){var n=$.exec(r[3]);n&&(r[1]=r[1]||"eval",r[3]=n[1],r[4]=n[2],r[5]="")}var t=r[3],o=r[1]||T;return[o,t]=H(o,t),S(t,o,r[4]?+r[4]:void 0,r[5]?+r[5]:void 0)}}]]);function U(e){return e[e.length-1]||{}}var H=(e,r)=>{var n=-1!==e.indexOf("safari-extension"),t=-1!==e.indexOf("safari-web-extension");return n||t?[-1!==e.indexOf("@")?e.split("@")[0]:T,n?"safari-extension:".concat(r):"safari-web-extension:".concat(r)]:[e,r]},N=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;function G(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e.stacktrace||e.stack||"",t=function(e){if(e&&I.test(e.message))return 1;return 0}(e);try{var o=k(n,t);return o.slice(0,o.length-r)}catch(e){}return[]}var I=/Minified React error #\d+;/i;function z(e,r){var n,t,o=G(e),i=null===(n=null==r?void 0:r.handled)||void 0===n||n,a=null!==(t=null==r?void 0:r.synthetic)&&void 0!==t&&t;return{$exception_list:[{type:null!=r&&r.overrideExceptionType?r.overrideExceptionType:e.name,value:null!=r&&r.overrideExceptionMessage?r.overrideExceptionMessage:function(e){var r=e.message;if(r.error&&"string"==typeof r.error.message)return r.error.message;return r}(e),stacktrace:{frames:o,type:"raw"},mechanism:{handled:i,synthetic:a}}],$exception_level:"error"}}function L(e,r){var n,t,o,i=null===(n=null==r?void 0:r.handled)||void 0===n||n,a=null===(t=null==r?void 0:r.synthetic)||void 0===t||t,c={type:null!=r&&r.overrideExceptionType?r.overrideExceptionType:null!==(o=null==r?void 0:r.defaultExceptionType)&&void 0!==o?o:"Error",value:null!=r&&r.overrideExceptionMessage?r.overrideExceptionMessage:e||(null==r?void 0:r.defaultExceptionMessage),mechanism:{handled:i,synthetic:a}};if(null!=r&&r.syntheticException){var l=G(r.syntheticException,1);l.length&&(c.stacktrace={frames:l,type:"raw"})}return{$exception_list:[c],$exception_level:"error"}}function q(e,r){var n,t,o,i=null===(n=null==r?void 0:r.handled)||void 0===n||n,a=null===(t=null==r?void 0:r.synthetic)||void 0===t||t,c=null!=r&&r.overrideExceptionType?r.overrideExceptionType:_(e)?e.constructor.name:"Error",u=null!=r&&r.overrideExceptionMessage?r.overrideExceptionMessage:"Non-Error ".concat("exception"," captured with keys: ",function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:40,n=Object.keys(e);if(n.sort(),!n.length)return"[object has no keys]";for(var t=n.length;t>0;t--){var o=n.slice(0,t).join(", ");if(!(o.length>r))return t===n.length||o.length<=r?o:"".concat(o.slice(0,r),"...")}return""}(e)),s={type:c,value:u,mechanism:{handled:i,synthetic:a}};if(null!=r&&r.syntheticException){var v=G(null==r?void 0:r.syntheticException,1);v.length&&(s.stacktrace={frames:v,type:"raw"})}return{$exception_list:[s],$exception_level:(o=e.level,y(o)&&!E(o)&&l.indexOf(o)>=0?e.level:"error")}}function W(e,n){var{error:t,event:o}=e,i={$exception_list:[]},a=t||o;if(j(a)||function(e){return w(e,"DOMException")}(a)){var c=a;if(function(e){return"stack"in e}(a))i=z(a,n);else{var l=c.name||(j(c)?"DOMError":"DOMException"),u=c.message?"".concat(l,": ").concat(c.message):l,s=j(c)?"DOMError":"DOMException";i=L(u,r(r({},n),{},{overrideExceptionType:s,defaultExceptionMessage:u}))}return"code"in c&&(i.$exception_DOMException_code="".concat(c.code)),i}if(function(e){return w(e,"ErrorEvent")}(a)&&a.error)return z(a.error,n);if(function(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object DOMError]":return!0;default:return O(e,Error)}}(a))return z(a,n);if(function(e){return w(e,"Object")}(a)||_(a))return q(a,n);if(h(t)&&y(o)){var v="Error",d=o,f=o.match(N);return f&&(v=f[1],d=f[2]),L(d,r(r({},n),{},{overrideExceptionType:v,defaultExceptionMessage:d}))}return L(a,n)}function X(e){var[r]=e,n=function(e){if(b(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}(r);return b(n)?L("Non-Error promise rejection captured with value: ".concat(String(n)),{handled:!1,synthetic:!1,overrideExceptionType:"UnhandledRejection"}):W({event:n},{handled:!1,overrideExceptionType:"UnhandledRejection",defaultExceptionMessage:String(n)})}var B=s("[ExceptionAutocapture]"),C={wrapOnError:e=>{var r=t;r||B.info("window not available, cannot wrap onerror");var n=r.onerror;return r.onerror=function(){for(var r,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];var a=W({event:o[0],error:o[4]});return e(a),null!==(r=null==n?void 0:n(...o))&&void 0!==r&&r},r.onerror.__POSTHOG_INSTRUMENTED__=!0,()=>{var e;null===(e=r.onerror)||void 0===e||delete e.__POSTHOG_INSTRUMENTED__,r.onerror=n}},wrapUnhandledRejection:e=>{var r=t;r||B.info("window not available, cannot wrap onUnhandledRejection");var n=r.onunhandledrejection;return r.onunhandledrejection=function(){for(var t,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var c=X(i);return e(c),null!==(t=null==n?void 0:n.apply(r,i))&&void 0!==t&&t},r.onunhandledrejection.__POSTHOG_INSTRUMENTED__=!0,()=>{var e;null===(e=r.onunhandledrejection)||void 0===e||delete e.__POSTHOG_INSTRUMENTED__,r.onunhandledrejection=n}}};c.__PosthogExtensions__=c.__PosthogExtensions__||{},c.__PosthogExtensions__.errorWrappingFunctions=C,c.__PosthogExtensions__.parseErrorAsProperties=W,c.posthogErrorWrappingFunctions=C,c.parseErrorAsProperties=W}(); | ||
!function(){"use strict";function e(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 r(r){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?e(Object(o),!0).forEach((function(e){n(r,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}))}return r}function n(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}var t="undefined"!=typeof window?window:void 0,o="undefined"!=typeof globalThis?globalThis:t,i=null==o?void 0:o.navigator;null==o||o.document,null==o||o.location,null==o||o.fetch,null!=o&&o.XMLHttpRequest&&"withCredentials"in new o.XMLHttpRequest&&o.XMLHttpRequest,null==o||o.AbortController,null==i||i.userAgent;var a,c=null!=t?t:{};!function(e){e.GZipJS="gzip-js",e.Base64="base64"}(a||(a={}));var l=["fatal","error","warning","log","info","debug"],u=Array.isArray,s=Object.prototype.toString,v=u||function(e){return"[object Array]"===s.call(e)},d=e=>"function"==typeof e,f=e=>e===Object(e)&&!v(e),p=e=>void 0===e,g=e=>"[object String]"==s.call(e),h=e=>g(e)&&0===e.trim().length,y=e=>null===e;function E(e){return!p(Event)&&x(e,Event)}function x(e,r){try{return e instanceof r}catch(e){return!1}}function _(e){return y(e)||!f(e)&&!d(e)}function O(e,r){return Object.prototype.toString.call(e)==="[object ".concat(r,"]")}function b(e){return O(e,"DOMError")}var w=/\(error: (.*)\)/,j=50,m="?";function M(e,r,n,t){var o={platform:"web:javascript",filename:e,function:"<anonymous>"===r?m:r,in_app:!0};return p(n)||(o.lineno=n),p(t)||(o.colno=t),o}var T=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,S=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,P=/\((\S*)(?::(\d+))(?::(\d+))\)/,D=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,A=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,R=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];var o=n.sort(((e,r)=>e[0]-r[0])).map((e=>e[1]));return function(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=[],i=e.split("\n"),a=n;a<i.length;a++){var c=i[a];if(!(c.length>1024)){var l=w.test(c)?c.replace(w,"$1"):c;if(!l.match(/\S*Error: /)){for(var u of o){var s=u(l);if(s){t.push(s);break}}if(t.length>=j)break}}}return function(e){if(!e.length)return[];var n=Array.from(e);return n.reverse(),n.slice(0,j).map((e=>r(r({},e),{},{filename:e.filename||$(n).filename,function:e.function||m})))}(t)}}(...[[30,e=>{var r=T.exec(e);if(r){var[,n,t,o]=r;return M(n,m,+t,+o)}var i=S.exec(e);if(i){if(i[2]&&0===i[2].indexOf("eval")){var a=P.exec(i[2]);a&&(i[2]=a[1],i[3]=a[2],i[4]=a[3])}var[c,l]=k(i[1]||m,i[2]);return M(l,c,i[3]?+i[3]:void 0,i[4]?+i[4]:void 0)}}],[50,e=>{var r=D.exec(e);if(r){if(r[3]&&r[3].indexOf(" > eval")>-1){var n=A.exec(r[3]);n&&(r[1]=r[1]||"eval",r[3]=n[1],r[4]=n[2],r[5]="")}var t=r[3],o=r[1]||m;return[o,t]=k(o,t),M(t,o,r[4]?+r[4]:void 0,r[5]?+r[5]:void 0)}}]]);function $(e){return e[e.length-1]||{}}var k=(e,r)=>{var n=-1!==e.indexOf("safari-extension"),t=-1!==e.indexOf("safari-web-extension");return n||t?[-1!==e.indexOf("@")?e.split("@")[0]:m,n?"safari-extension:".concat(r):"safari-web-extension:".concat(r)]:[e,r]},U=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;function H(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e.stacktrace||e.stack||"",t=function(e){if(e&&N.test(e.message))return 1;return 0}(e);try{var o=R(n,t);return o.slice(0,o.length-r)}catch(e){}return[]}var N=/Minified React error #\d+;/i;function G(e,r){var n,t,o=H(e),i=null===(n=null==r?void 0:r.handled)||void 0===n||n,a=null!==(t=null==r?void 0:r.synthetic)&&void 0!==t&&t;return{$exception_list:[{type:null!=r&&r.overrideExceptionType?r.overrideExceptionType:e.name,value:null!=r&&r.overrideExceptionMessage?r.overrideExceptionMessage:function(e){var r=e.message;if(r.error&&"string"==typeof r.error.message)return r.error.message;return r}(e),stacktrace:{frames:o,type:"raw"},mechanism:{handled:i,synthetic:a}}],$exception_level:"error"}}function I(e,r){var n,t,o,i=null===(n=null==r?void 0:r.handled)||void 0===n||n,a=null===(t=null==r?void 0:r.synthetic)||void 0===t||t,c={type:null!=r&&r.overrideExceptionType?r.overrideExceptionType:null!==(o=null==r?void 0:r.defaultExceptionType)&&void 0!==o?o:"Error",value:null!=r&&r.overrideExceptionMessage?r.overrideExceptionMessage:e||(null==r?void 0:r.defaultExceptionMessage),mechanism:{handled:i,synthetic:a}};if(null!=r&&r.syntheticException){var l=H(r.syntheticException,1);l.length&&(c.stacktrace={frames:l,type:"raw"})}return{$exception_list:[c],$exception_level:"error"}}function z(e,r){var n,t,o,i=null===(n=null==r?void 0:r.handled)||void 0===n||n,a=null===(t=null==r?void 0:r.synthetic)||void 0===t||t,c=null!=r&&r.overrideExceptionType?r.overrideExceptionType:E(e)?e.constructor.name:"Error",u=null!=r&&r.overrideExceptionMessage?r.overrideExceptionMessage:"Non-Error ".concat("exception"," captured with keys: ",function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:40,n=Object.keys(e);if(n.sort(),!n.length)return"[object has no keys]";for(var t=n.length;t>0;t--){var o=n.slice(0,t).join(", ");if(!(o.length>r))return t===n.length||o.length<=r?o:"".concat(o.slice(0,r),"...")}return""}(e)),s={type:c,value:u,mechanism:{handled:i,synthetic:a}};if(null!=r&&r.syntheticException){var v=H(null==r?void 0:r.syntheticException,1);v.length&&(s.stacktrace={frames:v,type:"raw"})}return{$exception_list:[s],$exception_level:(o=e.level,g(o)&&!h(o)&&l.indexOf(o)>=0?e.level:"error")}}function L(e,n){var{error:t,event:o}=e,i={$exception_list:[]},a=t||o;if(b(a)||function(e){return O(e,"DOMException")}(a)){var c=a;if(function(e){return"stack"in e}(a))i=G(a,n);else{var l=c.name||(b(c)?"DOMError":"DOMException"),u=c.message?"".concat(l,": ").concat(c.message):l,s=b(c)?"DOMError":"DOMException";i=I(u,r(r({},n),{},{overrideExceptionType:s,defaultExceptionMessage:u}))}return"code"in c&&(i.$exception_DOMException_code="".concat(c.code)),i}if(function(e){return O(e,"ErrorEvent")}(a)&&a.error)return G(a.error,n);if(function(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object DOMError]":return!0;default:return x(e,Error)}}(a))return G(a,n);if(function(e){return O(e,"Object")}(a)||E(a))return z(a,n);if(p(t)&&g(o)){var v="Error",d=o,f=o.match(U);return f&&(v=f[1],d=f[2]),I(d,r(r({},n),{},{overrideExceptionType:v,defaultExceptionMessage:d}))}return I(a,n)}function q(e){var[r]=e,n=function(e){if(_(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}(r);return _(n)?I("Non-Error promise rejection captured with value: ".concat(String(n)),{handled:!1,synthetic:!1,overrideExceptionType:"UnhandledRejection"}):L({event:n},{handled:!1,overrideExceptionType:"UnhandledRejection",defaultExceptionMessage:String(n)})}var W=e=>{var r={_log:function(r){if(t&&c.POSTHOG_DEBUG&&!p(t.console)&&t.console){for(var n=("__rrweb_original__"in t.console[r]?t.console[r].__rrweb_original__:t.console[r]),o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];n(e,...i)}},info:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];r._log("log",...n)},warn:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];r._log("warn",...n)},error:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];r._log("error",...n)},critical:function(){for(var r=arguments.length,n=new Array(r),t=0;t<r;t++)n[t]=arguments[t];console.error(e,...n)},uninitializedWarning:e=>{r.error("You must initialize PostHog before calling ".concat(e))},createLogger:r=>W("".concat(e," ").concat(r))};return r},X=(0,W("[PostHog.js]").createLogger)("[ExceptionAutocapture]"),B={wrapOnError:e=>{var r=t;r||X.info("window not available, cannot wrap onerror");var n=r.onerror;return r.onerror=function(){for(var r,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];var a=L({event:o[0],error:o[4]});return e(a),null!==(r=null==n?void 0:n(...o))&&void 0!==r&&r},r.onerror.__POSTHOG_INSTRUMENTED__=!0,()=>{var e;null===(e=r.onerror)||void 0===e||delete e.__POSTHOG_INSTRUMENTED__,r.onerror=n}},wrapUnhandledRejection:e=>{var r=t;r||X.info("window not available, cannot wrap onUnhandledRejection");var n=r.onunhandledrejection;return r.onunhandledrejection=function(){for(var t,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var c=q(i);return e(c),null!==(t=null==n?void 0:n.apply(r,i))&&void 0!==t&&t},r.onunhandledrejection.__POSTHOG_INSTRUMENTED__=!0,()=>{var e;null===(e=r.onunhandledrejection)||void 0===e||delete e.__POSTHOG_INSTRUMENTED__,r.onunhandledrejection=n}}};c.__PosthogExtensions__=c.__PosthogExtensions__||{},c.__PosthogExtensions__.errorWrappingFunctions=B,c.__PosthogExtensions__.parseErrorAsProperties=L,c.posthogErrorWrappingFunctions=B,c.parseErrorAsProperties=L}(); | ||
//# sourceMappingURL=exception-autocapture.js.map |
@@ -17,3 +17,2 @@ import { Breaker, Properties } from '../types'; | ||
export declare function entries<T = any>(obj: Record<string, T>): [string, T][]; | ||
export declare const isValidRegex: (str: string) => boolean; | ||
export declare const trySafe: <T>(fn: () => T) => T | undefined; | ||
@@ -20,0 +19,0 @@ export declare const safewrap: <F extends (...args: any[]) => any = (...args: any[]) => any>(f: F) => F; |
@@ -5,2 +5,1 @@ export declare function includes<T = any>(str: T[] | string, needle: T): boolean; | ||
export declare function isDistinctIdStringLike(value: string): boolean; | ||
export declare const isMatchingRegex: (value: string, pattern: string) => boolean; |
{ | ||
"name": "posthog-js", | ||
"version": "1.219.5", | ||
"version": "1.219.6", | ||
"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", |
@@ -15,3 +15,3 @@ var __values = (this && this.__values) || function(o) { | ||
import { window } from '../../utils/globals'; | ||
import { isMatchingRegex } from '../../utils/string-utils'; | ||
import { isMatchingRegex } from '../../utils/regex-utils'; | ||
var ActionMatcher = /** @class */ (function () { | ||
@@ -18,0 +18,0 @@ function ActionMatcher(instance) { |
@@ -7,3 +7,3 @@ import { SURVEYS } from './constants'; | ||
import { createLogger } from './utils/logger'; | ||
import { isMatchingRegex } from './utils/string-utils'; | ||
import { isMatchingRegex } from './utils/regex-utils'; | ||
import { SurveyEventReceiver } from './utils/survey-event-receiver'; | ||
@@ -10,0 +10,0 @@ import { isNullish } from './utils/type-utils'; |
@@ -17,3 +17,2 @@ import { Breaker, Properties } from '../types'; | ||
export declare function entries<T = any>(obj: Record<string, T>): [string, T][]; | ||
export declare const isValidRegex: (str: string) => boolean; | ||
export declare const trySafe: <T>(fn: () => T) => T | undefined; | ||
@@ -20,0 +19,0 @@ export declare const safewrap: <F extends (...args: any[]) => any = (...args: any[]) => any>(f: F) => F; |
@@ -124,11 +124,2 @@ var __values = (this && this.__values) || function(o) { | ||
} | ||
export var isValidRegex = function (str) { | ||
try { | ||
new RegExp(str); | ||
} | ||
catch (_a) { | ||
return false; | ||
} | ||
return true; | ||
}; | ||
export var trySafe = function (fn) { | ||
@@ -135,0 +126,0 @@ try { |
@@ -5,2 +5,1 @@ export declare function includes<T = any>(str: T[] | string, needle: T): boolean; | ||
export declare function isDistinctIdStringLike(value: string): boolean; | ||
export declare const isMatchingRegex: (value: string, pattern: string) => boolean; |
@@ -1,2 +0,1 @@ | ||
import { isValidRegex } from '.'; | ||
export function includes(str, needle) { | ||
@@ -16,12 +15,2 @@ return str.indexOf(needle) !== -1; | ||
} | ||
export var isMatchingRegex = function (value, pattern) { | ||
if (!isValidRegex(pattern)) | ||
return false; | ||
try { | ||
return new RegExp(pattern).test(value); | ||
} | ||
catch (_a) { | ||
return false; | ||
} | ||
}; | ||
//# sourceMappingURL=string-utils.js.map |
@@ -5,3 +5,3 @@ import { navigator, window } from './utils/globals'; | ||
import { getQueryParam } from './utils/request-utils'; | ||
import { isMatchingRegex } from './utils/string-utils'; | ||
import { isMatchingRegex } from './utils/regex-utils'; | ||
import { logger } from './utils/logger'; | ||
@@ -8,0 +8,0 @@ import { Info } from './utils/event-utils'; |
{ | ||
"name": "posthog-js", | ||
"version": "1.219.5", | ||
"version": "1.219.6", | ||
"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 not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
476
20417467
47639