posthog-js
Advanced tools
Comparing version 1.188.0 to 1.188.1
@@ -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:{},l="[PostHog.js]",u={_log:function(e){if(t&&c.POSTHOG_DEBUG&&!h(t.console)&&t.console){for(var r=("__rrweb_original__"in t.console[e]?t.console[e].__rrweb_original__:t.console[e]),n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];r(l,...o)}},info:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];u._log("log",...r)},warn:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];u._log("warn",...r)},error:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];u._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(l,...r)},uninitializedWarning:e=>{u.error("You must initialize PostHog before calling ".concat(e))}};!function(e){e.GZipJS="gzip-js",e.Base64="base64"}(a||(a={}));var s=["fatal","error","warning","log","info","debug"],d=Array.isArray,v=Object.prototype.toString,f=d||function(e){return"[object Array]"===v.call(e)},p=e=>"function"==typeof e,g=e=>e===Object(e)&&!f(e),h=e=>void 0===e,y=e=>"[object String]"==v.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:"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 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={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 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=null!=r&&r.overrideExceptionType?r.overrideExceptionType:_(e)?e.constructor.name:"Error",l=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)),u={type:c,value:l,mechanism:{handled:i,synthetic:a}};if(null!=r&&r.syntheticException){var d=G(null==r?void 0:r.syntheticException,1);d.length&&(u.stacktrace={frames:d,type:"raw"})}return{$exception_list:[u],$exception_level:(o=e.level,y(o)&&!E(o)&&s.indexOf(o)>=0?e.level:"error")}}function W(e,n){var[t,o,i,a,c]=e,l={$exception_list:[]},u=c||t;if(j(u)||function(e){return w(e,"DOMException")}(u)){var s=u;if(function(e){return"stack"in e}(u))l=z(u,n);else{var d=s.name||(j(s)?"DOMError":"DOMException"),v=s.message?"".concat(d,": ").concat(s.message):d,f=j(s)?"DOMError":"DOMException";l=q(v,r(r({},n),{},{overrideExceptionType:f,defaultExceptionMessage:v}))}return"code"in s&&(l.$exception_DOMException_code="".concat(s.code)),l}if(function(e){return w(e,"ErrorEvent")}(u)&&u.error)return z(u.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)}}(u))return z(u,n);if(function(e){return w(e,"Object")}(u)||_(u))return L(u,n);if(h(c)&&y(t)){var p="Error",g=t,E=t.match(N);return E&&(p=E[1],g=E[2]),q(g,r(r({},n),{},{overrideExceptionType:p,defaultExceptionMessage:g}))}return q(u,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)?q("Non-Error promise rejection captured with value: ".concat(String(n)),{handled:!1,synthetic:!1,overrideExceptionType:"UnhandledRejection"}):W([n],{handled:!1,overrideExceptionType:"UnhandledRejection",defaultExceptionMessage:String(n)})}var B={wrapOnError:e=>{var r=t;r||u.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(o);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||u.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=B,c.__PosthogExtensions__.parseErrorAsProperties=W,c.posthogErrorWrappingFunctions=B,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:{},l="[PostHog.js]",u={_log:function(e){if(t&&c.POSTHOG_DEBUG&&!h(t.console)&&t.console){for(var r=("__rrweb_original__"in t.console[e]?t.console[e].__rrweb_original__:t.console[e]),n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];r(l,...o)}},info:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];u._log("log",...r)},warn:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];u._log("warn",...r)},error:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];u._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(l,...r)},uninitializedWarning:e=>{u.error("You must initialize PostHog before calling ".concat(e))}};!function(e){e.GZipJS="gzip-js",e.Base64="base64"}(a||(a={}));var s=["fatal","error","warning","log","info","debug"],d=Array.isArray,v=Object.prototype.toString,f=d||function(e){return"[object Array]"===v.call(e)},p=e=>"function"==typeof e,g=e=>e===Object(e)&&!f(e),h=e=>void 0===e,y=e=>"[object String]"==v.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 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={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 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=null!=r&&r.overrideExceptionType?r.overrideExceptionType:_(e)?e.constructor.name:"Error",l=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)),u={type:c,value:l,mechanism:{handled:i,synthetic:a}};if(null!=r&&r.syntheticException){var d=G(null==r?void 0:r.syntheticException,1);d.length&&(u.stacktrace={frames:d,type:"raw"})}return{$exception_list:[u],$exception_level:(o=e.level,y(o)&&!E(o)&&s.indexOf(o)>=0?e.level:"error")}}function W(e,n){var[t,o,i,a,c]=e,l={$exception_list:[]},u=c||t;if(j(u)||function(e){return w(e,"DOMException")}(u)){var s=u;if(function(e){return"stack"in e}(u))l=z(u,n);else{var d=s.name||(j(s)?"DOMError":"DOMException"),v=s.message?"".concat(d,": ").concat(s.message):d,f=j(s)?"DOMError":"DOMException";l=q(v,r(r({},n),{},{overrideExceptionType:f,defaultExceptionMessage:v}))}return"code"in s&&(l.$exception_DOMException_code="".concat(s.code)),l}if(function(e){return w(e,"ErrorEvent")}(u)&&u.error)return z(u.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)}}(u))return z(u,n);if(function(e){return w(e,"Object")}(u)||_(u))return L(u,n);if(h(c)&&y(t)){var p="Error",g=t,E=t.match(N);return E&&(p=E[1],g=E[2]),q(g,r(r({},n),{},{overrideExceptionType:p,defaultExceptionMessage:g}))}return q(u,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)?q("Non-Error promise rejection captured with value: ".concat(String(n)),{handled:!1,synthetic:!1,overrideExceptionType:"UnhandledRejection"}):W([n],{handled:!1,overrideExceptionType:"UnhandledRejection",defaultExceptionMessage:String(n)})}var B={wrapOnError:e=>{var r=t;r||u.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(o);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||u.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=B,c.__PosthogExtensions__.parseErrorAsProperties=W,c.posthogErrorWrappingFunctions=B,c.parseErrorAsProperties=W}(); | ||
//# sourceMappingURL=exception-autocapture.js.map |
{ | ||
"name": "posthog-js", | ||
"version": "1.188.0", | ||
"version": "1.188.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", |
@@ -84,3 +84,3 @@ // copied and adapted from https://github.com/getsentry/sentry-javascript/blob/41fef4b10f3a644179b77985f00f8696c908539f/packages/browser/src/stack-parsers.ts | ||
var frame = { | ||
platform: 'javascript', | ||
platform: 'web:javascript', | ||
filename: filename, | ||
@@ -87,0 +87,0 @@ function: func === '<anonymous>' ? UNKNOWN_FUNCTION : func, |
@@ -128,5 +128,12 @@ var __assign = (this && this.__assign) || function () { | ||
// because calls to PostHog would be reported using a call to PostHog which would be reported.... | ||
var ignorePostHogPaths = function (data) { | ||
var ignorePostHogPaths = function (data, apiHostConfig) { | ||
var _a; | ||
var url = convertToURL(data.name); | ||
if (url && url.pathname && POSTHOG_PATHS_TO_IGNORE.some(function (path) { return url.pathname.indexOf(path) === 0; })) { | ||
// we need to account for api host config as e.g. pathname could be /ingest/s/ and we want to ignore that | ||
var replaceValue = apiHostConfig.indexOf('http') === 0 ? (_a = convertToURL(apiHostConfig)) === null || _a === void 0 ? void 0 : _a.pathname : apiHostConfig; | ||
if (replaceValue === '/') { | ||
replaceValue = ''; | ||
} | ||
var pathname = url === null || url === void 0 ? void 0 : url.pathname.replace(replaceValue || '', ''); | ||
if (url && pathname && POSTHOG_PATHS_TO_IGNORE.some(function (path) { return pathname.indexOf(path) === 0; })) { | ||
return undefined; | ||
@@ -208,3 +215,3 @@ } | ||
var enforcedCleaningFn = function (d) { | ||
return payloadLimiter(ignorePostHogPaths(removeAuthorizationHeader(d))); | ||
return payloadLimiter(ignorePostHogPaths(removeAuthorizationHeader(d), instanceConfig.api_host)); | ||
}; | ||
@@ -211,0 +218,0 @@ var hasDeprecatedMaskFunction = isFunction(instanceConfig.session_recording.maskNetworkRequestFn); |
@@ -20,3 +20,3 @@ var __values = (this && this.__values) || function(o) { | ||
// i.e., its direct parent. | ||
while (ancestors.length > 0 && ancestors.at(-1) !== this) { | ||
while (ancestors.length > 0 && ancestors[ancestors.length - 1] !== this) { | ||
ancestors.pop(); | ||
@@ -23,0 +23,0 @@ } |
{ | ||
"name": "posthog-js", | ||
"version": "1.188.0", | ||
"version": "1.188.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 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 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
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
18801604
42108