@mcpjam/inspector 3.25.3 → 3.26.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/app-bootstrap-BTQE7bOL.css +1 -0
- package/dist/client/assets/{app-bootstrap-D8p1xxJL.js → app-bootstrap-DJVdECiP.js} +508 -401
- package/dist/client/assets/app-navigation-C1fmIwWx.js +1903 -0
- package/dist/client/assets/caniuse-instrument-sans-BbzFLZTg.woff2 +0 -0
- package/dist/client/assets/{chunk-D32TOXHM-_lcmAHBS.js → chunk-D32TOXHM-BuwUbJde.js} +5 -5
- package/dist/client/assets/{dead-clicks-autocapture--Cc80oY_.js → dead-clicks-autocapture-BfVQ5VOW.js} +2 -2
- package/dist/client/assets/{error-reporting-B4cQ3ELy.js → error-reporting-63LRZi7K.js} +1 -1
- package/dist/client/assets/{error-reporting-D-VMAV0k.js → error-reporting-BhRc6Gma.js} +47 -47
- package/dist/client/assets/{exception-autocapture-DginYM1x.js → exception-autocapture-BIWlGpLs.js} +2 -2
- package/dist/client/assets/first-run-oauth-return-CQwiwOKd.css +2 -0
- package/dist/client/assets/first-run-oauth-return-__GiXMoC.js +11 -0
- package/dist/client/assets/{highlighted-body-KQOG7T2V-CXee3ser.js → highlighted-body-KQOG7T2V-DOSL8MJM.js} +2 -2
- package/dist/client/assets/index-CeytPr1a.js +4 -0
- package/dist/client/assets/{jszip.min-DVVdSEhZ.js → jszip.min-DncqjL0Q.js} +2 -2
- package/dist/client/assets/{mermaid-MCJ5UELQ-DrjPVbUm.js → mermaid-MCJ5UELQ-wD11QKLw.js} +1 -1
- package/dist/client/assets/{posthog-recorder-DNy5bFB1.js → posthog-recorder-BKC9Osof.js} +2 -2
- package/dist/client/assets/{preload-helper-BYOM8wou.js → preload-helper-CEUuZLTj.js} +2 -2
- package/dist/client/assets/{project-route-CshTCVmQ.js → project-route-DNrtuUI8.js} +3 -3
- package/dist/client/assets/{react-dom-y0CFBu2J.js → react-dom-3ylgkoRI.js} +2 -2
- package/dist/client/assets/{rolldown-runtime-Ck0AUAe_.js → rolldown-runtime-CNhBNX9h.js} +1 -1
- package/dist/client/assets/{surveys-P23Cz34L.js → surveys-BJQBUJJI.js} +2 -2
- package/dist/client/assets/telemetry-files-c167c4e2b38f8ea7.js +1 -0
- package/dist/client/assets/{trace-timeline-CWdGYeWw.js → trace-timeline-CYO2Iirq.js} +1 -1
- package/dist/client/assets/trace-timeline-Dn4BLNrQ.js +93 -0
- package/dist/client/assets/{web-vitals-DgeVvuPL.js → web-vitals-DHv25aJU.js} +2 -2
- package/dist/client/caniuse-instrument-sans-OFL.txt +93 -0
- package/dist/client/caniuse-jar.webp +0 -0
- package/dist/client/caniuse-share-icons.svg +8 -0
- package/dist/client/index.html +9 -9
- package/dist/lib/launcher/index.js +10 -10
- package/dist/lib/vite/index.js +10 -10
- package/dist/server/harness-install-cli.js +322 -56
- package/dist/server/index.js +2 -2
- package/package.json +2 -2
- package/dist/client/assets/app-bootstrap-wXhyegHd.css +0 -1
- package/dist/client/assets/first-run-oauth-return-DZl0Ds5X.css +0 -2
- package/dist/client/assets/first-run-oauth-return-rF56NddK.js +0 -1872
- package/dist/client/assets/index-82wefelr.js +0 -4
- package/dist/client/assets/telemetry-files-2454aee542431dd3.js +0 -1
- package/dist/client/assets/trace-timeline-mjuETy67.js +0 -73
- package/dist/client/assets/use-reduced-motion-_Ge9sKbc.js +0 -42
package/dist/client/assets/{exception-autocapture-DginYM1x.js → exception-autocapture-BIWlGpLs.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
(function(){try{var p=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};p.SENTRY_RELEASE={id:"3.25.3"};var w=new p.Error().stack;w&&(p._sentryDebugIds=p._sentryDebugIds||{},p._sentryDebugIds[w]="3e81949e-d288-4c96-a0c5-e4a19db44893",p._sentryDebugIdIdentifier="sentry-dbid-3e81949e-d288-4c96-a0c5-e4a19db44893")}catch{}})();(function(){const p="u">typeof window?window:void 0,w="u">typeof globalThis?globalThis:p;w!=null&&w.XMLHttpRequest&&new w.XMLHttpRequest;const x=typeof globalThis<"u"?globalThis:p;x&&typeof self>"u"&&(x.self=x),x&&typeof File>"u"&&(x.File=function(){});const O=p??{},X=Object.prototype.toString,R=Array.isArray||function(e){return X.call(e)==="[object Array]"},C=e=>typeof e=="function",I=e=>e===void 0,m=e=>X.call(e)=="[object String]",Y=e=>m(e)&&e.trim().length===0;function B(e){return e===null||typeof e!="object"}function D(e,t){return{}.toString.call(e)===`[object ${t}]`}function U(e){switch({}.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object DOMError]":case"[object WebAssembly.Exception]":return!0;default:return K(e,Error)}}function L(e){return"u">typeof Event&&K(e,Event)}function K(e,t){try{return e instanceof t}catch{return!1}}function J(e,t,r,n,o,i,c){try{var s=e[i](c),u=s.value}catch(d){r(d);return}s.done?t(u):Promise.resolve(u).then(n,o)}function Q(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function c(u){J(i,n,o,c,s,"next",u)}function s(u){J(i,n,o,c,s,"throw",u)}c(void 0)})}}let T,Z,N;function he(e){const t=globalThis._posthogChunkIds;if(!t)return;const r=Object.keys(t);return N&&r.length===Z||(Z=r.length,N=r.reduce((n,o)=>{T||(T={});const i=T[o];if(i)n[i[0]]=i[1];else{const c=e(o);for(let s=c.length-1;s>=0;s--){const u=c[s],d=u?.filename,a=t[o];if(d&&a){n[d]=a,T[o]=[d,a];break}}}return n},{})),N}function j(e){return j=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},j(e)}function de(e,t,r){return(t=(function(n){var o=(function(i){if(j(i)!="object"||!i)return i;var c=i[Symbol.toPrimitive];if(c!==void 0){var s=c.call(i,"string");if(j(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(i)})(n);return j(o)=="symbol"?o:o+""})(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function g(e){for(var t=1;arguments.length>t;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ee(Object(r),!0).forEach(function(n){de(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ee(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const ge=/^([a-z][a-z0-9.+-]+):/i,ye=["http","https","file","blob","app","capacitor","ionic","webpack","webpack-internal","ng"];function ve(e){if(!e||e==="<anonymous>")return!1;const t=ge.exec(e);return!t||ye.includes(t[1].toLowerCase())}function A(e,t,r,n,o){const i={platform:e,filename:t,function:r==="<anonymous>"?"?":r,in_app:ve(t)};return I(n)||(i.lineno=n),I(o)||(i.colno=o),i}const te=(e,t)=>{const r=e.indexOf("safari-extension")!==-1,n=e.indexOf("safari-web-extension")!==-1;return r||n?[e.indexOf("@")!==-1?e.split("@")[0]:"?",r?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},me=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,be=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ke=/\((\S*)(?::(\d+))(?::(\d+))\)/,Ee=(e,t)=>{const r=me.exec(e);if(r){const[,o,i,c]=r;return A(t,o,"?",+i,+c)}const n=be.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){const c=ke.exec(n[2]);c&&(n[2]=c[1],n[3]=c[2],n[4]=c[3])}const[o,i]=te(n[1]||"?",n[2]);return A(t,i,o,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},we=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,xe=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Oe=(e,t)=>{const r=we.exec(e);if(r){if(r[3]&&r[3].indexOf(" > eval")>-1){const i=xe.exec(r[3]);i&&(r[1]=r[1]||"eval",r[3]=i[1],r[4]=i[2],r[5]="")}let n=r[3],o=r[1]||"?";return[o,n]=te(o,n),A(t,n,o,r[4]?+r[4]:void 0,r[5]?+r[5]:void 0)}},re=/\(error: (.*)\)/;function H(e,t){return e.filename===t.filename&&e.function===t.function&&e.module===t.module&&e.lineno===t.lineno&&e.colno===t.colno}function je(e){for(let t=1;10>=t;t++){const r=e.length-2*t;if(0>r)break;let n=!0;for(let o=0;t>o;o++)if(!H(e[r+o],e[r+t+o])){n=!1;break}if(n){for(let o=0;t>o;o++)e[r+o]=e[r+t+o];return e.length=r+t,{start:r,length:t}}}}function _e(e,t){const r=t.start+t.length,n=oe(e,t);n&&e.splice(r+n===e.length?r:t.start,n)}function ne(e,t){let r=t.start;for(;r>0&&H(e[r-1],e[r-1+t.length]);)r--;return t.start-r}function oe(e,t){const r=t.start+t.length;let n=r;for(;e.length>n&&H(e[n],e[n-t.length]);)n++;return n-r}function Pe(e,t){const r=t[0];let n=e.length-(r?ne(e,r):0);for(const o of t)n-=oe(e,o);return n}function Se(e,t,r){for(let n=0;e.length>n;n++){const o=e[(t+n)%e.length],i=e[(r+n)%e.length];if(o!==i)return i>o}return!1}const $e=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,De=["fatal","error","warning","log","info","debug"];function ie(e,t=40){const r=Object.keys(e);if(r.sort(),!r.length)return"[object has no keys]";for(let n=r.length;n>0;n--){const o=r.slice(0,n).join(", ");if(t>=o.length)return n===r.length?o:o.length>t?`${o.slice(0,t)}...`:o}return""}const ce=(e,{debugEnabled:t}={})=>{const r={N(n,...o){p&&(p.POSTHOG_DEBUG||t)&&!I(p.console)&&p.console&&("__rrweb_original__"in p.console[n]?p.console[n].__rrweb_original__:p.console[n])(e,...o)},debug(...n){r.N("debug",...n)},info(...n){r.N("log",...n)},warn(...n){r.N("warn",...n)},error(...n){r.N("error",...n)},critical(...n){console.error(e,...n)},uninitializedWarning(n){r.error(`You must initialize PostHog before calling ${n}`)},createLogger:(n,o)=>ce(`${e} ${n}`,o)};return r},se=ce("[PostHog.js]").createLogger;se("[Error tracking]");const _=se("[ExceptionAutocapture]"),W=new class{constructor(e,t,r=[]){this.coercers=e,this.stackParser=t,this.modifiers=r}buildFromUnknown(e,t={}){const r=t&&t.mechanism||{handled:!0,type:"generic"},n=this.buildCoercingContext(r,t,0).apply(e),o=this.buildParsingContext(t),i=this.parseStacktrace(n,o);return{$exception_list:this.convertToExceptionList(i,r),$exception_level:"error"}}modifyFrames(e){var t=this;return Q(function*(){for(const r of e)r.stacktrace&&r.stacktrace.frames&&R(r.stacktrace.frames)&&(r.stacktrace.frames=yield t.applyModifiers(r.stacktrace.frames));return e})()}coerceFallback(e){var t;return{type:"Error",value:"Unknown error",stack:(t=e.syntheticException)===null||t===void 0?void 0:t.stack,synthetic:!0}}parseStacktrace(e,t){var r;let n,o;if(e.cause!=null&&(n=this.parseStacktrace(e.cause,t)),e.stack!=""&&e.stack!=null)try{o=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?t.skipFirstLines:0),t.chunkIdMap)}catch{}return g(g({},e),{},{cause:n,stack:o,errors:(r=e.errors)===null||r===void 0?void 0:r.map(i=>this.parseStacktrace(i,t))})}applyChunkIds(e,t){return e.map(r=>(r.filename&&t&&(r.chunk_id=t[r.filename]),r))}applyCoercers(e,t){for(const r of this.coercers)if(r.match(e))return r.coerce(e,t);return this.coerceFallback(t)}applyModifiers(e){var t=this;return Q(function*(){let r=e;for(const n of t.modifiers)r=yield n(r);return r})()}convertToExceptionList(e,t){const r=[],n=(o,i,c)=>{var s;const u=r.length,d=i===void 0?g(g({type:typeof t.type=="string"&&t.type.length>0?t.type:"generic"},typeof t.handled=="boolean"?{handled:t.handled}:t.handled===void 0?{handled:!0}:{}),{},{synthetic:typeof t.synthetic=="boolean"?t.synthetic:o.synthetic,exception_id:u}):{type:"chained",source:c,synthetic:o.synthetic,exception_id:u,parent_id:i},a={type:o.type,value:o.value,mechanism:d};o.stack&&(a.stacktrace={type:"raw",frames:o.stack}),r.push(a),o.cause&&n(o.cause,u,"cause");for(const h of(s=o.errors)!==null&&s!==void 0?s:[])n(h,u,"member")};return n(e),r}buildParsingContext(e){var t;return{chunkIdMap:he(this.stackParser),skipFirstLines:(t=e.skipFirstLines)!==null&&t!==void 0?t:1}}getAggregateErrors(e){try{if(U(e)){let r=Object.getPrototypeOf(e);for(let n=0;r&&100>n;n++){var t;const o=(t=Object.getOwnPropertyDescriptor(r,"constructor"))===null||t===void 0?void 0:t.value;if(typeof o=="function"&&o.name==="AggregateError"){const i=e.errors;return R(i)?i:void 0}r=Object.getPrototypeOf(r)}}}catch{}}buildCoercingContext(e,t,r=0){let n=0,o=0,i=!1;const c=new Set,s=[],u={},d=(l,f,y=0)=>{const v=a(f,y),P=v.apply;if(v.apply=k=>{s.push(l);try{return P(k)}finally{s.pop()}},y>4||y>0&&s.indexOf(l)!==-1)return this.coerceFallback(v);const S=typeof l=="object"&&l!==null||typeof l=="function";if(y===0&&n>=50||S&&c.has(l))return;S&&c.add(l),y===0&&n++;const M=this.getAggregateErrors(l);let E,$;i||(i=!!M);try{if(E=this.applyCoercers(l,v),!E)throw u}catch(k){if(k===u)return void(y===0&&n--);if(!i)throw k;E=this.coerceFallback(v)}if(!M||n>=50)return E;try{$=M.length}catch{return E}if(!Number.isInteger($)||0>$||$>4294967295)return E;const pe=[];for(let k=0;50>n&&1e3>o&&$>k;k++){let F;o++;try{F=v.next(M[k])}catch{n++,F=this.coerceFallback(a(f+1))}F&&pe.push(F)}return g(g({},E),{},{errors:pe})},a=(l,f=0)=>g(g({},t),{},{syntheticException:l==0?t.syntheticException:void 0,mechanism:l==0?e:{},apply(y){const v=d(y,l,f+1);if(!v)throw u;return v},next:y=>d(y,l+1)}),h=a(r);return g(g({},h),{},{apply:l=>{var f;return(f=d(l,r))!==null&&f!==void 0?f:this.coerceFallback(h)}})}}([new class{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,t){const r=m(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:r?e.stack:void 0,cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return this.isDOMError(e)?"DOMError":"DOMException"}getValue(e){const t=e.name||(this.isDOMError(e)?"DOMError":"DOMException");return e.message?`${t}: ${e.message}`:t}isDOMException(e){return D(e,"DOMException")}isDOMError(e){return D(e,"DOMError")}},new class{match(e){return D(e,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(e)}isCustomEventWrappingRejection(e){if(!L(e))return!1;try{const t=e.detail;return t!=null&&typeof t=="object"&&"reason"in t}catch{return!1}}coerce(e,t){var r;const n=this.getUnhandledRejectionReason(e);return B(n)?{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(n)}`,stack:(r=t.syntheticException)===null||r===void 0?void 0:r.stack,synthetic:!0}:t.apply(n)}getUnhandledRejectionReason(e){try{if("reason"in e)return e.reason;if("detail"in e&&e.detail!=null&&typeof e.detail=="object"&&"reason"in e.detail)return e.detail.reason}catch{}return e}},new class{match(e){return!!D(e,"ErrorEvent")&&(e.error!=null||this.ar(e))}coerce(e,t){var r;if(e.error!=null)return t.apply(e.error);const n=t.apply(e.message);return g(g({},n),{},{stack:(r=this.lr(e))!==null&&r!==void 0?r:n.stack,synthetic:!0})}ar(e){return m(e.message)&&e.message.length>0}lr(e){var t,r;const n=e,o=(t=n.lineno)!==null&&t!==void 0?t:0,i=(r=n.colno)!==null&&r!==void 0?r:0;if(m(n.filename)&&n.filename.length!==0&&o!==0)return`Error
|
|
1
|
+
(function(){try{var p=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};p.SENTRY_RELEASE={id:"3.26.1"};var w=new p.Error().stack;w&&(p._sentryDebugIds=p._sentryDebugIds||{},p._sentryDebugIds[w]="3e81949e-d288-4c96-a0c5-e4a19db44893",p._sentryDebugIdIdentifier="sentry-dbid-3e81949e-d288-4c96-a0c5-e4a19db44893")}catch{}})();(function(){const p="u">typeof window?window:void 0,w="u">typeof globalThis?globalThis:p;w!=null&&w.XMLHttpRequest&&new w.XMLHttpRequest;const x=typeof globalThis<"u"?globalThis:p;x&&typeof self>"u"&&(x.self=x),x&&typeof File>"u"&&(x.File=function(){});const O=p??{},X=Object.prototype.toString,R=Array.isArray||function(e){return X.call(e)==="[object Array]"},C=e=>typeof e=="function",I=e=>e===void 0,m=e=>X.call(e)=="[object String]",Y=e=>m(e)&&e.trim().length===0;function B(e){return e===null||typeof e!="object"}function D(e,t){return{}.toString.call(e)===`[object ${t}]`}function U(e){switch({}.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object DOMError]":case"[object WebAssembly.Exception]":return!0;default:return K(e,Error)}}function L(e){return"u">typeof Event&&K(e,Event)}function K(e,t){try{return e instanceof t}catch{return!1}}function J(e,t,r,n,o,i,c){try{var s=e[i](c),u=s.value}catch(d){r(d);return}s.done?t(u):Promise.resolve(u).then(n,o)}function Q(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function c(u){J(i,n,o,c,s,"next",u)}function s(u){J(i,n,o,c,s,"throw",u)}c(void 0)})}}let T,Z,N;function he(e){const t=globalThis._posthogChunkIds;if(!t)return;const r=Object.keys(t);return N&&r.length===Z||(Z=r.length,N=r.reduce((n,o)=>{T||(T={});const i=T[o];if(i)n[i[0]]=i[1];else{const c=e(o);for(let s=c.length-1;s>=0;s--){const u=c[s],d=u?.filename,a=t[o];if(d&&a){n[d]=a,T[o]=[d,a];break}}}return n},{})),N}function j(e){return j=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},j(e)}function de(e,t,r){return(t=(function(n){var o=(function(i){if(j(i)!="object"||!i)return i;var c=i[Symbol.toPrimitive];if(c!==void 0){var s=c.call(i,"string");if(j(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(i)})(n);return j(o)=="symbol"?o:o+""})(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function g(e){for(var t=1;arguments.length>t;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ee(Object(r),!0).forEach(function(n){de(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ee(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const ge=/^([a-z][a-z0-9.+-]+):/i,ye=["http","https","file","blob","app","capacitor","ionic","webpack","webpack-internal","ng"];function ve(e){if(!e||e==="<anonymous>")return!1;const t=ge.exec(e);return!t||ye.includes(t[1].toLowerCase())}function A(e,t,r,n,o){const i={platform:e,filename:t,function:r==="<anonymous>"?"?":r,in_app:ve(t)};return I(n)||(i.lineno=n),I(o)||(i.colno=o),i}const te=(e,t)=>{const r=e.indexOf("safari-extension")!==-1,n=e.indexOf("safari-web-extension")!==-1;return r||n?[e.indexOf("@")!==-1?e.split("@")[0]:"?",r?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},me=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,be=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ke=/\((\S*)(?::(\d+))(?::(\d+))\)/,Ee=(e,t)=>{const r=me.exec(e);if(r){const[,o,i,c]=r;return A(t,o,"?",+i,+c)}const n=be.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){const c=ke.exec(n[2]);c&&(n[2]=c[1],n[3]=c[2],n[4]=c[3])}const[o,i]=te(n[1]||"?",n[2]);return A(t,i,o,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},we=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,xe=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Oe=(e,t)=>{const r=we.exec(e);if(r){if(r[3]&&r[3].indexOf(" > eval")>-1){const i=xe.exec(r[3]);i&&(r[1]=r[1]||"eval",r[3]=i[1],r[4]=i[2],r[5]="")}let n=r[3],o=r[1]||"?";return[o,n]=te(o,n),A(t,n,o,r[4]?+r[4]:void 0,r[5]?+r[5]:void 0)}},re=/\(error: (.*)\)/;function H(e,t){return e.filename===t.filename&&e.function===t.function&&e.module===t.module&&e.lineno===t.lineno&&e.colno===t.colno}function je(e){for(let t=1;10>=t;t++){const r=e.length-2*t;if(0>r)break;let n=!0;for(let o=0;t>o;o++)if(!H(e[r+o],e[r+t+o])){n=!1;break}if(n){for(let o=0;t>o;o++)e[r+o]=e[r+t+o];return e.length=r+t,{start:r,length:t}}}}function _e(e,t){const r=t.start+t.length,n=oe(e,t);n&&e.splice(r+n===e.length?r:t.start,n)}function ne(e,t){let r=t.start;for(;r>0&&H(e[r-1],e[r-1+t.length]);)r--;return t.start-r}function oe(e,t){const r=t.start+t.length;let n=r;for(;e.length>n&&H(e[n],e[n-t.length]);)n++;return n-r}function Pe(e,t){const r=t[0];let n=e.length-(r?ne(e,r):0);for(const o of t)n-=oe(e,o);return n}function Se(e,t,r){for(let n=0;e.length>n;n++){const o=e[(t+n)%e.length],i=e[(r+n)%e.length];if(o!==i)return i>o}return!1}const $e=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,De=["fatal","error","warning","log","info","debug"];function ie(e,t=40){const r=Object.keys(e);if(r.sort(),!r.length)return"[object has no keys]";for(let n=r.length;n>0;n--){const o=r.slice(0,n).join(", ");if(t>=o.length)return n===r.length?o:o.length>t?`${o.slice(0,t)}...`:o}return""}const ce=(e,{debugEnabled:t}={})=>{const r={N(n,...o){p&&(p.POSTHOG_DEBUG||t)&&!I(p.console)&&p.console&&("__rrweb_original__"in p.console[n]?p.console[n].__rrweb_original__:p.console[n])(e,...o)},debug(...n){r.N("debug",...n)},info(...n){r.N("log",...n)},warn(...n){r.N("warn",...n)},error(...n){r.N("error",...n)},critical(...n){console.error(e,...n)},uninitializedWarning(n){r.error(`You must initialize PostHog before calling ${n}`)},createLogger:(n,o)=>ce(`${e} ${n}`,o)};return r},se=ce("[PostHog.js]").createLogger;se("[Error tracking]");const _=se("[ExceptionAutocapture]"),W=new class{constructor(e,t,r=[]){this.coercers=e,this.stackParser=t,this.modifiers=r}buildFromUnknown(e,t={}){const r=t&&t.mechanism||{handled:!0,type:"generic"},n=this.buildCoercingContext(r,t,0).apply(e),o=this.buildParsingContext(t),i=this.parseStacktrace(n,o);return{$exception_list:this.convertToExceptionList(i,r),$exception_level:"error"}}modifyFrames(e){var t=this;return Q(function*(){for(const r of e)r.stacktrace&&r.stacktrace.frames&&R(r.stacktrace.frames)&&(r.stacktrace.frames=yield t.applyModifiers(r.stacktrace.frames));return e})()}coerceFallback(e){var t;return{type:"Error",value:"Unknown error",stack:(t=e.syntheticException)===null||t===void 0?void 0:t.stack,synthetic:!0}}parseStacktrace(e,t){var r;let n,o;if(e.cause!=null&&(n=this.parseStacktrace(e.cause,t)),e.stack!=""&&e.stack!=null)try{o=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?t.skipFirstLines:0),t.chunkIdMap)}catch{}return g(g({},e),{},{cause:n,stack:o,errors:(r=e.errors)===null||r===void 0?void 0:r.map(i=>this.parseStacktrace(i,t))})}applyChunkIds(e,t){return e.map(r=>(r.filename&&t&&(r.chunk_id=t[r.filename]),r))}applyCoercers(e,t){for(const r of this.coercers)if(r.match(e))return r.coerce(e,t);return this.coerceFallback(t)}applyModifiers(e){var t=this;return Q(function*(){let r=e;for(const n of t.modifiers)r=yield n(r);return r})()}convertToExceptionList(e,t){const r=[],n=(o,i,c)=>{var s;const u=r.length,d=i===void 0?g(g({type:typeof t.type=="string"&&t.type.length>0?t.type:"generic"},typeof t.handled=="boolean"?{handled:t.handled}:t.handled===void 0?{handled:!0}:{}),{},{synthetic:typeof t.synthetic=="boolean"?t.synthetic:o.synthetic,exception_id:u}):{type:"chained",source:c,synthetic:o.synthetic,exception_id:u,parent_id:i},a={type:o.type,value:o.value,mechanism:d};o.stack&&(a.stacktrace={type:"raw",frames:o.stack}),r.push(a),o.cause&&n(o.cause,u,"cause");for(const h of(s=o.errors)!==null&&s!==void 0?s:[])n(h,u,"member")};return n(e),r}buildParsingContext(e){var t;return{chunkIdMap:he(this.stackParser),skipFirstLines:(t=e.skipFirstLines)!==null&&t!==void 0?t:1}}getAggregateErrors(e){try{if(U(e)){let r=Object.getPrototypeOf(e);for(let n=0;r&&100>n;n++){var t;const o=(t=Object.getOwnPropertyDescriptor(r,"constructor"))===null||t===void 0?void 0:t.value;if(typeof o=="function"&&o.name==="AggregateError"){const i=e.errors;return R(i)?i:void 0}r=Object.getPrototypeOf(r)}}}catch{}}buildCoercingContext(e,t,r=0){let n=0,o=0,i=!1;const c=new Set,s=[],u={},d=(l,f,y=0)=>{const v=a(f,y),P=v.apply;if(v.apply=k=>{s.push(l);try{return P(k)}finally{s.pop()}},y>4||y>0&&s.indexOf(l)!==-1)return this.coerceFallback(v);const S=typeof l=="object"&&l!==null||typeof l=="function";if(y===0&&n>=50||S&&c.has(l))return;S&&c.add(l),y===0&&n++;const M=this.getAggregateErrors(l);let E,$;i||(i=!!M);try{if(E=this.applyCoercers(l,v),!E)throw u}catch(k){if(k===u)return void(y===0&&n--);if(!i)throw k;E=this.coerceFallback(v)}if(!M||n>=50)return E;try{$=M.length}catch{return E}if(!Number.isInteger($)||0>$||$>4294967295)return E;const pe=[];for(let k=0;50>n&&1e3>o&&$>k;k++){let F;o++;try{F=v.next(M[k])}catch{n++,F=this.coerceFallback(a(f+1))}F&&pe.push(F)}return g(g({},E),{},{errors:pe})},a=(l,f=0)=>g(g({},t),{},{syntheticException:l==0?t.syntheticException:void 0,mechanism:l==0?e:{},apply(y){const v=d(y,l,f+1);if(!v)throw u;return v},next:y=>d(y,l+1)}),h=a(r);return g(g({},h),{},{apply:l=>{var f;return(f=d(l,r))!==null&&f!==void 0?f:this.coerceFallback(h)}})}}([new class{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,t){const r=m(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:r?e.stack:void 0,cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return this.isDOMError(e)?"DOMError":"DOMException"}getValue(e){const t=e.name||(this.isDOMError(e)?"DOMError":"DOMException");return e.message?`${t}: ${e.message}`:t}isDOMException(e){return D(e,"DOMException")}isDOMError(e){return D(e,"DOMError")}},new class{match(e){return D(e,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(e)}isCustomEventWrappingRejection(e){if(!L(e))return!1;try{const t=e.detail;return t!=null&&typeof t=="object"&&"reason"in t}catch{return!1}}coerce(e,t){var r;const n=this.getUnhandledRejectionReason(e);return B(n)?{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(n)}`,stack:(r=t.syntheticException)===null||r===void 0?void 0:r.stack,synthetic:!0}:t.apply(n)}getUnhandledRejectionReason(e){try{if("reason"in e)return e.reason;if("detail"in e&&e.detail!=null&&typeof e.detail=="object"&&"reason"in e.detail)return e.detail.reason}catch{}return e}},new class{match(e){return!!D(e,"ErrorEvent")&&(e.error!=null||this.ar(e))}coerce(e,t){var r;if(e.error!=null)return t.apply(e.error);const n=t.apply(e.message);return g(g({},n),{},{stack:(r=this.lr(e))!==null&&r!==void 0?r:n.stack,synthetic:!0})}ar(e){return m(e.message)&&e.message.length>0}lr(e){var t,r;const n=e,o=(t=n.lineno)!==null&&t!==void 0?t:0,i=(r=n.colno)!==null&&r!==void 0?r:0;if(m(n.filename)&&n.filename.length!==0&&o!==0)return`Error
|
|
2
2
|
at ${n.filename}:${o}:${i}`}},new class{match(e){return U(e)}coerce(e,t){var r;const n=this.getStack(e),o=n===void 0?(r=t.syntheticException)===null||r===void 0?void 0:r.stack:void 0,i=!!o;return{type:this.getType(e),value:this.getMessage(e,t),stack:n??o,cause:e.cause?t.next(e.cause):void 0,synthetic:i}}getType(e){return e.name||e.constructor.name}getMessage(e,t){const r=e.message;return String(r.error&&typeof r.error.message=="string"?r.error.message:r)}getStack(e){try{const t=e.stacktrace;if(typeof t=="string"&&t.length>0)return t;const r=e.stack;return typeof r=="string"&&r.length>0?r:void 0}catch{return}}},new class{match(e){return L(e)}coerce(e,t){var r;const n=e.constructor.name;return{type:n,value:`${n} captured as exception with keys: ${ie(e)}`,stack:(r=t.syntheticException)===null||r===void 0?void 0:r.stack,synthetic:!0}}},new class{match(e){return typeof e=="object"&&e!==null}coerce(e,t){var r,n;const o=this.getErrorPropertyFromObject(e);return o?t.apply(o):{type:this.getType(e),value:this.getValue(e),stack:(r=this.getStack(e))!==null&&r!==void 0?r:(n=t.syntheticException)===null||n===void 0?void 0:n.stack,level:this.isSeverityLevel(e.level)?e.level:"error",synthetic:!0}}getType(e){if(L(e))return e.constructor.name;const t="name"in e?e.name:void 0;return m(t)&&!Y(t)?t:"Error"}getValue(e){if("name"in e&&typeof e.name=="string"){let r=`'${e.name}' captured as exception`;return"message"in e&&typeof e.message=="string"&&(r+=` with message: '${e.message}'`),r}if("message"in e&&typeof e.message=="string")return e.message;const t=this.getObjectClassName(e);return`${t&&t!=="Object"?`'${t}'`:"Object"} captured as exception with keys: ${ie(e)}`}isSeverityLevel(e){return m(e)&&!Y(e)&&De.indexOf(e)>=0}getStack(e){try{return m(e.stacktrace)&&e.stacktrace.length>0?e.stacktrace:m(e.stack)&&e.stack.length>0?e.stack:void 0}catch{return}}getErrorPropertyFromObject(e){for(const t in e)if({}.hasOwnProperty.call(e,t)){const r=e[t];if(U(r))return r}}getObjectClassName(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{return}}},new class{match(e){return typeof e=="string"}coerce(e,t){var r;const[n,o]=this.getInfos(e);return{type:n??"Error",value:o??e,stack:(r=t.syntheticException)===null||r===void 0?void 0:r.stack,synthetic:!0}}getInfos(e){let t="Error",r=e;const n=e.match($e);return n&&(t=n[1],r=n[2]),[t,r]}},new class{match(e){return B(e)}coerce(e,t){var r;return{type:"Error",value:`Primitive value captured as exception: ${String(e)}`,stack:(r=t.syntheticException)===null||r===void 0?void 0:r.stack,synthetic:!0}}}],(function(e,...t){return(r,n=0)=>{const o=[],i=r.split(`
|
|
3
3
|
`),c=Math.min(i.length,n+1e3),s=[];for(let a=n;c>a;a++){const h=i[a];if(h.length>1024)continue;const l=re.test(h)?h.replace(re,"$1"):h;if(!l.match(/\S*Error: /)){for(const f of t){const y=f(l,e);if(y){o.push(y);const v=je(o);if(v){for(let P=s.length-1;P>=0;P--){const S=s[P];if(v.start>=S.start+S.length)break;s.pop()}s.push(v)}break}}if(Pe(o,s)>=50)break}}const u=[...s].sort((a,h)=>h.start-a.start),d=u[u.length-1];if(d){const a=ne(o,d);o.splice(d.start-a,a);for(const h of u)h.start-=a}for(const a of u)_e(o,a);return s.some(a=>a.start===0&&o.length===a.length)&&(function(a){const h=a.map(f=>`${f.function}|${f.filename}|${f.lineno}|${f.colno}|${f.module}`);let l=0;for(let f=1;h.length>f;f++)Se(h,f,l)&&(l=f);a.push(...a.splice(0,l))})(o),(function(a){if(!a.length)return[];const h=Array.from(a);return h.reverse(),h.slice(0,50).map(l=>{return g(g({},l),{},{filename:l.filename||(f=h,f[f.length-1]||{}).filename,function:l.function||"?"});var f})})(o)}})("web:javascript",Ee,Oe)),b=(e,t)=>{try{return e()}catch{return t}},z=(e,t)=>b(()=>e(t()),void 0),G=e=>b(()=>C(e)&&C(e.call),!1),V=(e,t)=>b(()=>{e[t].__POSTHOG_INSTRUMENTED__=!0},void 0),q=(e,t,r)=>{b(()=>{var n;(n=e[t])===null||n===void 0||delete n.__POSTHOG_INSTRUMENTED__},void 0),b(()=>{e[t]=r},void 0)},ae=e=>{const t=p;t||_.info("window not available, cannot wrap onerror");const r=b(()=>t.onerror,void 0);return t.onerror=function(...n){var o;return z(e,()=>W.buildFromUnknown((([i,c,s,u,d])=>{if(d!=null)return d;if(m(i)&&m(c)&&c.length>0&&typeof ErrorEvent<"u")try{return new ErrorEvent("error",{message:i,filename:c,lineno:s,colno:u})}catch{return i}return i})(n),{mechanism:{handled:!1}})),!!G(r)&&(o=r(...n))!==null&&o!==void 0&&o},V(t,"onerror"),()=>q(t,"onerror",r)},le=(e,t=!1)=>{const r=p;r||_.info("window not available, cannot wrap onUnhandledRejection");const n=b(()=>r.onunhandledrejection,void 0);return r.onunhandledrejection=function(o){var i;return z(e,()=>W.buildFromUnknown(o,{mechanism:{handled:!1}})),G(n)?(i=n(o))!==null&&i!==void 0&&i:t},V(r,"onunhandledrejection"),()=>q(r,"onunhandledrejection",n)},ue={wrapOnError:ae,wrapUnhandledRejection:le,wrapConsoleError(e){const t=console;t||_.info("console not available, cannot wrap console.error");const r=b(()=>t.error,void 0);return t.error=function(...n){b(()=>n.length>1&&m(n[0])&&(/^\[PostHog\.js\](?: |$)/.test(n[0])||n[0]==="rrweb logger error:"),!1)||z(e,()=>{let o;o=n.length==1?n[0]:n.join(" ");const i=n.find(c=>c instanceof Error);return W.buildFromUnknown(i||o,{mechanism:{handled:!0,type:"onconsole"},syntheticException:new Error("PostHog syntheticException"),skipFirstLines:2})}),G(r)&&r(...n)},V(t,"error"),()=>q(t,"error",r)}};O.__PosthogExtensions__=O.__PosthogExtensions__||{},O.__PosthogExtensions__.errorWrappingFunctions=ue,O.posthogErrorWrappingFunctions=ue;const fe=(e,t)=>{if(!C(e?.capture))return;const r=t?.autocaptureExceptions,n=r!==null&&typeof r=="object"&&R(r.errors_to_ignore)?r.errors_to_ignore.reduce((i,c)=>{try{i.push(new RegExp(c))}catch(s){_.error("Ignoring invalid legacy exception exclusion rule",c,s)}return i},[]):[],o=i=>{try{var c;(c=e.capture)===null||c===void 0||c.call(e,"$exception",i,{_noTruncate:!0,_batchKey:"exceptionEvent",_noHeatmaps:!0})}catch(s){_.error("Failed to capture exception for a legacy client",s)}};ae(i=>{n.some(c=>i.$exception_list.some(s=>c.test(s.value||"")))||o(i)}),le(o,!0)};O.extendPostHogWithExceptionAutoCapture=fe,O.extendPostHogWithExceptionAutocapture=fe})();
|
|
4
4
|
|
|
5
|
-
//# sourceMappingURL=exception-autocapture-
|
|
5
|
+
//# sourceMappingURL=exception-autocapture-BIWlGpLs.js.map
|