Version Description
Download this release
Release Info
Developer | fullofcaffeine |
Plugin | Full Site Editing |
Version | 3.35024 |
Comparing to | |
See all releases |
Code changes from version 3.34907 to 3.35024
build_meta.txt
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
commit_hash=
|
2 |
-
commit_url=https://github.com/Automattic/wp-calypso/commit/
|
3 |
-
build_number=3.
|
1 |
+
commit_hash=161c1e482376d34cfd65845e6e723cf558e2d8f1
|
2 |
+
commit_url=https://github.com/Automattic/wp-calypso/commit/161c1e482376d34cfd65845e6e723cf558e2d8f1
|
3 |
+
build_number=3.35024
|
error-reporting/dist/error-reporting.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('wp-api-fetch', 'wp-polyfill'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('wp-api-fetch', 'wp-polyfill'), 'version' => 'a4fc2b0f439b264af608');
|
error-reporting/dist/error-reporting.min.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
!function(){"use strict";var t={487:function(t,e,n){n.d(e,{u:function(){return h}});var r=n(334),i=n(4911),o=n(9504),a=n(2226),s=n(9798),u=n(1988),c=n(1449),p=n(6149),f=n(4827),d=n(6144),h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,r.ZT)(e,t),e.prototype.eventFromException=function(t,e){return(0,u.dr)(t,e,this._options.attachStacktrace)},e.prototype.eventFromMessage=function(t,e,n){return void 0===e&&(e=a.z.Info),(0,u.aB)(t,e,n,this._options.attachStacktrace)},e.prototype._setupTransport=function(){if(!this._options.dsn)return t.prototype._setupTransport.call(this);var e=(0,r.pi)((0,r.pi)({},this._options.transportOptions),{dsn:this._options.dsn,tunnel:this._options.tunnel,sendClientReports:this._options.sendClientReports,_metadata:this._options._metadata}),n=(0,i.hd)(e.dsn,e._metadata,e.tunnel),o=(0,i.Ut)(n.dsn,n.tunnel);if(this._options.transport)return new this._options.transport(e);if((0,s.Ak)()){var a=(0,r.pi)({},e.fetchParameters);return this._newTransport=(0,c.k)({requestOptions:a,url:o}),new p.V(e)}return this._newTransport=(0,f.H)({url:o,headers:e.headers}),new d.w(e)},e}(o.N)},2314:function(t,e,n){n.d(e,{R:function(){return d}});var r=n(334),i=n(1476),o=n(9849),a=n(5907),s=n(8536),u=n(487),c=n(7904),p=n(2634),f=n(8356),d=function(t){function e(e){void 0===e&&(e={});return e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:i.J}],version:i.J},t.call(this,u.u,e)||this}return(0,r.ZT)(e,t),e.prototype.showReportDialog=function(t){void 0===t&&(t={}),(0,a.R)().document&&(this._isEnabled()?(0,p.BS)((0,r.pi)((0,r.pi)({},t),{dsn:t.dsn||this.getDsn()})):c.h&&s.kg.error("Trying to call showReportDialog with Sentry Client disabled"))},e.prototype._prepareEvent=function(e,n,r){return e.platform=e.platform||"javascript",t.prototype._prepareEvent.call(this,e,n,r)},e.prototype._sendEvent=function(e){var n=this.getIntegration(f.O);n&&n.addSentryBreadcrumb(e),t.prototype._sendEvent.call(this,e)},e}(o.W)},1988:function(t,e,n){n.d(e,{GJ:function(){return d},dr:function(){return g},aB:function(){return y},ME:function(){return _}});var r=n(334),i=n(2226),o=n(1757),a=n(1995),s=n(8035),u=n(9038),c=n(3699),p=n(7946),f=n(2224);function d(t){var e=l(t),n={type:t&&t.name,value:m(t)};return e.length&&(n.stacktrace={frames:e}),void 0===n.type&&""===n.value&&(n.value="Unrecoverable error caught"),n}function h(t){return{exception:{values:[d(t)]}}}function l(t){var e=t.stacktrace||t.stack||"",n=function(t){if(t){if("number"==typeof t.framesToPop)return t.framesToPop;if(v.test(t.message))return 1}return 0}(t);try{return(0,u.pE)(f.CS,f.ay,f.s$,f.aL,f.Pi)(e,n)}catch(r){}return[]}var v=/Minified React error #\d+;/i;function m(t){var e=t&&t.message;return e?e.error&&"string"==typeof e.error.message?e.error.message:e:"No error message"}function g(t,e,n){var r=_(t,e&&e.syntheticException||void 0,n);return(0,c.EG)(r),r.level=i.z.Error,e&&e.event_id&&(r.event_id=e.event_id),(0,p.WD)(r)}function y(t,e,n,r){void 0===e&&(e=i.z.Info);var o=b(t,n&&n.syntheticException||void 0,r);return o.level=e,n&&n.event_id&&(o.event_id=n.event_id),(0,p.WD)(o)}function _(t,e,n,i){var u;if((0,o.VW)(t)&&t.error)return h(t.error);if((0,o.TX)(t)||(0,o.fm)(t)){var p=t;if("stack"in t)u=h(t);else{var f=p.name||((0,o.TX)(p)?"DOMError":"DOMException"),d=p.message?f+": "+p.message:f;u=b(d,e,n),(0,c.Db)(u,d)}return"code"in p&&(u.tags=(0,r.pi)((0,r.pi)({},u.tags),{"DOMException.code":""+p.code})),u}return(0,o.VZ)(t)?h(t):(0,o.PO)(t)||(0,o.cO)(t)?(u=function(t,e,n){var r={exception:{values:[{type:(0,o.cO)(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:"Non-Error "+(n?"promise rejection":"exception")+" captured with keys: "+(0,a.zf)(t)}]},extra:{__serialized__:(0,s.Qy)(t)}};if(e){var i=l(e);i.length&&(r.stacktrace={frames:i})}return r}(t,e,i),(0,c.EG)(u,{synthetic:!0}),u):(u=b(t,e,n),(0,c.Db)(u,""+t,void 0),(0,c.EG)(u,{synthetic:!0}),u)}function b(t,e,n){var r={message:t};if(n&&e){var i=l(e);i.length&&(r.stacktrace={frames:i})}return r}},7904:function(t,e,n){n.d(e,{h:function(){return r}});var r="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__},2634:function(t,e,n){n.d(e,{Wz:function(){return h},re:function(){return v},BS:function(){return m}});var r=n(334),i=n(4678),o=n(4911),a=n(5907),s=n(1995),u=n(3699),c=n(8536),p=n(7904),f=(0,a.R)(),d=0;function h(){return d>0}function l(){d+=1,setTimeout((function(){d-=1}))}function v(t,e,n){if(void 0===e&&(e={}),"function"!=typeof t)return t;try{var o=t.__sentry_wrapped__;if(o)return o;if((0,s.HK)(t))return t}catch(p){return t}var a=function(){var o=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);var a=o.map((function(t){return v(t,e)}));return t.apply(this,a)}catch(s){throw l(),(0,i.$e)((function(t){t.addEventProcessor((function(t){return e.mechanism&&((0,u.Db)(t,void 0,void 0),(0,u.EG)(t,e.mechanism)),t.extra=(0,r.pi)((0,r.pi)({},t.extra),{arguments:o}),t})),(0,i.Tb)(s)})),s}};try{for(var c in t)Object.prototype.hasOwnProperty.call(t,c)&&(a[c]=t[c])}catch(f){}(0,s.$Q)(a,t),(0,s.xp)(t,"__sentry_wrapped__",a);try{Object.getOwnPropertyDescriptor(a,"name").configurable&&Object.defineProperty(a,"name",{get:function(){return t.name}})}catch(f){}return a}function m(t){if(void 0===t&&(t={}),f.document)if(t.eventId)if(t.dsn){var e=f.document.createElement("script");e.async=!0,e.src=(0,o.hR)(t.dsn,t),t.onLoad&&(e.onload=t.onLoad);var n=f.document.head||f.document.body;n&&n.appendChild(e)}else p.h&&c.kg.error("Missing dsn option in showReportDialog call");else p.h&&c.kg.error("Missing eventId option in showReportDialog call")}},8356:function(t,e,n){n.d(e,{O:function(){return d}});var r=n(334),i=n(8585),o=n(2226),a=n(3699),s=n(4005),u=n(4194),c=n(8653),p=n(9660),f=n(5907),d=function(){function t(e){this.name=t.id,this._options=(0,r.pi)({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},e)}return t.prototype.addSentryBreadcrumb=function(t){this._options.sentry&&(0,i.Gd)().addBreadcrumb({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:(0,a.jH)(t)},{event:t})},t.prototype.setupOnce=function(){this._options.console&&(0,s.o)("console",h),this._options.dom&&(0,s.o)("dom",function(t){function e(e){var n,r="object"==typeof t?t.serializeAttribute:void 0;"string"==typeof r&&(r=[r]);try{n=e.event.target?(0,u.R)(e.event.target,r):(0,u.R)(e.event,r)}catch(o){n="<unknown>"}0!==n.length&&(0,i.Gd)().addBreadcrumb({category:"ui."+e.name,message:n},{event:e.event,name:e.name,global:e.global})}return e}(this._options.dom)),this._options.xhr&&(0,s.o)("xhr",l),this._options.fetch&&(0,s.o)("fetch",v),this._options.history&&(0,s.o)("history",m)},t.id="Breadcrumbs",t}();function h(t){var e={category:"console",data:{arguments:t.args,logger:"console"},level:(0,c.E)(t.level),message:(0,p.nK)(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;e.message="Assertion failed: "+((0,p.nK)(t.args.slice(1)," ")||"console.assert"),e.data.arguments=t.args.slice(1)}(0,i.Gd)().addBreadcrumb(e,{input:t.args,level:t.level})}function l(t){if(t.endTimestamp){if(t.xhr.__sentry_own_request__)return;var e=t.xhr.__sentry_xhr__||{},n=e.method,r=e.url,o=e.status_code,a=e.body;(0,i.Gd)().addBreadcrumb({category:"xhr",data:{method:n,url:r,status_code:o},type:"http"},{xhr:t.xhr,input:a})}else;}function v(t){t.endTimestamp&&(t.fetchData.url.match(/sentry_key/)&&"POST"===t.fetchData.method||(t.error?(0,i.Gd)().addBreadcrumb({category:"fetch",data:t.fetchData,level:o.z.Error,type:"http"},{data:t.error,input:t.args}):(0,i.Gd)().addBreadcrumb({category:"fetch",data:(0,r.pi)((0,r.pi)({},t.fetchData),{status_code:t.response.status}),type:"http"},{input:t.args,response:t.response})))}function m(t){var e=(0,f.R)(),n=t.from,r=t.to,o=(0,a.en)(e.location.href),s=(0,a.en)(n),u=(0,a.en)(r);s.path||(s=o),o.protocol===u.protocol&&o.host===u.host&&(r=u.relative),o.protocol===s.protocol&&o.host===s.host&&(n=s.relative),(0,i.Gd)().addBreadcrumb({category:"navigation",data:{from:n,to:r}})}},184:function(t,e,n){n.d(e,{I:function(){return o}});var r=n(8536),i=n(7904),o=function(){function t(){this.name=t.id}return t.prototype.setupOnce=function(e,n){e((function(e){var o=n().getIntegration(t);if(o){try{if(function(t,e){if(!e)return!1;if(function(t,e){var n=t.message,r=e.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!s(t,e))return!1;if(!a(t,e))return!1;return!0}(t,e))return!0;if(function(t,e){var n=u(e),r=u(t);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!s(t,e))return!1;if(!a(t,e))return!1;return!0}(t,e))return!0;return!1}(e,o._previousEvent))return i.h&&r.kg.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(c){return o._previousEvent=e}return o._previousEvent=e}return e}))},t.id="Dedupe",t}();function a(t,e){var n=c(t),r=c(e);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(n=n,(r=r).length!==n.length)return!1;for(var i=0;i<r.length;i++){var o=r[i],a=n[i];if(o.filename!==a.filename||o.lineno!==a.lineno||o.colno!==a.colno||o.function!==a.function)return!1}return!0}function s(t,e){var n=t.fingerprint,r=e.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return!(n.join("")!==r.join(""))}catch(i){return!1}}function u(t){return t.exception&&t.exception.values&&t.exception.values[0]}function c(t){var e=t.exception;if(e)try{return e.values[0].stacktrace.frames}catch(n){return}else if(t.stacktrace)return t.stacktrace.frames}},1228:function(t,e,n){n.d(e,{d:function(){return l}});var r=n(334),i=n(8585),o=n(2226),a=n(4005),s=n(1757),u=n(4194),c=n(8536),p=n(3699),f=n(1988),d=n(7904),h=n(2634),l=function(){function t(e){this.name=t.id,this._installFunc={onerror:v,onunhandledrejection:m},this._options=(0,r.pi)({onerror:!0,onunhandledrejection:!0},e)}return t.prototype.setupOnce=function(){Error.stackTraceLimit=50;var t,e=this._options;for(var n in e){var r=this._installFunc[n];r&&e[n]&&(t=n,d.h&&c.kg.log("Global Handler attached: "+t),r(),this._installFunc[n]=void 0)}},t.id="GlobalHandlers",t}();function v(){(0,a.o)("error",(function(t){var e=(0,r.CR)(_(),2),n=e[0],i=e[1];if(n.getIntegration(l)){var a=t.msg,u=t.url,c=t.line,p=t.column,d=t.error;if(!((0,h.Wz)()||d&&d.__sentry_own_request__)){var v=void 0===d&&(0,s.HD)(a)?function(t,e,n,r){var i=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,o=(0,s.VW)(t)?t.message:t,a="Error",u=o.match(i);u&&(a=u[1],o=u[2]);return g({exception:{values:[{type:a,value:o}]}},e,n,r)}(a,u,c,p):g((0,f.ME)(d||a,void 0,i,!1),u,c,p);v.level=o.z.Error,y(n,d,v,"onerror")}}}))}function m(){(0,a.o)("unhandledrejection",(function(t){var e=(0,r.CR)(_(),2),n=e[0],i=e[1];if(n.getIntegration(l)){var a=t;try{"reason"in t?a=t.reason:"detail"in t&&"reason"in t.detail&&(a=t.detail.reason)}catch(c){}if((0,h.Wz)()||a&&a.__sentry_own_request__)return!0;var u=(0,s.pt)(a)?{exception:{values:[{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(a)}]}}:(0,f.ME)(a,void 0,i,!0);u.level=o.z.Error,y(n,a,u,"onunhandledrejection")}}))}function g(t,e,n,r){var i=t.exception=t.exception||{},o=i.values=i.values||[],a=o[0]=o[0]||{},c=a.stacktrace=a.stacktrace||{},p=c.frames=c.frames||[],f=isNaN(parseInt(r,10))?void 0:r,d=isNaN(parseInt(n,10))?void 0:n,h=(0,s.HD)(e)&&e.length>0?e:(0,u.l)();return 0===p.length&&p.push({colno:f,filename:h,function:"?",in_app:!0,lineno:d}),t}function y(t,e,n,r){(0,p.EG)(n,{handled:!1,type:r}),t.captureEvent(n,{originalException:e})}function _(){var t=(0,i.Gd)(),e=t.getClient();return[t,e&&e.getOptions().attachStacktrace]}},3440:function(t,e,n){n.d(e,{iP:function(){return u}});var r=n(334),i=n(1684),o=n(8585),a=n(1757),s=n(1988),u=function(){function t(e){void 0===e&&(e={}),this.name=t.id,this._key=e.key||"cause",this._limit=e.limit||5}return t.prototype.setupOnce=function(){(0,i.c)((function(e,n){var i=(0,o.Gd)().getIntegration(t);return i?function(t,e,n,i){if(!(n.exception&&n.exception.values&&i&&(0,a.V9)(i.originalException,Error)))return n;var o=c(e,i.originalException,t);return n.exception.values=(0,r.fl)(o,n.exception.values),n}(i._key,i._limit,e,n):e}))},t.id="LinkedErrors",t}();function c(t,e,n,i){if(void 0===i&&(i=[]),!(0,a.V9)(e[n],Error)||i.length+1>=t)return i;var o=(0,s.GJ)(e[n]);return c(t,e[n],n,(0,r.fl)([o],i))}},3399:function(t,e,n){n.d(e,{p:function(){return c}});var r=n(334),i=n(5907),o=n(1995),a=n(9038),s=n(2634),u=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],c=function(){function t(e){this.name=t.id,this._options=(0,r.pi)({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},e)}return t.prototype.setupOnce=function(){var t=(0,i.R)();this._options.setTimeout&&(0,o.hl)(t,"setTimeout",p),this._options.setInterval&&(0,o.hl)(t,"setInterval",p),this._options.requestAnimationFrame&&(0,o.hl)(t,"requestAnimationFrame",f),this._options.XMLHttpRequest&&"XMLHttpRequest"in t&&(0,o.hl)(XMLHttpRequest.prototype,"send",d);var e=this._options.eventTarget;e&&(Array.isArray(e)?e:u).forEach(h)},t.id="TryCatch",t}();function p(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=e[0];return e[0]=(0,s.re)(r,{mechanism:{data:{function:(0,a.$P)(t)},handled:!0,type:"instrument"}}),t.apply(this,e)}}function f(t){return function(e){return t.apply(this,[(0,s.re)(e,{mechanism:{data:{function:"requestAnimationFrame",handler:(0,a.$P)(t)},handled:!0,type:"instrument"}})])}}function d(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=this,i=["onload","onerror","onprogress","onreadystatechange"];return i.forEach((function(t){t in r&&"function"==typeof r[t]&&(0,o.hl)(r,t,(function(e){var n={mechanism:{data:{function:t,handler:(0,a.$P)(e)},handled:!0,type:"instrument"}},r=(0,o.HK)(e);return r&&(n.mechanism.data.handler=(0,a.$P)(r)),(0,s.re)(e,n)}))})),t.apply(this,e)}}function h(t){var e=(0,i.R)(),n=e[t]&&e[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&((0,o.hl)(n,"addEventListener",(function(e){return function(n,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=(0,s.re)(r.handleEvent.bind(r),{mechanism:{data:{function:"handleEvent",handler:(0,a.$P)(r),target:t},handled:!0,type:"instrument"}}))}catch(o){}return e.apply(this,[n,(0,s.re)(r,{mechanism:{data:{function:"addEventListener",handler:(0,a.$P)(r),target:t},handled:!0,type:"instrument"}}),i])}})),(0,o.hl)(n,"removeEventListener",(function(t){return function(e,n,r){var i=n;try{var o=i&&i.__sentry_wrapped__;o&&t.call(this,e,o,r)}catch(a){}return t.call(this,e,i,r)}})))}},9992:function(t,e,n){n.d(e,{Z:function(){return s}});var r=n(334),i=n(1684),o=n(8585),a=(0,n(5907).R)(),s=function(){function t(){this.name=t.id}return t.prototype.setupOnce=function(){(0,i.c)((function(e){if((0,o.Gd)().getIntegration(t)){if(!a.navigator&&!a.location&&!a.document)return e;var n=e.request&&e.request.url||a.location&&a.location.href,i=(a.document||{}).referrer,s=(a.navigator||{}).userAgent,u=(0,r.pi)((0,r.pi)((0,r.pi)({},e.request&&e.request.headers),i&&{Referer:i}),s&&{"User-Agent":s}),c=(0,r.pi)((0,r.pi)({},n&&{url:n}),{headers:u});return(0,r.pi)((0,r.pi)({},e),{request:c})}return e}))},t.id="UserAgent",t}()},2456:function(t,e,n){n.d(e,{S1:function(){return b},yl:function(){return S}});var r=n(1061),i=n(6286),o=n(6853),a=n(8585),s=n(5907),u=n(8536),c=n(7946),p=n(4005),f=n(2314),d=n(7904),h=n(3399),l=n(8356),v=n(1228),m=n(3440),g=n(184),y=n(9992),_=[new r.QD,new i.c,new h.p,new l.O,new v.d,new m.iP,new g.I,new y.Z];function b(t){if(void 0===t&&(t={}),void 0===t.defaultIntegrations&&(t.defaultIntegrations=_),void 0===t.release){var e=(0,s.R)();e.SENTRY_RELEASE&&e.SENTRY_RELEASE.id&&(t.release=e.SENTRY_RELEASE.id)}void 0===t.autoSessionTracking&&(t.autoSessionTracking=!0),void 0===t.sendClientReports&&(t.sendClientReports=!0),(0,o.M)(f.R,t),t.autoSessionTracking&&function(){if(void 0===(0,s.R)().document)return void(d.h&&u.kg.warn("Session tracking in non-browser environment with @sentry/browser is not supported."));var t=(0,a.Gd)();if(!t.captureSession)return;x(t),(0,p.o)("history",(function(t){var e=t.from,n=t.to;void 0!==e&&e!==n&&x((0,a.Gd)())}))}()}function S(t){var e=(0,a.Gd)().getClient();return e?e.flush(t):(d.h&&u.kg.warn("Cannot flush events. No client defined."),(0,c.WD)(!1))}function x(t){t.startSession({ignoreDuration:!0}),t.captureSession()}},2224:function(t,e,n){n.d(e,{s$:function(){return u},Pi:function(){return f},aL:function(){return h},CS:function(){return v},ay:function(){return g}});var r=n(334),i="?";function o(t,e,n,r){var i={filename:t,function:e,in_app:!0};return void 0!==n&&(i.lineno=n),void 0!==r&&(i.colno=r),i}var a=/^\s*at (?:(.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,s=/\((\S*)(?::(\d+))(?::(\d+))\)/,u=[30,function(t){var e=a.exec(t);if(e){if(e[2]&&0===e[2].indexOf("eval")){var n=s.exec(e[2]);n&&(e[2]=n[1],e[3]=n[2],e[4]=n[3])}var u=(0,r.CR)(y(e[1]||i,e[2]),2),c=u[0];return o(u[1],c,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}}],c=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,p=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,f=[50,function(t){var e,n=c.exec(t);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){var a=p.exec(n[3]);a&&(n[1]=n[1]||"eval",n[3]=a[1],n[4]=a[2],n[5]="")}var s=n[3],u=n[1]||i;return u=(e=(0,r.CR)(y(u,s),2))[0],o(s=e[1],u,n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}}],d=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,h=[40,function(t){var e=d.exec(t);return e?o(e[2],e[1]||i,+e[3],e[4]?+e[4]:void 0):void 0}],l=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,v=[10,function(t){var e=l.exec(t);return e?o(e[2],e[3]||i,+e[1]):void 0}],m=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,g=[20,function(t){var e=m.exec(t);return e?o(e[5],e[3]||e[4]||i,+e[1],+e[2]):void 0}],y=function(t,e){var n=-1!==t.indexOf("safari-extension"),r=-1!==t.indexOf("safari-web-extension");return n||r?[-1!==t.indexOf("@")?t.split("@")[0]:i,n?"safari-extension:"+e:"safari-web-extension:"+e]:[t,e]}},6526:function(t,e,n){n.d(e,{d:function(){return y}});var r=n(334),i=n(4911),o=n(6508),a=n(5907),s=n(8963),u=n(8536),c=n(250),p=n(3135),f=n(6894),d=n(8886),h=n(1630),l=n(7904),v=n(5854);function m(t){return"event"===t?"error":t}var g=(0,a.R)(),y=function(){function t(t){var e=this;this.options=t,this._buffer=(0,s.x)(30),this._rateLimits={},this._outcomes={},this._api=(0,i.hd)(t.dsn,t._metadata,t.tunnel),this.url=(0,i.qi)(this._api.dsn),this.options.sendClientReports&&g.document&&g.document.addEventListener("visibilitychange",(function(){"hidden"===g.document.visibilityState&&e._flushOutcomes()}))}return t.prototype.sendEvent=function(t){return this._sendRequest((0,o.nA)(t,this._api),t)},t.prototype.sendSession=function(t){return this._sendRequest((0,o.Qz)(t,this._api),t)},t.prototype.close=function(t){return this._buffer.drain(t)},t.prototype.recordLostEvent=function(t,e){var n;if(this.options.sendClientReports){var r=m(e)+":"+t;l.h&&u.kg.log("Adding outcome: "+r),this._outcomes[r]=(null!=(n=this._outcomes[r])?n:0)+1}},t.prototype._flushOutcomes=function(){if(this.options.sendClientReports){var t=this._outcomes;if(this._outcomes={},Object.keys(t).length){l.h&&u.kg.log("Flushing outcomes:\n"+JSON.stringify(t,null,2));var e=(0,i.Ut)(this._api.dsn,this._api.tunnel),n=Object.keys(t).map((function(e){var n=(0,r.CR)(e.split(":"),2),i=n[0];return{reason:n[1],category:i,quantity:t[e]}})),o=(0,c.y)(n,this._api.tunnel&&(0,p.R)(this._api.dsn));try{(0,v.z)(e,(0,f.V$)(o))}catch(a){l.h&&u.kg.error(a)}}else l.h&&u.kg.log("No outcomes to flush")}},t.prototype._handleResponse=function(t){var e=t.requestType,n=t.response,r=t.headers,i=t.resolve,o=t.reject,a=(0,d.F)(n.status);this._rateLimits=(0,h.WG)(this._rateLimits,r),this._isRateLimited(e)&&l.h&&u.kg.warn("Too many "+e+" requests, backing off until: "+this._disabledUntil(e)),"success"!==a?o(n):i({status:a})},t.prototype._disabledUntil=function(t){var e=m(t);return new Date((0,h.ns)(this._rateLimits,e))},t.prototype._isRateLimited=function(t){var e=m(t);return(0,h.Q)(this._rateLimits,e)},t}()},6149:function(t,e,n){n.d(e,{V:function(){return c}});var r=n(334),i=n(9798),o=n(7946),a=n(4388),s=n(6526),u=n(5854),c=function(t){function e(e,n){void 0===n&&(n=(0,u.x)());var r=t.call(this,e)||this;return r._fetch=n,r}return(0,r.ZT)(e,t),e.prototype._sendRequest=function(t,e){var n=this;if(this._isRateLimited(t.type))return this.recordLostEvent("ratelimit_backoff",t.type),Promise.reject({event:e,type:t.type,reason:"Transport for "+t.type+" requests locked till "+this._disabledUntil(t.type)+" due to too many requests.",status:429});var r={body:t.body,method:"POST",referrerPolicy:(0,i.hv)()?"origin":""};return void 0!==this.options.fetchParameters&&Object.assign(r,this.options.fetchParameters),void 0!==this.options.headers&&(r.headers=this.options.headers),this._buffer.add((function(){return new o.cW((function(e,i){n._fetch(t.url,r).then((function(r){var o={"x-sentry-rate-limits":r.headers.get("X-Sentry-Rate-Limits"),"retry-after":r.headers.get("Retry-After")};n._handleResponse({requestType:t.type,response:r,headers:o,resolve:e,reject:i})})).catch(i)}))})).then(void 0,(function(e){throw e instanceof a.b?n.recordLostEvent("queue_overflow",t.type):n.recordLostEvent("network_error",t.type),e}))},e}(s.d)},1449:function(t,e,n){n.d(e,{k:function(){return a}});var r=n(334),i=n(1518),o=n(5854);function a(t,e){return void 0===e&&(e=(0,o.x)()),(0,i.qv)({bufferSize:t.bufferSize},(function(n){var i=(0,r.pi)({body:n.body,method:"POST",referrerPolicy:"origin"},t.requestOptions);return e(t.url,i).then((function(t){return t.text().then((function(e){return{body:e,headers:{"x-sentry-rate-limits":t.headers.get("X-Sentry-Rate-Limits"),"retry-after":t.headers.get("Retry-After")},reason:t.statusText,statusCode:t.status}}))}))}))}},4827:function(t,e,n){n.d(e,{H:function(){return o}});var r=n(1518),i=n(7946);function o(t){return(0,r.qv)({bufferSize:t.bufferSize},(function(e){return new i.cW((function(n,r){var i=new XMLHttpRequest;for(var o in i.onreadystatechange=function(){if(4===i.readyState){var t={body:i.response,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")},reason:i.statusText,statusCode:i.status};n(t)}},i.open("POST",t.url),t.headers)Object.prototype.hasOwnProperty.call(t.headers,o)&&i.setRequestHeader(o,t.headers[o]);i.send(e.body)}))}))}},5854:function(t,e,n){n.d(e,{x:function(){return p},z:function(){return f}});var r,i=n(5907),o=n(9798),a=n(8536),s=n(3518),u=n(7904),c=(0,i.R)();function p(){if(r)return r;if((0,o.Du)(c.fetch))return r=c.fetch.bind(c);var t=c.document,e=c.fetch;if(t&&"function"==typeof t.createElement)try{var n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n);var i=n.contentWindow;i&&i.fetch&&(e=i.fetch),t.head.removeChild(n)}catch(s){u.h&&a.kg.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",s)}return r=e.bind(c)}function f(t,e){if("[object Navigator]"===Object.prototype.toString.call(c&&c.navigator)&&"function"==typeof c.navigator.sendBeacon)return c.navigator.sendBeacon.bind(c.navigator)(t,e);if((0,o.Ak)()){var n=p();return(0,s.I)(n(t,{body:e,method:"POST",credentials:"omit",keepalive:!0}))}}},6144:function(t,e,n){n.d(e,{w:function(){return a}});var r=n(334),i=n(7946),o=n(4388),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,r.ZT)(e,t),e.prototype._sendRequest=function(t,e){var n=this;return this._isRateLimited(t.type)?(this.recordLostEvent("ratelimit_backoff",t.type),Promise.reject({event:e,type:t.type,reason:"Transport for "+t.type+" requests locked till "+this._disabledUntil(t.type)+" due to too many requests.",status:429})):this._buffer.add((function(){return new i.cW((function(e,r){var i=new XMLHttpRequest;for(var o in i.onreadystatechange=function(){if(4===i.readyState){var o={"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")};n._handleResponse({requestType:t.type,response:i,headers:o,resolve:e,reject:r})}},i.open("POST",t.url),n.options.headers)Object.prototype.hasOwnProperty.call(n.options.headers,o)&&i.setRequestHeader(o,n.options.headers[o]);i.send(t.body)}))})).then(void 0,(function(e){throw e instanceof o.b?n.recordLostEvent("queue_overflow",t.type):n.recordLostEvent("network_error",t.type),e}))},e}(n(6526).d)},334:function(t,e,n){n.d(e,{ZT:function(){return i},pi:function(){return o},CR:function(){return a},fl:function(){return s}});
|
2 |
Â
/*! *****************************************************************************
|
3 |
Â
Copyright (c) Microsoft Corporation.
|
4 |
Â
|
@@ -13,7 +13,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13 |
Â
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
14 |
Â
PERFORMANCE OF THIS SOFTWARE.
|
15 |
Â
***************************************************************************** */
|
16 |
-
var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)};function i(t,e){function __(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}var o=function(){return o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},o.apply(this,arguments)};function a(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function s(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(a(arguments[e]));return t}},4911:function(t,e,n){n.d(e,{hd:function(){return o},qi:function(){return p},Ut:function(){return f},hR:function(){return d}});var r=n(3135),i=n(1995);!function(){function t(t,e,n){void 0===e&&(e={}),this.dsn=t,this._dsnObject=(0,r.v)(t),this.metadata=e,this._tunnel=n}t.prototype.getDsn=function(){return this._dsnObject},t.prototype.forceEnvelope=function(){return!!this._tunnel},t.prototype.getBaseApiEndpoint=function(){return a(this._dsnObject)},t.prototype.getStoreEndpoint=function(){return c(this._dsnObject)},t.prototype.getStoreEndpointWithUrlEncodedAuth=function(){return p(this._dsnObject)},t.prototype.getEnvelopeEndpointWithUrlEncodedAuth=function(){return f(this._dsnObject,this._tunnel)}}();function o(t,e,n){return{initDsn:t,metadata:e||{},dsn:(0,r.v)(t),tunnel:n}}function a(t){var e=t.protocol?t.protocol+":":"",n=t.port?":"+t.port:"";return e+"//"+t.host+n+(t.path?"/"+t.path:"")+"/api/"}function s(t,e){return""+a(t)+t.projectId+"/"+e+"/"}function u(t){return(0,i._j)({sentry_key:t.publicKey,sentry_version:"7"})}function c(t){return s(t,"store")}function p(t){return c(t)+"?"+u(t)}function f(t,e){return e||function(t){return s(t,"envelope")}(t)+"?"+u(t)}function d(t,e){var n=(0,r.v)(t),i=a(n)+"embed/error-page/",o="dsn="+(0,r.R)(n);for(var s in e)if("dsn"!==s)if("user"===s){if(!e.user)continue;e.user.name&&(o+="&name="+encodeURIComponent(e.user.name)),e.user.email&&(o+="&email="+encodeURIComponent(e.user.email))}else o+="&"+encodeURIComponent(s)+"="+encodeURIComponent(e[s]);return i+"?"+o}},9504:function(t,e,n){n.d(e,{N:function(){return p}});var r=n(5733),i=n(8536),o=n(4388),a=n(4911),s=n(428),u=n(6508),c=n(3926),p=function(){function t(t){this._options=t,this._options.dsn||s.h&&i.kg.warn("No DSN provided, backend will not do anything."),this._transport=this._setupTransport()}return t.prototype.eventFromException=function(t,e){throw new o.b("Backend has to implement `eventFromException` method")},t.prototype.eventFromMessage=function(t,e,n){throw new o.b("Backend has to implement `eventFromMessage` method")},t.prototype.sendEvent=function(t){if(this._newTransport&&this._options.dsn&&this._options._experiments&&this._options._experiments.newTransport){var e=(0,a.hd)(this._options.dsn,this._options._metadata,this._options.tunnel),n=(0,u.Mq)(t,e);this._newTransport.send(n).then(null,(function(t){s.h&&i.kg.error("Error while sending event:",t)}))}else this._transport.sendEvent(t).then(null,(function(t){s.h&&i.kg.error("Error while sending event:",t)}))},t.prototype.sendSession=function(t){if(this._transport.sendSession)if(this._newTransport&&this._options.dsn&&this._options._experiments&&this._options._experiments.newTransport){var e=(0,a.hd)(this._options.dsn,this._options._metadata,this._options.tunnel),n=(0,r.CR)((0,u.Q3)(t,e),1)[0];this._newTransport.send(n).then(null,(function(t){s.h&&i.kg.error("Error while sending session:",t)}))}else this._transport.sendSession(t).then(null,(function(t){s.h&&i.kg.error("Error while sending session:",t)}));else s.h&&i.kg.warn("Dropping session because custom transport doesn't implement sendSession")},t.prototype.getTransport=function(){return this._transport},t.prototype._setupTransport=function(){return new c.V},t}()},9849:function(t,e,n){n.d(e,{W:function(){return g}});var r=n(5733),i=n(1684),o=n(3135),a=n(3699),s=n(8536),u=n(1757),c=n(7946),p=n(7790),f=n(8035),d=n(9660),h=n(4388),l=n(428),v=n(8889),m="Not capturing exception because it's already been captured.",g=function(){function t(t,e){this._integrations={},this._numProcessing=0,this._backend=new t(e),this._options=e,e.dsn&&(this._dsn=(0,o.v)(e.dsn))}return t.prototype.captureException=function(t,e,n){var r=this;if(!(0,a.YO)(t)){var i=e&&e.event_id;return this._process(this._getBackend().eventFromException(t,e).then((function(t){return r._captureEvent(t,e,n)})).then((function(t){i=t}))),i}l.h&&s.kg.log(m)},t.prototype.captureMessage=function(t,e,n,r){var i=this,o=n&&n.event_id,a=(0,u.pt)(t)?this._getBackend().eventFromMessage(String(t),e,n):this._getBackend().eventFromException(t,n);return this._process(a.then((function(t){return i._captureEvent(t,n,r)})).then((function(t){o=t}))),o},t.prototype.captureEvent=function(t,e,n){if(!(e&&e.originalException&&(0,a.YO)(e.originalException))){var r=e&&e.event_id;return this._process(this._captureEvent(t,e,n).then((function(t){r=t}))),r}l.h&&s.kg.log(m)},t.prototype.captureSession=function(t){this._isEnabled()?"string"!=typeof t.release?l.h&&s.kg.warn("Discarded session because of missing or non-string release"):(this._sendSession(t),t.update({init:!1})):l.h&&s.kg.warn("SDK not enabled, will not capture session.")},t.prototype.getDsn=function(){return this._dsn},t.prototype.getOptions=function(){return this._options},t.prototype.getTransport=function(){return this._getBackend().getTransport()},t.prototype.flush=function(t){var e=this;return this._isClientDoneProcessing(t).then((function(n){return e.getTransport().close(t).then((function(t){return n&&t}))}))},t.prototype.close=function(t){var e=this;return this.flush(t).then((function(t){return e.getOptions().enabled=!1,t}))},t.prototype.setupIntegrations=function(){this._isEnabled()&&!this._integrations.initialized&&(this._integrations=(0,v.q4)(this._options))},t.prototype.getIntegration=function(t){try{return this._integrations[t.id]||null}catch(e){return l.h&&s.kg.warn("Cannot retrieve integration "+t.id+" from the current Client"),null}},t.prototype._updateSessionFromEvent=function(t,e){var n,i,o=!1,a=!1,s=e.exception&&e.exception.values;if(s){a=!0;try{for(var u=(0,r.XA)(s),c=u.next();!c.done;c=u.next()){var p=c.value.mechanism;if(p&&!1===p.handled){o=!0;break}}}catch(d){n={error:d}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}var f="ok"===t.status;(f&&0===t.errors||f&&o)&&(t.update((0,r.pi)((0,r.pi)({},o&&{status:"crashed"}),{errors:t.errors||Number(a||o)})),this.captureSession(t))},t.prototype._sendSession=function(t){this._getBackend().sendSession(t)},t.prototype._isClientDoneProcessing=function(t){var e=this;return new c.cW((function(n){var r=0,i=setInterval((function(){0==e._numProcessing?(clearInterval(i),n(!0)):(r+=1,t&&r>=t&&(clearInterval(i),n(!1)))}),1)}))},t.prototype._getBackend=function(){return this._backend},t.prototype._isEnabled=function(){return!1!==this.getOptions().enabled&&void 0!==this._dsn},t.prototype._prepareEvent=function(t,e,n){var o=this,s=this.getOptions(),u=s.normalizeDepth,d=void 0===u?3:u,h=s.normalizeMaxBreadth,l=void 0===h?1e3:h,v=(0,r.pi)((0,r.pi)({},t),{event_id:t.event_id||(n&&n.event_id?n.event_id:(0,a.DM)()),timestamp:t.timestamp||(0,p.yW)()});this._applyClientOptions(v),this._applyIntegrationsMetadata(v);var m=e;n&&n.captureContext&&(m=i.s.clone(m).update(n.captureContext));var g=(0,c.WD)(v);return m&&(g=m.applyToEvent(v,n)),g.then((function(t){return t&&(t.sdkProcessingMetadata=(0,r.pi)((0,r.pi)({},t.sdkProcessingMetadata),{normalizeDepth:(0,f.Fv)(d)+" ("+typeof d+")"})),"number"==typeof d&&d>0?o._normalizeEvent(t,d,l):t}))},t.prototype._normalizeEvent=function(t,e,n){if(!t)return null;var i=(0,r.pi)((0,r.pi)((0,r.pi)((0,r.pi)((0,r.pi)({},t),t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map((function(t){return(0,r.pi)((0,r.pi)({},t),t.data&&{data:(0,f.Fv)(t.data,e,n)})}))}),t.user&&{user:(0,f.Fv)(t.user,e,n)}),t.contexts&&{contexts:(0,f.Fv)(t.contexts,e,n)}),t.extra&&{extra:(0,f.Fv)(t.extra,e,n)});return t.contexts&&t.contexts.trace&&(i.contexts.trace=t.contexts.trace),i.sdkProcessingMetadata=(0,r.pi)((0,r.pi)({},i.sdkProcessingMetadata),{baseClientNormalized:!0}),i},t.prototype._applyClientOptions=function(t){var e=this.getOptions(),n=e.environment,r=e.release,i=e.dist,o=e.maxValueLength,a=void 0===o?250:o;"environment"in t||(t.environment="environment"in e?n:"production"),void 0===t.release&&void 0!==r&&(t.release=r),void 0===t.dist&&void 0!==i&&(t.dist=i),t.message&&(t.message=(0,d.$G)(t.message,a));var s=t.exception&&t.exception.values&&t.exception.values[0];s&&s.value&&(s.value=(0,d.$G)(s.value,a));var u=t.request;u&&u.url&&(u.url=(0,d.$G)(u.url,a))},t.prototype._applyIntegrationsMetadata=function(t){var e=Object.keys(this._integrations);e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=(0,r.fl)(t.sdk.integrations||[],e))},t.prototype._sendEvent=function(t){this._getBackend().sendEvent(t)},t.prototype._captureEvent=function(t,e,n){return this._processEvent(t,e,n).then((function(t){return t.event_id}),(function(t){l.h&&s.kg.error(t)}))},t.prototype._processEvent=function(t,e,n){var r=this,i=this.getOptions(),o=i.beforeSend,a=i.sampleRate,s=this.getTransport();function p(t,e){s.recordLostEvent&&s.recordLostEvent(t,e)}if(!this._isEnabled())return(0,c.$2)(new h.b("SDK not enabled, will not capture event."));var f="transaction"===t.type;return!f&&"number"==typeof a&&Math.random()>a?(p("sample_rate","event"),(0,c.$2)(new h.b("Discarding event because it's not included in the random sample (sampling rate = "+a+")"))):this._prepareEvent(t,n,e).then((function(n){if(null===n)throw p("event_processor",t.type||"event"),new h.b("An event processor returned null, will not send event.");return e&&e.data&&!0===e.data.__sentry__||f||!o?n:function(t){var e="`beforeSend` method has to return `null` or a valid event.";if((0,u.J8)(t))return t.then((function(t){if(!(0,u.PO)(t)&&null!==t)throw new h.b(e);return t}),(function(t){throw new h.b("beforeSend rejected with "+t)}));if(!(0,u.PO)(t)&&null!==t)throw new h.b(e);return t}(o(n,e))})).then((function(e){if(null===e)throw p("before_send",t.type||"event"),new h.b("`beforeSend` returned `null`, will not send event.");var i=n&&n.getSession&&n.getSession();return!f&&i&&r._updateSessionFromEvent(i,e),r._sendEvent(e),e})).then(null,(function(t){if(t instanceof h.b)throw t;throw r.captureException(t,{data:{__sentry__:!0},originalException:t}),new h.b("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: "+t)}))},t.prototype._process=function(t){var e=this;this._numProcessing+=1,t.then((function(t){return e._numProcessing-=1,t}),(function(t){return e._numProcessing-=1,t}))},t}()},428:function(t,e,n){n.d(e,{h:function(){return r}});var r="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__},8889:function(t,e,n){n.d(e,{q4:function(){return f}});var r=n(5733),i=n(1684),o=n(8585),a=n(8536),s=n(1995),u=n(428),c=[];function p(t){return t.reduce((function(t,e){return t.every((function(t){return e.name!==t.name}))&&t.push(e),t}),[])}function f(t){var e={};return function(t){var e=t.defaultIntegrations&&(0,r.fl)(t.defaultIntegrations)||[],n=t.integrations,i=(0,r.fl)(p(e));Array.isArray(n)?i=(0,r.fl)(i.filter((function(t){return n.every((function(e){return e.name!==t.name}))})),p(n)):"function"==typeof n&&(i=n(i),i=Array.isArray(i)?i:[i]);var o=i.map((function(t){return t.name})),a="Debug";return-1!==o.indexOf(a)&&i.push.apply(i,(0,r.fl)(i.splice(o.indexOf(a),1))),i}(t).forEach((function(t){e[t.name]=t,function(t){-1===c.indexOf(t.name)&&(t.setupOnce(i.c,o.Gd),c.push(t.name),u.h&&a.kg.log("Integration installed: "+t.name))}(t)})),(0,s.xp)(e,"initialized",!0),e}},6286:function(t,e,n){n.d(e,{c:function(){return o}});var r,i=n(1995),o=function(){function t(){this.name=t.id}return t.prototype.setupOnce=function(){r=Function.prototype.toString,Function.prototype.toString=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=(0,i.HK)(this)||this;return r.apply(n,t)}},t.id="FunctionToString",t}()},1061:function(t,e,n){n.d(e,{QD:function(){return c}});var r=n(5733),i=n(8536),o=n(3699),a=n(9660),s=n(428),u=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],c=function(){function t(e){void 0===e&&(e={}),this._options=e,this.name=t.id}return t.prototype.setupOnce=function(e,n){e((function(e){var c=n();if(c){var p=c.getIntegration(t);if(p){var d=c.getClient(),h=d?d.getOptions():{},l=function(t,e){void 0===t&&(t={});void 0===e&&(e={});return{allowUrls:(0,r.fl)(t.whitelistUrls||[],t.allowUrls||[],e.whitelistUrls||[],e.allowUrls||[]),denyUrls:(0,r.fl)(t.blacklistUrls||[],t.denyUrls||[],e.blacklistUrls||[],e.denyUrls||[]),ignoreErrors:(0,r.fl)(t.ignoreErrors||[],e.ignoreErrors||[],u),ignoreInternal:void 0===t.ignoreInternal||t.ignoreInternal}}(p._options,h);return function(t,e){if(e.ignoreInternal&&function(t){try{return"SentryError"===t.exception.values[0].type}catch(e){}return!1}(t))return s.h&&i.kg.warn("Event dropped due to being internal Sentry Error.\nEvent: "+(0,o.jH)(t)),!0;if(function(t,e){if(!e||!e.length)return!1;return function(t){if(t.message)return[t.message];if(t.exception)try{var e=t.exception.values&&t.exception.values[0]||{},n=e.type,r=void 0===n?"":n,a=e.value,u=void 0===a?"":a;return[""+u,r+": "+u]}catch(c){return s.h&&i.kg.error("Cannot extract message for event "+(0,o.jH)(t)),[]}return[]}(t).some((function(t){return e.some((function(e){return(0,a.zC)(t,e)}))}))}(t,e.ignoreErrors))return s.h&&i.kg.warn("Event dropped due to being matched by `ignoreErrors` option.\nEvent: "+(0,o.jH)(t)),!0;if(function(t,e){if(!e||!e.length)return!1;var n=f(t);return!!n&&e.some((function(t){return(0,a.zC)(n,t)}))}(t,e.denyUrls))return s.h&&i.kg.warn("Event dropped due to being matched by `denyUrls` option.\nEvent: "+(0,o.jH)(t)+".\nUrl: "+f(t)),!0;if(!function(t,e){if(!e||!e.length)return!0;var n=f(t);return!n||e.some((function(t){return(0,a.zC)(n,t)}))}(t,e.allowUrls))return s.h&&i.kg.warn("Event dropped due to not being matched by `allowUrls` option.\nEvent: "+(0,o.jH)(t)+".\nUrl: "+f(t)),!0;return!1}(e,l)?null:e}}return e}))},t.id="InboundFilters",t}();function p(t){void 0===t&&(t=[]);for(var e=t.length-1;e>=0;e--){var n=t[e];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}function f(t){try{if(t.stacktrace)return p(t.stacktrace.frames);var e;try{e=t.exception.values[0].stacktrace.frames}catch(n){}return e?p(e):null}catch(r){return s.h&&i.kg.error("Cannot extract url for event "+(0,o.jH)(t)),null}}},6508:function(t,e,n){n.d(e,{Q3:function(){return p},Qz:function(){return f},Mq:function(){return d},nA:function(){return h}});var r=n(5733),i=n(3135),o=n(6894),a=n(8035),s=n(4911);function u(t){if(t.metadata&&t.metadata.sdk){var e=t.metadata.sdk;return{name:e.name,version:e.version}}}function c(t,e){return e?(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=(0,r.fl)(t.sdk.integrations||[],e.integrations||[]),t.sdk.packages=(0,r.fl)(t.sdk.packages||[],e.packages||[]),t):t}function p(t,e){var n=u(e),a=(0,r.pi)((0,r.pi)({sent_at:(new Date).toISOString()},n&&{sdk:n}),!!e.tunnel&&{dsn:(0,i.R)(e.dsn)}),s="aggregates"in t?"sessions":"session",c=[{type:s},t];return[(0,o.Jd)(a,[c]),s]}function f(t,e){var n=(0,r.CR)(p(t,e),2),i=n[0],a=n[1];return{body:(0,o.V$)(i),type:a,url:(0,s.Ut)(e.dsn,e.tunnel)}}function d(t,e){var n=u(e),a=t.type||"event",s=(t.sdkProcessingMetadata||{}).transactionSampling||{},p=s.method,f=s.rate;c(t,e.metadata.sdk),t.tags=t.tags||{},t.extra=t.extra||{},t.sdkProcessingMetadata&&t.sdkProcessingMetadata.baseClientNormalized||(t.tags.skippedNormalization=!0,t.extra.normalizeDepth=t.sdkProcessingMetadata?t.sdkProcessingMetadata.normalizeDepth:"unset"),delete t.sdkProcessingMetadata;var d=(0,r.pi)((0,r.pi)({event_id:t.event_id,sent_at:(new Date).toISOString()},n&&{sdk:n}),!!e.tunnel&&{dsn:(0,i.R)(e.dsn)}),h=[{type:a,sample_rates:[{id:p,rate:f}]},t];return(0,o.Jd)(d,[h])}function h(t,e){var n,p=u(e),f=t.type||"event",d="transaction"===f||!!e.tunnel,h=(t.sdkProcessingMetadata||{}).transactionSampling||{},l=h.method,v=h.rate;c(t,e.metadata.sdk),t.tags=t.tags||{},t.extra=t.extra||{},t.sdkProcessingMetadata&&t.sdkProcessingMetadata.baseClientNormalized||(t.tags.skippedNormalization=!0,t.extra.normalizeDepth=t.sdkProcessingMetadata?t.sdkProcessingMetadata.normalizeDepth:"unset"),delete t.sdkProcessingMetadata;try{n=JSON.stringify(t)}catch(S){t.tags.JSONStringifyError=!0,t.extra.JSONStringifyError=S;try{n=JSON.stringify((0,a.Fv)(t))}catch(x){var m=x;n=JSON.stringify({message:"JSON.stringify error after renormalization",extra:{message:m.message,stack:m.stack}})}}var g={body:n,type:f,url:d?(0,s.Ut)(e.dsn,e.tunnel):(0,s.qi)(e.dsn)};if(d){var y=(0,r.pi)((0,r.pi)({event_id:t.event_id,sent_at:(new Date).toISOString()},p&&{sdk:p}),!!e.tunnel&&{dsn:(0,i.R)(e.dsn)}),_=[{type:f,sample_rates:[{id:l,rate:v}]},g.body],b=(0,o.Jd)(y,[_]);g.body=(0,o.V$)(b)}return g}},6853:function(t,e,n){n.d(e,{M:function(){return a}});var r=n(8585),i=n(8536),o=n(428);function a(t,e){!0===e.debug&&(o.h?i.kg.enable():console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle."));var n=(0,r.Gd)(),a=n.getScope();a&&a.update(e.initialScope);var s=new t(e);n.bindClient(s)}},1518:function(t,e,n){n.d(e,{qv:function(){return u}});var r=n(8963),i=n(6894),o=n(1630),a=n(7946),s=n(8886);function u(t,e,n){void 0===n&&(n=(0,r.x)(t.bufferSize||30));var u={};return{send:function(t){var r=(0,i.y7)(t),p="event"===r?"error":r,f={category:p,body:(0,i.V$)(t)};return(0,o.Q)(u,p)?(0,a.$2)({status:"rate_limit",reason:c(u,p)}):n.add((function(){return e(f).then((function(t){var e=t.body,n=t.headers,r=t.reason,i=t.statusCode,f=(0,s.F)(i);return n&&(u=(0,o.WG)(u,n)),"success"===f?(0,a.WD)({status:f,reason:r}):(0,a.$2)({status:f,reason:r||e||("rate_limit"===f?c(u,p):"Unknown transport error")})}))}))},flush:function(t){return n.drain(t)}}}function c(t,e){return"Too many "+e+" requests, backing off until: "+new Date((0,o.ns)(t,e)).toISOString()}},3926:function(t,e,n){n.d(e,{V:function(){return i}});var r=n(7946),i=function(){function t(){}return t.prototype.sendEvent=function(t){return(0,r.WD)({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:"skipped"})},t.prototype.close=function(t){return(0,r.WD)(!0)},t}()},1476:function(t,e,n){n.d(e,{J:function(){return r}});var r="6.19.6"},5733:function(t,e,n){n.d(e,{pi:function(){return r},XA:function(){return i},CR:function(){return o},fl:function(){return a}});var r=function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)};function i(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function o(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function a(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(o(arguments[e]));return t}},1299:function(t,e,n){n.d(e,{h:function(){return r}});var r="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__},8585:function(t,e,n){n.d(e,{Xb:function(){return d},Gd:function(){return v}});var r=n(8773),i=n(3699),o=n(7790),a=n(8536),s=n(5907),u=n(7392),c=n(1299),p=n(1684),f=n(2430),d=function(){function t(t,e,n){void 0===e&&(e=new p.s),void 0===n&&(n=4),this._version=n,this._stack=[{}],this.getStackTop().scope=e,t&&this.bindClient(t)}return t.prototype.isOlderThan=function(t){return this._version<t},t.prototype.bindClient=function(t){this.getStackTop().client=t,t&&t.setupIntegrations&&t.setupIntegrations()},t.prototype.pushScope=function(){var t=p.s.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:t}),t},t.prototype.popScope=function(){return!(this.getStack().length<=1)&&!!this.getStack().pop()},t.prototype.withScope=function(t){var e=this.pushScope();try{t(e)}finally{this.popScope()}},t.prototype.getClient=function(){return this.getStackTop().client},t.prototype.getScope=function(){return this.getStackTop().scope},t.prototype.getStack=function(){return this._stack},t.prototype.getStackTop=function(){return this._stack[this._stack.length-1]},t.prototype.captureException=function(t,e){var n=this._lastEventId=e&&e.event_id?e.event_id:(0,i.DM)(),o=e;if(!e){var a=void 0;try{throw new Error("Sentry syntheticException")}catch(t){a=t}o={originalException:t,syntheticException:a}}return this._invokeClient("captureException",t,(0,r.pi)((0,r.pi)({},o),{event_id:n})),n},t.prototype.captureMessage=function(t,e,n){var o=this._lastEventId=n&&n.event_id?n.event_id:(0,i.DM)(),a=n;if(!n){var s=void 0;try{throw new Error(t)}catch(u){s=u}a={originalException:t,syntheticException:s}}return this._invokeClient("captureMessage",t,e,(0,r.pi)((0,r.pi)({},a),{event_id:o})),o},t.prototype.captureEvent=function(t,e){var n=e&&e.event_id?e.event_id:(0,i.DM)();return"transaction"!==t.type&&(this._lastEventId=n),this._invokeClient("captureEvent",t,(0,r.pi)((0,r.pi)({},e),{event_id:n})),n},t.prototype.lastEventId=function(){return this._lastEventId},t.prototype.addBreadcrumb=function(t,e){var n=this.getStackTop(),i=n.scope,s=n.client;if(i&&s){var u=s.getOptions&&s.getOptions()||{},c=u.beforeBreadcrumb,p=void 0===c?null:c,f=u.maxBreadcrumbs,d=void 0===f?100:f;if(!(d<=0)){var h=(0,o.yW)(),l=(0,r.pi)({timestamp:h},t),v=p?(0,a.Cf)((function(){return p(l,e)})):l;null!==v&&i.addBreadcrumb(v,d)}}},t.prototype.setUser=function(t){var e=this.getScope();e&&e.setUser(t)},t.prototype.setTags=function(t){var e=this.getScope();e&&e.setTags(t)},t.prototype.setExtras=function(t){var e=this.getScope();e&&e.setExtras(t)},t.prototype.setTag=function(t,e){var n=this.getScope();n&&n.setTag(t,e)},t.prototype.setExtra=function(t,e){var n=this.getScope();n&&n.setExtra(t,e)},t.prototype.setContext=function(t,e){var n=this.getScope();n&&n.setContext(t,e)},t.prototype.configureScope=function(t){var e=this.getStackTop(),n=e.scope,r=e.client;n&&r&&t(n)},t.prototype.run=function(t){var e=l(this);try{t(this)}finally{l(e)}},t.prototype.getIntegration=function(t){var e=this.getClient();if(!e)return null;try{return e.getIntegration(t)}catch(n){return c.h&&a.kg.warn("Cannot retrieve integration "+t.id+" from the current Hub"),null}},t.prototype.startSpan=function(t){return this._callExtensionMethod("startSpan",t)},t.prototype.startTransaction=function(t,e){return this._callExtensionMethod("startTransaction",t,e)},t.prototype.traceHeaders=function(){return this._callExtensionMethod("traceHeaders")},t.prototype.captureSession=function(t){if(void 0===t&&(t=!1),t)return this.endSession();this._sendSessionUpdate()},t.prototype.endSession=function(){var t=this.getStackTop(),e=t&&t.scope,n=e&&e.getSession();n&&n.close(),this._sendSessionUpdate(),e&&e.setSession()},t.prototype.startSession=function(t){var e=this.getStackTop(),n=e.scope,i=e.client,o=i&&i.getOptions()||{},a=o.release,u=o.environment,c=((0,s.R)().navigator||{}).userAgent,p=new f.z((0,r.pi)((0,r.pi)((0,r.pi)({release:a,environment:u},n&&{user:n.getUser()}),c&&{userAgent:c}),t));if(n){var d=n.getSession&&n.getSession();d&&"ok"===d.status&&d.update({status:"exited"}),this.endSession(),n.setSession(p)}return p},t.prototype._sendSessionUpdate=function(){var t=this.getStackTop(),e=t.scope,n=t.client;if(e){var r=e.getSession&&e.getSession();r&&n&&n.captureSession&&n.captureSession(r)}},t.prototype._invokeClient=function(t){for(var e,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=this.getStackTop(),a=o.scope,s=o.client;s&&s[t]&&(e=s)[t].apply(e,(0,r.fl)(n,[a]))},t.prototype._callExtensionMethod=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=h(),i=r.__SENTRY__;if(i&&i.extensions&&"function"==typeof i.extensions[t])return i.extensions[t].apply(this,e);c.h&&a.kg.warn("Extension method "+t+" couldn't be found, doing nothing.")},t}();function h(){var t=(0,s.R)();return t.__SENTRY__=t.__SENTRY__||{extensions:{},hub:void 0},t}function l(t){var e=h(),n=g(e);return y(e,t),n}function v(){var t=h();return m(t)&&!g(t).isOlderThan(4)||y(t,new d),(0,u.KV)()?function(t){try{var e=h().__SENTRY__,n=e&&e.extensions&&e.extensions.domain&&e.extensions.domain.active;if(!n)return g(t);if(!m(n)||g(n).isOlderThan(4)){var r=g(t).getStackTop();y(n,new d(r.client,p.s.clone(r.scope)))}return g(n)}catch(i){return g(t)}}(t):g(t)}function m(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function g(t){return(0,s.Y)("hub",(function(){return new d}),t)}function y(t,e){return!!t&&((t.__SENTRY__=t.__SENTRY__||{}).hub=e,!0)}},1684:function(t,e,n){n.d(e,{s:function(){return u},c:function(){return p}});var r=n(8773),i=n(1757),o=n(7790),a=n(7946),s=n(5907),u=function(){function t(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}return t.clone=function(e){var n=new t;return e&&(n._breadcrumbs=(0,r.fl)(e._breadcrumbs),n._tags=(0,r.pi)({},e._tags),n._extra=(0,r.pi)({},e._extra),n._contexts=(0,r.pi)({},e._contexts),n._user=e._user,n._level=e._level,n._span=e._span,n._session=e._session,n._transactionName=e._transactionName,n._fingerprint=e._fingerprint,n._eventProcessors=(0,r.fl)(e._eventProcessors),n._requestSession=e._requestSession),n},t.prototype.addScopeListener=function(t){this._scopeListeners.push(t)},t.prototype.addEventProcessor=function(t){return this._eventProcessors.push(t),this},t.prototype.setUser=function(t){return this._user=t||{},this._session&&this._session.update({user:t}),this._notifyScopeListeners(),this},t.prototype.getUser=function(){return this._user},t.prototype.getRequestSession=function(){return this._requestSession},t.prototype.setRequestSession=function(t){return this._requestSession=t,this},t.prototype.setTags=function(t){return this._tags=(0,r.pi)((0,r.pi)({},this._tags),t),this._notifyScopeListeners(),this},t.prototype.setTag=function(t,e){var n;return this._tags=(0,r.pi)((0,r.pi)({},this._tags),((n={})[t]=e,n)),this._notifyScopeListeners(),this},t.prototype.setExtras=function(t){return this._extra=(0,r.pi)((0,r.pi)({},this._extra),t),this._notifyScopeListeners(),this},t.prototype.setExtra=function(t,e){var n;return this._extra=(0,r.pi)((0,r.pi)({},this._extra),((n={})[t]=e,n)),this._notifyScopeListeners(),this},t.prototype.setFingerprint=function(t){return this._fingerprint=t,this._notifyScopeListeners(),this},t.prototype.setLevel=function(t){return this._level=t,this._notifyScopeListeners(),this},t.prototype.setTransactionName=function(t){return this._transactionName=t,this._notifyScopeListeners(),this},t.prototype.setTransaction=function(t){return this.setTransactionName(t)},t.prototype.setContext=function(t,e){var n;return null===e?delete this._contexts[t]:this._contexts=(0,r.pi)((0,r.pi)({},this._contexts),((n={})[t]=e,n)),this._notifyScopeListeners(),this},t.prototype.setSpan=function(t){return this._span=t,this._notifyScopeListeners(),this},t.prototype.getSpan=function(){return this._span},t.prototype.getTransaction=function(){var t=this.getSpan();return t&&t.transaction},t.prototype.setSession=function(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this},t.prototype.getSession=function(){return this._session},t.prototype.update=function(e){if(!e)return this;if("function"==typeof e){var n=e(this);return n instanceof t?n:this}return e instanceof t?(this._tags=(0,r.pi)((0,r.pi)({},this._tags),e._tags),this._extra=(0,r.pi)((0,r.pi)({},this._extra),e._extra),this._contexts=(0,r.pi)((0,r.pi)({},this._contexts),e._contexts),e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession)):(0,i.PO)(e)&&(e=e,this._tags=(0,r.pi)((0,r.pi)({},this._tags),e.tags),this._extra=(0,r.pi)((0,r.pi)({},this._extra),e.extra),this._contexts=(0,r.pi)((0,r.pi)({},this._contexts),e.contexts),e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession)),this},t.prototype.clear=function(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this},t.prototype.addBreadcrumb=function(t,e){var n="number"==typeof e?Math.min(e,100):100;if(n<=0)return this;var i=(0,r.pi)({timestamp:(0,o.yW)()},t);return this._breadcrumbs=(0,r.fl)(this._breadcrumbs,[i]).slice(-n),this._notifyScopeListeners(),this},t.prototype.clearBreadcrumbs=function(){return this._breadcrumbs=[],this._notifyScopeListeners(),this},t.prototype.applyToEvent=function(t,e){if(this._extra&&Object.keys(this._extra).length&&(t.extra=(0,r.pi)((0,r.pi)({},this._extra),t.extra)),this._tags&&Object.keys(this._tags).length&&(t.tags=(0,r.pi)((0,r.pi)({},this._tags),t.tags)),this._user&&Object.keys(this._user).length&&(t.user=(0,r.pi)((0,r.pi)({},this._user),t.user)),this._contexts&&Object.keys(this._contexts).length&&(t.contexts=(0,r.pi)((0,r.pi)({},this._contexts),t.contexts)),this._level&&(t.level=this._level),this._transactionName&&(t.transaction=this._transactionName),this._span){t.contexts=(0,r.pi)({trace:this._span.getTraceContext()},t.contexts);var n=this._span.transaction&&this._span.transaction.name;n&&(t.tags=(0,r.pi)({transaction:n},t.tags))}return this._applyFingerprint(t),t.breadcrumbs=(0,r.fl)(t.breadcrumbs||[],this._breadcrumbs),t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,t.sdkProcessingMetadata=this._sdkProcessingMetadata,this._notifyEventProcessors((0,r.fl)(c(),this._eventProcessors),t,e)},t.prototype.setSDKProcessingMetadata=function(t){return this._sdkProcessingMetadata=(0,r.pi)((0,r.pi)({},this._sdkProcessingMetadata),t),this},t.prototype._notifyEventProcessors=function(t,e,n,o){var s=this;return void 0===o&&(o=0),new a.cW((function(a,u){var c=t[o];if(null===e||"function"!=typeof c)a(e);else{var p=c((0,r.pi)({},e),n);(0,i.J8)(p)?p.then((function(e){return s._notifyEventProcessors(t,e,n,o+1).then(a)})).then(null,u):s._notifyEventProcessors(t,p,n,o+1).then(a).then(null,u)}}))},t.prototype._notifyScopeListeners=function(){var t=this;this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((function(e){e(t)})),this._notifyingListeners=!1)},t.prototype._applyFingerprint=function(t){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],this._fingerprint&&(t.fingerprint=t.fingerprint.concat(this._fingerprint)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint},t}();function c(){return(0,s.Y)("globalEventProcessors",(function(){return[]}))}function p(t){c().push(t)}},2430:function(t,e,n){n.d(e,{z:function(){return a}});var r=n(3699),i=n(7790),o=n(1995),a=function(){function t(t){this.errors=0,this.sid=(0,r.DM)(),this.duration=0,this.status="ok",this.init=!0,this.ignoreDuration=!1;var e=(0,i.ph)();this.timestamp=e,this.started=e,t&&this.update(t)}return t.prototype.update=function(t){if(void 0===t&&(t={}),t.user&&(!this.ipAddress&&t.user.ip_address&&(this.ipAddress=t.user.ip_address),this.did||t.did||(this.did=t.user.id||t.user.email||t.user.username)),this.timestamp=t.timestamp||(0,i.ph)(),t.ignoreDuration&&(this.ignoreDuration=t.ignoreDuration),t.sid&&(this.sid=32===t.sid.length?t.sid:(0,r.DM)()),void 0!==t.init&&(this.init=t.init),!this.did&&t.did&&(this.did=""+t.did),"number"==typeof t.started&&(this.started=t.started),this.ignoreDuration)this.duration=void 0;else if("number"==typeof t.duration)this.duration=t.duration;else{var e=this.timestamp-this.started;this.duration=e>=0?e:0}t.release&&(this.release=t.release),t.environment&&(this.environment=t.environment),!this.ipAddress&&t.ipAddress&&(this.ipAddress=t.ipAddress),!this.userAgent&&t.userAgent&&(this.userAgent=t.userAgent),"number"==typeof t.errors&&(this.errors=t.errors),t.status&&(this.status=t.status)},t.prototype.close=function(t){t?this.update({status:t}):"ok"===this.status?this.update({status:"exited"}):this.update()},t.prototype.toJSON=function(){return(0,o.Jr)({sid:""+this.sid,init:this.init,started:new Date(1e3*this.started).toISOString(),timestamp:new Date(1e3*this.timestamp).toISOString(),status:this.status,errors:this.errors,did:"number"==typeof this.did||"string"==typeof this.did?""+this.did:void 0,duration:this.duration,attrs:{release:this.release,environment:this.environment,ip_address:this.ipAddress,user_agent:this.userAgent}})},t}()},8773:function(t,e,n){n.d(e,{pi:function(){return r},fl:function(){return o}});var r=function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)};function i(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function o(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(i(arguments[e]));return t}},4678:function(t,e,n){n.d(e,{Tb:function(){return a},$e:function(){return s}});var r=n(5559),i=n(8585);function o(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var o=(0,i.Gd)();if(o&&o[t])return o[t].apply(o,(0,r.fl)(e));throw new Error("No hub defined or "+t+" was not found on the hub, please open a bug report.")}function a(t,e){return o("captureException",t,{captureContext:e,originalException:t,syntheticException:new Error("Sentry syntheticException")})}function s(t){o("withScope",t)}},5559:function(t,e,n){n.d(e,{fl:function(){return i}});function r(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function i(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(r(arguments[e]));return t}},40:function(t,e,n){n.d(e,{j:function(){return c}});var r=n(5907),i=n(8536),o=n(50),a=n(853),s=n(2517),u=(0,r.R)();function c(){u&&u.document?u.document.addEventListener("visibilitychange",(function(){var t=(0,s.x1)();if(u.document.hidden&&t){var e="cancelled";a.h&&i.kg.log("[Tracing] Transaction: cancelled -> since tab moved to the background, op: "+t.op),t.status||t.setStatus(e),t.setTag("visibilitychange","document.hidden"),t.setTag(o.d,o.x[2]),t.finish()}})):a.h&&i.kg.warn("[Tracing] Could not set up background tab detection due to lack of global document")}},4476:function(t,e,n){n.d(e,{gE:function(){return m}});var r=n(2481),i=n(8536),o=n(5907),a=n(853),s=n(1626),u=n(564),c=n(2517),p=n(9691),f=n(40),d=n(3800),h=n(6958),l=n(9866),v=(0,r.pi)({idleTimeout:u.nT,markBackgroundTransactions:!0,maxTransactionDuration:600,routingInstrumentation:l.R,startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0},h.k3),m=function(){function t(e){this.name=t.id,this._configuredIdleTimeout=void 0;var n=h.k3.tracingOrigins;e&&(this._configuredIdleTimeout=e.idleTimeout,e.tracingOrigins&&Array.isArray(e.tracingOrigins)&&0!==e.tracingOrigins.length?n=e.tracingOrigins:a.h&&(this._emitOptionsWarning=!0)),this.options=(0,r.pi)((0,r.pi)((0,r.pi)({},v),e),{tracingOrigins:n});var i=this.options._metricOptions;this._metrics=new d.zE(i&&i._reportAllChanges)}return t.prototype.setupOnce=function(t,e){var n=this;this._getCurrentHub=e,this._emitOptionsWarning&&(a.h&&i.kg.warn("[Tracing] You need to define `tracingOrigins` in the options. Set an array of urls or patterns to trace."),a.h&&i.kg.warn("[Tracing] We added a reasonable default for you: "+h.k3.tracingOrigins));var r=this.options,o=r.routingInstrumentation,s=r.startTransactionOnLocationChange,u=r.startTransactionOnPageLoad,c=r.markBackgroundTransactions,p=r.traceFetch,d=r.traceXHR,l=r.tracingOrigins,v=r.shouldCreateSpanForRequest;o((function(t){return n._createRouteTransaction(t)}),u,s),c&&(0,f.j)(),(0,h.L7)({traceFetch:p,traceXHR:d,tracingOrigins:l,shouldCreateSpanForRequest:v})},t.prototype._createRouteTransaction=function(t){var e=this;if(this._getCurrentHub){var n=this.options,u=n.beforeNavigate,f=n.idleTimeout,d=n.maxTransactionDuration,h="pageload"===t.op?function(){var t=(e="sentry-trace",n=(0,o.R)().document.querySelector("meta[name="+e+"]"),n?n.getAttribute("content"):null);var e,n;if(t)return(0,p.q)(t);return}():void 0,l=(0,r.pi)((0,r.pi)((0,r.pi)({},t),h),{trimEnd:!0}),v="function"==typeof u?u(l):l,m=void 0===v?(0,r.pi)((0,r.pi)({},l),{sampled:!1}):v;!1===m.sampled&&a.h&&i.kg.log("[Tracing] Will not send "+m.op+" transaction because of beforeNavigate."),a.h&&i.kg.log("[Tracing] Starting "+m.op+" transaction on scope");var g=this._getCurrentHub(),y=(0,o.R)().location,_=(0,s.lb)(g,m,f,!0,{location:y});return _.registerBeforeFinishCallback((function(t,n){e._metrics.addPerformanceEntries(t),function(t,e,n){var r=n-e.startTimestamp;n&&(r>t||r<0)&&(e.setStatus("deadline_exceeded"),e.setTag("maxTransactionDurationExceeded","true"))}((0,c.WB)(d),t,n)})),_.setTag("idleTimeout",this._configuredIdleTimeout),_}a.h&&i.kg.warn("[Tracing] Did not create "+t.op+" transaction because _getCurrentHub is invalid.")},t.id="BrowserTracing",t}()},3800:function(t,e,n){n.d(e,{zE:function(){return m}});var r=n(2481),i=n(5907),o=n(7392),a=n(7790),s=n(8536),u=n(4194),c=n(853),p=n(2517),f=n(1604),d=n(63),h=n(165),l=n(6576),v=(0,i.R)(),m=function(){function t(t){void 0===t&&(t=!1),this._reportAllChanges=t,this._measurements={},this._performanceCursor=0,!(0,o.KV)()&&v&&v.performance&&v.document&&(v.performance.mark&&v.performance.mark("sentry-tracing-init"),this._trackCLS(),this._trackLCP(),this._trackFID())}return t.prototype.addPerformanceEntries=function(t){var e=this;if(v&&v.performance&&v.performance.getEntries&&a.Z1){c.h&&s.kg.log("[Tracing] Adding & adjusting spans using Performance API");var n,r,i=(0,p.XL)(a.Z1);if(v.performance.getEntries().slice(this._performanceCursor).forEach((function(o){var a=(0,p.XL)(o.startTime),u=(0,p.XL)(o.duration);if(!("navigation"===t.op&&i+a<t.startTimestamp))switch(o.entryType){case"navigation":!function(t,e,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach((function(r){g(t,e,r,n)})),g(t,e,"secureConnection",n,"TLS/SSL","connectEnd"),g(t,e,"fetch",n,"cache","domainLookupStart"),g(t,e,"domainLookup",n,"DNS"),function(t,e,n){y(t,{op:"browser",description:"request",startTimestamp:n+(0,p.XL)(e.requestStart),endTimestamp:n+(0,p.XL)(e.responseEnd)}),y(t,{op:"browser",description:"response",startTimestamp:n+(0,p.XL)(e.responseStart),endTimestamp:n+(0,p.XL)(e.responseEnd)})}(t,e,n)}(t,o,i),n=i+(0,p.XL)(o.responseStart),r=i+(0,p.XL)(o.requestStart);break;case"mark":case"paint":case"measure":var f=function(t,e,n,r,i){var o=i+n,a=o+r;return y(t,{description:e.name,endTimestamp:a,op:e.entryType,startTimestamp:o}),o}(t,o,a,u,i),d=(0,l.Y)(),h=o.startTime<d.firstHiddenTime;"first-paint"===o.name&&h&&(c.h&&s.kg.log("[Measurements] Adding FP"),e._measurements.fp={value:o.startTime},e._measurements["mark.fp"]={value:f}),"first-contentful-paint"===o.name&&h&&(c.h&&s.kg.log("[Measurements] Adding FCP"),e._measurements.fcp={value:o.startTime},e._measurements["mark.fcp"]={value:f});break;case"resource":var m=o.name.replace(v.location.origin,"");!function(t,e,n,r,i,o){if("xmlhttprequest"===e.initiatorType||"fetch"===e.initiatorType)return;var a={};"transferSize"in e&&(a["Transfer Size"]=e.transferSize);"encodedBodySize"in e&&(a["Encoded Body Size"]=e.encodedBodySize);"decodedBodySize"in e&&(a["Decoded Body Size"]=e.decodedBodySize);var s=o+r;y(t,{description:n,endTimestamp:s+i,op:e.initiatorType?"resource."+e.initiatorType:"resource",startTimestamp:s,data:a})}(t,o,m,a,u,i)}})),this._performanceCursor=Math.max(performance.getEntries().length-1,0),this._trackNavigator(t),"pageload"===t.op){var o=(0,p.XL)(a.Z1);"number"==typeof n&&(c.h&&s.kg.log("[Measurements] Adding TTFB"),this._measurements.ttfb={value:1e3*(n-t.startTimestamp)},"number"==typeof r&&r<=n&&(this._measurements["ttfb.requestTime"]={value:1e3*(n-r)})),["fcp","fp","lcp"].forEach((function(n){if(e._measurements[n]&&!(o>=t.startTimestamp)){var r=e._measurements[n].value,i=o+(0,p.XL)(r),a=Math.abs(1e3*(i-t.startTimestamp)),u=a-r;c.h&&s.kg.log("[Measurements] Normalized "+n+" from "+r+" to "+a+" ("+u+")"),e._measurements[n].value=a}})),this._measurements["mark.fid"]&&this._measurements.fid&&y(t,{description:"first input delay",endTimestamp:this._measurements["mark.fid"].value+(0,p.XL)(this._measurements.fid.value),op:"web.vitals",startTimestamp:this._measurements["mark.fid"].value}),"fcp"in this._measurements||delete this._measurements.cls,t.setMeasurements(this._measurements),function(t,e,n){e&&(c.h&&s.kg.log("[Measurements] Adding LCP Data"),e.element&&t.setTag("lcp.element",(0,u.R)(e.element)),e.id&&t.setTag("lcp.id",e.id),e.url&&t.setTag("lcp.url",e.url.trim().slice(0,200)),t.setTag("lcp.size",e.size));n&&n.sources&&(c.h&&s.kg.log("[Measurements] Adding CLS Data"),n.sources.forEach((function(e,n){return t.setTag("cls.source."+(n+1),(0,u.R)(e.node))})))}(t,this._lcpEntry,this._clsEntry),t.setTag("sentry_reportAllChanges",this._reportAllChanges)}}},t.prototype._trackNavigator=function(t){var e=v.navigator;if(e){var n=e.connection;n&&(n.effectiveType&&t.setTag("effectiveConnectionType",n.effectiveType),n.type&&t.setTag("connectionType",n.type),_(n.rtt)&&(this._measurements["connection.rtt"]={value:n.rtt}),_(n.downlink)&&(this._measurements["connection.downlink"]={value:n.downlink})),_(e.deviceMemory)&&t.setTag("deviceMemory",String(e.deviceMemory)),_(e.hardwareConcurrency)&&t.setTag("hardwareConcurrency",String(e.hardwareConcurrency))}},t.prototype._trackCLS=function(){var t=this;(0,f.k)((function(e){var n=e.entries.pop();n&&(c.h&&s.kg.log("[Measurements] Adding CLS"),t._measurements.cls={value:e.value},t._clsEntry=n)}))},t.prototype._trackLCP=function(){var t=this;(0,h.T)((function(e){var n=e.entries.pop();if(n){var r=(0,p.XL)(a.Z1),i=(0,p.XL)(n.startTime);c.h&&s.kg.log("[Measurements] Adding LCP"),t._measurements.lcp={value:e.value},t._measurements["mark.lcp"]={value:r+i},t._lcpEntry=n}}),this._reportAllChanges)},t.prototype._trackFID=function(){var t=this;(0,d.T)((function(e){var n=e.entries.pop();if(n){var r=(0,p.XL)(a.Z1),i=(0,p.XL)(n.startTime);c.h&&s.kg.log("[Measurements] Adding FID"),t._measurements.fid={value:e.value},t._measurements["mark.fid"]={value:r+i}}}))},t}();function g(t,e,n,r,i,o){var a=o?e[o]:e[n+"End"],s=e[n+"Start"];s&&a&&y(t,{op:"browser",description:null!=i?i:n,startTimestamp:r+(0,p.XL)(s),endTimestamp:r+(0,p.XL)(a)})}function y(t,e){var n=e.startTimestamp,i=(0,r._T)(e,["startTimestamp"]);return n&&t.startTimestamp>n&&(t.startTimestamp=n),t.startChild((0,r.pi)({startTimestamp:n},i))}function _(t){return"number"==typeof t&&isFinite(t)}},6958:function(t,e,n){n.d(e,{k3:function(){return u},L7:function(){return c}});var r=n(2481),i=n(9660),o=n(4005),a=n(1757),s=n(2517),u={traceFetch:!0,traceXHR:!0,tracingOrigins:["localhost",/^\//]};function c(t){var e=(0,r.pi)((0,r.pi)({},u),t),n=e.traceFetch,c=e.traceXHR,p=e.tracingOrigins,f=e.shouldCreateSpanForRequest,d={},h=function(t){if(d[t])return d[t];var e=p;return d[t]=e.some((function(e){return(0,i.zC)(t,e)}))&&!(0,i.zC)(t,"sentry_key"),d[t]},l=h;"function"==typeof f&&(l=function(t){return h(t)&&f(t)});var v={};n&&(0,o.o)("fetch",(function(t){!function(t,e,n){if(!(0,s.zu)()||!t.fetchData||!e(t.fetchData.url))return;if(t.endTimestamp){var i=t.fetchData.__span;if(!i)return;return void((u=n[i])&&(t.response?u.setHttpStatus(t.response.status):t.error&&u.setStatus("internal_error"),u.finish(),delete n[i]))}var o=(0,s.x1)();if(o){var u=o.startChild({data:(0,r.pi)((0,r.pi)({},t.fetchData),{type:"fetch"}),description:t.fetchData.method+" "+t.fetchData.url,op:"http.client"});t.fetchData.__span=u.spanId,n[u.spanId]=u;var c=t.args[0]=t.args[0],p=t.args[1]=t.args[1]||{},f=p.headers;(0,a.V9)(c,Request)&&(f=c.headers),f?"function"==typeof f.append?f.append("sentry-trace",u.toTraceparent()):f=Array.isArray(f)?(0,r.fl)(f,[["sentry-trace",u.toTraceparent()]]):(0,r.pi)((0,r.pi)({},f),{"sentry-trace":u.toTraceparent()}):f={"sentry-trace":u.toTraceparent()},p.headers=f}}(t,l,v)})),c&&(0,o.o)("xhr",(function(t){!function(t,e,n){if(!(0,s.zu)()||t.xhr&&t.xhr.__sentry_own_request__||!(t.xhr&&t.xhr.__sentry_xhr__&&e(t.xhr.__sentry_xhr__.url)))return;var i=t.xhr.__sentry_xhr__;if(t.endTimestamp){var o=t.xhr.__sentry_xhr_span_id__;if(!o)return;return void((u=n[o])&&(u.setHttpStatus(i.status_code),u.finish(),delete n[o]))}var a=(0,s.x1)();if(a){var u=a.startChild({data:(0,r.pi)((0,r.pi)({},i.data),{type:"xhr",method:i.method,url:i.url}),description:i.method+" "+i.url,op:"http.client"});if(t.xhr.__sentry_xhr_span_id__=u.spanId,n[t.xhr.__sentry_xhr_span_id__]=u,t.xhr.setRequestHeader)try{t.xhr.setRequestHeader("sentry-trace",u.toTraceparent())}catch(c){}}}(t,l,v)}))}},9866:function(t,e,n){n.d(e,{R:function(){return u}});var r=n(5907),i=n(8536),o=n(4005),a=n(853),s=(0,r.R)();function u(t,e,n){if(void 0===e&&(e=!0),void 0===n&&(n=!0),s&&s.location){var r,u=s.location.href;e&&(r=t({name:s.location.pathname,op:"pageload"})),n&&(0,o.o)("history",(function(e){var n=e.to,o=e.from;void 0===o&&u&&-1!==u.indexOf(n)?u=void 0:o!==n&&(u=void 0,r&&(a.h&&i.kg.log("[Tracing] Finishing current transaction with op: "+r.op),r.finish()),r=t({name:s.location.pathname,op:"navigation"}))}))}else a.h&&i.kg.warn("Could not initialize routing instrumentation due to invalid location")}},1604:function(t,e,n){n.d(e,{k:function(){return s}});var r=n(7498),i=n(4402),o=n(7483),a=n(391),s=function(t,e){var n,s=(0,i.I)("CLS",0),u=0,c=[],p=function(t){if(t&&!t.hadRecentInput){var e=c[0],r=c[c.length-1];u&&0!==c.length&&t.startTime-r.startTime<1e3&&t.startTime-e.startTime<5e3?(u+=t.value,c.push(t)):(u=t.value,c=[t]),u>s.value&&(s.value=u,s.entries=c,n&&n())}},f=(0,o.N)("layout-shift",p);f&&(n=(0,r._)(t,s,e),(0,a.u)((function(){f.takeRecords().map(p),n(!0)})))}},63:function(t,e,n){n.d(e,{T:function(){return u}});var r=n(7498),i=n(6576),o=n(4402),a=n(7483),s=n(391),u=function(t,e){var n,u=(0,i.Y)(),c=(0,o.I)("FID"),p=function(t){n&&t.startTime<u.firstHiddenTime&&(c.value=t.processingStart-t.startTime,c.entries.push(t),n(!0))},f=(0,a.N)("first-input",p);f&&(n=(0,r._)(t,c,e),(0,s.u)((function(){f.takeRecords().map(p),f.disconnect()}),!0))}},165:function(t,e,n){n.d(e,{T:function(){return c}});var r=n(7498),i=n(6576),o=n(4402),a=n(7483),s=n(391),u={},c=function(t,e){var n,c=(0,i.Y)(),p=(0,o.I)("LCP"),f=function(t){var e=t.startTime;e<c.firstHiddenTime&&(p.value=e,p.entries.push(t)),n&&n()},d=(0,a.N)("largest-contentful-paint",f);if(d){n=(0,r._)(t,p,e);var h=function(){u[p.id]||(d.takeRecords().map(f),d.disconnect(),u[p.id]=!0,n(!0))};["keydown","click"].forEach((function(t){addEventListener(t,h,{once:!0,capture:!0})})),(0,s.u)(h,!0)}}},7498:function(t,e,n){n.d(e,{_:function(){return r}});var r=function(t,e,n){var r;return function(i){e.value>=0&&(i||n)&&(e.delta=e.value-(r||0),(e.delta||void 0===r)&&(r=e.value,t(e)))}}},6864:function(t,e,n){n.d(e,{f:function(){return r}});var r=function(){return"v2-"+Date.now()+"-"+(Math.floor(8999999999999*Math.random())+1e12)}},6576:function(t,e,n){n.d(e,{Y:function(){return a}});var r=n(5907),i=n(391),o=-1,a=function(){return o<0&&(o="hidden"===(0,r.R)().document.visibilityState?0:1/0,(0,i.u)((function(t){var e=t.timeStamp;o=e}),!0)),{get firstHiddenTime(){return o}}}},4402:function(t,e,n){n.d(e,{I:function(){return i}});var r=n(6864),i=function(t,e){return{name:t,value:null!=e?e:-1,delta:0,entries:[],id:(0,r.f)()}}},7483:function(t,e,n){n.d(e,{N:function(){return r}});var r=function(t,e){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){if("first-input"===t&&!("PerformanceEventTiming"in self))return;var n=new PerformanceObserver((function(t){return t.getEntries().map(e)}));return n.observe({type:t,buffered:!0}),n}}catch(r){}}},391:function(t,e,n){n.d(e,{u:function(){return i}});var r=n(5907),i=function(t,e){var n=function(i){"pagehide"!==i.type&&"hidden"!==(0,r.R)().document.visibilityState||(t(i),e&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)}},50:function(t,e,n){n.d(e,{d:function(){return r},x:function(){return i}});var r="finishReason",i=["heartbeatFailed","idleTimeout","documentHidden"]},853:function(t,e,n){n.d(e,{h:function(){return r}});var r="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__},1626:function(t,e,n){n.d(e,{lb:function(){return p}});var r=n(2481),i=n(8536),o=n(1757),a=n(853),s=n(564),u=n(2517);function c(t,e,n){return(0,u.zu)(e)?void 0!==t.sampled?(t.setMetadata({transactionSampling:{method:"explicitly_set"}}),t):("function"==typeof e.tracesSampler?(r=e.tracesSampler(n),t.setMetadata({transactionSampling:{method:"client_sampler",rate:Number(r)}})):void 0!==n.parentSampled?(r=n.parentSampled,t.setMetadata({transactionSampling:{method:"inheritance"}})):(r=e.tracesSampleRate,t.setMetadata({transactionSampling:{method:"client_rate",rate:Number(r)}})),function(t){if((0,o.i2)(t)||"number"!=typeof t&&"boolean"!=typeof t)return a.h&&i.kg.warn("[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got "+JSON.stringify(t)+" of type "+JSON.stringify(typeof t)+"."),!1;if(t<0||t>1)return a.h&&i.kg.warn("[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got "+t+"."),!1;return!0}(r)?r?(t.sampled=Math.random()<r,t.sampled?(a.h&&i.kg.log("[Tracing] starting "+t.op+" transaction - "+t.name),t):(a.h&&i.kg.log("[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = "+Number(r)+")"),t)):(a.h&&i.kg.log("[Tracing] Discarding transaction because "+("function"==typeof e.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),t.sampled=!1,t):(a.h&&i.kg.warn("[Tracing] Discarding transaction because of invalid sample rate."),t.sampled=!1,t)):(t.sampled=!1,t);var r}function p(t,e,n,i,o){var a=t.getClient(),u=a&&a.getOptions()||{},p=new s.io(e,t,n,i);return(p=c(p,u,(0,r.pi)({parentSampled:e.parentSampled,transactionContext:e},o))).sampled&&p.initSpanRecorder(u._experiments&&u._experiments.maxSpans),p}t=n.hmd(t)},564:function(t,e,n){n.d(e,{nT:function(){return p},io:function(){return d}});var r=n(2481),i=n(7790),o=n(8536),a=n(50),s=n(853),u=n(8207),c=n(8235),p=1e3,f=function(t){function e(e,n,r,i){void 0===r&&(r="");var o=t.call(this,i)||this;return o._pushActivity=e,o._popActivity=n,o.transactionSpanId=r,o}return(0,r.ZT)(e,t),e.prototype.add=function(e){var n=this;e.spanId!==this.transactionSpanId&&(e.finish=function(t){e.endTimestamp="number"==typeof t?t:(0,i._I)(),n._popActivity(e.spanId)},void 0===e.endTimestamp&&this._pushActivity(e.spanId)),t.prototype.add.call(this,e)},e}(u.gB),d=function(t){function e(e,n,r,i){void 0===r&&(r=p),void 0===i&&(i=!1);var a=t.call(this,e,n)||this;return a._idleHub=n,a._idleTimeout=r,a._onScope=i,a.activities={},a._heartbeatCounter=0,a._finished=!1,a._beforeFinishCallbacks=[],n&&i&&(h(n),s.h&&o.kg.log("Setting idle transaction on scope. Span ID: "+a.spanId),n.configureScope((function(t){return t.setSpan(a)}))),a._initTimeout=setTimeout((function(){a._finished||a.finish()}),a._idleTimeout),a}return(0,r.ZT)(e,t),e.prototype.finish=function(e){var n,a,u=this;if(void 0===e&&(e=(0,i._I)()),this._finished=!0,this.activities={},this.spanRecorder){s.h&&o.kg.log("[Tracing] finishing IdleTransaction",new Date(1e3*e).toISOString(),this.op);try{for(var c=(0,r.XA)(this._beforeFinishCallbacks),p=c.next();!p.done;p=c.next()){(0,p.value)(this,e)}}catch(f){n={error:f}}finally{try{p&&!p.done&&(a=c.return)&&a.call(c)}finally{if(n)throw n.error}}this.spanRecorder.spans=this.spanRecorder.spans.filter((function(t){if(t.spanId===u.spanId)return!0;t.endTimestamp||(t.endTimestamp=e,t.setStatus("cancelled"),s.h&&o.kg.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(t,void 0,2)));var n=t.startTimestamp<e;return n||s.h&&o.kg.log("[Tracing] discarding Span since it happened after Transaction was finished",JSON.stringify(t,void 0,2)),n})),s.h&&o.kg.log("[Tracing] flushing IdleTransaction")}else s.h&&o.kg.log("[Tracing] No active IdleTransaction");return this._onScope&&h(this._idleHub),t.prototype.finish.call(this,e)},e.prototype.registerBeforeFinishCallback=function(t){this._beforeFinishCallbacks.push(t)},e.prototype.initSpanRecorder=function(t){var e=this;if(!this.spanRecorder){this.spanRecorder=new f((function(t){e._finished||e._pushActivity(t)}),(function(t){e._finished||e._popActivity(t)}),this.spanId,t),s.h&&o.kg.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)},e.prototype._pushActivity=function(t){this._initTimeout&&(clearTimeout(this._initTimeout),this._initTimeout=void 0),s.h&&o.kg.log("[Tracing] pushActivity: "+t),this.activities[t]=!0,s.h&&o.kg.log("[Tracing] new activities count",Object.keys(this.activities).length)},e.prototype._popActivity=function(t){var e=this;if(this.activities[t]&&(s.h&&o.kg.log("[Tracing] popActivity "+t),delete this.activities[t],s.h&&o.kg.log("[Tracing] new activities count",Object.keys(this.activities).length)),0===Object.keys(this.activities).length){var n=this._idleTimeout,r=(0,i._I)()+n/1e3;setTimeout((function(){e._finished||(e.setTag(a.d,a.x[1]),e.finish(r))}),n)}},e.prototype._beat=function(){if(!this._finished){var t=Object.keys(this.activities).join("");t===this._prevHeartbeatString?this._heartbeatCounter+=1:this._heartbeatCounter=1,this._prevHeartbeatString=t,this._heartbeatCounter>=3?(s.h&&o.kg.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this.setTag(a.d,a.x[0]),this.finish()):this._pingHeartbeat()}},e.prototype._pingHeartbeat=function(){var t=this;s.h&&o.kg.log("pinging Heartbeat -> current counter: "+this._heartbeatCounter),setTimeout((function(){t._beat()}),5e3)},e}(c.Y);function h(t){if(t){var e=t.getScope();if(e)e.getTransaction()&&e.setSpan(void 0)}}},8207:function(t,e,n){n.d(e,{gB:function(){return s},Dr:function(){return u}});var r=n(2481),i=n(3699),o=n(7790),a=n(1995),s=function(){function t(t){void 0===t&&(t=1e3),this.spans=[],this._maxlen=t}return t.prototype.add=function(t){this.spans.length>this._maxlen?t.spanRecorder=void 0:this.spans.push(t)},t}(),u=function(){function t(t){if(this.traceId=(0,i.DM)(),this.spanId=(0,i.DM)().substring(16),this.startTimestamp=(0,o._I)(),this.tags={},this.data={},!t)return this;t.traceId&&(this.traceId=t.traceId),t.spanId&&(this.spanId=t.spanId),t.parentSpanId&&(this.parentSpanId=t.parentSpanId),"sampled"in t&&(this.sampled=t.sampled),t.op&&(this.op=t.op),t.description&&(this.description=t.description),t.data&&(this.data=t.data),t.tags&&(this.tags=t.tags),t.status&&(this.status=t.status),t.startTimestamp&&(this.startTimestamp=t.startTimestamp),t.endTimestamp&&(this.endTimestamp=t.endTimestamp)}return t.prototype.child=function(t){return this.startChild(t)},t.prototype.startChild=function(e){var n=new t((0,r.pi)((0,r.pi)({},e),{parentSpanId:this.spanId,sampled:this.sampled,traceId:this.traceId}));return n.spanRecorder=this.spanRecorder,n.spanRecorder&&n.spanRecorder.add(n),n.transaction=this.transaction,n},t.prototype.setTag=function(t,e){var n;return this.tags=(0,r.pi)((0,r.pi)({},this.tags),((n={})[t]=e,n)),this},t.prototype.setData=function(t,e){var n;return this.data=(0,r.pi)((0,r.pi)({},this.data),((n={})[t]=e,n)),this},t.prototype.setStatus=function(t){return this.status=t,this},t.prototype.setHttpStatus=function(t){this.setTag("http.status_code",String(t));var e=function(t){if(t<400&&t>=100)return"ok";if(t>=400&&t<500)switch(t){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(t>=500&&t<600)switch(t){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}(t);return"unknown_error"!==e&&this.setStatus(e),this},t.prototype.isSuccess=function(){return"ok"===this.status},t.prototype.finish=function(t){this.endTimestamp="number"==typeof t?t:(0,o._I)()},t.prototype.toTraceparent=function(){var t="";return void 0!==this.sampled&&(t=this.sampled?"-1":"-0"),this.traceId+"-"+this.spanId+t},t.prototype.toContext=function(){return(0,a.Jr)({data:this.data,description:this.description,endTimestamp:this.endTimestamp,op:this.op,parentSpanId:this.parentSpanId,sampled:this.sampled,spanId:this.spanId,startTimestamp:this.startTimestamp,status:this.status,tags:this.tags,traceId:this.traceId})},t.prototype.updateWithContext=function(t){var e,n,r,i,o;return this.data=null!=(e=t.data)?e:{},this.description=t.description,this.endTimestamp=t.endTimestamp,this.op=t.op,this.parentSpanId=t.parentSpanId,this.sampled=t.sampled,this.spanId=null!=(n=t.spanId)?n:this.spanId,this.startTimestamp=null!=(r=t.startTimestamp)?r:this.startTimestamp,this.status=t.status,this.tags=null!=(i=t.tags)?i:{},this.traceId=null!=(o=t.traceId)?o:this.traceId,this},t.prototype.getTraceContext=function(){return(0,a.Jr)({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,trace_id:this.traceId})},t.prototype.toJSON=function(){return(0,a.Jr)({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,start_timestamp:this.startTimestamp,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.endTimestamp,trace_id:this.traceId})},t}()},8235:function(t,e,n){n.d(e,{Y:function(){return p}});var r=n(2481),i=n(8585),o=n(1757),a=n(8536),s=n(1995),u=n(853),c=n(8207),p=function(t){function e(e,n){var r=t.call(this,e)||this;return r._measurements={},r._hub=(0,i.Gd)(),(0,o.V9)(n,i.Xb)&&(r._hub=n),r.name=e.name||"",r.metadata=e.metadata||{},r._trimEnd=e.trimEnd,r.transaction=r,r}return(0,r.ZT)(e,t),e.prototype.setName=function(t){this.name=t},e.prototype.initSpanRecorder=function(t){void 0===t&&(t=1e3),this.spanRecorder||(this.spanRecorder=new c.gB(t)),this.spanRecorder.add(this)},e.prototype.setMeasurements=function(t){this._measurements=(0,r.pi)({},t)},e.prototype.setMetadata=function(t){this.metadata=(0,r.pi)((0,r.pi)({},this.metadata),t)},e.prototype.finish=function(e){var n=this;if(void 0===this.endTimestamp){if(this.name||(u.h&&a.kg.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this.name="<unlabeled transaction>"),t.prototype.finish.call(this,e),!0===this.sampled){var r=this.spanRecorder?this.spanRecorder.spans.filter((function(t){return t!==n&&t.endTimestamp})):[];this._trimEnd&&r.length>0&&(this.endTimestamp=r.reduce((function(t,e){return t.endTimestamp&&e.endTimestamp?t.endTimestamp>e.endTimestamp?t:e:t})).endTimestamp);var i={contexts:{trace:this.getTraceContext()},spans:r,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",sdkProcessingMetadata:this.metadata};return Object.keys(this._measurements).length>0&&(u.h&&a.kg.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),i.measurements=this._measurements),u.h&&a.kg.log("[Tracing] Finishing "+this.op+" transaction: "+this.name+"."),this._hub.captureEvent(i)}u.h&&a.kg.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled.");var o=this._hub.getClient(),s=o&&o.getTransport&&o.getTransport();s&&s.recordLostEvent&&s.recordLostEvent("sample_rate","transaction")}},e.prototype.toContext=function(){var e=t.prototype.toContext.call(this);return(0,s.Jr)((0,r.pi)((0,r.pi)({},e),{name:this.name,trimEnd:this._trimEnd}))},e.prototype.updateWithContext=function(e){var n;return t.prototype.updateWithContext.call(this,e),this.name=null!=(n=e.name)?n:"",this._trimEnd=e.trimEnd,this},e}(c.Dr)},2517:function(t,e,n){n.d(e,{zu:function(){return i},x1:function(){return o},XL:function(){return a},WB:function(){return s}});var r=n(8585);function i(t){var e=(0,r.Gd)().getClient(),n=t||e&&e.getOptions();return!!n&&("tracesSampleRate"in n||"tracesSampler"in n)}function o(t){var e=(t||(0,r.Gd)()).getScope();return e&&e.getTransaction()}function a(t){return t/1e3}function s(t){return 1e3*t}},2481:function(t,e,n){n.d(e,{ZT:function(){return i},pi:function(){return o},_T:function(){return a},XA:function(){return s},fl:function(){return c}});
|
17 |
Â
/*! *****************************************************************************
|
18 |
Â
Copyright (c) Microsoft Corporation.
|
19 |
Â
|
@@ -28,20 +28,5 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
28 |
Â
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
29 |
Â
PERFORMANCE OF THIS SOFTWARE.
|
30 |
Â
***************************************************************************** */
|
31 |
-
var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)};function i(t,e){function __(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}var o=function(){return o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},o.apply(this,arguments)};function a(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}function s(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function u(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function c(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(u(arguments[e]));return t}},2226:function(t,e,n){var r;n.d(e,{z:function(){return r}}),function(t){t.Fatal="fatal",t.Error="error",t.Warning="warning",t.Log="log",t.Info="info",t.Debug="debug",t.Critical="critical"}(r||(r={}))},3518:function(t,e,n){function r(t){t.then(null,(function(t){console.error(t)}))}n.d(e,{I:function(){return r}})},4194:function(t,e,n){n.d(e,{R:function(){return o},l:function(){return s}});var r=n(5907),i=n(1757);function o(t,e){try{for(var n=t,r=[],i=0,o=0,s=" > ".length,u=void 0;n&&i++<5&&!("html"===(u=a(n,e))||i>1&&o+r.length*s+u.length>=80);)r.push(u),o+=u.length,n=n.parentNode;return r.reverse().join(" > ")}catch(c){return"<unknown>"}}function a(t,e){var n,r,o,a,s,u=t,c=[];if(!u||!u.tagName)return"";c.push(u.tagName.toLowerCase());var p=e&&e.length?e.filter((function(t){return u.getAttribute(t)})).map((function(t){return[t,u.getAttribute(t)]})):null;if(p&&p.length)p.forEach((function(t){c.push("["+t[0]+'="'+t[1]+'"]')}));else if(u.id&&c.push("#"+u.id),(n=u.className)&&(0,i.HD)(n))for(r=n.split(/\s+/),s=0;s<r.length;s++)c.push("."+r[s]);var f=["type","name","title","alt"];for(s=0;s<f.length;s++)o=f[s],(a=u.getAttribute(o))&&c.push("["+o+'="'+a+'"]');return c.join("")}function s(){var t=(0,r.R)();try{return t.document.location.href}catch(e){return""}}},250:function(t,e,n){n.d(e,{y:function(){return o}});var r=n(6894),i=n(7790);function o(t,e,n){var o=[{type:"client_report"},{timestamp:n||(0,i.yW)(),discarded_events:t}];return(0,r.Jd)(e?{dsn:e}:{},[o])}},3135:function(t,e,n){n.d(e,{R:function(){return s},v:function(){return c}});var r=n(4715),i=n(4388),o=n(1923),a=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/;function s(t,e){void 0===e&&(e=!1);var n=t.host,r=t.path,i=t.pass,o=t.port,a=t.projectId;return t.protocol+"://"+t.publicKey+(e&&i?":"+i:"")+"@"+n+(o?":"+o:"")+"/"+(r?r+"/":r)+a}function u(t){return"user"in t&&!("publicKey"in t)&&(t.publicKey=t.user),{user:t.publicKey||"",protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function c(t){var e="string"==typeof t?function(t){var e=a.exec(t);if(!e)throw new i.b("Invalid Sentry Dsn: "+t);var n=(0,r.CR)(e.slice(1),6),o=n[0],s=n[1],c=n[2],p=void 0===c?"":c,f=n[3],d=n[4],h=void 0===d?"":d,l="",v=n[5],m=v.split("/");if(m.length>1&&(l=m.slice(0,-1).join("/"),v=m.pop()),v){var g=v.match(/^\d+/);g&&(v=g[0])}return u({host:f,pass:p,path:l,projectId:v,port:h,protocol:o,publicKey:s})}(t):u(t);return function(t){if(o.h){var e=t.port,n=t.projectId,r=t.protocol;if(["protocol","publicKey","host","projectId"].forEach((function(e){if(!t[e])throw new i.b("Invalid Sentry Dsn: "+e+" missing")})),!n.match(/^\d+$/))throw new i.b("Invalid Sentry Dsn: Invalid projectId "+n);if(!function(t){return"http"===t||"https"===t}(r))throw new i.b("Invalid Sentry Dsn: Invalid protocol "+r);if(e&&isNaN(parseInt(e,10)))throw new i.b("Invalid Sentry Dsn: Invalid port "+e)}}(e),e}},6872:function(t,e,n){n.d(e,{a:function(){return r}});var r=["fatal","error","warning","log","info","debug","critical"]},4285:function(t,e,n){function r(){return"undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&!!__SENTRY_BROWSER_BUNDLE__}n.d(e,{n:function(){return r}})},6894:function(t,e,n){n.d(e,{Jd:function(){return o},y7:function(){return a},V$:function(){return s}});var r=n(4715),i=n(1757);function o(t,e){return void 0===e&&(e=[]),[t,e]}function a(t){var e=(0,r.CR)(t,2),n=(0,r.CR)(e[1],1);return(0,r.CR)(n[0],1)[0].type}function s(t){var e=(0,r.CR)(t,2),n=e[0],o=e[1],a=JSON.stringify(n);return o.reduce((function(t,e){var n=(0,r.CR)(e,2),o=n[0],a=n[1],s=(0,i.pt)(a)?String(a):JSON.stringify(a);return t+"\n"+JSON.stringify(o)+"\n"+s}),a)}},4388:function(t,e,n){n.d(e,{b:function(){return o}});var r=n(4715),i=n(467),o=function(t){function e(e){var n=this.constructor,r=t.call(this,e)||this;return r.message=e,r.name=n.prototype.constructor.name,(0,i.f)(r,n.prototype),r}return(0,r.ZT)(e,t),e}(Error)},1923:function(t,e,n){n.d(e,{h:function(){return r}});var r="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__},5907:function(t,e,n){n.d(e,{R:function(){return o},Y:function(){return a}});var r=n(7392),i={};function o(){return(0,r.KV)()||"undefined"!=typeof window?window:"undefined"!=typeof self?self:i}function a(t,e,n){var r=n||o(),i=r.__SENTRY__=r.__SENTRY__||{};return i[t]||(i[t]=e())}},4005:function(t,e,n){n.d(e,{o:function(){return m}});var r,i=n(4715),o=n(1923),a=n(5907),s=n(1757),u=n(8536),c=n(1995),p=n(9038),f=n(9798),d=(0,a.R)(),h={},l={};function v(t){if(!l[t])switch(l[t]=!0,t){case"console":!function(){if(!("console"in d))return;u.RU.forEach((function(t){t in d.console&&(0,c.hl)(d.console,t,(function(e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];g("console",{args:n,level:t}),e&&e.apply(d.console,n)}}))}))}();break;case"dom":!function(){if(!("document"in d))return;var t=g.bind(null,"dom"),e=x(t,!0);d.document.addEventListener("click",e,!1),d.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach((function(e){var n=d[e]&&d[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&((0,c.hl)(n,"addEventListener",(function(e){return function(n,r,i){if("click"===n||"keypress"==n)try{var o=this,a=o.__sentry_instrumentation_handlers__=o.__sentry_instrumentation_handlers__||{},s=a[n]=a[n]||{refCount:0};if(!s.handler){var u=x(t);s.handler=u,e.call(this,n,u,i)}s.refCount+=1}catch(c){}return e.call(this,n,r,i)}})),(0,c.hl)(n,"removeEventListener",(function(t){return function(e,n,r){if("click"===e||"keypress"==e)try{var i=this,o=i.__sentry_instrumentation_handlers__||{},a=o[e];a&&(a.refCount-=1,a.refCount<=0&&(t.call(this,e,a.handler,r),a.handler=void 0,delete o[e]),0===Object.keys(o).length&&delete i.__sentry_instrumentation_handlers__)}catch(s){}return t.call(this,e,n,r)}})))}))}();break;case"xhr":!function(){if(!("XMLHttpRequest"in d))return;var t=XMLHttpRequest.prototype;(0,c.hl)(t,"open",(function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=this,i=e[1],o=r.__sentry_xhr__={method:(0,s.HD)(e[0])?e[0].toUpperCase():e[0],url:e[1]};(0,s.HD)(i)&&"POST"===o.method&&i.match(/sentry_key/)&&(r.__sentry_own_request__=!0);var a=function(){if(4===r.readyState){try{o.status_code=r.status}catch(t){}g("xhr",{args:e,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:r})}};return"onreadystatechange"in r&&"function"==typeof r.onreadystatechange?(0,c.hl)(r,"onreadystatechange",(function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return a(),t.apply(r,e)}})):r.addEventListener("readystatechange",a),t.apply(r,e)}})),(0,c.hl)(t,"send",(function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return this.__sentry_xhr__&&void 0!==e[0]&&(this.__sentry_xhr__.body=e[0]),g("xhr",{args:e,startTimestamp:Date.now(),xhr:this}),t.apply(this,e)}}))}();break;case"fetch":!function(){if(!(0,f.t$)())return;(0,c.hl)(d,"fetch",(function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r={args:e,fetchData:{method:y(e),url:_(e)},startTimestamp:Date.now()};return g("fetch",(0,i.pi)({},r)),t.apply(d,e).then((function(t){return g("fetch",(0,i.pi)((0,i.pi)({},r),{endTimestamp:Date.now(),response:t})),t}),(function(t){throw g("fetch",(0,i.pi)((0,i.pi)({},r),{endTimestamp:Date.now(),error:t})),t}))}}))}();break;case"history":!function(){if(!(0,f.Bf)())return;var t=d.onpopstate;function e(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var i=e.length>2?e[2]:void 0;if(i){var o=r,a=String(i);r=a,g("history",{from:o,to:a})}return t.apply(this,e)}}d.onpopstate=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var i=d.location.href,o=r;if(r=i,g("history",{from:o,to:i}),t)try{return t.apply(this,e)}catch(a){}},(0,c.hl)(d.history,"pushState",e),(0,c.hl)(d.history,"replaceState",e)}();break;case"error":T=d.onerror,d.onerror=function(t,e,n,r,i){return g("error",{column:r,error:i,line:n,msg:t,url:e}),!!T&&T.apply(this,arguments)};break;case"unhandledrejection":w=d.onunhandledrejection,d.onunhandledrejection=function(t){return g("unhandledrejection",t),!w||w.apply(this,arguments)};break;default:return void(o.h&&u.kg.warn("unknown instrumentation type:",t))}}function m(t,e){h[t]=h[t]||[],h[t].push(e),v(t)}function g(t,e){var n,r;if(t&&h[t])try{for(var a=(0,i.XA)(h[t]||[]),s=a.next();!s.done;s=a.next()){var c=s.value;try{c(e)}catch(f){o.h&&u.kg.error("Error while triggering instrumentation handler.\nType: "+t+"\nName: "+(0,p.$P)(c)+"\nError:",f)}}}catch(d){n={error:d}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}function y(t){return void 0===t&&(t=[]),"Request"in d&&(0,s.V9)(t[0],Request)&&t[0].method?String(t[0].method).toUpperCase():t[1]&&t[1].method?String(t[1].method).toUpperCase():"GET"}function _(t){return void 0===t&&(t=[]),"string"==typeof t[0]?t[0]:"Request"in d&&(0,s.V9)(t[0],Request)?t[0].url:String(t[0])}var b,S;function x(t,e){return void 0===e&&(e=!1),function(n){if(n&&S!==n&&!function(t){if("keypress"!==t.type)return!1;try{var e=t.target;if(!e||!e.tagName)return!0;if("INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable)return!1}catch(n){}return!0}(n)){var r="keypress"===n.type?"input":n.type;(void 0===b||function(t,e){if(!t)return!0;if(t.type!==e.type)return!0;try{if(t.target!==e.target)return!0}catch(n){}return!1}(S,n))&&(t({event:n,name:r,global:e}),S=n),clearTimeout(b),b=d.setTimeout((function(){b=void 0}),1e3)}}}var T=null;var w=null},1757:function(t,e,n){n.d(e,{VZ:function(){return i},VW:function(){return a},TX:function(){return s},fm:function(){return u},HD:function(){return c},pt:function(){return p},PO:function(){return f},cO:function(){return d},kK:function(){return h},Kj:function(){return l},J8:function(){return v},Cy:function(){return m},i2:function(){return g},V9:function(){return y}});var r=Object.prototype.toString;function i(t){switch(r.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return y(t,Error)}}function o(t,e){return r.call(t)==="[object "+e+"]"}function a(t){return o(t,"ErrorEvent")}function s(t){return o(t,"DOMError")}function u(t){return o(t,"DOMException")}function c(t){return o(t,"String")}function p(t){return null===t||"object"!=typeof t&&"function"!=typeof t}function f(t){return o(t,"Object")}function d(t){return"undefined"!=typeof Event&&y(t,Event)}function h(t){return"undefined"!=typeof Element&&y(t,Element)}function l(t){return o(t,"RegExp")}function v(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function m(t){return f(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function g(t){return"number"==typeof t&&t!=t}function y(t,e){try{return t instanceof e}catch(n){return!1}}},8536:function(t,e,n){n.d(e,{RU:function(){return c},Cf:function(){return p},kg:function(){return r}});var r,i=n(4715),o=n(1923),a=n(5907),s=(0,a.R)(),u="Sentry Logger ",c=["debug","info","warn","error","log","assert"];function p(t){var e=(0,a.R)();if(!("console"in e))return t();var n=e.console,r={};c.forEach((function(t){var i=n[t]&&n[t].__sentry_original__;t in e.console&&i&&(r[t]=n[t],n[t]=i)}));try{return t()}finally{Object.keys(r).forEach((function(t){n[t]=r[t]}))}}function f(){var t=!1,e={enable:function(){t=!0},disable:function(){t=!1}};return o.h?c.forEach((function(n){e[n]=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t&&p((function(){var t;(t=s.console)[n].apply(t,(0,i.fl)([u+"["+n+"]:"],e))}))}})):c.forEach((function(t){e[t]=function(){}})),e}r=o.h?(0,a.Y)("logger",f):f()},4048:function(t,e,n){function r(){var t="function"==typeof WeakSet,e=t?new WeakSet:[];return[function(n){if(t)return!!e.has(n)||(e.add(n),!1);for(var r=0;r<e.length;r++){if(e[r]===n)return!0}return e.push(n),!1},function(n){if(t)e.delete(n);else for(var r=0;r<e.length;r++)if(e[r]===n){e.splice(r,1);break}}]}n.d(e,{i:function(){return r}})},3699:function(t,e,n){n.d(e,{DM:function(){return a},en:function(){return s},jH:function(){return c},Db:function(){return p},EG:function(){return f},YO:function(){return d}});var r=n(4715),i=n(5907),o=n(1995);function a(){var t=(0,i.R)(),e=t.crypto||t.msCrypto;if(void 0!==e&&e.getRandomValues){var n=new Uint16Array(8);e.getRandomValues(n),n[3]=4095&n[3]|16384,n[4]=16383&n[4]|32768;var r=function(t){for(var e=t.toString(16);e.length<4;)e="0"+e;return e};return r(n[0])+r(n[1])+r(n[2])+r(n[3])+r(n[4])+r(n[5])+r(n[6])+r(n[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))}function s(t){if(!t)return{};var e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};var n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],relative:e[5]+n+r}}function u(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function c(t){var e=t.message,n=t.event_id;if(e)return e;var r=u(t);return r?r.type&&r.value?r.type+": "+r.value:r.type||r.value||n||"<unknown>":n||"<unknown>"}function p(t,e,n){var r=t.exception=t.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=e||""),o.type||(o.type=n||"Error")}function f(t,e){var n=u(t);if(n){var i=n.mechanism;if(n.mechanism=(0,r.pi)((0,r.pi)((0,r.pi)({},{type:"generic",handled:!0}),i),e),e&&"data"in e){var o=(0,r.pi)((0,r.pi)({},i&&i.data),e.data);n.mechanism.data=o}}}function d(t){if(t&&t.__sentry_captured__)return!0;try{(0,o.xp)(t,"__sentry_captured__",!0)}catch(e){}return!1}},7392:function(t,e,n){n.d(e,{KV:function(){return i},l$:function(){return o}});var r=n(4285);function i(){return!(0,r.n)()&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}function o(t,e){return t.require(e)}t=n.hmd(t)},8035:function(t,e,n){n.d(e,{Fv:function(){return u},Qy:function(){return c}});var r=n(4715),i=n(1757),o=n(4048),a=n(1995),s=n(9038);function u(t,e,n){void 0===e&&(e=1/0),void 0===n&&(n=1/0);try{return p("",t,e,n)}catch(r){return{ERROR:"**non-serializable** ("+r+")"}}}function c(t,e,n){void 0===e&&(e=3),void 0===n&&(n=102400);var r,i=u(t,e);return r=i,function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(r))>n?c(t,e-1,n):i}function p(t,e,n,u,c){void 0===n&&(n=1/0),void 0===u&&(u=1/0),void 0===c&&(c=(0,o.i)());var f=(0,r.CR)(c,2),d=f[0],h=f[1],l=e;if(l&&"function"==typeof l.toJSON)try{return l.toJSON()}catch(S){}if(null===e||["number","boolean","string"].includes(typeof e)&&!(0,i.i2)(e))return e;var v=function(t,e){try{return"domain"===t&&e&&"object"==typeof e&&e._events?"[Domain]":"domainEmitter"===t?"[DomainEmitter]":"undefined"!=typeof window&&e===window?"[Global]":"undefined"!=typeof window&&e===window?"[Window]":"undefined"!=typeof document&&e===document?"[Document]":(0,i.Cy)(e)?"[SyntheticEvent]":"number"==typeof e&&e!=e?"[NaN]":void 0===e?"[undefined]":"function"==typeof e?"[Function: "+(0,s.$P)(e)+"]":"symbol"==typeof e?"["+String(e)+"]":"bigint"==typeof e?"[BigInt: "+String(e)+"]":"[object "+Object.getPrototypeOf(e).constructor.name+"]"}catch(S){return"**non-serializable** ("+S+")"}}(t,e);if(!v.startsWith("[object "))return v;if(0===n)return v.replace("object ","");if(d(e))return"[Circular ~]";var m=Array.isArray(e)?[]:{},g=0,y=(0,i.VZ)(e)||(0,i.cO)(e)?(0,a.Sh)(e):e;for(var _ in y)if(Object.prototype.hasOwnProperty.call(y,_)){if(g>=u){m[_]="[MaxProperties ~]";break}var b=y[_];m[_]=p(_,b,n-1,u,c),g+=1}return h(e),m}},1995:function(t,e,n){n.d(e,{hl:function(){return s},xp:function(){return u},$Q:function(){return c},HK:function(){return p},_j:function(){return f},Sh:function(){return d},zf:function(){return v},Jr:function(){return m}});var r=n(4715),i=n(4194),o=n(1757),a=n(9660);function s(t,e,n){if(e in t){var r=t[e],i=n(r);if("function"==typeof i)try{c(i,r)}catch(o){}t[e]=i}}function u(t,e,n){Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}function c(t,e){var n=e.prototype||{};t.prototype=e.prototype=n,u(t,"__sentry_original__",e)}function p(t){return t.__sentry_original__}function f(t){return Object.keys(t).map((function(e){return encodeURIComponent(e)+"="+encodeURIComponent(t[e])})).join("&")}function d(t){var e=t;if((0,o.VZ)(t))e=(0,r.pi)({message:t.message,name:t.name,stack:t.stack},l(t));else if((0,o.cO)(t)){var n=t;e=(0,r.pi)({type:n.type,target:h(n.target),currentTarget:h(n.currentTarget)},l(n)),"undefined"!=typeof CustomEvent&&(0,o.V9)(t,CustomEvent)&&(e.detail=n.detail)}return e}function h(t){try{return(0,o.kK)(t)?(0,i.R)(t):Object.prototype.toString.call(t)}catch(e){return"<unknown>"}}function l(t){var e={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function v(t,e){void 0===e&&(e=40);var n=Object.keys(d(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return(0,a.$G)(n[0],e);for(var r=n.length;r>0;r--){var i=n.slice(0,r).join(", ");if(!(i.length>e))return r===n.length?i:(0,a.$G)(i,e)}return""}function m(t){var e,n;if((0,o.PO)(t)){var i={};try{for(var a=(0,r.XA)(Object.keys(t)),s=a.next();!s.done;s=a.next()){var u=s.value;void 0!==t[u]&&(i[u]=m(t[u]))}}catch(c){e={error:c}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return i}return Array.isArray(t)?t.map(m):t}},467:function(t,e,n){n.d(e,{f:function(){return r}});var r=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){return t.__proto__=e,t}:function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n]);return t})},8963:function(t,e,n){n.d(e,{x:function(){return o}});var r=n(4388),i=n(7946);function o(t){var e=[];function n(t){return e.splice(e.indexOf(t),1)[0]}return{$:e,add:function(o){if(!(void 0===t||e.length<t))return(0,i.$2)(new r.b("Not adding Promise due to buffer limit reached."));var a=o();return-1===e.indexOf(a)&&e.push(a),a.then((function(){return n(a)})).then(null,(function(){return n(a).then(null,(function(){}))})),a},drain:function(t){return new i.cW((function(n,r){var o=e.length;if(!o)return n(!0);var a=setTimeout((function(){t&&t>0&&n(!1)}),t);e.forEach((function(t){(0,i.WD)(t).then((function(){--o||(clearTimeout(a),n(!0))}),r)}))}))}}}},1630:function(t,e,n){n.d(e,{ns:function(){return i},Q:function(){return o},WG:function(){return a}});var r=n(4715);function i(t,e){return t[e]||t.all||0}function o(t,e,n){return void 0===n&&(n=Date.now()),i(t,e)>n}function a(t,e,n){var i,o,a,s;void 0===n&&(n=Date.now());var u=(0,r.pi)({},t),c=e["x-sentry-rate-limits"],p=e["retry-after"];if(c)try{for(var f=(0,r.XA)(c.trim().split(",")),d=f.next();!d.done;d=f.next()){var h=d.value.split(":",2),l=parseInt(h[0],10),v=1e3*(isNaN(l)?60:l);if(h[1])try{for(var m=(a=void 0,(0,r.XA)(h[1].split(";"))),g=m.next();!g.done;g=m.next()){u[g.value]=n+v}}catch(y){a={error:y}}finally{try{g&&!g.done&&(s=m.return)&&s.call(m)}finally{if(a)throw a.error}}else u.all=n+v}}catch(_){i={error:_}}finally{try{d&&!d.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}else p&&(u.all=n+function(t,e){void 0===e&&(e=Date.now());var n=parseInt(""+t,10);if(!isNaN(n))return 1e3*n;var r=Date.parse(""+t);return isNaN(r)?6e4:r-e}(p,n));return u}},8653:function(t,e,n){n.d(e,{E:function(){return o}});var r=n(2226),i=n(6872);function o(t){return"warn"===t?r.z.Warning:function(t){return-1!==i.a.indexOf(t)}(t)?t:r.z.Log}},9038:function(t,e,n){n.d(e,{pE:function(){return i},$P:function(){return s}});var r=n(4715);function i(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.sort((function(t,e){return t[0]-e[0]})).map((function(t){return t[1]}));return function(t,e){var i,a,s,u;void 0===e&&(e=0);var c=[];try{for(var p=(0,r.XA)(t.split("\n").slice(e)),f=p.next();!f.done;f=p.next()){var d=f.value;try{for(var h=(s=void 0,(0,r.XA)(n)),l=h.next();!l.done;l=h.next()){var v=(0,l.value)(d);if(v){c.push(v);break}}}catch(m){s={error:m}}finally{try{l&&!l.done&&(u=h.return)&&u.call(h)}finally{if(s)throw s.error}}}}catch(g){i={error:g}}finally{try{f&&!f.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}return o(c)}}function o(t){if(!t.length)return[];var e=t,n=e[0].function||"",i=e[e.length-1].function||"";return-1===n.indexOf("captureMessage")&&-1===n.indexOf("captureException")||(e=e.slice(1)),-1!==i.indexOf("sentryWrapped")&&(e=e.slice(0,-1)),e.slice(0,50).map((function(t){return(0,r.pi)((0,r.pi)({},t),{filename:t.filename||e[0].filename,function:t.function||"?"})})).reverse()}var a="<anonymous>";function s(t){try{return t&&"function"==typeof t&&t.name||a}catch(e){return a}}},8886:function(t,e,n){function r(t){return t>=200&&t<300?"success":429===t?"rate_limit":t>=400&&t<500?"invalid":t>=500?"failed":"unknown"}n.d(e,{F:function(){return r}})},9660:function(t,e,n){n.d(e,{$G:function(){return i},nK:function(){return o},zC:function(){return a}});var r=n(1757);function i(t,e){return void 0===e&&(e=0),"string"!=typeof t||0===e||t.length<=e?t:t.substr(0,e)+"..."}function o(t,e){if(!Array.isArray(t))return"";for(var n=[],r=0;r<t.length;r++){var i=t[r];try{n.push(String(i))}catch(o){n.push("[value cannot be serialized]")}}return n.join(e)}function a(t,e){return!!(0,r.HD)(t)&&((0,r.Kj)(e)?e.test(t):"string"==typeof e&&-1!==t.indexOf(e))}},9798:function(t,e,n){n.d(e,{Ak:function(){return a},Du:function(){return s},t$:function(){return u},hv:function(){return c},Bf:function(){return p}});var r=n(1923),i=n(5907),o=n(8536);function a(){if(!("fetch"in(0,i.R)()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(t){return!1}}function s(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function u(){if(!a())return!1;var t=(0,i.R)();if(s(t.fetch))return!0;var e=!1,n=t.document;if(n&&"function"==typeof n.createElement)try{var u=n.createElement("iframe");u.hidden=!0,n.head.appendChild(u),u.contentWindow&&u.contentWindow.fetch&&(e=s(u.contentWindow.fetch)),n.head.removeChild(u)}catch(c){r.h&&o.kg.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",c)}return e}function c(){if(!a())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch(t){return!1}}function p(){var t=(0,i.R)(),e=t.chrome,n=e&&e.app&&e.app.runtime,r="history"in t&&!!t.history.pushState&&!!t.history.replaceState;return!n&&r}},7946:function(t,e,n){n.d(e,{WD:function(){return i},$2:function(){return o},cW:function(){return a}});var r=n(1757);function i(t){return new a((function(e){e(t)}))}function o(t){return new a((function(e,n){n(t)}))}var a=function(){function t(t){var e=this;this._state=0,this._handlers=[],this._resolve=function(t){e._setResult(1,t)},this._reject=function(t){e._setResult(2,t)},this._setResult=function(t,n){0===e._state&&((0,r.J8)(n)?n.then(e._resolve,e._reject):(e._state=t,e._value=n,e._executeHandlers()))},this._executeHandlers=function(){if(0!==e._state){var t=e._handlers.slice();e._handlers=[],t.forEach((function(t){t[0]||(1===e._state&&t[1](e._value),2===e._state&&t[2](e._value),t[0]=!0)}))}};try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}return t.prototype.then=function(e,n){var r=this;return new t((function(t,i){r._handlers.push([!1,function(n){if(e)try{t(e(n))}catch(r){i(r)}else t(n)},function(e){if(n)try{t(n(e))}catch(r){i(r)}else i(e)}]),r._executeHandlers()}))},t.prototype.catch=function(t){return this.then((function(t){return t}),t)},t.prototype.finally=function(e){var n=this;return new t((function(t,r){var i,o;return n.then((function(t){o=!1,i=t,e&&e()}),(function(t){o=!0,i=t,e&&e()})).then((function(){o?r(i):t(i)}))}))},t}()},7790:function(t,e,n){n.d(e,{yW:function(){return u},ph:function(){return c},_I:function(){return p},Z1:function(){return f}});var r=n(5907),i=n(7392);t=n.hmd(t);var o={nowSeconds:function(){return Date.now()/1e3}};var a=(0,i.KV)()?function(){try{return(0,i.l$)(t,"perf_hooks").performance}catch(e){return}}():function(){var t=(0,r.R)().performance;if(t&&t.now)return{now:function(){return t.now()},timeOrigin:Date.now()-t.now()}}(),s=void 0===a?o:{nowSeconds:function(){return(a.timeOrigin+a.now())/1e3}},u=o.nowSeconds.bind(o),c=s.nowSeconds.bind(s),p=c,f=function(){var t=(0,r.R)().performance;if(t&&t.now){var e=36e5,n=t.now(),i=Date.now(),o=t.timeOrigin?Math.abs(t.timeOrigin+n-i):e,a=o<e,s=t.timing&&t.timing.navigationStart,u="number"==typeof s?Math.abs(s+n-i):e;return a||u<e?o<=u?("timeOrigin",t.timeOrigin):("navigationStart",s):("dateNow",i)}"none"}()},9691:function(t,e,n){n.d(e,{q:function(){return i}});var r=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function i(t){var e=t.match(r);if(e){var n=void 0;return"1"===e[3]?n=!0:"0"===e[3]&&(n=!1),{traceId:e[1],parentSampled:n,parentSpanId:e[2]}}}},4715:function(t,e,n){n.d(e,{ZT:function(){return i},pi:function(){return o},XA:function(){return a},CR:function(){return s},fl:function(){return u}});
|
32 |
-
/*! *****************************************************************************
|
33 |
-
Copyright (c) Microsoft Corporation.
|
34 |
-
|
35 |
-
Permission to use, copy, modify, and/or distribute this software for any
|
36 |
-
purpose with or without fee is hereby granted.
|
37 |
-
|
38 |
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
39 |
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
40 |
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
41 |
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
42 |
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
43 |
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
44 |
-
PERFORMANCE OF THIS SOFTWARE.
|
45 |
-
***************************************************************************** */
|
46 |
-
var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)};function i(t,e){function __(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}var o=function(){return o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},o.apply(this,arguments)};function a(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function s(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function u(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(s(arguments[e]));return t}},6989:function(t){t.exports=window.wp.apiFetch}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={id:r,loaded:!1,exports:{}};return t[r](o,o.exports,n),o.loaded=!0,o.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.hmd=function(t){return(t=Object.create(t)).children||(t.children=[]),Object.defineProperty(t,"exports",{enumerable:!0,set:function(){throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+t.id)}}),t},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};!function(){n.r(r);var t,e=n(2456),i=n(4678),o=n(4476),a=n(6989),s=n.n(a);const u="true"===(null===(t=window.A8C_ETK_ErrorReporting_Config)||void 0===t?void 0:t.shouldActivateSentry),c=window._jsErr||[],p=window._headJsErrorHandler;u?(e.S1({dsn:"https://658ae291b00242148af6b76494d4a49a@o248881.ingest.sentry.io/5876245",integrations:[new o.gE],release:"wpcom-test-01",tracesSampleRate:1}),c.forEach((t=>i.Tb(t))),e.yl().then((()=>delete window._jsErr))):function(){const t=t=>{let{error:e}=t;if(!e)return;const n={message:e.message,trace:e.stack,url:document.location.href,feature:"wp-admin"};return s()({global:!0,path:"/rest/v1.1/js-error",method:"POST",data:{error:JSON.stringify(n)}}).catch((()=>console.error("Error: Unable to record the error in Logstash.")))};window.addEventListener("error",t),Promise.allSettled(c.map(t)).then((()=>delete window._jsErr))}(),window.removeEventListener("error",p),delete window._headJsErrorHandler}(),window.EditingToolkit=r}();
|
47 |
Â
//# sourceMappingURL=error-reporting.min.js.map
|
1 |
+
!function(){"use strict";var t={487:function(t,n,e){e.d(n,{u:function(){return l}});var r=e(334),i=e(4911),o=e(9504),s=e(2226),a=e(9798),u=e(1988),c=e(1449),f=e(6149),p=e(4827),d=e(6144),l=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return(0,r.ZT)(n,t),n.prototype.eventFromException=function(t,n){return(0,u.dr)(t,n,this._options.attachStacktrace)},n.prototype.eventFromMessage=function(t,n,e){return void 0===n&&(n=s.z.Info),(0,u.aB)(t,n,e,this._options.attachStacktrace)},n.prototype._setupTransport=function(){if(!this._options.dsn)return t.prototype._setupTransport.call(this);var n=(0,r.pi)((0,r.pi)({},this._options.transportOptions),{dsn:this._options.dsn,tunnel:this._options.tunnel,sendClientReports:this._options.sendClientReports,_metadata:this._options._metadata}),e=(0,i.hd)(n.dsn,n._metadata,n.tunnel),o=(0,i.Ut)(e.dsn,e.tunnel);if(this._options.transport)return new this._options.transport(n);if((0,a.Ak)()){var s=(0,r.pi)({},n.fetchParameters);return this._newTransport=(0,c.k)({requestOptions:s,url:o}),new f.V(n)}return this._newTransport=(0,p.H)({url:o,headers:n.headers}),new d.w(n)},n}(o.N)},2314:function(t,n,e){e.d(n,{R:function(){return d}});var r=e(334),i=e(1476),o=e(9849),s=e(5907),a=e(8536),u=e(487),c=e(7904),f=e(2634),p=e(8356),d=function(t){function n(n){void 0===n&&(n={});return n._metadata=n._metadata||{},n._metadata.sdk=n._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:i.J}],version:i.J},t.call(this,u.u,n)||this}return(0,r.ZT)(n,t),n.prototype.showReportDialog=function(t){void 0===t&&(t={}),(0,s.R)().document&&(this._isEnabled()?(0,f.BS)((0,r.pi)((0,r.pi)({},t),{dsn:t.dsn||this.getDsn()})):c.h&&a.kg.error("Trying to call showReportDialog with Sentry Client disabled"))},n.prototype._prepareEvent=function(n,e,r){return n.platform=n.platform||"javascript",t.prototype._prepareEvent.call(this,n,e,r)},n.prototype._sendEvent=function(n){var e=this.getIntegration(p.O);e&&e.addSentryBreadcrumb(n),t.prototype._sendEvent.call(this,n)},n}(o.W)},1988:function(t,n,e){e.d(n,{GJ:function(){return d},dr:function(){return _},aB:function(){return g},ME:function(){return m}});var r=e(334),i=e(2226),o=e(1757),s=e(1995),a=e(8035),u=e(9038),c=e(3699),f=e(7946),p=e(2224);function d(t){var n=h(t),e={type:t&&t.name,value:y(t)};return n.length&&(e.stacktrace={frames:n}),void 0===e.type&&""===e.value&&(e.value="Unrecoverable error caught"),e}function l(t){return{exception:{values:[d(t)]}}}function h(t){var n=t.stacktrace||t.stack||"",e=function(t){if(t){if("number"==typeof t.framesToPop)return t.framesToPop;if(v.test(t.message))return 1}return 0}(t);try{return(0,u.pE)(p.CS,p.ay,p.s$,p.aL,p.Pi)(n,e)}catch(r){}return[]}var v=/Minified React error #\d+;/i;function y(t){var n=t&&t.message;return n?n.error&&"string"==typeof n.error.message?n.error.message:n:"No error message"}function _(t,n,e){var r=m(t,n&&n.syntheticException||void 0,e);return(0,c.EG)(r),r.level=i.z.Error,n&&n.event_id&&(r.event_id=n.event_id),(0,f.WD)(r)}function g(t,n,e,r){void 0===n&&(n=i.z.Info);var o=b(t,e&&e.syntheticException||void 0,r);return o.level=n,e&&e.event_id&&(o.event_id=e.event_id),(0,f.WD)(o)}function m(t,n,e,i){var u;if((0,o.VW)(t)&&t.error)return l(t.error);if((0,o.TX)(t)||(0,o.fm)(t)){var f=t;if("stack"in t)u=l(t);else{var p=f.name||((0,o.TX)(f)?"DOMError":"DOMException"),d=f.message?p+": "+f.message:p;u=b(d,n,e),(0,c.Db)(u,d)}return"code"in f&&(u.tags=(0,r.pi)((0,r.pi)({},u.tags),{"DOMException.code":""+f.code})),u}return(0,o.VZ)(t)?l(t):(0,o.PO)(t)||(0,o.cO)(t)?(u=function(t,n,e){var r={exception:{values:[{type:(0,o.cO)(t)?t.constructor.name:e?"UnhandledRejection":"Error",value:"Non-Error "+(e?"promise rejection":"exception")+" captured with keys: "+(0,s.zf)(t)}]},extra:{__serialized__:(0,a.Qy)(t)}};if(n){var i=h(n);i.length&&(r.stacktrace={frames:i})}return r}(t,n,i),(0,c.EG)(u,{synthetic:!0}),u):(u=b(t,n,e),(0,c.Db)(u,""+t,void 0),(0,c.EG)(u,{synthetic:!0}),u)}function b(t,n,e){var r={message:t};if(e&&n){var i=h(n);i.length&&(r.stacktrace={frames:i})}return r}},7904:function(t,n,e){e.d(n,{h:function(){return r}});var r="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__},2634:function(t,n,e){e.d(n,{Wz:function(){return l},re:function(){return v},BS:function(){return y}});var r=e(334),i=e(4678),o=e(4911),s=e(5907),a=e(1995),u=e(3699),c=e(8536),f=e(7904),p=(0,s.R)(),d=0;function l(){return d>0}function h(){d+=1,setTimeout((function(){d-=1}))}function v(t,n,e){if(void 0===n&&(n={}),"function"!=typeof t)return t;try{var o=t.__sentry_wrapped__;if(o)return o;if((0,a.HK)(t))return t}catch(f){return t}var s=function(){var o=Array.prototype.slice.call(arguments);try{e&&"function"==typeof e&&e.apply(this,arguments);var s=o.map((function(t){return v(t,n)}));return t.apply(this,s)}catch(a){throw h(),(0,i.$e)((function(t){t.addEventProcessor((function(t){return n.mechanism&&((0,u.Db)(t,void 0,void 0),(0,u.EG)(t,n.mechanism)),t.extra=(0,r.pi)((0,r.pi)({},t.extra),{arguments:o}),t})),(0,i.Tb)(a)})),a}};try{for(var c in t)Object.prototype.hasOwnProperty.call(t,c)&&(s[c]=t[c])}catch(p){}(0,a.$Q)(s,t),(0,a.xp)(t,"__sentry_wrapped__",s);try{Object.getOwnPropertyDescriptor(s,"name").configurable&&Object.defineProperty(s,"name",{get:function(){return t.name}})}catch(p){}return s}function y(t){if(void 0===t&&(t={}),p.document)if(t.eventId)if(t.dsn){var n=p.document.createElement("script");n.async=!0,n.src=(0,o.hR)(t.dsn,t),t.onLoad&&(n.onload=t.onLoad);var e=p.document.head||p.document.body;e&&e.appendChild(n)}else f.h&&c.kg.error("Missing dsn option in showReportDialog call");else f.h&&c.kg.error("Missing eventId option in showReportDialog call")}},8356:function(t,n,e){e.d(n,{O:function(){return d}});var r=e(334),i=e(8585),o=e(2226),s=e(3699),a=e(4005),u=e(4194),c=e(8653),f=e(9660),p=e(5907),d=function(){function t(n){this.name=t.id,this._options=(0,r.pi)({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},n)}return t.prototype.addSentryBreadcrumb=function(t){this._options.sentry&&(0,i.Gd)().addBreadcrumb({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:(0,s.jH)(t)},{event:t})},t.prototype.setupOnce=function(){this._options.console&&(0,a.o)("console",l),this._options.dom&&(0,a.o)("dom",function(t){function n(n){var e,r="object"==typeof t?t.serializeAttribute:void 0;"string"==typeof r&&(r=[r]);try{e=n.event.target?(0,u.R)(n.event.target,r):(0,u.R)(n.event,r)}catch(o){e="<unknown>"}0!==e.length&&(0,i.Gd)().addBreadcrumb({category:"ui."+n.name,message:e},{event:n.event,name:n.name,global:n.global})}return n}(this._options.dom)),this._options.xhr&&(0,a.o)("xhr",h),this._options.fetch&&(0,a.o)("fetch",v),this._options.history&&(0,a.o)("history",y)},t.id="Breadcrumbs",t}();function l(t){var n={category:"console",data:{arguments:t.args,logger:"console"},level:(0,c.E)(t.level),message:(0,f.nK)(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message="Assertion failed: "+((0,f.nK)(t.args.slice(1)," ")||"console.assert"),n.data.arguments=t.args.slice(1)}(0,i.Gd)().addBreadcrumb(n,{input:t.args,level:t.level})}function h(t){if(t.endTimestamp){if(t.xhr.__sentry_own_request__)return;var n=t.xhr.__sentry_xhr__||{},e=n.method,r=n.url,o=n.status_code,s=n.body;(0,i.Gd)().addBreadcrumb({category:"xhr",data:{method:e,url:r,status_code:o},type:"http"},{xhr:t.xhr,input:s})}else;}function v(t){t.endTimestamp&&(t.fetchData.url.match(/sentry_key/)&&"POST"===t.fetchData.method||(t.error?(0,i.Gd)().addBreadcrumb({category:"fetch",data:t.fetchData,level:o.z.Error,type:"http"},{data:t.error,input:t.args}):(0,i.Gd)().addBreadcrumb({category:"fetch",data:(0,r.pi)((0,r.pi)({},t.fetchData),{status_code:t.response.status}),type:"http"},{input:t.args,response:t.response})))}function y(t){var n=(0,p.R)(),e=t.from,r=t.to,o=(0,s.en)(n.location.href),a=(0,s.en)(e),u=(0,s.en)(r);a.path||(a=o),o.protocol===u.protocol&&o.host===u.host&&(r=u.relative),o.protocol===a.protocol&&o.host===a.host&&(e=a.relative),(0,i.Gd)().addBreadcrumb({category:"navigation",data:{from:e,to:r}})}},184:function(t,n,e){e.d(n,{I:function(){return o}});var r=e(8536),i=e(7904),o=function(){function t(){this.name=t.id}return t.prototype.setupOnce=function(n,e){n((function(n){var o=e().getIntegration(t);if(o){try{if(function(t,n){if(!n)return!1;if(function(t,n){var e=t.message,r=n.message;if(!e&&!r)return!1;if(e&&!r||!e&&r)return!1;if(e!==r)return!1;if(!a(t,n))return!1;if(!s(t,n))return!1;return!0}(t,n))return!0;if(function(t,n){var e=u(n),r=u(t);if(!e||!r)return!1;if(e.type!==r.type||e.value!==r.value)return!1;if(!a(t,n))return!1;if(!s(t,n))return!1;return!0}(t,n))return!0;return!1}(n,o._previousEvent))return i.h&&r.kg.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(c){return o._previousEvent=n}return o._previousEvent=n}return n}))},t.id="Dedupe",t}();function s(t,n){var e=c(t),r=c(n);if(!e&&!r)return!0;if(e&&!r||!e&&r)return!1;if(e=e,(r=r).length!==e.length)return!1;for(var i=0;i<r.length;i++){var o=r[i],s=e[i];if(o.filename!==s.filename||o.lineno!==s.lineno||o.colno!==s.colno||o.function!==s.function)return!1}return!0}function a(t,n){var e=t.fingerprint,r=n.fingerprint;if(!e&&!r)return!0;if(e&&!r||!e&&r)return!1;e=e,r=r;try{return!(e.join("")!==r.join(""))}catch(i){return!1}}function u(t){return t.exception&&t.exception.values&&t.exception.values[0]}function c(t){var n=t.exception;if(n)try{return n.values[0].stacktrace.frames}catch(e){return}else if(t.stacktrace)return t.stacktrace.frames}},1228:function(t,n,e){e.d(n,{d:function(){return h}});var r=e(334),i=e(8585),o=e(2226),s=e(4005),a=e(1757),u=e(4194),c=e(8536),f=e(3699),p=e(1988),d=e(7904),l=e(2634),h=function(){function t(n){this.name=t.id,this._installFunc={onerror:v,onunhandledrejection:y},this._options=(0,r.pi)({onerror:!0,onunhandledrejection:!0},n)}return t.prototype.setupOnce=function(){Error.stackTraceLimit=50;var t,n=this._options;for(var e in n){var r=this._installFunc[e];r&&n[e]&&(t=e,d.h&&c.kg.log("Global Handler attached: "+t),r(),this._installFunc[e]=void 0)}},t.id="GlobalHandlers",t}();function v(){(0,s.o)("error",(function(t){var n=(0,r.CR)(m(),2),e=n[0],i=n[1];if(e.getIntegration(h)){var s=t.msg,u=t.url,c=t.line,f=t.column,d=t.error;if(!((0,l.Wz)()||d&&d.__sentry_own_request__)){var v=void 0===d&&(0,a.HD)(s)?function(t,n,e,r){var i=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,o=(0,a.VW)(t)?t.message:t,s="Error",u=o.match(i);u&&(s=u[1],o=u[2]);return _({exception:{values:[{type:s,value:o}]}},n,e,r)}(s,u,c,f):_((0,p.ME)(d||s,void 0,i,!1),u,c,f);v.level=o.z.Error,g(e,d,v,"onerror")}}}))}function y(){(0,s.o)("unhandledrejection",(function(t){var n=(0,r.CR)(m(),2),e=n[0],i=n[1];if(e.getIntegration(h)){var s=t;try{"reason"in t?s=t.reason:"detail"in t&&"reason"in t.detail&&(s=t.detail.reason)}catch(c){}if((0,l.Wz)()||s&&s.__sentry_own_request__)return!0;var u=(0,a.pt)(s)?{exception:{values:[{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(s)}]}}:(0,p.ME)(s,void 0,i,!0);u.level=o.z.Error,g(e,s,u,"onunhandledrejection")}}))}function _(t,n,e,r){var i=t.exception=t.exception||{},o=i.values=i.values||[],s=o[0]=o[0]||{},c=s.stacktrace=s.stacktrace||{},f=c.frames=c.frames||[],p=isNaN(parseInt(r,10))?void 0:r,d=isNaN(parseInt(e,10))?void 0:e,l=(0,a.HD)(n)&&n.length>0?n:(0,u.l)();return 0===f.length&&f.push({colno:p,filename:l,function:"?",in_app:!0,lineno:d}),t}function g(t,n,e,r){(0,f.EG)(e,{handled:!1,type:r}),t.captureEvent(e,{originalException:n})}function m(){var t=(0,i.Gd)(),n=t.getClient();return[t,n&&n.getOptions().attachStacktrace]}},3440:function(t,n,e){e.d(n,{iP:function(){return u}});var r=e(334),i=e(1684),o=e(8585),s=e(1757),a=e(1988),u=function(){function t(n){void 0===n&&(n={}),this.name=t.id,this._key=n.key||"cause",this._limit=n.limit||5}return t.prototype.setupOnce=function(){(0,i.c)((function(n,e){var i=(0,o.Gd)().getIntegration(t);return i?function(t,n,e,i){if(!(e.exception&&e.exception.values&&i&&(0,s.V9)(i.originalException,Error)))return e;var o=c(n,i.originalException,t);return e.exception.values=(0,r.fl)(o,e.exception.values),e}(i._key,i._limit,n,e):n}))},t.id="LinkedErrors",t}();function c(t,n,e,i){if(void 0===i&&(i=[]),!(0,s.V9)(n[e],Error)||i.length+1>=t)return i;var o=(0,a.GJ)(n[e]);return c(t,n[e],e,(0,r.fl)([o],i))}},3399:function(t,n,e){e.d(n,{p:function(){return c}});var r=e(334),i=e(5907),o=e(1995),s=e(9038),a=e(2634),u=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],c=function(){function t(n){this.name=t.id,this._options=(0,r.pi)({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},n)}return t.prototype.setupOnce=function(){var t=(0,i.R)();this._options.setTimeout&&(0,o.hl)(t,"setTimeout",f),this._options.setInterval&&(0,o.hl)(t,"setInterval",f),this._options.requestAnimationFrame&&(0,o.hl)(t,"requestAnimationFrame",p),this._options.XMLHttpRequest&&"XMLHttpRequest"in t&&(0,o.hl)(XMLHttpRequest.prototype,"send",d);var n=this._options.eventTarget;n&&(Array.isArray(n)?n:u).forEach(l)},t.id="TryCatch",t}();function f(t){return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var r=n[0];return n[0]=(0,a.re)(r,{mechanism:{data:{function:(0,s.$P)(t)},handled:!0,type:"instrument"}}),t.apply(this,n)}}function p(t){return function(n){return t.apply(this,[(0,a.re)(n,{mechanism:{data:{function:"requestAnimationFrame",handler:(0,s.$P)(t)},handled:!0,type:"instrument"}})])}}function d(t){return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var r=this,i=["onload","onerror","onprogress","onreadystatechange"];return i.forEach((function(t){t in r&&"function"==typeof r[t]&&(0,o.hl)(r,t,(function(n){var e={mechanism:{data:{function:t,handler:(0,s.$P)(n)},handled:!0,type:"instrument"}},r=(0,o.HK)(n);return r&&(e.mechanism.data.handler=(0,s.$P)(r)),(0,a.re)(n,e)}))})),t.apply(this,n)}}function l(t){var n=(0,i.R)(),e=n[t]&&n[t].prototype;e&&e.hasOwnProperty&&e.hasOwnProperty("addEventListener")&&((0,o.hl)(e,"addEventListener",(function(n){return function(e,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=(0,a.re)(r.handleEvent.bind(r),{mechanism:{data:{function:"handleEvent",handler:(0,s.$P)(r),target:t},handled:!0,type:"instrument"}}))}catch(o){}return n.apply(this,[e,(0,a.re)(r,{mechanism:{data:{function:"addEventListener",handler:(0,s.$P)(r),target:t},handled:!0,type:"instrument"}}),i])}})),(0,o.hl)(e,"removeEventListener",(function(t){return function(n,e,r){var i=e;try{var o=i&&i.__sentry_wrapped__;o&&t.call(this,n,o,r)}catch(s){}return t.call(this,n,i,r)}})))}},9992:function(t,n,e){e.d(n,{Z:function(){return a}});var r=e(334),i=e(1684),o=e(8585),s=(0,e(5907).R)(),a=function(){function t(){this.name=t.id}return t.prototype.setupOnce=function(){(0,i.c)((function(n){if((0,o.Gd)().getIntegration(t)){if(!s.navigator&&!s.location&&!s.document)return n;var e=n.request&&n.request.url||s.location&&s.location.href,i=(s.document||{}).referrer,a=(s.navigator||{}).userAgent,u=(0,r.pi)((0,r.pi)((0,r.pi)({},n.request&&n.request.headers),i&&{Referer:i}),a&&{"User-Agent":a}),c=(0,r.pi)((0,r.pi)({},e&&{url:e}),{headers:u});return(0,r.pi)((0,r.pi)({},n),{request:c})}return n}))},t.id="UserAgent",t}()},2456:function(t,n,e){e.d(n,{S1:function(){return b},yl:function(){return x}});var r=e(1061),i=e(6286),o=e(6853),s=e(8585),a=e(5907),u=e(8536),c=e(7946),f=e(4005),p=e(2314),d=e(7904),l=e(3399),h=e(8356),v=e(1228),y=e(3440),_=e(184),g=e(9992),m=[new r.QD,new i.c,new l.p,new h.O,new v.d,new y.iP,new _.I,new g.Z];function b(t){if(void 0===t&&(t={}),void 0===t.defaultIntegrations&&(t.defaultIntegrations=m),void 0===t.release){var n=(0,a.R)();n.SENTRY_RELEASE&&n.SENTRY_RELEASE.id&&(t.release=n.SENTRY_RELEASE.id)}void 0===t.autoSessionTracking&&(t.autoSessionTracking=!0),void 0===t.sendClientReports&&(t.sendClientReports=!0),(0,o.M)(p.R,t),t.autoSessionTracking&&function(){if(void 0===(0,a.R)().document)return void(d.h&&u.kg.warn("Session tracking in non-browser environment with @sentry/browser is not supported."));var t=(0,s.Gd)();if(!t.captureSession)return;w(t),(0,f.o)("history",(function(t){var n=t.from,e=t.to;void 0!==n&&n!==e&&w((0,s.Gd)())}))}()}function x(t){var n=(0,s.Gd)().getClient();return n?n.flush(t):(d.h&&u.kg.warn("Cannot flush events. No client defined."),(0,c.WD)(!1))}function w(t){t.startSession({ignoreDuration:!0}),t.captureSession()}},2224:function(t,n,e){e.d(n,{s$:function(){return u},Pi:function(){return p},aL:function(){return l},CS:function(){return v},ay:function(){return _}});var r=e(334),i="?";function o(t,n,e,r){var i={filename:t,function:n,in_app:!0};return void 0!==e&&(i.lineno=e),void 0!==r&&(i.colno=r),i}var s=/^\s*at (?:(.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,a=/\((\S*)(?::(\d+))(?::(\d+))\)/,u=[30,function(t){var n=s.exec(t);if(n){if(n[2]&&0===n[2].indexOf("eval")){var e=a.exec(n[2]);e&&(n[2]=e[1],n[3]=e[2],n[4]=e[3])}var u=(0,r.CR)(g(n[1]||i,n[2]),2),c=u[0];return o(u[1],c,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],c=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,f=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,p=[50,function(t){var n,e=c.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){var s=f.exec(e[3]);s&&(e[1]=e[1]||"eval",e[3]=s[1],e[4]=s[2],e[5]="")}var a=e[3],u=e[1]||i;return u=(n=(0,r.CR)(g(u,a),2))[0],o(a=n[1],u,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}}],d=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,l=[40,function(t){var n=d.exec(t);return n?o(n[2],n[1]||i,+n[3],n[4]?+n[4]:void 0):void 0}],h=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,v=[10,function(t){var n=h.exec(t);return n?o(n[2],n[3]||i,+n[1]):void 0}],y=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,_=[20,function(t){var n=y.exec(t);return n?o(n[5],n[3]||n[4]||i,+n[1],+n[2]):void 0}],g=function(t,n){var e=-1!==t.indexOf("safari-extension"),r=-1!==t.indexOf("safari-web-extension");return e||r?[-1!==t.indexOf("@")?t.split("@")[0]:i,e?"safari-extension:"+n:"safari-web-extension:"+n]:[t,n]}},6526:function(t,n,e){e.d(n,{d:function(){return g}});var r=e(334),i=e(4911),o=e(6508),s=e(5907),a=e(8963),u=e(8536),c=e(250),f=e(3135),p=e(6894),d=e(8886),l=e(1630),h=e(7904),v=e(5854);function y(t){return"event"===t?"error":t}var _=(0,s.R)(),g=function(){function t(t){var n=this;this.options=t,this._buffer=(0,a.x)(30),this._rateLimits={},this._outcomes={},this._api=(0,i.hd)(t.dsn,t._metadata,t.tunnel),this.url=(0,i.qi)(this._api.dsn),this.options.sendClientReports&&_.document&&_.document.addEventListener("visibilitychange",(function(){"hidden"===_.document.visibilityState&&n._flushOutcomes()}))}return t.prototype.sendEvent=function(t){return this._sendRequest((0,o.nA)(t,this._api),t)},t.prototype.sendSession=function(t){return this._sendRequest((0,o.Qz)(t,this._api),t)},t.prototype.close=function(t){return this._buffer.drain(t)},t.prototype.recordLostEvent=function(t,n){var e;if(this.options.sendClientReports){var r=y(n)+":"+t;h.h&&u.kg.log("Adding outcome: "+r),this._outcomes[r]=(null!=(e=this._outcomes[r])?e:0)+1}},t.prototype._flushOutcomes=function(){if(this.options.sendClientReports){var t=this._outcomes;if(this._outcomes={},Object.keys(t).length){h.h&&u.kg.log("Flushing outcomes:\n"+JSON.stringify(t,null,2));var n=(0,i.Ut)(this._api.dsn,this._api.tunnel),e=Object.keys(t).map((function(n){var e=(0,r.CR)(n.split(":"),2),i=e[0];return{reason:e[1],category:i,quantity:t[n]}})),o=(0,c.y)(e,this._api.tunnel&&(0,f.R)(this._api.dsn));try{(0,v.z)(n,(0,p.V$)(o))}catch(s){h.h&&u.kg.error(s)}}else h.h&&u.kg.log("No outcomes to flush")}},t.prototype._handleResponse=function(t){var n=t.requestType,e=t.response,r=t.headers,i=t.resolve,o=t.reject,s=(0,d.F)(e.status);this._rateLimits=(0,l.WG)(this._rateLimits,r),this._isRateLimited(n)&&h.h&&u.kg.warn("Too many "+n+" requests, backing off until: "+this._disabledUntil(n)),"success"!==s?o(e):i({status:s})},t.prototype._disabledUntil=function(t){var n=y(t);return new Date((0,l.ns)(this._rateLimits,n))},t.prototype._isRateLimited=function(t){var n=y(t);return(0,l.Q)(this._rateLimits,n)},t}()},6149:function(t,n,e){e.d(n,{V:function(){return c}});var r=e(334),i=e(9798),o=e(7946),s=e(4388),a=e(6526),u=e(5854),c=function(t){function n(n,e){void 0===e&&(e=(0,u.x)());var r=t.call(this,n)||this;return r._fetch=e,r}return(0,r.ZT)(n,t),n.prototype._sendRequest=function(t,n){var e=this;if(this._isRateLimited(t.type))return this.recordLostEvent("ratelimit_backoff",t.type),Promise.reject({event:n,type:t.type,reason:"Transport for "+t.type+" requests locked till "+this._disabledUntil(t.type)+" due to too many requests.",status:429});var r={body:t.body,method:"POST",referrerPolicy:(0,i.hv)()?"origin":""};return void 0!==this.options.fetchParameters&&Object.assign(r,this.options.fetchParameters),void 0!==this.options.headers&&(r.headers=this.options.headers),this._buffer.add((function(){return new o.cW((function(n,i){e._fetch(t.url,r).then((function(r){var o={"x-sentry-rate-limits":r.headers.get("X-Sentry-Rate-Limits"),"retry-after":r.headers.get("Retry-After")};e._handleResponse({requestType:t.type,response:r,headers:o,resolve:n,reject:i})})).catch(i)}))})).then(void 0,(function(n){throw n instanceof s.b?e.recordLostEvent("queue_overflow",t.type):e.recordLostEvent("network_error",t.type),n}))},n}(a.d)},1449:function(t,n,e){e.d(n,{k:function(){return s}});var r=e(334),i=e(1518),o=e(5854);function s(t,n){return void 0===n&&(n=(0,o.x)()),(0,i.qv)({bufferSize:t.bufferSize},(function(e){var i=(0,r.pi)({body:e.body,method:"POST",referrerPolicy:"origin"},t.requestOptions);return n(t.url,i).then((function(t){return t.text().then((function(n){return{body:n,headers:{"x-sentry-rate-limits":t.headers.get("X-Sentry-Rate-Limits"),"retry-after":t.headers.get("Retry-After")},reason:t.statusText,statusCode:t.status}}))}))}))}},4827:function(t,n,e){e.d(n,{H:function(){return o}});var r=e(1518),i=e(7946);function o(t){return(0,r.qv)({bufferSize:t.bufferSize},(function(n){return new i.cW((function(e,r){var i=new XMLHttpRequest;for(var o in i.onreadystatechange=function(){if(4===i.readyState){var t={body:i.response,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")},reason:i.statusText,statusCode:i.status};e(t)}},i.open("POST",t.url),t.headers)Object.prototype.hasOwnProperty.call(t.headers,o)&&i.setRequestHeader(o,t.headers[o]);i.send(n.body)}))}))}},5854:function(t,n,e){e.d(n,{x:function(){return f},z:function(){return p}});var r,i=e(5907),o=e(9798),s=e(8536),a=e(3518),u=e(7904),c=(0,i.R)();function f(){if(r)return r;if((0,o.Du)(c.fetch))return r=c.fetch.bind(c);var t=c.document,n=c.fetch;if(t&&"function"==typeof t.createElement)try{var e=t.createElement("iframe");e.hidden=!0,t.head.appendChild(e);var i=e.contentWindow;i&&i.fetch&&(n=i.fetch),t.head.removeChild(e)}catch(a){u.h&&s.kg.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",a)}return r=n.bind(c)}function p(t,n){if("[object Navigator]"===Object.prototype.toString.call(c&&c.navigator)&&"function"==typeof c.navigator.sendBeacon)return c.navigator.sendBeacon.bind(c.navigator)(t,n);if((0,o.Ak)()){var e=f();return(0,a.I)(e(t,{body:n,method:"POST",credentials:"omit",keepalive:!0}))}}},6144:function(t,n,e){e.d(n,{w:function(){return s}});var r=e(334),i=e(7946),o=e(4388),s=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return(0,r.ZT)(n,t),n.prototype._sendRequest=function(t,n){var e=this;return this._isRateLimited(t.type)?(this.recordLostEvent("ratelimit_backoff",t.type),Promise.reject({event:n,type:t.type,reason:"Transport for "+t.type+" requests locked till "+this._disabledUntil(t.type)+" due to too many requests.",status:429})):this._buffer.add((function(){return new i.cW((function(n,r){var i=new XMLHttpRequest;for(var o in i.onreadystatechange=function(){if(4===i.readyState){var o={"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")};e._handleResponse({requestType:t.type,response:i,headers:o,resolve:n,reject:r})}},i.open("POST",t.url),e.options.headers)Object.prototype.hasOwnProperty.call(e.options.headers,o)&&i.setRequestHeader(o,e.options.headers[o]);i.send(t.body)}))})).then(void 0,(function(n){throw n instanceof o.b?e.recordLostEvent("queue_overflow",t.type):e.recordLostEvent("network_error",t.type),n}))},n}(e(6526).d)},334:function(t,n,e){e.d(n,{ZT:function(){return i},pi:function(){return o},CR:function(){return s},fl:function(){return a}});
|
2 |
Â
/*! *****************************************************************************
|
3 |
Â
Copyright (c) Microsoft Corporation.
|
4 |
Â
|
13 |
Â
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
14 |
Â
PERFORMANCE OF THIS SOFTWARE.
|
15 |
Â
***************************************************************************** */
|
16 |
+
var r=function(t,n){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)n.hasOwnProperty(e)&&(t[e]=n[e])},r(t,n)};function i(t,n){function __(){this.constructor=t}r(t,n),t.prototype=null===n?Object.create(n):(__.prototype=n.prototype,new __)}var o=function(){return o=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var i in n=arguments[e])Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t},o.apply(this,arguments)};function s(t,n){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var r,i,o=e.call(t),s=[];try{for(;(void 0===n||n-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return s}function a(){for(var t=[],n=0;n<arguments.length;n++)t=t.concat(s(arguments[n]));return t}},4911:function(t,n,e){e.d(n,{hd:function(){return o},qi:function(){return f},Ut:function(){return p},hR:function(){return d}});var r=e(3135),i=e(1995);!function(){function t(t,n,e){void 0===n&&(n={}),this.dsn=t,this._dsnObject=(0,r.v)(t),this.metadata=n,this._tunnel=e}t.prototype.getDsn=function(){return this._dsnObject},t.prototype.forceEnvelope=function(){return!!this._tunnel},t.prototype.getBaseApiEndpoint=function(){return s(this._dsnObject)},t.prototype.getStoreEndpoint=function(){return c(this._dsnObject)},t.prototype.getStoreEndpointWithUrlEncodedAuth=function(){return f(this._dsnObject)},t.prototype.getEnvelopeEndpointWithUrlEncodedAuth=function(){return p(this._dsnObject,this._tunnel)}}();function o(t,n,e){return{initDsn:t,metadata:n||{},dsn:(0,r.v)(t),tunnel:e}}function s(t){var n=t.protocol?t.protocol+":":"",e=t.port?":"+t.port:"";return n+"//"+t.host+e+(t.path?"/"+t.path:"")+"/api/"}function a(t,n){return""+s(t)+t.projectId+"/"+n+"/"}function u(t){return(0,i._j)({sentry_key:t.publicKey,sentry_version:"7"})}function c(t){return a(t,"store")}function f(t){return c(t)+"?"+u(t)}function p(t,n){return n||function(t){return a(t,"envelope")}(t)+"?"+u(t)}function d(t,n){var e=(0,r.v)(t),i=s(e)+"embed/error-page/",o="dsn="+(0,r.R)(e);for(var a in n)if("dsn"!==a)if("user"===a){if(!n.user)continue;n.user.name&&(o+="&name="+encodeURIComponent(n.user.name)),n.user.email&&(o+="&email="+encodeURIComponent(n.user.email))}else o+="&"+encodeURIComponent(a)+"="+encodeURIComponent(n[a]);return i+"?"+o}},9504:function(t,n,e){e.d(n,{N:function(){return f}});var r=e(5733),i=e(8536),o=e(4388),s=e(4911),a=e(428),u=e(6508),c=e(3926),f=function(){function t(t){this._options=t,this._options.dsn||a.h&&i.kg.warn("No DSN provided, backend will not do anything."),this._transport=this._setupTransport()}return t.prototype.eventFromException=function(t,n){throw new o.b("Backend has to implement `eventFromException` method")},t.prototype.eventFromMessage=function(t,n,e){throw new o.b("Backend has to implement `eventFromMessage` method")},t.prototype.sendEvent=function(t){if(this._newTransport&&this._options.dsn&&this._options._experiments&&this._options._experiments.newTransport){var n=(0,s.hd)(this._options.dsn,this._options._metadata,this._options.tunnel),e=(0,u.Mq)(t,n);this._newTransport.send(e).then(null,(function(t){a.h&&i.kg.error("Error while sending event:",t)}))}else this._transport.sendEvent(t).then(null,(function(t){a.h&&i.kg.error("Error while sending event:",t)}))},t.prototype.sendSession=function(t){if(this._transport.sendSession)if(this._newTransport&&this._options.dsn&&this._options._experiments&&this._options._experiments.newTransport){var n=(0,s.hd)(this._options.dsn,this._options._metadata,this._options.tunnel),e=(0,r.CR)((0,u.Q3)(t,n),1)[0];this._newTransport.send(e).then(null,(function(t){a.h&&i.kg.error("Error while sending session:",t)}))}else this._transport.sendSession(t).then(null,(function(t){a.h&&i.kg.error("Error while sending session:",t)}));else a.h&&i.kg.warn("Dropping session because custom transport doesn't implement sendSession")},t.prototype.getTransport=function(){return this._transport},t.prototype._setupTransport=function(){return new c.V},t}()},9849:function(t,n,e){e.d(n,{W:function(){return _}});var r=e(5733),i=e(1684),o=e(3135),s=e(3699),a=e(8536),u=e(1757),c=e(7946),f=e(7790),p=e(8035),d=e(9660),l=e(4388),h=e(428),v=e(8889),y="Not capturing exception because it's already been captured.",_=function(){function t(t,n){this._integrations={},this._numProcessing=0,this._backend=new t(n),this._options=n,n.dsn&&(this._dsn=(0,o.v)(n.dsn))}return t.prototype.captureException=function(t,n,e){var r=this;if(!(0,s.YO)(t)){var i=n&&n.event_id;return this._process(this._getBackend().eventFromException(t,n).then((function(t){return r._captureEvent(t,n,e)})).then((function(t){i=t}))),i}h.h&&a.kg.log(y)},t.prototype.captureMessage=function(t,n,e,r){var i=this,o=e&&e.event_id,s=(0,u.pt)(t)?this._getBackend().eventFromMessage(String(t),n,e):this._getBackend().eventFromException(t,e);return this._process(s.then((function(t){return i._captureEvent(t,e,r)})).then((function(t){o=t}))),o},t.prototype.captureEvent=function(t,n,e){if(!(n&&n.originalException&&(0,s.YO)(n.originalException))){var r=n&&n.event_id;return this._process(this._captureEvent(t,n,e).then((function(t){r=t}))),r}h.h&&a.kg.log(y)},t.prototype.captureSession=function(t){this._isEnabled()?"string"!=typeof t.release?h.h&&a.kg.warn("Discarded session because of missing or non-string release"):(this._sendSession(t),t.update({init:!1})):h.h&&a.kg.warn("SDK not enabled, will not capture session.")},t.prototype.getDsn=function(){return this._dsn},t.prototype.getOptions=function(){return this._options},t.prototype.getTransport=function(){return this._getBackend().getTransport()},t.prototype.flush=function(t){var n=this;return this._isClientDoneProcessing(t).then((function(e){return n.getTransport().close(t).then((function(t){return e&&t}))}))},t.prototype.close=function(t){var n=this;return this.flush(t).then((function(t){return n.getOptions().enabled=!1,t}))},t.prototype.setupIntegrations=function(){this._isEnabled()&&!this._integrations.initialized&&(this._integrations=(0,v.q4)(this._options))},t.prototype.getIntegration=function(t){try{return this._integrations[t.id]||null}catch(n){return h.h&&a.kg.warn("Cannot retrieve integration "+t.id+" from the current Client"),null}},t.prototype._updateSessionFromEvent=function(t,n){var e,i,o=!1,s=!1,a=n.exception&&n.exception.values;if(a){s=!0;try{for(var u=(0,r.XA)(a),c=u.next();!c.done;c=u.next()){var f=c.value.mechanism;if(f&&!1===f.handled){o=!0;break}}}catch(d){e={error:d}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(e)throw e.error}}}var p="ok"===t.status;(p&&0===t.errors||p&&o)&&(t.update((0,r.pi)((0,r.pi)({},o&&{status:"crashed"}),{errors:t.errors||Number(s||o)})),this.captureSession(t))},t.prototype._sendSession=function(t){this._getBackend().sendSession(t)},t.prototype._isClientDoneProcessing=function(t){var n=this;return new c.cW((function(e){var r=0,i=setInterval((function(){0==n._numProcessing?(clearInterval(i),e(!0)):(r+=1,t&&r>=t&&(clearInterval(i),e(!1)))}),1)}))},t.prototype._getBackend=function(){return this._backend},t.prototype._isEnabled=function(){return!1!==this.getOptions().enabled&&void 0!==this._dsn},t.prototype._prepareEvent=function(t,n,e){var o=this,a=this.getOptions(),u=a.normalizeDepth,d=void 0===u?3:u,l=a.normalizeMaxBreadth,h=void 0===l?1e3:l,v=(0,r.pi)((0,r.pi)({},t),{event_id:t.event_id||(e&&e.event_id?e.event_id:(0,s.DM)()),timestamp:t.timestamp||(0,f.yW)()});this._applyClientOptions(v),this._applyIntegrationsMetadata(v);var y=n;e&&e.captureContext&&(y=i.s.clone(y).update(e.captureContext));var _=(0,c.WD)(v);return y&&(_=y.applyToEvent(v,e)),_.then((function(t){return t&&(t.sdkProcessingMetadata=(0,r.pi)((0,r.pi)({},t.sdkProcessingMetadata),{normalizeDepth:(0,p.Fv)(d)+" ("+typeof d+")"})),"number"==typeof d&&d>0?o._normalizeEvent(t,d,h):t}))},t.prototype._normalizeEvent=function(t,n,e){if(!t)return null;var i=(0,r.pi)((0,r.pi)((0,r.pi)((0,r.pi)((0,r.pi)({},t),t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map((function(t){return(0,r.pi)((0,r.pi)({},t),t.data&&{data:(0,p.Fv)(t.data,n,e)})}))}),t.user&&{user:(0,p.Fv)(t.user,n,e)}),t.contexts&&{contexts:(0,p.Fv)(t.contexts,n,e)}),t.extra&&{extra:(0,p.Fv)(t.extra,n,e)});return t.contexts&&t.contexts.trace&&(i.contexts.trace=t.contexts.trace),i.sdkProcessingMetadata=(0,r.pi)((0,r.pi)({},i.sdkProcessingMetadata),{baseClientNormalized:!0}),i},t.prototype._applyClientOptions=function(t){var n=this.getOptions(),e=n.environment,r=n.release,i=n.dist,o=n.maxValueLength,s=void 0===o?250:o;"environment"in t||(t.environment="environment"in n?e:"production"),void 0===t.release&&void 0!==r&&(t.release=r),void 0===t.dist&&void 0!==i&&(t.dist=i),t.message&&(t.message=(0,d.$G)(t.message,s));var a=t.exception&&t.exception.values&&t.exception.values[0];a&&a.value&&(a.value=(0,d.$G)(a.value,s));var u=t.request;u&&u.url&&(u.url=(0,d.$G)(u.url,s))},t.prototype._applyIntegrationsMetadata=function(t){var n=Object.keys(this._integrations);n.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=(0,r.fl)(t.sdk.integrations||[],n))},t.prototype._sendEvent=function(t){this._getBackend().sendEvent(t)},t.prototype._captureEvent=function(t,n,e){return this._processEvent(t,n,e).then((function(t){return t.event_id}),(function(t){h.h&&a.kg.error(t)}))},t.prototype._processEvent=function(t,n,e){var r=this,i=this.getOptions(),o=i.beforeSend,s=i.sampleRate,a=this.getTransport();function f(t,n){a.recordLostEvent&&a.recordLostEvent(t,n)}if(!this._isEnabled())return(0,c.$2)(new l.b("SDK not enabled, will not capture event."));var p="transaction"===t.type;return!p&&"number"==typeof s&&Math.random()>s?(f("sample_rate","event"),(0,c.$2)(new l.b("Discarding event because it's not included in the random sample (sampling rate = "+s+")"))):this._prepareEvent(t,e,n).then((function(e){if(null===e)throw f("event_processor",t.type||"event"),new l.b("An event processor returned null, will not send event.");return n&&n.data&&!0===n.data.__sentry__||p||!o?e:function(t){var n="`beforeSend` method has to return `null` or a valid event.";if((0,u.J8)(t))return t.then((function(t){if(!(0,u.PO)(t)&&null!==t)throw new l.b(n);return t}),(function(t){throw new l.b("beforeSend rejected with "+t)}));if(!(0,u.PO)(t)&&null!==t)throw new l.b(n);return t}(o(e,n))})).then((function(n){if(null===n)throw f("before_send",t.type||"event"),new l.b("`beforeSend` returned `null`, will not send event.");var i=e&&e.getSession&&e.getSession();return!p&&i&&r._updateSessionFromEvent(i,n),r._sendEvent(n),n})).then(null,(function(t){if(t instanceof l.b)throw t;throw r.captureException(t,{data:{__sentry__:!0},originalException:t}),new l.b("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: "+t)}))},t.prototype._process=function(t){var n=this;this._numProcessing+=1,t.then((function(t){return n._numProcessing-=1,t}),(function(t){return n._numProcessing-=1,t}))},t}()},428:function(t,n,e){e.d(n,{h:function(){return r}});var r="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__},8889:function(t,n,e){e.d(n,{q4:function(){return p}});var r=e(5733),i=e(1684),o=e(8585),s=e(8536),a=e(1995),u=e(428),c=[];function f(t){return t.reduce((function(t,n){return t.every((function(t){return n.name!==t.name}))&&t.push(n),t}),[])}function p(t){var n={};return function(t){var n=t.defaultIntegrations&&(0,r.fl)(t.defaultIntegrations)||[],e=t.integrations,i=(0,r.fl)(f(n));Array.isArray(e)?i=(0,r.fl)(i.filter((function(t){return e.every((function(n){return n.name!==t.name}))})),f(e)):"function"==typeof e&&(i=e(i),i=Array.isArray(i)?i:[i]);var o=i.map((function(t){return t.name})),s="Debug";return-1!==o.indexOf(s)&&i.push.apply(i,(0,r.fl)(i.splice(o.indexOf(s),1))),i}(t).forEach((function(t){n[t.name]=t,function(t){-1===c.indexOf(t.name)&&(t.setupOnce(i.c,o.Gd),c.push(t.name),u.h&&s.kg.log("Integration installed: "+t.name))}(t)})),(0,a.xp)(n,"initialized",!0),n}},6286:function(t,n,e){e.d(n,{c:function(){return o}});var r,i=e(1995),o=function(){function t(){this.name=t.id}return t.prototype.setupOnce=function(){r=Function.prototype.toString,Function.prototype.toString=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var e=(0,i.HK)(this)||this;return r.apply(e,t)}},t.id="FunctionToString",t}()},1061:function(t,n,e){e.d(n,{QD:function(){return c}});var r=e(5733),i=e(8536),o=e(3699),s=e(9660),a=e(428),u=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],c=function(){function t(n){void 0===n&&(n={}),this._options=n,this.name=t.id}return t.prototype.setupOnce=function(n,e){n((function(n){var c=e();if(c){var f=c.getIntegration(t);if(f){var d=c.getClient(),l=d?d.getOptions():{},h=function(t,n){void 0===t&&(t={});void 0===n&&(n={});return{allowUrls:(0,r.fl)(t.whitelistUrls||[],t.allowUrls||[],n.whitelistUrls||[],n.allowUrls||[]),denyUrls:(0,r.fl)(t.blacklistUrls||[],t.denyUrls||[],n.blacklistUrls||[],n.denyUrls||[]),ignoreErrors:(0,r.fl)(t.ignoreErrors||[],n.ignoreErrors||[],u),ignoreInternal:void 0===t.ignoreInternal||t.ignoreInternal}}(f._options,l);return function(t,n){if(n.ignoreInternal&&function(t){try{return"SentryError"===t.exception.values[0].type}catch(n){}return!1}(t))return a.h&&i.kg.warn("Event dropped due to being internal Sentry Error.\nEvent: "+(0,o.jH)(t)),!0;if(function(t,n){if(!n||!n.length)return!1;return function(t){if(t.message)return[t.message];if(t.exception)try{var n=t.exception.values&&t.exception.values[0]||{},e=n.type,r=void 0===e?"":e,s=n.value,u=void 0===s?"":s;return[""+u,r+": "+u]}catch(c){return a.h&&i.kg.error("Cannot extract message for event "+(0,o.jH)(t)),[]}return[]}(t).some((function(t){return n.some((function(n){return(0,s.zC)(t,n)}))}))}(t,n.ignoreErrors))return a.h&&i.kg.warn("Event dropped due to being matched by `ignoreErrors` option.\nEvent: "+(0,o.jH)(t)),!0;if(function(t,n){if(!n||!n.length)return!1;var e=p(t);return!!e&&n.some((function(t){return(0,s.zC)(e,t)}))}(t,n.denyUrls))return a.h&&i.kg.warn("Event dropped due to being matched by `denyUrls` option.\nEvent: "+(0,o.jH)(t)+".\nUrl: "+p(t)),!0;if(!function(t,n){if(!n||!n.length)return!0;var e=p(t);return!e||n.some((function(t){return(0,s.zC)(e,t)}))}(t,n.allowUrls))return a.h&&i.kg.warn("Event dropped due to not being matched by `allowUrls` option.\nEvent: "+(0,o.jH)(t)+".\nUrl: "+p(t)),!0;return!1}(n,h)?null:n}}return n}))},t.id="InboundFilters",t}();function f(t){void 0===t&&(t=[]);for(var n=t.length-1;n>=0;n--){var e=t[n];if(e&&"<anonymous>"!==e.filename&&"[native code]"!==e.filename)return e.filename||null}return null}function p(t){try{if(t.stacktrace)return f(t.stacktrace.frames);var n;try{n=t.exception.values[0].stacktrace.frames}catch(e){}return n?f(n):null}catch(r){return a.h&&i.kg.error("Cannot extract url for event "+(0,o.jH)(t)),null}}},6508:function(t,n,e){e.d(n,{Q3:function(){return f},Qz:function(){return p},Mq:function(){return d},nA:function(){return l}});var r=e(5733),i=e(3135),o=e(6894),s=e(8035),a=e(4911);function u(t){if(t.metadata&&t.metadata.sdk){var n=t.metadata.sdk;return{name:n.name,version:n.version}}}function c(t,n){return n?(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||n.name,t.sdk.version=t.sdk.version||n.version,t.sdk.integrations=(0,r.fl)(t.sdk.integrations||[],n.integrations||[]),t.sdk.packages=(0,r.fl)(t.sdk.packages||[],n.packages||[]),t):t}function f(t,n){var e=u(n),s=(0,r.pi)((0,r.pi)({sent_at:(new Date).toISOString()},e&&{sdk:e}),!!n.tunnel&&{dsn:(0,i.R)(n.dsn)}),a="aggregates"in t?"sessions":"session",c=[{type:a},t];return[(0,o.Jd)(s,[c]),a]}function p(t,n){var e=(0,r.CR)(f(t,n),2),i=e[0],s=e[1];return{body:(0,o.V$)(i),type:s,url:(0,a.Ut)(n.dsn,n.tunnel)}}function d(t,n){var e=u(n),s=t.type||"event",a=(t.sdkProcessingMetadata||{}).transactionSampling||{},f=a.method,p=a.rate;c(t,n.metadata.sdk),t.tags=t.tags||{},t.extra=t.extra||{},t.sdkProcessingMetadata&&t.sdkProcessingMetadata.baseClientNormalized||(t.tags.skippedNormalization=!0,t.extra.normalizeDepth=t.sdkProcessingMetadata?t.sdkProcessingMetadata.normalizeDepth:"unset"),delete t.sdkProcessingMetadata;var d=(0,r.pi)((0,r.pi)({event_id:t.event_id,sent_at:(new Date).toISOString()},e&&{sdk:e}),!!n.tunnel&&{dsn:(0,i.R)(n.dsn)}),l=[{type:s,sample_rates:[{id:f,rate:p}]},t];return(0,o.Jd)(d,[l])}function l(t,n){var e,f=u(n),p=t.type||"event",d="transaction"===p||!!n.tunnel,l=(t.sdkProcessingMetadata||{}).transactionSampling||{},h=l.method,v=l.rate;c(t,n.metadata.sdk),t.tags=t.tags||{},t.extra=t.extra||{},t.sdkProcessingMetadata&&t.sdkProcessingMetadata.baseClientNormalized||(t.tags.skippedNormalization=!0,t.extra.normalizeDepth=t.sdkProcessingMetadata?t.sdkProcessingMetadata.normalizeDepth:"unset"),delete t.sdkProcessingMetadata;try{e=JSON.stringify(t)}catch(x){t.tags.JSONStringifyError=!0,t.extra.JSONStringifyError=x;try{e=JSON.stringify((0,s.Fv)(t))}catch(w){var y=w;e=JSON.stringify({message:"JSON.stringify error after renormalization",extra:{message:y.message,stack:y.stack}})}}var _={body:e,type:p,url:d?(0,a.Ut)(n.dsn,n.tunnel):(0,a.qi)(n.dsn)};if(d){var g=(0,r.pi)((0,r.pi)({event_id:t.event_id,sent_at:(new Date).toISOString()},f&&{sdk:f}),!!n.tunnel&&{dsn:(0,i.R)(n.dsn)}),m=[{type:p,sample_rates:[{id:h,rate:v}]},_.body],b=(0,o.Jd)(g,[m]);_.body=(0,o.V$)(b)}return _}},6853:function(t,n,e){e.d(n,{M:function(){return s}});var r=e(8585),i=e(8536),o=e(428);function s(t,n){!0===n.debug&&(o.h?i.kg.enable():console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle."));var e=(0,r.Gd)(),s=e.getScope();s&&s.update(n.initialScope);var a=new t(n);e.bindClient(a)}},1518:function(t,n,e){e.d(n,{qv:function(){return u}});var r=e(8963),i=e(6894),o=e(1630),s=e(7946),a=e(8886);function u(t,n,e){void 0===e&&(e=(0,r.x)(t.bufferSize||30));var u={};return{send:function(t){var r=(0,i.y7)(t),f="event"===r?"error":r,p={category:f,body:(0,i.V$)(t)};return(0,o.Q)(u,f)?(0,s.$2)({status:"rate_limit",reason:c(u,f)}):e.add((function(){return n(p).then((function(t){var n=t.body,e=t.headers,r=t.reason,i=t.statusCode,p=(0,a.F)(i);return e&&(u=(0,o.WG)(u,e)),"success"===p?(0,s.WD)({status:p,reason:r}):(0,s.$2)({status:p,reason:r||n||("rate_limit"===p?c(u,f):"Unknown transport error")})}))}))},flush:function(t){return e.drain(t)}}}function c(t,n){return"Too many "+n+" requests, backing off until: "+new Date((0,o.ns)(t,n)).toISOString()}},3926:function(t,n,e){e.d(n,{V:function(){return i}});var r=e(7946),i=function(){function t(){}return t.prototype.sendEvent=function(t){return(0,r.WD)({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:"skipped"})},t.prototype.close=function(t){return(0,r.WD)(!0)},t}()},1476:function(t,n,e){e.d(n,{J:function(){return r}});var r="6.19.6"},5733:function(t,n,e){e.d(n,{pi:function(){return r},XA:function(){return i},CR:function(){return o},fl:function(){return s}});var r=function(){return r=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var i in n=arguments[e])Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t},r.apply(this,arguments)};function i(t){var n="function"==typeof Symbol&&Symbol.iterator,e=n&&t[n],r=0;if(e)return e.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function o(t,n){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var r,i,o=e.call(t),s=[];try{for(;(void 0===n||n-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return s}function s(){for(var t=[],n=0;n<arguments.length;n++)t=t.concat(o(arguments[n]));return t}},1299:function(t,n,e){e.d(n,{h:function(){return r}});var r="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__},8585:function(t,n,e){e.d(n,{Gd:function(){return v}});var r=e(8773),i=e(3699),o=e(7790),s=e(8536),a=e(5907),u=e(7392),c=e(1299),f=e(1684),p=e(2430),d=function(){function t(t,n,e){void 0===n&&(n=new f.s),void 0===e&&(e=4),this._version=e,this._stack=[{}],this.getStackTop().scope=n,t&&this.bindClient(t)}return t.prototype.isOlderThan=function(t){return this._version<t},t.prototype.bindClient=function(t){this.getStackTop().client=t,t&&t.setupIntegrations&&t.setupIntegrations()},t.prototype.pushScope=function(){var t=f.s.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:t}),t},t.prototype.popScope=function(){return!(this.getStack().length<=1)&&!!this.getStack().pop()},t.prototype.withScope=function(t){var n=this.pushScope();try{t(n)}finally{this.popScope()}},t.prototype.getClient=function(){return this.getStackTop().client},t.prototype.getScope=function(){return this.getStackTop().scope},t.prototype.getStack=function(){return this._stack},t.prototype.getStackTop=function(){return this._stack[this._stack.length-1]},t.prototype.captureException=function(t,n){var e=this._lastEventId=n&&n.event_id?n.event_id:(0,i.DM)(),o=n;if(!n){var s=void 0;try{throw new Error("Sentry syntheticException")}catch(t){s=t}o={originalException:t,syntheticException:s}}return this._invokeClient("captureException",t,(0,r.pi)((0,r.pi)({},o),{event_id:e})),e},t.prototype.captureMessage=function(t,n,e){var o=this._lastEventId=e&&e.event_id?e.event_id:(0,i.DM)(),s=e;if(!e){var a=void 0;try{throw new Error(t)}catch(u){a=u}s={originalException:t,syntheticException:a}}return this._invokeClient("captureMessage",t,n,(0,r.pi)((0,r.pi)({},s),{event_id:o})),o},t.prototype.captureEvent=function(t,n){var e=n&&n.event_id?n.event_id:(0,i.DM)();return"transaction"!==t.type&&(this._lastEventId=e),this._invokeClient("captureEvent",t,(0,r.pi)((0,r.pi)({},n),{event_id:e})),e},t.prototype.lastEventId=function(){return this._lastEventId},t.prototype.addBreadcrumb=function(t,n){var e=this.getStackTop(),i=e.scope,a=e.client;if(i&&a){var u=a.getOptions&&a.getOptions()||{},c=u.beforeBreadcrumb,f=void 0===c?null:c,p=u.maxBreadcrumbs,d=void 0===p?100:p;if(!(d<=0)){var l=(0,o.yW)(),h=(0,r.pi)({timestamp:l},t),v=f?(0,s.Cf)((function(){return f(h,n)})):h;null!==v&&i.addBreadcrumb(v,d)}}},t.prototype.setUser=function(t){var n=this.getScope();n&&n.setUser(t)},t.prototype.setTags=function(t){var n=this.getScope();n&&n.setTags(t)},t.prototype.setExtras=function(t){var n=this.getScope();n&&n.setExtras(t)},t.prototype.setTag=function(t,n){var e=this.getScope();e&&e.setTag(t,n)},t.prototype.setExtra=function(t,n){var e=this.getScope();e&&e.setExtra(t,n)},t.prototype.setContext=function(t,n){var e=this.getScope();e&&e.setContext(t,n)},t.prototype.configureScope=function(t){var n=this.getStackTop(),e=n.scope,r=n.client;e&&r&&t(e)},t.prototype.run=function(t){var n=h(this);try{t(this)}finally{h(n)}},t.prototype.getIntegration=function(t){var n=this.getClient();if(!n)return null;try{return n.getIntegration(t)}catch(e){return c.h&&s.kg.warn("Cannot retrieve integration "+t.id+" from the current Hub"),null}},t.prototype.startSpan=function(t){return this._callExtensionMethod("startSpan",t)},t.prototype.startTransaction=function(t,n){return this._callExtensionMethod("startTransaction",t,n)},t.prototype.traceHeaders=function(){return this._callExtensionMethod("traceHeaders")},t.prototype.captureSession=function(t){if(void 0===t&&(t=!1),t)return this.endSession();this._sendSessionUpdate()},t.prototype.endSession=function(){var t=this.getStackTop(),n=t&&t.scope,e=n&&n.getSession();e&&e.close(),this._sendSessionUpdate(),n&&n.setSession()},t.prototype.startSession=function(t){var n=this.getStackTop(),e=n.scope,i=n.client,o=i&&i.getOptions()||{},s=o.release,u=o.environment,c=((0,a.R)().navigator||{}).userAgent,f=new p.z((0,r.pi)((0,r.pi)((0,r.pi)({release:s,environment:u},e&&{user:e.getUser()}),c&&{userAgent:c}),t));if(e){var d=e.getSession&&e.getSession();d&&"ok"===d.status&&d.update({status:"exited"}),this.endSession(),e.setSession(f)}return f},t.prototype._sendSessionUpdate=function(){var t=this.getStackTop(),n=t.scope,e=t.client;if(n){var r=n.getSession&&n.getSession();r&&e&&e.captureSession&&e.captureSession(r)}},t.prototype._invokeClient=function(t){for(var n,e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];var o=this.getStackTop(),s=o.scope,a=o.client;a&&a[t]&&(n=a)[t].apply(n,(0,r.fl)(e,[s]))},t.prototype._callExtensionMethod=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];var r=l(),i=r.__SENTRY__;if(i&&i.extensions&&"function"==typeof i.extensions[t])return i.extensions[t].apply(this,n);c.h&&s.kg.warn("Extension method "+t+" couldn't be found, doing nothing.")},t}();function l(){var t=(0,a.R)();return t.__SENTRY__=t.__SENTRY__||{extensions:{},hub:void 0},t}function h(t){var n=l(),e=_(n);return g(n,t),e}function v(){var t=l();return y(t)&&!_(t).isOlderThan(4)||g(t,new d),(0,u.KV)()?function(t){try{var n=l().__SENTRY__,e=n&&n.extensions&&n.extensions.domain&&n.extensions.domain.active;if(!e)return _(t);if(!y(e)||_(e).isOlderThan(4)){var r=_(t).getStackTop();g(e,new d(r.client,f.s.clone(r.scope)))}return _(e)}catch(i){return _(t)}}(t):_(t)}function y(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function _(t){return(0,a.Y)("hub",(function(){return new d}),t)}function g(t,n){return!!t&&((t.__SENTRY__=t.__SENTRY__||{}).hub=n,!0)}},1684:function(t,n,e){e.d(n,{s:function(){return u},c:function(){return f}});var r=e(8773),i=e(1757),o=e(7790),s=e(7946),a=e(5907),u=function(){function t(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}return t.clone=function(n){var e=new t;return n&&(e._breadcrumbs=(0,r.fl)(n._breadcrumbs),e._tags=(0,r.pi)({},n._tags),e._extra=(0,r.pi)({},n._extra),e._contexts=(0,r.pi)({},n._contexts),e._user=n._user,e._level=n._level,e._span=n._span,e._session=n._session,e._transactionName=n._transactionName,e._fingerprint=n._fingerprint,e._eventProcessors=(0,r.fl)(n._eventProcessors),e._requestSession=n._requestSession),e},t.prototype.addScopeListener=function(t){this._scopeListeners.push(t)},t.prototype.addEventProcessor=function(t){return this._eventProcessors.push(t),this},t.prototype.setUser=function(t){return this._user=t||{},this._session&&this._session.update({user:t}),this._notifyScopeListeners(),this},t.prototype.getUser=function(){return this._user},t.prototype.getRequestSession=function(){return this._requestSession},t.prototype.setRequestSession=function(t){return this._requestSession=t,this},t.prototype.setTags=function(t){return this._tags=(0,r.pi)((0,r.pi)({},this._tags),t),this._notifyScopeListeners(),this},t.prototype.setTag=function(t,n){var e;return this._tags=(0,r.pi)((0,r.pi)({},this._tags),((e={})[t]=n,e)),this._notifyScopeListeners(),this},t.prototype.setExtras=function(t){return this._extra=(0,r.pi)((0,r.pi)({},this._extra),t),this._notifyScopeListeners(),this},t.prototype.setExtra=function(t,n){var e;return this._extra=(0,r.pi)((0,r.pi)({},this._extra),((e={})[t]=n,e)),this._notifyScopeListeners(),this},t.prototype.setFingerprint=function(t){return this._fingerprint=t,this._notifyScopeListeners(),this},t.prototype.setLevel=function(t){return this._level=t,this._notifyScopeListeners(),this},t.prototype.setTransactionName=function(t){return this._transactionName=t,this._notifyScopeListeners(),this},t.prototype.setTransaction=function(t){return this.setTransactionName(t)},t.prototype.setContext=function(t,n){var e;return null===n?delete this._contexts[t]:this._contexts=(0,r.pi)((0,r.pi)({},this._contexts),((e={})[t]=n,e)),this._notifyScopeListeners(),this},t.prototype.setSpan=function(t){return this._span=t,this._notifyScopeListeners(),this},t.prototype.getSpan=function(){return this._span},t.prototype.getTransaction=function(){var t=this.getSpan();return t&&t.transaction},t.prototype.setSession=function(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this},t.prototype.getSession=function(){return this._session},t.prototype.update=function(n){if(!n)return this;if("function"==typeof n){var e=n(this);return e instanceof t?e:this}return n instanceof t?(this._tags=(0,r.pi)((0,r.pi)({},this._tags),n._tags),this._extra=(0,r.pi)((0,r.pi)({},this._extra),n._extra),this._contexts=(0,r.pi)((0,r.pi)({},this._contexts),n._contexts),n._user&&Object.keys(n._user).length&&(this._user=n._user),n._level&&(this._level=n._level),n._fingerprint&&(this._fingerprint=n._fingerprint),n._requestSession&&(this._requestSession=n._requestSession)):(0,i.PO)(n)&&(n=n,this._tags=(0,r.pi)((0,r.pi)({},this._tags),n.tags),this._extra=(0,r.pi)((0,r.pi)({},this._extra),n.extra),this._contexts=(0,r.pi)((0,r.pi)({},this._contexts),n.contexts),n.user&&(this._user=n.user),n.level&&(this._level=n.level),n.fingerprint&&(this._fingerprint=n.fingerprint),n.requestSession&&(this._requestSession=n.requestSession)),this},t.prototype.clear=function(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this},t.prototype.addBreadcrumb=function(t,n){var e="number"==typeof n?Math.min(n,100):100;if(e<=0)return this;var i=(0,r.pi)({timestamp:(0,o.yW)()},t);return this._breadcrumbs=(0,r.fl)(this._breadcrumbs,[i]).slice(-e),this._notifyScopeListeners(),this},t.prototype.clearBreadcrumbs=function(){return this._breadcrumbs=[],this._notifyScopeListeners(),this},t.prototype.applyToEvent=function(t,n){if(this._extra&&Object.keys(this._extra).length&&(t.extra=(0,r.pi)((0,r.pi)({},this._extra),t.extra)),this._tags&&Object.keys(this._tags).length&&(t.tags=(0,r.pi)((0,r.pi)({},this._tags),t.tags)),this._user&&Object.keys(this._user).length&&(t.user=(0,r.pi)((0,r.pi)({},this._user),t.user)),this._contexts&&Object.keys(this._contexts).length&&(t.contexts=(0,r.pi)((0,r.pi)({},this._contexts),t.contexts)),this._level&&(t.level=this._level),this._transactionName&&(t.transaction=this._transactionName),this._span){t.contexts=(0,r.pi)({trace:this._span.getTraceContext()},t.contexts);var e=this._span.transaction&&this._span.transaction.name;e&&(t.tags=(0,r.pi)({transaction:e},t.tags))}return this._applyFingerprint(t),t.breadcrumbs=(0,r.fl)(t.breadcrumbs||[],this._breadcrumbs),t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,t.sdkProcessingMetadata=this._sdkProcessingMetadata,this._notifyEventProcessors((0,r.fl)(c(),this._eventProcessors),t,n)},t.prototype.setSDKProcessingMetadata=function(t){return this._sdkProcessingMetadata=(0,r.pi)((0,r.pi)({},this._sdkProcessingMetadata),t),this},t.prototype._notifyEventProcessors=function(t,n,e,o){var a=this;return void 0===o&&(o=0),new s.cW((function(s,u){var c=t[o];if(null===n||"function"!=typeof c)s(n);else{var f=c((0,r.pi)({},n),e);(0,i.J8)(f)?f.then((function(n){return a._notifyEventProcessors(t,n,e,o+1).then(s)})).then(null,u):a._notifyEventProcessors(t,f,e,o+1).then(s).then(null,u)}}))},t.prototype._notifyScopeListeners=function(){var t=this;this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((function(n){n(t)})),this._notifyingListeners=!1)},t.prototype._applyFingerprint=function(t){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],this._fingerprint&&(t.fingerprint=t.fingerprint.concat(this._fingerprint)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint},t}();function c(){return(0,a.Y)("globalEventProcessors",(function(){return[]}))}function f(t){c().push(t)}},2430:function(t,n,e){e.d(n,{z:function(){return s}});var r=e(3699),i=e(7790),o=e(1995),s=function(){function t(t){this.errors=0,this.sid=(0,r.DM)(),this.duration=0,this.status="ok",this.init=!0,this.ignoreDuration=!1;var n=(0,i.ph)();this.timestamp=n,this.started=n,t&&this.update(t)}return t.prototype.update=function(t){if(void 0===t&&(t={}),t.user&&(!this.ipAddress&&t.user.ip_address&&(this.ipAddress=t.user.ip_address),this.did||t.did||(this.did=t.user.id||t.user.email||t.user.username)),this.timestamp=t.timestamp||(0,i.ph)(),t.ignoreDuration&&(this.ignoreDuration=t.ignoreDuration),t.sid&&(this.sid=32===t.sid.length?t.sid:(0,r.DM)()),void 0!==t.init&&(this.init=t.init),!this.did&&t.did&&(this.did=""+t.did),"number"==typeof t.started&&(this.started=t.started),this.ignoreDuration)this.duration=void 0;else if("number"==typeof t.duration)this.duration=t.duration;else{var n=this.timestamp-this.started;this.duration=n>=0?n:0}t.release&&(this.release=t.release),t.environment&&(this.environment=t.environment),!this.ipAddress&&t.ipAddress&&(this.ipAddress=t.ipAddress),!this.userAgent&&t.userAgent&&(this.userAgent=t.userAgent),"number"==typeof t.errors&&(this.errors=t.errors),t.status&&(this.status=t.status)},t.prototype.close=function(t){t?this.update({status:t}):"ok"===this.status?this.update({status:"exited"}):this.update()},t.prototype.toJSON=function(){return(0,o.Jr)({sid:""+this.sid,init:this.init,started:new Date(1e3*this.started).toISOString(),timestamp:new Date(1e3*this.timestamp).toISOString(),status:this.status,errors:this.errors,did:"number"==typeof this.did||"string"==typeof this.did?""+this.did:void 0,duration:this.duration,attrs:{release:this.release,environment:this.environment,ip_address:this.ipAddress,user_agent:this.userAgent}})},t}()},8773:function(t,n,e){e.d(n,{pi:function(){return r},fl:function(){return o}});var r=function(){return r=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var i in n=arguments[e])Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t},r.apply(this,arguments)};function i(t,n){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var r,i,o=e.call(t),s=[];try{for(;(void 0===n||n-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return s}function o(){for(var t=[],n=0;n<arguments.length;n++)t=t.concat(i(arguments[n]));return t}},4678:function(t,n,e){e.d(n,{Tb:function(){return s},$e:function(){return a}});var r=e(5559),i=e(8585);function o(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];var o=(0,i.Gd)();if(o&&o[t])return o[t].apply(o,(0,r.fl)(n));throw new Error("No hub defined or "+t+" was not found on the hub, please open a bug report.")}function s(t,n){return o("captureException",t,{captureContext:n,originalException:t,syntheticException:new Error("Sentry syntheticException")})}function a(t){o("withScope",t)}},5559:function(t,n,e){e.d(n,{fl:function(){return i}});function r(t,n){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var r,i,o=e.call(t),s=[];try{for(;(void 0===n||n-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return s}function i(){for(var t=[],n=0;n<arguments.length;n++)t=t.concat(r(arguments[n]));return t}},2226:function(t,n,e){var r;e.d(n,{z:function(){return r}}),function(t){t.Fatal="fatal",t.Error="error",t.Warning="warning",t.Log="log",t.Info="info",t.Debug="debug",t.Critical="critical"}(r||(r={}))},3518:function(t,n,e){function r(t){t.then(null,(function(t){console.error(t)}))}e.d(n,{I:function(){return r}})},4194:function(t,n,e){e.d(n,{R:function(){return o},l:function(){return a}});var r=e(5907),i=e(1757);function o(t,n){try{for(var e=t,r=[],i=0,o=0,a=" > ".length,u=void 0;e&&i++<5&&!("html"===(u=s(e,n))||i>1&&o+r.length*a+u.length>=80);)r.push(u),o+=u.length,e=e.parentNode;return r.reverse().join(" > ")}catch(c){return"<unknown>"}}function s(t,n){var e,r,o,s,a,u=t,c=[];if(!u||!u.tagName)return"";c.push(u.tagName.toLowerCase());var f=n&&n.length?n.filter((function(t){return u.getAttribute(t)})).map((function(t){return[t,u.getAttribute(t)]})):null;if(f&&f.length)f.forEach((function(t){c.push("["+t[0]+'="'+t[1]+'"]')}));else if(u.id&&c.push("#"+u.id),(e=u.className)&&(0,i.HD)(e))for(r=e.split(/\s+/),a=0;a<r.length;a++)c.push("."+r[a]);var p=["type","name","title","alt"];for(a=0;a<p.length;a++)o=p[a],(s=u.getAttribute(o))&&c.push("["+o+'="'+s+'"]');return c.join("")}function a(){var t=(0,r.R)();try{return t.document.location.href}catch(n){return""}}},250:function(t,n,e){e.d(n,{y:function(){return o}});var r=e(6894),i=e(7790);function o(t,n,e){var o=[{type:"client_report"},{timestamp:e||(0,i.yW)(),discarded_events:t}];return(0,r.Jd)(n?{dsn:n}:{},[o])}},3135:function(t,n,e){e.d(n,{R:function(){return a},v:function(){return c}});var r=e(4715),i=e(4388),o=e(1923),s=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/;function a(t,n){void 0===n&&(n=!1);var e=t.host,r=t.path,i=t.pass,o=t.port,s=t.projectId;return t.protocol+"://"+t.publicKey+(n&&i?":"+i:"")+"@"+e+(o?":"+o:"")+"/"+(r?r+"/":r)+s}function u(t){return"user"in t&&!("publicKey"in t)&&(t.publicKey=t.user),{user:t.publicKey||"",protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function c(t){var n="string"==typeof t?function(t){var n=s.exec(t);if(!n)throw new i.b("Invalid Sentry Dsn: "+t);var e=(0,r.CR)(n.slice(1),6),o=e[0],a=e[1],c=e[2],f=void 0===c?"":c,p=e[3],d=e[4],l=void 0===d?"":d,h="",v=e[5],y=v.split("/");if(y.length>1&&(h=y.slice(0,-1).join("/"),v=y.pop()),v){var _=v.match(/^\d+/);_&&(v=_[0])}return u({host:p,pass:f,path:h,projectId:v,port:l,protocol:o,publicKey:a})}(t):u(t);return function(t){if(o.h){var n=t.port,e=t.projectId,r=t.protocol;if(["protocol","publicKey","host","projectId"].forEach((function(n){if(!t[n])throw new i.b("Invalid Sentry Dsn: "+n+" missing")})),!e.match(/^\d+$/))throw new i.b("Invalid Sentry Dsn: Invalid projectId "+e);if(!function(t){return"http"===t||"https"===t}(r))throw new i.b("Invalid Sentry Dsn: Invalid protocol "+r);if(n&&isNaN(parseInt(n,10)))throw new i.b("Invalid Sentry Dsn: Invalid port "+n)}}(n),n}},6872:function(t,n,e){e.d(n,{a:function(){return r}});var r=["fatal","error","warning","log","info","debug","critical"]},4285:function(t,n,e){function r(){return"undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&!!__SENTRY_BROWSER_BUNDLE__}e.d(n,{n:function(){return r}})},6894:function(t,n,e){e.d(n,{Jd:function(){return o},y7:function(){return s},V$:function(){return a}});var r=e(4715),i=e(1757);function o(t,n){return void 0===n&&(n=[]),[t,n]}function s(t){var n=(0,r.CR)(t,2),e=(0,r.CR)(n[1],1);return(0,r.CR)(e[0],1)[0].type}function a(t){var n=(0,r.CR)(t,2),e=n[0],o=n[1],s=JSON.stringify(e);return o.reduce((function(t,n){var e=(0,r.CR)(n,2),o=e[0],s=e[1],a=(0,i.pt)(s)?String(s):JSON.stringify(s);return t+"\n"+JSON.stringify(o)+"\n"+a}),s)}},4388:function(t,n,e){e.d(n,{b:function(){return o}});var r=e(4715),i=e(467),o=function(t){function n(n){var e=this.constructor,r=t.call(this,n)||this;return r.message=n,r.name=e.prototype.constructor.name,(0,i.f)(r,e.prototype),r}return(0,r.ZT)(n,t),n}(Error)},1923:function(t,n,e){e.d(n,{h:function(){return r}});var r="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__},5907:function(t,n,e){e.d(n,{R:function(){return o},Y:function(){return s}});var r=e(7392),i={};function o(){return(0,r.KV)()||"undefined"!=typeof window?window:"undefined"!=typeof self?self:i}function s(t,n,e){var r=e||o(),i=r.__SENTRY__=r.__SENTRY__||{};return i[t]||(i[t]=n())}},4005:function(t,n,e){e.d(n,{o:function(){return y}});var r,i=e(4715),o=e(1923),s=e(5907),a=e(1757),u=e(8536),c=e(1995),f=e(9038),p=e(9798),d=(0,s.R)(),l={},h={};function v(t){if(!h[t])switch(h[t]=!0,t){case"console":!function(){if(!("console"in d))return;u.RU.forEach((function(t){t in d.console&&(0,c.hl)(d.console,t,(function(n){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];_("console",{args:e,level:t}),n&&n.apply(d.console,e)}}))}))}();break;case"dom":!function(){if(!("document"in d))return;var t=_.bind(null,"dom"),n=w(t,!0);d.document.addEventListener("click",n,!1),d.document.addEventListener("keypress",n,!1),["EventTarget","Node"].forEach((function(n){var e=d[n]&&d[n].prototype;e&&e.hasOwnProperty&&e.hasOwnProperty("addEventListener")&&((0,c.hl)(e,"addEventListener",(function(n){return function(e,r,i){if("click"===e||"keypress"==e)try{var o=this,s=o.__sentry_instrumentation_handlers__=o.__sentry_instrumentation_handlers__||{},a=s[e]=s[e]||{refCount:0};if(!a.handler){var u=w(t);a.handler=u,n.call(this,e,u,i)}a.refCount+=1}catch(c){}return n.call(this,e,r,i)}})),(0,c.hl)(e,"removeEventListener",(function(t){return function(n,e,r){if("click"===n||"keypress"==n)try{var i=this,o=i.__sentry_instrumentation_handlers__||{},s=o[n];s&&(s.refCount-=1,s.refCount<=0&&(t.call(this,n,s.handler,r),s.handler=void 0,delete o[n]),0===Object.keys(o).length&&delete i.__sentry_instrumentation_handlers__)}catch(a){}return t.call(this,n,e,r)}})))}))}();break;case"xhr":!function(){if(!("XMLHttpRequest"in d))return;var t=XMLHttpRequest.prototype;(0,c.hl)(t,"open",(function(t){return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var r=this,i=n[1],o=r.__sentry_xhr__={method:(0,a.HD)(n[0])?n[0].toUpperCase():n[0],url:n[1]};(0,a.HD)(i)&&"POST"===o.method&&i.match(/sentry_key/)&&(r.__sentry_own_request__=!0);var s=function(){if(4===r.readyState){try{o.status_code=r.status}catch(t){}_("xhr",{args:n,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:r})}};return"onreadystatechange"in r&&"function"==typeof r.onreadystatechange?(0,c.hl)(r,"onreadystatechange",(function(t){return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return s(),t.apply(r,n)}})):r.addEventListener("readystatechange",s),t.apply(r,n)}})),(0,c.hl)(t,"send",(function(t){return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return this.__sentry_xhr__&&void 0!==n[0]&&(this.__sentry_xhr__.body=n[0]),_("xhr",{args:n,startTimestamp:Date.now(),xhr:this}),t.apply(this,n)}}))}();break;case"fetch":!function(){if(!(0,p.t$)())return;(0,c.hl)(d,"fetch",(function(t){return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var r={args:n,fetchData:{method:g(n),url:m(n)},startTimestamp:Date.now()};return _("fetch",(0,i.pi)({},r)),t.apply(d,n).then((function(t){return _("fetch",(0,i.pi)((0,i.pi)({},r),{endTimestamp:Date.now(),response:t})),t}),(function(t){throw _("fetch",(0,i.pi)((0,i.pi)({},r),{endTimestamp:Date.now(),error:t})),t}))}}))}();break;case"history":!function(){if(!(0,p.Bf)())return;var t=d.onpopstate;function n(t){return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var i=n.length>2?n[2]:void 0;if(i){var o=r,s=String(i);r=s,_("history",{from:o,to:s})}return t.apply(this,n)}}d.onpopstate=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var i=d.location.href,o=r;if(r=i,_("history",{from:o,to:i}),t)try{return t.apply(this,n)}catch(s){}},(0,c.hl)(d.history,"pushState",n),(0,c.hl)(d.history,"replaceState",n)}();break;case"error":S=d.onerror,d.onerror=function(t,n,e,r,i){return _("error",{column:r,error:i,line:e,msg:t,url:n}),!!S&&S.apply(this,arguments)};break;case"unhandledrejection":E=d.onunhandledrejection,d.onunhandledrejection=function(t){return _("unhandledrejection",t),!E||E.apply(this,arguments)};break;default:return void(o.h&&u.kg.warn("unknown instrumentation type:",t))}}function y(t,n){l[t]=l[t]||[],l[t].push(n),v(t)}function _(t,n){var e,r;if(t&&l[t])try{for(var s=(0,i.XA)(l[t]||[]),a=s.next();!a.done;a=s.next()){var c=a.value;try{c(n)}catch(p){o.h&&u.kg.error("Error while triggering instrumentation handler.\nType: "+t+"\nName: "+(0,f.$P)(c)+"\nError:",p)}}}catch(d){e={error:d}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}}function g(t){return void 0===t&&(t=[]),"Request"in d&&(0,a.V9)(t[0],Request)&&t[0].method?String(t[0].method).toUpperCase():t[1]&&t[1].method?String(t[1].method).toUpperCase():"GET"}function m(t){return void 0===t&&(t=[]),"string"==typeof t[0]?t[0]:"Request"in d&&(0,a.V9)(t[0],Request)?t[0].url:String(t[0])}var b,x;function w(t,n){return void 0===n&&(n=!1),function(e){if(e&&x!==e&&!function(t){if("keypress"!==t.type)return!1;try{var n=t.target;if(!n||!n.tagName)return!0;if("INPUT"===n.tagName||"TEXTAREA"===n.tagName||n.isContentEditable)return!1}catch(e){}return!0}(e)){var r="keypress"===e.type?"input":e.type;(void 0===b||function(t,n){if(!t)return!0;if(t.type!==n.type)return!0;try{if(t.target!==n.target)return!0}catch(e){}return!1}(x,e))&&(t({event:e,name:r,global:n}),x=e),clearTimeout(b),b=d.setTimeout((function(){b=void 0}),1e3)}}}var S=null;var E=null},1757:function(t,n,e){e.d(n,{VZ:function(){return i},VW:function(){return s},TX:function(){return a},fm:function(){return u},HD:function(){return c},pt:function(){return f},PO:function(){return p},cO:function(){return d},kK:function(){return l},Kj:function(){return h},J8:function(){return v},Cy:function(){return y},i2:function(){return _},V9:function(){return g}});var r=Object.prototype.toString;function i(t){switch(r.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return g(t,Error)}}function o(t,n){return r.call(t)==="[object "+n+"]"}function s(t){return o(t,"ErrorEvent")}function a(t){return o(t,"DOMError")}function u(t){return o(t,"DOMException")}function c(t){return o(t,"String")}function f(t){return null===t||"object"!=typeof t&&"function"!=typeof t}function p(t){return o(t,"Object")}function d(t){return"undefined"!=typeof Event&&g(t,Event)}function l(t){return"undefined"!=typeof Element&&g(t,Element)}function h(t){return o(t,"RegExp")}function v(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function y(t){return p(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function _(t){return"number"==typeof t&&t!=t}function g(t,n){try{return t instanceof n}catch(e){return!1}}},8536:function(t,n,e){e.d(n,{RU:function(){return c},Cf:function(){return f},kg:function(){return r}});var r,i=e(4715),o=e(1923),s=e(5907),a=(0,s.R)(),u="Sentry Logger ",c=["debug","info","warn","error","log","assert"];function f(t){var n=(0,s.R)();if(!("console"in n))return t();var e=n.console,r={};c.forEach((function(t){var i=e[t]&&e[t].__sentry_original__;t in n.console&&i&&(r[t]=e[t],e[t]=i)}));try{return t()}finally{Object.keys(r).forEach((function(t){e[t]=r[t]}))}}function p(){var t=!1,n={enable:function(){t=!0},disable:function(){t=!1}};return o.h?c.forEach((function(e){n[e]=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];t&&f((function(){var t;(t=a.console)[e].apply(t,(0,i.fl)([u+"["+e+"]:"],n))}))}})):c.forEach((function(t){n[t]=function(){}})),n}r=o.h?(0,s.Y)("logger",p):p()},4048:function(t,n,e){function r(){var t="function"==typeof WeakSet,n=t?new WeakSet:[];return[function(e){if(t)return!!n.has(e)||(n.add(e),!1);for(var r=0;r<n.length;r++){if(n[r]===e)return!0}return n.push(e),!1},function(e){if(t)n.delete(e);else for(var r=0;r<n.length;r++)if(n[r]===e){n.splice(r,1);break}}]}e.d(n,{i:function(){return r}})},3699:function(t,n,e){e.d(n,{DM:function(){return s},en:function(){return a},jH:function(){return c},Db:function(){return f},EG:function(){return p},YO:function(){return d}});var r=e(4715),i=e(5907),o=e(1995);function s(){var t=(0,i.R)(),n=t.crypto||t.msCrypto;if(void 0!==n&&n.getRandomValues){var e=new Uint16Array(8);n.getRandomValues(e),e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;var r=function(t){for(var n=t.toString(16);n.length<4;)n="0"+n;return n};return r(e[0])+r(e[1])+r(e[2])+r(e[3])+r(e[4])+r(e[5])+r(e[6])+r(e[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=16*Math.random()|0;return("x"===t?n:3&n|8).toString(16)}))}function a(t){if(!t)return{};var n=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!n)return{};var e=n[6]||"",r=n[8]||"";return{host:n[4],path:n[5],protocol:n[2],relative:n[5]+e+r}}function u(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function c(t){var n=t.message,e=t.event_id;if(n)return n;var r=u(t);return r?r.type&&r.value?r.type+": "+r.value:r.type||r.value||e||"<unknown>":e||"<unknown>"}function f(t,n,e){var r=t.exception=t.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=n||""),o.type||(o.type=e||"Error")}function p(t,n){var e=u(t);if(e){var i=e.mechanism;if(e.mechanism=(0,r.pi)((0,r.pi)((0,r.pi)({},{type:"generic",handled:!0}),i),n),n&&"data"in n){var o=(0,r.pi)((0,r.pi)({},i&&i.data),n.data);e.mechanism.data=o}}}function d(t){if(t&&t.__sentry_captured__)return!0;try{(0,o.xp)(t,"__sentry_captured__",!0)}catch(n){}return!1}},7392:function(t,n,e){e.d(n,{KV:function(){return i},l$:function(){return o}});var r=e(4285);function i(){return!(0,r.n)()&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}function o(t,n){return t.require(n)}t=e.hmd(t)},8035:function(t,n,e){e.d(n,{Fv:function(){return u},Qy:function(){return c}});var r=e(4715),i=e(1757),o=e(4048),s=e(1995),a=e(9038);function u(t,n,e){void 0===n&&(n=1/0),void 0===e&&(e=1/0);try{return f("",t,n,e)}catch(r){return{ERROR:"**non-serializable** ("+r+")"}}}function c(t,n,e){void 0===n&&(n=3),void 0===e&&(e=102400);var r,i=u(t,n);return r=i,function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(r))>e?c(t,n-1,e):i}function f(t,n,e,u,c){void 0===e&&(e=1/0),void 0===u&&(u=1/0),void 0===c&&(c=(0,o.i)());var p=(0,r.CR)(c,2),d=p[0],l=p[1],h=n;if(h&&"function"==typeof h.toJSON)try{return h.toJSON()}catch(x){}if(null===n||["number","boolean","string"].includes(typeof n)&&!(0,i.i2)(n))return n;var v=function(t,n){try{return"domain"===t&&n&&"object"==typeof n&&n._events?"[Domain]":"domainEmitter"===t?"[DomainEmitter]":"undefined"!=typeof window&&n===window?"[Global]":"undefined"!=typeof window&&n===window?"[Window]":"undefined"!=typeof document&&n===document?"[Document]":(0,i.Cy)(n)?"[SyntheticEvent]":"number"==typeof n&&n!=n?"[NaN]":void 0===n?"[undefined]":"function"==typeof n?"[Function: "+(0,a.$P)(n)+"]":"symbol"==typeof n?"["+String(n)+"]":"bigint"==typeof n?"[BigInt: "+String(n)+"]":"[object "+Object.getPrototypeOf(n).constructor.name+"]"}catch(x){return"**non-serializable** ("+x+")"}}(t,n);if(!v.startsWith("[object "))return v;if(0===e)return v.replace("object ","");if(d(n))return"[Circular ~]";var y=Array.isArray(n)?[]:{},_=0,g=(0,i.VZ)(n)||(0,i.cO)(n)?(0,s.Sh)(n):n;for(var m in g)if(Object.prototype.hasOwnProperty.call(g,m)){if(_>=u){y[m]="[MaxProperties ~]";break}var b=g[m];y[m]=f(m,b,e-1,u,c),_+=1}return l(n),y}},1995:function(t,n,e){e.d(n,{hl:function(){return a},xp:function(){return u},$Q:function(){return c},HK:function(){return f},_j:function(){return p},Sh:function(){return d},zf:function(){return v},Jr:function(){return y}});var r=e(4715),i=e(4194),o=e(1757),s=e(9660);function a(t,n,e){if(n in t){var r=t[n],i=e(r);if("function"==typeof i)try{c(i,r)}catch(o){}t[n]=i}}function u(t,n,e){Object.defineProperty(t,n,{value:e,writable:!0,configurable:!0})}function c(t,n){var e=n.prototype||{};t.prototype=n.prototype=e,u(t,"__sentry_original__",n)}function f(t){return t.__sentry_original__}function p(t){return Object.keys(t).map((function(n){return encodeURIComponent(n)+"="+encodeURIComponent(t[n])})).join("&")}function d(t){var n=t;if((0,o.VZ)(t))n=(0,r.pi)({message:t.message,name:t.name,stack:t.stack},h(t));else if((0,o.cO)(t)){var e=t;n=(0,r.pi)({type:e.type,target:l(e.target),currentTarget:l(e.currentTarget)},h(e)),"undefined"!=typeof CustomEvent&&(0,o.V9)(t,CustomEvent)&&(n.detail=e.detail)}return n}function l(t){try{return(0,o.kK)(t)?(0,i.R)(t):Object.prototype.toString.call(t)}catch(n){return"<unknown>"}}function h(t){var n={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n}function v(t,n){void 0===n&&(n=40);var e=Object.keys(d(t));if(e.sort(),!e.length)return"[object has no keys]";if(e[0].length>=n)return(0,s.$G)(e[0],n);for(var r=e.length;r>0;r--){var i=e.slice(0,r).join(", ");if(!(i.length>n))return r===e.length?i:(0,s.$G)(i,n)}return""}function y(t){var n,e;if((0,o.PO)(t)){var i={};try{for(var s=(0,r.XA)(Object.keys(t)),a=s.next();!a.done;a=s.next()){var u=a.value;void 0!==t[u]&&(i[u]=y(t[u]))}}catch(c){n={error:c}}finally{try{a&&!a.done&&(e=s.return)&&e.call(s)}finally{if(n)throw n.error}}return i}return Array.isArray(t)?t.map(y):t}},467:function(t,n,e){e.d(n,{f:function(){return r}});var r=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,n){return t.__proto__=n,t}:function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(t,e)||(t[e]=n[e]);return t})},8963:function(t,n,e){e.d(n,{x:function(){return o}});var r=e(4388),i=e(7946);function o(t){var n=[];function e(t){return n.splice(n.indexOf(t),1)[0]}return{$:n,add:function(o){if(!(void 0===t||n.length<t))return(0,i.$2)(new r.b("Not adding Promise due to buffer limit reached."));var s=o();return-1===n.indexOf(s)&&n.push(s),s.then((function(){return e(s)})).then(null,(function(){return e(s).then(null,(function(){}))})),s},drain:function(t){return new i.cW((function(e,r){var o=n.length;if(!o)return e(!0);var s=setTimeout((function(){t&&t>0&&e(!1)}),t);n.forEach((function(t){(0,i.WD)(t).then((function(){--o||(clearTimeout(s),e(!0))}),r)}))}))}}}},1630:function(t,n,e){e.d(n,{ns:function(){return i},Q:function(){return o},WG:function(){return s}});var r=e(4715);function i(t,n){return t[n]||t.all||0}function o(t,n,e){return void 0===e&&(e=Date.now()),i(t,n)>e}function s(t,n,e){var i,o,s,a;void 0===e&&(e=Date.now());var u=(0,r.pi)({},t),c=n["x-sentry-rate-limits"],f=n["retry-after"];if(c)try{for(var p=(0,r.XA)(c.trim().split(",")),d=p.next();!d.done;d=p.next()){var l=d.value.split(":",2),h=parseInt(l[0],10),v=1e3*(isNaN(h)?60:h);if(l[1])try{for(var y=(s=void 0,(0,r.XA)(l[1].split(";"))),_=y.next();!_.done;_=y.next()){u[_.value]=e+v}}catch(g){s={error:g}}finally{try{_&&!_.done&&(a=y.return)&&a.call(y)}finally{if(s)throw s.error}}else u.all=e+v}}catch(m){i={error:m}}finally{try{d&&!d.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}else f&&(u.all=e+function(t,n){void 0===n&&(n=Date.now());var e=parseInt(""+t,10);if(!isNaN(e))return 1e3*e;var r=Date.parse(""+t);return isNaN(r)?6e4:r-n}(f,e));return u}},8653:function(t,n,e){e.d(n,{E:function(){return o}});var r=e(2226),i=e(6872);function o(t){return"warn"===t?r.z.Warning:function(t){return-1!==i.a.indexOf(t)}(t)?t:r.z.Log}},9038:function(t,n,e){e.d(n,{pE:function(){return i},$P:function(){return a}});var r=e(4715);function i(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var e=t.sort((function(t,n){return t[0]-n[0]})).map((function(t){return t[1]}));return function(t,n){var i,s,a,u;void 0===n&&(n=0);var c=[];try{for(var f=(0,r.XA)(t.split("\n").slice(n)),p=f.next();!p.done;p=f.next()){var d=p.value;try{for(var l=(a=void 0,(0,r.XA)(e)),h=l.next();!h.done;h=l.next()){var v=(0,h.value)(d);if(v){c.push(v);break}}}catch(y){a={error:y}}finally{try{h&&!h.done&&(u=l.return)&&u.call(l)}finally{if(a)throw a.error}}}}catch(_){i={error:_}}finally{try{p&&!p.done&&(s=f.return)&&s.call(f)}finally{if(i)throw i.error}}return o(c)}}function o(t){if(!t.length)return[];var n=t,e=n[0].function||"",i=n[n.length-1].function||"";return-1===e.indexOf("captureMessage")&&-1===e.indexOf("captureException")||(n=n.slice(1)),-1!==i.indexOf("sentryWrapped")&&(n=n.slice(0,-1)),n.slice(0,50).map((function(t){return(0,r.pi)((0,r.pi)({},t),{filename:t.filename||n[0].filename,function:t.function||"?"})})).reverse()}var s="<anonymous>";function a(t){try{return t&&"function"==typeof t&&t.name||s}catch(n){return s}}},8886:function(t,n,e){function r(t){return t>=200&&t<300?"success":429===t?"rate_limit":t>=400&&t<500?"invalid":t>=500?"failed":"unknown"}e.d(n,{F:function(){return r}})},9660:function(t,n,e){e.d(n,{$G:function(){return i},nK:function(){return o},zC:function(){return s}});var r=e(1757);function i(t,n){return void 0===n&&(n=0),"string"!=typeof t||0===n||t.length<=n?t:t.substr(0,n)+"..."}function o(t,n){if(!Array.isArray(t))return"";for(var e=[],r=0;r<t.length;r++){var i=t[r];try{e.push(String(i))}catch(o){e.push("[value cannot be serialized]")}}return e.join(n)}function s(t,n){return!!(0,r.HD)(t)&&((0,r.Kj)(n)?n.test(t):"string"==typeof n&&-1!==t.indexOf(n))}},9798:function(t,n,e){e.d(n,{Ak:function(){return s},Du:function(){return a},t$:function(){return u},hv:function(){return c},Bf:function(){return f}});var r=e(1923),i=e(5907),o=e(8536);function s(){if(!("fetch"in(0,i.R)()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(t){return!1}}function a(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function u(){if(!s())return!1;var t=(0,i.R)();if(a(t.fetch))return!0;var n=!1,e=t.document;if(e&&"function"==typeof e.createElement)try{var u=e.createElement("iframe");u.hidden=!0,e.head.appendChild(u),u.contentWindow&&u.contentWindow.fetch&&(n=a(u.contentWindow.fetch)),e.head.removeChild(u)}catch(c){r.h&&o.kg.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",c)}return n}function c(){if(!s())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch(t){return!1}}function f(){var t=(0,i.R)(),n=t.chrome,e=n&&n.app&&n.app.runtime,r="history"in t&&!!t.history.pushState&&!!t.history.replaceState;return!e&&r}},7946:function(t,n,e){e.d(n,{WD:function(){return i},$2:function(){return o},cW:function(){return s}});var r=e(1757);function i(t){return new s((function(n){n(t)}))}function o(t){return new s((function(n,e){e(t)}))}var s=function(){function t(t){var n=this;this._state=0,this._handlers=[],this._resolve=function(t){n._setResult(1,t)},this._reject=function(t){n._setResult(2,t)},this._setResult=function(t,e){0===n._state&&((0,r.J8)(e)?e.then(n._resolve,n._reject):(n._state=t,n._value=e,n._executeHandlers()))},this._executeHandlers=function(){if(0!==n._state){var t=n._handlers.slice();n._handlers=[],t.forEach((function(t){t[0]||(1===n._state&&t[1](n._value),2===n._state&&t[2](n._value),t[0]=!0)}))}};try{t(this._resolve,this._reject)}catch(e){this._reject(e)}}return t.prototype.then=function(n,e){var r=this;return new t((function(t,i){r._handlers.push([!1,function(e){if(n)try{t(n(e))}catch(r){i(r)}else t(e)},function(n){if(e)try{t(e(n))}catch(r){i(r)}else i(n)}]),r._executeHandlers()}))},t.prototype.catch=function(t){return this.then((function(t){return t}),t)},t.prototype.finally=function(n){var e=this;return new t((function(t,r){var i,o;return e.then((function(t){o=!1,i=t,n&&n()}),(function(t){o=!0,i=t,n&&n()})).then((function(){o?r(i):t(i)}))}))},t}()},7790:function(t,n,e){e.d(n,{yW:function(){return u},ph:function(){return c}});var r=e(5907),i=e(7392);t=e.hmd(t);var o={nowSeconds:function(){return Date.now()/1e3}};var s=(0,i.KV)()?function(){try{return(0,i.l$)(t,"perf_hooks").performance}catch(n){return}}():function(){var t=(0,r.R)().performance;if(t&&t.now)return{now:function(){return t.now()},timeOrigin:Date.now()-t.now()}}(),a=void 0===s?o:{nowSeconds:function(){return(s.timeOrigin+s.now())/1e3}},u=o.nowSeconds.bind(o),c=a.nowSeconds.bind(a);!function(){var t=(0,r.R)().performance;if(t&&t.now){var n=36e5,e=t.now(),i=Date.now(),o=t.timeOrigin?Math.abs(t.timeOrigin+e-i):n,s=o<n,a=t.timing&&t.timing.navigationStart,u="number"==typeof a?Math.abs(a+e-i):n;return s||u<n?o<=u?("timeOrigin",t.timeOrigin):("navigationStart",a):("dateNow",i)}"none"}()},4715:function(t,n,e){e.d(n,{ZT:function(){return i},pi:function(){return o},XA:function(){return s},CR:function(){return a},fl:function(){return u}});
|
17 |
Â
/*! *****************************************************************************
|
18 |
Â
Copyright (c) Microsoft Corporation.
|
19 |
Â
|
28 |
Â
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
29 |
Â
PERFORMANCE OF THIS SOFTWARE.
|
30 |
Â
***************************************************************************** */
|
31 |
+
var r=function(t,n){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)n.hasOwnProperty(e)&&(t[e]=n[e])},r(t,n)};function i(t,n){function __(){this.constructor=t}r(t,n),t.prototype=null===n?Object.create(n):(__.prototype=n.prototype,new __)}var o=function(){return o=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var i in n=arguments[e])Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t},o.apply(this,arguments)};function s(t){var n="function"==typeof Symbol&&Symbol.iterator,e=n&&t[n],r=0;if(e)return e.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(t,n){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var r,i,o=e.call(t),s=[];try{for(;(void 0===n||n-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return s}function u(){for(var t=[],n=0;n<arguments.length;n++)t=t.concat(a(arguments[n]));return t}},6989:function(t){t.exports=window.wp.apiFetch}},n={};function e(r){var i=n[r];if(void 0!==i)return i.exports;var o=n[r]={id:r,loaded:!1,exports:{}};return t[r](o,o.exports,e),o.loaded=!0,o.exports}e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,{a:n}),n},e.d=function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},e.hmd=function(t){return(t=Object.create(t)).children||(t.children=[]),Object.defineProperty(t,"exports",{enumerable:!0,set:function(){throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+t.id)}}),t},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};!function(){e.r(r);var t,n=e(2456),i=e(4678),o=e(6989),s=e.n(o);const a="true"===(null===(t=window.A8C_ETK_ErrorReporting_Config)||void 0===t?void 0:t.shouldActivateSentry),u=window._jsErr||[],c=window._headJsErrorHandler;a?(n.S1({dsn:"https://658ae291b00242148af6b76494d4a49a@o248881.ingest.sentry.io/5876245",release:"wpcom-test-01"}),u.forEach((t=>i.Tb(t))),n.yl().then((()=>delete window._jsErr))):function(){const t=t=>{let{error:n}=t;if(!n)return;const e={message:n.message,trace:n.stack,url:document.location.href,feature:"wp-admin"};return s()({global:!0,path:"/rest/v1.1/js-error",method:"POST",data:{error:JSON.stringify(e)}}).catch((()=>console.error("Error: Unable to record the error in Logstash.")))};window.addEventListener("error",t),Promise.allSettled(u.map(t)).then((()=>delete window._jsErr))}(),window.removeEventListener("error",c),delete window._headJsErrorHandler}(),window.EditingToolkit=r}();
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
32 |
Â
//# sourceMappingURL=error-reporting.min.js.map
|
error-reporting/dist/error-reporting.min.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"file":"error-reporting.min.js","mappings":"2LAUIA,EAAgC,SAAUC,GAE1C,SAASD,IACL,OAAkB,OAAXC,GAAmBA,EA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eAAeqqC,EAAS73B,OAAO24B,YAAa,CAAE9uC,MAAO,WAE7DsD,OAAOK,eAAeqqC,EAAS,aAAc,CAAEhuC,OAAO,K,mFCDvD,MAAM+uC,EAAsF,UAA/D,UAAApR,OAAOqR,qCAAP,eAAsCD,sBAK7DE,EAAatR,OAAOuR,QAAU,GAC9BC,EAAmBxR,OAAOyR,oBAuD3BL,GApDJM,EAAAA,GAAa,CACZzxC,IAAK,4EACLkf,aAAc,CAAE,IAAIwyB,EAAAA,IAKpB7gC,QAAS,gBACTmnB,iBAAkB,IAInBqZ,EAAWpiC,SAAW/L,GAAWuuC,EAAAA,GAAyBvuC,KAC1DuuC,EAAAA,KAAeh8B,MAAM,WAAasqB,OAAOuR,UAI1C,WACC,MAAMK,EAAc,IAAiB,IAAf,MAAEzuC,GAAa,EAKpC,IAAOA,EACN,OAGD,MAAMiF,EAAO,CACZtI,QAASqD,EAAMrD,QACf+e,MAAO1b,EAAMP,MACbpC,IAAKa,SAAS8H,SAASC,KACvByoC,QAAS,YAGV,OACCC,GAAAA,CAAU,CACTvtC,QAAQ,EACRgF,KAAM,sBACNb,OAAQ,OACRN,KAAM,CAAEjF,MAAOkR,KAAKC,UAAWlM,MAG9BuN,OAAO,IAAM3O,QAAQ7D,MAAO,qDAIhC68B,OAAOvsB,iBAAkB,QAASm+B,GAGlCt8B,QAAQy8B,WAAYT,EAAWhsC,IAAKssC,IAAgBl8B,MAAM,WAAasqB,OAAOuR,SAM9ES,GAIDhS,OAAOvI,oBAAqB,QAAS+Z,UAC9BxR,OAAOyR,oB","sources":["webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/backend.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/client.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/eventbuilder.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/flags.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/helpers.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/integrations/breadcrumbs.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/integrations/dedupe.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/integrations/globalhandlers.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/integrations/linkederrors.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/integrations/trycatch.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/integrations/useragent.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/sdk.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/stack-parsers.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/transports/base.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/transports/fetch.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/transports/new-fetch.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/transports/new-xhr.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/transports/utils.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/transports/xhr.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/node_modules/tslib/tslib.es6.js","webpack://EditingToolkit/../../node_modules/@sentry/core/esm/api.js","webpack://EditingToolkit/../../node_modules/@sentry/core/esm/basebackend.js","webpack://EditingToolkit/../../node_modules/@sentry/core/esm/baseclient.js","webpack://EditingToolkit/../../node_modules/@sentry/core/esm/flags.js","webpack://EditingToolkit/../../node_modules/@sentry/core/esm/integration.js","webpack://EditingToolkit/../../node_modules/@sentry/core/esm/integrations/functiontostring.js","webpack://EditingToolkit/../../node_modules/@sentry/core/esm/integrations/inboundfilters.js","webpack://EditingToolkit/../../node_modules/@sentry/core/esm/request.js","webpack://EditingToolkit/../../node_modules/@sentry/core/esm/sdk.js","webpack://EditingToolkit/../../node_modules/@sentry/core/esm/transports/base.js","webpack://EditingToolkit/../../node_modules/@sentry/core/esm/transports/noop.js","webpack://EditingToolkit/../../node_modules/@sentry/core/esm/version.js","webpack://EditingToolkit/../../node_modules/@sentry/core/node_modules/tslib/tslib.es6.js","webpack://EditingToolkit/../../node_modules/@sentry/hub/esm/flags.js","webpack://EditingToolkit/../../node_modules/@sentry/hub/esm/hub.js","webpack://EditingToolkit/../../node_modules/@sentry/hub/esm/scope.js","webpack://EditingToolkit/../../node_modules/@sentry/hub/esm/session.js","webpack://EditingToolkit/../../node_modules/@sentry/hub/node_modules/tslib/tslib.es6.js","webpack://EditingToolkit/../../node_modules/@sentry/minimal/esm/index.js","webpack://EditingToolkit/../../node_modules/@sentry/minimal/node_modules/tslib/tslib.es6.js","webpack://EditingToolkit/../../node_modules/@sentry/tracing/esm/browser/backgroundtab.js","webpack://EditingToolkit/../../node_modules/@sentry/tracing/esm/browser/browsertracing.js","webpack://EditingToolkit/../../node_modules/@sentry/tracing/esm/browser/metrics.js","webpack://EditingToolkit/../../node_modules/@sentry/tracing/esm/browser/request.js","webpack://EditingToolkit/../../node_modules/@sentry/tracing/esm/browser/router.js","webpack://EditingToolkit/../../node_modules/@sentry/tracing/esm/browser/web-vitals/getCLS.js","webpack://EditingToolkit/../../node_modules/@sentry/tracing/esm/browser/web-vitals/getFID.js","webpack://EditingToolkit/../../node_modules/@sentry/tracing/esm/browser/web-vitals/getLCP.js","webpack://EditingToolkit/../../node_modules/@sentry/tracing/esm/browser/web-vitals/lib/bindReporter.js","webpack://EditingToolkit/../../node_modules/@sentry/tracing/esm/browser/web-vitals/lib/generateUniqueID.js","webpack://EditingToolkit/../../node_modules/@sentry/tracing/esm/browser/web-vitals/lib/getVisibilityWatcher.js","webpack://EditingToolkit/../../node_modules/@sentry/tracing/esm/browser/web-vitals/lib/initMetric.js","webpack://EditingToolkit/../../node_modules/@sentry/tracing/esm/browser/web-vitals/lib/observe.js","webpack://EditingToolkit/../../node_modules/@sentry/tracing/esm/browser/web-vitals/lib/onHidden.js","webpack://EditingToolkit/../../node_modules/@sentry/tracing/esm/constants.js","webpack://EditingToolkit/../../node_modules/@sentry/tracing/esm/flags.js","webpack://EditingToolkit/../../node_modules/@sentry/tracing/esm/hubextensions.js","webpack://EditingToolkit/../../node_modules/@sentry/tracing/esm/idletransaction.js","webpack://EditingToolkit/../../node_modules/@sentry/tracing/esm/span.js","webpack://EditingToolkit/../../node_modules/@sentry/tracing/esm/transaction.js","webpack://EditingToolkit/../../node_modules/@sentry/tracing/esm/utils.js","webpack://EditingToolkit/../../node_modules/@sentry/tracing/node_modules/tslib/tslib.es6.js","webpack://EditingToolkit/../../node_modules/@sentry/types/esm/severity.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/async.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/browser.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/clientreport.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/dsn.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/enums.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/env.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/envelope.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/error.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/flags.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/global.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/instrument.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/is.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/logger.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/memo.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/misc.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/node.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/normalize.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/object.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/polyfill.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/promisebuffer.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/ratelimit.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/severity.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/stacktrace.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/status.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/string.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/supports.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/syncpromise.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/time.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/tracing.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/node_modules/tslib/tslib.es6.js","webpack://EditingToolkit/external window [\"wp\",\"apiFetch\"]","webpack://EditingToolkit/webpack/bootstrap","webpack://EditingToolkit/webpack/runtime/compat get default export","webpack://EditingToolkit/webpack/runtime/define property getters","webpack://EditingToolkit/webpack/runtime/harmony module decorator","webpack://EditingToolkit/webpack/runtime/hasOwnProperty shorthand","webpack://EditingToolkit/webpack/runtime/make namespace object","webpack://EditingToolkit/./editing-toolkit-plugin/error-reporting/index.js"],"sourcesContent":["import { __assign, __extends } from \"tslib\";\nimport { BaseBackend, getEnvelopeEndpointWithUrlEncodedAuth, initAPIDetails } from '@sentry/core';\nimport { Severity } from '@sentry/types';\nimport { supportsFetch } from '@sentry/utils';\nimport { eventFromException, eventFromMessage } from './eventbuilder';\nimport { FetchTransport, makeNewFetchTransport, makeNewXHRTransport, XHRTransport } from './transports';\n/**\n * The Sentry Browser SDK Backend.\n * @hidden\n */\nvar BrowserBackend = /** @class */ (function (_super) {\n __extends(BrowserBackend, _super);\n function BrowserBackend() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @inheritDoc\n */\n BrowserBackend.prototype.eventFromException = function (exception, hint) {\n return eventFromException(exception, hint, this._options.attachStacktrace);\n };\n /**\n * @inheritDoc\n */\n BrowserBackend.prototype.eventFromMessage = function (message, level, hint) {\n if (level === void 0) { level = Severity.Info; }\n return eventFromMessage(message, level, hint, this._options.attachStacktrace);\n };\n /**\n * @inheritDoc\n */\n BrowserBackend.prototype._setupTransport = function () {\n if (!this._options.dsn) {\n // We return the noop transport here in case there is no Dsn.\n return _super.prototype._setupTransport.call(this);\n }\n var transportOptions = __assign(__assign({}, this._options.transportOptions), { dsn: this._options.dsn, tunnel: this._options.tunnel, sendClientReports: this._options.sendClientReports, _metadata: this._options._metadata });\n var api = initAPIDetails(transportOptions.dsn, transportOptions._metadata, transportOptions.tunnel);\n var url = getEnvelopeEndpointWithUrlEncodedAuth(api.dsn, api.tunnel);\n if (this._options.transport) {\n return new this._options.transport(transportOptions);\n }\n if (supportsFetch()) {\n var requestOptions = __assign({}, transportOptions.fetchParameters);\n this._newTransport = makeNewFetchTransport({ requestOptions: requestOptions, url: url });\n return new FetchTransport(transportOptions);\n }\n this._newTransport = makeNewXHRTransport({\n url: url,\n headers: transportOptions.headers,\n });\n return new XHRTransport(transportOptions);\n };\n return BrowserBackend;\n}(BaseBackend));\nexport { BrowserBackend };\n//# sourceMappingURL=backend.js.map","import { __assign, __extends } from \"tslib\";\nimport { BaseClient, SDK_VERSION } from '@sentry/core';\nimport { getGlobalObject, logger } from '@sentry/utils';\nimport { BrowserBackend } from './backend';\nimport { IS_DEBUG_BUILD } from './flags';\nimport { injectReportDialog } from './helpers';\nimport { Breadcrumbs } from './integrations';\n/**\n * The Sentry Browser SDK Client.\n *\n * @see BrowserOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nvar BrowserClient = /** @class */ (function (_super) {\n __extends(BrowserClient, _super);\n /**\n * Creates a new Browser SDK instance.\n *\n * @param options Configuration options for this SDK.\n */\n function BrowserClient(options) {\n if (options === void 0) { options = {}; }\n var _this = this;\n options._metadata = options._metadata || {};\n options._metadata.sdk = options._metadata.sdk || {\n name: 'sentry.javascript.browser',\n packages: [\n {\n name: 'npm:@sentry/browser',\n version: SDK_VERSION,\n },\n ],\n version: SDK_VERSION,\n };\n _this = _super.call(this, BrowserBackend, options) || this;\n return _this;\n }\n /**\n * Show a report dialog to the user to send feedback to a specific event.\n *\n * @param options Set individual options for the dialog\n */\n BrowserClient.prototype.showReportDialog = function (options) {\n if (options === void 0) { options = {}; }\n // doesn't work without a document (React Native)\n var document = getGlobalObject().document;\n if (!document) {\n return;\n }\n if (!this._isEnabled()) {\n IS_DEBUG_BUILD && logger.error('Trying to call showReportDialog with Sentry Client disabled');\n return;\n }\n injectReportDialog(__assign(__assign({}, options), { dsn: options.dsn || this.getDsn() }));\n };\n /**\n * @inheritDoc\n */\n BrowserClient.prototype._prepareEvent = function (event, scope, hint) {\n event.platform = event.platform || 'javascript';\n return _super.prototype._prepareEvent.call(this, event, scope, hint);\n };\n /**\n * @inheritDoc\n */\n BrowserClient.prototype._sendEvent = function (event) {\n var integration = this.getIntegration(Breadcrumbs);\n if (integration) {\n integration.addSentryBreadcrumb(event);\n }\n _super.prototype._sendEvent.call(this, event);\n };\n return BrowserClient;\n}(BaseClient));\nexport { BrowserClient };\n//# sourceMappingURL=client.js.map","import { __assign } from \"tslib\";\nimport { Severity } from '@sentry/types';\nimport { addExceptionMechanism, addExceptionTypeValue, createStackParser, extractExceptionKeysForMessage, isDOMError, isDOMException, isError, isErrorEvent, isEvent, isPlainObject, normalizeToSize, resolvedSyncPromise, } from '@sentry/utils';\nimport { chromeStackParser, geckoStackParser, opera10StackParser, opera11StackParser, winjsStackParser, } from './stack-parsers';\n/**\n * This function creates an exception from an TraceKitStackTrace\n * @param stacktrace TraceKitStackTrace that will be converted to an exception\n * @hidden\n */\nexport function exceptionFromError(ex) {\n // Get the frames first since Opera can lose the stack if we touch anything else first\n var frames = parseStackFrames(ex);\n var exception = {\n type: ex && ex.name,\n value: extractMessage(ex),\n };\n if (frames.length) {\n exception.stacktrace = { frames: frames };\n }\n if (exception.type === undefined && exception.value === '') {\n exception.value = 'Unrecoverable error caught';\n }\n return exception;\n}\n/**\n * @hidden\n */\nexport function eventFromPlainObject(exception, syntheticException, isUnhandledRejection) {\n var event = {\n exception: {\n values: [\n {\n type: isEvent(exception) ? exception.constructor.name : isUnhandledRejection ? 'UnhandledRejection' : 'Error',\n value: \"Non-Error \" + (isUnhandledRejection ? 'promise rejection' : 'exception') + \" captured with keys: \" + extractExceptionKeysForMessage(exception),\n },\n ],\n },\n extra: {\n __serialized__: normalizeToSize(exception),\n },\n };\n if (syntheticException) {\n var frames_1 = parseStackFrames(syntheticException);\n if (frames_1.length) {\n event.stacktrace = { frames: frames_1 };\n }\n }\n return event;\n}\n/**\n * @hidden\n */\nexport function eventFromError(ex) {\n return {\n exception: {\n values: [exceptionFromError(ex)],\n },\n };\n}\n/** Parses stack frames from an error */\nexport function parseStackFrames(ex) {\n // Access and store the stacktrace property before doing ANYTHING\n // else to it because Opera is not very good at providing it\n // reliably in other circumstances.\n var stacktrace = ex.stacktrace || ex.stack || '';\n var popSize = getPopSize(ex);\n try {\n return createStackParser(opera10StackParser, opera11StackParser, chromeStackParser, winjsStackParser, geckoStackParser)(stacktrace, popSize);\n }\n catch (e) {\n // no-empty\n }\n return [];\n}\n// Based on our own mapping pattern - https://github.com/getsentry/sentry/blob/9f08305e09866c8bd6d0c24f5b0aabdd7dd6c59c/src/sentry/lang/javascript/errormapping.py#L83-L108\nvar reactMinifiedRegexp = /Minified React error #\\d+;/i;\nfunction getPopSize(ex) {\n if (ex) {\n if (typeof ex.framesToPop === 'number') {\n return ex.framesToPop;\n }\n if (reactMinifiedRegexp.test(ex.message)) {\n return 1;\n }\n }\n return 0;\n}\n/**\n * There are cases where stacktrace.message is an Event object\n * https://github.com/getsentry/sentry-javascript/issues/1949\n * In this specific case we try to extract stacktrace.message.error.message\n */\nfunction extractMessage(ex) {\n var message = ex && ex.message;\n if (!message) {\n return 'No error message';\n }\n if (message.error && typeof message.error.message === 'string') {\n return message.error.message;\n }\n return message;\n}\n/**\n * Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.\n * @hidden\n */\nexport function eventFromException(exception, hint, attachStacktrace) {\n var syntheticException = (hint && hint.syntheticException) || undefined;\n var event = eventFromUnknownInput(exception, syntheticException, attachStacktrace);\n addExceptionMechanism(event); // defaults to { type: 'generic', handled: true }\n event.level = Severity.Error;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n}\n/**\n * Builds and Event from a Message\n * @hidden\n */\nexport function eventFromMessage(message, level, hint, attachStacktrace) {\n if (level === void 0) { level = Severity.Info; }\n var syntheticException = (hint && hint.syntheticException) || undefined;\n var event = eventFromString(message, syntheticException, attachStacktrace);\n event.level = level;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n}\n/**\n * @hidden\n */\nexport function eventFromUnknownInput(exception, syntheticException, attachStacktrace, isUnhandledRejection) {\n var event;\n if (isErrorEvent(exception) && exception.error) {\n // If it is an ErrorEvent with `error` property, extract it to get actual Error\n var errorEvent = exception;\n return eventFromError(errorEvent.error);\n }\n // If it is a `DOMError` (which is a legacy API, but still supported in some browsers) then we just extract the name\n // and message, as it doesn't provide anything else. According to the spec, all `DOMExceptions` should also be\n // `Error`s, but that's not the case in IE11, so in that case we treat it the same as we do a `DOMError`.\n //\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMError\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMException\n // https://webidl.spec.whatwg.org/#es-DOMException-specialness\n if (isDOMError(exception) || isDOMException(exception)) {\n var domException = exception;\n if ('stack' in exception) {\n event = eventFromError(exception);\n }\n else {\n var name_1 = domException.name || (isDOMError(domException) ? 'DOMError' : 'DOMException');\n var message = domException.message ? name_1 + \": \" + domException.message : name_1;\n event = eventFromString(message, syntheticException, attachStacktrace);\n addExceptionTypeValue(event, message);\n }\n if ('code' in domException) {\n event.tags = __assign(__assign({}, event.tags), { 'DOMException.code': \"\" + domException.code });\n }\n return event;\n }\n if (isError(exception)) {\n // we have a real Error object, do nothing\n return eventFromError(exception);\n }\n if (isPlainObject(exception) || isEvent(exception)) {\n // If it's a plain object or an instance of `Event` (the built-in JS kind, not this SDK's `Event` type), serialize\n // it manually. This will allow us to group events based on top-level keys which is much better than creating a new\n // group on any key/value change.\n var objectException = exception;\n event = eventFromPlainObject(objectException, syntheticException, isUnhandledRejection);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n return event;\n }\n // If none of previous checks were valid, then it means that it's not:\n // - an instance of DOMError\n // - an instance of DOMException\n // - an instance of Event\n // - an instance of Error\n // - a valid ErrorEvent (one with an error property)\n // - a plain Object\n //\n // So bail out and capture it as a simple message:\n event = eventFromString(exception, syntheticException, attachStacktrace);\n addExceptionTypeValue(event, \"\" + exception, undefined);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n return event;\n}\n/**\n * @hidden\n */\nexport function eventFromString(input, syntheticException, attachStacktrace) {\n var event = {\n message: input,\n };\n if (attachStacktrace && syntheticException) {\n var frames_2 = parseStackFrames(syntheticException);\n if (frames_2.length) {\n event.stacktrace = { frames: frames_2 };\n }\n }\n return event;\n}\n//# sourceMappingURL=eventbuilder.js.map","/*\n * This file defines flags and constants that can be modified during compile time in order to facilitate tree shaking\n * for users.\n *\n * Debug flags need to be declared in each package individually and must not be imported across package boundaries,\n * because some build tools have trouble tree-shaking imported guards.\n *\n * As a convention, we define debug flags in a `flags.ts` file in the root of a package's `src` folder.\n *\n * Debug flag files will contain \"magic strings\" like `__SENTRY_DEBUG__` that may get replaced with actual values during\n * our, or the user's build process. Take care when introducing new flags - they must not throw if they are not\n * replaced.\n */\n/** Flag that is true for debug builds, false otherwise. */\nexport var IS_DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' ? true : __SENTRY_DEBUG__;\n//# sourceMappingURL=flags.js.map","import { __assign } from \"tslib\";\nimport { captureException, getReportDialogEndpoint, withScope } from '@sentry/core';\nimport { addExceptionMechanism, addExceptionTypeValue, addNonEnumerableProperty, getGlobalObject, getOriginalFunction, logger, markFunctionWrapped, } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from './flags';\nvar global = getGlobalObject();\nvar ignoreOnError = 0;\n/**\n * @hidden\n */\nexport function shouldIgnoreOnError() {\n return ignoreOnError > 0;\n}\n/**\n * @hidden\n */\nexport function ignoreNextOnError() {\n // onerror should trigger before setTimeout\n ignoreOnError += 1;\n setTimeout(function () {\n ignoreOnError -= 1;\n });\n}\n/**\n * Instruments the given function and sends an event to Sentry every time the\n * function throws an exception.\n *\n * @param fn A function to wrap.\n * @returns The wrapped function.\n * @hidden\n */\nexport function wrap(fn, options, before) {\n // for future readers what this does is wrap a function and then create\n // a bi-directional wrapping between them.\n //\n // example: wrapped = wrap(original);\n // original.__sentry_wrapped__ -> wrapped\n // wrapped.__sentry_original__ -> original\n if (options === void 0) { options = {}; }\n if (typeof fn !== 'function') {\n return fn;\n }\n try {\n // if we're dealing with a function that was previously wrapped, return\n // the original wrapper.\n var wrapper = fn.__sentry_wrapped__;\n if (wrapper) {\n return wrapper;\n }\n // We don't wanna wrap it twice\n if (getOriginalFunction(fn)) {\n return fn;\n }\n }\n catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n // Bail on wrapping and return the function as-is (defers to window.onerror).\n return fn;\n }\n /* eslint-disable prefer-rest-params */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var sentryWrapped = function () {\n var args = Array.prototype.slice.call(arguments);\n try {\n if (before && typeof before === 'function') {\n before.apply(this, arguments);\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n var wrappedArguments = args.map(function (arg) { return wrap(arg, options); });\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means the sentry.javascript SDK caught an error invoking your application code. This\n // is expected behavior and NOT indicative of a bug with sentry.javascript.\n return fn.apply(this, wrappedArguments);\n }\n catch (ex) {\n ignoreNextOnError();\n withScope(function (scope) {\n scope.addEventProcessor(function (event) {\n if (options.mechanism) {\n addExceptionTypeValue(event, undefined, undefined);\n addExceptionMechanism(event, options.mechanism);\n }\n event.extra = __assign(__assign({}, event.extra), { arguments: args });\n return event;\n });\n captureException(ex);\n });\n throw ex;\n }\n };\n /* eslint-enable prefer-rest-params */\n // Accessing some objects may throw\n // ref: https://github.com/getsentry/sentry-javascript/issues/1168\n try {\n for (var property in fn) {\n if (Object.prototype.hasOwnProperty.call(fn, property)) {\n sentryWrapped[property] = fn[property];\n }\n }\n }\n catch (_oO) { } // eslint-disable-line no-empty\n // Signal that this function has been wrapped/filled already\n // for both debugging and to prevent it to being wrapped/filled twice\n markFunctionWrapped(sentryWrapped, fn);\n addNonEnumerableProperty(fn, '__sentry_wrapped__', sentryWrapped);\n // Restore original function name (not all browsers allow that)\n try {\n var descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name');\n if (descriptor.configurable) {\n Object.defineProperty(sentryWrapped, 'name', {\n get: function () {\n return fn.name;\n },\n });\n }\n // eslint-disable-next-line no-empty\n }\n catch (_oO) { }\n return sentryWrapped;\n}\n/**\n * Injects the Report Dialog script\n * @hidden\n */\nexport function injectReportDialog(options) {\n if (options === void 0) { options = {}; }\n if (!global.document) {\n return;\n }\n if (!options.eventId) {\n IS_DEBUG_BUILD && logger.error('Missing eventId option in showReportDialog call');\n return;\n }\n if (!options.dsn) {\n IS_DEBUG_BUILD && logger.error('Missing dsn option in showReportDialog call');\n return;\n }\n var script = global.document.createElement('script');\n script.async = true;\n script.src = getReportDialogEndpoint(options.dsn, options);\n if (options.onLoad) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n script.onload = options.onLoad;\n }\n var injectionPoint = global.document.head || global.document.body;\n if (injectionPoint) {\n injectionPoint.appendChild(script);\n }\n}\n//# sourceMappingURL=helpers.js.map","import { __assign } from \"tslib\";\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable max-lines */\nimport { getCurrentHub } from '@sentry/core';\nimport { Severity } from '@sentry/types';\nimport { addInstrumentationHandler, getEventDescription, getGlobalObject, htmlTreeAsString, parseUrl, safeJoin, severityFromString, } from '@sentry/utils';\n/**\n * Default Breadcrumbs instrumentations\n * TODO: Deprecated - with v6, this will be renamed to `Instrument`\n */\nvar Breadcrumbs = /** @class */ (function () {\n /**\n * @inheritDoc\n */\n function Breadcrumbs(options) {\n /**\n * @inheritDoc\n */\n this.name = Breadcrumbs.id;\n this._options = __assign({ console: true, dom: true, fetch: true, history: true, sentry: true, xhr: true }, options);\n }\n /**\n * Create a breadcrumb of `sentry` from the events themselves\n */\n Breadcrumbs.prototype.addSentryBreadcrumb = function (event) {\n if (!this._options.sentry) {\n return;\n }\n getCurrentHub().addBreadcrumb({\n category: \"sentry.\" + (event.type === 'transaction' ? 'transaction' : 'event'),\n event_id: event.event_id,\n level: event.level,\n message: getEventDescription(event),\n }, {\n event: event,\n });\n };\n /**\n * Instrument browser built-ins w/ breadcrumb capturing\n * - Console API\n * - DOM API (click/typing)\n * - XMLHttpRequest API\n * - Fetch API\n * - History API\n */\n Breadcrumbs.prototype.setupOnce = function () {\n if (this._options.console) {\n addInstrumentationHandler('console', _consoleBreadcrumb);\n }\n if (this._options.dom) {\n addInstrumentationHandler('dom', _domBreadcrumb(this._options.dom));\n }\n if (this._options.xhr) {\n addInstrumentationHandler('xhr', _xhrBreadcrumb);\n }\n if (this._options.fetch) {\n addInstrumentationHandler('fetch', _fetchBreadcrumb);\n }\n if (this._options.history) {\n addInstrumentationHandler('history', _historyBreadcrumb);\n }\n };\n /**\n * @inheritDoc\n */\n Breadcrumbs.id = 'Breadcrumbs';\n return Breadcrumbs;\n}());\nexport { Breadcrumbs };\n/**\n * A HOC that creaes a function that creates breadcrumbs from DOM API calls.\n * This is a HOC so that we get access to dom options in the closure.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _domBreadcrumb(dom) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function _innerDomBreadcrumb(handlerData) {\n var target;\n var keyAttrs = typeof dom === 'object' ? dom.serializeAttribute : undefined;\n if (typeof keyAttrs === 'string') {\n keyAttrs = [keyAttrs];\n }\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n target = handlerData.event.target\n ? htmlTreeAsString(handlerData.event.target, keyAttrs)\n : htmlTreeAsString(handlerData.event, keyAttrs);\n }\n catch (e) {\n target = '<unknown>';\n }\n if (target.length === 0) {\n return;\n }\n getCurrentHub().addBreadcrumb({\n category: \"ui.\" + handlerData.name,\n message: target,\n }, {\n event: handlerData.event,\n name: handlerData.name,\n global: handlerData.global,\n });\n }\n return _innerDomBreadcrumb;\n}\n/**\n * Creates breadcrumbs from console API calls\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _consoleBreadcrumb(handlerData) {\n var breadcrumb = {\n category: 'console',\n data: {\n arguments: handlerData.args,\n logger: 'console',\n },\n level: severityFromString(handlerData.level),\n message: safeJoin(handlerData.args, ' '),\n };\n if (handlerData.level === 'assert') {\n if (handlerData.args[0] === false) {\n breadcrumb.message = \"Assertion failed: \" + (safeJoin(handlerData.args.slice(1), ' ') || 'console.assert');\n breadcrumb.data.arguments = handlerData.args.slice(1);\n }\n else {\n // Don't capture a breadcrumb for passed assertions\n return;\n }\n }\n getCurrentHub().addBreadcrumb(breadcrumb, {\n input: handlerData.args,\n level: handlerData.level,\n });\n}\n/**\n * Creates breadcrumbs from XHR API calls\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _xhrBreadcrumb(handlerData) {\n if (handlerData.endTimestamp) {\n // We only capture complete, non-sentry requests\n if (handlerData.xhr.__sentry_own_request__) {\n return;\n }\n var _a = handlerData.xhr.__sentry_xhr__ || {}, method = _a.method, url = _a.url, status_code = _a.status_code, body = _a.body;\n getCurrentHub().addBreadcrumb({\n category: 'xhr',\n data: {\n method: method,\n url: url,\n status_code: status_code,\n },\n type: 'http',\n }, {\n xhr: handlerData.xhr,\n input: body,\n });\n return;\n }\n}\n/**\n * Creates breadcrumbs from fetch API calls\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _fetchBreadcrumb(handlerData) {\n // We only capture complete fetch requests\n if (!handlerData.endTimestamp) {\n return;\n }\n if (handlerData.fetchData.url.match(/sentry_key/) && handlerData.fetchData.method === 'POST') {\n // We will not create breadcrumbs for fetch requests that contain `sentry_key` (internal sentry requests)\n return;\n }\n if (handlerData.error) {\n getCurrentHub().addBreadcrumb({\n category: 'fetch',\n data: handlerData.fetchData,\n level: Severity.Error,\n type: 'http',\n }, {\n data: handlerData.error,\n input: handlerData.args,\n });\n }\n else {\n getCurrentHub().addBreadcrumb({\n category: 'fetch',\n data: __assign(__assign({}, handlerData.fetchData), { status_code: handlerData.response.status }),\n type: 'http',\n }, {\n input: handlerData.args,\n response: handlerData.response,\n });\n }\n}\n/**\n * Creates breadcrumbs from history API calls\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _historyBreadcrumb(handlerData) {\n var global = getGlobalObject();\n var from = handlerData.from;\n var to = handlerData.to;\n var parsedLoc = parseUrl(global.location.href);\n var parsedFrom = parseUrl(from);\n var parsedTo = parseUrl(to);\n // Initial pushState doesn't provide `from` information\n if (!parsedFrom.path) {\n parsedFrom = parsedLoc;\n }\n // Use only the path component of the URL if the URL matches the current\n // document (almost all the time when using pushState)\n if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) {\n to = parsedTo.relative;\n }\n if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {\n from = parsedFrom.relative;\n }\n getCurrentHub().addBreadcrumb({\n category: 'navigation',\n data: {\n from: from,\n to: to,\n },\n });\n}\n//# sourceMappingURL=breadcrumbs.js.map","import { logger } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from '../flags';\n/** Deduplication filter */\nvar Dedupe = /** @class */ (function () {\n function Dedupe() {\n /**\n * @inheritDoc\n */\n this.name = Dedupe.id;\n }\n /**\n * @inheritDoc\n */\n Dedupe.prototype.setupOnce = function (addGlobalEventProcessor, getCurrentHub) {\n addGlobalEventProcessor(function (currentEvent) {\n var self = getCurrentHub().getIntegration(Dedupe);\n if (self) {\n // Juuust in case something goes wrong\n try {\n if (_shouldDropEvent(currentEvent, self._previousEvent)) {\n IS_DEBUG_BUILD && logger.warn('Event dropped due to being a duplicate of previously captured event.');\n return null;\n }\n }\n catch (_oO) {\n return (self._previousEvent = currentEvent);\n }\n return (self._previousEvent = currentEvent);\n }\n return currentEvent;\n });\n };\n /**\n * @inheritDoc\n */\n Dedupe.id = 'Dedupe';\n return Dedupe;\n}());\nexport { Dedupe };\n/** JSDoc */\nfunction _shouldDropEvent(currentEvent, previousEvent) {\n if (!previousEvent) {\n return false;\n }\n if (_isSameMessageEvent(currentEvent, previousEvent)) {\n return true;\n }\n if (_isSameExceptionEvent(currentEvent, previousEvent)) {\n return true;\n }\n return false;\n}\n/** JSDoc */\nfunction _isSameMessageEvent(currentEvent, previousEvent) {\n var currentMessage = currentEvent.message;\n var previousMessage = previousEvent.message;\n // If neither event has a message property, they were both exceptions, so bail out\n if (!currentMessage && !previousMessage) {\n return false;\n }\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentMessage && !previousMessage) || (!currentMessage && previousMessage)) {\n return false;\n }\n if (currentMessage !== previousMessage) {\n return false;\n }\n if (!_isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n if (!_isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n return true;\n}\n/** JSDoc */\nfunction _isSameExceptionEvent(currentEvent, previousEvent) {\n var previousException = _getExceptionFromEvent(previousEvent);\n var currentException = _getExceptionFromEvent(currentEvent);\n if (!previousException || !currentException) {\n return false;\n }\n if (previousException.type !== currentException.type || previousException.value !== currentException.value) {\n return false;\n }\n if (!_isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n if (!_isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n return true;\n}\n/** JSDoc */\nfunction _isSameStacktrace(currentEvent, previousEvent) {\n var currentFrames = _getFramesFromEvent(currentEvent);\n var previousFrames = _getFramesFromEvent(previousEvent);\n // If neither event has a stacktrace, they are assumed to be the same\n if (!currentFrames && !previousFrames) {\n return true;\n }\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentFrames && !previousFrames) || (!currentFrames && previousFrames)) {\n return false;\n }\n currentFrames = currentFrames;\n previousFrames = previousFrames;\n // If number of frames differ, they are not the same\n if (previousFrames.length !== currentFrames.length) {\n return false;\n }\n // Otherwise, compare the two\n for (var i = 0; i < previousFrames.length; i++) {\n var frameA = previousFrames[i];\n var frameB = currentFrames[i];\n if (frameA.filename !== frameB.filename ||\n frameA.lineno !== frameB.lineno ||\n frameA.colno !== frameB.colno ||\n frameA.function !== frameB.function) {\n return false;\n }\n }\n return true;\n}\n/** JSDoc */\nfunction _isSameFingerprint(currentEvent, previousEvent) {\n var currentFingerprint = currentEvent.fingerprint;\n var previousFingerprint = previousEvent.fingerprint;\n // If neither event has a fingerprint, they are assumed to be the same\n if (!currentFingerprint && !previousFingerprint) {\n return true;\n }\n // If only one event has a fingerprint, but not the other one, they are not the same\n if ((currentFingerprint && !previousFingerprint) || (!currentFingerprint && previousFingerprint)) {\n return false;\n }\n currentFingerprint = currentFingerprint;\n previousFingerprint = previousFingerprint;\n // Otherwise, compare the two\n try {\n return !!(currentFingerprint.join('') === previousFingerprint.join(''));\n }\n catch (_oO) {\n return false;\n }\n}\n/** JSDoc */\nfunction _getExceptionFromEvent(event) {\n return event.exception && event.exception.values && event.exception.values[0];\n}\n/** JSDoc */\nfunction _getFramesFromEvent(event) {\n var exception = event.exception;\n if (exception) {\n try {\n // @ts-ignore Object could be undefined\n return exception.values[0].stacktrace.frames;\n }\n catch (_oO) {\n return undefined;\n }\n }\n else if (event.stacktrace) {\n return event.stacktrace.frames;\n }\n return undefined;\n}\n//# sourceMappingURL=dedupe.js.map","import { __assign, __read } from \"tslib\";\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\nimport { getCurrentHub } from '@sentry/core';\nimport { Severity } from '@sentry/types';\nimport { addExceptionMechanism, addInstrumentationHandler, getLocationHref, isErrorEvent, isPrimitive, isString, logger, } from '@sentry/utils';\nimport { eventFromUnknownInput } from '../eventbuilder';\nimport { IS_DEBUG_BUILD } from '../flags';\nimport { shouldIgnoreOnError } from '../helpers';\n/** Global handlers */\nvar GlobalHandlers = /** @class */ (function () {\n /** JSDoc */\n function GlobalHandlers(options) {\n /**\n * @inheritDoc\n */\n this.name = GlobalHandlers.id;\n /**\n * Stores references functions to installing handlers. Will set to undefined\n * after they have been run so that they are not used twice.\n */\n this._installFunc = {\n onerror: _installGlobalOnErrorHandler,\n onunhandledrejection: _installGlobalOnUnhandledRejectionHandler,\n };\n this._options = __assign({ onerror: true, onunhandledrejection: true }, options);\n }\n /**\n * @inheritDoc\n */\n GlobalHandlers.prototype.setupOnce = function () {\n Error.stackTraceLimit = 50;\n var options = this._options;\n // We can disable guard-for-in as we construct the options object above + do checks against\n // `this._installFunc` for the property.\n // eslint-disable-next-line guard-for-in\n for (var key in options) {\n var installFunc = this._installFunc[key];\n if (installFunc && options[key]) {\n globalHandlerLog(key);\n installFunc();\n this._installFunc[key] = undefined;\n }\n }\n };\n /**\n * @inheritDoc\n */\n GlobalHandlers.id = 'GlobalHandlers';\n return GlobalHandlers;\n}());\nexport { GlobalHandlers };\n/** JSDoc */\nfunction _installGlobalOnErrorHandler() {\n addInstrumentationHandler('error', \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function (data) {\n var _a = __read(getHubAndAttachStacktrace(), 2), hub = _a[0], attachStacktrace = _a[1];\n if (!hub.getIntegration(GlobalHandlers)) {\n return;\n }\n var msg = data.msg, url = data.url, line = data.line, column = data.column, error = data.error;\n if (shouldIgnoreOnError() || (error && error.__sentry_own_request__)) {\n return;\n }\n var event = error === undefined && isString(msg)\n ? _eventFromIncompleteOnError(msg, url, line, column)\n : _enhanceEventWithInitialFrame(eventFromUnknownInput(error || msg, undefined, attachStacktrace, false), url, line, column);\n event.level = Severity.Error;\n addMechanismAndCapture(hub, error, event, 'onerror');\n });\n}\n/** JSDoc */\nfunction _installGlobalOnUnhandledRejectionHandler() {\n addInstrumentationHandler('unhandledrejection', \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function (e) {\n var _a = __read(getHubAndAttachStacktrace(), 2), hub = _a[0], attachStacktrace = _a[1];\n if (!hub.getIntegration(GlobalHandlers)) {\n return;\n }\n var error = e;\n // dig the object of the rejection out of known event types\n try {\n // PromiseRejectionEvents store the object of the rejection under 'reason'\n // see https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent\n if ('reason' in e) {\n error = e.reason;\n }\n // something, somewhere, (likely a browser extension) effectively casts PromiseRejectionEvents\n // to CustomEvents, moving the `promise` and `reason` attributes of the PRE into\n // the CustomEvent's `detail` attribute, since they're not part of CustomEvent's spec\n // see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent and\n // https://github.com/getsentry/sentry-javascript/issues/2380\n else if ('detail' in e && 'reason' in e.detail) {\n error = e.detail.reason;\n }\n }\n catch (_oO) {\n // no-empty\n }\n if (shouldIgnoreOnError() || (error && error.__sentry_own_request__)) {\n return true;\n }\n var event = isPrimitive(error)\n ? _eventFromRejectionWithPrimitive(error)\n : eventFromUnknownInput(error, undefined, attachStacktrace, true);\n event.level = Severity.Error;\n addMechanismAndCapture(hub, error, event, 'onunhandledrejection');\n return;\n });\n}\n/**\n * Create an event from a promise rejection where the `reason` is a primitive.\n *\n * @param reason: The `reason` property of the promise rejection\n * @returns An Event object with an appropriate `exception` value\n */\nfunction _eventFromRejectionWithPrimitive(reason) {\n return {\n exception: {\n values: [\n {\n type: 'UnhandledRejection',\n // String() is needed because the Primitive type includes symbols (which can't be automatically stringified)\n value: \"Non-Error promise rejection captured with value: \" + String(reason),\n },\n ],\n },\n };\n}\n/**\n * This function creates a stack from an old, error-less onerror handler.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _eventFromIncompleteOnError(msg, url, line, column) {\n var ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;\n // If 'message' is ErrorEvent, get real message from inside\n var message = isErrorEvent(msg) ? msg.message : msg;\n var name = 'Error';\n var groups = message.match(ERROR_TYPES_RE);\n if (groups) {\n name = groups[1];\n message = groups[2];\n }\n var event = {\n exception: {\n values: [\n {\n type: name,\n value: message,\n },\n ],\n },\n };\n return _enhanceEventWithInitialFrame(event, url, line, column);\n}\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _enhanceEventWithInitialFrame(event, url, line, column) {\n // event.exception\n var e = (event.exception = event.exception || {});\n // event.exception.values\n var ev = (e.values = e.values || []);\n // event.exception.values[0]\n var ev0 = (ev[0] = ev[0] || {});\n // event.exception.values[0].stacktrace\n var ev0s = (ev0.stacktrace = ev0.stacktrace || {});\n // event.exception.values[0].stacktrace.frames\n var ev0sf = (ev0s.frames = ev0s.frames || []);\n var colno = isNaN(parseInt(column, 10)) ? undefined : column;\n var lineno = isNaN(parseInt(line, 10)) ? undefined : line;\n var filename = isString(url) && url.length > 0 ? url : getLocationHref();\n // event.exception.values[0].stacktrace.frames\n if (ev0sf.length === 0) {\n ev0sf.push({\n colno: colno,\n filename: filename,\n function: '?',\n in_app: true,\n lineno: lineno,\n });\n }\n return event;\n}\nfunction globalHandlerLog(type) {\n IS_DEBUG_BUILD && logger.log(\"Global Handler attached: \" + type);\n}\nfunction addMechanismAndCapture(hub, error, event, type) {\n addExceptionMechanism(event, {\n handled: false,\n type: type,\n });\n hub.captureEvent(event, {\n originalException: error,\n });\n}\nfunction getHubAndAttachStacktrace() {\n var hub = getCurrentHub();\n var client = hub.getClient();\n var attachStacktrace = client && client.getOptions().attachStacktrace;\n return [hub, attachStacktrace];\n}\n//# sourceMappingURL=globalhandlers.js.map","import { __read, __spread } from \"tslib\";\nimport { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { isInstanceOf } from '@sentry/utils';\nimport { exceptionFromError } from '../eventbuilder';\nvar DEFAULT_KEY = 'cause';\nvar DEFAULT_LIMIT = 5;\n/** Adds SDK info to an event. */\nvar LinkedErrors = /** @class */ (function () {\n /**\n * @inheritDoc\n */\n function LinkedErrors(options) {\n if (options === void 0) { options = {}; }\n /**\n * @inheritDoc\n */\n this.name = LinkedErrors.id;\n this._key = options.key || DEFAULT_KEY;\n this._limit = options.limit || DEFAULT_LIMIT;\n }\n /**\n * @inheritDoc\n */\n LinkedErrors.prototype.setupOnce = function () {\n addGlobalEventProcessor(function (event, hint) {\n var self = getCurrentHub().getIntegration(LinkedErrors);\n return self ? _handler(self._key, self._limit, event, hint) : event;\n });\n };\n /**\n * @inheritDoc\n */\n LinkedErrors.id = 'LinkedErrors';\n return LinkedErrors;\n}());\nexport { LinkedErrors };\n/**\n * @inheritDoc\n */\nexport function _handler(key, limit, event, hint) {\n if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n return event;\n }\n var linkedErrors = _walkErrorTree(limit, hint.originalException, key);\n event.exception.values = __spread(linkedErrors, event.exception.values);\n return event;\n}\n/**\n * JSDOC\n */\nexport function _walkErrorTree(limit, error, key, stack) {\n if (stack === void 0) { stack = []; }\n if (!isInstanceOf(error[key], Error) || stack.length + 1 >= limit) {\n return stack;\n }\n var exception = exceptionFromError(error[key]);\n return _walkErrorTree(limit, error[key], key, __spread([exception], stack));\n}\n//# sourceMappingURL=linkederrors.js.map","import { __assign } from \"tslib\";\nimport { fill, getFunctionName, getGlobalObject, getOriginalFunction } from '@sentry/utils';\nimport { wrap } from '../helpers';\nvar DEFAULT_EVENT_TARGET = [\n 'EventTarget',\n 'Window',\n 'Node',\n 'ApplicationCache',\n 'AudioTrackList',\n 'ChannelMergerNode',\n 'CryptoOperation',\n 'EventSource',\n 'FileReader',\n 'HTMLUnknownElement',\n 'IDBDatabase',\n 'IDBRequest',\n 'IDBTransaction',\n 'KeyOperation',\n 'MediaController',\n 'MessagePort',\n 'ModalWindow',\n 'Notification',\n 'SVGElementInstance',\n 'Screen',\n 'TextTrack',\n 'TextTrackCue',\n 'TextTrackList',\n 'WebSocket',\n 'WebSocketWorker',\n 'Worker',\n 'XMLHttpRequest',\n 'XMLHttpRequestEventTarget',\n 'XMLHttpRequestUpload',\n];\n/** Wrap timer functions and event targets to catch errors and provide better meta data */\nvar TryCatch = /** @class */ (function () {\n /**\n * @inheritDoc\n */\n function TryCatch(options) {\n /**\n * @inheritDoc\n */\n this.name = TryCatch.id;\n this._options = __assign({ XMLHttpRequest: true, eventTarget: true, requestAnimationFrame: true, setInterval: true, setTimeout: true }, options);\n }\n /**\n * Wrap timer functions and event targets to catch errors\n * and provide better metadata.\n */\n TryCatch.prototype.setupOnce = function () {\n var global = getGlobalObject();\n if (this._options.setTimeout) {\n fill(global, 'setTimeout', _wrapTimeFunction);\n }\n if (this._options.setInterval) {\n fill(global, 'setInterval', _wrapTimeFunction);\n }\n if (this._options.requestAnimationFrame) {\n fill(global, 'requestAnimationFrame', _wrapRAF);\n }\n if (this._options.XMLHttpRequest && 'XMLHttpRequest' in global) {\n fill(XMLHttpRequest.prototype, 'send', _wrapXHR);\n }\n var eventTargetOption = this._options.eventTarget;\n if (eventTargetOption) {\n var eventTarget = Array.isArray(eventTargetOption) ? eventTargetOption : DEFAULT_EVENT_TARGET;\n eventTarget.forEach(_wrapEventTarget);\n }\n };\n /**\n * @inheritDoc\n */\n TryCatch.id = 'TryCatch';\n return TryCatch;\n}());\nexport { TryCatch };\n/** JSDoc */\nfunction _wrapTimeFunction(original) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var originalCallback = args[0];\n args[0] = wrap(originalCallback, {\n mechanism: {\n data: { function: getFunctionName(original) },\n handled: true,\n type: 'instrument',\n },\n });\n return original.apply(this, args);\n };\n}\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _wrapRAF(original) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function (callback) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return original.apply(this, [\n wrap(callback, {\n mechanism: {\n data: {\n function: 'requestAnimationFrame',\n handler: getFunctionName(original),\n },\n handled: true,\n type: 'instrument',\n },\n }),\n ]);\n };\n}\n/** JSDoc */\nfunction _wrapXHR(originalSend) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n var xhr = this;\n var xmlHttpRequestProps = ['onload', 'onerror', 'onprogress', 'onreadystatechange'];\n xmlHttpRequestProps.forEach(function (prop) {\n if (prop in xhr && typeof xhr[prop] === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n fill(xhr, prop, function (original) {\n var wrapOptions = {\n mechanism: {\n data: {\n function: prop,\n handler: getFunctionName(original),\n },\n handled: true,\n type: 'instrument',\n },\n };\n // If Instrument integration has been called before TryCatch, get the name of original function\n var originalFunction = getOriginalFunction(original);\n if (originalFunction) {\n wrapOptions.mechanism.data.handler = getFunctionName(originalFunction);\n }\n // Otherwise wrap directly\n return wrap(original, wrapOptions);\n });\n }\n });\n return originalSend.apply(this, args);\n };\n}\n/** JSDoc */\nfunction _wrapEventTarget(target) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var global = getGlobalObject();\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n var proto = global[target] && global[target].prototype;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n fill(proto, 'addEventListener', function (original) {\n return function (eventName, fn, options) {\n try {\n if (typeof fn.handleEvent === 'function') {\n fn.handleEvent = wrap(fn.handleEvent.bind(fn), {\n mechanism: {\n data: {\n function: 'handleEvent',\n handler: getFunctionName(fn),\n target: target,\n },\n handled: true,\n type: 'instrument',\n },\n });\n }\n }\n catch (err) {\n // can sometimes get 'Permission denied to access property \"handle Event'\n }\n return original.apply(this, [\n eventName,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n wrap(fn, {\n mechanism: {\n data: {\n function: 'addEventListener',\n handler: getFunctionName(fn),\n target: target,\n },\n handled: true,\n type: 'instrument',\n },\n }),\n options,\n ]);\n };\n });\n fill(proto, 'removeEventListener', function (originalRemoveEventListener) {\n return function (eventName, fn, options) {\n /**\n * There are 2 possible scenarios here:\n *\n * 1. Someone passes a callback, which was attached prior to Sentry initialization, or by using unmodified\n * method, eg. `document.addEventListener.call(el, name, handler). In this case, we treat this function\n * as a pass-through, and call original `removeEventListener` with it.\n *\n * 2. Someone passes a callback, which was attached after Sentry was initialized, which means that it was using\n * our wrapped version of `addEventListener`, which internally calls `wrap` helper.\n * This helper \"wraps\" whole callback inside a try/catch statement, and attached appropriate metadata to it,\n * in order for us to make a distinction between wrapped/non-wrapped functions possible.\n * If a function was wrapped, it has additional property of `__sentry_wrapped__`, holding the handler.\n *\n * When someone adds a handler prior to initialization, and then do it again, but after,\n * then we have to detach both of them. Otherwise, if we'd detach only wrapped one, it'd be impossible\n * to get rid of the initial handler and it'd stick there forever.\n */\n var wrappedEventHandler = fn;\n try {\n var originalEventHandler = wrappedEventHandler && wrappedEventHandler.__sentry_wrapped__;\n if (originalEventHandler) {\n originalRemoveEventListener.call(this, eventName, originalEventHandler, options);\n }\n }\n catch (e) {\n // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n }\n return originalRemoveEventListener.call(this, eventName, wrappedEventHandler, options);\n };\n });\n}\n//# sourceMappingURL=trycatch.js.map","import { __assign } from \"tslib\";\nimport { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { getGlobalObject } from '@sentry/utils';\nvar global = getGlobalObject();\n/** UserAgent */\nvar UserAgent = /** @class */ (function () {\n function UserAgent() {\n /**\n * @inheritDoc\n */\n this.name = UserAgent.id;\n }\n /**\n * @inheritDoc\n */\n UserAgent.prototype.setupOnce = function () {\n addGlobalEventProcessor(function (event) {\n if (getCurrentHub().getIntegration(UserAgent)) {\n // if none of the information we want exists, don't bother\n if (!global.navigator && !global.location && !global.document) {\n return event;\n }\n // grab as much info as exists and add it to the event\n var url = (event.request && event.request.url) || (global.location && global.location.href);\n var referrer = (global.document || {}).referrer;\n var userAgent = (global.navigator || {}).userAgent;\n var headers = __assign(__assign(__assign({}, (event.request && event.request.headers)), (referrer && { Referer: referrer })), (userAgent && { 'User-Agent': userAgent }));\n var request = __assign(__assign({}, (url && { url: url })), { headers: headers });\n return __assign(__assign({}, event), { request: request });\n }\n return event;\n });\n };\n /**\n * @inheritDoc\n */\n UserAgent.id = 'UserAgent';\n return UserAgent;\n}());\nexport { UserAgent };\n//# sourceMappingURL=useragent.js.map","import { __assign } from \"tslib\";\nimport { getCurrentHub, initAndBind, Integrations as CoreIntegrations } from '@sentry/core';\nimport { addInstrumentationHandler, getGlobalObject, logger, resolvedSyncPromise } from '@sentry/utils';\nimport { BrowserClient } from './client';\nimport { IS_DEBUG_BUILD } from './flags';\nimport { wrap as internalWrap } from './helpers';\nimport { Breadcrumbs, Dedupe, GlobalHandlers, LinkedErrors, TryCatch, UserAgent } from './integrations';\nexport var defaultIntegrations = [\n new CoreIntegrations.InboundFilters(),\n new CoreIntegrations.FunctionToString(),\n new TryCatch(),\n new Breadcrumbs(),\n new GlobalHandlers(),\n new LinkedErrors(),\n new Dedupe(),\n new UserAgent(),\n];\n/**\n * The Sentry Browser SDK Client.\n *\n * To use this SDK, call the {@link init} function as early as possible when\n * loading the web page. To set context information or send manual events, use\n * the provided methods.\n *\n * @example\n *\n * ```\n *\n * import { init } from '@sentry/browser';\n *\n * init({\n * dsn: '__DSN__',\n * // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { configureScope } from '@sentry/browser';\n * configureScope((scope: Scope) => {\n * scope.setExtra({ battery: 0.7 });\n * scope.setTag({ user_mode: 'admin' });\n * scope.setUser({ id: '4711' });\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { addBreadcrumb } from '@sentry/browser';\n * addBreadcrumb({\n * message: 'My Breadcrumb',\n * // ...\n * });\n * ```\n *\n * @example\n *\n * ```\n *\n * import * as Sentry from '@sentry/browser';\n * Sentry.captureMessage('Hello, world!');\n * Sentry.captureException(new Error('Good bye'));\n * Sentry.captureEvent({\n * message: 'Manual',\n * stacktrace: [\n * // ...\n * ],\n * });\n * ```\n *\n * @see {@link BrowserOptions} for documentation on configuration options.\n */\nexport function init(options) {\n if (options === void 0) { options = {}; }\n if (options.defaultIntegrations === undefined) {\n options.defaultIntegrations = defaultIntegrations;\n }\n if (options.release === undefined) {\n var window_1 = getGlobalObject();\n // This supports the variable that sentry-webpack-plugin injects\n if (window_1.SENTRY_RELEASE && window_1.SENTRY_RELEASE.id) {\n options.release = window_1.SENTRY_RELEASE.id;\n }\n }\n if (options.autoSessionTracking === undefined) {\n options.autoSessionTracking = true;\n }\n if (options.sendClientReports === undefined) {\n options.sendClientReports = true;\n }\n initAndBind(BrowserClient, options);\n if (options.autoSessionTracking) {\n startSessionTracking();\n }\n}\n/**\n * Present the user with a report dialog.\n *\n * @param options Everything is optional, we try to fetch all info need from the global scope.\n */\nexport function showReportDialog(options) {\n if (options === void 0) { options = {}; }\n var hub = getCurrentHub();\n var scope = hub.getScope();\n if (scope) {\n options.user = __assign(__assign({}, scope.getUser()), options.user);\n }\n if (!options.eventId) {\n options.eventId = hub.lastEventId();\n }\n var client = hub.getClient();\n if (client) {\n client.showReportDialog(options);\n }\n}\n/**\n * This is the getter for lastEventId.\n *\n * @returns The last event id of a captured event.\n */\nexport function lastEventId() {\n return getCurrentHub().lastEventId();\n}\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function forceLoad() {\n // Noop\n}\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function onLoad(callback) {\n callback();\n}\n/**\n * Call `flush()` on the current client, if there is one. See {@link Client.flush}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause\n * the client to wait until all events are sent before resolving the promise.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nexport function flush(timeout) {\n var client = getCurrentHub().getClient();\n if (client) {\n return client.flush(timeout);\n }\n IS_DEBUG_BUILD && logger.warn('Cannot flush events. No client defined.');\n return resolvedSyncPromise(false);\n}\n/**\n * Call `close()` on the current client, if there is one. See {@link Client.close}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this\n * parameter will cause the client to wait until all events are sent before disabling itself.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nexport function close(timeout) {\n var client = getCurrentHub().getClient();\n if (client) {\n return client.close(timeout);\n }\n IS_DEBUG_BUILD && logger.warn('Cannot flush events and disable SDK. No client defined.');\n return resolvedSyncPromise(false);\n}\n/**\n * Wrap code within a try/catch block so the SDK is able to capture errors.\n *\n * @param fn A function to wrap.\n *\n * @returns The result of wrapped function call.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function wrap(fn) {\n return internalWrap(fn)();\n}\nfunction startSessionOnHub(hub) {\n hub.startSession({ ignoreDuration: true });\n hub.captureSession();\n}\n/**\n * Enable automatic Session Tracking for the initial page load.\n */\nfunction startSessionTracking() {\n var window = getGlobalObject();\n var document = window.document;\n if (typeof document === 'undefined') {\n IS_DEBUG_BUILD && logger.warn('Session tracking in non-browser environment with @sentry/browser is not supported.');\n return;\n }\n var hub = getCurrentHub();\n // The only way for this to be false is for there to be a version mismatch between @sentry/browser (>= 6.0.0) and\n // @sentry/hub (< 5.27.0). In the simple case, there won't ever be such a mismatch, because the two packages are\n // pinned at the same version in package.json, but there are edge cases where it's possible. See\n // https://github.com/getsentry/sentry-javascript/issues/3207 and\n // https://github.com/getsentry/sentry-javascript/issues/3234 and\n // https://github.com/getsentry/sentry-javascript/issues/3278.\n if (!hub.captureSession) {\n return;\n }\n // The session duration for browser sessions does not track a meaningful\n // concept that can be used as a metric.\n // Automatically captured sessions are akin to page views, and thus we\n // discard their duration.\n startSessionOnHub(hub);\n // We want to create a session for every navigation as well\n addInstrumentationHandler('history', function (_a) {\n var from = _a.from, to = _a.to;\n // Don't create an additional session for the initial route or if the location did not change\n if (!(from === undefined || from === to)) {\n startSessionOnHub(getCurrentHub());\n }\n });\n}\n//# sourceMappingURL=sdk.js.map","import { __read } from \"tslib\";\n// global reference to slice\nvar UNKNOWN_FUNCTION = '?';\nvar OPERA10_PRIORITY = 10;\nvar OPERA11_PRIORITY = 20;\nvar CHROME_PRIORITY = 30;\nvar WINJS_PRIORITY = 40;\nvar GECKO_PRIORITY = 50;\nfunction createFrame(filename, func, lineno, colno) {\n var frame = {\n filename: filename,\n function: func,\n // All browser frames are considered in_app\n in_app: true,\n };\n if (lineno !== undefined) {\n frame.lineno = lineno;\n }\n if (colno !== undefined) {\n frame.colno = colno;\n }\n return frame;\n}\n// Chromium based browsers: Chrome, Brave, new Opera, new Edge\nvar chromeRegex = /^\\s*at (?:(.*?) ?\\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\\/).*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\nvar chromeEvalRegex = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\nvar chrome = function (line) {\n var parts = chromeRegex.exec(line);\n if (parts) {\n var isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n if (isEval) {\n var subMatch = chromeEvalRegex.exec(parts[2]);\n if (subMatch) {\n // throw out eval line/column and use top-most line/column number\n parts[2] = subMatch[1]; // url\n parts[3] = subMatch[2]; // line\n parts[4] = subMatch[3]; // column\n }\n }\n // Kamil: One more hack won't hurt us right? Understanding and adding more rules on top of these regexps right now\n // would be way too time consuming. (TODO: Rewrite whole RegExp to be more readable)\n var _a = __read(extractSafariExtensionDetails(parts[1] || UNKNOWN_FUNCTION, parts[2]), 2), func = _a[0], filename = _a[1];\n return createFrame(filename, func, parts[3] ? +parts[3] : undefined, parts[4] ? +parts[4] : undefined);\n }\n return;\n};\nexport var chromeStackParser = [CHROME_PRIORITY, chrome];\n// gecko regex: `(?:bundle|\\d+\\.js)`: `bundle` is for react native, `\\d+\\.js` also but specifically for ram bundles because it\n// generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js\n// We need this specific case for now because we want no other regex to match.\nvar geckoREgex = /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\\/.*?|\\[native code\\]|[^@]*(?:bundle|\\d+\\.js)|\\/[\\w\\-. /=]+)(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nvar geckoEvalRegex = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\nvar gecko = function (line) {\n var _a;\n var parts = geckoREgex.exec(line);\n if (parts) {\n var isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n if (isEval) {\n var subMatch = geckoEvalRegex.exec(parts[3]);\n if (subMatch) {\n // throw out eval line/column and use top-most line number\n parts[1] = parts[1] || 'eval';\n parts[3] = subMatch[1];\n parts[4] = subMatch[2];\n parts[5] = ''; // no column when eval\n }\n }\n var filename = parts[3];\n var func = parts[1] || UNKNOWN_FUNCTION;\n _a = __read(extractSafariExtensionDetails(func, filename), 2), func = _a[0], filename = _a[1];\n return createFrame(filename, func, parts[4] ? +parts[4] : undefined, parts[5] ? +parts[5] : undefined);\n }\n return;\n};\nexport var geckoStackParser = [GECKO_PRIORITY, gecko];\nvar winjsRegex = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\nvar winjs = function (line) {\n var parts = winjsRegex.exec(line);\n return parts\n ? createFrame(parts[2], parts[1] || UNKNOWN_FUNCTION, +parts[3], parts[4] ? +parts[4] : undefined)\n : undefined;\n};\nexport var winjsStackParser = [WINJS_PRIORITY, winjs];\nvar opera10Regex = / line (\\d+).*script (?:in )?(\\S+)(?:: in function (\\S+))?$/i;\nvar opera10 = function (line) {\n var parts = opera10Regex.exec(line);\n return parts ? createFrame(parts[2], parts[3] || UNKNOWN_FUNCTION, +parts[1]) : undefined;\n};\nexport var opera10StackParser = [OPERA10_PRIORITY, opera10];\nvar opera11Regex = / line (\\d+), column (\\d+)\\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\\(.*\\))? in (.*):\\s*$/i;\nvar opera11 = function (line) {\n var parts = opera11Regex.exec(line);\n return parts ? createFrame(parts[5], parts[3] || parts[4] || UNKNOWN_FUNCTION, +parts[1], +parts[2]) : undefined;\n};\nexport var opera11StackParser = [OPERA11_PRIORITY, opera11];\n/**\n * Safari web extensions, starting version unknown, can produce \"frames-only\" stacktraces.\n * What it means, is that instead of format like:\n *\n * Error: wat\n * at function@url:row:col\n * at function@url:row:col\n * at function@url:row:col\n *\n * it produces something like:\n *\n * function@url:row:col\n * function@url:row:col\n * function@url:row:col\n *\n * Because of that, it won't be captured by `chrome` RegExp and will fall into `Gecko` branch.\n * This function is extracted so that we can use it in both places without duplicating the logic.\n * Unfortunately \"just\" changing RegExp is too complicated now and making it pass all tests\n * and fix this case seems like an impossible, or at least way too time-consuming task.\n */\nvar extractSafariExtensionDetails = function (func, filename) {\n var isSafariExtension = func.indexOf('safari-extension') !== -1;\n var isSafariWebExtension = func.indexOf('safari-web-extension') !== -1;\n return isSafariExtension || isSafariWebExtension\n ? [\n func.indexOf('@') !== -1 ? func.split('@')[0] : UNKNOWN_FUNCTION,\n isSafariExtension ? \"safari-extension:\" + filename : \"safari-web-extension:\" + filename,\n ]\n : [func, filename];\n};\n//# sourceMappingURL=stack-parsers.js.map","import { __read } from \"tslib\";\nimport { eventToSentryRequest, getEnvelopeEndpointWithUrlEncodedAuth, getStoreEndpointWithUrlEncodedAuth, initAPIDetails, sessionToSentryRequest, } from '@sentry/core';\nimport { createClientReportEnvelope, disabledUntil, dsnToString, eventStatusFromHttpCode, getGlobalObject, isRateLimited, logger, makePromiseBuffer, serializeEnvelope, updateRateLimits, } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from '../flags';\nimport { sendReport } from './utils';\nfunction requestTypeToCategory(ty) {\n var tyStr = ty;\n return tyStr === 'event' ? 'error' : tyStr;\n}\nvar global = getGlobalObject();\n/** Base Transport class implementation */\nvar BaseTransport = /** @class */ (function () {\n function BaseTransport(options) {\n var _this = this;\n this.options = options;\n /** A simple buffer holding all requests. */\n this._buffer = makePromiseBuffer(30);\n /** Locks transport after receiving rate limits in a response */\n this._rateLimits = {};\n this._outcomes = {};\n this._api = initAPIDetails(options.dsn, options._metadata, options.tunnel);\n // eslint-disable-next-line deprecation/deprecation\n this.url = getStoreEndpointWithUrlEncodedAuth(this._api.dsn);\n if (this.options.sendClientReports && global.document) {\n global.document.addEventListener('visibilitychange', function () {\n if (global.document.visibilityState === 'hidden') {\n _this._flushOutcomes();\n }\n });\n }\n }\n /**\n * @inheritDoc\n */\n BaseTransport.prototype.sendEvent = function (event) {\n return this._sendRequest(eventToSentryRequest(event, this._api), event);\n };\n /**\n * @inheritDoc\n */\n BaseTransport.prototype.sendSession = function (session) {\n return this._sendRequest(sessionToSentryRequest(session, this._api), session);\n };\n /**\n * @inheritDoc\n */\n BaseTransport.prototype.close = function (timeout) {\n return this._buffer.drain(timeout);\n };\n /**\n * @inheritDoc\n */\n BaseTransport.prototype.recordLostEvent = function (reason, category) {\n var _a;\n if (!this.options.sendClientReports) {\n return;\n }\n // We want to track each category (event, transaction, session) separately\n // but still keep the distinction between different type of outcomes.\n // We could use nested maps, but it's much easier to read and type this way.\n // A correct type for map-based implementation if we want to go that route\n // would be `Partial<Record<SentryRequestType, Partial<Record<Outcome, number>>>>`\n var key = requestTypeToCategory(category) + \":\" + reason;\n IS_DEBUG_BUILD && logger.log(\"Adding outcome: \" + key);\n this._outcomes[key] = (_a = this._outcomes[key], (_a !== null && _a !== void 0 ? _a : 0)) + 1;\n };\n /**\n * Send outcomes as an envelope\n */\n BaseTransport.prototype._flushOutcomes = function () {\n if (!this.options.sendClientReports) {\n return;\n }\n var outcomes = this._outcomes;\n this._outcomes = {};\n // Nothing to send\n if (!Object.keys(outcomes).length) {\n IS_DEBUG_BUILD && logger.log('No outcomes to flush');\n return;\n }\n IS_DEBUG_BUILD && logger.log(\"Flushing outcomes:\\n\" + JSON.stringify(outcomes, null, 2));\n var url = getEnvelopeEndpointWithUrlEncodedAuth(this._api.dsn, this._api.tunnel);\n var discardedEvents = Object.keys(outcomes).map(function (key) {\n var _a = __read(key.split(':'), 2), category = _a[0], reason = _a[1];\n return {\n reason: reason,\n category: category,\n quantity: outcomes[key],\n };\n // TODO: Improve types on discarded_events to get rid of cast\n });\n var envelope = createClientReportEnvelope(discardedEvents, this._api.tunnel && dsnToString(this._api.dsn));\n try {\n sendReport(url, serializeEnvelope(envelope));\n }\n catch (e) {\n IS_DEBUG_BUILD && logger.error(e);\n }\n };\n /**\n * Handle Sentry repsonse for promise-based transports.\n */\n BaseTransport.prototype._handleResponse = function (_a) {\n var requestType = _a.requestType, response = _a.response, headers = _a.headers, resolve = _a.resolve, reject = _a.reject;\n var status = eventStatusFromHttpCode(response.status);\n this._rateLimits = updateRateLimits(this._rateLimits, headers);\n // eslint-disable-next-line deprecation/deprecation\n if (this._isRateLimited(requestType)) {\n IS_DEBUG_BUILD &&\n // eslint-disable-next-line deprecation/deprecation\n logger.warn(\"Too many \" + requestType + \" requests, backing off until: \" + this._disabledUntil(requestType));\n }\n if (status === 'success') {\n resolve({ status: status });\n return;\n }\n reject(response);\n };\n /**\n * Gets the time that given category is disabled until for rate limiting\n *\n * @deprecated Please use `disabledUntil` from @sentry/utils\n */\n BaseTransport.prototype._disabledUntil = function (requestType) {\n var category = requestTypeToCategory(requestType);\n return new Date(disabledUntil(this._rateLimits, category));\n };\n /**\n * Checks if a category is rate limited\n *\n * @deprecated Please use `isRateLimited` from @sentry/utils\n */\n BaseTransport.prototype._isRateLimited = function (requestType) {\n var category = requestTypeToCategory(requestType);\n return isRateLimited(this._rateLimits, category);\n };\n return BaseTransport;\n}());\nexport { BaseTransport };\n//# sourceMappingURL=base.js.map","import { __extends } from \"tslib\";\nimport { SentryError, supportsReferrerPolicy, SyncPromise } from '@sentry/utils';\nimport { BaseTransport } from './base';\nimport { getNativeFetchImplementation } from './utils';\n/** `fetch` based transport */\nvar FetchTransport = /** @class */ (function (_super) {\n __extends(FetchTransport, _super);\n function FetchTransport(options, fetchImpl) {\n if (fetchImpl === void 0) { fetchImpl = getNativeFetchImplementation(); }\n var _this = _super.call(this, options) || this;\n _this._fetch = fetchImpl;\n return _this;\n }\n /**\n * @param sentryRequest Prepared SentryRequest to be delivered\n * @param originalPayload Original payload used to create SentryRequest\n */\n FetchTransport.prototype._sendRequest = function (sentryRequest, originalPayload) {\n var _this = this;\n // eslint-disable-next-line deprecation/deprecation\n if (this._isRateLimited(sentryRequest.type)) {\n this.recordLostEvent('ratelimit_backoff', sentryRequest.type);\n return Promise.reject({\n event: originalPayload,\n type: sentryRequest.type,\n // eslint-disable-next-line deprecation/deprecation\n reason: \"Transport for \" + sentryRequest.type + \" requests locked till \" + this._disabledUntil(sentryRequest.type) + \" due to too many requests.\",\n status: 429,\n });\n }\n var options = {\n body: sentryRequest.body,\n method: 'POST',\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default'\n // (see https://caniuse.com/#feat=referrer-policy),\n // it doesn't. And it throws an exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n referrerPolicy: (supportsReferrerPolicy() ? 'origin' : ''),\n };\n if (this.options.fetchParameters !== undefined) {\n Object.assign(options, this.options.fetchParameters);\n }\n if (this.options.headers !== undefined) {\n options.headers = this.options.headers;\n }\n return this._buffer\n .add(function () {\n return new SyncPromise(function (resolve, reject) {\n void _this._fetch(sentryRequest.url, options)\n .then(function (response) {\n var headers = {\n 'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),\n 'retry-after': response.headers.get('Retry-After'),\n };\n _this._handleResponse({\n requestType: sentryRequest.type,\n response: response,\n headers: headers,\n resolve: resolve,\n reject: reject,\n });\n })\n .catch(reject);\n });\n })\n .then(undefined, function (reason) {\n // It's either buffer rejection or any other xhr/fetch error, which are treated as NetworkError.\n if (reason instanceof SentryError) {\n _this.recordLostEvent('queue_overflow', sentryRequest.type);\n }\n else {\n _this.recordLostEvent('network_error', sentryRequest.type);\n }\n throw reason;\n });\n };\n return FetchTransport;\n}(BaseTransport));\nexport { FetchTransport };\n//# sourceMappingURL=fetch.js.map","import { __assign } from \"tslib\";\nimport { createTransport, } from '@sentry/core';\nimport { getNativeFetchImplementation } from './utils';\n/**\n * Creates a Transport that uses the Fetch API to send events to Sentry.\n */\nexport function makeNewFetchTransport(options, nativeFetch) {\n if (nativeFetch === void 0) { nativeFetch = getNativeFetchImplementation(); }\n function makeRequest(request) {\n var requestOptions = __assign({ body: request.body, method: 'POST', referrerPolicy: 'origin' }, options.requestOptions);\n return nativeFetch(options.url, requestOptions).then(function (response) {\n return response.text().then(function (body) { return ({\n body: body,\n headers: {\n 'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),\n 'retry-after': response.headers.get('Retry-After'),\n },\n reason: response.statusText,\n statusCode: response.status,\n }); });\n });\n }\n return createTransport({ bufferSize: options.bufferSize }, makeRequest);\n}\n//# sourceMappingURL=new-fetch.js.map","import { createTransport, } from '@sentry/core';\nimport { SyncPromise } from '@sentry/utils';\n/**\n * The DONE ready state for XmlHttpRequest\n *\n * Defining it here as a constant b/c XMLHttpRequest.DONE is not always defined\n * (e.g. during testing, it is `undefined`)\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/readyState}\n */\nvar XHR_READYSTATE_DONE = 4;\n/**\n * Creates a Transport that uses the XMLHttpRequest API to send events to Sentry.\n */\nexport function makeNewXHRTransport(options) {\n function makeRequest(request) {\n return new SyncPromise(function (resolve, _reject) {\n var xhr = new XMLHttpRequest();\n xhr.onreadystatechange = function () {\n if (xhr.readyState === XHR_READYSTATE_DONE) {\n var response = {\n body: xhr.response,\n headers: {\n 'x-sentry-rate-limits': xhr.getResponseHeader('X-Sentry-Rate-Limits'),\n 'retry-after': xhr.getResponseHeader('Retry-After'),\n },\n reason: xhr.statusText,\n statusCode: xhr.status,\n };\n resolve(response);\n }\n };\n xhr.open('POST', options.url);\n for (var header in options.headers) {\n if (Object.prototype.hasOwnProperty.call(options.headers, header)) {\n xhr.setRequestHeader(header, options.headers[header]);\n }\n }\n xhr.send(request.body);\n });\n }\n return createTransport({ bufferSize: options.bufferSize }, makeRequest);\n}\n//# sourceMappingURL=new-xhr.js.map","import { forget, getGlobalObject, isNativeFetch, logger, supportsFetch } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from '../flags';\nvar global = getGlobalObject();\nvar cachedFetchImpl;\n/**\n * A special usecase for incorrectly wrapped Fetch APIs in conjunction with ad-blockers.\n * Whenever someone wraps the Fetch API and returns the wrong promise chain,\n * this chain becomes orphaned and there is no possible way to capture it's rejections\n * other than allowing it bubble up to this very handler. eg.\n *\n * const f = window.fetch;\n * window.fetch = function () {\n * const p = f.apply(this, arguments);\n *\n * p.then(function() {\n * console.log('hi.');\n * });\n *\n * return p;\n * }\n *\n * `p.then(function () { ... })` is producing a completely separate promise chain,\n * however, what's returned is `p` - the result of original `fetch` call.\n *\n * This mean, that whenever we use the Fetch API to send our own requests, _and_\n * some ad-blocker blocks it, this orphaned chain will _always_ reject,\n * effectively causing another event to be captured.\n * This makes a whole process become an infinite loop, which we need to somehow\n * deal with, and break it in one way or another.\n *\n * To deal with this issue, we are making sure that we _always_ use the real\n * browser Fetch API, instead of relying on what `window.fetch` exposes.\n * The only downside to this would be missing our own requests as breadcrumbs,\n * but because we are already not doing this, it should be just fine.\n *\n * Possible failed fetch error messages per-browser:\n *\n * Chrome: Failed to fetch\n * Edge: Failed to Fetch\n * Firefox: NetworkError when attempting to fetch resource\n * Safari: resource blocked by content blocker\n */\nexport function getNativeFetchImplementation() {\n if (cachedFetchImpl) {\n return cachedFetchImpl;\n }\n /* eslint-disable @typescript-eslint/unbound-method */\n // Fast path to avoid DOM I/O\n if (isNativeFetch(global.fetch)) {\n return (cachedFetchImpl = global.fetch.bind(global));\n }\n var document = global.document;\n var fetchImpl = global.fetch;\n // eslint-disable-next-line deprecation/deprecation\n if (document && typeof document.createElement === 'function') {\n try {\n var sandbox = document.createElement('iframe');\n sandbox.hidden = true;\n document.head.appendChild(sandbox);\n var contentWindow = sandbox.contentWindow;\n if (contentWindow && contentWindow.fetch) {\n fetchImpl = contentWindow.fetch;\n }\n document.head.removeChild(sandbox);\n }\n catch (e) {\n IS_DEBUG_BUILD &&\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', e);\n }\n }\n return (cachedFetchImpl = fetchImpl.bind(global));\n /* eslint-enable @typescript-eslint/unbound-method */\n}\n/**\n * Sends sdk client report using sendBeacon or fetch as a fallback if available\n *\n * @param url report endpoint\n * @param body report payload\n */\nexport function sendReport(url, body) {\n var isRealNavigator = Object.prototype.toString.call(global && global.navigator) === '[object Navigator]';\n var hasSendBeacon = isRealNavigator && typeof global.navigator.sendBeacon === 'function';\n if (hasSendBeacon) {\n // Prevent illegal invocations - https://xgwang.me/posts/you-may-not-know-beacon/#it-may-throw-error%2C-be-sure-to-catch\n var sendBeacon = global.navigator.sendBeacon.bind(global.navigator);\n return sendBeacon(url, body);\n }\n if (supportsFetch()) {\n var fetch_1 = getNativeFetchImplementation();\n return forget(fetch_1(url, {\n body: body,\n method: 'POST',\n credentials: 'omit',\n keepalive: true,\n }));\n }\n}\n//# sourceMappingURL=utils.js.map","import { __extends } from \"tslib\";\nimport { SentryError, SyncPromise } from '@sentry/utils';\nimport { BaseTransport } from './base';\n/** `XHR` based transport */\nvar XHRTransport = /** @class */ (function (_super) {\n __extends(XHRTransport, _super);\n function XHRTransport() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @param sentryRequest Prepared SentryRequest to be delivered\n * @param originalPayload Original payload used to create SentryRequest\n */\n XHRTransport.prototype._sendRequest = function (sentryRequest, originalPayload) {\n var _this = this;\n // eslint-disable-next-line deprecation/deprecation\n if (this._isRateLimited(sentryRequest.type)) {\n this.recordLostEvent('ratelimit_backoff', sentryRequest.type);\n return Promise.reject({\n event: originalPayload,\n type: sentryRequest.type,\n // eslint-disable-next-line deprecation/deprecation\n reason: \"Transport for \" + sentryRequest.type + \" requests locked till \" + this._disabledUntil(sentryRequest.type) + \" due to too many requests.\",\n status: 429,\n });\n }\n return this._buffer\n .add(function () {\n return new SyncPromise(function (resolve, reject) {\n var request = new XMLHttpRequest();\n request.onreadystatechange = function () {\n if (request.readyState === 4) {\n var headers = {\n 'x-sentry-rate-limits': request.getResponseHeader('X-Sentry-Rate-Limits'),\n 'retry-after': request.getResponseHeader('Retry-After'),\n };\n _this._handleResponse({ requestType: sentryRequest.type, response: request, headers: headers, resolve: resolve, reject: reject });\n }\n };\n request.open('POST', sentryRequest.url);\n for (var header in _this.options.headers) {\n if (Object.prototype.hasOwnProperty.call(_this.options.headers, header)) {\n request.setRequestHeader(header, _this.options.headers[header]);\n }\n }\n request.send(sentryRequest.body);\n });\n })\n .then(undefined, function (reason) {\n // It's either buffer rejection or any other xhr/fetch error, which are treated as NetworkError.\n if (reason instanceof SentryError) {\n _this.recordLostEvent('queue_overflow', sentryRequest.type);\n }\n else {\n _this.recordLostEvent('network_error', sentryRequest.type);\n }\n throw reason;\n });\n };\n return XHRTransport;\n}(BaseTransport));\nexport { XHRTransport };\n//# sourceMappingURL=xhr.js.map","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","import { dsnToString, makeDsn, urlEncode } from '@sentry/utils';\nvar SENTRY_API_VERSION = '7';\n/**\n * Helper class to provide urls, headers and metadata that can be used to form\n * different types of requests to Sentry endpoints.\n * Supports both envelopes and regular event requests.\n *\n * @deprecated Please use APIDetails\n **/\nvar API = /** @class */ (function () {\n /** Create a new instance of API */\n function API(dsn, metadata, tunnel) {\n if (metadata === void 0) { metadata = {}; }\n this.dsn = dsn;\n this._dsnObject = makeDsn(dsn);\n this.metadata = metadata;\n this._tunnel = tunnel;\n }\n /** Returns the Dsn object. */\n API.prototype.getDsn = function () {\n return this._dsnObject;\n };\n /** Does this transport force envelopes? */\n API.prototype.forceEnvelope = function () {\n return !!this._tunnel;\n };\n /** Returns the prefix to construct Sentry ingestion API endpoints. */\n API.prototype.getBaseApiEndpoint = function () {\n return getBaseApiEndpoint(this._dsnObject);\n };\n /** Returns the store endpoint URL. */\n API.prototype.getStoreEndpoint = function () {\n return getStoreEndpoint(this._dsnObject);\n };\n /**\n * Returns the store endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\n API.prototype.getStoreEndpointWithUrlEncodedAuth = function () {\n return getStoreEndpointWithUrlEncodedAuth(this._dsnObject);\n };\n /**\n * Returns the envelope endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\n API.prototype.getEnvelopeEndpointWithUrlEncodedAuth = function () {\n return getEnvelopeEndpointWithUrlEncodedAuth(this._dsnObject, this._tunnel);\n };\n return API;\n}());\nexport { API };\n/** Initializes API Details */\nexport function initAPIDetails(dsn, metadata, tunnel) {\n return {\n initDsn: dsn,\n metadata: metadata || {},\n dsn: makeDsn(dsn),\n tunnel: tunnel,\n };\n}\n/** Returns the prefix to construct Sentry ingestion API endpoints. */\nfunction getBaseApiEndpoint(dsn) {\n var protocol = dsn.protocol ? dsn.protocol + \":\" : '';\n var port = dsn.port ? \":\" + dsn.port : '';\n return protocol + \"//\" + dsn.host + port + (dsn.path ? \"/\" + dsn.path : '') + \"/api/\";\n}\n/** Returns the ingest API endpoint for target. */\nfunction _getIngestEndpoint(dsn, target) {\n return \"\" + getBaseApiEndpoint(dsn) + dsn.projectId + \"/\" + target + \"/\";\n}\n/** Returns a URL-encoded string with auth config suitable for a query string. */\nfunction _encodedAuth(dsn) {\n return urlEncode({\n // We send only the minimum set of required information. See\n // https://github.com/getsentry/sentry-javascript/issues/2572.\n sentry_key: dsn.publicKey,\n sentry_version: SENTRY_API_VERSION,\n });\n}\n/** Returns the store endpoint URL. */\nfunction getStoreEndpoint(dsn) {\n return _getIngestEndpoint(dsn, 'store');\n}\n/**\n * Returns the store endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\nexport function getStoreEndpointWithUrlEncodedAuth(dsn) {\n return getStoreEndpoint(dsn) + \"?\" + _encodedAuth(dsn);\n}\n/** Returns the envelope endpoint URL. */\nfunction _getEnvelopeEndpoint(dsn) {\n return _getIngestEndpoint(dsn, 'envelope');\n}\n/**\n * Returns the envelope endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\nexport function getEnvelopeEndpointWithUrlEncodedAuth(dsn, tunnel) {\n return tunnel ? tunnel : _getEnvelopeEndpoint(dsn) + \"?\" + _encodedAuth(dsn);\n}\n/**\n * Returns an object that can be used in request headers.\n * This is needed for node and the old /store endpoint in sentry\n */\nexport function getRequestHeaders(dsn, clientName, clientVersion) {\n // CHANGE THIS to use metadata but keep clientName and clientVersion compatible\n var header = [\"Sentry sentry_version=\" + SENTRY_API_VERSION];\n header.push(\"sentry_client=\" + clientName + \"/\" + clientVersion);\n header.push(\"sentry_key=\" + dsn.publicKey);\n if (dsn.pass) {\n header.push(\"sentry_secret=\" + dsn.pass);\n }\n return {\n 'Content-Type': 'application/json',\n 'X-Sentry-Auth': header.join(', '),\n };\n}\n/** Returns the url to the report dialog endpoint. */\nexport function getReportDialogEndpoint(dsnLike, dialogOptions) {\n var dsn = makeDsn(dsnLike);\n var endpoint = getBaseApiEndpoint(dsn) + \"embed/error-page/\";\n var encodedOptions = \"dsn=\" + dsnToString(dsn);\n for (var key in dialogOptions) {\n if (key === 'dsn') {\n continue;\n }\n if (key === 'user') {\n if (!dialogOptions.user) {\n continue;\n }\n if (dialogOptions.user.name) {\n encodedOptions += \"&name=\" + encodeURIComponent(dialogOptions.user.name);\n }\n if (dialogOptions.user.email) {\n encodedOptions += \"&email=\" + encodeURIComponent(dialogOptions.user.email);\n }\n }\n else {\n encodedOptions += \"&\" + encodeURIComponent(key) + \"=\" + encodeURIComponent(dialogOptions[key]);\n }\n }\n return endpoint + \"?\" + encodedOptions;\n}\n//# sourceMappingURL=api.js.map","import { __read } from \"tslib\";\nimport { logger, SentryError } from '@sentry/utils';\nimport { initAPIDetails } from './api';\nimport { IS_DEBUG_BUILD } from './flags';\nimport { createEventEnvelope, createSessionEnvelope } from './request';\nimport { NoopTransport } from './transports/noop';\n/**\n * This is the base implemention of a Backend.\n * @hidden\n */\nvar BaseBackend = /** @class */ (function () {\n /** Creates a new backend instance. */\n function BaseBackend(options) {\n this._options = options;\n if (!this._options.dsn) {\n IS_DEBUG_BUILD && logger.warn('No DSN provided, backend will not do anything.');\n }\n this._transport = this._setupTransport();\n }\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n BaseBackend.prototype.eventFromException = function (_exception, _hint) {\n throw new SentryError('Backend has to implement `eventFromException` method');\n };\n /**\n * @inheritDoc\n */\n BaseBackend.prototype.eventFromMessage = function (_message, _level, _hint) {\n throw new SentryError('Backend has to implement `eventFromMessage` method');\n };\n /**\n * @inheritDoc\n */\n BaseBackend.prototype.sendEvent = function (event) {\n // TODO(v7): Remove the if-else\n if (this._newTransport &&\n this._options.dsn &&\n this._options._experiments &&\n this._options._experiments.newTransport) {\n var api = initAPIDetails(this._options.dsn, this._options._metadata, this._options.tunnel);\n var env = createEventEnvelope(event, api);\n void this._newTransport.send(env).then(null, function (reason) {\n IS_DEBUG_BUILD && logger.error('Error while sending event:', reason);\n });\n }\n else {\n void this._transport.sendEvent(event).then(null, function (reason) {\n IS_DEBUG_BUILD && logger.error('Error while sending event:', reason);\n });\n }\n };\n /**\n * @inheritDoc\n */\n BaseBackend.prototype.sendSession = function (session) {\n if (!this._transport.sendSession) {\n IS_DEBUG_BUILD && logger.warn(\"Dropping session because custom transport doesn't implement sendSession\");\n return;\n }\n // TODO(v7): Remove the if-else\n if (this._newTransport &&\n this._options.dsn &&\n this._options._experiments &&\n this._options._experiments.newTransport) {\n var api = initAPIDetails(this._options.dsn, this._options._metadata, this._options.tunnel);\n var _a = __read(createSessionEnvelope(session, api), 1), env = _a[0];\n void this._newTransport.send(env).then(null, function (reason) {\n IS_DEBUG_BUILD && logger.error('Error while sending session:', reason);\n });\n }\n else {\n void this._transport.sendSession(session).then(null, function (reason) {\n IS_DEBUG_BUILD && logger.error('Error while sending session:', reason);\n });\n }\n };\n /**\n * @inheritDoc\n */\n BaseBackend.prototype.getTransport = function () {\n return this._transport;\n };\n /**\n * Sets up the transport so it can be used later to send requests.\n */\n BaseBackend.prototype._setupTransport = function () {\n return new NoopTransport();\n };\n return BaseBackend;\n}());\nexport { BaseBackend };\n//# sourceMappingURL=basebackend.js.map","import { __assign, __read, __spread, __values } from \"tslib\";\n/* eslint-disable max-lines */\nimport { Scope } from '@sentry/hub';\nimport { checkOrSetAlreadyCaught, dateTimestampInSeconds, isPlainObject, isPrimitive, isThenable, logger, makeDsn, normalize, rejectedSyncPromise, resolvedSyncPromise, SentryError, SyncPromise, truncate, uuid4, } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from './flags';\nimport { setupIntegrations } from './integration';\nvar ALREADY_SEEN_ERROR = \"Not capturing exception because it's already been captured.\";\n/**\n * Base implementation for all JavaScript SDK clients.\n *\n * Call the constructor with the corresponding backend constructor and options\n * specific to the client subclass. To access these options later, use\n * {@link Client.getOptions}. Also, the Backend instance is available via\n * {@link Client.getBackend}.\n *\n * If a Dsn is specified in the options, it will be parsed and stored. Use\n * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is\n * invalid, the constructor will throw a {@link SentryException}. Note that\n * without a valid Dsn, the SDK will not send any events to Sentry.\n *\n * Before sending an event via the backend, it is passed through\n * {@link BaseClient._prepareEvent} to add SDK information and scope data\n * (breadcrumbs and context). To add more custom information, override this\n * method and extend the resulting prepared event.\n *\n * To issue automatically created events (e.g. via instrumentation), use\n * {@link Client.captureEvent}. It will prepare the event and pass it through\n * the callback lifecycle. To issue auto-breadcrumbs, use\n * {@link Client.addBreadcrumb}.\n *\n * @example\n * class NodeClient extends BaseClient<NodeBackend, NodeOptions> {\n * public constructor(options: NodeOptions) {\n * super(NodeBackend, options);\n * }\n *\n * // ...\n * }\n */\nvar BaseClient = /** @class */ (function () {\n /**\n * Initializes this client instance.\n *\n * @param backendClass A constructor function to create the backend.\n * @param options Options for the client.\n */\n function BaseClient(backendClass, options) {\n /** Array of used integrations. */\n this._integrations = {};\n /** Number of calls being processed */\n this._numProcessing = 0;\n this._backend = new backendClass(options);\n this._options = options;\n if (options.dsn) {\n this._dsn = makeDsn(options.dsn);\n }\n }\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n BaseClient.prototype.captureException = function (exception, hint, scope) {\n var _this = this;\n // ensure we haven't captured this very object before\n if (checkOrSetAlreadyCaught(exception)) {\n IS_DEBUG_BUILD && logger.log(ALREADY_SEEN_ERROR);\n return;\n }\n var eventId = hint && hint.event_id;\n this._process(this._getBackend()\n .eventFromException(exception, hint)\n .then(function (event) { return _this._captureEvent(event, hint, scope); })\n .then(function (result) {\n eventId = result;\n }));\n return eventId;\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.captureMessage = function (message, level, hint, scope) {\n var _this = this;\n var eventId = hint && hint.event_id;\n var promisedEvent = isPrimitive(message)\n ? this._getBackend().eventFromMessage(String(message), level, hint)\n : this._getBackend().eventFromException(message, hint);\n this._process(promisedEvent\n .then(function (event) { return _this._captureEvent(event, hint, scope); })\n .then(function (result) {\n eventId = result;\n }));\n return eventId;\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.captureEvent = function (event, hint, scope) {\n // ensure we haven't captured this very object before\n if (hint && hint.originalException && checkOrSetAlreadyCaught(hint.originalException)) {\n IS_DEBUG_BUILD && logger.log(ALREADY_SEEN_ERROR);\n return;\n }\n var eventId = hint && hint.event_id;\n this._process(this._captureEvent(event, hint, scope).then(function (result) {\n eventId = result;\n }));\n return eventId;\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.captureSession = function (session) {\n if (!this._isEnabled()) {\n IS_DEBUG_BUILD && logger.warn('SDK not enabled, will not capture session.');\n return;\n }\n if (!(typeof session.release === 'string')) {\n IS_DEBUG_BUILD && logger.warn('Discarded session because of missing or non-string release');\n }\n else {\n this._sendSession(session);\n // After sending, we set init false to indicate it's not the first occurrence\n session.update({ init: false });\n }\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.getDsn = function () {\n return this._dsn;\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.getOptions = function () {\n return this._options;\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.getTransport = function () {\n return this._getBackend().getTransport();\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.flush = function (timeout) {\n var _this = this;\n return this._isClientDoneProcessing(timeout).then(function (clientFinished) {\n return _this.getTransport()\n .close(timeout)\n .then(function (transportFlushed) { return clientFinished && transportFlushed; });\n });\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.close = function (timeout) {\n var _this = this;\n return this.flush(timeout).then(function (result) {\n _this.getOptions().enabled = false;\n return result;\n });\n };\n /**\n * Sets up the integrations\n */\n BaseClient.prototype.setupIntegrations = function () {\n if (this._isEnabled() && !this._integrations.initialized) {\n this._integrations = setupIntegrations(this._options);\n }\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.getIntegration = function (integration) {\n try {\n return this._integrations[integration.id] || null;\n }\n catch (_oO) {\n IS_DEBUG_BUILD && logger.warn(\"Cannot retrieve integration \" + integration.id + \" from the current Client\");\n return null;\n }\n };\n /** Updates existing session based on the provided event */\n BaseClient.prototype._updateSessionFromEvent = function (session, event) {\n var e_1, _a;\n var crashed = false;\n var errored = false;\n var exceptions = event.exception && event.exception.values;\n if (exceptions) {\n errored = true;\n try {\n for (var exceptions_1 = __values(exceptions), exceptions_1_1 = exceptions_1.next(); !exceptions_1_1.done; exceptions_1_1 = exceptions_1.next()) {\n var ex = exceptions_1_1.value;\n var mechanism = ex.mechanism;\n if (mechanism && mechanism.handled === false) {\n crashed = true;\n break;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (exceptions_1_1 && !exceptions_1_1.done && (_a = exceptions_1.return)) _a.call(exceptions_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n // A session is updated and that session update is sent in only one of the two following scenarios:\n // 1. Session with non terminal status and 0 errors + an error occurred -> Will set error count to 1 and send update\n // 2. Session with non terminal status and 1 error + a crash occurred -> Will set status crashed and send update\n var sessionNonTerminal = session.status === 'ok';\n var shouldUpdateAndSend = (sessionNonTerminal && session.errors === 0) || (sessionNonTerminal && crashed);\n if (shouldUpdateAndSend) {\n session.update(__assign(__assign({}, (crashed && { status: 'crashed' })), { errors: session.errors || Number(errored || crashed) }));\n this.captureSession(session);\n }\n };\n /** Deliver captured session to Sentry */\n BaseClient.prototype._sendSession = function (session) {\n this._getBackend().sendSession(session);\n };\n /**\n * Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying\n * \"no\" (resolving to `false`) in order to give the client a chance to potentially finish first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not\n * passing anything) will make the promise wait as long as it takes for processing to finish before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and\n * `false` otherwise\n */\n BaseClient.prototype._isClientDoneProcessing = function (timeout) {\n var _this = this;\n return new SyncPromise(function (resolve) {\n var ticked = 0;\n var tick = 1;\n var interval = setInterval(function () {\n if (_this._numProcessing == 0) {\n clearInterval(interval);\n resolve(true);\n }\n else {\n ticked += tick;\n if (timeout && ticked >= timeout) {\n clearInterval(interval);\n resolve(false);\n }\n }\n }, tick);\n });\n };\n /** Returns the current backend. */\n BaseClient.prototype._getBackend = function () {\n return this._backend;\n };\n /** Determines whether this SDK is enabled and a valid Dsn is present. */\n BaseClient.prototype._isEnabled = function () {\n return this.getOptions().enabled !== false && this._dsn !== undefined;\n };\n /**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n */\n BaseClient.prototype._prepareEvent = function (event, scope, hint) {\n var _this = this;\n var _a = this.getOptions(), _b = _a.normalizeDepth, normalizeDepth = _b === void 0 ? 3 : _b, _c = _a.normalizeMaxBreadth, normalizeMaxBreadth = _c === void 0 ? 1000 : _c;\n var prepared = __assign(__assign({}, event), { event_id: event.event_id || (hint && hint.event_id ? hint.event_id : uuid4()), timestamp: event.timestamp || dateTimestampInSeconds() });\n this._applyClientOptions(prepared);\n this._applyIntegrationsMetadata(prepared);\n // If we have scope given to us, use it as the base for further modifications.\n // This allows us to prevent unnecessary copying of data if `captureContext` is not provided.\n var finalScope = scope;\n if (hint && hint.captureContext) {\n finalScope = Scope.clone(finalScope).update(hint.captureContext);\n }\n // We prepare the result here with a resolved Event.\n var result = resolvedSyncPromise(prepared);\n // This should be the last thing called, since we want that\n // {@link Hub.addEventProcessor} gets the finished prepared event.\n if (finalScope) {\n // In case we have a hub we reassign it.\n result = finalScope.applyToEvent(prepared, hint);\n }\n return result.then(function (evt) {\n if (evt) {\n // TODO this is more of the hack trying to solve https://github.com/getsentry/sentry-javascript/issues/2809\n // it is only attached as extra data to the event if the event somehow skips being normalized\n evt.sdkProcessingMetadata = __assign(__assign({}, evt.sdkProcessingMetadata), { normalizeDepth: normalize(normalizeDepth) + \" (\" + typeof normalizeDepth + \")\" });\n }\n if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {\n return _this._normalizeEvent(evt, normalizeDepth, normalizeMaxBreadth);\n }\n return evt;\n });\n };\n /**\n * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.\n * Normalized keys:\n * - `breadcrumbs.data`\n * - `user`\n * - `contexts`\n * - `extra`\n * @param event Event\n * @returns Normalized event\n */\n BaseClient.prototype._normalizeEvent = function (event, depth, maxBreadth) {\n if (!event) {\n return null;\n }\n var normalized = __assign(__assign(__assign(__assign(__assign({}, event), (event.breadcrumbs && {\n breadcrumbs: event.breadcrumbs.map(function (b) { return (__assign(__assign({}, b), (b.data && {\n data: normalize(b.data, depth, maxBreadth),\n }))); }),\n })), (event.user && {\n user: normalize(event.user, depth, maxBreadth),\n })), (event.contexts && {\n contexts: normalize(event.contexts, depth, maxBreadth),\n })), (event.extra && {\n extra: normalize(event.extra, depth, maxBreadth),\n }));\n // event.contexts.trace stores information about a Transaction. Similarly,\n // event.spans[] stores information about child Spans. Given that a\n // Transaction is conceptually a Span, normalization should apply to both\n // Transactions and Spans consistently.\n // For now the decision is to skip normalization of Transactions and Spans,\n // so this block overwrites the normalized event to add back the original\n // Transaction information prior to normalization.\n if (event.contexts && event.contexts.trace) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n normalized.contexts.trace = event.contexts.trace;\n }\n normalized.sdkProcessingMetadata = __assign(__assign({}, normalized.sdkProcessingMetadata), { baseClientNormalized: true });\n return normalized;\n };\n /**\n * Enhances event using the client configuration.\n * It takes care of all \"static\" values like environment, release and `dist`,\n * as well as truncating overly long values.\n * @param event event instance to be enhanced\n */\n BaseClient.prototype._applyClientOptions = function (event) {\n var options = this.getOptions();\n var environment = options.environment, release = options.release, dist = options.dist, _a = options.maxValueLength, maxValueLength = _a === void 0 ? 250 : _a;\n if (!('environment' in event)) {\n event.environment = 'environment' in options ? environment : 'production';\n }\n if (event.release === undefined && release !== undefined) {\n event.release = release;\n }\n if (event.dist === undefined && dist !== undefined) {\n event.dist = dist;\n }\n if (event.message) {\n event.message = truncate(event.message, maxValueLength);\n }\n var exception = event.exception && event.exception.values && event.exception.values[0];\n if (exception && exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n var request = event.request;\n if (request && request.url) {\n request.url = truncate(request.url, maxValueLength);\n }\n };\n /**\n * This function adds all used integrations to the SDK info in the event.\n * @param event The event that will be filled with all integrations.\n */\n BaseClient.prototype._applyIntegrationsMetadata = function (event) {\n var integrationsArray = Object.keys(this._integrations);\n if (integrationsArray.length > 0) {\n event.sdk = event.sdk || {};\n event.sdk.integrations = __spread((event.sdk.integrations || []), integrationsArray);\n }\n };\n /**\n * Tells the backend to send this event\n * @param event The Sentry event to send\n */\n BaseClient.prototype._sendEvent = function (event) {\n this._getBackend().sendEvent(event);\n };\n /**\n * Processes the event and logs an error in case of rejection\n * @param event\n * @param hint\n * @param scope\n */\n BaseClient.prototype._captureEvent = function (event, hint, scope) {\n return this._processEvent(event, hint, scope).then(function (finalEvent) {\n return finalEvent.event_id;\n }, function (reason) {\n IS_DEBUG_BUILD && logger.error(reason);\n return undefined;\n });\n };\n /**\n * Processes an event (either error or message) and sends it to Sentry.\n *\n * This also adds breadcrumbs and context information to the event. However,\n * platform specific meta data (such as the User's IP address) must be added\n * by the SDK implementor.\n *\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.\n */\n BaseClient.prototype._processEvent = function (event, hint, scope) {\n var _this = this;\n // eslint-disable-next-line @typescript-eslint/unbound-method\n var _a = this.getOptions(), beforeSend = _a.beforeSend, sampleRate = _a.sampleRate;\n var transport = this.getTransport();\n function recordLostEvent(outcome, category) {\n if (transport.recordLostEvent) {\n transport.recordLostEvent(outcome, category);\n }\n }\n if (!this._isEnabled()) {\n return rejectedSyncPromise(new SentryError('SDK not enabled, will not capture event.'));\n }\n var isTransaction = event.type === 'transaction';\n // 1.0 === 100% events are sent\n // 0.0 === 0% events are sent\n // Sampling for transaction happens somewhere else\n if (!isTransaction && typeof sampleRate === 'number' && Math.random() > sampleRate) {\n recordLostEvent('sample_rate', 'event');\n return rejectedSyncPromise(new SentryError(\"Discarding event because it's not included in the random sample (sampling rate = \" + sampleRate + \")\"));\n }\n return this._prepareEvent(event, scope, hint)\n .then(function (prepared) {\n if (prepared === null) {\n recordLostEvent('event_processor', event.type || 'event');\n throw new SentryError('An event processor returned null, will not send event.');\n }\n var isInternalException = hint && hint.data && hint.data.__sentry__ === true;\n if (isInternalException || isTransaction || !beforeSend) {\n return prepared;\n }\n var beforeSendResult = beforeSend(prepared, hint);\n return _ensureBeforeSendRv(beforeSendResult);\n })\n .then(function (processedEvent) {\n if (processedEvent === null) {\n recordLostEvent('before_send', event.type || 'event');\n throw new SentryError('`beforeSend` returned `null`, will not send event.');\n }\n var session = scope && scope.getSession && scope.getSession();\n if (!isTransaction && session) {\n _this._updateSessionFromEvent(session, processedEvent);\n }\n _this._sendEvent(processedEvent);\n return processedEvent;\n })\n .then(null, function (reason) {\n if (reason instanceof SentryError) {\n throw reason;\n }\n _this.captureException(reason, {\n data: {\n __sentry__: true,\n },\n originalException: reason,\n });\n throw new SentryError(\"Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: \" + reason);\n });\n };\n /**\n * Occupies the client with processing and event\n */\n BaseClient.prototype._process = function (promise) {\n var _this = this;\n this._numProcessing += 1;\n void promise.then(function (value) {\n _this._numProcessing -= 1;\n return value;\n }, function (reason) {\n _this._numProcessing -= 1;\n return reason;\n });\n };\n return BaseClient;\n}());\nexport { BaseClient };\n/**\n * Verifies that return value of configured `beforeSend` is of expected type.\n */\nfunction _ensureBeforeSendRv(rv) {\n var nullErr = '`beforeSend` method has to return `null` or a valid event.';\n if (isThenable(rv)) {\n return rv.then(function (event) {\n if (!(isPlainObject(event) || event === null)) {\n throw new SentryError(nullErr);\n }\n return event;\n }, function (e) {\n throw new SentryError(\"beforeSend rejected with \" + e);\n });\n }\n else if (!(isPlainObject(rv) || rv === null)) {\n throw new SentryError(nullErr);\n }\n return rv;\n}\n//# sourceMappingURL=baseclient.js.map","/*\n * This file defines flags and constants that can be modified during compile time in order to facilitate tree shaking\n * for users.\n *\n * Debug flags need to be declared in each package individually and must not be imported across package boundaries,\n * because some build tools have trouble tree-shaking imported guards.\n *\n * As a convention, we define debug flags in a `flags.ts` file in the root of a package's `src` folder.\n *\n * Debug flag files will contain \"magic strings\" like `__SENTRY_DEBUG__` that may get replaced with actual values during\n * our, or the user's build process. Take care when introducing new flags - they must not throw if they are not\n * replaced.\n */\n/** Flag that is true for debug builds, false otherwise. */\nexport var IS_DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' ? true : __SENTRY_DEBUG__;\n//# sourceMappingURL=flags.js.map","import { __read, __spread } from \"tslib\";\nimport { addGlobalEventProcessor, getCurrentHub } from '@sentry/hub';\nimport { addNonEnumerableProperty, logger } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from './flags';\nexport var installedIntegrations = [];\n/**\n * @private\n */\nfunction filterDuplicates(integrations) {\n return integrations.reduce(function (acc, integrations) {\n if (acc.every(function (accIntegration) { return integrations.name !== accIntegration.name; })) {\n acc.push(integrations);\n }\n return acc;\n }, []);\n}\n/** Gets integration to install */\nexport function getIntegrationsToSetup(options) {\n var defaultIntegrations = (options.defaultIntegrations && __spread(options.defaultIntegrations)) || [];\n var userIntegrations = options.integrations;\n var integrations = __spread(filterDuplicates(defaultIntegrations));\n if (Array.isArray(userIntegrations)) {\n // Filter out integrations that are also included in user options\n integrations = __spread(integrations.filter(function (integrations) {\n return userIntegrations.every(function (userIntegration) { return userIntegration.name !== integrations.name; });\n }), filterDuplicates(userIntegrations));\n }\n else if (typeof userIntegrations === 'function') {\n integrations = userIntegrations(integrations);\n integrations = Array.isArray(integrations) ? integrations : [integrations];\n }\n // Make sure that if present, `Debug` integration will always run last\n var integrationsNames = integrations.map(function (i) { return i.name; });\n var alwaysLastToRun = 'Debug';\n if (integrationsNames.indexOf(alwaysLastToRun) !== -1) {\n integrations.push.apply(integrations, __spread(integrations.splice(integrationsNames.indexOf(alwaysLastToRun), 1)));\n }\n return integrations;\n}\n/** Setup given integration */\nexport function setupIntegration(integration) {\n if (installedIntegrations.indexOf(integration.name) !== -1) {\n return;\n }\n integration.setupOnce(addGlobalEventProcessor, getCurrentHub);\n installedIntegrations.push(integration.name);\n IS_DEBUG_BUILD && logger.log(\"Integration installed: \" + integration.name);\n}\n/**\n * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default\n * integrations are added unless they were already provided before.\n * @param integrations array of integration instances\n * @param withDefault should enable default integrations\n */\nexport function setupIntegrations(options) {\n var integrations = {};\n getIntegrationsToSetup(options).forEach(function (integration) {\n integrations[integration.name] = integration;\n setupIntegration(integration);\n });\n // set the `initialized` flag so we don't run through the process again unecessarily; use `Object.defineProperty`\n // because by default it creates a property which is nonenumerable, which we want since `initialized` shouldn't be\n // considered a member of the index the way the actual integrations are\n addNonEnumerableProperty(integrations, 'initialized', true);\n return integrations;\n}\n//# sourceMappingURL=integration.js.map","import { getOriginalFunction } from '@sentry/utils';\nvar originalFunctionToString;\n/** Patch toString calls to return proper name for wrapped functions */\nvar FunctionToString = /** @class */ (function () {\n function FunctionToString() {\n /**\n * @inheritDoc\n */\n this.name = FunctionToString.id;\n }\n /**\n * @inheritDoc\n */\n FunctionToString.prototype.setupOnce = function () {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n originalFunctionToString = Function.prototype.toString;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Function.prototype.toString = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var context = getOriginalFunction(this) || this;\n return originalFunctionToString.apply(context, args);\n };\n };\n /**\n * @inheritDoc\n */\n FunctionToString.id = 'FunctionToString';\n return FunctionToString;\n}());\nexport { FunctionToString };\n//# sourceMappingURL=functiontostring.js.map","import { __read, __spread } from \"tslib\";\nimport { getEventDescription, isMatchingPattern, logger } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from '../flags';\n// \"Script error.\" is hard coded into browsers for errors that it can't read.\n// this is the result of a script being pulled in from an external domain and CORS.\nvar DEFAULT_IGNORE_ERRORS = [/^Script error\\.?$/, /^Javascript error: Script error\\.? on line 0$/];\n/** Inbound filters configurable by the user */\nvar InboundFilters = /** @class */ (function () {\n function InboundFilters(_options) {\n if (_options === void 0) { _options = {}; }\n this._options = _options;\n /**\n * @inheritDoc\n */\n this.name = InboundFilters.id;\n }\n /**\n * @inheritDoc\n */\n InboundFilters.prototype.setupOnce = function (addGlobalEventProcessor, getCurrentHub) {\n addGlobalEventProcessor(function (event) {\n var hub = getCurrentHub();\n if (hub) {\n var self_1 = hub.getIntegration(InboundFilters);\n if (self_1) {\n var client = hub.getClient();\n var clientOptions = client ? client.getOptions() : {};\n var options = _mergeOptions(self_1._options, clientOptions);\n return _shouldDropEvent(event, options) ? null : event;\n }\n }\n return event;\n });\n };\n /**\n * @inheritDoc\n */\n InboundFilters.id = 'InboundFilters';\n return InboundFilters;\n}());\nexport { InboundFilters };\n/** JSDoc */\nexport function _mergeOptions(internalOptions, clientOptions) {\n if (internalOptions === void 0) { internalOptions = {}; }\n if (clientOptions === void 0) { clientOptions = {}; }\n return {\n allowUrls: __spread((internalOptions.whitelistUrls || []), (internalOptions.allowUrls || []), (clientOptions.whitelistUrls || []), (clientOptions.allowUrls || [])),\n denyUrls: __spread((internalOptions.blacklistUrls || []), (internalOptions.denyUrls || []), (clientOptions.blacklistUrls || []), (clientOptions.denyUrls || [])),\n ignoreErrors: __spread((internalOptions.ignoreErrors || []), (clientOptions.ignoreErrors || []), DEFAULT_IGNORE_ERRORS),\n ignoreInternal: internalOptions.ignoreInternal !== undefined ? internalOptions.ignoreInternal : true,\n };\n}\n/** JSDoc */\nexport function _shouldDropEvent(event, options) {\n if (options.ignoreInternal && _isSentryError(event)) {\n IS_DEBUG_BUILD &&\n logger.warn(\"Event dropped due to being internal Sentry Error.\\nEvent: \" + getEventDescription(event));\n return true;\n }\n if (_isIgnoredError(event, options.ignoreErrors)) {\n IS_DEBUG_BUILD &&\n logger.warn(\"Event dropped due to being matched by `ignoreErrors` option.\\nEvent: \" + getEventDescription(event));\n return true;\n }\n if (_isDeniedUrl(event, options.denyUrls)) {\n IS_DEBUG_BUILD &&\n logger.warn(\"Event dropped due to being matched by `denyUrls` option.\\nEvent: \" + getEventDescription(event) + \".\\nUrl: \" + _getEventFilterUrl(event));\n return true;\n }\n if (!_isAllowedUrl(event, options.allowUrls)) {\n IS_DEBUG_BUILD &&\n logger.warn(\"Event dropped due to not being matched by `allowUrls` option.\\nEvent: \" + getEventDescription(event) + \".\\nUrl: \" + _getEventFilterUrl(event));\n return true;\n }\n return false;\n}\nfunction _isIgnoredError(event, ignoreErrors) {\n if (!ignoreErrors || !ignoreErrors.length) {\n return false;\n }\n return _getPossibleEventMessages(event).some(function (message) {\n return ignoreErrors.some(function (pattern) { return isMatchingPattern(message, pattern); });\n });\n}\nfunction _isDeniedUrl(event, denyUrls) {\n // TODO: Use Glob instead?\n if (!denyUrls || !denyUrls.length) {\n return false;\n }\n var url = _getEventFilterUrl(event);\n return !url ? false : denyUrls.some(function (pattern) { return isMatchingPattern(url, pattern); });\n}\nfunction _isAllowedUrl(event, allowUrls) {\n // TODO: Use Glob instead?\n if (!allowUrls || !allowUrls.length) {\n return true;\n }\n var url = _getEventFilterUrl(event);\n return !url ? true : allowUrls.some(function (pattern) { return isMatchingPattern(url, pattern); });\n}\nfunction _getPossibleEventMessages(event) {\n if (event.message) {\n return [event.message];\n }\n if (event.exception) {\n try {\n var _a = (event.exception.values && event.exception.values[0]) || {}, _b = _a.type, type = _b === void 0 ? '' : _b, _c = _a.value, value = _c === void 0 ? '' : _c;\n return [\"\" + value, type + \": \" + value];\n }\n catch (oO) {\n IS_DEBUG_BUILD && logger.error(\"Cannot extract message for event \" + getEventDescription(event));\n return [];\n }\n }\n return [];\n}\nfunction _isSentryError(event) {\n try {\n // @ts-ignore can't be a sentry error if undefined\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return event.exception.values[0].type === 'SentryError';\n }\n catch (e) {\n // ignore\n }\n return false;\n}\nfunction _getLastValidUrl(frames) {\n if (frames === void 0) { frames = []; }\n for (var i = frames.length - 1; i >= 0; i--) {\n var frame = frames[i];\n if (frame && frame.filename !== '<anonymous>' && frame.filename !== '[native code]') {\n return frame.filename || null;\n }\n }\n return null;\n}\nfunction _getEventFilterUrl(event) {\n try {\n if (event.stacktrace) {\n return _getLastValidUrl(event.stacktrace.frames);\n }\n var frames_1;\n try {\n // @ts-ignore we only care about frames if the whole thing here is defined\n frames_1 = event.exception.values[0].stacktrace.frames;\n }\n catch (e) {\n // ignore\n }\n return frames_1 ? _getLastValidUrl(frames_1) : null;\n }\n catch (oO) {\n IS_DEBUG_BUILD && logger.error(\"Cannot extract url for event \" + getEventDescription(event));\n return null;\n }\n}\n//# sourceMappingURL=inboundfilters.js.map","import { __assign, __read, __spread } from \"tslib\";\nimport { createEnvelope, dsnToString, normalize, serializeEnvelope } from '@sentry/utils';\nimport { getEnvelopeEndpointWithUrlEncodedAuth, getStoreEndpointWithUrlEncodedAuth } from './api';\n/** Extract sdk info from from the API metadata */\nfunction getSdkMetadataForEnvelopeHeader(api) {\n if (!api.metadata || !api.metadata.sdk) {\n return;\n }\n var _a = api.metadata.sdk, name = _a.name, version = _a.version;\n return { name: name, version: version };\n}\n/**\n * Apply SdkInfo (name, version, packages, integrations) to the corresponding event key.\n * Merge with existing data if any.\n **/\nfunction enhanceEventWithSdkInfo(event, sdkInfo) {\n if (!sdkInfo) {\n return event;\n }\n event.sdk = event.sdk || {};\n event.sdk.name = event.sdk.name || sdkInfo.name;\n event.sdk.version = event.sdk.version || sdkInfo.version;\n event.sdk.integrations = __spread((event.sdk.integrations || []), (sdkInfo.integrations || []));\n event.sdk.packages = __spread((event.sdk.packages || []), (sdkInfo.packages || []));\n return event;\n}\n/** Creates an envelope from a Session */\nexport function createSessionEnvelope(session, api) {\n var sdkInfo = getSdkMetadataForEnvelopeHeader(api);\n var envelopeHeaders = __assign(__assign({ sent_at: new Date().toISOString() }, (sdkInfo && { sdk: sdkInfo })), (!!api.tunnel && { dsn: dsnToString(api.dsn) }));\n // I know this is hacky but we don't want to add `sessions` to request type since it's never rate limited\n var type = 'aggregates' in session ? 'sessions' : 'session';\n // TODO (v7) Have to cast type because envelope items do not accept a `SentryRequestType`\n var envelopeItem = [{ type: type }, session];\n var envelope = createEnvelope(envelopeHeaders, [envelopeItem]);\n return [envelope, type];\n}\n/** Creates a SentryRequest from a Session. */\nexport function sessionToSentryRequest(session, api) {\n var _a = __read(createSessionEnvelope(session, api), 2), envelope = _a[0], type = _a[1];\n return {\n body: serializeEnvelope(envelope),\n type: type,\n url: getEnvelopeEndpointWithUrlEncodedAuth(api.dsn, api.tunnel),\n };\n}\n/**\n * Create an Envelope from an event. Note that this is duplicated from below,\n * but on purpose as this will be refactored in v7.\n */\nexport function createEventEnvelope(event, api) {\n var sdkInfo = getSdkMetadataForEnvelopeHeader(api);\n var eventType = event.type || 'event';\n var transactionSampling = (event.sdkProcessingMetadata || {}).transactionSampling;\n var _a = transactionSampling || {}, samplingMethod = _a.method, sampleRate = _a.rate;\n // TODO: Below is a temporary hack in order to debug a serialization error - see\n // https://github.com/getsentry/sentry-javascript/issues/2809,\n // https://github.com/getsentry/sentry-javascript/pull/4425, and\n // https://github.com/getsentry/sentry-javascript/pull/4574.\n //\n // TL; DR: even though we normalize all events (which should prevent this), something is causing `JSON.stringify` to\n // throw a circular reference error.\n //\n // When it's time to remove it:\n // 1. Delete everything between here and where the request object `req` is created, EXCEPT the line deleting\n // `sdkProcessingMetadata`\n // 2. Restore the original version of the request body, which is commented out\n // 3. Search for either of the PR URLs above and pull out the companion hacks in the browser playwright tests and the\n // baseClient tests in this package\n enhanceEventWithSdkInfo(event, api.metadata.sdk);\n event.tags = event.tags || {};\n event.extra = event.extra || {};\n // In theory, all events should be marked as having gone through normalization and so\n // we should never set this tag/extra data\n if (!(event.sdkProcessingMetadata && event.sdkProcessingMetadata.baseClientNormalized)) {\n event.tags.skippedNormalization = true;\n event.extra.normalizeDepth = event.sdkProcessingMetadata ? event.sdkProcessingMetadata.normalizeDepth : 'unset';\n }\n // prevent this data from being sent to sentry\n // TODO: This is NOT part of the hack - DO NOT DELETE\n delete event.sdkProcessingMetadata;\n var envelopeHeaders = __assign(__assign({ event_id: event.event_id, sent_at: new Date().toISOString() }, (sdkInfo && { sdk: sdkInfo })), (!!api.tunnel && { dsn: dsnToString(api.dsn) }));\n var eventItem = [\n {\n type: eventType,\n sample_rates: [{ id: samplingMethod, rate: sampleRate }],\n },\n event,\n ];\n return createEnvelope(envelopeHeaders, [eventItem]);\n}\n/** Creates a SentryRequest from an event. */\nexport function eventToSentryRequest(event, api) {\n var sdkInfo = getSdkMetadataForEnvelopeHeader(api);\n var eventType = event.type || 'event';\n var useEnvelope = eventType === 'transaction' || !!api.tunnel;\n var transactionSampling = (event.sdkProcessingMetadata || {}).transactionSampling;\n var _a = transactionSampling || {}, samplingMethod = _a.method, sampleRate = _a.rate;\n // TODO: Below is a temporary hack in order to debug a serialization error - see\n // https://github.com/getsentry/sentry-javascript/issues/2809,\n // https://github.com/getsentry/sentry-javascript/pull/4425, and\n // https://github.com/getsentry/sentry-javascript/pull/4574.\n //\n // TL; DR: even though we normalize all events (which should prevent this), something is causing `JSON.stringify` to\n // throw a circular reference error.\n //\n // When it's time to remove it:\n // 1. Delete everything between here and where the request object `req` is created, EXCEPT the line deleting\n // `sdkProcessingMetadata`\n // 2. Restore the original version of the request body, which is commented out\n // 3. Search for either of the PR URLs above and pull out the companion hacks in the browser playwright tests and the\n // baseClient tests in this package\n enhanceEventWithSdkInfo(event, api.metadata.sdk);\n event.tags = event.tags || {};\n event.extra = event.extra || {};\n // In theory, all events should be marked as having gone through normalization and so\n // we should never set this tag/extra data\n if (!(event.sdkProcessingMetadata && event.sdkProcessingMetadata.baseClientNormalized)) {\n event.tags.skippedNormalization = true;\n event.extra.normalizeDepth = event.sdkProcessingMetadata ? event.sdkProcessingMetadata.normalizeDepth : 'unset';\n }\n // prevent this data from being sent to sentry\n // TODO: This is NOT part of the hack - DO NOT DELETE\n delete event.sdkProcessingMetadata;\n var body;\n try {\n // 99.9% of events should get through just fine - no change in behavior for them\n body = JSON.stringify(event);\n }\n catch (err) {\n // Record data about the error without replacing original event data, then force renormalization\n event.tags.JSONStringifyError = true;\n event.extra.JSONStringifyError = err;\n try {\n body = JSON.stringify(normalize(event));\n }\n catch (newErr) {\n // At this point even renormalization hasn't worked, meaning something about the event data has gone very wrong.\n // Time to cut our losses and record only the new error. With luck, even in the problematic cases we're trying to\n // debug with this hack, we won't ever land here.\n var innerErr = newErr;\n body = JSON.stringify({\n message: 'JSON.stringify error after renormalization',\n // setting `extra: { innerErr }` here for some reason results in an empty object, so unpack manually\n extra: { message: innerErr.message, stack: innerErr.stack },\n });\n }\n }\n var req = {\n // this is the relevant line of code before the hack was added, to make it easy to undo said hack once we've solved\n // the mystery\n // body: JSON.stringify(sdkInfo ? enhanceEventWithSdkInfo(event, api.metadata.sdk) : event),\n body: body,\n type: eventType,\n url: useEnvelope\n ? getEnvelopeEndpointWithUrlEncodedAuth(api.dsn, api.tunnel)\n : getStoreEndpointWithUrlEncodedAuth(api.dsn),\n };\n // https://develop.sentry.dev/sdk/envelopes/\n // Since we don't need to manipulate envelopes nor store them, there is no\n // exported concept of an Envelope with operations including serialization and\n // deserialization. Instead, we only implement a minimal subset of the spec to\n // serialize events inline here.\n if (useEnvelope) {\n var envelopeHeaders = __assign(__assign({ event_id: event.event_id, sent_at: new Date().toISOString() }, (sdkInfo && { sdk: sdkInfo })), (!!api.tunnel && { dsn: dsnToString(api.dsn) }));\n var eventItem = [\n {\n type: eventType,\n sample_rates: [{ id: samplingMethod, rate: sampleRate }],\n },\n req.body,\n ];\n var envelope = createEnvelope(envelopeHeaders, [eventItem]);\n req.body = serializeEnvelope(envelope);\n }\n return req;\n}\n//# sourceMappingURL=request.js.map","import { getCurrentHub } from '@sentry/hub';\nimport { logger } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from './flags';\n/**\n * Internal function to create a new SDK client instance. The client is\n * installed and then bound to the current scope.\n *\n * @param clientClass The client class to instantiate.\n * @param options Options to pass to the client.\n */\nexport function initAndBind(clientClass, options) {\n if (options.debug === true) {\n if (IS_DEBUG_BUILD) {\n logger.enable();\n }\n else {\n // use `console.warn` rather than `logger.warn` since by non-debug bundles have all `logger.x` statements stripped\n // eslint-disable-next-line no-console\n console.warn('[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.');\n }\n }\n var hub = getCurrentHub();\n var scope = hub.getScope();\n if (scope) {\n scope.update(options.initialScope);\n }\n var client = new clientClass(options);\n hub.bindClient(client);\n}\n//# sourceMappingURL=sdk.js.map","import { disabledUntil, eventStatusFromHttpCode, getEnvelopeType, isRateLimited, makePromiseBuffer, rejectedSyncPromise, resolvedSyncPromise, serializeEnvelope, updateRateLimits, } from '@sentry/utils';\nexport var ERROR_TRANSPORT_CATEGORY = 'error';\nexport var TRANSACTION_TRANSPORT_CATEGORY = 'transaction';\nexport var ATTACHMENT_TRANSPORT_CATEGORY = 'attachment';\nexport var SESSION_TRANSPORT_CATEGORY = 'session';\nexport var DEFAULT_TRANSPORT_BUFFER_SIZE = 30;\n/**\n * Creates a `NewTransport`\n *\n * @param options\n * @param makeRequest\n */\nexport function createTransport(options, makeRequest, buffer) {\n if (buffer === void 0) { buffer = makePromiseBuffer(options.bufferSize || DEFAULT_TRANSPORT_BUFFER_SIZE); }\n var rateLimits = {};\n var flush = function (timeout) { return buffer.drain(timeout); };\n function send(envelope) {\n var envCategory = getEnvelopeType(envelope);\n var category = envCategory === 'event' ? 'error' : envCategory;\n var request = {\n category: category,\n body: serializeEnvelope(envelope),\n };\n // Don't add to buffer if transport is already rate-limited\n if (isRateLimited(rateLimits, category)) {\n return rejectedSyncPromise({\n status: 'rate_limit',\n reason: getRateLimitReason(rateLimits, category),\n });\n }\n var requestTask = function () {\n return makeRequest(request).then(function (_a) {\n var body = _a.body, headers = _a.headers, reason = _a.reason, statusCode = _a.statusCode;\n var status = eventStatusFromHttpCode(statusCode);\n if (headers) {\n rateLimits = updateRateLimits(rateLimits, headers);\n }\n if (status === 'success') {\n return resolvedSyncPromise({ status: status, reason: reason });\n }\n return rejectedSyncPromise({\n status: status,\n reason: reason ||\n body ||\n (status === 'rate_limit' ? getRateLimitReason(rateLimits, category) : 'Unknown transport error'),\n });\n });\n };\n return buffer.add(requestTask);\n }\n return {\n send: send,\n flush: flush,\n };\n}\nfunction getRateLimitReason(rateLimits, category) {\n return \"Too many \" + category + \" requests, backing off until: \" + new Date(disabledUntil(rateLimits, category)).toISOString();\n}\n//# sourceMappingURL=base.js.map","import { resolvedSyncPromise } from '@sentry/utils';\n/** Noop transport */\nvar NoopTransport = /** @class */ (function () {\n function NoopTransport() {\n }\n /**\n * @inheritDoc\n */\n NoopTransport.prototype.sendEvent = function (_) {\n return resolvedSyncPromise({\n reason: 'NoopTransport: Event has been skipped because no Dsn is configured.',\n status: 'skipped',\n });\n };\n /**\n * @inheritDoc\n */\n NoopTransport.prototype.close = function (_) {\n return resolvedSyncPromise(true);\n };\n return NoopTransport;\n}());\nexport { NoopTransport };\n//# sourceMappingURL=noop.js.map","export var SDK_VERSION = '6.19.6';\n//# sourceMappingURL=version.js.map","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","/*\n * This file defines flags and constants that can be modified during compile time in order to facilitate tree shaking\n * for users.\n *\n * Debug flags need to be declared in each package individually and must not be imported across package boundaries,\n * because some build tools have trouble tree-shaking imported guards.\n *\n * As a convention, we define debug flags in a `flags.ts` file in the root of a package's `src` folder.\n *\n * Debug flag files will contain \"magic strings\" like `__SENTRY_DEBUG__` that may get replaced with actual values during\n * our, or the user's build process. Take care when introducing new flags - they must not throw if they are not\n * replaced.\n */\n/** Flag that is true for debug builds, false otherwise. */\nexport var IS_DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' ? true : __SENTRY_DEBUG__;\n//# sourceMappingURL=flags.js.map","import { __assign, __read, __spread } from \"tslib\";\nimport { consoleSandbox, dateTimestampInSeconds, getGlobalObject, getGlobalSingleton, isNodeEnv, logger, uuid4, } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from './flags';\nimport { Scope } from './scope';\nimport { Session } from './session';\n/**\n * API compatibility version of this hub.\n *\n * WARNING: This number should only be increased when the global interface\n * changes and new methods are introduced.\n *\n * @hidden\n */\nexport var API_VERSION = 4;\n/**\n * Default maximum number of breadcrumbs added to an event. Can be overwritten\n * with {@link Options.maxBreadcrumbs}.\n */\nvar DEFAULT_BREADCRUMBS = 100;\n/**\n * @inheritDoc\n */\nvar Hub = /** @class */ (function () {\n /**\n * Creates a new instance of the hub, will push one {@link Layer} into the\n * internal stack on creation.\n *\n * @param client bound to the hub.\n * @param scope bound to the hub.\n * @param version number, higher number means higher priority.\n */\n function Hub(client, scope, _version) {\n if (scope === void 0) { scope = new Scope(); }\n if (_version === void 0) { _version = API_VERSION; }\n this._version = _version;\n /** Is a {@link Layer}[] containing the client and scope */\n this._stack = [{}];\n this.getStackTop().scope = scope;\n if (client) {\n this.bindClient(client);\n }\n }\n /**\n * @inheritDoc\n */\n Hub.prototype.isOlderThan = function (version) {\n return this._version < version;\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.bindClient = function (client) {\n var top = this.getStackTop();\n top.client = client;\n if (client && client.setupIntegrations) {\n client.setupIntegrations();\n }\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.pushScope = function () {\n // We want to clone the content of prev scope\n var scope = Scope.clone(this.getScope());\n this.getStack().push({\n client: this.getClient(),\n scope: scope,\n });\n return scope;\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.popScope = function () {\n if (this.getStack().length <= 1)\n return false;\n return !!this.getStack().pop();\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.withScope = function (callback) {\n var scope = this.pushScope();\n try {\n callback(scope);\n }\n finally {\n this.popScope();\n }\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.getClient = function () {\n return this.getStackTop().client;\n };\n /** Returns the scope of the top stack. */\n Hub.prototype.getScope = function () {\n return this.getStackTop().scope;\n };\n /** Returns the scope stack for domains or the process. */\n Hub.prototype.getStack = function () {\n return this._stack;\n };\n /** Returns the topmost scope layer in the order domain > local > process. */\n Hub.prototype.getStackTop = function () {\n return this._stack[this._stack.length - 1];\n };\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n Hub.prototype.captureException = function (exception, hint) {\n var eventId = (this._lastEventId = hint && hint.event_id ? hint.event_id : uuid4());\n var finalHint = hint;\n // If there's no explicit hint provided, mimic the same thing that would happen\n // in the minimal itself to create a consistent behavior.\n // We don't do this in the client, as it's the lowest level API, and doing this,\n // would prevent user from having full control over direct calls.\n if (!hint) {\n var syntheticException = void 0;\n try {\n throw new Error('Sentry syntheticException');\n }\n catch (exception) {\n syntheticException = exception;\n }\n finalHint = {\n originalException: exception,\n syntheticException: syntheticException,\n };\n }\n this._invokeClient('captureException', exception, __assign(__assign({}, finalHint), { event_id: eventId }));\n return eventId;\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.captureMessage = function (message, level, hint) {\n var eventId = (this._lastEventId = hint && hint.event_id ? hint.event_id : uuid4());\n var finalHint = hint;\n // If there's no explicit hint provided, mimic the same thing that would happen\n // in the minimal itself to create a consistent behavior.\n // We don't do this in the client, as it's the lowest level API, and doing this,\n // would prevent user from having full control over direct calls.\n if (!hint) {\n var syntheticException = void 0;\n try {\n throw new Error(message);\n }\n catch (exception) {\n syntheticException = exception;\n }\n finalHint = {\n originalException: message,\n syntheticException: syntheticException,\n };\n }\n this._invokeClient('captureMessage', message, level, __assign(__assign({}, finalHint), { event_id: eventId }));\n return eventId;\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.captureEvent = function (event, hint) {\n var eventId = hint && hint.event_id ? hint.event_id : uuid4();\n if (event.type !== 'transaction') {\n this._lastEventId = eventId;\n }\n this._invokeClient('captureEvent', event, __assign(__assign({}, hint), { event_id: eventId }));\n return eventId;\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.lastEventId = function () {\n return this._lastEventId;\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.addBreadcrumb = function (breadcrumb, hint) {\n var _a = this.getStackTop(), scope = _a.scope, client = _a.client;\n if (!scope || !client)\n return;\n // eslint-disable-next-line @typescript-eslint/unbound-method\n var _b = (client.getOptions && client.getOptions()) || {}, _c = _b.beforeBreadcrumb, beforeBreadcrumb = _c === void 0 ? null : _c, _d = _b.maxBreadcrumbs, maxBreadcrumbs = _d === void 0 ? DEFAULT_BREADCRUMBS : _d;\n if (maxBreadcrumbs <= 0)\n return;\n var timestamp = dateTimestampInSeconds();\n var mergedBreadcrumb = __assign({ timestamp: timestamp }, breadcrumb);\n var finalBreadcrumb = beforeBreadcrumb\n ? consoleSandbox(function () { return beforeBreadcrumb(mergedBreadcrumb, hint); })\n : mergedBreadcrumb;\n if (finalBreadcrumb === null)\n return;\n scope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs);\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.setUser = function (user) {\n var scope = this.getScope();\n if (scope)\n scope.setUser(user);\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.setTags = function (tags) {\n var scope = this.getScope();\n if (scope)\n scope.setTags(tags);\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.setExtras = function (extras) {\n var scope = this.getScope();\n if (scope)\n scope.setExtras(extras);\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.setTag = function (key, value) {\n var scope = this.getScope();\n if (scope)\n scope.setTag(key, value);\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.setExtra = function (key, extra) {\n var scope = this.getScope();\n if (scope)\n scope.setExtra(key, extra);\n };\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Hub.prototype.setContext = function (name, context) {\n var scope = this.getScope();\n if (scope)\n scope.setContext(name, context);\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.configureScope = function (callback) {\n var _a = this.getStackTop(), scope = _a.scope, client = _a.client;\n if (scope && client) {\n callback(scope);\n }\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.run = function (callback) {\n var oldHub = makeMain(this);\n try {\n callback(this);\n }\n finally {\n makeMain(oldHub);\n }\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.getIntegration = function (integration) {\n var client = this.getClient();\n if (!client)\n return null;\n try {\n return client.getIntegration(integration);\n }\n catch (_oO) {\n IS_DEBUG_BUILD && logger.warn(\"Cannot retrieve integration \" + integration.id + \" from the current Hub\");\n return null;\n }\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.startSpan = function (context) {\n return this._callExtensionMethod('startSpan', context);\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.startTransaction = function (context, customSamplingContext) {\n return this._callExtensionMethod('startTransaction', context, customSamplingContext);\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.traceHeaders = function () {\n return this._callExtensionMethod('traceHeaders');\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.captureSession = function (endSession) {\n if (endSession === void 0) { endSession = false; }\n // both send the update and pull the session from the scope\n if (endSession) {\n return this.endSession();\n }\n // only send the update\n this._sendSessionUpdate();\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.endSession = function () {\n var layer = this.getStackTop();\n var scope = layer && layer.scope;\n var session = scope && scope.getSession();\n if (session) {\n session.close();\n }\n this._sendSessionUpdate();\n // the session is over; take it off of the scope\n if (scope) {\n scope.setSession();\n }\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.startSession = function (context) {\n var _a = this.getStackTop(), scope = _a.scope, client = _a.client;\n var _b = (client && client.getOptions()) || {}, release = _b.release, environment = _b.environment;\n // Will fetch userAgent if called from browser sdk\n var global = getGlobalObject();\n var userAgent = (global.navigator || {}).userAgent;\n var session = new Session(__assign(__assign(__assign({ release: release,\n environment: environment }, (scope && { user: scope.getUser() })), (userAgent && { userAgent: userAgent })), context));\n if (scope) {\n // End existing session if there's one\n var currentSession = scope.getSession && scope.getSession();\n if (currentSession && currentSession.status === 'ok') {\n currentSession.update({ status: 'exited' });\n }\n this.endSession();\n // Afterwards we set the new session on the scope\n scope.setSession(session);\n }\n return session;\n };\n /**\n * Sends the current Session on the scope\n */\n Hub.prototype._sendSessionUpdate = function () {\n var _a = this.getStackTop(), scope = _a.scope, client = _a.client;\n if (!scope)\n return;\n var session = scope.getSession && scope.getSession();\n if (session) {\n if (client && client.captureSession) {\n client.captureSession(session);\n }\n }\n };\n /**\n * Internal helper function to call a method on the top client if it exists.\n *\n * @param method The method to call on the client.\n * @param args Arguments to pass to the client function.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Hub.prototype._invokeClient = function (method) {\n var _a;\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var _b = this.getStackTop(), scope = _b.scope, client = _b.client;\n if (client && client[method]) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any\n (_a = client)[method].apply(_a, __spread(args, [scope]));\n }\n };\n /**\n * Calls global extension method and binding current instance to the function call\n */\n // @ts-ignore Function lacks ending return statement and return type does not include 'undefined'. ts(2366)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Hub.prototype._callExtensionMethod = function (method) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var carrier = getMainCarrier();\n var sentry = carrier.__SENTRY__;\n if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') {\n return sentry.extensions[method].apply(this, args);\n }\n IS_DEBUG_BUILD && logger.warn(\"Extension method \" + method + \" couldn't be found, doing nothing.\");\n };\n return Hub;\n}());\nexport { Hub };\n/**\n * Returns the global shim registry.\n *\n * FIXME: This function is problematic, because despite always returning a valid Carrier,\n * it has an optional `__SENTRY__` property, which then in turn requires us to always perform an unnecessary check\n * at the call-site. We always access the carrier through this function, so we can guarantee that `__SENTRY__` is there.\n **/\nexport function getMainCarrier() {\n var carrier = getGlobalObject();\n carrier.__SENTRY__ = carrier.__SENTRY__ || {\n extensions: {},\n hub: undefined,\n };\n return carrier;\n}\n/**\n * Replaces the current main hub with the passed one on the global object\n *\n * @returns The old replaced hub\n */\nexport function makeMain(hub) {\n var registry = getMainCarrier();\n var oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(registry, hub);\n return oldHub;\n}\n/**\n * Returns the default hub instance.\n *\n * If a hub is already registered in the global carrier but this module\n * contains a more recent version, it replaces the registered version.\n * Otherwise, the currently registered hub will be returned.\n */\nexport function getCurrentHub() {\n // Get main carrier (global for every environment)\n var registry = getMainCarrier();\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n }\n // Prefer domains over global if they are there (applicable only to Node environment)\n if (isNodeEnv()) {\n return getHubFromActiveDomain(registry);\n }\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n}\n/**\n * Returns the active domain, if one exists\n * @deprecated No longer used; remove in v7\n * @returns The domain, or undefined if there is no active domain\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function getActiveDomain() {\n IS_DEBUG_BUILD && logger.warn('Function `getActiveDomain` is deprecated and will be removed in a future version.');\n var sentry = getMainCarrier().__SENTRY__;\n return sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;\n}\n/**\n * Try to read the hub from an active domain, and fallback to the registry if one doesn't exist\n * @returns discovered hub\n */\nfunction getHubFromActiveDomain(registry) {\n try {\n var sentry = getMainCarrier().__SENTRY__;\n var activeDomain = sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;\n // If there's no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n // If there's no hub on current domain, or it's an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n var registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, Scope.clone(registryHubTopStack.scope)));\n }\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n }\n catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n}\n/**\n * This will tell whether a carrier has a hub on it or not\n * @param carrier object\n */\nfunction hasHubOnCarrier(carrier) {\n return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub);\n}\n/**\n * This will create a new {@link Hub} and add to the passed object on\n * __SENTRY__.hub.\n * @param carrier object\n * @hidden\n */\nexport function getHubFromCarrier(carrier) {\n return getGlobalSingleton('hub', function () { return new Hub(); }, carrier);\n}\n/**\n * This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute\n * @param carrier object\n * @param hub Hub\n * @returns A boolean indicating success or failure\n */\nexport function setHubOnCarrier(carrier, hub) {\n if (!carrier)\n return false;\n var __SENTRY__ = (carrier.__SENTRY__ = carrier.__SENTRY__ || {});\n __SENTRY__.hub = hub;\n return true;\n}\n//# sourceMappingURL=hub.js.map","import { __assign, __read, __spread } from \"tslib\";\nimport { dateTimestampInSeconds, getGlobalSingleton, isPlainObject, isThenable, SyncPromise } from '@sentry/utils';\n/**\n * Absolute maximum number of breadcrumbs added to an event.\n * The `maxBreadcrumbs` option cannot be higher than this value.\n */\nvar MAX_BREADCRUMBS = 100;\n/**\n * Holds additional event information. {@link Scope.applyToEvent} will be\n * called by the client before an event will be sent.\n */\nvar Scope = /** @class */ (function () {\n function Scope() {\n /** Flag if notifying is happening. */\n this._notifyingListeners = false;\n /** Callback for client to receive scope changes. */\n this._scopeListeners = [];\n /** Callback list that will be called after {@link applyToEvent}. */\n this._eventProcessors = [];\n /** Array of breadcrumbs. */\n this._breadcrumbs = [];\n /** User */\n this._user = {};\n /** Tags */\n this._tags = {};\n /** Extra */\n this._extra = {};\n /** Contexts */\n this._contexts = {};\n /**\n * A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get\n * sent to Sentry\n */\n this._sdkProcessingMetadata = {};\n }\n /**\n * Inherit values from the parent scope.\n * @param scope to clone.\n */\n Scope.clone = function (scope) {\n var newScope = new Scope();\n if (scope) {\n newScope._breadcrumbs = __spread(scope._breadcrumbs);\n newScope._tags = __assign({}, scope._tags);\n newScope._extra = __assign({}, scope._extra);\n newScope._contexts = __assign({}, scope._contexts);\n newScope._user = scope._user;\n newScope._level = scope._level;\n newScope._span = scope._span;\n newScope._session = scope._session;\n newScope._transactionName = scope._transactionName;\n newScope._fingerprint = scope._fingerprint;\n newScope._eventProcessors = __spread(scope._eventProcessors);\n newScope._requestSession = scope._requestSession;\n }\n return newScope;\n };\n /**\n * Add internal on change listener. Used for sub SDKs that need to store the scope.\n * @hidden\n */\n Scope.prototype.addScopeListener = function (callback) {\n this._scopeListeners.push(callback);\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.addEventProcessor = function (callback) {\n this._eventProcessors.push(callback);\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setUser = function (user) {\n this._user = user || {};\n if (this._session) {\n this._session.update({ user: user });\n }\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.getUser = function () {\n return this._user;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.getRequestSession = function () {\n return this._requestSession;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setRequestSession = function (requestSession) {\n this._requestSession = requestSession;\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setTags = function (tags) {\n this._tags = __assign(__assign({}, this._tags), tags);\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setTag = function (key, value) {\n var _a;\n this._tags = __assign(__assign({}, this._tags), (_a = {}, _a[key] = value, _a));\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setExtras = function (extras) {\n this._extra = __assign(__assign({}, this._extra), extras);\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setExtra = function (key, extra) {\n var _a;\n this._extra = __assign(__assign({}, this._extra), (_a = {}, _a[key] = extra, _a));\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setFingerprint = function (fingerprint) {\n this._fingerprint = fingerprint;\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setLevel = function (level) {\n this._level = level;\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setTransactionName = function (name) {\n this._transactionName = name;\n this._notifyScopeListeners();\n return this;\n };\n /**\n * Can be removed in major version.\n * @deprecated in favor of {@link this.setTransactionName}\n */\n Scope.prototype.setTransaction = function (name) {\n return this.setTransactionName(name);\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setContext = function (key, context) {\n var _a;\n if (context === null) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._contexts[key];\n }\n else {\n this._contexts = __assign(__assign({}, this._contexts), (_a = {}, _a[key] = context, _a));\n }\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setSpan = function (span) {\n this._span = span;\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.getSpan = function () {\n return this._span;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.getTransaction = function () {\n // Often, this span (if it exists at all) will be a transaction, but it's not guaranteed to be. Regardless, it will\n // have a pointer to the currently-active transaction.\n var span = this.getSpan();\n return span && span.transaction;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setSession = function (session) {\n if (!session) {\n delete this._session;\n }\n else {\n this._session = session;\n }\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.getSession = function () {\n return this._session;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.update = function (captureContext) {\n if (!captureContext) {\n return this;\n }\n if (typeof captureContext === 'function') {\n var updatedScope = captureContext(this);\n return updatedScope instanceof Scope ? updatedScope : this;\n }\n if (captureContext instanceof Scope) {\n this._tags = __assign(__assign({}, this._tags), captureContext._tags);\n this._extra = __assign(__assign({}, this._extra), captureContext._extra);\n this._contexts = __assign(__assign({}, this._contexts), captureContext._contexts);\n if (captureContext._user && Object.keys(captureContext._user).length) {\n this._user = captureContext._user;\n }\n if (captureContext._level) {\n this._level = captureContext._level;\n }\n if (captureContext._fingerprint) {\n this._fingerprint = captureContext._fingerprint;\n }\n if (captureContext._requestSession) {\n this._requestSession = captureContext._requestSession;\n }\n }\n else if (isPlainObject(captureContext)) {\n // eslint-disable-next-line no-param-reassign\n captureContext = captureContext;\n this._tags = __assign(__assign({}, this._tags), captureContext.tags);\n this._extra = __assign(__assign({}, this._extra), captureContext.extra);\n this._contexts = __assign(__assign({}, this._contexts), captureContext.contexts);\n if (captureContext.user) {\n this._user = captureContext.user;\n }\n if (captureContext.level) {\n this._level = captureContext.level;\n }\n if (captureContext.fingerprint) {\n this._fingerprint = captureContext.fingerprint;\n }\n if (captureContext.requestSession) {\n this._requestSession = captureContext.requestSession;\n }\n }\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.clear = function () {\n this._breadcrumbs = [];\n this._tags = {};\n this._extra = {};\n this._user = {};\n this._contexts = {};\n this._level = undefined;\n this._transactionName = undefined;\n this._fingerprint = undefined;\n this._requestSession = undefined;\n this._span = undefined;\n this._session = undefined;\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.addBreadcrumb = function (breadcrumb, maxBreadcrumbs) {\n var maxCrumbs = typeof maxBreadcrumbs === 'number' ? Math.min(maxBreadcrumbs, MAX_BREADCRUMBS) : MAX_BREADCRUMBS;\n // No data has been changed, so don't notify scope listeners\n if (maxCrumbs <= 0) {\n return this;\n }\n var mergedBreadcrumb = __assign({ timestamp: dateTimestampInSeconds() }, breadcrumb);\n this._breadcrumbs = __spread(this._breadcrumbs, [mergedBreadcrumb]).slice(-maxCrumbs);\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.clearBreadcrumbs = function () {\n this._breadcrumbs = [];\n this._notifyScopeListeners();\n return this;\n };\n /**\n * Applies the current context and fingerprint to the event.\n * Note that breadcrumbs will be added by the client.\n * Also if the event has already breadcrumbs on it, we do not merge them.\n * @param event Event\n * @param hint May contain additional information about the original exception.\n * @hidden\n */\n Scope.prototype.applyToEvent = function (event, hint) {\n if (this._extra && Object.keys(this._extra).length) {\n event.extra = __assign(__assign({}, this._extra), event.extra);\n }\n if (this._tags && Object.keys(this._tags).length) {\n event.tags = __assign(__assign({}, this._tags), event.tags);\n }\n if (this._user && Object.keys(this._user).length) {\n event.user = __assign(__assign({}, this._user), event.user);\n }\n if (this._contexts && Object.keys(this._contexts).length) {\n event.contexts = __assign(__assign({}, this._contexts), event.contexts);\n }\n if (this._level) {\n event.level = this._level;\n }\n if (this._transactionName) {\n event.transaction = this._transactionName;\n }\n // We want to set the trace context for normal events only if there isn't already\n // a trace context on the event. There is a product feature in place where we link\n // errors with transaction and it relies on that.\n if (this._span) {\n event.contexts = __assign({ trace: this._span.getTraceContext() }, event.contexts);\n var transactionName = this._span.transaction && this._span.transaction.name;\n if (transactionName) {\n event.tags = __assign({ transaction: transactionName }, event.tags);\n }\n }\n this._applyFingerprint(event);\n event.breadcrumbs = __spread((event.breadcrumbs || []), this._breadcrumbs);\n event.breadcrumbs = event.breadcrumbs.length > 0 ? event.breadcrumbs : undefined;\n event.sdkProcessingMetadata = this._sdkProcessingMetadata;\n return this._notifyEventProcessors(__spread(getGlobalEventProcessors(), this._eventProcessors), event, hint);\n };\n /**\n * Add data which will be accessible during event processing but won't get sent to Sentry\n */\n Scope.prototype.setSDKProcessingMetadata = function (newData) {\n this._sdkProcessingMetadata = __assign(__assign({}, this._sdkProcessingMetadata), newData);\n return this;\n };\n /**\n * This will be called after {@link applyToEvent} is finished.\n */\n Scope.prototype._notifyEventProcessors = function (processors, event, hint, index) {\n var _this = this;\n if (index === void 0) { index = 0; }\n return new SyncPromise(function (resolve, reject) {\n var processor = processors[index];\n if (event === null || typeof processor !== 'function') {\n resolve(event);\n }\n else {\n var result = processor(__assign({}, event), hint);\n if (isThenable(result)) {\n void result\n .then(function (final) { return _this._notifyEventProcessors(processors, final, hint, index + 1).then(resolve); })\n .then(null, reject);\n }\n else {\n void _this._notifyEventProcessors(processors, result, hint, index + 1)\n .then(resolve)\n .then(null, reject);\n }\n }\n });\n };\n /**\n * This will be called on every set call.\n */\n Scope.prototype._notifyScopeListeners = function () {\n var _this = this;\n // We need this check for this._notifyingListeners to be able to work on scope during updates\n // If this check is not here we'll produce endless recursion when something is done with the scope\n // during the callback.\n if (!this._notifyingListeners) {\n this._notifyingListeners = true;\n this._scopeListeners.forEach(function (callback) {\n callback(_this);\n });\n this._notifyingListeners = false;\n }\n };\n /**\n * Applies fingerprint from the scope to the event if there's one,\n * uses message if there's one instead or get rid of empty fingerprint\n */\n Scope.prototype._applyFingerprint = function (event) {\n // Make sure it's an array first and we actually have something in place\n event.fingerprint = event.fingerprint\n ? Array.isArray(event.fingerprint)\n ? event.fingerprint\n : [event.fingerprint]\n : [];\n // If we have something on the scope, then merge it with event\n if (this._fingerprint) {\n event.fingerprint = event.fingerprint.concat(this._fingerprint);\n }\n // If we have no data at all, remove empty array default\n if (event.fingerprint && !event.fingerprint.length) {\n delete event.fingerprint;\n }\n };\n return Scope;\n}());\nexport { Scope };\n/**\n * Returns the global event processors.\n */\nfunction getGlobalEventProcessors() {\n return getGlobalSingleton('globalEventProcessors', function () { return []; });\n}\n/**\n * Add a EventProcessor to be kept globally.\n * @param callback EventProcessor to add\n */\nexport function addGlobalEventProcessor(callback) {\n getGlobalEventProcessors().push(callback);\n}\n//# sourceMappingURL=scope.js.map","import { dropUndefinedKeys, timestampInSeconds, uuid4 } from '@sentry/utils';\n/**\n * @inheritdoc\n */\nvar Session = /** @class */ (function () {\n function Session(context) {\n this.errors = 0;\n this.sid = uuid4();\n this.duration = 0;\n this.status = 'ok';\n this.init = true;\n this.ignoreDuration = false;\n // Both timestamp and started are in seconds since the UNIX epoch.\n var startingTime = timestampInSeconds();\n this.timestamp = startingTime;\n this.started = startingTime;\n if (context) {\n this.update(context);\n }\n }\n /** JSDoc */\n // eslint-disable-next-line complexity\n Session.prototype.update = function (context) {\n if (context === void 0) { context = {}; }\n if (context.user) {\n if (!this.ipAddress && context.user.ip_address) {\n this.ipAddress = context.user.ip_address;\n }\n if (!this.did && !context.did) {\n this.did = context.user.id || context.user.email || context.user.username;\n }\n }\n this.timestamp = context.timestamp || timestampInSeconds();\n if (context.ignoreDuration) {\n this.ignoreDuration = context.ignoreDuration;\n }\n if (context.sid) {\n // Good enough uuid validation. — Kamil\n this.sid = context.sid.length === 32 ? context.sid : uuid4();\n }\n if (context.init !== undefined) {\n this.init = context.init;\n }\n if (!this.did && context.did) {\n this.did = \"\" + context.did;\n }\n if (typeof context.started === 'number') {\n this.started = context.started;\n }\n if (this.ignoreDuration) {\n this.duration = undefined;\n }\n else if (typeof context.duration === 'number') {\n this.duration = context.duration;\n }\n else {\n var duration = this.timestamp - this.started;\n this.duration = duration >= 0 ? duration : 0;\n }\n if (context.release) {\n this.release = context.release;\n }\n if (context.environment) {\n this.environment = context.environment;\n }\n if (!this.ipAddress && context.ipAddress) {\n this.ipAddress = context.ipAddress;\n }\n if (!this.userAgent && context.userAgent) {\n this.userAgent = context.userAgent;\n }\n if (typeof context.errors === 'number') {\n this.errors = context.errors;\n }\n if (context.status) {\n this.status = context.status;\n }\n };\n /** JSDoc */\n Session.prototype.close = function (status) {\n if (status) {\n this.update({ status: status });\n }\n else if (this.status === 'ok') {\n this.update({ status: 'exited' });\n }\n else {\n this.update();\n }\n };\n /** JSDoc */\n Session.prototype.toJSON = function () {\n return dropUndefinedKeys({\n sid: \"\" + this.sid,\n init: this.init,\n // Make sure that sec is converted to ms for date constructor\n started: new Date(this.started * 1000).toISOString(),\n timestamp: new Date(this.timestamp * 1000).toISOString(),\n status: this.status,\n errors: this.errors,\n did: typeof this.did === 'number' || typeof this.did === 'string' ? \"\" + this.did : undefined,\n duration: this.duration,\n attrs: {\n release: this.release,\n environment: this.environment,\n ip_address: this.ipAddress,\n user_agent: this.userAgent,\n },\n });\n };\n return Session;\n}());\nexport { Session };\n//# sourceMappingURL=session.js.map","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","import { __assign, __read, __spread } from \"tslib\";\nimport { getCurrentHub } from '@sentry/hub';\n/**\n * This calls a function on the current hub.\n * @param method function to call on hub.\n * @param args to pass to function.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction callOnHub(method) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var hub = getCurrentHub();\n if (hub && hub[method]) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return hub[method].apply(hub, __spread(args));\n }\n throw new Error(\"No hub defined or \" + method + \" was not found on the hub, please open a bug report.\");\n}\n/**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception An exception-like object.\n * @returns The generated eventId.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\nexport function captureException(exception, captureContext) {\n var syntheticException = new Error('Sentry syntheticException');\n return callOnHub('captureException', exception, {\n captureContext: captureContext,\n originalException: exception,\n syntheticException: syntheticException,\n });\n}\n/**\n * Captures a message event and sends it to Sentry.\n *\n * @param message The message to send to Sentry.\n * @param Severity Define the level of the message.\n * @returns The generated eventId.\n */\nexport function captureMessage(message, captureContext) {\n var syntheticException = new Error(message);\n // This is necessary to provide explicit scopes upgrade, without changing the original\n // arity of the `captureMessage(message, level)` method.\n var level = typeof captureContext === 'string' ? captureContext : undefined;\n var context = typeof captureContext !== 'string' ? { captureContext: captureContext } : undefined;\n return callOnHub('captureMessage', message, level, __assign({ originalException: message, syntheticException: syntheticException }, context));\n}\n/**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param event The event to send to Sentry.\n * @returns The generated eventId.\n */\nexport function captureEvent(event) {\n return callOnHub('captureEvent', event);\n}\n/**\n * Callback to set context information onto the scope.\n * @param callback Callback function that receives Scope.\n */\nexport function configureScope(callback) {\n callOnHub('configureScope', callback);\n}\n/**\n * Records a new breadcrumb which will be attached to future events.\n *\n * Breadcrumbs will be added to subsequent events to provide more context on\n * user's actions prior to an error or crash.\n *\n * @param breadcrumb The breadcrumb to record.\n */\nexport function addBreadcrumb(breadcrumb) {\n callOnHub('addBreadcrumb', breadcrumb);\n}\n/**\n * Sets context data with the given name.\n * @param name of the context\n * @param context Any kind of data. This data will be normalized.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function setContext(name, context) {\n callOnHub('setContext', name, context);\n}\n/**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\nexport function setExtras(extras) {\n callOnHub('setExtras', extras);\n}\n/**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\nexport function setTags(tags) {\n callOnHub('setTags', tags);\n}\n/**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normalized.\n */\nexport function setExtra(key, extra) {\n callOnHub('setExtra', key, extra);\n}\n/**\n * Set key:value that will be sent as tags data with the event.\n *\n * Can also be used to unset a tag, by passing `undefined`.\n *\n * @param key String key of tag\n * @param value Value of tag\n */\nexport function setTag(key, value) {\n callOnHub('setTag', key, value);\n}\n/**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */\nexport function setUser(user) {\n callOnHub('setUser', user);\n}\n/**\n * Creates a new scope with and executes the given operation within.\n * The scope is automatically removed once the operation\n * finishes or throws.\n *\n * This is essentially a convenience function for:\n *\n * pushScope();\n * callback();\n * popScope();\n *\n * @param callback that will be enclosed into push/popScope.\n */\nexport function withScope(callback) {\n callOnHub('withScope', callback);\n}\n/**\n * Calls a function on the latest client. Use this with caution, it's meant as\n * in \"internal\" helper so we don't need to expose every possible function in\n * the shim. It is not guaranteed that the client actually implements the\n * function.\n *\n * @param method The method to call on the client/client.\n * @param args Arguments to pass to the client/fontend.\n * @hidden\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function _callOnClient(method) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n callOnHub.apply(void 0, __spread(['_invokeClient', method], args));\n}\n/**\n * Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.\n *\n * A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a\n * new child span within the transaction or any span, call the respective `.startChild()` method.\n *\n * Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded.\n *\n * The transaction must be finished with a call to its `.finish()` method, at which point the transaction with all its\n * finished child spans will be sent to Sentry.\n *\n * @param context Properties of the new `Transaction`.\n * @param customSamplingContext Information given to the transaction sampling function (along with context-dependent\n * default values). See {@link Options.tracesSampler}.\n *\n * @returns The transaction which was just started\n */\nexport function startTransaction(context, customSamplingContext) {\n return callOnHub('startTransaction', __assign({}, context), customSamplingContext);\n}\n//# sourceMappingURL=index.js.map","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","import { getGlobalObject, logger } from '@sentry/utils';\nimport { FINISH_REASON_TAG, IDLE_TRANSACTION_FINISH_REASONS } from '../constants';\nimport { IS_DEBUG_BUILD } from '../flags';\nimport { getActiveTransaction } from '../utils';\nvar global = getGlobalObject();\n/**\n * Add a listener that cancels and finishes a transaction when the global\n * document is hidden.\n */\nexport function registerBackgroundTabDetection() {\n if (global && global.document) {\n global.document.addEventListener('visibilitychange', function () {\n var activeTransaction = getActiveTransaction();\n if (global.document.hidden && activeTransaction) {\n var statusType = 'cancelled';\n IS_DEBUG_BUILD &&\n logger.log(\"[Tracing] Transaction: \" + statusType + \" -> since tab moved to the background, op: \" + activeTransaction.op);\n // We should not set status if it is already set, this prevent important statuses like\n // error or data loss from being overwritten on transaction.\n if (!activeTransaction.status) {\n activeTransaction.setStatus(statusType);\n }\n activeTransaction.setTag('visibilitychange', 'document.hidden');\n activeTransaction.setTag(FINISH_REASON_TAG, IDLE_TRANSACTION_FINISH_REASONS[2]);\n activeTransaction.finish();\n }\n });\n }\n else {\n IS_DEBUG_BUILD && logger.warn('[Tracing] Could not set up background tab detection due to lack of global document');\n }\n}\n//# sourceMappingURL=backgroundtab.js.map","import { __assign } from \"tslib\";\nimport { getGlobalObject, logger } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from '../flags';\nimport { startIdleTransaction } from '../hubextensions';\nimport { DEFAULT_IDLE_TIMEOUT } from '../idletransaction';\nimport { extractTraceparentData, secToMs } from '../utils';\nimport { registerBackgroundTabDetection } from './backgroundtab';\nimport { MetricsInstrumentation } from './metrics';\nimport { defaultRequestInstrumentationOptions, instrumentOutgoingRequests, } from './request';\nimport { instrumentRoutingWithDefaults } from './router';\nexport var DEFAULT_MAX_TRANSACTION_DURATION_SECONDS = 600;\nvar DEFAULT_BROWSER_TRACING_OPTIONS = __assign({ idleTimeout: DEFAULT_IDLE_TIMEOUT, markBackgroundTransactions: true, maxTransactionDuration: DEFAULT_MAX_TRANSACTION_DURATION_SECONDS, routingInstrumentation: instrumentRoutingWithDefaults, startTransactionOnLocationChange: true, startTransactionOnPageLoad: true }, defaultRequestInstrumentationOptions);\n/**\n * The Browser Tracing integration automatically instruments browser pageload/navigation\n * actions as transactions, and captures requests, metrics and errors as spans.\n *\n * The integration can be configured with a variety of options, and can be extended to use\n * any routing library. This integration uses {@see IdleTransaction} to create transactions.\n */\nvar BrowserTracing = /** @class */ (function () {\n function BrowserTracing(_options) {\n /**\n * @inheritDoc\n */\n this.name = BrowserTracing.id;\n /** Store configured idle timeout so that it can be added as a tag to transactions */\n this._configuredIdleTimeout = undefined;\n var tracingOrigins = defaultRequestInstrumentationOptions.tracingOrigins;\n // NOTE: Logger doesn't work in constructors, as it's initialized after integrations instances\n if (_options) {\n this._configuredIdleTimeout = _options.idleTimeout;\n if (_options.tracingOrigins && Array.isArray(_options.tracingOrigins) && _options.tracingOrigins.length !== 0) {\n tracingOrigins = _options.tracingOrigins;\n }\n else {\n IS_DEBUG_BUILD && (this._emitOptionsWarning = true);\n }\n }\n this.options = __assign(__assign(__assign({}, DEFAULT_BROWSER_TRACING_OPTIONS), _options), { tracingOrigins: tracingOrigins });\n var _metricOptions = this.options._metricOptions;\n this._metrics = new MetricsInstrumentation(_metricOptions && _metricOptions._reportAllChanges);\n }\n /**\n * @inheritDoc\n */\n BrowserTracing.prototype.setupOnce = function (_, getCurrentHub) {\n var _this = this;\n this._getCurrentHub = getCurrentHub;\n if (this._emitOptionsWarning) {\n IS_DEBUG_BUILD &&\n logger.warn('[Tracing] You need to define `tracingOrigins` in the options. Set an array of urls or patterns to trace.');\n IS_DEBUG_BUILD &&\n logger.warn(\"[Tracing] We added a reasonable default for you: \" + defaultRequestInstrumentationOptions.tracingOrigins);\n }\n // eslint-disable-next-line @typescript-eslint/unbound-method\n var _a = this.options, instrumentRouting = _a.routingInstrumentation, startTransactionOnLocationChange = _a.startTransactionOnLocationChange, startTransactionOnPageLoad = _a.startTransactionOnPageLoad, markBackgroundTransactions = _a.markBackgroundTransactions, traceFetch = _a.traceFetch, traceXHR = _a.traceXHR, tracingOrigins = _a.tracingOrigins, shouldCreateSpanForRequest = _a.shouldCreateSpanForRequest;\n instrumentRouting(function (context) { return _this._createRouteTransaction(context); }, startTransactionOnPageLoad, startTransactionOnLocationChange);\n if (markBackgroundTransactions) {\n registerBackgroundTabDetection();\n }\n instrumentOutgoingRequests({ traceFetch: traceFetch, traceXHR: traceXHR, tracingOrigins: tracingOrigins, shouldCreateSpanForRequest: shouldCreateSpanForRequest });\n };\n /** Create routing idle transaction. */\n BrowserTracing.prototype._createRouteTransaction = function (context) {\n var _this = this;\n if (!this._getCurrentHub) {\n IS_DEBUG_BUILD &&\n logger.warn(\"[Tracing] Did not create \" + context.op + \" transaction because _getCurrentHub is invalid.\");\n return undefined;\n }\n // eslint-disable-next-line @typescript-eslint/unbound-method\n var _a = this.options, beforeNavigate = _a.beforeNavigate, idleTimeout = _a.idleTimeout, maxTransactionDuration = _a.maxTransactionDuration;\n var parentContextFromHeader = context.op === 'pageload' ? getHeaderContext() : undefined;\n var expandedContext = __assign(__assign(__assign({}, context), parentContextFromHeader), { trimEnd: true });\n var modifiedContext = typeof beforeNavigate === 'function' ? beforeNavigate(expandedContext) : expandedContext;\n // For backwards compatibility reasons, beforeNavigate can return undefined to \"drop\" the transaction (prevent it\n // from being sent to Sentry).\n var finalContext = modifiedContext === undefined ? __assign(__assign({}, expandedContext), { sampled: false }) : modifiedContext;\n if (finalContext.sampled === false) {\n IS_DEBUG_BUILD && logger.log(\"[Tracing] Will not send \" + finalContext.op + \" transaction because of beforeNavigate.\");\n }\n IS_DEBUG_BUILD && logger.log(\"[Tracing] Starting \" + finalContext.op + \" transaction on scope\");\n var hub = this._getCurrentHub();\n var location = getGlobalObject().location;\n var idleTransaction = startIdleTransaction(hub, finalContext, idleTimeout, true, { location: location });\n idleTransaction.registerBeforeFinishCallback(function (transaction, endTimestamp) {\n _this._metrics.addPerformanceEntries(transaction);\n adjustTransactionDuration(secToMs(maxTransactionDuration), transaction, endTimestamp);\n });\n idleTransaction.setTag('idleTimeout', this._configuredIdleTimeout);\n return idleTransaction;\n };\n /**\n * @inheritDoc\n */\n BrowserTracing.id = 'BrowserTracing';\n return BrowserTracing;\n}());\nexport { BrowserTracing };\n/**\n * Gets transaction context from a sentry-trace meta.\n *\n * @returns Transaction context data from the header or undefined if there's no header or the header is malformed\n */\nexport function getHeaderContext() {\n var header = getMetaContent('sentry-trace');\n if (header) {\n return extractTraceparentData(header);\n }\n return undefined;\n}\n/** Returns the value of a meta tag */\nexport function getMetaContent(metaName) {\n var el = getGlobalObject().document.querySelector(\"meta[name=\" + metaName + \"]\");\n return el ? el.getAttribute('content') : null;\n}\n/** Adjusts transaction value based on max transaction duration */\nfunction adjustTransactionDuration(maxDuration, transaction, endTimestamp) {\n var diff = endTimestamp - transaction.startTimestamp;\n var isOutdatedTransaction = endTimestamp && (diff > maxDuration || diff < 0);\n if (isOutdatedTransaction) {\n transaction.setStatus('deadline_exceeded');\n transaction.setTag('maxTransactionDurationExceeded', 'true');\n }\n}\n//# sourceMappingURL=browsertracing.js.map","import { __assign, __rest } from \"tslib\";\nimport { browserPerformanceTimeOrigin, getGlobalObject, htmlTreeAsString, isNodeEnv, logger } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from '../flags';\nimport { msToSec } from '../utils';\nimport { getCLS } from './web-vitals/getCLS';\nimport { getFID } from './web-vitals/getFID';\nimport { getLCP } from './web-vitals/getLCP';\nimport { getVisibilityWatcher } from './web-vitals/lib/getVisibilityWatcher';\nvar global = getGlobalObject();\n/** Class tracking metrics */\nvar MetricsInstrumentation = /** @class */ (function () {\n function MetricsInstrumentation(_reportAllChanges) {\n if (_reportAllChanges === void 0) { _reportAllChanges = false; }\n this._reportAllChanges = _reportAllChanges;\n this._measurements = {};\n this._performanceCursor = 0;\n if (!isNodeEnv() && global && global.performance && global.document) {\n if (global.performance.mark) {\n global.performance.mark('sentry-tracing-init');\n }\n this._trackCLS();\n this._trackLCP();\n this._trackFID();\n }\n }\n /** Add performance related spans to a transaction */\n MetricsInstrumentation.prototype.addPerformanceEntries = function (transaction) {\n var _this = this;\n if (!global || !global.performance || !global.performance.getEntries || !browserPerformanceTimeOrigin) {\n // Gatekeeper if performance API not available\n return;\n }\n IS_DEBUG_BUILD && logger.log('[Tracing] Adding & adjusting spans using Performance API');\n var timeOrigin = msToSec(browserPerformanceTimeOrigin);\n var responseStartTimestamp;\n var requestStartTimestamp;\n global.performance\n .getEntries()\n .slice(this._performanceCursor)\n .forEach(function (entry) {\n var startTime = msToSec(entry.startTime);\n var duration = msToSec(entry.duration);\n if (transaction.op === 'navigation' && timeOrigin + startTime < transaction.startTimestamp) {\n return;\n }\n switch (entry.entryType) {\n case 'navigation': {\n addNavigationSpans(transaction, entry, timeOrigin);\n responseStartTimestamp = timeOrigin + msToSec(entry.responseStart);\n requestStartTimestamp = timeOrigin + msToSec(entry.requestStart);\n break;\n }\n case 'mark':\n case 'paint':\n case 'measure': {\n var startTimestamp = addMeasureSpans(transaction, entry, startTime, duration, timeOrigin);\n // capture web vitals\n var firstHidden = getVisibilityWatcher();\n // Only report if the page wasn't hidden prior to the web vital.\n var shouldRecord = entry.startTime < firstHidden.firstHiddenTime;\n if (entry.name === 'first-paint' && shouldRecord) {\n IS_DEBUG_BUILD && logger.log('[Measurements] Adding FP');\n _this._measurements['fp'] = { value: entry.startTime };\n _this._measurements['mark.fp'] = { value: startTimestamp };\n }\n if (entry.name === 'first-contentful-paint' && shouldRecord) {\n IS_DEBUG_BUILD && logger.log('[Measurements] Adding FCP');\n _this._measurements['fcp'] = { value: entry.startTime };\n _this._measurements['mark.fcp'] = { value: startTimestamp };\n }\n break;\n }\n case 'resource': {\n var resourceName = entry.name.replace(global.location.origin, '');\n addResourceSpans(transaction, entry, resourceName, startTime, duration, timeOrigin);\n break;\n }\n default:\n // Ignore other entry types.\n }\n });\n this._performanceCursor = Math.max(performance.getEntries().length - 1, 0);\n this._trackNavigator(transaction);\n // Measurements are only available for pageload transactions\n if (transaction.op === 'pageload') {\n // normalize applicable web vital values to be relative to transaction.startTimestamp\n var timeOrigin_1 = msToSec(browserPerformanceTimeOrigin);\n // Generate TTFB (Time to First Byte), which measured as the time between the beginning of the transaction and the\n // start of the response in milliseconds\n if (typeof responseStartTimestamp === 'number') {\n IS_DEBUG_BUILD && logger.log('[Measurements] Adding TTFB');\n this._measurements['ttfb'] = { value: (responseStartTimestamp - transaction.startTimestamp) * 1000 };\n if (typeof requestStartTimestamp === 'number' && requestStartTimestamp <= responseStartTimestamp) {\n // Capture the time spent making the request and receiving the first byte of the response.\n // This is the time between the start of the request and the start of the response in milliseconds.\n this._measurements['ttfb.requestTime'] = { value: (responseStartTimestamp - requestStartTimestamp) * 1000 };\n }\n }\n ['fcp', 'fp', 'lcp'].forEach(function (name) {\n if (!_this._measurements[name] || timeOrigin_1 >= transaction.startTimestamp) {\n return;\n }\n // The web vitals, fcp, fp, lcp, and ttfb, all measure relative to timeOrigin.\n // Unfortunately, timeOrigin is not captured within the transaction span data, so these web vitals will need\n // to be adjusted to be relative to transaction.startTimestamp.\n var oldValue = _this._measurements[name].value;\n var measurementTimestamp = timeOrigin_1 + msToSec(oldValue);\n // normalizedValue should be in milliseconds\n var normalizedValue = Math.abs((measurementTimestamp - transaction.startTimestamp) * 1000);\n var delta = normalizedValue - oldValue;\n IS_DEBUG_BUILD &&\n logger.log(\"[Measurements] Normalized \" + name + \" from \" + oldValue + \" to \" + normalizedValue + \" (\" + delta + \")\");\n _this._measurements[name].value = normalizedValue;\n });\n if (this._measurements['mark.fid'] && this._measurements['fid']) {\n // create span for FID\n _startChild(transaction, {\n description: 'first input delay',\n endTimestamp: this._measurements['mark.fid'].value + msToSec(this._measurements['fid'].value),\n op: 'web.vitals',\n startTimestamp: this._measurements['mark.fid'].value,\n });\n }\n // If FCP is not recorded we should not record the cls value\n // according to the new definition of CLS.\n if (!('fcp' in this._measurements)) {\n delete this._measurements.cls;\n }\n transaction.setMeasurements(this._measurements);\n tagMetricInfo(transaction, this._lcpEntry, this._clsEntry);\n transaction.setTag('sentry_reportAllChanges', this._reportAllChanges);\n }\n };\n /**\n * Capture the information of the user agent.\n */\n MetricsInstrumentation.prototype._trackNavigator = function (transaction) {\n var navigator = global.navigator;\n if (!navigator) {\n return;\n }\n // track network connectivity\n var connection = navigator.connection;\n if (connection) {\n if (connection.effectiveType) {\n transaction.setTag('effectiveConnectionType', connection.effectiveType);\n }\n if (connection.type) {\n transaction.setTag('connectionType', connection.type);\n }\n if (isMeasurementValue(connection.rtt)) {\n this._measurements['connection.rtt'] = { value: connection.rtt };\n }\n if (isMeasurementValue(connection.downlink)) {\n this._measurements['connection.downlink'] = { value: connection.downlink };\n }\n }\n if (isMeasurementValue(navigator.deviceMemory)) {\n transaction.setTag('deviceMemory', String(navigator.deviceMemory));\n }\n if (isMeasurementValue(navigator.hardwareConcurrency)) {\n transaction.setTag('hardwareConcurrency', String(navigator.hardwareConcurrency));\n }\n };\n /** Starts tracking the Cumulative Layout Shift on the current page. */\n MetricsInstrumentation.prototype._trackCLS = function () {\n var _this = this;\n // See:\n // https://web.dev/evolving-cls/\n // https://web.dev/cls-web-tooling/\n getCLS(function (metric) {\n var entry = metric.entries.pop();\n if (!entry) {\n return;\n }\n IS_DEBUG_BUILD && logger.log('[Measurements] Adding CLS');\n _this._measurements['cls'] = { value: metric.value };\n _this._clsEntry = entry;\n });\n };\n /** Starts tracking the Largest Contentful Paint on the current page. */\n MetricsInstrumentation.prototype._trackLCP = function () {\n var _this = this;\n getLCP(function (metric) {\n var entry = metric.entries.pop();\n if (!entry) {\n return;\n }\n var timeOrigin = msToSec(browserPerformanceTimeOrigin);\n var startTime = msToSec(entry.startTime);\n IS_DEBUG_BUILD && logger.log('[Measurements] Adding LCP');\n _this._measurements['lcp'] = { value: metric.value };\n _this._measurements['mark.lcp'] = { value: timeOrigin + startTime };\n _this._lcpEntry = entry;\n }, this._reportAllChanges);\n };\n /** Starts tracking the First Input Delay on the current page. */\n MetricsInstrumentation.prototype._trackFID = function () {\n var _this = this;\n getFID(function (metric) {\n var entry = metric.entries.pop();\n if (!entry) {\n return;\n }\n var timeOrigin = msToSec(browserPerformanceTimeOrigin);\n var startTime = msToSec(entry.startTime);\n IS_DEBUG_BUILD && logger.log('[Measurements] Adding FID');\n _this._measurements['fid'] = { value: metric.value };\n _this._measurements['mark.fid'] = { value: timeOrigin + startTime };\n });\n };\n return MetricsInstrumentation;\n}());\nexport { MetricsInstrumentation };\n/** Instrument navigation entries */\nfunction addNavigationSpans(transaction, entry, timeOrigin) {\n ['unloadEvent', 'redirect', 'domContentLoadedEvent', 'loadEvent', 'connect'].forEach(function (event) {\n addPerformanceNavigationTiming(transaction, entry, event, timeOrigin);\n });\n addPerformanceNavigationTiming(transaction, entry, 'secureConnection', timeOrigin, 'TLS/SSL', 'connectEnd');\n addPerformanceNavigationTiming(transaction, entry, 'fetch', timeOrigin, 'cache', 'domainLookupStart');\n addPerformanceNavigationTiming(transaction, entry, 'domainLookup', timeOrigin, 'DNS');\n addRequest(transaction, entry, timeOrigin);\n}\n/** Create measure related spans */\nfunction addMeasureSpans(transaction, entry, startTime, duration, timeOrigin) {\n var measureStartTimestamp = timeOrigin + startTime;\n var measureEndTimestamp = measureStartTimestamp + duration;\n _startChild(transaction, {\n description: entry.name,\n endTimestamp: measureEndTimestamp,\n op: entry.entryType,\n startTimestamp: measureStartTimestamp,\n });\n return measureStartTimestamp;\n}\n/** Create resource-related spans */\nexport function addResourceSpans(transaction, entry, resourceName, startTime, duration, timeOrigin) {\n // we already instrument based on fetch and xhr, so we don't need to\n // duplicate spans here.\n if (entry.initiatorType === 'xmlhttprequest' || entry.initiatorType === 'fetch') {\n return;\n }\n var data = {};\n if ('transferSize' in entry) {\n data['Transfer Size'] = entry.transferSize;\n }\n if ('encodedBodySize' in entry) {\n data['Encoded Body Size'] = entry.encodedBodySize;\n }\n if ('decodedBodySize' in entry) {\n data['Decoded Body Size'] = entry.decodedBodySize;\n }\n var startTimestamp = timeOrigin + startTime;\n var endTimestamp = startTimestamp + duration;\n _startChild(transaction, {\n description: resourceName,\n endTimestamp: endTimestamp,\n op: entry.initiatorType ? \"resource.\" + entry.initiatorType : 'resource',\n startTimestamp: startTimestamp,\n data: data,\n });\n}\n/** Create performance navigation related spans */\nfunction addPerformanceNavigationTiming(transaction, entry, event, timeOrigin, description, eventEnd) {\n var end = eventEnd ? entry[eventEnd] : entry[event + \"End\"];\n var start = entry[event + \"Start\"];\n if (!start || !end) {\n return;\n }\n _startChild(transaction, {\n op: 'browser',\n description: (description !== null && description !== void 0 ? description : event),\n startTimestamp: timeOrigin + msToSec(start),\n endTimestamp: timeOrigin + msToSec(end),\n });\n}\n/** Create request and response related spans */\nfunction addRequest(transaction, entry, timeOrigin) {\n _startChild(transaction, {\n op: 'browser',\n description: 'request',\n startTimestamp: timeOrigin + msToSec(entry.requestStart),\n endTimestamp: timeOrigin + msToSec(entry.responseEnd),\n });\n _startChild(transaction, {\n op: 'browser',\n description: 'response',\n startTimestamp: timeOrigin + msToSec(entry.responseStart),\n endTimestamp: timeOrigin + msToSec(entry.responseEnd),\n });\n}\n/**\n * Helper function to start child on transactions. This function will make sure that the transaction will\n * use the start timestamp of the created child span if it is earlier than the transactions actual\n * start timestamp.\n */\nexport function _startChild(transaction, _a) {\n var startTimestamp = _a.startTimestamp, ctx = __rest(_a, [\"startTimestamp\"]);\n if (startTimestamp && transaction.startTimestamp > startTimestamp) {\n transaction.startTimestamp = startTimestamp;\n }\n return transaction.startChild(__assign({ startTimestamp: startTimestamp }, ctx));\n}\n/**\n * Checks if a given value is a valid measurement value.\n */\nfunction isMeasurementValue(value) {\n return typeof value === 'number' && isFinite(value);\n}\n/** Add LCP / CLS data to transaction to allow debugging */\nfunction tagMetricInfo(transaction, lcpEntry, clsEntry) {\n if (lcpEntry) {\n IS_DEBUG_BUILD && logger.log('[Measurements] Adding LCP Data');\n // Capture Properties of the LCP element that contributes to the LCP.\n if (lcpEntry.element) {\n transaction.setTag('lcp.element', htmlTreeAsString(lcpEntry.element));\n }\n if (lcpEntry.id) {\n transaction.setTag('lcp.id', lcpEntry.id);\n }\n if (lcpEntry.url) {\n // Trim URL to the first 200 characters.\n transaction.setTag('lcp.url', lcpEntry.url.trim().slice(0, 200));\n }\n transaction.setTag('lcp.size', lcpEntry.size);\n }\n // See: https://developer.mozilla.org/en-US/docs/Web/API/LayoutShift\n if (clsEntry && clsEntry.sources) {\n IS_DEBUG_BUILD && logger.log('[Measurements] Adding CLS Data');\n clsEntry.sources.forEach(function (source, index) {\n return transaction.setTag(\"cls.source.\" + (index + 1), htmlTreeAsString(source.node));\n });\n }\n}\n//# sourceMappingURL=metrics.js.map","import { __assign, __read, __spread } from \"tslib\";\nimport { addInstrumentationHandler, isInstanceOf, isMatchingPattern } from '@sentry/utils';\nimport { getActiveTransaction, hasTracingEnabled } from '../utils';\nexport var DEFAULT_TRACING_ORIGINS = ['localhost', /^\\//];\nexport var defaultRequestInstrumentationOptions = {\n traceFetch: true,\n traceXHR: true,\n tracingOrigins: DEFAULT_TRACING_ORIGINS,\n};\n/** Registers span creators for xhr and fetch requests */\nexport function instrumentOutgoingRequests(_options) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n var _a = __assign(__assign({}, defaultRequestInstrumentationOptions), _options), traceFetch = _a.traceFetch, traceXHR = _a.traceXHR, tracingOrigins = _a.tracingOrigins, shouldCreateSpanForRequest = _a.shouldCreateSpanForRequest;\n // We should cache url -> decision so that we don't have to compute\n // regexp everytime we create a request.\n var urlMap = {};\n var defaultShouldCreateSpan = function (url) {\n if (urlMap[url]) {\n return urlMap[url];\n }\n var origins = tracingOrigins;\n urlMap[url] =\n origins.some(function (origin) { return isMatchingPattern(url, origin); }) &&\n !isMatchingPattern(url, 'sentry_key');\n return urlMap[url];\n };\n // We want that our users don't have to re-implement shouldCreateSpanForRequest themselves\n // That's why we filter out already unwanted Spans from tracingOrigins\n var shouldCreateSpan = defaultShouldCreateSpan;\n if (typeof shouldCreateSpanForRequest === 'function') {\n shouldCreateSpan = function (url) {\n return defaultShouldCreateSpan(url) && shouldCreateSpanForRequest(url);\n };\n }\n var spans = {};\n if (traceFetch) {\n addInstrumentationHandler('fetch', function (handlerData) {\n fetchCallback(handlerData, shouldCreateSpan, spans);\n });\n }\n if (traceXHR) {\n addInstrumentationHandler('xhr', function (handlerData) {\n xhrCallback(handlerData, shouldCreateSpan, spans);\n });\n }\n}\n/**\n * Create and track fetch request spans\n */\nexport function fetchCallback(handlerData, shouldCreateSpan, spans) {\n if (!hasTracingEnabled() || !(handlerData.fetchData && shouldCreateSpan(handlerData.fetchData.url))) {\n return;\n }\n if (handlerData.endTimestamp) {\n var spanId = handlerData.fetchData.__span;\n if (!spanId)\n return;\n var span = spans[spanId];\n if (span) {\n if (handlerData.response) {\n // TODO (kmclb) remove this once types PR goes through\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n span.setHttpStatus(handlerData.response.status);\n }\n else if (handlerData.error) {\n span.setStatus('internal_error');\n }\n span.finish();\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete spans[spanId];\n }\n return;\n }\n var activeTransaction = getActiveTransaction();\n if (activeTransaction) {\n var span = activeTransaction.startChild({\n data: __assign(__assign({}, handlerData.fetchData), { type: 'fetch' }),\n description: handlerData.fetchData.method + \" \" + handlerData.fetchData.url,\n op: 'http.client',\n });\n handlerData.fetchData.__span = span.spanId;\n spans[span.spanId] = span;\n var request = (handlerData.args[0] = handlerData.args[0]);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var options = (handlerData.args[1] = handlerData.args[1] || {});\n var headers = options.headers;\n if (isInstanceOf(request, Request)) {\n headers = request.headers;\n }\n if (headers) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (typeof headers.append === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n headers.append('sentry-trace', span.toTraceparent());\n }\n else if (Array.isArray(headers)) {\n headers = __spread(headers, [['sentry-trace', span.toTraceparent()]]);\n }\n else {\n headers = __assign(__assign({}, headers), { 'sentry-trace': span.toTraceparent() });\n }\n }\n else {\n headers = { 'sentry-trace': span.toTraceparent() };\n }\n options.headers = headers;\n }\n}\n/**\n * Create and track xhr request spans\n */\nexport function xhrCallback(handlerData, shouldCreateSpan, spans) {\n if (!hasTracingEnabled() ||\n (handlerData.xhr && handlerData.xhr.__sentry_own_request__) ||\n !(handlerData.xhr && handlerData.xhr.__sentry_xhr__ && shouldCreateSpan(handlerData.xhr.__sentry_xhr__.url))) {\n return;\n }\n var xhr = handlerData.xhr.__sentry_xhr__;\n // check first if the request has finished and is tracked by an existing span which should now end\n if (handlerData.endTimestamp) {\n var spanId = handlerData.xhr.__sentry_xhr_span_id__;\n if (!spanId)\n return;\n var span = spans[spanId];\n if (span) {\n span.setHttpStatus(xhr.status_code);\n span.finish();\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete spans[spanId];\n }\n return;\n }\n // if not, create a new span to track it\n var activeTransaction = getActiveTransaction();\n if (activeTransaction) {\n var span = activeTransaction.startChild({\n data: __assign(__assign({}, xhr.data), { type: 'xhr', method: xhr.method, url: xhr.url }),\n description: xhr.method + \" \" + xhr.url,\n op: 'http.client',\n });\n handlerData.xhr.__sentry_xhr_span_id__ = span.spanId;\n spans[handlerData.xhr.__sentry_xhr_span_id__] = span;\n if (handlerData.xhr.setRequestHeader) {\n try {\n handlerData.xhr.setRequestHeader('sentry-trace', span.toTraceparent());\n }\n catch (_) {\n // Error: InvalidStateError: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': The object's state must be OPENED.\n }\n }\n }\n}\n//# sourceMappingURL=request.js.map","import { addInstrumentationHandler, getGlobalObject, logger } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from '../flags';\nvar global = getGlobalObject();\n/**\n * Default function implementing pageload and navigation transactions\n */\nexport function instrumentRoutingWithDefaults(customStartTransaction, startTransactionOnPageLoad, startTransactionOnLocationChange) {\n if (startTransactionOnPageLoad === void 0) { startTransactionOnPageLoad = true; }\n if (startTransactionOnLocationChange === void 0) { startTransactionOnLocationChange = true; }\n if (!global || !global.location) {\n IS_DEBUG_BUILD && logger.warn('Could not initialize routing instrumentation due to invalid location');\n return;\n }\n var startingUrl = global.location.href;\n var activeTransaction;\n if (startTransactionOnPageLoad) {\n activeTransaction = customStartTransaction({ name: global.location.pathname, op: 'pageload' });\n }\n if (startTransactionOnLocationChange) {\n addInstrumentationHandler('history', function (_a) {\n var to = _a.to, from = _a.from;\n /**\n * This early return is there to account for some cases where a navigation transaction starts right after\n * long-running pageload. We make sure that if `from` is undefined and a valid `startingURL` exists, we don't\n * create an uneccessary navigation transaction.\n *\n * This was hard to duplicate, but this behavior stopped as soon as this fix was applied. This issue might also\n * only be caused in certain development environments where the usage of a hot module reloader is causing\n * errors.\n */\n if (from === undefined && startingUrl && startingUrl.indexOf(to) !== -1) {\n startingUrl = undefined;\n return;\n }\n if (from !== to) {\n startingUrl = undefined;\n if (activeTransaction) {\n IS_DEBUG_BUILD && logger.log(\"[Tracing] Finishing current transaction with op: \" + activeTransaction.op);\n // If there's an open transaction on the scope, we need to finish it before creating an new one.\n activeTransaction.finish();\n }\n activeTransaction = customStartTransaction({ name: global.location.pathname, op: 'navigation' });\n }\n });\n }\n}\n//# sourceMappingURL=router.js.map","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { bindReporter } from './lib/bindReporter';\nimport { initMetric } from './lib/initMetric';\nimport { observe } from './lib/observe';\nimport { onHidden } from './lib/onHidden';\nexport var getCLS = function (onReport, reportAllChanges) {\n var metric = initMetric('CLS', 0);\n var report;\n var sessionValue = 0;\n var sessionEntries = [];\n var entryHandler = function (entry) {\n // Only count layout shifts without recent user input.\n // TODO: Figure out why entry can be undefined\n if (entry && !entry.hadRecentInput) {\n var firstSessionEntry = sessionEntries[0];\n var lastSessionEntry = sessionEntries[sessionEntries.length - 1];\n // If the entry occurred less than 1 second after the previous entry and\n // less than 5 seconds after the first entry in the session, include the\n // entry in the current session. Otherwise, start a new session.\n if (sessionValue &&\n sessionEntries.length !== 0 &&\n entry.startTime - lastSessionEntry.startTime < 1000 &&\n entry.startTime - firstSessionEntry.startTime < 5000) {\n sessionValue += entry.value;\n sessionEntries.push(entry);\n }\n else {\n sessionValue = entry.value;\n sessionEntries = [entry];\n }\n // If the current session value is larger than the current CLS value,\n // update CLS and the entries contributing to it.\n if (sessionValue > metric.value) {\n metric.value = sessionValue;\n metric.entries = sessionEntries;\n if (report) {\n report();\n }\n }\n }\n };\n var po = observe('layout-shift', entryHandler);\n if (po) {\n report = bindReporter(onReport, metric, reportAllChanges);\n onHidden(function () {\n po.takeRecords().map(entryHandler);\n report(true);\n });\n }\n};\n//# sourceMappingURL=getCLS.js.map","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { bindReporter } from './lib/bindReporter';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher';\nimport { initMetric } from './lib/initMetric';\nimport { observe } from './lib/observe';\nimport { onHidden } from './lib/onHidden';\nexport var getFID = function (onReport, reportAllChanges) {\n var visibilityWatcher = getVisibilityWatcher();\n var metric = initMetric('FID');\n var report;\n var entryHandler = function (entry) {\n // Only report if the page wasn't hidden prior to the first input.\n if (report && entry.startTime < visibilityWatcher.firstHiddenTime) {\n metric.value = entry.processingStart - entry.startTime;\n metric.entries.push(entry);\n report(true);\n }\n };\n var po = observe('first-input', entryHandler);\n if (po) {\n report = bindReporter(onReport, metric, reportAllChanges);\n onHidden(function () {\n po.takeRecords().map(entryHandler);\n po.disconnect();\n }, true);\n }\n};\n//# sourceMappingURL=getFID.js.map","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { bindReporter } from './lib/bindReporter';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher';\nimport { initMetric } from './lib/initMetric';\nimport { observe } from './lib/observe';\nimport { onHidden } from './lib/onHidden';\nvar reportedMetricIDs = {};\nexport var getLCP = function (onReport, reportAllChanges) {\n var visibilityWatcher = getVisibilityWatcher();\n var metric = initMetric('LCP');\n var report;\n var entryHandler = function (entry) {\n // The startTime attribute returns the value of the renderTime if it is not 0,\n // and the value of the loadTime otherwise.\n var value = entry.startTime;\n // If the page was hidden prior to paint time of the entry,\n // ignore it and mark the metric as final, otherwise add the entry.\n if (value < visibilityWatcher.firstHiddenTime) {\n metric.value = value;\n metric.entries.push(entry);\n }\n if (report) {\n report();\n }\n };\n var po = observe('largest-contentful-paint', entryHandler);\n if (po) {\n report = bindReporter(onReport, metric, reportAllChanges);\n var stopListening_1 = function () {\n if (!reportedMetricIDs[metric.id]) {\n po.takeRecords().map(entryHandler);\n po.disconnect();\n reportedMetricIDs[metric.id] = true;\n report(true);\n }\n };\n // Stop listening after input. Note: while scrolling is an input that\n // stop LCP observation, it's unreliable since it can be programmatically\n // generated. See: https://github.com/GoogleChrome/web-vitals/issues/75\n ['keydown', 'click'].forEach(function (type) {\n addEventListener(type, stopListening_1, { once: true, capture: true });\n });\n onHidden(stopListening_1, true);\n }\n};\n//# sourceMappingURL=getLCP.js.map","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var bindReporter = function (callback, metric, reportAllChanges) {\n var prevValue;\n return function (forceReport) {\n if (metric.value >= 0) {\n if (forceReport || reportAllChanges) {\n metric.delta = metric.value - (prevValue || 0);\n // Report the metric if there's a non-zero delta or if no previous\n // value exists (which can happen in the case of the document becoming\n // hidden when the metric value is 0).\n // See: https://github.com/GoogleChrome/web-vitals/issues/14\n if (metric.delta || prevValue === undefined) {\n prevValue = metric.value;\n callback(metric);\n }\n }\n }\n };\n};\n//# sourceMappingURL=bindReporter.js.map","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Performantly generate a unique, 30-char string by combining a version\n * number, the current timestamp with a 13-digit number integer.\n * @return {string}\n */\nexport var generateUniqueID = function () {\n return \"v2-\" + Date.now() + \"-\" + (Math.floor(Math.random() * (9e12 - 1)) + 1e12);\n};\n//# sourceMappingURL=generateUniqueID.js.map","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { getGlobalObject } from '@sentry/utils';\nimport { onHidden } from './onHidden';\nvar firstHiddenTime = -1;\nvar initHiddenTime = function () {\n return getGlobalObject().document.visibilityState === 'hidden' ? 0 : Infinity;\n};\nvar trackChanges = function () {\n // Update the time if/when the document becomes hidden.\n onHidden(function (_a) {\n var timeStamp = _a.timeStamp;\n firstHiddenTime = timeStamp;\n }, true);\n};\nexport var getVisibilityWatcher = function () {\n if (firstHiddenTime < 0) {\n // If the document is hidden when this code runs, assume it was hidden\n // since navigation start. This isn't a perfect heuristic, but it's the\n // best we can do until an API is available to support querying past\n // visibilityState.\n firstHiddenTime = initHiddenTime();\n trackChanges();\n }\n return {\n get firstHiddenTime() {\n return firstHiddenTime;\n },\n };\n};\n//# sourceMappingURL=getVisibilityWatcher.js.map","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { generateUniqueID } from './generateUniqueID';\nexport var initMetric = function (name, value) {\n return {\n name: name,\n value: (value !== null && value !== void 0 ? value : -1),\n delta: 0,\n entries: [],\n id: generateUniqueID(),\n };\n};\n//# sourceMappingURL=initMetric.js.map","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Takes a performance entry type and a callback function, and creates a\n * `PerformanceObserver` instance that will observe the specified entry type\n * with buffering enabled and call the callback _for each entry_.\n *\n * This function also feature-detects entry support and wraps the logic in a\n * try/catch to avoid errors in unsupporting browsers.\n */\nexport var observe = function (type, callback) {\n try {\n if (PerformanceObserver.supportedEntryTypes.includes(type)) {\n // More extensive feature detect needed for Firefox due to:\n // https://github.com/GoogleChrome/web-vitals/issues/142\n if (type === 'first-input' && !('PerformanceEventTiming' in self)) {\n return;\n }\n var po = new PerformanceObserver(function (l) { return l.getEntries().map(callback); });\n po.observe({ type: type, buffered: true });\n return po;\n }\n }\n catch (e) {\n // Do nothing.\n }\n return;\n};\n//# sourceMappingURL=observe.js.map","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { getGlobalObject } from '@sentry/utils';\nexport var onHidden = function (cb, once) {\n var onHiddenOrPageHide = function (event) {\n if (event.type === 'pagehide' || getGlobalObject().document.visibilityState === 'hidden') {\n cb(event);\n if (once) {\n removeEventListener('visibilitychange', onHiddenOrPageHide, true);\n removeEventListener('pagehide', onHiddenOrPageHide, true);\n }\n }\n };\n addEventListener('visibilitychange', onHiddenOrPageHide, true);\n // Some browsers have buggy implementations of visibilitychange,\n // so we use pagehide in addition, just to be safe.\n addEventListener('pagehide', onHiddenOrPageHide, true);\n};\n//# sourceMappingURL=onHidden.js.map","// Store finish reasons in tuple to save on bundle size\n// Readonly type should enforce that this is not mutated.\nexport var FINISH_REASON_TAG = 'finishReason';\nexport var IDLE_TRANSACTION_FINISH_REASONS = ['heartbeatFailed', 'idleTimeout', 'documentHidden'];\n//# sourceMappingURL=constants.js.map","/*\n * This file defines flags and constants that can be modified during compile time in order to facilitate tree shaking\n * for users.\n *\n * Debug flags need to be declared in each package individually and must not be imported across package boundaries,\n * because some build tools have trouble tree-shaking imported guards.\n *\n * As a convention, we define debug flags in a `flags.ts` file in the root of a package's `src` folder.\n *\n * Debug flag files will contain \"magic strings\" like `__SENTRY_DEBUG__` that may get replaced with actual values during\n * our, or the user's build process. Take care when introducing new flags - they must not throw if they are not\n * replaced.\n */\n/** Flag that is true for debug builds, false otherwise. */\nexport var IS_DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' ? true : __SENTRY_DEBUG__;\n//# sourceMappingURL=flags.js.map","import { __assign, __read, __spread } from \"tslib\";\nimport { getMainCarrier } from '@sentry/hub';\nimport { dynamicRequire, isNaN, isNodeEnv, loadModule, logger } from '@sentry/utils';\nimport { registerErrorInstrumentation } from './errors';\nimport { IS_DEBUG_BUILD } from './flags';\nimport { IdleTransaction } from './idletransaction';\nimport { Transaction } from './transaction';\nimport { hasTracingEnabled } from './utils';\n/** Returns all trace headers that are currently on the top scope. */\nfunction traceHeaders() {\n var scope = this.getScope();\n if (scope) {\n var span = scope.getSpan();\n if (span) {\n return {\n 'sentry-trace': span.toTraceparent(),\n };\n }\n }\n return {};\n}\n/**\n * Makes a sampling decision for the given transaction and stores it on the transaction.\n *\n * Called every time a transaction is created. Only transactions which emerge with a `sampled` value of `true` will be\n * sent to Sentry.\n *\n * @param transaction: The transaction needing a sampling decision\n * @param options: The current client's options, so we can access `tracesSampleRate` and/or `tracesSampler`\n * @param samplingContext: Default and user-provided data which may be used to help make the decision\n *\n * @returns The given transaction with its `sampled` value set\n */\nfunction sample(transaction, options, samplingContext) {\n // nothing to do if tracing is not enabled\n if (!hasTracingEnabled(options)) {\n transaction.sampled = false;\n return transaction;\n }\n // if the user has forced a sampling decision by passing a `sampled` value in their transaction context, go with that\n if (transaction.sampled !== undefined) {\n transaction.setMetadata({\n transactionSampling: { method: 'explicitly_set' },\n });\n return transaction;\n }\n // we would have bailed already if neither `tracesSampler` nor `tracesSampleRate` were defined, so one of these should\n // work; prefer the hook if so\n var sampleRate;\n if (typeof options.tracesSampler === 'function') {\n sampleRate = options.tracesSampler(samplingContext);\n transaction.setMetadata({\n transactionSampling: {\n method: 'client_sampler',\n // cast to number in case it's a boolean\n rate: Number(sampleRate),\n },\n });\n }\n else if (samplingContext.parentSampled !== undefined) {\n sampleRate = samplingContext.parentSampled;\n transaction.setMetadata({\n transactionSampling: { method: 'inheritance' },\n });\n }\n else {\n sampleRate = options.tracesSampleRate;\n transaction.setMetadata({\n transactionSampling: {\n method: 'client_rate',\n // cast to number in case it's a boolean\n rate: Number(sampleRate),\n },\n });\n }\n // Since this is coming from the user (or from a function provided by the user), who knows what we might get. (The\n // only valid values are booleans or numbers between 0 and 1.)\n if (!isValidSampleRate(sampleRate)) {\n IS_DEBUG_BUILD && logger.warn('[Tracing] Discarding transaction because of invalid sample rate.');\n transaction.sampled = false;\n return transaction;\n }\n // if the function returned 0 (or false), or if `tracesSampleRate` is 0, it's a sign the transaction should be dropped\n if (!sampleRate) {\n IS_DEBUG_BUILD &&\n logger.log(\"[Tracing] Discarding transaction because \" + (typeof options.tracesSampler === 'function'\n ? 'tracesSampler returned 0 or false'\n : 'a negative sampling decision was inherited or tracesSampleRate is set to 0'));\n transaction.sampled = false;\n return transaction;\n }\n // Now we roll the dice. Math.random is inclusive of 0, but not of 1, so strict < is safe here. In case sampleRate is\n // a boolean, the < comparison will cause it to be automatically cast to 1 if it's true and 0 if it's false.\n transaction.sampled = Math.random() < sampleRate;\n // if we're not going to keep it, we're done\n if (!transaction.sampled) {\n IS_DEBUG_BUILD &&\n logger.log(\"[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = \" + Number(sampleRate) + \")\");\n return transaction;\n }\n IS_DEBUG_BUILD && logger.log(\"[Tracing] starting \" + transaction.op + \" transaction - \" + transaction.name);\n return transaction;\n}\n/**\n * Checks the given sample rate to make sure it is valid type and value (a boolean, or a number between 0 and 1).\n */\nfunction isValidSampleRate(rate) {\n // we need to check NaN explicitly because it's of type 'number' and therefore wouldn't get caught by this typecheck\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (isNaN(rate) || !(typeof rate === 'number' || typeof rate === 'boolean')) {\n IS_DEBUG_BUILD &&\n logger.warn(\"[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got \" + JSON.stringify(rate) + \" of type \" + JSON.stringify(typeof rate) + \".\");\n return false;\n }\n // in case sampleRate is a boolean, it will get automatically cast to 1 if it's true and 0 if it's false\n if (rate < 0 || rate > 1) {\n IS_DEBUG_BUILD &&\n logger.warn(\"[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got \" + rate + \".\");\n return false;\n }\n return true;\n}\n/**\n * Creates a new transaction and adds a sampling decision if it doesn't yet have one.\n *\n * The Hub.startTransaction method delegates to this method to do its work, passing the Hub instance in as `this`, as if\n * it had been called on the hub directly. Exists as a separate function so that it can be injected into the class as an\n * \"extension method.\"\n *\n * @param this: The Hub starting the transaction\n * @param transactionContext: Data used to configure the transaction\n * @param CustomSamplingContext: Optional data to be provided to the `tracesSampler` function (if any)\n *\n * @returns The new transaction\n *\n * @see {@link Hub.startTransaction}\n */\nfunction _startTransaction(transactionContext, customSamplingContext) {\n var client = this.getClient();\n var options = (client && client.getOptions()) || {};\n var transaction = new Transaction(transactionContext, this);\n transaction = sample(transaction, options, __assign({ parentSampled: transactionContext.parentSampled, transactionContext: transactionContext }, customSamplingContext));\n if (transaction.sampled) {\n transaction.initSpanRecorder(options._experiments && options._experiments.maxSpans);\n }\n return transaction;\n}\n/**\n * Create new idle transaction.\n */\nexport function startIdleTransaction(hub, transactionContext, idleTimeout, onScope, customSamplingContext) {\n var client = hub.getClient();\n var options = (client && client.getOptions()) || {};\n var transaction = new IdleTransaction(transactionContext, hub, idleTimeout, onScope);\n transaction = sample(transaction, options, __assign({ parentSampled: transactionContext.parentSampled, transactionContext: transactionContext }, customSamplingContext));\n if (transaction.sampled) {\n transaction.initSpanRecorder(options._experiments && options._experiments.maxSpans);\n }\n return transaction;\n}\n/**\n * @private\n */\nexport function _addTracingExtensions() {\n var carrier = getMainCarrier();\n if (!carrier.__SENTRY__) {\n return;\n }\n carrier.__SENTRY__.extensions = carrier.__SENTRY__.extensions || {};\n if (!carrier.__SENTRY__.extensions.startTransaction) {\n carrier.__SENTRY__.extensions.startTransaction = _startTransaction;\n }\n if (!carrier.__SENTRY__.extensions.traceHeaders) {\n carrier.__SENTRY__.extensions.traceHeaders = traceHeaders;\n }\n}\n/**\n * @private\n */\nfunction _autoloadDatabaseIntegrations() {\n var carrier = getMainCarrier();\n if (!carrier.__SENTRY__) {\n return;\n }\n var packageToIntegrationMapping = {\n mongodb: function () {\n var integration = dynamicRequire(module, './integrations/node/mongo');\n return new integration.Mongo();\n },\n mongoose: function () {\n var integration = dynamicRequire(module, './integrations/node/mongo');\n return new integration.Mongo({ mongoose: true });\n },\n mysql: function () {\n var integration = dynamicRequire(module, './integrations/node/mysql');\n return new integration.Mysql();\n },\n pg: function () {\n var integration = dynamicRequire(module, './integrations/node/postgres');\n return new integration.Postgres();\n },\n };\n var mappedPackages = Object.keys(packageToIntegrationMapping)\n .filter(function (moduleName) { return !!loadModule(moduleName); })\n .map(function (pkg) {\n try {\n return packageToIntegrationMapping[pkg]();\n }\n catch (e) {\n return undefined;\n }\n })\n .filter(function (p) { return p; });\n if (mappedPackages.length > 0) {\n carrier.__SENTRY__.integrations = __spread((carrier.__SENTRY__.integrations || []), mappedPackages);\n }\n}\n/**\n * This patches the global object and injects the Tracing extensions methods\n */\nexport function addExtensionMethods() {\n _addTracingExtensions();\n // Detect and automatically load specified integrations.\n if (isNodeEnv()) {\n _autoloadDatabaseIntegrations();\n }\n // If an error happens globally, we should make sure transaction status is set to error.\n registerErrorInstrumentation();\n}\n//# sourceMappingURL=hubextensions.js.map","import { __extends, __values } from \"tslib\";\nimport { logger, timestampWithMs } from '@sentry/utils';\nimport { FINISH_REASON_TAG, IDLE_TRANSACTION_FINISH_REASONS } from './constants';\nimport { IS_DEBUG_BUILD } from './flags';\nimport { SpanRecorder } from './span';\nimport { Transaction } from './transaction';\nexport var DEFAULT_IDLE_TIMEOUT = 1000;\nexport var HEARTBEAT_INTERVAL = 5000;\n/**\n * @inheritDoc\n */\nvar IdleTransactionSpanRecorder = /** @class */ (function (_super) {\n __extends(IdleTransactionSpanRecorder, _super);\n function IdleTransactionSpanRecorder(_pushActivity, _popActivity, transactionSpanId, maxlen) {\n if (transactionSpanId === void 0) { transactionSpanId = ''; }\n var _this = _super.call(this, maxlen) || this;\n _this._pushActivity = _pushActivity;\n _this._popActivity = _popActivity;\n _this.transactionSpanId = transactionSpanId;\n return _this;\n }\n /**\n * @inheritDoc\n */\n IdleTransactionSpanRecorder.prototype.add = function (span) {\n var _this = this;\n // We should make sure we do not push and pop activities for\n // the transaction that this span recorder belongs to.\n if (span.spanId !== this.transactionSpanId) {\n // We patch span.finish() to pop an activity after setting an endTimestamp.\n span.finish = function (endTimestamp) {\n span.endTimestamp = typeof endTimestamp === 'number' ? endTimestamp : timestampWithMs();\n _this._popActivity(span.spanId);\n };\n // We should only push new activities if the span does not have an end timestamp.\n if (span.endTimestamp === undefined) {\n this._pushActivity(span.spanId);\n }\n }\n _super.prototype.add.call(this, span);\n };\n return IdleTransactionSpanRecorder;\n}(SpanRecorder));\nexport { IdleTransactionSpanRecorder };\n/**\n * An IdleTransaction is a transaction that automatically finishes. It does this by tracking child spans as activities.\n * You can have multiple IdleTransactions active, but if the `onScope` option is specified, the idle transaction will\n * put itself on the scope on creation.\n */\nvar IdleTransaction = /** @class */ (function (_super) {\n __extends(IdleTransaction, _super);\n function IdleTransaction(transactionContext, _idleHub, \n /**\n * The time to wait in ms until the idle transaction will be finished.\n * @default 1000\n */\n _idleTimeout, \n // Whether or not the transaction should put itself on the scope when it starts and pop itself off when it ends\n _onScope) {\n if (_idleTimeout === void 0) { _idleTimeout = DEFAULT_IDLE_TIMEOUT; }\n if (_onScope === void 0) { _onScope = false; }\n var _this = _super.call(this, transactionContext, _idleHub) || this;\n _this._idleHub = _idleHub;\n _this._idleTimeout = _idleTimeout;\n _this._onScope = _onScope;\n // Activities store a list of active spans\n _this.activities = {};\n // Amount of times heartbeat has counted. Will cause transaction to finish after 3 beats.\n _this._heartbeatCounter = 0;\n // We should not use heartbeat if we finished a transaction\n _this._finished = false;\n _this._beforeFinishCallbacks = [];\n if (_idleHub && _onScope) {\n // There should only be one active transaction on the scope\n clearActiveTransaction(_idleHub);\n // We set the transaction here on the scope so error events pick up the trace\n // context and attach it to the error.\n IS_DEBUG_BUILD && logger.log(\"Setting idle transaction on scope. Span ID: \" + _this.spanId);\n _idleHub.configureScope(function (scope) { return scope.setSpan(_this); });\n }\n _this._initTimeout = setTimeout(function () {\n if (!_this._finished) {\n _this.finish();\n }\n }, _this._idleTimeout);\n return _this;\n }\n /** {@inheritDoc} */\n IdleTransaction.prototype.finish = function (endTimestamp) {\n var e_1, _a;\n var _this = this;\n if (endTimestamp === void 0) { endTimestamp = timestampWithMs(); }\n this._finished = true;\n this.activities = {};\n if (this.spanRecorder) {\n IS_DEBUG_BUILD &&\n logger.log('[Tracing] finishing IdleTransaction', new Date(endTimestamp * 1000).toISOString(), this.op);\n try {\n for (var _b = __values(this._beforeFinishCallbacks), _c = _b.next(); !_c.done; _c = _b.next()) {\n var callback = _c.value;\n callback(this, endTimestamp);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n this.spanRecorder.spans = this.spanRecorder.spans.filter(function (span) {\n // If we are dealing with the transaction itself, we just return it\n if (span.spanId === _this.spanId) {\n return true;\n }\n // We cancel all pending spans with status \"cancelled\" to indicate the idle transaction was finished early\n if (!span.endTimestamp) {\n span.endTimestamp = endTimestamp;\n span.setStatus('cancelled');\n IS_DEBUG_BUILD &&\n logger.log('[Tracing] cancelling span since transaction ended early', JSON.stringify(span, undefined, 2));\n }\n var keepSpan = span.startTimestamp < endTimestamp;\n if (!keepSpan) {\n IS_DEBUG_BUILD &&\n logger.log('[Tracing] discarding Span since it happened after Transaction was finished', JSON.stringify(span, undefined, 2));\n }\n return keepSpan;\n });\n IS_DEBUG_BUILD && logger.log('[Tracing] flushing IdleTransaction');\n }\n else {\n IS_DEBUG_BUILD && logger.log('[Tracing] No active IdleTransaction');\n }\n // if `this._onScope` is `true`, the transaction put itself on the scope when it started\n if (this._onScope) {\n clearActiveTransaction(this._idleHub);\n }\n return _super.prototype.finish.call(this, endTimestamp);\n };\n /**\n * Register a callback function that gets excecuted before the transaction finishes.\n * Useful for cleanup or if you want to add any additional spans based on current context.\n *\n * This is exposed because users have no other way of running something before an idle transaction\n * finishes.\n */\n IdleTransaction.prototype.registerBeforeFinishCallback = function (callback) {\n this._beforeFinishCallbacks.push(callback);\n };\n /**\n * @inheritDoc\n */\n IdleTransaction.prototype.initSpanRecorder = function (maxlen) {\n var _this = this;\n if (!this.spanRecorder) {\n var pushActivity = function (id) {\n if (_this._finished) {\n return;\n }\n _this._pushActivity(id);\n };\n var popActivity = function (id) {\n if (_this._finished) {\n return;\n }\n _this._popActivity(id);\n };\n this.spanRecorder = new IdleTransactionSpanRecorder(pushActivity, popActivity, this.spanId, maxlen);\n // Start heartbeat so that transactions do not run forever.\n IS_DEBUG_BUILD && logger.log('Starting heartbeat');\n this._pingHeartbeat();\n }\n this.spanRecorder.add(this);\n };\n /**\n * Start tracking a specific activity.\n * @param spanId The span id that represents the activity\n */\n IdleTransaction.prototype._pushActivity = function (spanId) {\n if (this._initTimeout) {\n clearTimeout(this._initTimeout);\n this._initTimeout = undefined;\n }\n IS_DEBUG_BUILD && logger.log(\"[Tracing] pushActivity: \" + spanId);\n this.activities[spanId] = true;\n IS_DEBUG_BUILD && logger.log('[Tracing] new activities count', Object.keys(this.activities).length);\n };\n /**\n * Remove an activity from usage\n * @param spanId The span id that represents the activity\n */\n IdleTransaction.prototype._popActivity = function (spanId) {\n var _this = this;\n if (this.activities[spanId]) {\n IS_DEBUG_BUILD && logger.log(\"[Tracing] popActivity \" + spanId);\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this.activities[spanId];\n IS_DEBUG_BUILD && logger.log('[Tracing] new activities count', Object.keys(this.activities).length);\n }\n if (Object.keys(this.activities).length === 0) {\n var timeout = this._idleTimeout;\n // We need to add the timeout here to have the real endtimestamp of the transaction\n // Remember timestampWithMs is in seconds, timeout is in ms\n var end_1 = timestampWithMs() + timeout / 1000;\n setTimeout(function () {\n if (!_this._finished) {\n _this.setTag(FINISH_REASON_TAG, IDLE_TRANSACTION_FINISH_REASONS[1]);\n _this.finish(end_1);\n }\n }, timeout);\n }\n };\n /**\n * Checks when entries of this.activities are not changing for 3 beats.\n * If this occurs we finish the transaction.\n */\n IdleTransaction.prototype._beat = function () {\n // We should not be running heartbeat if the idle transaction is finished.\n if (this._finished) {\n return;\n }\n var heartbeatString = Object.keys(this.activities).join('');\n if (heartbeatString === this._prevHeartbeatString) {\n this._heartbeatCounter += 1;\n }\n else {\n this._heartbeatCounter = 1;\n }\n this._prevHeartbeatString = heartbeatString;\n if (this._heartbeatCounter >= 3) {\n IS_DEBUG_BUILD && logger.log('[Tracing] Transaction finished because of no change for 3 heart beats');\n this.setStatus('deadline_exceeded');\n this.setTag(FINISH_REASON_TAG, IDLE_TRANSACTION_FINISH_REASONS[0]);\n this.finish();\n }\n else {\n this._pingHeartbeat();\n }\n };\n /**\n * Pings the heartbeat\n */\n IdleTransaction.prototype._pingHeartbeat = function () {\n var _this = this;\n IS_DEBUG_BUILD && logger.log(\"pinging Heartbeat -> current counter: \" + this._heartbeatCounter);\n setTimeout(function () {\n _this._beat();\n }, HEARTBEAT_INTERVAL);\n };\n return IdleTransaction;\n}(Transaction));\nexport { IdleTransaction };\n/**\n * Reset transaction on scope to `undefined`\n */\nfunction clearActiveTransaction(hub) {\n if (hub) {\n var scope = hub.getScope();\n if (scope) {\n var transaction = scope.getTransaction();\n if (transaction) {\n scope.setSpan(undefined);\n }\n }\n }\n}\n//# sourceMappingURL=idletransaction.js.map","import { __assign } from \"tslib\";\nimport { dropUndefinedKeys, timestampWithMs, uuid4 } from '@sentry/utils';\n/**\n * Keeps track of finished spans for a given transaction\n * @internal\n * @hideconstructor\n * @hidden\n */\nvar SpanRecorder = /** @class */ (function () {\n function SpanRecorder(maxlen) {\n if (maxlen === void 0) { maxlen = 1000; }\n this.spans = [];\n this._maxlen = maxlen;\n }\n /**\n * This is just so that we don't run out of memory while recording a lot\n * of spans. At some point we just stop and flush out the start of the\n * trace tree (i.e.the first n spans with the smallest\n * start_timestamp).\n */\n SpanRecorder.prototype.add = function (span) {\n if (this.spans.length > this._maxlen) {\n span.spanRecorder = undefined;\n }\n else {\n this.spans.push(span);\n }\n };\n return SpanRecorder;\n}());\nexport { SpanRecorder };\n/**\n * Span contains all data about a span\n */\nvar Span = /** @class */ (function () {\n /**\n * You should never call the constructor manually, always use `Sentry.startTransaction()`\n * or call `startChild()` on an existing span.\n * @internal\n * @hideconstructor\n * @hidden\n */\n function Span(spanContext) {\n /**\n * @inheritDoc\n */\n this.traceId = uuid4();\n /**\n * @inheritDoc\n */\n this.spanId = uuid4().substring(16);\n /**\n * Timestamp in seconds when the span was created.\n */\n this.startTimestamp = timestampWithMs();\n /**\n * @inheritDoc\n */\n this.tags = {};\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.data = {};\n if (!spanContext) {\n return this;\n }\n if (spanContext.traceId) {\n this.traceId = spanContext.traceId;\n }\n if (spanContext.spanId) {\n this.spanId = spanContext.spanId;\n }\n if (spanContext.parentSpanId) {\n this.parentSpanId = spanContext.parentSpanId;\n }\n // We want to include booleans as well here\n if ('sampled' in spanContext) {\n this.sampled = spanContext.sampled;\n }\n if (spanContext.op) {\n this.op = spanContext.op;\n }\n if (spanContext.description) {\n this.description = spanContext.description;\n }\n if (spanContext.data) {\n this.data = spanContext.data;\n }\n if (spanContext.tags) {\n this.tags = spanContext.tags;\n }\n if (spanContext.status) {\n this.status = spanContext.status;\n }\n if (spanContext.startTimestamp) {\n this.startTimestamp = spanContext.startTimestamp;\n }\n if (spanContext.endTimestamp) {\n this.endTimestamp = spanContext.endTimestamp;\n }\n }\n /**\n * @inheritDoc\n * @deprecated\n */\n Span.prototype.child = function (spanContext) {\n return this.startChild(spanContext);\n };\n /**\n * @inheritDoc\n */\n Span.prototype.startChild = function (spanContext) {\n var childSpan = new Span(__assign(__assign({}, spanContext), { parentSpanId: this.spanId, sampled: this.sampled, traceId: this.traceId }));\n childSpan.spanRecorder = this.spanRecorder;\n if (childSpan.spanRecorder) {\n childSpan.spanRecorder.add(childSpan);\n }\n childSpan.transaction = this.transaction;\n return childSpan;\n };\n /**\n * @inheritDoc\n */\n Span.prototype.setTag = function (key, value) {\n var _a;\n this.tags = __assign(__assign({}, this.tags), (_a = {}, _a[key] = value, _a));\n return this;\n };\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n Span.prototype.setData = function (key, value) {\n var _a;\n this.data = __assign(__assign({}, this.data), (_a = {}, _a[key] = value, _a));\n return this;\n };\n /**\n * @inheritDoc\n */\n Span.prototype.setStatus = function (value) {\n this.status = value;\n return this;\n };\n /**\n * @inheritDoc\n */\n Span.prototype.setHttpStatus = function (httpStatus) {\n this.setTag('http.status_code', String(httpStatus));\n var spanStatus = spanStatusfromHttpCode(httpStatus);\n if (spanStatus !== 'unknown_error') {\n this.setStatus(spanStatus);\n }\n return this;\n };\n /**\n * @inheritDoc\n */\n Span.prototype.isSuccess = function () {\n return this.status === 'ok';\n };\n /**\n * @inheritDoc\n */\n Span.prototype.finish = function (endTimestamp) {\n this.endTimestamp = typeof endTimestamp === 'number' ? endTimestamp : timestampWithMs();\n };\n /**\n * @inheritDoc\n */\n Span.prototype.toTraceparent = function () {\n var sampledString = '';\n if (this.sampled !== undefined) {\n sampledString = this.sampled ? '-1' : '-0';\n }\n return this.traceId + \"-\" + this.spanId + sampledString;\n };\n /**\n * @inheritDoc\n */\n Span.prototype.toContext = function () {\n return dropUndefinedKeys({\n data: this.data,\n description: this.description,\n endTimestamp: this.endTimestamp,\n op: this.op,\n parentSpanId: this.parentSpanId,\n sampled: this.sampled,\n spanId: this.spanId,\n startTimestamp: this.startTimestamp,\n status: this.status,\n tags: this.tags,\n traceId: this.traceId,\n });\n };\n /**\n * @inheritDoc\n */\n Span.prototype.updateWithContext = function (spanContext) {\n var _a, _b, _c, _d, _e;\n this.data = (_a = spanContext.data, (_a !== null && _a !== void 0 ? _a : {}));\n this.description = spanContext.description;\n this.endTimestamp = spanContext.endTimestamp;\n this.op = spanContext.op;\n this.parentSpanId = spanContext.parentSpanId;\n this.sampled = spanContext.sampled;\n this.spanId = (_b = spanContext.spanId, (_b !== null && _b !== void 0 ? _b : this.spanId));\n this.startTimestamp = (_c = spanContext.startTimestamp, (_c !== null && _c !== void 0 ? _c : this.startTimestamp));\n this.status = spanContext.status;\n this.tags = (_d = spanContext.tags, (_d !== null && _d !== void 0 ? _d : {}));\n this.traceId = (_e = spanContext.traceId, (_e !== null && _e !== void 0 ? _e : this.traceId));\n return this;\n };\n /**\n * @inheritDoc\n */\n Span.prototype.getTraceContext = function () {\n return dropUndefinedKeys({\n data: Object.keys(this.data).length > 0 ? this.data : undefined,\n description: this.description,\n op: this.op,\n parent_span_id: this.parentSpanId,\n span_id: this.spanId,\n status: this.status,\n tags: Object.keys(this.tags).length > 0 ? this.tags : undefined,\n trace_id: this.traceId,\n });\n };\n /**\n * @inheritDoc\n */\n Span.prototype.toJSON = function () {\n return dropUndefinedKeys({\n data: Object.keys(this.data).length > 0 ? this.data : undefined,\n description: this.description,\n op: this.op,\n parent_span_id: this.parentSpanId,\n span_id: this.spanId,\n start_timestamp: this.startTimestamp,\n status: this.status,\n tags: Object.keys(this.tags).length > 0 ? this.tags : undefined,\n timestamp: this.endTimestamp,\n trace_id: this.traceId,\n });\n };\n return Span;\n}());\nexport { Span };\n/**\n * Converts a HTTP status code into a {@link SpanStatusType}.\n *\n * @param httpStatus The HTTP response status code.\n * @returns The span status or unknown_error.\n */\nexport function spanStatusfromHttpCode(httpStatus) {\n if (httpStatus < 400 && httpStatus >= 100) {\n return 'ok';\n }\n if (httpStatus >= 400 && httpStatus < 500) {\n switch (httpStatus) {\n case 401:\n return 'unauthenticated';\n case 403:\n return 'permission_denied';\n case 404:\n return 'not_found';\n case 409:\n return 'already_exists';\n case 413:\n return 'failed_precondition';\n case 429:\n return 'resource_exhausted';\n default:\n return 'invalid_argument';\n }\n }\n if (httpStatus >= 500 && httpStatus < 600) {\n switch (httpStatus) {\n case 501:\n return 'unimplemented';\n case 503:\n return 'unavailable';\n case 504:\n return 'deadline_exceeded';\n default:\n return 'internal_error';\n }\n }\n return 'unknown_error';\n}\n//# sourceMappingURL=span.js.map","import { __assign, __extends } from \"tslib\";\nimport { getCurrentHub, Hub } from '@sentry/hub';\nimport { dropUndefinedKeys, isInstanceOf, logger } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from './flags';\nimport { Span as SpanClass, SpanRecorder } from './span';\n/** JSDoc */\nvar Transaction = /** @class */ (function (_super) {\n __extends(Transaction, _super);\n /**\n * This constructor should never be called manually. Those instrumenting tracing should use\n * `Sentry.startTransaction()`, and internal methods should use `hub.startTransaction()`.\n * @internal\n * @hideconstructor\n * @hidden\n */\n function Transaction(transactionContext, hub) {\n var _this = _super.call(this, transactionContext) || this;\n _this._measurements = {};\n /**\n * The reference to the current hub.\n */\n _this._hub = getCurrentHub();\n if (isInstanceOf(hub, Hub)) {\n _this._hub = hub;\n }\n _this.name = transactionContext.name || '';\n _this.metadata = transactionContext.metadata || {};\n _this._trimEnd = transactionContext.trimEnd;\n // this is because transactions are also spans, and spans have a transaction pointer\n _this.transaction = _this;\n return _this;\n }\n /**\n * JSDoc\n */\n Transaction.prototype.setName = function (name) {\n this.name = name;\n };\n /**\n * Attaches SpanRecorder to the span itself\n * @param maxlen maximum number of spans that can be recorded\n */\n Transaction.prototype.initSpanRecorder = function (maxlen) {\n if (maxlen === void 0) { maxlen = 1000; }\n if (!this.spanRecorder) {\n this.spanRecorder = new SpanRecorder(maxlen);\n }\n this.spanRecorder.add(this);\n };\n /**\n * Set observed measurements for this transaction.\n * @hidden\n */\n Transaction.prototype.setMeasurements = function (measurements) {\n this._measurements = __assign({}, measurements);\n };\n /**\n * Set metadata for this transaction.\n * @hidden\n */\n Transaction.prototype.setMetadata = function (newMetadata) {\n this.metadata = __assign(__assign({}, this.metadata), newMetadata);\n };\n /**\n * @inheritDoc\n */\n Transaction.prototype.finish = function (endTimestamp) {\n var _this = this;\n // This transaction is already finished, so we should not flush it again.\n if (this.endTimestamp !== undefined) {\n return undefined;\n }\n if (!this.name) {\n IS_DEBUG_BUILD && logger.warn('Transaction has no name, falling back to `<unlabeled transaction>`.');\n this.name = '<unlabeled transaction>';\n }\n // just sets the end timestamp\n _super.prototype.finish.call(this, endTimestamp);\n if (this.sampled !== true) {\n // At this point if `sampled !== true` we want to discard the transaction.\n IS_DEBUG_BUILD && logger.log('[Tracing] Discarding transaction because its trace was not chosen to be sampled.');\n var client = this._hub.getClient();\n var transport = client && client.getTransport && client.getTransport();\n if (transport && transport.recordLostEvent) {\n transport.recordLostEvent('sample_rate', 'transaction');\n }\n return undefined;\n }\n var finishedSpans = this.spanRecorder ? this.spanRecorder.spans.filter(function (s) { return s !== _this && s.endTimestamp; }) : [];\n if (this._trimEnd && finishedSpans.length > 0) {\n this.endTimestamp = finishedSpans.reduce(function (prev, current) {\n if (prev.endTimestamp && current.endTimestamp) {\n return prev.endTimestamp > current.endTimestamp ? prev : current;\n }\n return prev;\n }).endTimestamp;\n }\n var transaction = {\n contexts: {\n trace: this.getTraceContext(),\n },\n spans: finishedSpans,\n start_timestamp: this.startTimestamp,\n tags: this.tags,\n timestamp: this.endTimestamp,\n transaction: this.name,\n type: 'transaction',\n sdkProcessingMetadata: this.metadata,\n };\n var hasMeasurements = Object.keys(this._measurements).length > 0;\n if (hasMeasurements) {\n IS_DEBUG_BUILD &&\n logger.log('[Measurements] Adding measurements to transaction', JSON.stringify(this._measurements, undefined, 2));\n transaction.measurements = this._measurements;\n }\n IS_DEBUG_BUILD && logger.log(\"[Tracing] Finishing \" + this.op + \" transaction: \" + this.name + \".\");\n return this._hub.captureEvent(transaction);\n };\n /**\n * @inheritDoc\n */\n Transaction.prototype.toContext = function () {\n var spanContext = _super.prototype.toContext.call(this);\n return dropUndefinedKeys(__assign(__assign({}, spanContext), { name: this.name, trimEnd: this._trimEnd }));\n };\n /**\n * @inheritDoc\n */\n Transaction.prototype.updateWithContext = function (transactionContext) {\n var _a;\n _super.prototype.updateWithContext.call(this, transactionContext);\n this.name = (_a = transactionContext.name, (_a !== null && _a !== void 0 ? _a : ''));\n this._trimEnd = transactionContext.trimEnd;\n return this;\n };\n return Transaction;\n}(SpanClass));\nexport { Transaction };\n//# sourceMappingURL=transaction.js.map","import { getCurrentHub } from '@sentry/hub';\n/**\n * The `extractTraceparentData` function and `TRACEPARENT_REGEXP` constant used\n * to be declared in this file. It was later moved into `@sentry/utils` as part of a\n * move to remove `@sentry/tracing` dependencies from `@sentry/node` (`extractTraceparentData`\n * is the only tracing function used by `@sentry/node`).\n *\n * These exports are kept here for backwards compatability's sake.\n *\n * TODO(v7): Reorganize these exports\n *\n * See https://github.com/getsentry/sentry-javascript/issues/4642 for more details.\n */\nexport { TRACEPARENT_REGEXP, extractTraceparentData } from '@sentry/utils';\n/**\n * Determines if tracing is currently enabled.\n *\n * Tracing is enabled when at least one of `tracesSampleRate` and `tracesSampler` is defined in the SDK config.\n */\nexport function hasTracingEnabled(maybeOptions) {\n var client = getCurrentHub().getClient();\n var options = maybeOptions || (client && client.getOptions());\n return !!options && ('tracesSampleRate' in options || 'tracesSampler' in options);\n}\n/** Grabs active transaction off scope, if any */\nexport function getActiveTransaction(maybeHub) {\n var hub = maybeHub || getCurrentHub();\n var scope = hub.getScope();\n return scope && scope.getTransaction();\n}\n/**\n * Converts from milliseconds to seconds\n * @param time time in ms\n */\nexport function msToSec(time) {\n return time / 1000;\n}\n/**\n * Converts from seconds to milliseconds\n * @param time time in seconds\n */\nexport function secToMs(time) {\n return time * 1000;\n}\n// so it can be used in manual instrumentation without necessitating a hard dependency on @sentry/utils\nexport { stripUrlQueryAndFragment } from '@sentry/utils';\n//# sourceMappingURL=utils.js.map","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","/**\n * TODO(v7): Remove this enum and replace with SeverityLevel\n */\nexport var Severity;\n(function (Severity) {\n /** JSDoc */\n Severity[\"Fatal\"] = \"fatal\";\n /** JSDoc */\n Severity[\"Error\"] = \"error\";\n /** JSDoc */\n Severity[\"Warning\"] = \"warning\";\n /** JSDoc */\n Severity[\"Log\"] = \"log\";\n /** JSDoc */\n Severity[\"Info\"] = \"info\";\n /** JSDoc */\n Severity[\"Debug\"] = \"debug\";\n /** JSDoc */\n Severity[\"Critical\"] = \"critical\";\n})(Severity || (Severity = {}));\n// TODO: in v7, these can disappear, because they now also exist in `@sentry/utils`. (Having them there rather than here\n// is nice because then it enforces the idea that only types are exported from `@sentry/types`.)\nexport var SeverityLevels = ['fatal', 'error', 'warning', 'log', 'info', 'debug', 'critical'];\n//# sourceMappingURL=severity.js.map","/**\n * Consumes the promise and logs the error when it rejects.\n * @param promise A promise to forget.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function forget(promise) {\n void promise.then(null, function (e) {\n // TODO: Use a better logging mechanism\n // eslint-disable-next-line no-console\n console.error(e);\n });\n}\n//# sourceMappingURL=async.js.map","import { getGlobalObject } from './global';\nimport { isString } from './is';\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nexport function htmlTreeAsString(elem, keyAttrs) {\n // try/catch both:\n // - accessing event.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // - can throw an exception in some circumstances.\n try {\n var currentElem = elem;\n var MAX_TRAVERSE_HEIGHT = 5;\n var MAX_OUTPUT_LEN = 80;\n var out = [];\n var height = 0;\n var len = 0;\n var separator = ' > ';\n var sepLength = separator.length;\n var nextStr = void 0;\n // eslint-disable-next-line no-plusplus\n while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = _htmlElementAsString(currentElem, keyAttrs);\n // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds MAX_OUTPUT_LEN\n // (ignore this limit if we are on the first iteration)\n if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)) {\n break;\n }\n out.push(nextStr);\n len += nextStr.length;\n currentElem = currentElem.parentNode;\n }\n return out.reverse().join(separator);\n }\n catch (_oO) {\n return '<unknown>';\n }\n}\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction _htmlElementAsString(el, keyAttrs) {\n var elem = el;\n var out = [];\n var className;\n var classes;\n var key;\n var attr;\n var i;\n if (!elem || !elem.tagName) {\n return '';\n }\n out.push(elem.tagName.toLowerCase());\n // Pairs of attribute keys defined in `serializeAttribute` and their values on element.\n var keyAttrPairs = keyAttrs && keyAttrs.length\n ? keyAttrs.filter(function (keyAttr) { return elem.getAttribute(keyAttr); }).map(function (keyAttr) { return [keyAttr, elem.getAttribute(keyAttr)]; })\n : null;\n if (keyAttrPairs && keyAttrPairs.length) {\n keyAttrPairs.forEach(function (keyAttrPair) {\n out.push(\"[\" + keyAttrPair[0] + \"=\\\"\" + keyAttrPair[1] + \"\\\"]\");\n });\n }\n else {\n if (elem.id) {\n out.push(\"#\" + elem.id);\n }\n // eslint-disable-next-line prefer-const\n className = elem.className;\n if (className && isString(className)) {\n classes = className.split(/\\s+/);\n for (i = 0; i < classes.length; i++) {\n out.push(\".\" + classes[i]);\n }\n }\n }\n var allowedAttrs = ['type', 'name', 'title', 'alt'];\n for (i = 0; i < allowedAttrs.length; i++) {\n key = allowedAttrs[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.push(\"[\" + key + \"=\\\"\" + attr + \"\\\"]\");\n }\n }\n return out.join('');\n}\n/**\n * A safe form of location.href\n */\nexport function getLocationHref() {\n var global = getGlobalObject();\n try {\n return global.document.location.href;\n }\n catch (oO) {\n return '';\n }\n}\n//# sourceMappingURL=browser.js.map","import { createEnvelope } from './envelope';\nimport { dateTimestampInSeconds } from './time';\n/**\n * Creates client report envelope\n * @param discarded_events An array of discard events\n * @param dsn A DSN that can be set on the header. Optional.\n */\nexport function createClientReportEnvelope(discarded_events, dsn, timestamp) {\n var clientReportItem = [\n { type: 'client_report' },\n {\n timestamp: timestamp || dateTimestampInSeconds(),\n discarded_events: discarded_events,\n },\n ];\n return createEnvelope(dsn ? { dsn: dsn } : {}, [clientReportItem]);\n}\n//# sourceMappingURL=clientreport.js.map","import { __read } from \"tslib\";\nimport { SentryError } from './error';\nimport { IS_DEBUG_BUILD } from './flags';\n/** Regular expression used to parse a Dsn. */\nvar DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+))?@)([\\w.-]+)(?::(\\d+))?\\/(.+)/;\nfunction isValidProtocol(protocol) {\n return protocol === 'http' || protocol === 'https';\n}\n/**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\nexport function dsnToString(dsn, withPassword) {\n if (withPassword === void 0) { withPassword = false; }\n var host = dsn.host, path = dsn.path, pass = dsn.pass, port = dsn.port, projectId = dsn.projectId, protocol = dsn.protocol, publicKey = dsn.publicKey;\n return (protocol + \"://\" + publicKey + (withPassword && pass ? \":\" + pass : '') +\n (\"@\" + host + (port ? \":\" + port : '') + \"/\" + (path ? path + \"/\" : path) + projectId));\n}\nfunction dsnFromString(str) {\n var match = DSN_REGEX.exec(str);\n if (!match) {\n throw new SentryError(\"Invalid Sentry Dsn: \" + str);\n }\n var _a = __read(match.slice(1), 6), protocol = _a[0], publicKey = _a[1], _b = _a[2], pass = _b === void 0 ? '' : _b, host = _a[3], _c = _a[4], port = _c === void 0 ? '' : _c, lastPath = _a[5];\n var path = '';\n var projectId = lastPath;\n var split = projectId.split('/');\n if (split.length > 1) {\n path = split.slice(0, -1).join('/');\n projectId = split.pop();\n }\n if (projectId) {\n var projectMatch = projectId.match(/^\\d+/);\n if (projectMatch) {\n projectId = projectMatch[0];\n }\n }\n return dsnFromComponents({ host: host, pass: pass, path: path, projectId: projectId, port: port, protocol: protocol, publicKey: publicKey });\n}\nfunction dsnFromComponents(components) {\n // TODO this is for backwards compatibility, and can be removed in a future version\n if ('user' in components && !('publicKey' in components)) {\n components.publicKey = components.user;\n }\n return {\n user: components.publicKey || '',\n protocol: components.protocol,\n publicKey: components.publicKey || '',\n pass: components.pass || '',\n host: components.host,\n port: components.port || '',\n path: components.path || '',\n projectId: components.projectId,\n };\n}\nfunction validateDsn(dsn) {\n if (!IS_DEBUG_BUILD) {\n return;\n }\n var port = dsn.port, projectId = dsn.projectId, protocol = dsn.protocol;\n var requiredComponents = ['protocol', 'publicKey', 'host', 'projectId'];\n requiredComponents.forEach(function (component) {\n if (!dsn[component]) {\n throw new SentryError(\"Invalid Sentry Dsn: \" + component + \" missing\");\n }\n });\n if (!projectId.match(/^\\d+$/)) {\n throw new SentryError(\"Invalid Sentry Dsn: Invalid projectId \" + projectId);\n }\n if (!isValidProtocol(protocol)) {\n throw new SentryError(\"Invalid Sentry Dsn: Invalid protocol \" + protocol);\n }\n if (port && isNaN(parseInt(port, 10))) {\n throw new SentryError(\"Invalid Sentry Dsn: Invalid port \" + port);\n }\n return true;\n}\n/** The Sentry Dsn, identifying a Sentry instance and project. */\nexport function makeDsn(from) {\n var components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);\n validateDsn(components);\n return components;\n}\n//# sourceMappingURL=dsn.js.map","export var SeverityLevels = ['fatal', 'error', 'warning', 'log', 'info', 'debug', 'critical'];\n//# sourceMappingURL=enums.js.map","/*\n * This module exists for optimizations in the build process through rollup and terser. We define some global\n * constants, which can be overridden during build. By guarding certain pieces of code with functions that return these\n * constants, we can control whether or not they appear in the final bundle. (Any code guarded by a false condition will\n * never run, and will hence be dropped during treeshaking.) The two primary uses for this are stripping out calls to\n * `logger` and preventing node-related code from appearing in browser bundles.\n *\n * Attention:\n * This file should not be used to define constants/flags that are intended to be used for tree-shaking conducted by\n * users. These fags should live in their respective packages, as we identified user tooling (specifically webpack)\n * having issues tree-shaking these constants across package boundaries.\n * An example for this is the __SENTRY_DEBUG__ constant. It is declared in each package individually because we want\n * users to be able to shake away expressions that it guards.\n */\n/**\n * Figures out if we're building a browser bundle.\n *\n * @returns true if this is a browser bundle build.\n */\nexport function isBrowserBundle() {\n return typeof __SENTRY_BROWSER_BUNDLE__ !== 'undefined' && !!__SENTRY_BROWSER_BUNDLE__;\n}\n//# sourceMappingURL=env.js.map","import { __read, __spread } from \"tslib\";\nimport { isPrimitive } from './is';\n/**\n * Creates an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nexport function createEnvelope(headers, items) {\n if (items === void 0) { items = []; }\n return [headers, items];\n}\n/**\n * Add an item to an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nexport function addItemToEnvelope(envelope, newItem) {\n var _a = __read(envelope, 2), headers = _a[0], items = _a[1];\n return [headers, __spread(items, [newItem])];\n}\n/**\n * Get the type of the envelope. Grabs the type from the first envelope item.\n */\nexport function getEnvelopeType(envelope) {\n var _a = __read(envelope, 2), _b = __read(_a[1], 1), _c = __read(_b[0], 1), firstItemHeader = _c[0];\n return firstItemHeader.type;\n}\n/**\n * Serializes an envelope into a string.\n */\nexport function serializeEnvelope(envelope) {\n var _a = __read(envelope, 2), headers = _a[0], items = _a[1];\n var serializedHeaders = JSON.stringify(headers);\n // Have to cast items to any here since Envelope is a union type\n // Fixed in Typescript 4.2\n // TODO: Remove any[] cast when we upgrade to TS 4.2\n // https://github.com/microsoft/TypeScript/issues/36390\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return items.reduce(function (acc, item) {\n var _a = __read(item, 2), itemHeaders = _a[0], payload = _a[1];\n // We do not serialize payloads that are primitives\n var serializedPayload = isPrimitive(payload) ? String(payload) : JSON.stringify(payload);\n return acc + \"\\n\" + JSON.stringify(itemHeaders) + \"\\n\" + serializedPayload;\n }, serializedHeaders);\n}\n//# sourceMappingURL=envelope.js.map","import { __extends } from \"tslib\";\nimport { setPrototypeOf } from './polyfill';\n/** An error emitted by Sentry SDKs and related utilities. */\nvar SentryError = /** @class */ (function (_super) {\n __extends(SentryError, _super);\n function SentryError(message) {\n var _newTarget = this.constructor;\n var _this = _super.call(this, message) || this;\n _this.message = message;\n _this.name = _newTarget.prototype.constructor.name;\n setPrototypeOf(_this, _newTarget.prototype);\n return _this;\n }\n return SentryError;\n}(Error));\nexport { SentryError };\n//# sourceMappingURL=error.js.map","/*\n * This file defines flags and constants that can be modified during compile time in order to facilitate tree shaking\n * for users.\n *\n * Debug flags need to be declared in each package individually and must not be imported across package boundaries,\n * because some build tools have trouble tree-shaking imported guards.\n *\n * As a convention, we define debug flags in a `flags.ts` file in the root of a package's `src` folder.\n *\n * Debug flag files will contain \"magic strings\" like `__SENTRY_DEBUG__` that may get replaced with actual values during\n * our, or the user's build process. Take care when introducing new flags - they must not throw if they are not\n * replaced.\n */\n/** Flag that is true for debug builds, false otherwise. */\nexport var IS_DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' ? true : __SENTRY_DEBUG__;\n//# sourceMappingURL=flags.js.map","/**\n * NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,\n * you must either a) use `console.log` rather than the logger, or b) put your function elsewhere.\n */\nimport { isNodeEnv } from './node';\nvar fallbackGlobalObject = {};\n/**\n * Safely get global scope object\n *\n * @returns Global scope object\n */\nexport function getGlobalObject() {\n return (isNodeEnv()\n ? global\n : typeof window !== 'undefined' // eslint-disable-line no-restricted-globals\n ? window // eslint-disable-line no-restricted-globals\n : typeof self !== 'undefined'\n ? self\n : fallbackGlobalObject);\n}\n/**\n * Returns a global singleton contained in the global `__SENTRY__` object.\n *\n * If the singleton doesn't already exist in `__SENTRY__`, it will be created using the given factory\n * function and added to the `__SENTRY__` object.\n *\n * @param name name of the global singleton on __SENTRY__\n * @param creator creator Factory function to create the singleton if it doesn't already exist on `__SENTRY__`\n * @param obj (Optional) The global object on which to look for `__SENTRY__`, if not `getGlobalObject`'s return value\n * @returns the singleton\n */\nexport function getGlobalSingleton(name, creator, obj) {\n var global = (obj || getGlobalObject());\n var __SENTRY__ = (global.__SENTRY__ = global.__SENTRY__ || {});\n var singleton = __SENTRY__[name] || (__SENTRY__[name] = creator());\n return singleton;\n}\n//# sourceMappingURL=global.js.map","import { __assign, __values } from \"tslib\";\nimport { IS_DEBUG_BUILD } from './flags';\nimport { getGlobalObject } from './global';\nimport { isInstanceOf, isString } from './is';\nimport { CONSOLE_LEVELS, logger } from './logger';\nimport { fill } from './object';\nimport { getFunctionName } from './stacktrace';\nimport { supportsHistory, supportsNativeFetch } from './supports';\nvar global = getGlobalObject();\n/**\n * Instrument native APIs to call handlers that can be used to create breadcrumbs, APM spans etc.\n * - Console API\n * - Fetch API\n * - XHR API\n * - History API\n * - DOM API (click/typing)\n * - Error API\n * - UnhandledRejection API\n */\nvar handlers = {};\nvar instrumented = {};\n/** Instruments given API */\nfunction instrument(type) {\n if (instrumented[type]) {\n return;\n }\n instrumented[type] = true;\n switch (type) {\n case 'console':\n instrumentConsole();\n break;\n case 'dom':\n instrumentDOM();\n break;\n case 'xhr':\n instrumentXHR();\n break;\n case 'fetch':\n instrumentFetch();\n break;\n case 'history':\n instrumentHistory();\n break;\n case 'error':\n instrumentError();\n break;\n case 'unhandledrejection':\n instrumentUnhandledRejection();\n break;\n default:\n IS_DEBUG_BUILD && logger.warn('unknown instrumentation type:', type);\n return;\n }\n}\n/**\n * Add handler that will be called when given type of instrumentation triggers.\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addInstrumentationHandler(type, callback) {\n handlers[type] = handlers[type] || [];\n handlers[type].push(callback);\n instrument(type);\n}\n/** JSDoc */\nfunction triggerHandlers(type, data) {\n var e_1, _a;\n if (!type || !handlers[type]) {\n return;\n }\n try {\n for (var _b = __values(handlers[type] || []), _c = _b.next(); !_c.done; _c = _b.next()) {\n var handler = _c.value;\n try {\n handler(data);\n }\n catch (e) {\n IS_DEBUG_BUILD &&\n logger.error(\"Error while triggering instrumentation handler.\\nType: \" + type + \"\\nName: \" + getFunctionName(handler) + \"\\nError:\", e);\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n}\n/** JSDoc */\nfunction instrumentConsole() {\n if (!('console' in global)) {\n return;\n }\n CONSOLE_LEVELS.forEach(function (level) {\n if (!(level in global.console)) {\n return;\n }\n fill(global.console, level, function (originalConsoleMethod) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n triggerHandlers('console', { args: args, level: level });\n // this fails for some browsers. :(\n if (originalConsoleMethod) {\n originalConsoleMethod.apply(global.console, args);\n }\n };\n });\n });\n}\n/** JSDoc */\nfunction instrumentFetch() {\n if (!supportsNativeFetch()) {\n return;\n }\n fill(global, 'fetch', function (originalFetch) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var handlerData = {\n args: args,\n fetchData: {\n method: getFetchMethod(args),\n url: getFetchUrl(args),\n },\n startTimestamp: Date.now(),\n };\n triggerHandlers('fetch', __assign({}, handlerData));\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return originalFetch.apply(global, args).then(function (response) {\n triggerHandlers('fetch', __assign(__assign({}, handlerData), { endTimestamp: Date.now(), response: response }));\n return response;\n }, function (error) {\n triggerHandlers('fetch', __assign(__assign({}, handlerData), { endTimestamp: Date.now(), error: error }));\n // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n // it means the sentry.javascript SDK caught an error invoking your application code.\n // This is expected behavior and NOT indicative of a bug with sentry.javascript.\n throw error;\n });\n };\n });\n}\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/** Extract `method` from fetch call arguments */\nfunction getFetchMethod(fetchArgs) {\n if (fetchArgs === void 0) { fetchArgs = []; }\n if ('Request' in global && isInstanceOf(fetchArgs[0], Request) && fetchArgs[0].method) {\n return String(fetchArgs[0].method).toUpperCase();\n }\n if (fetchArgs[1] && fetchArgs[1].method) {\n return String(fetchArgs[1].method).toUpperCase();\n }\n return 'GET';\n}\n/** Extract `url` from fetch call arguments */\nfunction getFetchUrl(fetchArgs) {\n if (fetchArgs === void 0) { fetchArgs = []; }\n if (typeof fetchArgs[0] === 'string') {\n return fetchArgs[0];\n }\n if ('Request' in global && isInstanceOf(fetchArgs[0], Request)) {\n return fetchArgs[0].url;\n }\n return String(fetchArgs[0]);\n}\n/* eslint-enable @typescript-eslint/no-unsafe-member-access */\n/** JSDoc */\nfunction instrumentXHR() {\n if (!('XMLHttpRequest' in global)) {\n return;\n }\n var xhrproto = XMLHttpRequest.prototype;\n fill(xhrproto, 'open', function (originalOpen) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n var xhr = this;\n var url = args[1];\n var xhrInfo = (xhr.__sentry_xhr__ = {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n method: isString(args[0]) ? args[0].toUpperCase() : args[0],\n url: args[1],\n });\n // if Sentry key appears in URL, don't capture it as a request\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (isString(url) && xhrInfo.method === 'POST' && url.match(/sentry_key/)) {\n xhr.__sentry_own_request__ = true;\n }\n var onreadystatechangeHandler = function () {\n if (xhr.readyState === 4) {\n try {\n // touching statusCode in some platforms throws\n // an exception\n xhrInfo.status_code = xhr.status;\n }\n catch (e) {\n /* do nothing */\n }\n triggerHandlers('xhr', {\n args: args,\n endTimestamp: Date.now(),\n startTimestamp: Date.now(),\n xhr: xhr,\n });\n }\n };\n if ('onreadystatechange' in xhr && typeof xhr.onreadystatechange === 'function') {\n fill(xhr, 'onreadystatechange', function (original) {\n return function () {\n var readyStateArgs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n readyStateArgs[_i] = arguments[_i];\n }\n onreadystatechangeHandler();\n return original.apply(xhr, readyStateArgs);\n };\n });\n }\n else {\n xhr.addEventListener('readystatechange', onreadystatechangeHandler);\n }\n return originalOpen.apply(xhr, args);\n };\n });\n fill(xhrproto, 'send', function (originalSend) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (this.__sentry_xhr__ && args[0] !== undefined) {\n this.__sentry_xhr__.body = args[0];\n }\n triggerHandlers('xhr', {\n args: args,\n startTimestamp: Date.now(),\n xhr: this,\n });\n return originalSend.apply(this, args);\n };\n });\n}\nvar lastHref;\n/** JSDoc */\nfunction instrumentHistory() {\n if (!supportsHistory()) {\n return;\n }\n var oldOnPopState = global.onpopstate;\n global.onpopstate = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var to = global.location.href;\n // keep track of the current URL state, as we always receive only the updated state\n var from = lastHref;\n lastHref = to;\n triggerHandlers('history', {\n from: from,\n to: to,\n });\n if (oldOnPopState) {\n // Apparently this can throw in Firefox when incorrectly implemented plugin is installed.\n // https://github.com/getsentry/sentry-javascript/issues/3344\n // https://github.com/bugsnag/bugsnag-js/issues/469\n try {\n return oldOnPopState.apply(this, args);\n }\n catch (_oO) {\n // no-empty\n }\n }\n };\n /** @hidden */\n function historyReplacementFunction(originalHistoryFunction) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var url = args.length > 2 ? args[2] : undefined;\n if (url) {\n // coerce to string (this is what pushState does)\n var from = lastHref;\n var to = String(url);\n // keep track of the current URL state, as we always receive only the updated state\n lastHref = to;\n triggerHandlers('history', {\n from: from,\n to: to,\n });\n }\n return originalHistoryFunction.apply(this, args);\n };\n }\n fill(global.history, 'pushState', historyReplacementFunction);\n fill(global.history, 'replaceState', historyReplacementFunction);\n}\nvar debounceDuration = 1000;\nvar debounceTimerID;\nvar lastCapturedEvent;\n/**\n * Decide whether the current event should finish the debounce of previously captured one.\n * @param previous previously captured event\n * @param current event to be captured\n */\nfunction shouldShortcircuitPreviousDebounce(previous, current) {\n // If there was no previous event, it should always be swapped for the new one.\n if (!previous) {\n return true;\n }\n // If both events have different type, then user definitely performed two separate actions. e.g. click + keypress.\n if (previous.type !== current.type) {\n return true;\n }\n try {\n // If both events have the same type, it's still possible that actions were performed on different targets.\n // e.g. 2 clicks on different buttons.\n if (previous.target !== current.target) {\n return true;\n }\n }\n catch (e) {\n // just accessing `target` property can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/sentry-javascript/issues/838\n }\n // If both events have the same type _and_ same `target` (an element which triggered an event, _not necessarily_\n // to which an event listener was attached), we treat them as the same action, as we want to capture\n // only one breadcrumb. e.g. multiple clicks on the same button, or typing inside a user input box.\n return false;\n}\n/**\n * Decide whether an event should be captured.\n * @param event event to be captured\n */\nfunction shouldSkipDOMEvent(event) {\n // We are only interested in filtering `keypress` events for now.\n if (event.type !== 'keypress') {\n return false;\n }\n try {\n var target = event.target;\n if (!target || !target.tagName) {\n return true;\n }\n // Only consider keypress events on actual input elements. This will disregard keypresses targeting body\n // e.g.tabbing through elements, hotkeys, etc.\n if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable) {\n return false;\n }\n }\n catch (e) {\n // just accessing `target` property can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/sentry-javascript/issues/838\n }\n return true;\n}\n/**\n * Wraps addEventListener to capture UI breadcrumbs\n * @param handler function that will be triggered\n * @param globalListener indicates whether event was captured by the global event listener\n * @returns wrapped breadcrumb events handler\n * @hidden\n */\nfunction makeDOMEventHandler(handler, globalListener) {\n if (globalListener === void 0) { globalListener = false; }\n return function (event) {\n // It's possible this handler might trigger multiple times for the same\n // event (e.g. event propagation through node ancestors).\n // Ignore if we've already captured that event.\n if (!event || lastCapturedEvent === event) {\n return;\n }\n // We always want to skip _some_ events.\n if (shouldSkipDOMEvent(event)) {\n return;\n }\n var name = event.type === 'keypress' ? 'input' : event.type;\n // If there is no debounce timer, it means that we can safely capture the new event and store it for future comparisons.\n if (debounceTimerID === undefined) {\n handler({\n event: event,\n name: name,\n global: globalListener,\n });\n lastCapturedEvent = event;\n }\n // If there is a debounce awaiting, see if the new event is different enough to treat it as a unique one.\n // If that's the case, emit the previous event and store locally the newly-captured DOM event.\n else if (shouldShortcircuitPreviousDebounce(lastCapturedEvent, event)) {\n handler({\n event: event,\n name: name,\n global: globalListener,\n });\n lastCapturedEvent = event;\n }\n // Start a new debounce timer that will prevent us from capturing multiple events that should be grouped together.\n clearTimeout(debounceTimerID);\n debounceTimerID = global.setTimeout(function () {\n debounceTimerID = undefined;\n }, debounceDuration);\n };\n}\n/** JSDoc */\nfunction instrumentDOM() {\n if (!('document' in global)) {\n return;\n }\n // Make it so that any click or keypress that is unhandled / bubbled up all the way to the document triggers our dom\n // handlers. (Normally we have only one, which captures a breadcrumb for each click or keypress.) Do this before\n // we instrument `addEventListener` so that we don't end up attaching this handler twice.\n var triggerDOMHandler = triggerHandlers.bind(null, 'dom');\n var globalDOMEventHandler = makeDOMEventHandler(triggerDOMHandler, true);\n global.document.addEventListener('click', globalDOMEventHandler, false);\n global.document.addEventListener('keypress', globalDOMEventHandler, false);\n // After hooking into click and keypress events bubbled up to `document`, we also hook into user-handled\n // clicks & keypresses, by adding an event listener of our own to any element to which they add a listener. That\n // way, whenever one of their handlers is triggered, ours will be, too. (This is needed because their handler\n // could potentially prevent the event from bubbling up to our global listeners. This way, our handler are still\n // guaranteed to fire at least once.)\n ['EventTarget', 'Node'].forEach(function (target) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n var proto = global[target] && global[target].prototype;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n fill(proto, 'addEventListener', function (originalAddEventListener) {\n return function (type, listener, options) {\n if (type === 'click' || type == 'keypress') {\n try {\n var el = this;\n var handlers_1 = (el.__sentry_instrumentation_handlers__ = el.__sentry_instrumentation_handlers__ || {});\n var handlerForType = (handlers_1[type] = handlers_1[type] || { refCount: 0 });\n if (!handlerForType.handler) {\n var handler = makeDOMEventHandler(triggerDOMHandler);\n handlerForType.handler = handler;\n originalAddEventListener.call(this, type, handler, options);\n }\n handlerForType.refCount += 1;\n }\n catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListenrs` calls with no proper `this` context.\n }\n }\n return originalAddEventListener.call(this, type, listener, options);\n };\n });\n fill(proto, 'removeEventListener', function (originalRemoveEventListener) {\n return function (type, listener, options) {\n if (type === 'click' || type == 'keypress') {\n try {\n var el = this;\n var handlers_2 = el.__sentry_instrumentation_handlers__ || {};\n var handlerForType = handlers_2[type];\n if (handlerForType) {\n handlerForType.refCount -= 1;\n // If there are no longer any custom handlers of the current type on this element, we can remove ours, too.\n if (handlerForType.refCount <= 0) {\n originalRemoveEventListener.call(this, type, handlerForType.handler, options);\n handlerForType.handler = undefined;\n delete handlers_2[type]; // eslint-disable-line @typescript-eslint/no-dynamic-delete\n }\n // If there are no longer any custom handlers of any type on this element, cleanup everything.\n if (Object.keys(handlers_2).length === 0) {\n delete el.__sentry_instrumentation_handlers__;\n }\n }\n }\n catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListenrs` calls with no proper `this` context.\n }\n }\n return originalRemoveEventListener.call(this, type, listener, options);\n };\n });\n });\n}\nvar _oldOnErrorHandler = null;\n/** JSDoc */\nfunction instrumentError() {\n _oldOnErrorHandler = global.onerror;\n global.onerror = function (msg, url, line, column, error) {\n triggerHandlers('error', {\n column: column,\n error: error,\n line: line,\n msg: msg,\n url: url,\n });\n if (_oldOnErrorHandler) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnErrorHandler.apply(this, arguments);\n }\n return false;\n };\n}\nvar _oldOnUnhandledRejectionHandler = null;\n/** JSDoc */\nfunction instrumentUnhandledRejection() {\n _oldOnUnhandledRejectionHandler = global.onunhandledrejection;\n global.onunhandledrejection = function (e) {\n triggerHandlers('unhandledrejection', e);\n if (_oldOnUnhandledRejectionHandler) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnUnhandledRejectionHandler.apply(this, arguments);\n }\n return true;\n };\n}\n//# sourceMappingURL=instrument.js.map","/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n// eslint-disable-next-line @typescript-eslint/unbound-method\nvar objectToString = Object.prototype.toString;\n/**\n * Checks whether given value's type is one of a few Error or Error-like\n * {@link isError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isError(wat) {\n switch (objectToString.call(wat)) {\n case '[object Error]':\n case '[object Exception]':\n case '[object DOMException]':\n return true;\n default:\n return isInstanceOf(wat, Error);\n }\n}\nfunction isBuiltin(wat, ty) {\n return objectToString.call(wat) === \"[object \" + ty + \"]\";\n}\n/**\n * Checks whether given value's type is ErrorEvent\n * {@link isErrorEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isErrorEvent(wat) {\n return isBuiltin(wat, 'ErrorEvent');\n}\n/**\n * Checks whether given value's type is DOMError\n * {@link isDOMError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isDOMError(wat) {\n return isBuiltin(wat, 'DOMError');\n}\n/**\n * Checks whether given value's type is DOMException\n * {@link isDOMException}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isDOMException(wat) {\n return isBuiltin(wat, 'DOMException');\n}\n/**\n * Checks whether given value's type is a string\n * {@link isString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isString(wat) {\n return isBuiltin(wat, 'String');\n}\n/**\n * Checks whether given value is a primitive (undefined, null, number, boolean, string, bigint, symbol)\n * {@link isPrimitive}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isPrimitive(wat) {\n return wat === null || (typeof wat !== 'object' && typeof wat !== 'function');\n}\n/**\n * Checks whether given value's type is an object literal\n * {@link isPlainObject}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isPlainObject(wat) {\n return isBuiltin(wat, 'Object');\n}\n/**\n * Checks whether given value's type is an Event instance\n * {@link isEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isEvent(wat) {\n return typeof Event !== 'undefined' && isInstanceOf(wat, Event);\n}\n/**\n * Checks whether given value's type is an Element instance\n * {@link isElement}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isElement(wat) {\n return typeof Element !== 'undefined' && isInstanceOf(wat, Element);\n}\n/**\n * Checks whether given value's type is an regexp\n * {@link isRegExp}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isRegExp(wat) {\n return isBuiltin(wat, 'RegExp');\n}\n/**\n * Checks whether given value has a then function.\n * @param wat A value to be checked.\n */\nexport function isThenable(wat) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return Boolean(wat && wat.then && typeof wat.then === 'function');\n}\n/**\n * Checks whether given value's type is a SyntheticEvent\n * {@link isSyntheticEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isSyntheticEvent(wat) {\n return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;\n}\n/**\n * Checks whether given value is NaN\n * {@link isNaN}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isNaN(wat) {\n return typeof wat === 'number' && wat !== wat;\n}\n/**\n * Checks whether given value's type is an instance of provided constructor.\n * {@link isInstanceOf}.\n *\n * @param wat A value to be checked.\n * @param base A constructor to be used in a check.\n * @returns A boolean representing the result.\n */\nexport function isInstanceOf(wat, base) {\n try {\n return wat instanceof base;\n }\n catch (_e) {\n return false;\n }\n}\n//# sourceMappingURL=is.js.map","import { __read, __spread } from \"tslib\";\nimport { IS_DEBUG_BUILD } from './flags';\nimport { getGlobalObject, getGlobalSingleton } from './global';\n// TODO: Implement different loggers for different environments\nvar global = getGlobalObject();\n/** Prefix for logging strings */\nvar PREFIX = 'Sentry Logger ';\nexport var CONSOLE_LEVELS = ['debug', 'info', 'warn', 'error', 'log', 'assert'];\n/**\n * Temporarily disable sentry console instrumentations.\n *\n * @param callback The function to run against the original `console` messages\n * @returns The results of the callback\n */\nexport function consoleSandbox(callback) {\n var global = getGlobalObject();\n if (!('console' in global)) {\n return callback();\n }\n var originalConsole = global.console;\n var wrappedLevels = {};\n // Restore all wrapped console methods\n CONSOLE_LEVELS.forEach(function (level) {\n // TODO(v7): Remove this check as it's only needed for Node 6\n var originalWrappedFunc = originalConsole[level] && originalConsole[level].__sentry_original__;\n if (level in global.console && originalWrappedFunc) {\n wrappedLevels[level] = originalConsole[level];\n originalConsole[level] = originalWrappedFunc;\n }\n });\n try {\n return callback();\n }\n finally {\n // Revert restoration to wrapped state\n Object.keys(wrappedLevels).forEach(function (level) {\n originalConsole[level] = wrappedLevels[level];\n });\n }\n}\nfunction makeLogger() {\n var enabled = false;\n var logger = {\n enable: function () {\n enabled = true;\n },\n disable: function () {\n enabled = false;\n },\n };\n if (IS_DEBUG_BUILD) {\n CONSOLE_LEVELS.forEach(function (name) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n logger[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (enabled) {\n consoleSandbox(function () {\n var _a;\n (_a = global.console)[name].apply(_a, __spread([PREFIX + \"[\" + name + \"]:\"], args));\n });\n }\n };\n });\n }\n else {\n CONSOLE_LEVELS.forEach(function (name) {\n logger[name] = function () { return undefined; };\n });\n }\n return logger;\n}\n// Ensure we only have a single logger instance, even if multiple versions of @sentry/utils are being used\nvar logger;\nif (IS_DEBUG_BUILD) {\n logger = getGlobalSingleton('logger', makeLogger);\n}\nelse {\n logger = makeLogger();\n}\nexport { logger };\n//# sourceMappingURL=logger.js.map","/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * Helper to decycle json objects\n */\nexport function memoBuilder() {\n var hasWeakSet = typeof WeakSet === 'function';\n var inner = hasWeakSet ? new WeakSet() : [];\n function memoize(obj) {\n if (hasWeakSet) {\n if (inner.has(obj)) {\n return true;\n }\n inner.add(obj);\n return false;\n }\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (var i = 0; i < inner.length; i++) {\n var value = inner[i];\n if (value === obj) {\n return true;\n }\n }\n inner.push(obj);\n return false;\n }\n function unmemoize(obj) {\n if (hasWeakSet) {\n inner.delete(obj);\n }\n else {\n for (var i = 0; i < inner.length; i++) {\n if (inner[i] === obj) {\n inner.splice(i, 1);\n break;\n }\n }\n }\n }\n return [memoize, unmemoize];\n}\n//# sourceMappingURL=memo.js.map","import { __assign } from \"tslib\";\nimport { getGlobalObject } from './global';\nimport { addNonEnumerableProperty } from './object';\nimport { snipLine } from './string';\n/**\n * UUID4 generator\n *\n * @returns string Generated UUID4.\n */\nexport function uuid4() {\n var global = getGlobalObject();\n var crypto = global.crypto || global.msCrypto;\n if (!(crypto === void 0) && crypto.getRandomValues) {\n // Use window.crypto API if available\n var arr = new Uint16Array(8);\n crypto.getRandomValues(arr);\n // set 4 in byte 7\n // eslint-disable-next-line no-bitwise\n arr[3] = (arr[3] & 0xfff) | 0x4000;\n // set 2 most significant bits of byte 9 to '10'\n // eslint-disable-next-line no-bitwise\n arr[4] = (arr[4] & 0x3fff) | 0x8000;\n var pad = function (num) {\n var v = num.toString(16);\n while (v.length < 4) {\n v = \"0\" + v;\n }\n return v;\n };\n return (pad(arr[0]) + pad(arr[1]) + pad(arr[2]) + pad(arr[3]) + pad(arr[4]) + pad(arr[5]) + pad(arr[6]) + pad(arr[7]));\n }\n // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523\n return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n // eslint-disable-next-line no-bitwise\n var r = (Math.random() * 16) | 0;\n // eslint-disable-next-line no-bitwise\n var v = c === 'x' ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n}\n/**\n * Parses string form of URL into an object\n * // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B\n * // intentionally using regex and not <a/> href parsing trick because React Native and other\n * // environments where DOM might not be available\n * @returns parsed URL object\n */\nexport function parseUrl(url) {\n if (!url) {\n return {};\n }\n var match = url.match(/^(([^:/?#]+):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n if (!match) {\n return {};\n }\n // coerce to undefined values to empty string so we don't get 'undefined'\n var query = match[6] || '';\n var fragment = match[8] || '';\n return {\n host: match[4],\n path: match[5],\n protocol: match[2],\n relative: match[5] + query + fragment,\n };\n}\nfunction getFirstException(event) {\n return event.exception && event.exception.values ? event.exception.values[0] : undefined;\n}\n/**\n * Extracts either message or type+value from an event that can be used for user-facing logs\n * @returns event's description\n */\nexport function getEventDescription(event) {\n var message = event.message, eventId = event.event_id;\n if (message) {\n return message;\n }\n var firstException = getFirstException(event);\n if (firstException) {\n if (firstException.type && firstException.value) {\n return firstException.type + \": \" + firstException.value;\n }\n return firstException.type || firstException.value || eventId || '<unknown>';\n }\n return eventId || '<unknown>';\n}\n/**\n * Adds exception values, type and value to an synthetic Exception.\n * @param event The event to modify.\n * @param value Value of the exception.\n * @param type Type of the exception.\n * @hidden\n */\nexport function addExceptionTypeValue(event, value, type) {\n var exception = (event.exception = event.exception || {});\n var values = (exception.values = exception.values || []);\n var firstException = (values[0] = values[0] || {});\n if (!firstException.value) {\n firstException.value = value || '';\n }\n if (!firstException.type) {\n firstException.type = type || 'Error';\n }\n}\n/**\n * Adds exception mechanism data to a given event. Uses defaults if the second parameter is not passed.\n *\n * @param event The event to modify.\n * @param newMechanism Mechanism data to add to the event.\n * @hidden\n */\nexport function addExceptionMechanism(event, newMechanism) {\n var firstException = getFirstException(event);\n if (!firstException) {\n return;\n }\n var defaultMechanism = { type: 'generic', handled: true };\n var currentMechanism = firstException.mechanism;\n firstException.mechanism = __assign(__assign(__assign({}, defaultMechanism), currentMechanism), newMechanism);\n if (newMechanism && 'data' in newMechanism) {\n var mergedData = __assign(__assign({}, (currentMechanism && currentMechanism.data)), newMechanism.data);\n firstException.mechanism.data = mergedData;\n }\n}\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nvar SEMVER_REGEXP = /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/;\n/**\n * Parses input into a SemVer interface\n * @param input string representation of a semver version\n */\nexport function parseSemver(input) {\n var match = input.match(SEMVER_REGEXP) || [];\n var major = parseInt(match[1], 10);\n var minor = parseInt(match[2], 10);\n var patch = parseInt(match[3], 10);\n return {\n buildmetadata: match[5],\n major: isNaN(major) ? undefined : major,\n minor: isNaN(minor) ? undefined : minor,\n patch: isNaN(patch) ? undefined : patch,\n prerelease: match[4],\n };\n}\n/**\n * This function adds context (pre/post/line) lines to the provided frame\n *\n * @param lines string[] containing all lines\n * @param frame StackFrame that will be mutated\n * @param linesOfContext number of context lines we want to add pre/post\n */\nexport function addContextToFrame(lines, frame, linesOfContext) {\n if (linesOfContext === void 0) { linesOfContext = 5; }\n var lineno = frame.lineno || 0;\n var maxLines = lines.length;\n var sourceLine = Math.max(Math.min(maxLines, lineno - 1), 0);\n frame.pre_context = lines\n .slice(Math.max(0, sourceLine - linesOfContext), sourceLine)\n .map(function (line) { return snipLine(line, 0); });\n frame.context_line = snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0);\n frame.post_context = lines\n .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)\n .map(function (line) { return snipLine(line, 0); });\n}\n/**\n * Strip the query string and fragment off of a given URL or path (if present)\n *\n * @param urlPath Full URL or path, including possible query string and/or fragment\n * @returns URL or path without query string or fragment\n */\nexport function stripUrlQueryAndFragment(urlPath) {\n // eslint-disable-next-line no-useless-escape\n return urlPath.split(/[\\?#]/, 1)[0];\n}\n/**\n * Checks whether or not we've already captured the given exception (note: not an identical exception - the very object\n * in question), and marks it captured if not.\n *\n * This is useful because it's possible for an error to get captured by more than one mechanism. After we intercept and\n * record an error, we rethrow it (assuming we've intercepted it before it's reached the top-level global handlers), so\n * that we don't interfere with whatever effects the error might have had were the SDK not there. At that point, because\n * the error has been rethrown, it's possible for it to bubble up to some other code we've instrumented. If it's not\n * caught after that, it will bubble all the way up to the global handlers (which of course we also instrument). This\n * function helps us ensure that even if we encounter the same error more than once, we only record it the first time we\n * see it.\n *\n * Note: It will ignore primitives (always return `false` and not mark them as seen), as properties can't be set on\n * them. {@link: Object.objectify} can be used on exceptions to convert any that are primitives into their equivalent\n * object wrapper forms so that this check will always work. However, because we need to flag the exact object which\n * will get rethrown, and because that rethrowing happens outside of the event processing pipeline, the objectification\n * must be done before the exception captured.\n *\n * @param A thrown exception to check or flag as having been seen\n * @returns `true` if the exception has already been captured, `false` if not (with the side effect of marking it seen)\n */\nexport function checkOrSetAlreadyCaught(exception) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (exception && exception.__sentry_captured__) {\n return true;\n }\n try {\n // set it this way rather than by assignment so that it's not ennumerable and therefore isn't recorded by the\n // `ExtraErrorData` integration\n addNonEnumerableProperty(exception, '__sentry_captured__', true);\n }\n catch (err) {\n // `exception` is a primitive, so we can't mark it seen\n }\n return false;\n}\n//# sourceMappingURL=misc.js.map","/**\n * NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,\n * you must either a) use `console.log` rather than the logger, or b) put your function elsewhere.\n */\nimport { isBrowserBundle } from './env';\n/**\n * Checks whether we're in the Node.js or Browser environment\n *\n * @returns Answer to given question\n */\nexport function isNodeEnv() {\n // explicitly check for browser bundles as those can be optimized statically\n // by terser/rollup.\n return (!isBrowserBundle() &&\n Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]');\n}\n/**\n * Requires a module which is protected against bundler minification.\n *\n * @param request The module path to resolve\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any\nexport function dynamicRequire(mod, request) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return mod.require(request);\n}\n/**\n * Helper for dynamically loading module that should work with linked dependencies.\n * The problem is that we _should_ be using `require(require.resolve(moduleName, { paths: [cwd()] }))`\n * However it's _not possible_ to do that with Webpack, as it has to know all the dependencies during\n * build time. `require.resolve` is also not available in any other way, so we cannot create,\n * a fake helper like we do with `dynamicRequire`.\n *\n * We always prefer to use local package, thus the value is not returned early from each `try/catch` block.\n * That is to mimic the behavior of `require.resolve` exactly.\n *\n * @param moduleName module name to require\n * @returns possibly required module\n */\nexport function loadModule(moduleName) {\n var mod;\n try {\n mod = dynamicRequire(module, moduleName);\n }\n catch (e) {\n // no-empty\n }\n try {\n var cwd = dynamicRequire(module, 'process').cwd;\n mod = dynamicRequire(module, cwd() + \"/node_modules/\" + moduleName);\n }\n catch (e) {\n // no-empty\n }\n return mod;\n}\n//# sourceMappingURL=node.js.map","import { __read } from \"tslib\";\nimport { isError, isEvent, isNaN, isSyntheticEvent } from './is';\nimport { memoBuilder } from './memo';\nimport { convertToPlainObject } from './object';\nimport { getFunctionName } from './stacktrace';\n/**\n * Recursively normalizes the given object.\n *\n * - Creates a copy to prevent original input mutation\n * - Skips non-enumerable properties\n * - When stringifying, calls `toJSON` if implemented\n * - Removes circular references\n * - Translates non-serializable values (`undefined`/`NaN`/functions) to serializable format\n * - Translates known global objects/classes to a string representations\n * - Takes care of `Error` object serialization\n * - Optionally limits depth of final output\n * - Optionally limits number of properties/elements included in any single object/array\n *\n * @param input The object to be normalized.\n * @param depth The max depth to which to normalize the object. (Anything deeper stringified whole.)\n * @param maxProperties The max number of elements or properties to be included in any single array or\n * object in the normallized output..\n * @returns A normalized version of the object, or `\"**non-serializable**\"` if any errors are thrown during normalization.\n */\nexport function normalize(input, depth, maxProperties) {\n if (depth === void 0) { depth = +Infinity; }\n if (maxProperties === void 0) { maxProperties = +Infinity; }\n try {\n // since we're at the outermost level, there is no key\n return visit('', input, depth, maxProperties);\n }\n catch (err) {\n return { ERROR: \"**non-serializable** (\" + err + \")\" };\n }\n}\n/** JSDoc */\nexport function normalizeToSize(object, \n// Default Node.js REPL depth\ndepth, \n// 100kB, as 200kB is max payload size, so half sounds reasonable\nmaxSize) {\n if (depth === void 0) { depth = 3; }\n if (maxSize === void 0) { maxSize = 100 * 1024; }\n var normalized = normalize(object, depth);\n if (jsonSize(normalized) > maxSize) {\n return normalizeToSize(object, depth - 1, maxSize);\n }\n return normalized;\n}\n/**\n * Visits a node to perform normalization on it\n *\n * @param key The key corresponding to the given node\n * @param value The node to be visited\n * @param depth Optional number indicating the maximum recursion depth\n * @param maxProperties Optional maximum number of properties/elements included in any single object/array\n * @param memo Optional Memo class handling decycling\n */\nfunction visit(key, value, depth, maxProperties, memo) {\n if (depth === void 0) { depth = +Infinity; }\n if (maxProperties === void 0) { maxProperties = +Infinity; }\n if (memo === void 0) { memo = memoBuilder(); }\n var _a = __read(memo, 2), memoize = _a[0], unmemoize = _a[1];\n // If the value has a `toJSON` method, see if we can bail and let it do the work\n var valueWithToJSON = value;\n if (valueWithToJSON && typeof valueWithToJSON.toJSON === 'function') {\n try {\n return valueWithToJSON.toJSON();\n }\n catch (err) {\n // pass (The built-in `toJSON` failed, but we can still try to do it ourselves)\n }\n }\n // Get the simple cases out of the way first\n if (value === null || (['number', 'boolean', 'string'].includes(typeof value) && !isNaN(value))) {\n return value;\n }\n var stringified = stringifyValue(key, value);\n // Anything we could potentially dig into more (objects or arrays) will have come back as `\"[object XXXX]\"`.\n // Everything else will have already been serialized, so if we don't see that pattern, we're done.\n if (!stringified.startsWith('[object ')) {\n return stringified;\n }\n // We're also done if we've reached the max depth\n if (depth === 0) {\n // At this point we know `serialized` is a string of the form `\"[object XXXX]\"`. Clean it up so it's just `\"[XXXX]\"`.\n return stringified.replace('object ', '');\n }\n // If we've already visited this branch, bail out, as it's circular reference. If not, note that we're seeing it now.\n if (memoize(value)) {\n return '[Circular ~]';\n }\n // At this point we know we either have an object or an array, we haven't seen it before, and we're going to recurse\n // because we haven't yet reached the max depth. Create an accumulator to hold the results of visiting each\n // property/entry, and keep track of the number of items we add to it.\n var normalized = (Array.isArray(value) ? [] : {});\n var numAdded = 0;\n // Before we begin, convert`Error` and`Event` instances into plain objects, since some of each of their relevant\n // properties are non-enumerable and otherwise would get missed.\n var visitable = (isError(value) || isEvent(value) ? convertToPlainObject(value) : value);\n for (var visitKey in visitable) {\n // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration.\n if (!Object.prototype.hasOwnProperty.call(visitable, visitKey)) {\n continue;\n }\n if (numAdded >= maxProperties) {\n normalized[visitKey] = '[MaxProperties ~]';\n break;\n }\n // Recursively visit all the child nodes\n var visitValue = visitable[visitKey];\n normalized[visitKey] = visit(visitKey, visitValue, depth - 1, maxProperties, memo);\n numAdded += 1;\n }\n // Once we've visited all the branches, remove the parent from memo storage\n unmemoize(value);\n // Return accumulated values\n return normalized;\n}\n// TODO remove this in v7 (this means the method will no longer be exported, under any name)\nexport { visit as walk };\n/**\n * Stringify the given value. Handles various known special values and types.\n *\n * Not meant to be used on simple primitives which already have a string representation, as it will, for example, turn\n * the number 1231 into \"[Object Number]\", nor on `null`, as it will throw.\n *\n * @param value The value to stringify\n * @returns A stringified representation of the given value\n */\nfunction stringifyValue(key, \n// this type is a tiny bit of a cheat, since this function does handle NaN (which is technically a number), but for\n// our internal use, it'll do\nvalue) {\n try {\n if (key === 'domain' && value && typeof value === 'object' && value._events) {\n return '[Domain]';\n }\n if (key === 'domainEmitter') {\n return '[DomainEmitter]';\n }\n // It's safe to use `global`, `window`, and `document` here in this manner, as we are asserting using `typeof` first\n // which won't throw if they are not present.\n if (typeof global !== 'undefined' && value === global) {\n return '[Global]';\n }\n // eslint-disable-next-line no-restricted-globals\n if (typeof window !== 'undefined' && value === window) {\n return '[Window]';\n }\n // eslint-disable-next-line no-restricted-globals\n if (typeof document !== 'undefined' && value === document) {\n return '[Document]';\n }\n // React's SyntheticEvent thingy\n if (isSyntheticEvent(value)) {\n return '[SyntheticEvent]';\n }\n if (typeof value === 'number' && value !== value) {\n return '[NaN]';\n }\n // this catches `undefined` (but not `null`, which is a primitive and can be serialized on its own)\n if (value === void 0) {\n return '[undefined]';\n }\n if (typeof value === 'function') {\n return \"[Function: \" + getFunctionName(value) + \"]\";\n }\n if (typeof value === 'symbol') {\n return \"[\" + String(value) + \"]\";\n }\n // stringified BigInts are indistinguishable from regular numbers, so we need to label them to avoid confusion\n if (typeof value === 'bigint') {\n return \"[BigInt: \" + String(value) + \"]\";\n }\n // Now that we've knocked out all the special cases and the primitives, all we have left are objects. Simply casting\n // them to strings means that instances of classes which haven't defined their `toStringTag` will just come out as\n // `\"[object Object]\"`. If we instead look at the constructor's name (which is the same as the name of the class),\n // we can make sure that only plain objects come out that way.\n return \"[object \" + Object.getPrototypeOf(value).constructor.name + \"]\";\n }\n catch (err) {\n return \"**non-serializable** (\" + err + \")\";\n }\n}\n/** Calculates bytes size of input string */\nfunction utf8Length(value) {\n // eslint-disable-next-line no-bitwise\n return ~-encodeURI(value).split(/%..|./).length;\n}\n/** Calculates bytes size of input object */\nfunction jsonSize(value) {\n return utf8Length(JSON.stringify(value));\n}\n//# sourceMappingURL=normalize.js.map","import { __assign, __values } from \"tslib\";\nimport { htmlTreeAsString } from './browser';\nimport { isElement, isError, isEvent, isInstanceOf, isPlainObject, isPrimitive } from './is';\nimport { truncate } from './string';\n/**\n * Replace a method in an object with a wrapped version of itself.\n *\n * @param source An object that contains a method to be wrapped.\n * @param name The name of the method to be wrapped.\n * @param replacementFactory A higher-order function that takes the original version of the given method and returns a\n * wrapped version. Note: The function returned by `replacementFactory` needs to be a non-arrow function, in order to\n * preserve the correct value of `this`, and the original method must be called using `origMethod.call(this, <other\n * args>)` or `origMethod.apply(this, [<other args>])` (rather than being called directly), again to preserve `this`.\n * @returns void\n */\nexport function fill(source, name, replacementFactory) {\n if (!(name in source)) {\n return;\n }\n var original = source[name];\n var wrapped = replacementFactory(original);\n // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work\n // otherwise it'll throw \"TypeError: Object.defineProperties called on non-object\"\n if (typeof wrapped === 'function') {\n try {\n markFunctionWrapped(wrapped, original);\n }\n catch (_Oo) {\n // This can throw if multiple fill happens on a global object like XMLHttpRequest\n // Fixes https://github.com/getsentry/sentry-javascript/issues/2043\n }\n }\n source[name] = wrapped;\n}\n/**\n * Defines a non-enumerable property on the given object.\n *\n * @param obj The object on which to set the property\n * @param name The name of the property to be set\n * @param value The value to which to set the property\n */\nexport function addNonEnumerableProperty(obj, name, value) {\n Object.defineProperty(obj, name, {\n // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it\n value: value,\n writable: true,\n configurable: true,\n });\n}\n/**\n * Remembers the original function on the wrapped function and\n * patches up the prototype.\n *\n * @param wrapped the wrapper function\n * @param original the original function that gets wrapped\n */\nexport function markFunctionWrapped(wrapped, original) {\n var proto = original.prototype || {};\n wrapped.prototype = original.prototype = proto;\n addNonEnumerableProperty(wrapped, '__sentry_original__', original);\n}\n/**\n * This extracts the original function if available. See\n * `markFunctionWrapped` for more information.\n *\n * @param func the function to unwrap\n * @returns the unwrapped version of the function if available.\n */\nexport function getOriginalFunction(func) {\n return func.__sentry_original__;\n}\n/**\n * Encodes given object into url-friendly format\n *\n * @param object An object that contains serializable values\n * @returns string Encoded\n */\nexport function urlEncode(object) {\n return Object.keys(object)\n .map(function (key) { return encodeURIComponent(key) + \"=\" + encodeURIComponent(object[key]); })\n .join('&');\n}\n/**\n * Transforms any object into an object literal with all its attributes\n * attached to it.\n *\n * @param value Initial source that we have to transform in order for it to be usable by the serializer\n */\nexport function convertToPlainObject(value) {\n var newObj = value;\n if (isError(value)) {\n newObj = __assign({ message: value.message, name: value.name, stack: value.stack }, getOwnProperties(value));\n }\n else if (isEvent(value)) {\n var event_1 = value;\n newObj = __assign({ type: event_1.type, target: serializeEventTarget(event_1.target), currentTarget: serializeEventTarget(event_1.currentTarget) }, getOwnProperties(event_1));\n if (typeof CustomEvent !== 'undefined' && isInstanceOf(value, CustomEvent)) {\n newObj.detail = event_1.detail;\n }\n }\n return newObj;\n}\n/** Creates a string representation of the target of an `Event` object */\nfunction serializeEventTarget(target) {\n try {\n return isElement(target) ? htmlTreeAsString(target) : Object.prototype.toString.call(target);\n }\n catch (_oO) {\n return '<unknown>';\n }\n}\n/** Filters out all but an object's own properties */\nfunction getOwnProperties(obj) {\n var extractedProps = {};\n for (var property in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, property)) {\n extractedProps[property] = obj[property];\n }\n }\n return extractedProps;\n}\n/**\n * Given any captured exception, extract its keys and create a sorted\n * and truncated list that will be used inside the event message.\n * eg. `Non-error exception captured with keys: foo, bar, baz`\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function extractExceptionKeysForMessage(exception, maxLength) {\n if (maxLength === void 0) { maxLength = 40; }\n var keys = Object.keys(convertToPlainObject(exception));\n keys.sort();\n if (!keys.length) {\n return '[object has no keys]';\n }\n if (keys[0].length >= maxLength) {\n return truncate(keys[0], maxLength);\n }\n for (var includedKeys = keys.length; includedKeys > 0; includedKeys--) {\n var serialized = keys.slice(0, includedKeys).join(', ');\n if (serialized.length > maxLength) {\n continue;\n }\n if (includedKeys === keys.length) {\n return serialized;\n }\n return truncate(serialized, maxLength);\n }\n return '';\n}\n/**\n * Given any object, return the new object with removed keys that value was `undefined`.\n * Works recursively on objects and arrays.\n */\nexport function dropUndefinedKeys(val) {\n var e_1, _a;\n if (isPlainObject(val)) {\n var rv = {};\n try {\n for (var _b = __values(Object.keys(val)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var key = _c.value;\n if (typeof val[key] !== 'undefined') {\n rv[key] = dropUndefinedKeys(val[key]);\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return rv;\n }\n if (Array.isArray(val)) {\n return val.map(dropUndefinedKeys);\n }\n return val;\n}\n/**\n * Ensure that something is an object.\n *\n * Turns `undefined` and `null` into `String`s and all other primitives into instances of their respective wrapper\n * classes (String, Boolean, Number, etc.). Acts as the identity function on non-primitives.\n *\n * @param wat The subject of the objectification\n * @returns A version of `wat` which can safely be used with `Object` class methods\n */\nexport function objectify(wat) {\n var objectified;\n switch (true) {\n case wat === undefined || wat === null:\n objectified = new String(wat);\n break;\n // Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason\n // those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as\n // an object in order to wrap it.\n case typeof wat === 'symbol' || typeof wat === 'bigint':\n objectified = Object(wat);\n break;\n // this will catch the remaining primitives: `String`, `Number`, and `Boolean`\n case isPrimitive(wat):\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n objectified = new wat.constructor(wat);\n break;\n // by process of elimination, at this point we know that `wat` must already be an object\n default:\n objectified = wat;\n break;\n }\n return objectified;\n}\n//# sourceMappingURL=object.js.map","export var setPrototypeOf = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties);\n/**\n * setPrototypeOf polyfill using __proto__\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction setProtoOf(obj, proto) {\n // @ts-ignore __proto__ does not exist on obj\n obj.__proto__ = proto;\n return obj;\n}\n/**\n * setPrototypeOf polyfill using mixin\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction mixinProperties(obj, proto) {\n for (var prop in proto) {\n if (!Object.prototype.hasOwnProperty.call(obj, prop)) {\n // @ts-ignore typescript complains about indexing so we remove\n obj[prop] = proto[prop];\n }\n }\n return obj;\n}\n//# sourceMappingURL=polyfill.js.map","import { SentryError } from './error';\nimport { rejectedSyncPromise, resolvedSyncPromise, SyncPromise } from './syncpromise';\n/**\n * Creates an new PromiseBuffer object with the specified limit\n * @param limit max number of promises that can be stored in the buffer\n */\nexport function makePromiseBuffer(limit) {\n var buffer = [];\n function isReady() {\n return limit === undefined || buffer.length < limit;\n }\n /**\n * Remove a promise from the queue.\n *\n * @param task Can be any PromiseLike<T>\n * @returns Removed promise.\n */\n function remove(task) {\n return buffer.splice(buffer.indexOf(task), 1)[0];\n }\n /**\n * Add a promise (representing an in-flight action) to the queue, and set it to remove itself on fulfillment.\n *\n * @param taskProducer A function producing any PromiseLike<T>; In previous versions this used to be `task:\n * PromiseLike<T>`, but under that model, Promises were instantly created on the call-site and their executor\n * functions therefore ran immediately. Thus, even if the buffer was full, the action still happened. By\n * requiring the promise to be wrapped in a function, we can defer promise creation until after the buffer\n * limit check.\n * @returns The original promise.\n */\n function add(taskProducer) {\n if (!isReady()) {\n return rejectedSyncPromise(new SentryError('Not adding Promise due to buffer limit reached.'));\n }\n // start the task and add its promise to the queue\n var task = taskProducer();\n if (buffer.indexOf(task) === -1) {\n buffer.push(task);\n }\n void task\n .then(function () { return remove(task); })\n // Use `then(null, rejectionHandler)` rather than `catch(rejectionHandler)` so that we can use `PromiseLike`\n // rather than `Promise`. `PromiseLike` doesn't have a `.catch` method, making its polyfill smaller. (ES5 didn't\n // have promises, so TS has to polyfill when down-compiling.)\n .then(null, function () {\n return remove(task).then(null, function () {\n // We have to add another catch here because `remove()` starts a new promise chain.\n });\n });\n return task;\n }\n /**\n * Wait for all promises in the queue to resolve or for timeout to expire, whichever comes first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the queue is still non-empty. Passing `0` (or\n * not passing anything) will make the promise wait as long as it takes for the queue to drain before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if the queue is already empty or drains before the timeout, and\n * `false` otherwise\n */\n function drain(timeout) {\n return new SyncPromise(function (resolve, reject) {\n var counter = buffer.length;\n if (!counter) {\n return resolve(true);\n }\n // wait for `timeout` ms and then resolve to `false` (if not cancelled first)\n var capturedSetTimeout = setTimeout(function () {\n if (timeout && timeout > 0) {\n resolve(false);\n }\n }, timeout);\n // if all promises resolve in time, cancel the timer and resolve to `true`\n buffer.forEach(function (item) {\n void resolvedSyncPromise(item).then(function () {\n // eslint-disable-next-line no-plusplus\n if (!--counter) {\n clearTimeout(capturedSetTimeout);\n resolve(true);\n }\n }, reject);\n });\n });\n }\n return {\n $: buffer,\n add: add,\n drain: drain,\n };\n}\n//# sourceMappingURL=promisebuffer.js.map","import { __assign, __values } from \"tslib\";\nexport var DEFAULT_RETRY_AFTER = 60 * 1000; // 60 seconds\n/**\n * Extracts Retry-After value from the request header or returns default value\n * @param header string representation of 'Retry-After' header\n * @param now current unix timestamp\n *\n */\nexport function parseRetryAfterHeader(header, now) {\n if (now === void 0) { now = Date.now(); }\n var headerDelay = parseInt(\"\" + header, 10);\n if (!isNaN(headerDelay)) {\n return headerDelay * 1000;\n }\n var headerDate = Date.parse(\"\" + header);\n if (!isNaN(headerDate)) {\n return headerDate - now;\n }\n return DEFAULT_RETRY_AFTER;\n}\n/**\n * Gets the time that given category is disabled until for rate limiting\n */\nexport function disabledUntil(limits, category) {\n return limits[category] || limits.all || 0;\n}\n/**\n * Checks if a category is rate limited\n */\nexport function isRateLimited(limits, category, now) {\n if (now === void 0) { now = Date.now(); }\n return disabledUntil(limits, category) > now;\n}\n/**\n * Update ratelimits from incoming headers.\n * Returns true if headers contains a non-empty rate limiting header.\n */\nexport function updateRateLimits(limits, headers, now) {\n var e_1, _a, e_2, _b;\n if (now === void 0) { now = Date.now(); }\n var updatedRateLimits = __assign({}, limits);\n // \"The name is case-insensitive.\"\n // https://developer.mozilla.org/en-US/docs/Web/API/Headers/get\n var rateLimitHeader = headers['x-sentry-rate-limits'];\n var retryAfterHeader = headers['retry-after'];\n if (rateLimitHeader) {\n try {\n /**\n * rate limit headers are of the form\n * <header>,<header>,..\n * where each <header> is of the form\n * <retry_after>: <categories>: <scope>: <reason_code>\n * where\n * <retry_after> is a delay in seconds\n * <categories> is the event type(s) (error, transaction, etc) being rate limited and is of the form\n * <category>;<category>;...\n * <scope> is what's being limited (org, project, or key) - ignored by SDK\n * <reason_code> is an arbitrary string like \"org_quota\" - ignored by SDK\n */\n for (var _c = __values(rateLimitHeader.trim().split(',')), _d = _c.next(); !_d.done; _d = _c.next()) {\n var limit = _d.value;\n var parameters = limit.split(':', 2);\n var headerDelay = parseInt(parameters[0], 10);\n var delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1000; // 60sec default\n if (!parameters[1]) {\n updatedRateLimits.all = now + delay;\n }\n else {\n try {\n for (var _e = (e_2 = void 0, __values(parameters[1].split(';'))), _f = _e.next(); !_f.done; _f = _e.next()) {\n var category = _f.value;\n updatedRateLimits[category] = now + delay;\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_f && !_f.done && (_b = _e.return)) _b.call(_e);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_a = _c.return)) _a.call(_c);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n else if (retryAfterHeader) {\n updatedRateLimits.all = now + parseRetryAfterHeader(retryAfterHeader, now);\n }\n return updatedRateLimits;\n}\n//# sourceMappingURL=ratelimit.js.map","import { Severity } from '@sentry/types';\nimport { SeverityLevels } from './enums';\nfunction isSupportedSeverity(level) {\n return SeverityLevels.indexOf(level) !== -1;\n}\n/**\n * Converts a string-based level into a {@link Severity}.\n *\n * @param level string representation of Severity\n * @returns Severity\n */\nexport function severityFromString(level) {\n if (level === 'warn')\n return Severity.Warning;\n if (isSupportedSeverity(level)) {\n return level;\n }\n return Severity.Log;\n}\n//# sourceMappingURL=severity.js.map","import { __assign, __values } from \"tslib\";\nvar STACKTRACE_LIMIT = 50;\n/**\n * Creates a stack parser with the supplied line parsers\n *\n * StackFrames are returned in the correct order for Sentry Exception\n * frames and with Sentry SDK internal frames removed from the top and bottom\n *\n */\nexport function createStackParser() {\n var parsers = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n parsers[_i] = arguments[_i];\n }\n var sortedParsers = parsers.sort(function (a, b) { return a[0] - b[0]; }).map(function (p) { return p[1]; });\n return function (stack, skipFirst) {\n var e_1, _a, e_2, _b;\n if (skipFirst === void 0) { skipFirst = 0; }\n var frames = [];\n try {\n for (var _c = __values(stack.split('\\n').slice(skipFirst)), _d = _c.next(); !_d.done; _d = _c.next()) {\n var line = _d.value;\n try {\n for (var sortedParsers_1 = (e_2 = void 0, __values(sortedParsers)), sortedParsers_1_1 = sortedParsers_1.next(); !sortedParsers_1_1.done; sortedParsers_1_1 = sortedParsers_1.next()) {\n var parser = sortedParsers_1_1.value;\n var frame = parser(line);\n if (frame) {\n frames.push(frame);\n break;\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (sortedParsers_1_1 && !sortedParsers_1_1.done && (_b = sortedParsers_1.return)) _b.call(sortedParsers_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_a = _c.return)) _a.call(_c);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return stripSentryFramesAndReverse(frames);\n };\n}\n/**\n * @hidden\n */\nexport function stripSentryFramesAndReverse(stack) {\n if (!stack.length) {\n return [];\n }\n var localStack = stack;\n var firstFrameFunction = localStack[0].function || '';\n var lastFrameFunction = localStack[localStack.length - 1].function || '';\n // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call)\n if (firstFrameFunction.indexOf('captureMessage') !== -1 || firstFrameFunction.indexOf('captureException') !== -1) {\n localStack = localStack.slice(1);\n }\n // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call)\n if (lastFrameFunction.indexOf('sentryWrapped') !== -1) {\n localStack = localStack.slice(0, -1);\n }\n // The frame where the crash happened, should be the last entry in the array\n return localStack\n .slice(0, STACKTRACE_LIMIT)\n .map(function (frame) { return (__assign(__assign({}, frame), { filename: frame.filename || localStack[0].filename, function: frame.function || '?' })); })\n .reverse();\n}\nvar defaultFunctionName = '<anonymous>';\n/**\n * Safely extract function name from itself\n */\nexport function getFunctionName(fn) {\n try {\n if (!fn || typeof fn !== 'function') {\n return defaultFunctionName;\n }\n return fn.name || defaultFunctionName;\n }\n catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n return defaultFunctionName;\n }\n}\n//# sourceMappingURL=stacktrace.js.map","/**\n * Converts an HTTP status code to sentry status {@link EventStatus}.\n *\n * @param code number HTTP status code\n * @returns EventStatus\n */\nexport function eventStatusFromHttpCode(code) {\n if (code >= 200 && code < 300) {\n return 'success';\n }\n if (code === 429) {\n return 'rate_limit';\n }\n if (code >= 400 && code < 500) {\n return 'invalid';\n }\n if (code >= 500) {\n return 'failed';\n }\n return 'unknown';\n}\n//# sourceMappingURL=status.js.map","import { isRegExp, isString } from './is';\n/**\n * Truncates given string to the maximum characters count\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string (0 = unlimited)\n * @returns string Encoded\n */\nexport function truncate(str, max) {\n if (max === void 0) { max = 0; }\n if (typeof str !== 'string' || max === 0) {\n return str;\n }\n return str.length <= max ? str : str.substr(0, max) + \"...\";\n}\n/**\n * This is basically just `trim_line` from\n * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\nexport function snipLine(line, colno) {\n var newLine = line;\n var lineLength = newLine.length;\n if (lineLength <= 150) {\n return newLine;\n }\n if (colno > lineLength) {\n // eslint-disable-next-line no-param-reassign\n colno = lineLength;\n }\n var start = Math.max(colno - 60, 0);\n if (start < 5) {\n start = 0;\n }\n var end = Math.min(start + 140, lineLength);\n if (end > lineLength - 5) {\n end = lineLength;\n }\n if (end === lineLength) {\n start = Math.max(end - 140, 0);\n }\n newLine = newLine.slice(start, end);\n if (start > 0) {\n newLine = \"'{snip} \" + newLine;\n }\n if (end < lineLength) {\n newLine += ' {snip}';\n }\n return newLine;\n}\n/**\n * Join values in array\n * @param input array of values to be joined together\n * @param delimiter string to be placed in-between values\n * @returns Joined values\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function safeJoin(input, delimiter) {\n if (!Array.isArray(input)) {\n return '';\n }\n var output = [];\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (var i = 0; i < input.length; i++) {\n var value = input[i];\n try {\n output.push(String(value));\n }\n catch (e) {\n output.push('[value cannot be serialized]');\n }\n }\n return output.join(delimiter);\n}\n/**\n * Checks if the value matches a regex or includes the string\n * @param value The string value to be checked against\n * @param pattern Either a regex or a string that must be contained in value\n */\nexport function isMatchingPattern(value, pattern) {\n if (!isString(value)) {\n return false;\n }\n if (isRegExp(pattern)) {\n return pattern.test(value);\n }\n if (typeof pattern === 'string') {\n return value.indexOf(pattern) !== -1;\n }\n return false;\n}\n/**\n * Given a string, escape characters which have meaning in the regex grammar, such that the result is safe to feed to\n * `new RegExp()`.\n *\n * Based on https://github.com/sindresorhus/escape-string-regexp. Vendored to a) reduce the size by skipping the runtime\n * type-checking, and b) ensure it gets down-compiled for old versions of Node (the published package only supports Node\n * 12+).\n *\n * @param regexString The string to escape\n * @returns An version of the string with all special regex characters escaped\n */\nexport function escapeStringForRegex(regexString) {\n // escape the hyphen separately so we can also replace it with a unicode literal hyphen, to avoid the problems\n // discussed in https://github.com/sindresorhus/escape-string-regexp/issues/20.\n return regexString.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&').replace(/-/g, '\\\\x2d');\n}\n//# sourceMappingURL=string.js.map","import { IS_DEBUG_BUILD } from './flags';\nimport { getGlobalObject } from './global';\nimport { logger } from './logger';\n/**\n * Tells whether current environment supports ErrorEvent objects\n * {@link supportsErrorEvent}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsErrorEvent() {\n try {\n new ErrorEvent('');\n return true;\n }\n catch (e) {\n return false;\n }\n}\n/**\n * Tells whether current environment supports DOMError objects\n * {@link supportsDOMError}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMError() {\n try {\n // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':\n // 1 argument required, but only 0 present.\n // @ts-ignore It really needs 1 argument, not 0.\n new DOMError('');\n return true;\n }\n catch (e) {\n return false;\n }\n}\n/**\n * Tells whether current environment supports DOMException objects\n * {@link supportsDOMException}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMException() {\n try {\n new DOMException('');\n return true;\n }\n catch (e) {\n return false;\n }\n}\n/**\n * Tells whether current environment supports Fetch API\n * {@link supportsFetch}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsFetch() {\n if (!('fetch' in getGlobalObject())) {\n return false;\n }\n try {\n new Headers();\n new Request('');\n new Response();\n return true;\n }\n catch (e) {\n return false;\n }\n}\n/**\n * isNativeFetch checks if the given function is a native implementation of fetch()\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function isNativeFetch(func) {\n return func && /^function fetch\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n}\n/**\n * Tells whether current environment supports Fetch API natively\n * {@link supportsNativeFetch}.\n *\n * @returns true if `window.fetch` is natively implemented, false otherwise\n */\nexport function supportsNativeFetch() {\n if (!supportsFetch()) {\n return false;\n }\n var global = getGlobalObject();\n // Fast path to avoid DOM I/O\n // eslint-disable-next-line @typescript-eslint/unbound-method\n if (isNativeFetch(global.fetch)) {\n return true;\n }\n // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)\n // so create a \"pure\" iframe to see if that has native fetch\n var result = false;\n var doc = global.document;\n // eslint-disable-next-line deprecation/deprecation\n if (doc && typeof doc.createElement === 'function') {\n try {\n var sandbox = doc.createElement('iframe');\n sandbox.hidden = true;\n doc.head.appendChild(sandbox);\n if (sandbox.contentWindow && sandbox.contentWindow.fetch) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n result = isNativeFetch(sandbox.contentWindow.fetch);\n }\n doc.head.removeChild(sandbox);\n }\n catch (err) {\n IS_DEBUG_BUILD &&\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);\n }\n }\n return result;\n}\n/**\n * Tells whether current environment supports ReportingObserver API\n * {@link supportsReportingObserver}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReportingObserver() {\n return 'ReportingObserver' in getGlobalObject();\n}\n/**\n * Tells whether current environment supports Referrer Policy API\n * {@link supportsReferrerPolicy}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReferrerPolicy() {\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default'\n // (see https://caniuse.com/#feat=referrer-policy),\n // it doesn't. And it throws an exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n if (!supportsFetch()) {\n return false;\n }\n try {\n new Request('_', {\n referrerPolicy: 'origin',\n });\n return true;\n }\n catch (e) {\n return false;\n }\n}\n/**\n * Tells whether current environment supports History API\n * {@link supportsHistory}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsHistory() {\n // NOTE: in Chrome App environment, touching history.pushState, *even inside\n // a try/catch block*, will cause Chrome to output an error to console.error\n // borrowed from: https://github.com/angular/angular.js/pull/13945/files\n var global = getGlobalObject();\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var chrome = global.chrome;\n var isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n var hasHistoryApi = 'history' in global && !!global.history.pushState && !!global.history.replaceState;\n return !isChromePackagedApp && hasHistoryApi;\n}\n//# sourceMappingURL=supports.js.map","/* eslint-disable @typescript-eslint/explicit-function-return-type */\n/* eslint-disable @typescript-eslint/typedef */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { isThenable } from './is';\n/**\n * Creates a resolved sync promise.\n *\n * @param value the value to resolve the promise with\n * @returns the resolved sync promise\n */\nexport function resolvedSyncPromise(value) {\n return new SyncPromise(function (resolve) {\n resolve(value);\n });\n}\n/**\n * Creates a rejected sync promise.\n *\n * @param value the value to reject the promise with\n * @returns the rejected sync promise\n */\nexport function rejectedSyncPromise(reason) {\n return new SyncPromise(function (_, reject) {\n reject(reason);\n });\n}\n/**\n * Thenable class that behaves like a Promise and follows it's interface\n * but is not async internally\n */\nvar SyncPromise = /** @class */ (function () {\n function SyncPromise(executor) {\n var _this = this;\n this._state = 0 /* PENDING */;\n this._handlers = [];\n /** JSDoc */\n this._resolve = function (value) {\n _this._setResult(1 /* RESOLVED */, value);\n };\n /** JSDoc */\n this._reject = function (reason) {\n _this._setResult(2 /* REJECTED */, reason);\n };\n /** JSDoc */\n this._setResult = function (state, value) {\n if (_this._state !== 0 /* PENDING */) {\n return;\n }\n if (isThenable(value)) {\n void value.then(_this._resolve, _this._reject);\n return;\n }\n _this._state = state;\n _this._value = value;\n _this._executeHandlers();\n };\n /** JSDoc */\n this._executeHandlers = function () {\n if (_this._state === 0 /* PENDING */) {\n return;\n }\n var cachedHandlers = _this._handlers.slice();\n _this._handlers = [];\n cachedHandlers.forEach(function (handler) {\n if (handler[0]) {\n return;\n }\n if (_this._state === 1 /* RESOLVED */) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n handler[1](_this._value);\n }\n if (_this._state === 2 /* REJECTED */) {\n handler[2](_this._value);\n }\n handler[0] = true;\n });\n };\n try {\n executor(this._resolve, this._reject);\n }\n catch (e) {\n this._reject(e);\n }\n }\n /** JSDoc */\n SyncPromise.prototype.then = function (onfulfilled, onrejected) {\n var _this = this;\n return new SyncPromise(function (resolve, reject) {\n _this._handlers.push([\n false,\n function (result) {\n if (!onfulfilled) {\n // TODO: ¯\\_(ツ)_/¯\n // TODO: FIXME\n resolve(result);\n }\n else {\n try {\n resolve(onfulfilled(result));\n }\n catch (e) {\n reject(e);\n }\n }\n },\n function (reason) {\n if (!onrejected) {\n reject(reason);\n }\n else {\n try {\n resolve(onrejected(reason));\n }\n catch (e) {\n reject(e);\n }\n }\n },\n ]);\n _this._executeHandlers();\n });\n };\n /** JSDoc */\n SyncPromise.prototype.catch = function (onrejected) {\n return this.then(function (val) { return val; }, onrejected);\n };\n /** JSDoc */\n SyncPromise.prototype.finally = function (onfinally) {\n var _this = this;\n return new SyncPromise(function (resolve, reject) {\n var val;\n var isRejected;\n return _this.then(function (value) {\n isRejected = false;\n val = value;\n if (onfinally) {\n onfinally();\n }\n }, function (reason) {\n isRejected = true;\n val = reason;\n if (onfinally) {\n onfinally();\n }\n }).then(function () {\n if (isRejected) {\n reject(val);\n return;\n }\n resolve(val);\n });\n });\n };\n return SyncPromise;\n}());\nexport { SyncPromise };\n//# sourceMappingURL=syncpromise.js.map","import { getGlobalObject } from './global';\nimport { dynamicRequire, isNodeEnv } from './node';\n/**\n * A TimestampSource implementation for environments that do not support the Performance Web API natively.\n *\n * Note that this TimestampSource does not use a monotonic clock. A call to `nowSeconds` may return a timestamp earlier\n * than a previously returned value. We do not try to emulate a monotonic behavior in order to facilitate debugging. It\n * is more obvious to explain \"why does my span have negative duration\" than \"why my spans have zero duration\".\n */\nvar dateTimestampSource = {\n nowSeconds: function () { return Date.now() / 1000; },\n};\n/**\n * Returns a wrapper around the native Performance API browser implementation, or undefined for browsers that do not\n * support the API.\n *\n * Wrapping the native API works around differences in behavior from different browsers.\n */\nfunction getBrowserPerformance() {\n var performance = getGlobalObject().performance;\n if (!performance || !performance.now) {\n return undefined;\n }\n // Replace performance.timeOrigin with our own timeOrigin based on Date.now().\n //\n // This is a partial workaround for browsers reporting performance.timeOrigin such that performance.timeOrigin +\n // performance.now() gives a date arbitrarily in the past.\n //\n // Additionally, computing timeOrigin in this way fills the gap for browsers where performance.timeOrigin is\n // undefined.\n //\n // The assumption that performance.timeOrigin + performance.now() ~= Date.now() is flawed, but we depend on it to\n // interact with data coming out of performance entries.\n //\n // Note that despite recommendations against it in the spec, browsers implement the Performance API with a clock that\n // might stop when the computer is asleep (and perhaps under other circumstances). Such behavior causes\n // performance.timeOrigin + performance.now() to have an arbitrary skew over Date.now(). In laptop computers, we have\n // observed skews that can be as long as days, weeks or months.\n //\n // See https://github.com/getsentry/sentry-javascript/issues/2590.\n //\n // BUG: despite our best intentions, this workaround has its limitations. It mostly addresses timings of pageload\n // transactions, but ignores the skew built up over time that can aversely affect timestamps of navigation\n // transactions of long-lived web pages.\n var timeOrigin = Date.now() - performance.now();\n return {\n now: function () { return performance.now(); },\n timeOrigin: timeOrigin,\n };\n}\n/**\n * Returns the native Performance API implementation from Node.js. Returns undefined in old Node.js versions that don't\n * implement the API.\n */\nfunction getNodePerformance() {\n try {\n var perfHooks = dynamicRequire(module, 'perf_hooks');\n return perfHooks.performance;\n }\n catch (_) {\n return undefined;\n }\n}\n/**\n * The Performance API implementation for the current platform, if available.\n */\nvar platformPerformance = isNodeEnv() ? getNodePerformance() : getBrowserPerformance();\nvar timestampSource = platformPerformance === undefined\n ? dateTimestampSource\n : {\n nowSeconds: function () { return (platformPerformance.timeOrigin + platformPerformance.now()) / 1000; },\n };\n/**\n * Returns a timestamp in seconds since the UNIX epoch using the Date API.\n */\nexport var dateTimestampInSeconds = dateTimestampSource.nowSeconds.bind(dateTimestampSource);\n/**\n * Returns a timestamp in seconds since the UNIX epoch using either the Performance or Date APIs, depending on the\n * availability of the Performance API.\n *\n * See `usingPerformanceAPI` to test whether the Performance API is used.\n *\n * BUG: Note that because of how browsers implement the Performance API, the clock might stop when the computer is\n * asleep. This creates a skew between `dateTimestampInSeconds` and `timestampInSeconds`. The\n * skew can grow to arbitrary amounts like days, weeks or months.\n * See https://github.com/getsentry/sentry-javascript/issues/2590.\n */\nexport var timestampInSeconds = timestampSource.nowSeconds.bind(timestampSource);\n// Re-exported with an old name for backwards-compatibility.\nexport var timestampWithMs = timestampInSeconds;\n/**\n * A boolean that is true when timestampInSeconds uses the Performance API to produce monotonic timestamps.\n */\nexport var usingPerformanceAPI = platformPerformance !== undefined;\n/**\n * Internal helper to store what is the source of browserPerformanceTimeOrigin below. For debugging only.\n */\nexport var _browserPerformanceTimeOriginMode;\n/**\n * The number of milliseconds since the UNIX epoch. This value is only usable in a browser, and only when the\n * performance API is available.\n */\nexport var browserPerformanceTimeOrigin = (function () {\n // Unfortunately browsers may report an inaccurate time origin data, through either performance.timeOrigin or\n // performance.timing.navigationStart, which results in poor results in performance data. We only treat time origin\n // data as reliable if they are within a reasonable threshold of the current time.\n var performance = getGlobalObject().performance;\n if (!performance || !performance.now) {\n _browserPerformanceTimeOriginMode = 'none';\n return undefined;\n }\n var threshold = 3600 * 1000;\n var performanceNow = performance.now();\n var dateNow = Date.now();\n // if timeOrigin isn't available set delta to threshold so it isn't used\n var timeOriginDelta = performance.timeOrigin\n ? Math.abs(performance.timeOrigin + performanceNow - dateNow)\n : threshold;\n var timeOriginIsReliable = timeOriginDelta < threshold;\n // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin\n // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing.\n // Also as of writing, performance.timing is not available in Web Workers in mainstream browsers, so it is not always\n // a valid fallback. In the absence of an initial time provided by the browser, fallback to the current time from the\n // Date API.\n // eslint-disable-next-line deprecation/deprecation\n var navigationStart = performance.timing && performance.timing.navigationStart;\n var hasNavigationStart = typeof navigationStart === 'number';\n // if navigationStart isn't available set delta to threshold so it isn't used\n var navigationStartDelta = hasNavigationStart ? Math.abs(navigationStart + performanceNow - dateNow) : threshold;\n var navigationStartIsReliable = navigationStartDelta < threshold;\n if (timeOriginIsReliable || navigationStartIsReliable) {\n // Use the more reliable time origin\n if (timeOriginDelta <= navigationStartDelta) {\n _browserPerformanceTimeOriginMode = 'timeOrigin';\n return performance.timeOrigin;\n }\n else {\n _browserPerformanceTimeOriginMode = 'navigationStart';\n return navigationStart;\n }\n }\n // Either both timeOrigin and navigationStart are skewed or neither is available, fallback to Date.\n _browserPerformanceTimeOriginMode = 'dateNow';\n return dateNow;\n})();\n//# sourceMappingURL=time.js.map","export var TRACEPARENT_REGEXP = new RegExp('^[ \\\\t]*' + // whitespace\n '([0-9a-f]{32})?' + // trace_id\n '-?([0-9a-f]{16})?' + // span_id\n '-?([01])?' + // sampled\n '[ \\\\t]*$');\n/**\n * Extract transaction context data from a `sentry-trace` header.\n *\n * @param traceparent Traceparent string\n *\n * @returns Object containing data from the header, or undefined if traceparent string is malformed\n */\nexport function extractTraceparentData(traceparent) {\n var matches = traceparent.match(TRACEPARENT_REGEXP);\n if (matches) {\n var parentSampled = void 0;\n if (matches[3] === '1') {\n parentSampled = true;\n }\n else if (matches[3] === '0') {\n parentSampled = false;\n }\n return {\n traceId: matches[1],\n parentSampled: parentSampled,\n parentSpanId: matches[2],\n };\n }\n return undefined;\n}\n//# sourceMappingURL=tracing.js.map","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","module.exports = window[\"wp\"][\"apiFetch\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.hmd = function(module) {\n\tmodule = Object.create(module);\n\tif (!module.children) module.children = [];\n\tObject.defineProperty(module, 'exports', {\n\t\tenumerable: true,\n\t\tset: function() {\n\t\t\tthrow new Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id);\n\t\t}\n\t});\n\treturn module;\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import * as Sentry from '@sentry/browser';\nimport { Integrations } from '@sentry/tracing';\nimport apiFetch from '@wordpress/api-fetch';\n\nconst shouldActivateSentry = window.A8C_ETK_ErrorReporting_Config?.shouldActivateSentry === 'true';\n/**\n * Errors that happened before this script had a chance to load\n * are captured in a global array. See `./index.php`.\n */\nconst headErrors = window._jsErr || [];\nconst headErrorHandler = window._headJsErrorHandler;\n\nfunction activateSentry() {\n\tSentry.init( {\n\t\tdsn: 'https://658ae291b00242148af6b76494d4a49a@o248881.ingest.sentry.io/5876245',\n\t\tintegrations: [ new Integrations.BrowserTracing() ],\n\n\t\t// Set tracesSampleRate to 1.0 to capture 100%\n\t\t// of transactions for performance monitoring.\n\t\t// We recommend adjusting this value in production\n\t\trelease: 'wpcom-test-01',\n\t\ttracesSampleRate: 1.0,\n\t} );\n\n\t// We still need to report the head errors, if any.\n\theadErrors.forEach( ( error ) => Sentry.captureException( error ) );\n\tSentry.flush().then( () => delete window._jsErr );\n}\n\n// Activate the home-brew error-reporting\nfunction activateHomebrewErrorReporting() {\n\tconst reportError = ( { error } ) => {\n\t\t// Sanitized error event objects do not include a nested error attribute. In\n\t\t// that case, we return early to prevent a needless TypeError when defining\n\t\t// `data`, below. Also, sanitized errors don't include any useful information,\n\t\t// so the sensible thing to do is to completely ignore them.\n\t\tif ( ! error ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst data = {\n\t\t\tmessage: error.message,\n\t\t\ttrace: error.stack,\n\t\t\turl: document.location.href,\n\t\t\tfeature: 'wp-admin',\n\t\t};\n\n\t\treturn (\n\t\t\tapiFetch( {\n\t\t\t\tglobal: true,\n\t\t\t\tpath: '/rest/v1.1/js-error',\n\t\t\t\tmethod: 'POST',\n\t\t\t\tdata: { error: JSON.stringify( data ) },\n\t\t\t} )\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\t.catch( () => console.error( 'Error: Unable to record the error in Logstash.' ) )\n\t\t);\n\t};\n\n\twindow.addEventListener( 'error', reportError );\n\n\t// We still need to report the head errors, if any.\n\tPromise.allSettled( headErrors.map( reportError ) ).then( () => delete window._jsErr );\n}\n\nif ( shouldActivateSentry ) {\n\tactivateSentry();\n} else {\n\tactivateHomebrewErrorReporting();\n}\n\n// Remove the head handler as it's not needed anymore after we set the main one above (either Sentry or homebrew)\nwindow.removeEventListener( 'error', headErrorHandler );\ndelete window._headJsErrorHandler;\n"],"names":["BrowserBackend","_super","apply","this","arguments","prototype","eventFromException","exception","hint","_options","attachStacktrace","eventFromMessage","message","level","_setupTransport","dsn","call","transportOptions","tunnel","sendClientReports","_metadata","api","url","transport","requestOptions","fetchParameters","_newTransport","headers","BrowserClient","options","sdk","name","packages","version","showReportDialog","document","_isEnabled","getDsn","_prepareEvent","event","scope","platform","_sendEvent","integration","getIntegration","addSentryBreadcrumb","exceptionFromError","ex","frames","parseStackFrames","type","value","extractMessage","length","stacktrace","undefined","eventFromError","values","stack","popSize","framesToPop","reactMinifiedRegexp","test","getPopSize","e","error","eventFromUnknownInput","syntheticException","event_id","eventFromString","isUnhandledRejection","domException","name_1","tags","code","constructor","extra","__serialized__","frames_1","eventFromPlainObject","synthetic","input","frames_2","IS_DEBUG_BUILD","__SENTRY_DEBUG__","global","ignoreOnError","shouldIgnoreOnError","ignoreNextOnError","setTimeout","wrap","fn","before","wrapper","__sentry_wrapped__","sentryWrapped","args","Array","slice","wrappedArguments","map","arg","addEventProcessor","mechanism","property","Object","hasOwnProperty","_oO","getOwnPropertyDescriptor","configurable","defineProperty","get","injectReportDialog","eventId","script","createElement","async","src","onLoad","onload","injectionPoint","head","body","appendChild","Breadcrumbs","id","console","dom","fetch","history","sentry","xhr","addBreadcrumb","category","setupOnce","_consoleBreadcrumb","_innerDomBreadcrumb","handlerData","target","keyAttrs","serializeAttribute","_domBreadcrumb","_xhrBreadcrumb","_fetchBreadcrumb","_historyBreadcrumb","breadcrumb","data","logger","endTimestamp","__sentry_own_request__","_a","__sentry_xhr__","method","status_code","fetchData","match","response","status","from","to","parsedLoc","location","href","parsedFrom","parsedTo","path","protocol","host","relative","Dedupe","addGlobalEventProcessor","getCurrentHub","currentEvent","self","previousEvent","currentMessage","previousMessage","_isSameFingerprint","_isSameStacktrace","_isSameMessageEvent","previousException","_getExceptionFromEvent","currentException","_isSameExceptionEvent","_shouldDropEvent","_previousEvent","currentFrames","_getFramesFromEvent","previousFrames","i","frameA","frameB","filename","lineno","colno","function","currentFingerprint","fingerprint","previousFingerprint","join","GlobalHandlers","_installFunc","onerror","_installGlobalOnErrorHandler","onunhandledrejection","_installGlobalOnUnhandledRejectionHandler","Error","stackTraceLimit","key","installFunc","log","getHubAndAttachStacktrace","hub","msg","line","column","ERROR_TYPES_RE","groups","_enhanceEventWithInitialFrame","_eventFromIncompleteOnError","addMechanismAndCapture","reason","detail","String","ev","ev0","ev0s","ev0sf","isNaN","parseInt","push","in_app","handled","captureEvent","originalException","client","getClient","getOptions","LinkedErrors","_key","_limit","limit","linkedErrors","_walkErrorTree","_handler","DEFAULT_EVENT_TARGET","TryCatch","XMLHttpRequest","eventTarget","requestAnimationFrame","setInterval","_wrapTimeFunction","_wrapRAF","_wrapXHR","eventTargetOption","isArray","forEach","_wrapEventTarget","original","_i","originalCallback","callback","handler","originalSend","xmlHttpRequestProps","prop","wrapOptions","originalFunction","proto","eventName","handleEvent","bind","err","originalRemoveEventListener","wrappedEventHandler","originalEventHandler","UserAgent","navigator","request","referrer","userAgent","Referer","defaultIntegrations","init","release","window_1","SENTRY_RELEASE","autoSessionTracking","captureSession","startSessionOnHub","startSessionTracking","flush","timeout","startSession","ignoreDuration","UNKNOWN_FUNCTION","createFrame","func","frame","chromeRegex","chromeEvalRegex","chromeStackParser","parts","exec","indexOf","subMatch","extractSafariExtensionDetails","geckoREgex","geckoEvalRegex","geckoStackParser","winjsRegex","winjsStackParser","opera10Regex","opera10StackParser","opera11Regex","opera11StackParser","isSafariExtension","isSafariWebExtension","split","requestTypeToCategory","ty","BaseTransport","_this","_buffer","_rateLimits","_outcomes","_api","addEventListener","visibilityState","_flushOutcomes","sendEvent","_sendRequest","sendSession","session","close","drain","recordLostEvent","outcomes","keys","JSON","stringify","discardedEvents","quantity","envelope","_handleResponse","requestType","resolve","reject","_isRateLimited","_disabledUntil","Date","FetchTransport","fetchImpl","_fetch","sentryRequest","originalPayload","Promise","referrerPolicy","assign","add","then","catch","makeNewFetchTransport","nativeFetch","bufferSize","text","statusText","statusCode","makeNewXHRTransport","_reject","header","onreadystatechange","readyState","getResponseHeader","open","setRequestHeader","send","cachedFetchImpl","getNativeFetchImplementation","sandbox","hidden","contentWindow","removeChild","sendReport","toString","sendBeacon","fetch_1","credentials","keepalive","XHRTransport","extendStatics","d","b","setPrototypeOf","__proto__","p","__extends","__","create","__assign","t","s","n","__read","o","m","Symbol","iterator","r","ar","next","done","__spread","concat","API","metadata","_dsnObject","_tunnel","forceEnvelope","getBaseApiEndpoint","getStoreEndpoint","getStoreEndpointWithUrlEncodedAuth","getEnvelopeEndpointWithUrlEncodedAuth","initAPIDetails","initDsn","port","_getIngestEndpoint","projectId","_encodedAuth","sentry_key","publicKey","sentry_version","_getEnvelopeEndpoint","getReportDialogEndpoint","dsnLike","dialogOptions","endpoint","encodedOptions","user","encodeURIComponent","email","BaseBackend","_transport","_exception","_hint","_message","_level","_experiments","newTransport","env","getTransport","ALREADY_SEEN_ERROR","BaseClient","backendClass","_integrations","_numProcessing","_backend","_dsn","captureException","_process","_getBackend","_captureEvent","result","captureMessage","promisedEvent","_sendSession","update","_isClientDoneProcessing","clientFinished","transportFlushed","enabled","setupIntegrations","initialized","_updateSessionFromEvent","e_1","crashed","errored","exceptions","exceptions_1","exceptions_1_1","e_1_1","return","sessionNonTerminal","errors","Number","ticked","interval","clearInterval","_b","normalizeDepth","_c","normalizeMaxBreadth","prepared","timestamp","_applyClientOptions","_applyIntegrationsMetadata","finalScope","captureContext","applyToEvent","evt","sdkProcessingMetadata","_normalizeEvent","depth","maxBreadth","normalized","breadcrumbs","contexts","trace","baseClientNormalized","environment","dist","maxValueLength","integrationsArray","integrations","_processEvent","finalEvent","beforeSend","sampleRate","outcome","isTransaction","Math","random","__sentry__","rv","nullErr","_ensureBeforeSendRv","processedEvent","getSession","promise","installedIntegrations","filterDuplicates","reduce","acc","every","accIntegration","userIntegrations","filter","userIntegration","integrationsNames","alwaysLastToRun","splice","getIntegrationsToSetup","setupIntegration","originalFunctionToString","FunctionToString","Function","context","DEFAULT_IGNORE_ERRORS","InboundFilters","self_1","clientOptions","internalOptions","allowUrls","whitelistUrls","denyUrls","blacklistUrls","ignoreErrors","ignoreInternal","_mergeOptions","_isSentryError","oO","_getPossibleEventMessages","some","pattern","_isIgnoredError","_getEventFilterUrl","_isDeniedUrl","_isAllowedUrl","_getLastValidUrl","getSdkMetadataForEnvelopeHeader","enhanceEventWithSdkInfo","sdkInfo","createSessionEnvelope","envelopeHeaders","sent_at","toISOString","envelopeItem","sessionToSentryRequest","createEventEnvelope","eventType","transactionSampling","samplingMethod","rate","skippedNormalization","eventItem","sample_rates","eventToSentryRequest","useEnvelope","JSONStringifyError","newErr","innerErr","req","initAndBind","clientClass","debug","warn","getScope","initialScope","bindClient","createTransport","makeRequest","buffer","rateLimits","envCategory","getRateLimitReason","NoopTransport","_","SDK_VERSION","__values","TypeError","Hub","_version","_stack","getStackTop","isOlderThan","pushScope","getStack","popScope","pop","withScope","_lastEventId","finalHint","_invokeClient","lastEventId","beforeBreadcrumb","_d","maxBreadcrumbs","mergedBreadcrumb","finalBreadcrumb","setUser","setTags","setExtras","extras","setTag","setExtra","setContext","configureScope","run","oldHub","makeMain","startSpan","_callExtensionMethod","startTransaction","customSamplingContext","traceHeaders","endSession","_sendSessionUpdate","layer","setSession","getUser","currentSession","carrier","getMainCarrier","__SENTRY__","extensions","registry","getHubFromCarrier","setHubOnCarrier","hasHubOnCarrier","activeDomain","domain","active","registryHubTopStack","_Oo","getHubFromActiveDomain","Scope","_notifyingListeners","_scopeListeners","_eventProcessors","_breadcrumbs","_user","_tags","_extra","_contexts","_sdkProcessingMetadata","clone","newScope","_span","_session","_transactionName","_fingerprint","_requestSession","addScopeListener","_notifyScopeListeners","getRequestSession","setRequestSession","requestSession","setFingerprint","setLevel","setTransactionName","setTransaction","setSpan","span","getSpan","getTransaction","transaction","updatedScope","clear","maxCrumbs","min","clearBreadcrumbs","getTraceContext","transactionName","_applyFingerprint","_notifyEventProcessors","getGlobalEventProcessors","setSDKProcessingMetadata","newData","processors","index","processor","final","Session","sid","duration","startingTime","started","ipAddress","ip_address","did","username","toJSON","attrs","user_agent","callOnHub","registerBackgroundTabDetection","activeTransaction","statusType","op","setStatus","finish","DEFAULT_BROWSER_TRACING_OPTIONS","idleTimeout","markBackgroundTransactions","maxTransactionDuration","routingInstrumentation","startTransactionOnLocationChange","startTransactionOnPageLoad","BrowserTracing","_configuredIdleTimeout","tracingOrigins","_emitOptionsWarning","_metricOptions","_metrics","_reportAllChanges","_getCurrentHub","instrumentRouting","traceFetch","traceXHR","shouldCreateSpanForRequest","_createRouteTransaction","beforeNavigate","parentContextFromHeader","metaName","el","querySelector","getAttribute","getHeaderContext","expandedContext","trimEnd","modifiedContext","finalContext","sampled","idleTransaction","registerBeforeFinishCallback","addPerformanceEntries","maxDuration","diff","startTimestamp","adjustTransactionDuration","MetricsInstrumentation","_measurements","_performanceCursor","performance","mark","_trackCLS","_trackLCP","_trackFID","getEntries","responseStartTimestamp","requestStartTimestamp","timeOrigin","entry","startTime","entryType","addPerformanceNavigationTiming","_startChild","description","requestStart","responseEnd","responseStart","addRequest","addNavigationSpans","measureStartTimestamp","measureEndTimestamp","addMeasureSpans","firstHidden","shouldRecord","firstHiddenTime","resourceName","replace","origin","initiatorType","transferSize","encodedBodySize","decodedBodySize","addResourceSpans","max","_trackNavigator","timeOrigin_1","oldValue","measurementTimestamp","normalizedValue","abs","delta","cls","setMeasurements","lcpEntry","clsEntry","element","trim","size","sources","source","node","tagMetricInfo","_lcpEntry","_clsEntry","connection","effectiveType","isMeasurementValue","rtt","downlink","deviceMemory","hardwareConcurrency","metric","entries","eventEnd","end","start","ctx","startChild","isFinite","defaultRequestInstrumentationOptions","instrumentOutgoingRequests","urlMap","defaultShouldCreateSpan","origins","shouldCreateSpan","spans","spanId","__span","setHttpStatus","Request","append","toTraceparent","fetchCallback","__sentry_xhr_span_id__","xhrCallback","instrumentRoutingWithDefaults","customStartTransaction","startingUrl","pathname","getCLS","onReport","reportAllChanges","report","sessionValue","sessionEntries","entryHandler","hadRecentInput","firstSessionEntry","lastSessionEntry","po","takeRecords","getFID","visibilityWatcher","processingStart","disconnect","reportedMetricIDs","getLCP","stopListening_1","once","capture","bindReporter","prevValue","forceReport","generateUniqueID","now","floor","getVisibilityWatcher","Infinity","timeStamp","initMetric","observe","PerformanceObserver","supportedEntryTypes","includes","l","buffered","onHidden","cb","onHiddenOrPageHide","removeEventListener","FINISH_REASON_TAG","IDLE_TRANSACTION_FINISH_REASONS","sample","samplingContext","setMetadata","tracesSampler","parentSampled","tracesSampleRate","isValidSampleRate","startIdleTransaction","transactionContext","onScope","initSpanRecorder","maxSpans","DEFAULT_IDLE_TIMEOUT","IdleTransactionSpanRecorder","_pushActivity","_popActivity","transactionSpanId","maxlen","IdleTransaction","_idleHub","_idleTimeout","_onScope","activities","_heartbeatCounter","_finished","_beforeFinishCallbacks","clearActiveTransaction","_initTimeout","spanRecorder","keepSpan","_pingHeartbeat","clearTimeout","end_1","_beat","heartbeatString","_prevHeartbeatString","SpanRecorder","_maxlen","Span","spanContext","traceId","substring","parentSpanId","child","childSpan","setData","httpStatus","spanStatus","spanStatusfromHttpCode","isSuccess","sampledString","toContext","updateWithContext","_e","parent_span_id","span_id","trace_id","start_timestamp","Transaction","_hub","_trimEnd","setName","measurements","newMetadata","finishedSpans","prev","current","hasTracingEnabled","maybeOptions","getActiveTransaction","maybeHub","msToSec","time","secToMs","__rest","getOwnPropertySymbols","propertyIsEnumerable","Severity","forget","htmlTreeAsString","elem","currentElem","out","height","len","sepLength","nextStr","_htmlElementAsString","parentNode","reverse","className","classes","attr","tagName","toLowerCase","keyAttrPairs","keyAttr","keyAttrPair","allowedAttrs","getLocationHref","createClientReportEnvelope","discarded_events","clientReportItem","DSN_REGEX","dsnToString","withPassword","pass","dsnFromComponents","components","makeDsn","str","projectMatch","dsnFromString","component","isValidProtocol","validateDsn","SeverityLevels","isBrowserBundle","__SENTRY_BROWSER_BUNDLE__","createEnvelope","items","getEnvelopeType","serializeEnvelope","serializedHeaders","item","itemHeaders","payload","serializedPayload","SentryError","_newTarget","fallbackGlobalObject","getGlobalObject","window","getGlobalSingleton","creator","obj","lastHref","handlers","instrumented","instrument","originalConsoleMethod","triggerHandlers","instrumentConsole","triggerDOMHandler","globalDOMEventHandler","makeDOMEventHandler","originalAddEventListener","listener","handlers_1","__sentry_instrumentation_handlers__","handlerForType","refCount","handlers_2","instrumentDOM","xhrproto","originalOpen","xhrInfo","toUpperCase","onreadystatechangeHandler","readyStateArgs","instrumentXHR","originalFetch","getFetchMethod","getFetchUrl","instrumentFetch","oldOnPopState","onpopstate","historyReplacementFunction","originalHistoryFunction","instrumentHistory","_oldOnErrorHandler","_oldOnUnhandledRejectionHandler","addInstrumentationHandler","fetchArgs","debounceTimerID","lastCapturedEvent","globalListener","isContentEditable","shouldSkipDOMEvent","previous","shouldShortcircuitPreviousDebounce","objectToString","isError","wat","isInstanceOf","isBuiltin","isErrorEvent","isDOMError","isDOMException","isString","isPrimitive","isPlainObject","isEvent","Event","isElement","Element","isRegExp","isThenable","Boolean","isSyntheticEvent","base","PREFIX","CONSOLE_LEVELS","consoleSandbox","originalConsole","wrappedLevels","originalWrappedFunc","__sentry_original__","makeLogger","enable","disable","memoBuilder","hasWeakSet","WeakSet","inner","has","delete","uuid4","crypto","msCrypto","getRandomValues","arr","Uint16Array","pad","num","v","c","parseUrl","query","fragment","getFirstException","getEventDescription","firstException","addExceptionTypeValue","addExceptionMechanism","newMechanism","currentMechanism","mergedData","checkOrSetAlreadyCaught","__sentry_captured__","isNodeEnv","process","dynamicRequire","mod","require","normalize","maxProperties","visit","ERROR","normalizeToSize","object","maxSize","encodeURI","utf8Length","memo","memoize","unmemoize","valueWithToJSON","stringified","_events","getPrototypeOf","stringifyValue","startsWith","numAdded","visitable","visitKey","visitValue","fill","replacementFactory","wrapped","markFunctionWrapped","addNonEnumerableProperty","writable","getOriginalFunction","urlEncode","convertToPlainObject","newObj","getOwnProperties","event_1","serializeEventTarget","currentTarget","CustomEvent","extractedProps","extractExceptionKeysForMessage","maxLength","sort","includedKeys","serialized","dropUndefinedKeys","val","makePromiseBuffer","remove","task","$","taskProducer","counter","capturedSetTimeout","disabledUntil","limits","all","isRateLimited","updateRateLimits","e_2","updatedRateLimits","rateLimitHeader","retryAfterHeader","parameters","headerDelay","delay","_f","e_2_1","headerDate","parse","parseRetryAfterHeader","severityFromString","isSupportedSeverity","createStackParser","parsers","sortedParsers","a","skipFirst","sortedParsers_1","sortedParsers_1_1","parser","stripSentryFramesAndReverse","localStack","firstFrameFunction","lastFrameFunction","defaultFunctionName","getFunctionName","eventStatusFromHttpCode","truncate","substr","safeJoin","delimiter","output","isMatchingPattern","supportsFetch","Headers","Response","isNativeFetch","supportsNativeFetch","doc","supportsReferrerPolicy","supportsHistory","chrome","isChromePackagedApp","app","runtime","hasHistoryApi","pushState","replaceState","resolvedSyncPromise","SyncPromise","rejectedSyncPromise","executor","_state","_handlers","_resolve","_setResult","state","_value","_executeHandlers","cachedHandlers","onfulfilled","onrejected","finally","onfinally","isRejected","dateTimestampSource","nowSeconds","platformPerformance","module","getNodePerformance","getBrowserPerformance","timestampSource","dateTimestampInSeconds","timestampInSeconds","timestampWithMs","browserPerformanceTimeOrigin","threshold","performanceNow","dateNow","timeOriginDelta","timeOriginIsReliable","navigationStart","timing","navigationStartDelta","TRACEPARENT_REGEXP","RegExp","extractTraceparentData","traceparent","matches","exports","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","loaded","__webpack_modules__","getter","__esModule","definition","enumerable","hmd","children","set","toStringTag","shouldActivateSentry","A8C_ETK_ErrorReporting_Config","headErrors","_jsErr","headErrorHandler","_headJsErrorHandler","Sentry","Integrations","reportError","feature","apiFetch","allSettled","activateHomebrewErrorReporting"],"sourceRoot":""}
|
1 |
+
{"version":3,"file":"error-reporting.min.js","mappings":"2LAUIA,EAAgC,SAAUC,GAE1C,SAASD,IACL,OAAkB,OAAXC,GAAmBA,EAAOC,MAAMC,KAAMC,YAAcD,KAwC/D,OA1CA,QAAUH,EAAgBC,GAO1BD,EAAeK,UAAUC,mBAAqB,SAAUC,EAAWC,GAC/D,OAAO,QAAmBD,EAAWC,EAAML,KAAKM,SAASC,mBAK7DV,EAAeK,UAAUM,iBAAmB,SAAUC,EAASC,EAAOL,GAElE,YADc,IAAVK,IAAoBA,EAAQ,WACzB,QAAiBD,EAASC,EAAOL,EAAML,KAAKM,SAASC,mBAKhEV,EAAeK,UAAUS,gBAAkB,WACvC,IAAKX,KAAKM,SAASM,IAEf,OAAOd,EAAOI,UAAUS,gBAAgBE,KAAKb,MAEjD,IAAIc,GAAmB,SAAS,QAAS,GAAId,KAAKM,SAASQ,kBAAmB,CAAEF,IAAKZ,KAAKM,SAASM,IAAKG,OAAQf,KAAKM,SAASS,OAAQC,kBAAmBhB,KAAKM,SAASU,kBAAmBC,UAAWjB,KAAKM,SAASW,YAC/MC,GAAM,QAAeJ,EAAiBF,IAAKE,EAAiBG,UAAWH,EAAiBC,QACxFI,GAAM,QAAsCD,EAAIN,IAAKM,EAAIH,QAC7D,GAAIf,KAAKM,SAASc,UACd,OAAO,IAAIpB,KAAKM,SAASc,UAAUN,GAEvC,IAAI,UAAiB,CACjB,IAAIO,GAAiB,QAAS,GAAIP,EAAiBQ,iB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jiC,IAAK,4EAIL6Q,QAAS,kBAIVgxB,EAAW5yB,SAAW/L,GAAW++B,EAAAA,GAAyB/+B,KAC1D++B,EAAAA,KAAexsB,MAAM,WAAasa,OAAO+R,UAI1C,WACC,MAAMI,EAAc,IAAiB,IAAf,MAAEh/B,GAAa,EAKpC,IAAOA,EACN,OAGD,MAAMiF,EAAO,CACZtI,QAASqD,EAAMrD,QACf+e,MAAO1b,EAAMP,MACbpC,IAAKa,SAAS8H,SAASC,KACvBg5B,QAAS,YAGV,OACCC,GAAAA,CAAU,CACT99B,QAAQ,EACRgF,KAAM,sBACNb,OAAQ,OACRN,KAAM,CAAEjF,MAAOkR,KAAKC,UAAWlM,MAG9BuN,OAAO,IAAM3O,QAAQ7D,MAAO,qDAIhC6sB,OAAOvc,iBAAkB,QAAS0uB,GAGlC7sB,QAAQgtB,WAAYR,EAAWx8B,IAAK68B,IAAgBzsB,MAAM,WAAasa,OAAO+R,SAM9EQ,GAIDvS,OAAOwS,oBAAqB,QAASR,UAC9BhS,OAAOiS,oB","sources":["webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/backend.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/client.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/eventbuilder.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/flags.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/helpers.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/integrations/breadcrumbs.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/integrations/dedupe.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/integrations/globalhandlers.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/integrations/linkederrors.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/integrations/trycatch.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/integrations/useragent.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/sdk.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/stack-parsers.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/transports/base.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/transports/fetch.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/transports/new-fetch.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/transports/new-xhr.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/transports/utils.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/transports/xhr.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/node_modules/tslib/tslib.es6.js","webpack://EditingToolkit/../../node_modules/@sentry/core/esm/api.js","webpack://EditingToolkit/../../node_modules/@sentry/core/esm/basebackend.js","webpack://EditingToolkit/../../node_modules/@sentry/core/esm/baseclient.js","webpack://EditingToolkit/../../node_modules/@sentry/core/esm/flags.js","webpack://EditingToolkit/../../node_modules/@sentry/core/esm/integration.js","webpack://EditingToolkit/../../node_modules/@sentry/core/esm/integrations/functiontostring.js","webpack://EditingToolkit/../../node_modules/@sentry/core/esm/integrations/inboundfilters.js","webpack://EditingToolkit/../../node_modules/@sentry/core/esm/request.js","webpack://EditingToolkit/../../node_modules/@sentry/core/esm/sdk.js","webpack://EditingToolkit/../../node_modules/@sentry/core/esm/transports/base.js","webpack://EditingToolkit/../../node_modules/@sentry/core/esm/transports/noop.js","webpack://EditingToolkit/../../node_modules/@sentry/core/esm/version.js","webpack://EditingToolkit/../../node_modules/@sentry/core/node_modules/tslib/tslib.es6.js","webpack://EditingToolkit/../../node_modules/@sentry/hub/esm/flags.js","webpack://EditingToolkit/../../node_modules/@sentry/hub/esm/hub.js","webpack://EditingToolkit/../../node_modules/@sentry/hub/esm/scope.js","webpack://EditingToolkit/../../node_modules/@sentry/hub/esm/session.js","webpack://EditingToolkit/../../node_modules/@sentry/hub/node_modules/tslib/tslib.es6.js","webpack://EditingToolkit/../../node_modules/@sentry/minimal/esm/index.js","webpack://EditingToolkit/../../node_modules/@sentry/minimal/node_modules/tslib/tslib.es6.js","webpack://EditingToolkit/../../node_modules/@sentry/types/esm/severity.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/async.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/browser.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/clientreport.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/dsn.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/enums.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/env.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/envelope.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/error.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/flags.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/global.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/instrument.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/is.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/logger.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/memo.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/misc.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/node.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/normalize.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/object.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/polyfill.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/promisebuffer.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/ratelimit.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/severity.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/stacktrace.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/status.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/string.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/supports.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/syncpromise.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/time.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/node_modules/tslib/tslib.es6.js","webpack://EditingToolkit/external window [\"wp\",\"apiFetch\"]","webpack://EditingToolkit/webpack/bootstrap","webpack://EditingToolkit/webpack/runtime/compat get default export","webpack://EditingToolkit/webpack/runtime/define property getters","webpack://EditingToolkit/webpack/runtime/harmony module decorator","webpack://EditingToolkit/webpack/runtime/hasOwnProperty shorthand","webpack://EditingToolkit/webpack/runtime/make namespace object","webpack://EditingToolkit/./editing-toolkit-plugin/error-reporting/index.js"],"sourcesContent":["import { __assign, __extends } from \"tslib\";\nimport { BaseBackend, getEnvelopeEndpointWithUrlEncodedAuth, initAPIDetails } from '@sentry/core';\nimport { Severity } from '@sentry/types';\nimport { supportsFetch } from '@sentry/utils';\nimport { eventFromException, eventFromMessage } from './eventbuilder';\nimport { FetchTransport, makeNewFetchTransport, makeNewXHRTransport, XHRTransport } from './transports';\n/**\n * The Sentry Browser SDK Backend.\n * @hidden\n */\nvar BrowserBackend = /** @class */ (function (_super) {\n __extends(BrowserBackend, _super);\n function BrowserBackend() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @inheritDoc\n */\n BrowserBackend.prototype.eventFromException = function (exception, hint) {\n return eventFromException(exception, hint, this._options.attachStacktrace);\n };\n /**\n * @inheritDoc\n */\n BrowserBackend.prototype.eventFromMessage = function (message, level, hint) {\n if (level === void 0) { level = Severity.Info; }\n return eventFromMessage(message, level, hint, this._options.attachStacktrace);\n };\n /**\n * @inheritDoc\n */\n BrowserBackend.prototype._setupTransport = function () {\n if (!this._options.dsn) {\n // We return the noop transport here in case there is no Dsn.\n return _super.prototype._setupTransport.call(this);\n }\n var transportOptions = __assign(__assign({}, this._options.transportOptions), { dsn: this._options.dsn, tunnel: this._options.tunnel, sendClientReports: this._options.sendClientReports, _metadata: this._options._metadata });\n var api = initAPIDetails(transportOptions.dsn, transportOptions._metadata, transportOptions.tunnel);\n var url = getEnvelopeEndpointWithUrlEncodedAuth(api.dsn, api.tunnel);\n if (this._options.transport) {\n return new this._options.transport(transportOptions);\n }\n if (supportsFetch()) {\n var requestOptions = __assign({}, transportOptions.fetchParameters);\n this._newTransport = makeNewFetchTransport({ requestOptions: requestOptions, url: url });\n return new FetchTransport(transportOptions);\n }\n this._newTransport = makeNewXHRTransport({\n url: url,\n headers: transportOptions.headers,\n });\n return new XHRTransport(transportOptions);\n };\n return BrowserBackend;\n}(BaseBackend));\nexport { BrowserBackend };\n//# sourceMappingURL=backend.js.map","import { __assign, __extends } from \"tslib\";\nimport { BaseClient, SDK_VERSION } from '@sentry/core';\nimport { getGlobalObject, logger } from '@sentry/utils';\nimport { BrowserBackend } from './backend';\nimport { IS_DEBUG_BUILD } from './flags';\nimport { injectReportDialog } from './helpers';\nimport { Breadcrumbs } from './integrations';\n/**\n * The Sentry Browser SDK Client.\n *\n * @see BrowserOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nvar BrowserClient = /** @class */ (function (_super) {\n __extends(BrowserClient, _super);\n /**\n * Creates a new Browser SDK instance.\n *\n * @param options Configuration options for this SDK.\n */\n function BrowserClient(options) {\n if (options === void 0) { options = {}; }\n var _this = this;\n options._metadata = options._metadata || {};\n options._metadata.sdk = options._metadata.sdk || {\n name: 'sentry.javascript.browser',\n packages: [\n {\n name: 'npm:@sentry/browser',\n version: SDK_VERSION,\n },\n ],\n version: SDK_VERSION,\n };\n _this = _super.call(this, BrowserBackend, options) || this;\n return _this;\n }\n /**\n * Show a report dialog to the user to send feedback to a specific event.\n *\n * @param options Set individual options for the dialog\n */\n BrowserClient.prototype.showReportDialog = function (options) {\n if (options === void 0) { options = {}; }\n // doesn't work without a document (React Native)\n var document = getGlobalObject().document;\n if (!document) {\n return;\n }\n if (!this._isEnabled()) {\n IS_DEBUG_BUILD && logger.error('Trying to call showReportDialog with Sentry Client disabled');\n return;\n }\n injectReportDialog(__assign(__assign({}, options), { dsn: options.dsn || this.getDsn() }));\n };\n /**\n * @inheritDoc\n */\n BrowserClient.prototype._prepareEvent = function (event, scope, hint) {\n event.platform = event.platform || 'javascript';\n return _super.prototype._prepareEvent.call(this, event, scope, hint);\n };\n /**\n * @inheritDoc\n */\n BrowserClient.prototype._sendEvent = function (event) {\n var integration = this.getIntegration(Breadcrumbs);\n if (integration) {\n integration.addSentryBreadcrumb(event);\n }\n _super.prototype._sendEvent.call(this, event);\n };\n return BrowserClient;\n}(BaseClient));\nexport { BrowserClient };\n//# sourceMappingURL=client.js.map","import { __assign } from \"tslib\";\nimport { Severity } from '@sentry/types';\nimport { addExceptionMechanism, addExceptionTypeValue, createStackParser, extractExceptionKeysForMessage, isDOMError, isDOMException, isError, isErrorEvent, isEvent, isPlainObject, normalizeToSize, resolvedSyncPromise, } from '@sentry/utils';\nimport { chromeStackParser, geckoStackParser, opera10StackParser, opera11StackParser, winjsStackParser, } from './stack-parsers';\n/**\n * This function creates an exception from an TraceKitStackTrace\n * @param stacktrace TraceKitStackTrace that will be converted to an exception\n * @hidden\n */\nexport function exceptionFromError(ex) {\n // Get the frames first since Opera can lose the stack if we touch anything else first\n var frames = parseStackFrames(ex);\n var exception = {\n type: ex && ex.name,\n value: extractMessage(ex),\n };\n if (frames.length) {\n exception.stacktrace = { frames: frames };\n }\n if (exception.type === undefined && exception.value === '') {\n exception.value = 'Unrecoverable error caught';\n }\n return exception;\n}\n/**\n * @hidden\n */\nexport function eventFromPlainObject(exception, syntheticException, isUnhandledRejection) {\n var event = {\n exception: {\n values: [\n {\n type: isEvent(exception) ? exception.constructor.name : isUnhandledRejection ? 'UnhandledRejection' : 'Error',\n value: \"Non-Error \" + (isUnhandledRejection ? 'promise rejection' : 'exception') + \" captured with keys: \" + extractExceptionKeysForMessage(exception),\n },\n ],\n },\n extra: {\n __serialized__: normalizeToSize(exception),\n },\n };\n if (syntheticException) {\n var frames_1 = parseStackFrames(syntheticException);\n if (frames_1.length) {\n event.stacktrace = { frames: frames_1 };\n }\n }\n return event;\n}\n/**\n * @hidden\n */\nexport function eventFromError(ex) {\n return {\n exception: {\n values: [exceptionFromError(ex)],\n },\n };\n}\n/** Parses stack frames from an error */\nexport function parseStackFrames(ex) {\n // Access and store the stacktrace property before doing ANYTHING\n // else to it because Opera is not very good at providing it\n // reliably in other circumstances.\n var stacktrace = ex.stacktrace || ex.stack || '';\n var popSize = getPopSize(ex);\n try {\n return createStackParser(opera10StackParser, opera11StackParser, chromeStackParser, winjsStackParser, geckoStackParser)(stacktrace, popSize);\n }\n catch (e) {\n // no-empty\n }\n return [];\n}\n// Based on our own mapping pattern - https://github.com/getsentry/sentry/blob/9f08305e09866c8bd6d0c24f5b0aabdd7dd6c59c/src/sentry/lang/javascript/errormapping.py#L83-L108\nvar reactMinifiedRegexp = /Minified React error #\\d+;/i;\nfunction getPopSize(ex) {\n if (ex) {\n if (typeof ex.framesToPop === 'number') {\n return ex.framesToPop;\n }\n if (reactMinifiedRegexp.test(ex.message)) {\n return 1;\n }\n }\n return 0;\n}\n/**\n * There are cases where stacktrace.message is an Event object\n * https://github.com/getsentry/sentry-javascript/issues/1949\n * In this specific case we try to extract stacktrace.message.error.message\n */\nfunction extractMessage(ex) {\n var message = ex && ex.message;\n if (!message) {\n return 'No error message';\n }\n if (message.error && typeof message.error.message === 'string') {\n return message.error.message;\n }\n return message;\n}\n/**\n * Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.\n * @hidden\n */\nexport function eventFromException(exception, hint, attachStacktrace) {\n var syntheticException = (hint && hint.syntheticException) || undefined;\n var event = eventFromUnknownInput(exception, syntheticException, attachStacktrace);\n addExceptionMechanism(event); // defaults to { type: 'generic', handled: true }\n event.level = Severity.Error;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n}\n/**\n * Builds and Event from a Message\n * @hidden\n */\nexport function eventFromMessage(message, level, hint, attachStacktrace) {\n if (level === void 0) { level = Severity.Info; }\n var syntheticException = (hint && hint.syntheticException) || undefined;\n var event = eventFromString(message, syntheticException, attachStacktrace);\n event.level = level;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n}\n/**\n * @hidden\n */\nexport function eventFromUnknownInput(exception, syntheticException, attachStacktrace, isUnhandledRejection) {\n var event;\n if (isErrorEvent(exception) && exception.error) {\n // If it is an ErrorEvent with `error` property, extract it to get actual Error\n var errorEvent = exception;\n return eventFromError(errorEvent.error);\n }\n // If it is a `DOMError` (which is a legacy API, but still supported in some browsers) then we just extract the name\n // and message, as it doesn't provide anything else. According to the spec, all `DOMExceptions` should also be\n // `Error`s, but that's not the case in IE11, so in that case we treat it the same as we do a `DOMError`.\n //\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMError\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMException\n // https://webidl.spec.whatwg.org/#es-DOMException-specialness\n if (isDOMError(exception) || isDOMException(exception)) {\n var domException = exception;\n if ('stack' in exception) {\n event = eventFromError(exception);\n }\n else {\n var name_1 = domException.name || (isDOMError(domException) ? 'DOMError' : 'DOMException');\n var message = domException.message ? name_1 + \": \" + domException.message : name_1;\n event = eventFromString(message, syntheticException, attachStacktrace);\n addExceptionTypeValue(event, message);\n }\n if ('code' in domException) {\n event.tags = __assign(__assign({}, event.tags), { 'DOMException.code': \"\" + domException.code });\n }\n return event;\n }\n if (isError(exception)) {\n // we have a real Error object, do nothing\n return eventFromError(exception);\n }\n if (isPlainObject(exception) || isEvent(exception)) {\n // If it's a plain object or an instance of `Event` (the built-in JS kind, not this SDK's `Event` type), serialize\n // it manually. This will allow us to group events based on top-level keys which is much better than creating a new\n // group on any key/value change.\n var objectException = exception;\n event = eventFromPlainObject(objectException, syntheticException, isUnhandledRejection);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n return event;\n }\n // If none of previous checks were valid, then it means that it's not:\n // - an instance of DOMError\n // - an instance of DOMException\n // - an instance of Event\n // - an instance of Error\n // - a valid ErrorEvent (one with an error property)\n // - a plain Object\n //\n // So bail out and capture it as a simple message:\n event = eventFromString(exception, syntheticException, attachStacktrace);\n addExceptionTypeValue(event, \"\" + exception, undefined);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n return event;\n}\n/**\n * @hidden\n */\nexport function eventFromString(input, syntheticException, attachStacktrace) {\n var event = {\n message: input,\n };\n if (attachStacktrace && syntheticException) {\n var frames_2 = parseStackFrames(syntheticException);\n if (frames_2.length) {\n event.stacktrace = { frames: frames_2 };\n }\n }\n return event;\n}\n//# sourceMappingURL=eventbuilder.js.map","/*\n * This file defines flags and constants that can be modified during compile time in order to facilitate tree shaking\n * for users.\n *\n * Debug flags need to be declared in each package individually and must not be imported across package boundaries,\n * because some build tools have trouble tree-shaking imported guards.\n *\n * As a convention, we define debug flags in a `flags.ts` file in the root of a package's `src` folder.\n *\n * Debug flag files will contain \"magic strings\" like `__SENTRY_DEBUG__` that may get replaced with actual values during\n * our, or the user's build process. Take care when introducing new flags - they must not throw if they are not\n * replaced.\n */\n/** Flag that is true for debug builds, false otherwise. */\nexport var IS_DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' ? true : __SENTRY_DEBUG__;\n//# sourceMappingURL=flags.js.map","import { __assign } from \"tslib\";\nimport { captureException, getReportDialogEndpoint, withScope } from '@sentry/core';\nimport { addExceptionMechanism, addExceptionTypeValue, addNonEnumerableProperty, getGlobalObject, getOriginalFunction, logger, markFunctionWrapped, } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from './flags';\nvar global = getGlobalObject();\nvar ignoreOnError = 0;\n/**\n * @hidden\n */\nexport function shouldIgnoreOnError() {\n return ignoreOnError > 0;\n}\n/**\n * @hidden\n */\nexport function ignoreNextOnError() {\n // onerror should trigger before setTimeout\n ignoreOnError += 1;\n setTimeout(function () {\n ignoreOnError -= 1;\n });\n}\n/**\n * Instruments the given function and sends an event to Sentry every time the\n * function throws an exception.\n *\n * @param fn A function to wrap.\n * @returns The wrapped function.\n * @hidden\n */\nexport function wrap(fn, options, before) {\n // for future readers what this does is wrap a function and then create\n // a bi-directional wrapping between them.\n //\n // example: wrapped = wrap(original);\n // original.__sentry_wrapped__ -> wrapped\n // wrapped.__sentry_original__ -> original\n if (options === void 0) { options = {}; }\n if (typeof fn !== 'function') {\n return fn;\n }\n try {\n // if we're dealing with a function that was previously wrapped, return\n // the original wrapper.\n var wrapper = fn.__sentry_wrapped__;\n if (wrapper) {\n return wrapper;\n }\n // We don't wanna wrap it twice\n if (getOriginalFunction(fn)) {\n return fn;\n }\n }\n catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n // Bail on wrapping and return the function as-is (defers to window.onerror).\n return fn;\n }\n /* eslint-disable prefer-rest-params */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var sentryWrapped = function () {\n var args = Array.prototype.slice.call(arguments);\n try {\n if (before && typeof before === 'function') {\n before.apply(this, arguments);\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n var wrappedArguments = args.map(function (arg) { return wrap(arg, options); });\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means the sentry.javascript SDK caught an error invoking your application code. This\n // is expected behavior and NOT indicative of a bug with sentry.javascript.\n return fn.apply(this, wrappedArguments);\n }\n catch (ex) {\n ignoreNextOnError();\n withScope(function (scope) {\n scope.addEventProcessor(function (event) {\n if (options.mechanism) {\n addExceptionTypeValue(event, undefined, undefined);\n addExceptionMechanism(event, options.mechanism);\n }\n event.extra = __assign(__assign({}, event.extra), { arguments: args });\n return event;\n });\n captureException(ex);\n });\n throw ex;\n }\n };\n /* eslint-enable prefer-rest-params */\n // Accessing some objects may throw\n // ref: https://github.com/getsentry/sentry-javascript/issues/1168\n try {\n for (var property in fn) {\n if (Object.prototype.hasOwnProperty.call(fn, property)) {\n sentryWrapped[property] = fn[property];\n }\n }\n }\n catch (_oO) { } // eslint-disable-line no-empty\n // Signal that this function has been wrapped/filled already\n // for both debugging and to prevent it to being wrapped/filled twice\n markFunctionWrapped(sentryWrapped, fn);\n addNonEnumerableProperty(fn, '__sentry_wrapped__', sentryWrapped);\n // Restore original function name (not all browsers allow that)\n try {\n var descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name');\n if (descriptor.configurable) {\n Object.defineProperty(sentryWrapped, 'name', {\n get: function () {\n return fn.name;\n },\n });\n }\n // eslint-disable-next-line no-empty\n }\n catch (_oO) { }\n return sentryWrapped;\n}\n/**\n * Injects the Report Dialog script\n * @hidden\n */\nexport function injectReportDialog(options) {\n if (options === void 0) { options = {}; }\n if (!global.document) {\n return;\n }\n if (!options.eventId) {\n IS_DEBUG_BUILD && logger.error('Missing eventId option in showReportDialog call');\n return;\n }\n if (!options.dsn) {\n IS_DEBUG_BUILD && logger.error('Missing dsn option in showReportDialog call');\n return;\n }\n var script = global.document.createElement('script');\n script.async = true;\n script.src = getReportDialogEndpoint(options.dsn, options);\n if (options.onLoad) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n script.onload = options.onLoad;\n }\n var injectionPoint = global.document.head || global.document.body;\n if (injectionPoint) {\n injectionPoint.appendChild(script);\n }\n}\n//# sourceMappingURL=helpers.js.map","import { __assign } from \"tslib\";\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable max-lines */\nimport { getCurrentHub } from '@sentry/core';\nimport { Severity } from '@sentry/types';\nimport { addInstrumentationHandler, getEventDescription, getGlobalObject, htmlTreeAsString, parseUrl, safeJoin, severityFromString, } from '@sentry/utils';\n/**\n * Default Breadcrumbs instrumentations\n * TODO: Deprecated - with v6, this will be renamed to `Instrument`\n */\nvar Breadcrumbs = /** @class */ (function () {\n /**\n * @inheritDoc\n */\n function Breadcrumbs(options) {\n /**\n * @inheritDoc\n */\n this.name = Breadcrumbs.id;\n this._options = __assign({ console: true, dom: true, fetch: true, history: true, sentry: true, xhr: true }, options);\n }\n /**\n * Create a breadcrumb of `sentry` from the events themselves\n */\n Breadcrumbs.prototype.addSentryBreadcrumb = function (event) {\n if (!this._options.sentry) {\n return;\n }\n getCurrentHub().addBreadcrumb({\n category: \"sentry.\" + (event.type === 'transaction' ? 'transaction' : 'event'),\n event_id: event.event_id,\n level: event.level,\n message: getEventDescription(event),\n }, {\n event: event,\n });\n };\n /**\n * Instrument browser built-ins w/ breadcrumb capturing\n * - Console API\n * - DOM API (click/typing)\n * - XMLHttpRequest API\n * - Fetch API\n * - History API\n */\n Breadcrumbs.prototype.setupOnce = function () {\n if (this._options.console) {\n addInstrumentationHandler('console', _consoleBreadcrumb);\n }\n if (this._options.dom) {\n addInstrumentationHandler('dom', _domBreadcrumb(this._options.dom));\n }\n if (this._options.xhr) {\n addInstrumentationHandler('xhr', _xhrBreadcrumb);\n }\n if (this._options.fetch) {\n addInstrumentationHandler('fetch', _fetchBreadcrumb);\n }\n if (this._options.history) {\n addInstrumentationHandler('history', _historyBreadcrumb);\n }\n };\n /**\n * @inheritDoc\n */\n Breadcrumbs.id = 'Breadcrumbs';\n return Breadcrumbs;\n}());\nexport { Breadcrumbs };\n/**\n * A HOC that creaes a function that creates breadcrumbs from DOM API calls.\n * This is a HOC so that we get access to dom options in the closure.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _domBreadcrumb(dom) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function _innerDomBreadcrumb(handlerData) {\n var target;\n var keyAttrs = typeof dom === 'object' ? dom.serializeAttribute : undefined;\n if (typeof keyAttrs === 'string') {\n keyAttrs = [keyAttrs];\n }\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n target = handlerData.event.target\n ? htmlTreeAsString(handlerData.event.target, keyAttrs)\n : htmlTreeAsString(handlerData.event, keyAttrs);\n }\n catch (e) {\n target = '<unknown>';\n }\n if (target.length === 0) {\n return;\n }\n getCurrentHub().addBreadcrumb({\n category: \"ui.\" + handlerData.name,\n message: target,\n }, {\n event: handlerData.event,\n name: handlerData.name,\n global: handlerData.global,\n });\n }\n return _innerDomBreadcrumb;\n}\n/**\n * Creates breadcrumbs from console API calls\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _consoleBreadcrumb(handlerData) {\n var breadcrumb = {\n category: 'console',\n data: {\n arguments: handlerData.args,\n logger: 'console',\n },\n level: severityFromString(handlerData.level),\n message: safeJoin(handlerData.args, ' '),\n };\n if (handlerData.level === 'assert') {\n if (handlerData.args[0] === false) {\n breadcrumb.message = \"Assertion failed: \" + (safeJoin(handlerData.args.slice(1), ' ') || 'console.assert');\n breadcrumb.data.arguments = handlerData.args.slice(1);\n }\n else {\n // Don't capture a breadcrumb for passed assertions\n return;\n }\n }\n getCurrentHub().addBreadcrumb(breadcrumb, {\n input: handlerData.args,\n level: handlerData.level,\n });\n}\n/**\n * Creates breadcrumbs from XHR API calls\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _xhrBreadcrumb(handlerData) {\n if (handlerData.endTimestamp) {\n // We only capture complete, non-sentry requests\n if (handlerData.xhr.__sentry_own_request__) {\n return;\n }\n var _a = handlerData.xhr.__sentry_xhr__ || {}, method = _a.method, url = _a.url, status_code = _a.status_code, body = _a.body;\n getCurrentHub().addBreadcrumb({\n category: 'xhr',\n data: {\n method: method,\n url: url,\n status_code: status_code,\n },\n type: 'http',\n }, {\n xhr: handlerData.xhr,\n input: body,\n });\n return;\n }\n}\n/**\n * Creates breadcrumbs from fetch API calls\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _fetchBreadcrumb(handlerData) {\n // We only capture complete fetch requests\n if (!handlerData.endTimestamp) {\n return;\n }\n if (handlerData.fetchData.url.match(/sentry_key/) && handlerData.fetchData.method === 'POST') {\n // We will not create breadcrumbs for fetch requests that contain `sentry_key` (internal sentry requests)\n return;\n }\n if (handlerData.error) {\n getCurrentHub().addBreadcrumb({\n category: 'fetch',\n data: handlerData.fetchData,\n level: Severity.Error,\n type: 'http',\n }, {\n data: handlerData.error,\n input: handlerData.args,\n });\n }\n else {\n getCurrentHub().addBreadcrumb({\n category: 'fetch',\n data: __assign(__assign({}, handlerData.fetchData), { status_code: handlerData.response.status }),\n type: 'http',\n }, {\n input: handlerData.args,\n response: handlerData.response,\n });\n }\n}\n/**\n * Creates breadcrumbs from history API calls\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _historyBreadcrumb(handlerData) {\n var global = getGlobalObject();\n var from = handlerData.from;\n var to = handlerData.to;\n var parsedLoc = parseUrl(global.location.href);\n var parsedFrom = parseUrl(from);\n var parsedTo = parseUrl(to);\n // Initial pushState doesn't provide `from` information\n if (!parsedFrom.path) {\n parsedFrom = parsedLoc;\n }\n // Use only the path component of the URL if the URL matches the current\n // document (almost all the time when using pushState)\n if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) {\n to = parsedTo.relative;\n }\n if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {\n from = parsedFrom.relative;\n }\n getCurrentHub().addBreadcrumb({\n category: 'navigation',\n data: {\n from: from,\n to: to,\n },\n });\n}\n//# sourceMappingURL=breadcrumbs.js.map","import { logger } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from '../flags';\n/** Deduplication filter */\nvar Dedupe = /** @class */ (function () {\n function Dedupe() {\n /**\n * @inheritDoc\n */\n this.name = Dedupe.id;\n }\n /**\n * @inheritDoc\n */\n Dedupe.prototype.setupOnce = function (addGlobalEventProcessor, getCurrentHub) {\n addGlobalEventProcessor(function (currentEvent) {\n var self = getCurrentHub().getIntegration(Dedupe);\n if (self) {\n // Juuust in case something goes wrong\n try {\n if (_shouldDropEvent(currentEvent, self._previousEvent)) {\n IS_DEBUG_BUILD && logger.warn('Event dropped due to being a duplicate of previously captured event.');\n return null;\n }\n }\n catch (_oO) {\n return (self._previousEvent = currentEvent);\n }\n return (self._previousEvent = currentEvent);\n }\n return currentEvent;\n });\n };\n /**\n * @inheritDoc\n */\n Dedupe.id = 'Dedupe';\n return Dedupe;\n}());\nexport { Dedupe };\n/** JSDoc */\nfunction _shouldDropEvent(currentEvent, previousEvent) {\n if (!previousEvent) {\n return false;\n }\n if (_isSameMessageEvent(currentEvent, previousEvent)) {\n return true;\n }\n if (_isSameExceptionEvent(currentEvent, previousEvent)) {\n return true;\n }\n return false;\n}\n/** JSDoc */\nfunction _isSameMessageEvent(currentEvent, previousEvent) {\n var currentMessage = currentEvent.message;\n var previousMessage = previousEvent.message;\n // If neither event has a message property, they were both exceptions, so bail out\n if (!currentMessage && !previousMessage) {\n return false;\n }\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentMessage && !previousMessage) || (!currentMessage && previousMessage)) {\n return false;\n }\n if (currentMessage !== previousMessage) {\n return false;\n }\n if (!_isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n if (!_isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n return true;\n}\n/** JSDoc */\nfunction _isSameExceptionEvent(currentEvent, previousEvent) {\n var previousException = _getExceptionFromEvent(previousEvent);\n var currentException = _getExceptionFromEvent(currentEvent);\n if (!previousException || !currentException) {\n return false;\n }\n if (previousException.type !== currentException.type || previousException.value !== currentException.value) {\n return false;\n }\n if (!_isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n if (!_isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n return true;\n}\n/** JSDoc */\nfunction _isSameStacktrace(currentEvent, previousEvent) {\n var currentFrames = _getFramesFromEvent(currentEvent);\n var previousFrames = _getFramesFromEvent(previousEvent);\n // If neither event has a stacktrace, they are assumed to be the same\n if (!currentFrames && !previousFrames) {\n return true;\n }\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentFrames && !previousFrames) || (!currentFrames && previousFrames)) {\n return false;\n }\n currentFrames = currentFrames;\n previousFrames = previousFrames;\n // If number of frames differ, they are not the same\n if (previousFrames.length !== currentFrames.length) {\n return false;\n }\n // Otherwise, compare the two\n for (var i = 0; i < previousFrames.length; i++) {\n var frameA = previousFrames[i];\n var frameB = currentFrames[i];\n if (frameA.filename !== frameB.filename ||\n frameA.lineno !== frameB.lineno ||\n frameA.colno !== frameB.colno ||\n frameA.function !== frameB.function) {\n return false;\n }\n }\n return true;\n}\n/** JSDoc */\nfunction _isSameFingerprint(currentEvent, previousEvent) {\n var currentFingerprint = currentEvent.fingerprint;\n var previousFingerprint = previousEvent.fingerprint;\n // If neither event has a fingerprint, they are assumed to be the same\n if (!currentFingerprint && !previousFingerprint) {\n return true;\n }\n // If only one event has a fingerprint, but not the other one, they are not the same\n if ((currentFingerprint && !previousFingerprint) || (!currentFingerprint && previousFingerprint)) {\n return false;\n }\n currentFingerprint = currentFingerprint;\n previousFingerprint = previousFingerprint;\n // Otherwise, compare the two\n try {\n return !!(currentFingerprint.join('') === previousFingerprint.join(''));\n }\n catch (_oO) {\n return false;\n }\n}\n/** JSDoc */\nfunction _getExceptionFromEvent(event) {\n return event.exception && event.exception.values && event.exception.values[0];\n}\n/** JSDoc */\nfunction _getFramesFromEvent(event) {\n var exception = event.exception;\n if (exception) {\n try {\n // @ts-ignore Object could be undefined\n return exception.values[0].stacktrace.frames;\n }\n catch (_oO) {\n return undefined;\n }\n }\n else if (event.stacktrace) {\n return event.stacktrace.frames;\n }\n return undefined;\n}\n//# sourceMappingURL=dedupe.js.map","import { __assign, __read } from \"tslib\";\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\nimport { getCurrentHub } from '@sentry/core';\nimport { Severity } from '@sentry/types';\nimport { addExceptionMechanism, addInstrumentationHandler, getLocationHref, isErrorEvent, isPrimitive, isString, logger, } from '@sentry/utils';\nimport { eventFromUnknownInput } from '../eventbuilder';\nimport { IS_DEBUG_BUILD } from '../flags';\nimport { shouldIgnoreOnError } from '../helpers';\n/** Global handlers */\nvar GlobalHandlers = /** @class */ (function () {\n /** JSDoc */\n function GlobalHandlers(options) {\n /**\n * @inheritDoc\n */\n this.name = GlobalHandlers.id;\n /**\n * Stores references functions to installing handlers. Will set to undefined\n * after they have been run so that they are not used twice.\n */\n this._installFunc = {\n onerror: _installGlobalOnErrorHandler,\n onunhandledrejection: _installGlobalOnUnhandledRejectionHandler,\n };\n this._options = __assign({ onerror: true, onunhandledrejection: true }, options);\n }\n /**\n * @inheritDoc\n */\n GlobalHandlers.prototype.setupOnce = function () {\n Error.stackTraceLimit = 50;\n var options = this._options;\n // We can disable guard-for-in as we construct the options object above + do checks against\n // `this._installFunc` for the property.\n // eslint-disable-next-line guard-for-in\n for (var key in options) {\n var installFunc = this._installFunc[key];\n if (installFunc && options[key]) {\n globalHandlerLog(key);\n installFunc();\n this._installFunc[key] = undefined;\n }\n }\n };\n /**\n * @inheritDoc\n */\n GlobalHandlers.id = 'GlobalHandlers';\n return GlobalHandlers;\n}());\nexport { GlobalHandlers };\n/** JSDoc */\nfunction _installGlobalOnErrorHandler() {\n addInstrumentationHandler('error', \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function (data) {\n var _a = __read(getHubAndAttachStacktrace(), 2), hub = _a[0], attachStacktrace = _a[1];\n if (!hub.getIntegration(GlobalHandlers)) {\n return;\n }\n var msg = data.msg, url = data.url, line = data.line, column = data.column, error = data.error;\n if (shouldIgnoreOnError() || (error && error.__sentry_own_request__)) {\n return;\n }\n var event = error === undefined && isString(msg)\n ? _eventFromIncompleteOnError(msg, url, line, column)\n : _enhanceEventWithInitialFrame(eventFromUnknownInput(error || msg, undefined, attachStacktrace, false), url, line, column);\n event.level = Severity.Error;\n addMechanismAndCapture(hub, error, event, 'onerror');\n });\n}\n/** JSDoc */\nfunction _installGlobalOnUnhandledRejectionHandler() {\n addInstrumentationHandler('unhandledrejection', \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function (e) {\n var _a = __read(getHubAndAttachStacktrace(), 2), hub = _a[0], attachStacktrace = _a[1];\n if (!hub.getIntegration(GlobalHandlers)) {\n return;\n }\n var error = e;\n // dig the object of the rejection out of known event types\n try {\n // PromiseRejectionEvents store the object of the rejection under 'reason'\n // see https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent\n if ('reason' in e) {\n error = e.reason;\n }\n // something, somewhere, (likely a browser extension) effectively casts PromiseRejectionEvents\n // to CustomEvents, moving the `promise` and `reason` attributes of the PRE into\n // the CustomEvent's `detail` attribute, since they're not part of CustomEvent's spec\n // see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent and\n // https://github.com/getsentry/sentry-javascript/issues/2380\n else if ('detail' in e && 'reason' in e.detail) {\n error = e.detail.reason;\n }\n }\n catch (_oO) {\n // no-empty\n }\n if (shouldIgnoreOnError() || (error && error.__sentry_own_request__)) {\n return true;\n }\n var event = isPrimitive(error)\n ? _eventFromRejectionWithPrimitive(error)\n : eventFromUnknownInput(error, undefined, attachStacktrace, true);\n event.level = Severity.Error;\n addMechanismAndCapture(hub, error, event, 'onunhandledrejection');\n return;\n });\n}\n/**\n * Create an event from a promise rejection where the `reason` is a primitive.\n *\n * @param reason: The `reason` property of the promise rejection\n * @returns An Event object with an appropriate `exception` value\n */\nfunction _eventFromRejectionWithPrimitive(reason) {\n return {\n exception: {\n values: [\n {\n type: 'UnhandledRejection',\n // String() is needed because the Primitive type includes symbols (which can't be automatically stringified)\n value: \"Non-Error promise rejection captured with value: \" + String(reason),\n },\n ],\n },\n };\n}\n/**\n * This function creates a stack from an old, error-less onerror handler.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _eventFromIncompleteOnError(msg, url, line, column) {\n var ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;\n // If 'message' is ErrorEvent, get real message from inside\n var message = isErrorEvent(msg) ? msg.message : msg;\n var name = 'Error';\n var groups = message.match(ERROR_TYPES_RE);\n if (groups) {\n name = groups[1];\n message = groups[2];\n }\n var event = {\n exception: {\n values: [\n {\n type: name,\n value: message,\n },\n ],\n },\n };\n return _enhanceEventWithInitialFrame(event, url, line, column);\n}\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _enhanceEventWithInitialFrame(event, url, line, column) {\n // event.exception\n var e = (event.exception = event.exception || {});\n // event.exception.values\n var ev = (e.values = e.values || []);\n // event.exception.values[0]\n var ev0 = (ev[0] = ev[0] || {});\n // event.exception.values[0].stacktrace\n var ev0s = (ev0.stacktrace = ev0.stacktrace || {});\n // event.exception.values[0].stacktrace.frames\n var ev0sf = (ev0s.frames = ev0s.frames || []);\n var colno = isNaN(parseInt(column, 10)) ? undefined : column;\n var lineno = isNaN(parseInt(line, 10)) ? undefined : line;\n var filename = isString(url) && url.length > 0 ? url : getLocationHref();\n // event.exception.values[0].stacktrace.frames\n if (ev0sf.length === 0) {\n ev0sf.push({\n colno: colno,\n filename: filename,\n function: '?',\n in_app: true,\n lineno: lineno,\n });\n }\n return event;\n}\nfunction globalHandlerLog(type) {\n IS_DEBUG_BUILD && logger.log(\"Global Handler attached: \" + type);\n}\nfunction addMechanismAndCapture(hub, error, event, type) {\n addExceptionMechanism(event, {\n handled: false,\n type: type,\n });\n hub.captureEvent(event, {\n originalException: error,\n });\n}\nfunction getHubAndAttachStacktrace() {\n var hub = getCurrentHub();\n var client = hub.getClient();\n var attachStacktrace = client && client.getOptions().attachStacktrace;\n return [hub, attachStacktrace];\n}\n//# sourceMappingURL=globalhandlers.js.map","import { __read, __spread } from \"tslib\";\nimport { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { isInstanceOf } from '@sentry/utils';\nimport { exceptionFromError } from '../eventbuilder';\nvar DEFAULT_KEY = 'cause';\nvar DEFAULT_LIMIT = 5;\n/** Adds SDK info to an event. */\nvar LinkedErrors = /** @class */ (function () {\n /**\n * @inheritDoc\n */\n function LinkedErrors(options) {\n if (options === void 0) { options = {}; }\n /**\n * @inheritDoc\n */\n this.name = LinkedErrors.id;\n this._key = options.key || DEFAULT_KEY;\n this._limit = options.limit || DEFAULT_LIMIT;\n }\n /**\n * @inheritDoc\n */\n LinkedErrors.prototype.setupOnce = function () {\n addGlobalEventProcessor(function (event, hint) {\n var self = getCurrentHub().getIntegration(LinkedErrors);\n return self ? _handler(self._key, self._limit, event, hint) : event;\n });\n };\n /**\n * @inheritDoc\n */\n LinkedErrors.id = 'LinkedErrors';\n return LinkedErrors;\n}());\nexport { LinkedErrors };\n/**\n * @inheritDoc\n */\nexport function _handler(key, limit, event, hint) {\n if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n return event;\n }\n var linkedErrors = _walkErrorTree(limit, hint.originalException, key);\n event.exception.values = __spread(linkedErrors, event.exception.values);\n return event;\n}\n/**\n * JSDOC\n */\nexport function _walkErrorTree(limit, error, key, stack) {\n if (stack === void 0) { stack = []; }\n if (!isInstanceOf(error[key], Error) || stack.length + 1 >= limit) {\n return stack;\n }\n var exception = exceptionFromError(error[key]);\n return _walkErrorTree(limit, error[key], key, __spread([exception], stack));\n}\n//# sourceMappingURL=linkederrors.js.map","import { __assign } from \"tslib\";\nimport { fill, getFunctionName, getGlobalObject, getOriginalFunction } from '@sentry/utils';\nimport { wrap } from '../helpers';\nvar DEFAULT_EVENT_TARGET = [\n 'EventTarget',\n 'Window',\n 'Node',\n 'ApplicationCache',\n 'AudioTrackList',\n 'ChannelMergerNode',\n 'CryptoOperation',\n 'EventSource',\n 'FileReader',\n 'HTMLUnknownElement',\n 'IDBDatabase',\n 'IDBRequest',\n 'IDBTransaction',\n 'KeyOperation',\n 'MediaController',\n 'MessagePort',\n 'ModalWindow',\n 'Notification',\n 'SVGElementInstance',\n 'Screen',\n 'TextTrack',\n 'TextTrackCue',\n 'TextTrackList',\n 'WebSocket',\n 'WebSocketWorker',\n 'Worker',\n 'XMLHttpRequest',\n 'XMLHttpRequestEventTarget',\n 'XMLHttpRequestUpload',\n];\n/** Wrap timer functions and event targets to catch errors and provide better meta data */\nvar TryCatch = /** @class */ (function () {\n /**\n * @inheritDoc\n */\n function TryCatch(options) {\n /**\n * @inheritDoc\n */\n this.name = TryCatch.id;\n this._options = __assign({ XMLHttpRequest: true, eventTarget: true, requestAnimationFrame: true, setInterval: true, setTimeout: true }, options);\n }\n /**\n * Wrap timer functions and event targets to catch errors\n * and provide better metadata.\n */\n TryCatch.prototype.setupOnce = function () {\n var global = getGlobalObject();\n if (this._options.setTimeout) {\n fill(global, 'setTimeout', _wrapTimeFunction);\n }\n if (this._options.setInterval) {\n fill(global, 'setInterval', _wrapTimeFunction);\n }\n if (this._options.requestAnimationFrame) {\n fill(global, 'requestAnimationFrame', _wrapRAF);\n }\n if (this._options.XMLHttpRequest && 'XMLHttpRequest' in global) {\n fill(XMLHttpRequest.prototype, 'send', _wrapXHR);\n }\n var eventTargetOption = this._options.eventTarget;\n if (eventTargetOption) {\n var eventTarget = Array.isArray(eventTargetOption) ? eventTargetOption : DEFAULT_EVENT_TARGET;\n eventTarget.forEach(_wrapEventTarget);\n }\n };\n /**\n * @inheritDoc\n */\n TryCatch.id = 'TryCatch';\n return TryCatch;\n}());\nexport { TryCatch };\n/** JSDoc */\nfunction _wrapTimeFunction(original) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var originalCallback = args[0];\n args[0] = wrap(originalCallback, {\n mechanism: {\n data: { function: getFunctionName(original) },\n handled: true,\n type: 'instrument',\n },\n });\n return original.apply(this, args);\n };\n}\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _wrapRAF(original) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function (callback) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return original.apply(this, [\n wrap(callback, {\n mechanism: {\n data: {\n function: 'requestAnimationFrame',\n handler: getFunctionName(original),\n },\n handled: true,\n type: 'instrument',\n },\n }),\n ]);\n };\n}\n/** JSDoc */\nfunction _wrapXHR(originalSend) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n var xhr = this;\n var xmlHttpRequestProps = ['onload', 'onerror', 'onprogress', 'onreadystatechange'];\n xmlHttpRequestProps.forEach(function (prop) {\n if (prop in xhr && typeof xhr[prop] === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n fill(xhr, prop, function (original) {\n var wrapOptions = {\n mechanism: {\n data: {\n function: prop,\n handler: getFunctionName(original),\n },\n handled: true,\n type: 'instrument',\n },\n };\n // If Instrument integration has been called before TryCatch, get the name of original function\n var originalFunction = getOriginalFunction(original);\n if (originalFunction) {\n wrapOptions.mechanism.data.handler = getFunctionName(originalFunction);\n }\n // Otherwise wrap directly\n return wrap(original, wrapOptions);\n });\n }\n });\n return originalSend.apply(this, args);\n };\n}\n/** JSDoc */\nfunction _wrapEventTarget(target) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var global = getGlobalObject();\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n var proto = global[target] && global[target].prototype;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n fill(proto, 'addEventListener', function (original) {\n return function (eventName, fn, options) {\n try {\n if (typeof fn.handleEvent === 'function') {\n fn.handleEvent = wrap(fn.handleEvent.bind(fn), {\n mechanism: {\n data: {\n function: 'handleEvent',\n handler: getFunctionName(fn),\n target: target,\n },\n handled: true,\n type: 'instrument',\n },\n });\n }\n }\n catch (err) {\n // can sometimes get 'Permission denied to access property \"handle Event'\n }\n return original.apply(this, [\n eventName,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n wrap(fn, {\n mechanism: {\n data: {\n function: 'addEventListener',\n handler: getFunctionName(fn),\n target: target,\n },\n handled: true,\n type: 'instrument',\n },\n }),\n options,\n ]);\n };\n });\n fill(proto, 'removeEventListener', function (originalRemoveEventListener) {\n return function (eventName, fn, options) {\n /**\n * There are 2 possible scenarios here:\n *\n * 1. Someone passes a callback, which was attached prior to Sentry initialization, or by using unmodified\n * method, eg. `document.addEventListener.call(el, name, handler). In this case, we treat this function\n * as a pass-through, and call original `removeEventListener` with it.\n *\n * 2. Someone passes a callback, which was attached after Sentry was initialized, which means that it was using\n * our wrapped version of `addEventListener`, which internally calls `wrap` helper.\n * This helper \"wraps\" whole callback inside a try/catch statement, and attached appropriate metadata to it,\n * in order for us to make a distinction between wrapped/non-wrapped functions possible.\n * If a function was wrapped, it has additional property of `__sentry_wrapped__`, holding the handler.\n *\n * When someone adds a handler prior to initialization, and then do it again, but after,\n * then we have to detach both of them. Otherwise, if we'd detach only wrapped one, it'd be impossible\n * to get rid of the initial handler and it'd stick there forever.\n */\n var wrappedEventHandler = fn;\n try {\n var originalEventHandler = wrappedEventHandler && wrappedEventHandler.__sentry_wrapped__;\n if (originalEventHandler) {\n originalRemoveEventListener.call(this, eventName, originalEventHandler, options);\n }\n }\n catch (e) {\n // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n }\n return originalRemoveEventListener.call(this, eventName, wrappedEventHandler, options);\n };\n });\n}\n//# sourceMappingURL=trycatch.js.map","import { __assign } from \"tslib\";\nimport { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { getGlobalObject } from '@sentry/utils';\nvar global = getGlobalObject();\n/** UserAgent */\nvar UserAgent = /** @class */ (function () {\n function UserAgent() {\n /**\n * @inheritDoc\n */\n this.name = UserAgent.id;\n }\n /**\n * @inheritDoc\n */\n UserAgent.prototype.setupOnce = function () {\n addGlobalEventProcessor(function (event) {\n if (getCurrentHub().getIntegration(UserAgent)) {\n // if none of the information we want exists, don't bother\n if (!global.navigator && !global.location && !global.document) {\n return event;\n }\n // grab as much info as exists and add it to the event\n var url = (event.request && event.request.url) || (global.location && global.location.href);\n var referrer = (global.document || {}).referrer;\n var userAgent = (global.navigator || {}).userAgent;\n var headers = __assign(__assign(__assign({}, (event.request && event.request.headers)), (referrer && { Referer: referrer })), (userAgent && { 'User-Agent': userAgent }));\n var request = __assign(__assign({}, (url && { url: url })), { headers: headers });\n return __assign(__assign({}, event), { request: request });\n }\n return event;\n });\n };\n /**\n * @inheritDoc\n */\n UserAgent.id = 'UserAgent';\n return UserAgent;\n}());\nexport { UserAgent };\n//# sourceMappingURL=useragent.js.map","import { __assign } from \"tslib\";\nimport { getCurrentHub, initAndBind, Integrations as CoreIntegrations } from '@sentry/core';\nimport { addInstrumentationHandler, getGlobalObject, logger, resolvedSyncPromise } from '@sentry/utils';\nimport { BrowserClient } from './client';\nimport { IS_DEBUG_BUILD } from './flags';\nimport { wrap as internalWrap } from './helpers';\nimport { Breadcrumbs, Dedupe, GlobalHandlers, LinkedErrors, TryCatch, UserAgent } from './integrations';\nexport var defaultIntegrations = [\n new CoreIntegrations.InboundFilters(),\n new CoreIntegrations.FunctionToString(),\n new TryCatch(),\n new Breadcrumbs(),\n new GlobalHandlers(),\n new LinkedErrors(),\n new Dedupe(),\n new UserAgent(),\n];\n/**\n * The Sentry Browser SDK Client.\n *\n * To use this SDK, call the {@link init} function as early as possible when\n * loading the web page. To set context information or send manual events, use\n * the provided methods.\n *\n * @example\n *\n * ```\n *\n * import { init } from '@sentry/browser';\n *\n * init({\n * dsn: '__DSN__',\n * // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { configureScope } from '@sentry/browser';\n * configureScope((scope: Scope) => {\n * scope.setExtra({ battery: 0.7 });\n * scope.setTag({ user_mode: 'admin' });\n * scope.setUser({ id: '4711' });\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { addBreadcrumb } from '@sentry/browser';\n * addBreadcrumb({\n * message: 'My Breadcrumb',\n * // ...\n * });\n * ```\n *\n * @example\n *\n * ```\n *\n * import * as Sentry from '@sentry/browser';\n * Sentry.captureMessage('Hello, world!');\n * Sentry.captureException(new Error('Good bye'));\n * Sentry.captureEvent({\n * message: 'Manual',\n * stacktrace: [\n * // ...\n * ],\n * });\n * ```\n *\n * @see {@link BrowserOptions} for documentation on configuration options.\n */\nexport function init(options) {\n if (options === void 0) { options = {}; }\n if (options.defaultIntegrations === undefined) {\n options.defaultIntegrations = defaultIntegrations;\n }\n if (options.release === undefined) {\n var window_1 = getGlobalObject();\n // This supports the variable that sentry-webpack-plugin injects\n if (window_1.SENTRY_RELEASE && window_1.SENTRY_RELEASE.id) {\n options.release = window_1.SENTRY_RELEASE.id;\n }\n }\n if (options.autoSessionTracking === undefined) {\n options.autoSessionTracking = true;\n }\n if (options.sendClientReports === undefined) {\n options.sendClientReports = true;\n }\n initAndBind(BrowserClient, options);\n if (options.autoSessionTracking) {\n startSessionTracking();\n }\n}\n/**\n * Present the user with a report dialog.\n *\n * @param options Everything is optional, we try to fetch all info need from the global scope.\n */\nexport function showReportDialog(options) {\n if (options === void 0) { options = {}; }\n var hub = getCurrentHub();\n var scope = hub.getScope();\n if (scope) {\n options.user = __assign(__assign({}, scope.getUser()), options.user);\n }\n if (!options.eventId) {\n options.eventId = hub.lastEventId();\n }\n var client = hub.getClient();\n if (client) {\n client.showReportDialog(options);\n }\n}\n/**\n * This is the getter for lastEventId.\n *\n * @returns The last event id of a captured event.\n */\nexport function lastEventId() {\n return getCurrentHub().lastEventId();\n}\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function forceLoad() {\n // Noop\n}\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function onLoad(callback) {\n callback();\n}\n/**\n * Call `flush()` on the current client, if there is one. See {@link Client.flush}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause\n * the client to wait until all events are sent before resolving the promise.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nexport function flush(timeout) {\n var client = getCurrentHub().getClient();\n if (client) {\n return client.flush(timeout);\n }\n IS_DEBUG_BUILD && logger.warn('Cannot flush events. No client defined.');\n return resolvedSyncPromise(false);\n}\n/**\n * Call `close()` on the current client, if there is one. See {@link Client.close}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this\n * parameter will cause the client to wait until all events are sent before disabling itself.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nexport function close(timeout) {\n var client = getCurrentHub().getClient();\n if (client) {\n return client.close(timeout);\n }\n IS_DEBUG_BUILD && logger.warn('Cannot flush events and disable SDK. No client defined.');\n return resolvedSyncPromise(false);\n}\n/**\n * Wrap code within a try/catch block so the SDK is able to capture errors.\n *\n * @param fn A function to wrap.\n *\n * @returns The result of wrapped function call.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function wrap(fn) {\n return internalWrap(fn)();\n}\nfunction startSessionOnHub(hub) {\n hub.startSession({ ignoreDuration: true });\n hub.captureSession();\n}\n/**\n * Enable automatic Session Tracking for the initial page load.\n */\nfunction startSessionTracking() {\n var window = getGlobalObject();\n var document = window.document;\n if (typeof document === 'undefined') {\n IS_DEBUG_BUILD && logger.warn('Session tracking in non-browser environment with @sentry/browser is not supported.');\n return;\n }\n var hub = getCurrentHub();\n // The only way for this to be false is for there to be a version mismatch between @sentry/browser (>= 6.0.0) and\n // @sentry/hub (< 5.27.0). In the simple case, there won't ever be such a mismatch, because the two packages are\n // pinned at the same version in package.json, but there are edge cases where it's possible. See\n // https://github.com/getsentry/sentry-javascript/issues/3207 and\n // https://github.com/getsentry/sentry-javascript/issues/3234 and\n // https://github.com/getsentry/sentry-javascript/issues/3278.\n if (!hub.captureSession) {\n return;\n }\n // The session duration for browser sessions does not track a meaningful\n // concept that can be used as a metric.\n // Automatically captured sessions are akin to page views, and thus we\n // discard their duration.\n startSessionOnHub(hub);\n // We want to create a session for every navigation as well\n addInstrumentationHandler('history', function (_a) {\n var from = _a.from, to = _a.to;\n // Don't create an additional session for the initial route or if the location did not change\n if (!(from === undefined || from === to)) {\n startSessionOnHub(getCurrentHub());\n }\n });\n}\n//# sourceMappingURL=sdk.js.map","import { __read } from \"tslib\";\n// global reference to slice\nvar UNKNOWN_FUNCTION = '?';\nvar OPERA10_PRIORITY = 10;\nvar OPERA11_PRIORITY = 20;\nvar CHROME_PRIORITY = 30;\nvar WINJS_PRIORITY = 40;\nvar GECKO_PRIORITY = 50;\nfunction createFrame(filename, func, lineno, colno) {\n var frame = {\n filename: filename,\n function: func,\n // All browser frames are considered in_app\n in_app: true,\n };\n if (lineno !== undefined) {\n frame.lineno = lineno;\n }\n if (colno !== undefined) {\n frame.colno = colno;\n }\n return frame;\n}\n// Chromium based browsers: Chrome, Brave, new Opera, new Edge\nvar chromeRegex = /^\\s*at (?:(.*?) ?\\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\\/).*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\nvar chromeEvalRegex = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\nvar chrome = function (line) {\n var parts = chromeRegex.exec(line);\n if (parts) {\n var isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n if (isEval) {\n var subMatch = chromeEvalRegex.exec(parts[2]);\n if (subMatch) {\n // throw out eval line/column and use top-most line/column number\n parts[2] = subMatch[1]; // url\n parts[3] = subMatch[2]; // line\n parts[4] = subMatch[3]; // column\n }\n }\n // Kamil: One more hack won't hurt us right? Understanding and adding more rules on top of these regexps right now\n // would be way too time consuming. (TODO: Rewrite whole RegExp to be more readable)\n var _a = __read(extractSafariExtensionDetails(parts[1] || UNKNOWN_FUNCTION, parts[2]), 2), func = _a[0], filename = _a[1];\n return createFrame(filename, func, parts[3] ? +parts[3] : undefined, parts[4] ? +parts[4] : undefined);\n }\n return;\n};\nexport var chromeStackParser = [CHROME_PRIORITY, chrome];\n// gecko regex: `(?:bundle|\\d+\\.js)`: `bundle` is for react native, `\\d+\\.js` also but specifically for ram bundles because it\n// generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js\n// We need this specific case for now because we want no other regex to match.\nvar geckoREgex = /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\\/.*?|\\[native code\\]|[^@]*(?:bundle|\\d+\\.js)|\\/[\\w\\-. /=]+)(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nvar geckoEvalRegex = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\nvar gecko = function (line) {\n var _a;\n var parts = geckoREgex.exec(line);\n if (parts) {\n var isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n if (isEval) {\n var subMatch = geckoEvalRegex.exec(parts[3]);\n if (subMatch) {\n // throw out eval line/column and use top-most line number\n parts[1] = parts[1] || 'eval';\n parts[3] = subMatch[1];\n parts[4] = subMatch[2];\n parts[5] = ''; // no column when eval\n }\n }\n var filename = parts[3];\n var func = parts[1] || UNKNOWN_FUNCTION;\n _a = __read(extractSafariExtensionDetails(func, filename), 2), func = _a[0], filename = _a[1];\n return createFrame(filename, func, parts[4] ? +parts[4] : undefined, parts[5] ? +parts[5] : undefined);\n }\n return;\n};\nexport var geckoStackParser = [GECKO_PRIORITY, gecko];\nvar winjsRegex = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\nvar winjs = function (line) {\n var parts = winjsRegex.exec(line);\n return parts\n ? createFrame(parts[2], parts[1] || UNKNOWN_FUNCTION, +parts[3], parts[4] ? +parts[4] : undefined)\n : undefined;\n};\nexport var winjsStackParser = [WINJS_PRIORITY, winjs];\nvar opera10Regex = / line (\\d+).*script (?:in )?(\\S+)(?:: in function (\\S+))?$/i;\nvar opera10 = function (line) {\n var parts = opera10Regex.exec(line);\n return parts ? createFrame(parts[2], parts[3] || UNKNOWN_FUNCTION, +parts[1]) : undefined;\n};\nexport var opera10StackParser = [OPERA10_PRIORITY, opera10];\nvar opera11Regex = / line (\\d+), column (\\d+)\\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\\(.*\\))? in (.*):\\s*$/i;\nvar opera11 = function (line) {\n var parts = opera11Regex.exec(line);\n return parts ? createFrame(parts[5], parts[3] || parts[4] || UNKNOWN_FUNCTION, +parts[1], +parts[2]) : undefined;\n};\nexport var opera11StackParser = [OPERA11_PRIORITY, opera11];\n/**\n * Safari web extensions, starting version unknown, can produce \"frames-only\" stacktraces.\n * What it means, is that instead of format like:\n *\n * Error: wat\n * at function@url:row:col\n * at function@url:row:col\n * at function@url:row:col\n *\n * it produces something like:\n *\n * function@url:row:col\n * function@url:row:col\n * function@url:row:col\n *\n * Because of that, it won't be captured by `chrome` RegExp and will fall into `Gecko` branch.\n * This function is extracted so that we can use it in both places without duplicating the logic.\n * Unfortunately \"just\" changing RegExp is too complicated now and making it pass all tests\n * and fix this case seems like an impossible, or at least way too time-consuming task.\n */\nvar extractSafariExtensionDetails = function (func, filename) {\n var isSafariExtension = func.indexOf('safari-extension') !== -1;\n var isSafariWebExtension = func.indexOf('safari-web-extension') !== -1;\n return isSafariExtension || isSafariWebExtension\n ? [\n func.indexOf('@') !== -1 ? func.split('@')[0] : UNKNOWN_FUNCTION,\n isSafariExtension ? \"safari-extension:\" + filename : \"safari-web-extension:\" + filename,\n ]\n : [func, filename];\n};\n//# sourceMappingURL=stack-parsers.js.map","import { __read } from \"tslib\";\nimport { eventToSentryRequest, getEnvelopeEndpointWithUrlEncodedAuth, getStoreEndpointWithUrlEncodedAuth, initAPIDetails, sessionToSentryRequest, } from '@sentry/core';\nimport { createClientReportEnvelope, disabledUntil, dsnToString, eventStatusFromHttpCode, getGlobalObject, isRateLimited, logger, makePromiseBuffer, serializeEnvelope, updateRateLimits, } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from '../flags';\nimport { sendReport } from './utils';\nfunction requestTypeToCategory(ty) {\n var tyStr = ty;\n return tyStr === 'event' ? 'error' : tyStr;\n}\nvar global = getGlobalObject();\n/** Base Transport class implementation */\nvar BaseTransport = /** @class */ (function () {\n function BaseTransport(options) {\n var _this = this;\n this.options = options;\n /** A simple buffer holding all requests. */\n this._buffer = makePromiseBuffer(30);\n /** Locks transport after receiving rate limits in a response */\n this._rateLimits = {};\n this._outcomes = {};\n this._api = initAPIDetails(options.dsn, options._metadata, options.tunnel);\n // eslint-disable-next-line deprecation/deprecation\n this.url = getStoreEndpointWithUrlEncodedAuth(this._api.dsn);\n if (this.options.sendClientReports && global.document) {\n global.document.addEventListener('visibilitychange', function () {\n if (global.document.visibilityState === 'hidden') {\n _this._flushOutcomes();\n }\n });\n }\n }\n /**\n * @inheritDoc\n */\n BaseTransport.prototype.sendEvent = function (event) {\n return this._sendRequest(eventToSentryRequest(event, this._api), event);\n };\n /**\n * @inheritDoc\n */\n BaseTransport.prototype.sendSession = function (session) {\n return this._sendRequest(sessionToSentryRequest(session, this._api), session);\n };\n /**\n * @inheritDoc\n */\n BaseTransport.prototype.close = function (timeout) {\n return this._buffer.drain(timeout);\n };\n /**\n * @inheritDoc\n */\n BaseTransport.prototype.recordLostEvent = function (reason, category) {\n var _a;\n if (!this.options.sendClientReports) {\n return;\n }\n // We want to track each category (event, transaction, session) separately\n // but still keep the distinction between different type of outcomes.\n // We could use nested maps, but it's much easier to read and type this way.\n // A correct type for map-based implementation if we want to go that route\n // would be `Partial<Record<SentryRequestType, Partial<Record<Outcome, number>>>>`\n var key = requestTypeToCategory(category) + \":\" + reason;\n IS_DEBUG_BUILD && logger.log(\"Adding outcome: \" + key);\n this._outcomes[key] = (_a = this._outcomes[key], (_a !== null && _a !== void 0 ? _a : 0)) + 1;\n };\n /**\n * Send outcomes as an envelope\n */\n BaseTransport.prototype._flushOutcomes = function () {\n if (!this.options.sendClientReports) {\n return;\n }\n var outcomes = this._outcomes;\n this._outcomes = {};\n // Nothing to send\n if (!Object.keys(outcomes).length) {\n IS_DEBUG_BUILD && logger.log('No outcomes to flush');\n return;\n }\n IS_DEBUG_BUILD && logger.log(\"Flushing outcomes:\\n\" + JSON.stringify(outcomes, null, 2));\n var url = getEnvelopeEndpointWithUrlEncodedAuth(this._api.dsn, this._api.tunnel);\n var discardedEvents = Object.keys(outcomes).map(function (key) {\n var _a = __read(key.split(':'), 2), category = _a[0], reason = _a[1];\n return {\n reason: reason,\n category: category,\n quantity: outcomes[key],\n };\n // TODO: Improve types on discarded_events to get rid of cast\n });\n var envelope = createClientReportEnvelope(discardedEvents, this._api.tunnel && dsnToString(this._api.dsn));\n try {\n sendReport(url, serializeEnvelope(envelope));\n }\n catch (e) {\n IS_DEBUG_BUILD && logger.error(e);\n }\n };\n /**\n * Handle Sentry repsonse for promise-based transports.\n */\n BaseTransport.prototype._handleResponse = function (_a) {\n var requestType = _a.requestType, response = _a.response, headers = _a.headers, resolve = _a.resolve, reject = _a.reject;\n var status = eventStatusFromHttpCode(response.status);\n this._rateLimits = updateRateLimits(this._rateLimits, headers);\n // eslint-disable-next-line deprecation/deprecation\n if (this._isRateLimited(requestType)) {\n IS_DEBUG_BUILD &&\n // eslint-disable-next-line deprecation/deprecation\n logger.warn(\"Too many \" + requestType + \" requests, backing off until: \" + this._disabledUntil(requestType));\n }\n if (status === 'success') {\n resolve({ status: status });\n return;\n }\n reject(response);\n };\n /**\n * Gets the time that given category is disabled until for rate limiting\n *\n * @deprecated Please use `disabledUntil` from @sentry/utils\n */\n BaseTransport.prototype._disabledUntil = function (requestType) {\n var category = requestTypeToCategory(requestType);\n return new Date(disabledUntil(this._rateLimits, category));\n };\n /**\n * Checks if a category is rate limited\n *\n * @deprecated Please use `isRateLimited` from @sentry/utils\n */\n BaseTransport.prototype._isRateLimited = function (requestType) {\n var category = requestTypeToCategory(requestType);\n return isRateLimited(this._rateLimits, category);\n };\n return BaseTransport;\n}());\nexport { BaseTransport };\n//# sourceMappingURL=base.js.map","import { __extends } from \"tslib\";\nimport { SentryError, supportsReferrerPolicy, SyncPromise } from '@sentry/utils';\nimport { BaseTransport } from './base';\nimport { getNativeFetchImplementation } from './utils';\n/** `fetch` based transport */\nvar FetchTransport = /** @class */ (function (_super) {\n __extends(FetchTransport, _super);\n function FetchTransport(options, fetchImpl) {\n if (fetchImpl === void 0) { fetchImpl = getNativeFetchImplementation(); }\n var _this = _super.call(this, options) || this;\n _this._fetch = fetchImpl;\n return _this;\n }\n /**\n * @param sentryRequest Prepared SentryRequest to be delivered\n * @param originalPayload Original payload used to create SentryRequest\n */\n FetchTransport.prototype._sendRequest = function (sentryRequest, originalPayload) {\n var _this = this;\n // eslint-disable-next-line deprecation/deprecation\n if (this._isRateLimited(sentryRequest.type)) {\n this.recordLostEvent('ratelimit_backoff', sentryRequest.type);\n return Promise.reject({\n event: originalPayload,\n type: sentryRequest.type,\n // eslint-disable-next-line deprecation/deprecation\n reason: \"Transport for \" + sentryRequest.type + \" requests locked till \" + this._disabledUntil(sentryRequest.type) + \" due to too many requests.\",\n status: 429,\n });\n }\n var options = {\n body: sentryRequest.body,\n method: 'POST',\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default'\n // (see https://caniuse.com/#feat=referrer-policy),\n // it doesn't. And it throws an exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n referrerPolicy: (supportsReferrerPolicy() ? 'origin' : ''),\n };\n if (this.options.fetchParameters !== undefined) {\n Object.assign(options, this.options.fetchParameters);\n }\n if (this.options.headers !== undefined) {\n options.headers = this.options.headers;\n }\n return this._buffer\n .add(function () {\n return new SyncPromise(function (resolve, reject) {\n void _this._fetch(sentryRequest.url, options)\n .then(function (response) {\n var headers = {\n 'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),\n 'retry-after': response.headers.get('Retry-After'),\n };\n _this._handleResponse({\n requestType: sentryRequest.type,\n response: response,\n headers: headers,\n resolve: resolve,\n reject: reject,\n });\n })\n .catch(reject);\n });\n })\n .then(undefined, function (reason) {\n // It's either buffer rejection or any other xhr/fetch error, which are treated as NetworkError.\n if (reason instanceof SentryError) {\n _this.recordLostEvent('queue_overflow', sentryRequest.type);\n }\n else {\n _this.recordLostEvent('network_error', sentryRequest.type);\n }\n throw reason;\n });\n };\n return FetchTransport;\n}(BaseTransport));\nexport { FetchTransport };\n//# sourceMappingURL=fetch.js.map","import { __assign } from \"tslib\";\nimport { createTransport, } from '@sentry/core';\nimport { getNativeFetchImplementation } from './utils';\n/**\n * Creates a Transport that uses the Fetch API to send events to Sentry.\n */\nexport function makeNewFetchTransport(options, nativeFetch) {\n if (nativeFetch === void 0) { nativeFetch = getNativeFetchImplementation(); }\n function makeRequest(request) {\n var requestOptions = __assign({ body: request.body, method: 'POST', referrerPolicy: 'origin' }, options.requestOptions);\n return nativeFetch(options.url, requestOptions).then(function (response) {\n return response.text().then(function (body) { return ({\n body: body,\n headers: {\n 'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),\n 'retry-after': response.headers.get('Retry-After'),\n },\n reason: response.statusText,\n statusCode: response.status,\n }); });\n });\n }\n return createTransport({ bufferSize: options.bufferSize }, makeRequest);\n}\n//# sourceMappingURL=new-fetch.js.map","import { createTransport, } from '@sentry/core';\nimport { SyncPromise } from '@sentry/utils';\n/**\n * The DONE ready state for XmlHttpRequest\n *\n * Defining it here as a constant b/c XMLHttpRequest.DONE is not always defined\n * (e.g. during testing, it is `undefined`)\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/readyState}\n */\nvar XHR_READYSTATE_DONE = 4;\n/**\n * Creates a Transport that uses the XMLHttpRequest API to send events to Sentry.\n */\nexport function makeNewXHRTransport(options) {\n function makeRequest(request) {\n return new SyncPromise(function (resolve, _reject) {\n var xhr = new XMLHttpRequest();\n xhr.onreadystatechange = function () {\n if (xhr.readyState === XHR_READYSTATE_DONE) {\n var response = {\n body: xhr.response,\n headers: {\n 'x-sentry-rate-limits': xhr.getResponseHeader('X-Sentry-Rate-Limits'),\n 'retry-after': xhr.getResponseHeader('Retry-After'),\n },\n reason: xhr.statusText,\n statusCode: xhr.status,\n };\n resolve(response);\n }\n };\n xhr.open('POST', options.url);\n for (var header in options.headers) {\n if (Object.prototype.hasOwnProperty.call(options.headers, header)) {\n xhr.setRequestHeader(header, options.headers[header]);\n }\n }\n xhr.send(request.body);\n });\n }\n return createTransport({ bufferSize: options.bufferSize }, makeRequest);\n}\n//# sourceMappingURL=new-xhr.js.map","import { forget, getGlobalObject, isNativeFetch, logger, supportsFetch } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from '../flags';\nvar global = getGlobalObject();\nvar cachedFetchImpl;\n/**\n * A special usecase for incorrectly wrapped Fetch APIs in conjunction with ad-blockers.\n * Whenever someone wraps the Fetch API and returns the wrong promise chain,\n * this chain becomes orphaned and there is no possible way to capture it's rejections\n * other than allowing it bubble up to this very handler. eg.\n *\n * const f = window.fetch;\n * window.fetch = function () {\n * const p = f.apply(this, arguments);\n *\n * p.then(function() {\n * console.log('hi.');\n * });\n *\n * return p;\n * }\n *\n * `p.then(function () { ... })` is producing a completely separate promise chain,\n * however, what's returned is `p` - the result of original `fetch` call.\n *\n * This mean, that whenever we use the Fetch API to send our own requests, _and_\n * some ad-blocker blocks it, this orphaned chain will _always_ reject,\n * effectively causing another event to be captured.\n * This makes a whole process become an infinite loop, which we need to somehow\n * deal with, and break it in one way or another.\n *\n * To deal with this issue, we are making sure that we _always_ use the real\n * browser Fetch API, instead of relying on what `window.fetch` exposes.\n * The only downside to this would be missing our own requests as breadcrumbs,\n * but because we are already not doing this, it should be just fine.\n *\n * Possible failed fetch error messages per-browser:\n *\n * Chrome: Failed to fetch\n * Edge: Failed to Fetch\n * Firefox: NetworkError when attempting to fetch resource\n * Safari: resource blocked by content blocker\n */\nexport function getNativeFetchImplementation() {\n if (cachedFetchImpl) {\n return cachedFetchImpl;\n }\n /* eslint-disable @typescript-eslint/unbound-method */\n // Fast path to avoid DOM I/O\n if (isNativeFetch(global.fetch)) {\n return (cachedFetchImpl = global.fetch.bind(global));\n }\n var document = global.document;\n var fetchImpl = global.fetch;\n // eslint-disable-next-line deprecation/deprecation\n if (document && typeof document.createElement === 'function') {\n try {\n var sandbox = document.createElement('iframe');\n sandbox.hidden = true;\n document.head.appendChild(sandbox);\n var contentWindow = sandbox.contentWindow;\n if (contentWindow && contentWindow.fetch) {\n fetchImpl = contentWindow.fetch;\n }\n document.head.removeChild(sandbox);\n }\n catch (e) {\n IS_DEBUG_BUILD &&\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', e);\n }\n }\n return (cachedFetchImpl = fetchImpl.bind(global));\n /* eslint-enable @typescript-eslint/unbound-method */\n}\n/**\n * Sends sdk client report using sendBeacon or fetch as a fallback if available\n *\n * @param url report endpoint\n * @param body report payload\n */\nexport function sendReport(url, body) {\n var isRealNavigator = Object.prototype.toString.call(global && global.navigator) === '[object Navigator]';\n var hasSendBeacon = isRealNavigator && typeof global.navigator.sendBeacon === 'function';\n if (hasSendBeacon) {\n // Prevent illegal invocations - https://xgwang.me/posts/you-may-not-know-beacon/#it-may-throw-error%2C-be-sure-to-catch\n var sendBeacon = global.navigator.sendBeacon.bind(global.navigator);\n return sendBeacon(url, body);\n }\n if (supportsFetch()) {\n var fetch_1 = getNativeFetchImplementation();\n return forget(fetch_1(url, {\n body: body,\n method: 'POST',\n credentials: 'omit',\n keepalive: true,\n }));\n }\n}\n//# sourceMappingURL=utils.js.map","import { __extends } from \"tslib\";\nimport { SentryError, SyncPromise } from '@sentry/utils';\nimport { BaseTransport } from './base';\n/** `XHR` based transport */\nvar XHRTransport = /** @class */ (function (_super) {\n __extends(XHRTransport, _super);\n function XHRTransport() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @param sentryRequest Prepared SentryRequest to be delivered\n * @param originalPayload Original payload used to create SentryRequest\n */\n XHRTransport.prototype._sendRequest = function (sentryRequest, originalPayload) {\n var _this = this;\n // eslint-disable-next-line deprecation/deprecation\n if (this._isRateLimited(sentryRequest.type)) {\n this.recordLostEvent('ratelimit_backoff', sentryRequest.type);\n return Promise.reject({\n event: originalPayload,\n type: sentryRequest.type,\n // eslint-disable-next-line deprecation/deprecation\n reason: \"Transport for \" + sentryRequest.type + \" requests locked till \" + this._disabledUntil(sentryRequest.type) + \" due to too many requests.\",\n status: 429,\n });\n }\n return this._buffer\n .add(function () {\n return new SyncPromise(function (resolve, reject) {\n var request = new XMLHttpRequest();\n request.onreadystatechange = function () {\n if (request.readyState === 4) {\n var headers = {\n 'x-sentry-rate-limits': request.getResponseHeader('X-Sentry-Rate-Limits'),\n 'retry-after': request.getResponseHeader('Retry-After'),\n };\n _this._handleResponse({ requestType: sentryRequest.type, response: request, headers: headers, resolve: resolve, reject: reject });\n }\n };\n request.open('POST', sentryRequest.url);\n for (var header in _this.options.headers) {\n if (Object.prototype.hasOwnProperty.call(_this.options.headers, header)) {\n request.setRequestHeader(header, _this.options.headers[header]);\n }\n }\n request.send(sentryRequest.body);\n });\n })\n .then(undefined, function (reason) {\n // It's either buffer rejection or any other xhr/fetch error, which are treated as NetworkError.\n if (reason instanceof SentryError) {\n _this.recordLostEvent('queue_overflow', sentryRequest.type);\n }\n else {\n _this.recordLostEvent('network_error', sentryRequest.type);\n }\n throw reason;\n });\n };\n return XHRTransport;\n}(BaseTransport));\nexport { XHRTransport };\n//# sourceMappingURL=xhr.js.map","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","import { dsnToString, makeDsn, urlEncode } from '@sentry/utils';\nvar SENTRY_API_VERSION = '7';\n/**\n * Helper class to provide urls, headers and metadata that can be used to form\n * different types of requests to Sentry endpoints.\n * Supports both envelopes and regular event requests.\n *\n * @deprecated Please use APIDetails\n **/\nvar API = /** @class */ (function () {\n /** Create a new instance of API */\n function API(dsn, metadata, tunnel) {\n if (metadata === void 0) { metadata = {}; }\n this.dsn = dsn;\n this._dsnObject = makeDsn(dsn);\n this.metadata = metadata;\n this._tunnel = tunnel;\n }\n /** Returns the Dsn object. */\n API.prototype.getDsn = function () {\n return this._dsnObject;\n };\n /** Does this transport force envelopes? */\n API.prototype.forceEnvelope = function () {\n return !!this._tunnel;\n };\n /** Returns the prefix to construct Sentry ingestion API endpoints. */\n API.prototype.getBaseApiEndpoint = function () {\n return getBaseApiEndpoint(this._dsnObject);\n };\n /** Returns the store endpoint URL. */\n API.prototype.getStoreEndpoint = function () {\n return getStoreEndpoint(this._dsnObject);\n };\n /**\n * Returns the store endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\n API.prototype.getStoreEndpointWithUrlEncodedAuth = function () {\n return getStoreEndpointWithUrlEncodedAuth(this._dsnObject);\n };\n /**\n * Returns the envelope endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\n API.prototype.getEnvelopeEndpointWithUrlEncodedAuth = function () {\n return getEnvelopeEndpointWithUrlEncodedAuth(this._dsnObject, this._tunnel);\n };\n return API;\n}());\nexport { API };\n/** Initializes API Details */\nexport function initAPIDetails(dsn, metadata, tunnel) {\n return {\n initDsn: dsn,\n metadata: metadata || {},\n dsn: makeDsn(dsn),\n tunnel: tunnel,\n };\n}\n/** Returns the prefix to construct Sentry ingestion API endpoints. */\nfunction getBaseApiEndpoint(dsn) {\n var protocol = dsn.protocol ? dsn.protocol + \":\" : '';\n var port = dsn.port ? \":\" + dsn.port : '';\n return protocol + \"//\" + dsn.host + port + (dsn.path ? \"/\" + dsn.path : '') + \"/api/\";\n}\n/** Returns the ingest API endpoint for target. */\nfunction _getIngestEndpoint(dsn, target) {\n return \"\" + getBaseApiEndpoint(dsn) + dsn.projectId + \"/\" + target + \"/\";\n}\n/** Returns a URL-encoded string with auth config suitable for a query string. */\nfunction _encodedAuth(dsn) {\n return urlEncode({\n // We send only the minimum set of required information. See\n // https://github.com/getsentry/sentry-javascript/issues/2572.\n sentry_key: dsn.publicKey,\n sentry_version: SENTRY_API_VERSION,\n });\n}\n/** Returns the store endpoint URL. */\nfunction getStoreEndpoint(dsn) {\n return _getIngestEndpoint(dsn, 'store');\n}\n/**\n * Returns the store endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\nexport function getStoreEndpointWithUrlEncodedAuth(dsn) {\n return getStoreEndpoint(dsn) + \"?\" + _encodedAuth(dsn);\n}\n/** Returns the envelope endpoint URL. */\nfunction _getEnvelopeEndpoint(dsn) {\n return _getIngestEndpoint(dsn, 'envelope');\n}\n/**\n * Returns the envelope endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\nexport function getEnvelopeEndpointWithUrlEncodedAuth(dsn, tunnel) {\n return tunnel ? tunnel : _getEnvelopeEndpoint(dsn) + \"?\" + _encodedAuth(dsn);\n}\n/**\n * Returns an object that can be used in request headers.\n * This is needed for node and the old /store endpoint in sentry\n */\nexport function getRequestHeaders(dsn, clientName, clientVersion) {\n // CHANGE THIS to use metadata but keep clientName and clientVersion compatible\n var header = [\"Sentry sentry_version=\" + SENTRY_API_VERSION];\n header.push(\"sentry_client=\" + clientName + \"/\" + clientVersion);\n header.push(\"sentry_key=\" + dsn.publicKey);\n if (dsn.pass) {\n header.push(\"sentry_secret=\" + dsn.pass);\n }\n return {\n 'Content-Type': 'application/json',\n 'X-Sentry-Auth': header.join(', '),\n };\n}\n/** Returns the url to the report dialog endpoint. */\nexport function getReportDialogEndpoint(dsnLike, dialogOptions) {\n var dsn = makeDsn(dsnLike);\n var endpoint = getBaseApiEndpoint(dsn) + \"embed/error-page/\";\n var encodedOptions = \"dsn=\" + dsnToString(dsn);\n for (var key in dialogOptions) {\n if (key === 'dsn') {\n continue;\n }\n if (key === 'user') {\n if (!dialogOptions.user) {\n continue;\n }\n if (dialogOptions.user.name) {\n encodedOptions += \"&name=\" + encodeURIComponent(dialogOptions.user.name);\n }\n if (dialogOptions.user.email) {\n encodedOptions += \"&email=\" + encodeURIComponent(dialogOptions.user.email);\n }\n }\n else {\n encodedOptions += \"&\" + encodeURIComponent(key) + \"=\" + encodeURIComponent(dialogOptions[key]);\n }\n }\n return endpoint + \"?\" + encodedOptions;\n}\n//# sourceMappingURL=api.js.map","import { __read } from \"tslib\";\nimport { logger, SentryError } from '@sentry/utils';\nimport { initAPIDetails } from './api';\nimport { IS_DEBUG_BUILD } from './flags';\nimport { createEventEnvelope, createSessionEnvelope } from './request';\nimport { NoopTransport } from './transports/noop';\n/**\n * This is the base implemention of a Backend.\n * @hidden\n */\nvar BaseBackend = /** @class */ (function () {\n /** Creates a new backend instance. */\n function BaseBackend(options) {\n this._options = options;\n if (!this._options.dsn) {\n IS_DEBUG_BUILD && logger.warn('No DSN provided, backend will not do anything.');\n }\n this._transport = this._setupTransport();\n }\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n BaseBackend.prototype.eventFromException = function (_exception, _hint) {\n throw new SentryError('Backend has to implement `eventFromException` method');\n };\n /**\n * @inheritDoc\n */\n BaseBackend.prototype.eventFromMessage = function (_message, _level, _hint) {\n throw new SentryError('Backend has to implement `eventFromMessage` method');\n };\n /**\n * @inheritDoc\n */\n BaseBackend.prototype.sendEvent = function (event) {\n // TODO(v7): Remove the if-else\n if (this._newTransport &&\n this._options.dsn &&\n this._options._experiments &&\n this._options._experiments.newTransport) {\n var api = initAPIDetails(this._options.dsn, this._options._metadata, this._options.tunnel);\n var env = createEventEnvelope(event, api);\n void this._newTransport.send(env).then(null, function (reason) {\n IS_DEBUG_BUILD && logger.error('Error while sending event:', reason);\n });\n }\n else {\n void this._transport.sendEvent(event).then(null, function (reason) {\n IS_DEBUG_BUILD && logger.error('Error while sending event:', reason);\n });\n }\n };\n /**\n * @inheritDoc\n */\n BaseBackend.prototype.sendSession = function (session) {\n if (!this._transport.sendSession) {\n IS_DEBUG_BUILD && logger.warn(\"Dropping session because custom transport doesn't implement sendSession\");\n return;\n }\n // TODO(v7): Remove the if-else\n if (this._newTransport &&\n this._options.dsn &&\n this._options._experiments &&\n this._options._experiments.newTransport) {\n var api = initAPIDetails(this._options.dsn, this._options._metadata, this._options.tunnel);\n var _a = __read(createSessionEnvelope(session, api), 1), env = _a[0];\n void this._newTransport.send(env).then(null, function (reason) {\n IS_DEBUG_BUILD && logger.error('Error while sending session:', reason);\n });\n }\n else {\n void this._transport.sendSession(session).then(null, function (reason) {\n IS_DEBUG_BUILD && logger.error('Error while sending session:', reason);\n });\n }\n };\n /**\n * @inheritDoc\n */\n BaseBackend.prototype.getTransport = function () {\n return this._transport;\n };\n /**\n * Sets up the transport so it can be used later to send requests.\n */\n BaseBackend.prototype._setupTransport = function () {\n return new NoopTransport();\n };\n return BaseBackend;\n}());\nexport { BaseBackend };\n//# sourceMappingURL=basebackend.js.map","import { __assign, __read, __spread, __values } from \"tslib\";\n/* eslint-disable max-lines */\nimport { Scope } from '@sentry/hub';\nimport { checkOrSetAlreadyCaught, dateTimestampInSeconds, isPlainObject, isPrimitive, isThenable, logger, makeDsn, normalize, rejectedSyncPromise, resolvedSyncPromise, SentryError, SyncPromise, truncate, uuid4, } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from './flags';\nimport { setupIntegrations } from './integration';\nvar ALREADY_SEEN_ERROR = \"Not capturing exception because it's already been captured.\";\n/**\n * Base implementation for all JavaScript SDK clients.\n *\n * Call the constructor with the corresponding backend constructor and options\n * specific to the client subclass. To access these options later, use\n * {@link Client.getOptions}. Also, the Backend instance is available via\n * {@link Client.getBackend}.\n *\n * If a Dsn is specified in the options, it will be parsed and stored. Use\n * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is\n * invalid, the constructor will throw a {@link SentryException}. Note that\n * without a valid Dsn, the SDK will not send any events to Sentry.\n *\n * Before sending an event via the backend, it is passed through\n * {@link BaseClient._prepareEvent} to add SDK information and scope data\n * (breadcrumbs and context). To add more custom information, override this\n * method and extend the resulting prepared event.\n *\n * To issue automatically created events (e.g. via instrumentation), use\n * {@link Client.captureEvent}. It will prepare the event and pass it through\n * the callback lifecycle. To issue auto-breadcrumbs, use\n * {@link Client.addBreadcrumb}.\n *\n * @example\n * class NodeClient extends BaseClient<NodeBackend, NodeOptions> {\n * public constructor(options: NodeOptions) {\n * super(NodeBackend, options);\n * }\n *\n * // ...\n * }\n */\nvar BaseClient = /** @class */ (function () {\n /**\n * Initializes this client instance.\n *\n * @param backendClass A constructor function to create the backend.\n * @param options Options for the client.\n */\n function BaseClient(backendClass, options) {\n /** Array of used integrations. */\n this._integrations = {};\n /** Number of calls being processed */\n this._numProcessing = 0;\n this._backend = new backendClass(options);\n this._options = options;\n if (options.dsn) {\n this._dsn = makeDsn(options.dsn);\n }\n }\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n BaseClient.prototype.captureException = function (exception, hint, scope) {\n var _this = this;\n // ensure we haven't captured this very object before\n if (checkOrSetAlreadyCaught(exception)) {\n IS_DEBUG_BUILD && logger.log(ALREADY_SEEN_ERROR);\n return;\n }\n var eventId = hint && hint.event_id;\n this._process(this._getBackend()\n .eventFromException(exception, hint)\n .then(function (event) { return _this._captureEvent(event, hint, scope); })\n .then(function (result) {\n eventId = result;\n }));\n return eventId;\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.captureMessage = function (message, level, hint, scope) {\n var _this = this;\n var eventId = hint && hint.event_id;\n var promisedEvent = isPrimitive(message)\n ? this._getBackend().eventFromMessage(String(message), level, hint)\n : this._getBackend().eventFromException(message, hint);\n this._process(promisedEvent\n .then(function (event) { return _this._captureEvent(event, hint, scope); })\n .then(function (result) {\n eventId = result;\n }));\n return eventId;\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.captureEvent = function (event, hint, scope) {\n // ensure we haven't captured this very object before\n if (hint && hint.originalException && checkOrSetAlreadyCaught(hint.originalException)) {\n IS_DEBUG_BUILD && logger.log(ALREADY_SEEN_ERROR);\n return;\n }\n var eventId = hint && hint.event_id;\n this._process(this._captureEvent(event, hint, scope).then(function (result) {\n eventId = result;\n }));\n return eventId;\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.captureSession = function (session) {\n if (!this._isEnabled()) {\n IS_DEBUG_BUILD && logger.warn('SDK not enabled, will not capture session.');\n return;\n }\n if (!(typeof session.release === 'string')) {\n IS_DEBUG_BUILD && logger.warn('Discarded session because of missing or non-string release');\n }\n else {\n this._sendSession(session);\n // After sending, we set init false to indicate it's not the first occurrence\n session.update({ init: false });\n }\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.getDsn = function () {\n return this._dsn;\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.getOptions = function () {\n return this._options;\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.getTransport = function () {\n return this._getBackend().getTransport();\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.flush = function (timeout) {\n var _this = this;\n return this._isClientDoneProcessing(timeout).then(function (clientFinished) {\n return _this.getTransport()\n .close(timeout)\n .then(function (transportFlushed) { return clientFinished && transportFlushed; });\n });\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.close = function (timeout) {\n var _this = this;\n return this.flush(timeout).then(function (result) {\n _this.getOptions().enabled = false;\n return result;\n });\n };\n /**\n * Sets up the integrations\n */\n BaseClient.prototype.setupIntegrations = function () {\n if (this._isEnabled() && !this._integrations.initialized) {\n this._integrations = setupIntegrations(this._options);\n }\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.getIntegration = function (integration) {\n try {\n return this._integrations[integration.id] || null;\n }\n catch (_oO) {\n IS_DEBUG_BUILD && logger.warn(\"Cannot retrieve integration \" + integration.id + \" from the current Client\");\n return null;\n }\n };\n /** Updates existing session based on the provided event */\n BaseClient.prototype._updateSessionFromEvent = function (session, event) {\n var e_1, _a;\n var crashed = false;\n var errored = false;\n var exceptions = event.exception && event.exception.values;\n if (exceptions) {\n errored = true;\n try {\n for (var exceptions_1 = __values(exceptions), exceptions_1_1 = exceptions_1.next(); !exceptions_1_1.done; exceptions_1_1 = exceptions_1.next()) {\n var ex = exceptions_1_1.value;\n var mechanism = ex.mechanism;\n if (mechanism && mechanism.handled === false) {\n crashed = true;\n break;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (exceptions_1_1 && !exceptions_1_1.done && (_a = exceptions_1.return)) _a.call(exceptions_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n // A session is updated and that session update is sent in only one of the two following scenarios:\n // 1. Session with non terminal status and 0 errors + an error occurred -> Will set error count to 1 and send update\n // 2. Session with non terminal status and 1 error + a crash occurred -> Will set status crashed and send update\n var sessionNonTerminal = session.status === 'ok';\n var shouldUpdateAndSend = (sessionNonTerminal && session.errors === 0) || (sessionNonTerminal && crashed);\n if (shouldUpdateAndSend) {\n session.update(__assign(__assign({}, (crashed && { status: 'crashed' })), { errors: session.errors || Number(errored || crashed) }));\n this.captureSession(session);\n }\n };\n /** Deliver captured session to Sentry */\n BaseClient.prototype._sendSession = function (session) {\n this._getBackend().sendSession(session);\n };\n /**\n * Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying\n * \"no\" (resolving to `false`) in order to give the client a chance to potentially finish first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not\n * passing anything) will make the promise wait as long as it takes for processing to finish before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and\n * `false` otherwise\n */\n BaseClient.prototype._isClientDoneProcessing = function (timeout) {\n var _this = this;\n return new SyncPromise(function (resolve) {\n var ticked = 0;\n var tick = 1;\n var interval = setInterval(function () {\n if (_this._numProcessing == 0) {\n clearInterval(interval);\n resolve(true);\n }\n else {\n ticked += tick;\n if (timeout && ticked >= timeout) {\n clearInterval(interval);\n resolve(false);\n }\n }\n }, tick);\n });\n };\n /** Returns the current backend. */\n BaseClient.prototype._getBackend = function () {\n return this._backend;\n };\n /** Determines whether this SDK is enabled and a valid Dsn is present. */\n BaseClient.prototype._isEnabled = function () {\n return this.getOptions().enabled !== false && this._dsn !== undefined;\n };\n /**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n */\n BaseClient.prototype._prepareEvent = function (event, scope, hint) {\n var _this = this;\n var _a = this.getOptions(), _b = _a.normalizeDepth, normalizeDepth = _b === void 0 ? 3 : _b, _c = _a.normalizeMaxBreadth, normalizeMaxBreadth = _c === void 0 ? 1000 : _c;\n var prepared = __assign(__assign({}, event), { event_id: event.event_id || (hint && hint.event_id ? hint.event_id : uuid4()), timestamp: event.timestamp || dateTimestampInSeconds() });\n this._applyClientOptions(prepared);\n this._applyIntegrationsMetadata(prepared);\n // If we have scope given to us, use it as the base for further modifications.\n // This allows us to prevent unnecessary copying of data if `captureContext` is not provided.\n var finalScope = scope;\n if (hint && hint.captureContext) {\n finalScope = Scope.clone(finalScope).update(hint.captureContext);\n }\n // We prepare the result here with a resolved Event.\n var result = resolvedSyncPromise(prepared);\n // This should be the last thing called, since we want that\n // {@link Hub.addEventProcessor} gets the finished prepared event.\n if (finalScope) {\n // In case we have a hub we reassign it.\n result = finalScope.applyToEvent(prepared, hint);\n }\n return result.then(function (evt) {\n if (evt) {\n // TODO this is more of the hack trying to solve https://github.com/getsentry/sentry-javascript/issues/2809\n // it is only attached as extra data to the event if the event somehow skips being normalized\n evt.sdkProcessingMetadata = __assign(__assign({}, evt.sdkProcessingMetadata), { normalizeDepth: normalize(normalizeDepth) + \" (\" + typeof normalizeDepth + \")\" });\n }\n if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {\n return _this._normalizeEvent(evt, normalizeDepth, normalizeMaxBreadth);\n }\n return evt;\n });\n };\n /**\n * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.\n * Normalized keys:\n * - `breadcrumbs.data`\n * - `user`\n * - `contexts`\n * - `extra`\n * @param event Event\n * @returns Normalized event\n */\n BaseClient.prototype._normalizeEvent = function (event, depth, maxBreadth) {\n if (!event) {\n return null;\n }\n var normalized = __assign(__assign(__assign(__assign(__assign({}, event), (event.breadcrumbs && {\n breadcrumbs: event.breadcrumbs.map(function (b) { return (__assign(__assign({}, b), (b.data && {\n data: normalize(b.data, depth, maxBreadth),\n }))); }),\n })), (event.user && {\n user: normalize(event.user, depth, maxBreadth),\n })), (event.contexts && {\n contexts: normalize(event.contexts, depth, maxBreadth),\n })), (event.extra && {\n extra: normalize(event.extra, depth, maxBreadth),\n }));\n // event.contexts.trace stores information about a Transaction. Similarly,\n // event.spans[] stores information about child Spans. Given that a\n // Transaction is conceptually a Span, normalization should apply to both\n // Transactions and Spans consistently.\n // For now the decision is to skip normalization of Transactions and Spans,\n // so this block overwrites the normalized event to add back the original\n // Transaction information prior to normalization.\n if (event.contexts && event.contexts.trace) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n normalized.contexts.trace = event.contexts.trace;\n }\n normalized.sdkProcessingMetadata = __assign(__assign({}, normalized.sdkProcessingMetadata), { baseClientNormalized: true });\n return normalized;\n };\n /**\n * Enhances event using the client configuration.\n * It takes care of all \"static\" values like environment, release and `dist`,\n * as well as truncating overly long values.\n * @param event event instance to be enhanced\n */\n BaseClient.prototype._applyClientOptions = function (event) {\n var options = this.getOptions();\n var environment = options.environment, release = options.release, dist = options.dist, _a = options.maxValueLength, maxValueLength = _a === void 0 ? 250 : _a;\n if (!('environment' in event)) {\n event.environment = 'environment' in options ? environment : 'production';\n }\n if (event.release === undefined && release !== undefined) {\n event.release = release;\n }\n if (event.dist === undefined && dist !== undefined) {\n event.dist = dist;\n }\n if (event.message) {\n event.message = truncate(event.message, maxValueLength);\n }\n var exception = event.exception && event.exception.values && event.exception.values[0];\n if (exception && exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n var request = event.request;\n if (request && request.url) {\n request.url = truncate(request.url, maxValueLength);\n }\n };\n /**\n * This function adds all used integrations to the SDK info in the event.\n * @param event The event that will be filled with all integrations.\n */\n BaseClient.prototype._applyIntegrationsMetadata = function (event) {\n var integrationsArray = Object.keys(this._integrations);\n if (integrationsArray.length > 0) {\n event.sdk = event.sdk || {};\n event.sdk.integrations = __spread((event.sdk.integrations || []), integrationsArray);\n }\n };\n /**\n * Tells the backend to send this event\n * @param event The Sentry event to send\n */\n BaseClient.prototype._sendEvent = function (event) {\n this._getBackend().sendEvent(event);\n };\n /**\n * Processes the event and logs an error in case of rejection\n * @param event\n * @param hint\n * @param scope\n */\n BaseClient.prototype._captureEvent = function (event, hint, scope) {\n return this._processEvent(event, hint, scope).then(function (finalEvent) {\n return finalEvent.event_id;\n }, function (reason) {\n IS_DEBUG_BUILD && logger.error(reason);\n return undefined;\n });\n };\n /**\n * Processes an event (either error or message) and sends it to Sentry.\n *\n * This also adds breadcrumbs and context information to the event. However,\n * platform specific meta data (such as the User's IP address) must be added\n * by the SDK implementor.\n *\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.\n */\n BaseClient.prototype._processEvent = function (event, hint, scope) {\n var _this = this;\n // eslint-disable-next-line @typescript-eslint/unbound-method\n var _a = this.getOptions(), beforeSend = _a.beforeSend, sampleRate = _a.sampleRate;\n var transport = this.getTransport();\n function recordLostEvent(outcome, category) {\n if (transport.recordLostEvent) {\n transport.recordLostEvent(outcome, category);\n }\n }\n if (!this._isEnabled()) {\n return rejectedSyncPromise(new SentryError('SDK not enabled, will not capture event.'));\n }\n var isTransaction = event.type === 'transaction';\n // 1.0 === 100% events are sent\n // 0.0 === 0% events are sent\n // Sampling for transaction happens somewhere else\n if (!isTransaction && typeof sampleRate === 'number' && Math.random() > sampleRate) {\n recordLostEvent('sample_rate', 'event');\n return rejectedSyncPromise(new SentryError(\"Discarding event because it's not included in the random sample (sampling rate = \" + sampleRate + \")\"));\n }\n return this._prepareEvent(event, scope, hint)\n .then(function (prepared) {\n if (prepared === null) {\n recordLostEvent('event_processor', event.type || 'event');\n throw new SentryError('An event processor returned null, will not send event.');\n }\n var isInternalException = hint && hint.data && hint.data.__sentry__ === true;\n if (isInternalException || isTransaction || !beforeSend) {\n return prepared;\n }\n var beforeSendResult = beforeSend(prepared, hint);\n return _ensureBeforeSendRv(beforeSendResult);\n })\n .then(function (processedEvent) {\n if (processedEvent === null) {\n recordLostEvent('before_send', event.type || 'event');\n throw new SentryError('`beforeSend` returned `null`, will not send event.');\n }\n var session = scope && scope.getSession && scope.getSession();\n if (!isTransaction && session) {\n _this._updateSessionFromEvent(session, processedEvent);\n }\n _this._sendEvent(processedEvent);\n return processedEvent;\n })\n .then(null, function (reason) {\n if (reason instanceof SentryError) {\n throw reason;\n }\n _this.captureException(reason, {\n data: {\n __sentry__: true,\n },\n originalException: reason,\n });\n throw new SentryError(\"Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: \" + reason);\n });\n };\n /**\n * Occupies the client with processing and event\n */\n BaseClient.prototype._process = function (promise) {\n var _this = this;\n this._numProcessing += 1;\n void promise.then(function (value) {\n _this._numProcessing -= 1;\n return value;\n }, function (reason) {\n _this._numProcessing -= 1;\n return reason;\n });\n };\n return BaseClient;\n}());\nexport { BaseClient };\n/**\n * Verifies that return value of configured `beforeSend` is of expected type.\n */\nfunction _ensureBeforeSendRv(rv) {\n var nullErr = '`beforeSend` method has to return `null` or a valid event.';\n if (isThenable(rv)) {\n return rv.then(function (event) {\n if (!(isPlainObject(event) || event === null)) {\n throw new SentryError(nullErr);\n }\n return event;\n }, function (e) {\n throw new SentryError(\"beforeSend rejected with \" + e);\n });\n }\n else if (!(isPlainObject(rv) || rv === null)) {\n throw new SentryError(nullErr);\n }\n return rv;\n}\n//# sourceMappingURL=baseclient.js.map","/*\n * This file defines flags and constants that can be modified during compile time in order to facilitate tree shaking\n * for users.\n *\n * Debug flags need to be declared in each package individually and must not be imported across package boundaries,\n * because some build tools have trouble tree-shaking imported guards.\n *\n * As a convention, we define debug flags in a `flags.ts` file in the root of a package's `src` folder.\n *\n * Debug flag files will contain \"magic strings\" like `__SENTRY_DEBUG__` that may get replaced with actual values during\n * our, or the user's build process. Take care when introducing new flags - they must not throw if they are not\n * replaced.\n */\n/** Flag that is true for debug builds, false otherwise. */\nexport var IS_DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' ? true : __SENTRY_DEBUG__;\n//# sourceMappingURL=flags.js.map","import { __read, __spread } from \"tslib\";\nimport { addGlobalEventProcessor, getCurrentHub } from '@sentry/hub';\nimport { addNonEnumerableProperty, logger } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from './flags';\nexport var installedIntegrations = [];\n/**\n * @private\n */\nfunction filterDuplicates(integrations) {\n return integrations.reduce(function (acc, integrations) {\n if (acc.every(function (accIntegration) { return integrations.name !== accIntegration.name; })) {\n acc.push(integrations);\n }\n return acc;\n }, []);\n}\n/** Gets integration to install */\nexport function getIntegrationsToSetup(options) {\n var defaultIntegrations = (options.defaultIntegrations && __spread(options.defaultIntegrations)) || [];\n var userIntegrations = options.integrations;\n var integrations = __spread(filterDuplicates(defaultIntegrations));\n if (Array.isArray(userIntegrations)) {\n // Filter out integrations that are also included in user options\n integrations = __spread(integrations.filter(function (integrations) {\n return userIntegrations.every(function (userIntegration) { return userIntegration.name !== integrations.name; });\n }), filterDuplicates(userIntegrations));\n }\n else if (typeof userIntegrations === 'function') {\n integrations = userIntegrations(integrations);\n integrations = Array.isArray(integrations) ? integrations : [integrations];\n }\n // Make sure that if present, `Debug` integration will always run last\n var integrationsNames = integrations.map(function (i) { return i.name; });\n var alwaysLastToRun = 'Debug';\n if (integrationsNames.indexOf(alwaysLastToRun) !== -1) {\n integrations.push.apply(integrations, __spread(integrations.splice(integrationsNames.indexOf(alwaysLastToRun), 1)));\n }\n return integrations;\n}\n/** Setup given integration */\nexport function setupIntegration(integration) {\n if (installedIntegrations.indexOf(integration.name) !== -1) {\n return;\n }\n integration.setupOnce(addGlobalEventProcessor, getCurrentHub);\n installedIntegrations.push(integration.name);\n IS_DEBUG_BUILD && logger.log(\"Integration installed: \" + integration.name);\n}\n/**\n * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default\n * integrations are added unless they were already provided before.\n * @param integrations array of integration instances\n * @param withDefault should enable default integrations\n */\nexport function setupIntegrations(options) {\n var integrations = {};\n getIntegrationsToSetup(options).forEach(function (integration) {\n integrations[integration.name] = integration;\n setupIntegration(integration);\n });\n // set the `initialized` flag so we don't run through the process again unecessarily; use `Object.defineProperty`\n // because by default it creates a property which is nonenumerable, which we want since `initialized` shouldn't be\n // considered a member of the index the way the actual integrations are\n addNonEnumerableProperty(integrations, 'initialized', true);\n return integrations;\n}\n//# sourceMappingURL=integration.js.map","import { getOriginalFunction } from '@sentry/utils';\nvar originalFunctionToString;\n/** Patch toString calls to return proper name for wrapped functions */\nvar FunctionToString = /** @class */ (function () {\n function FunctionToString() {\n /**\n * @inheritDoc\n */\n this.name = FunctionToString.id;\n }\n /**\n * @inheritDoc\n */\n FunctionToString.prototype.setupOnce = function () {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n originalFunctionToString = Function.prototype.toString;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Function.prototype.toString = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var context = getOriginalFunction(this) || this;\n return originalFunctionToString.apply(context, args);\n };\n };\n /**\n * @inheritDoc\n */\n FunctionToString.id = 'FunctionToString';\n return FunctionToString;\n}());\nexport { FunctionToString };\n//# sourceMappingURL=functiontostring.js.map","import { __read, __spread } from \"tslib\";\nimport { getEventDescription, isMatchingPattern, logger } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from '../flags';\n// \"Script error.\" is hard coded into browsers for errors that it can't read.\n// this is the result of a script being pulled in from an external domain and CORS.\nvar DEFAULT_IGNORE_ERRORS = [/^Script error\\.?$/, /^Javascript error: Script error\\.? on line 0$/];\n/** Inbound filters configurable by the user */\nvar InboundFilters = /** @class */ (function () {\n function InboundFilters(_options) {\n if (_options === void 0) { _options = {}; }\n this._options = _options;\n /**\n * @inheritDoc\n */\n this.name = InboundFilters.id;\n }\n /**\n * @inheritDoc\n */\n InboundFilters.prototype.setupOnce = function (addGlobalEventProcessor, getCurrentHub) {\n addGlobalEventProcessor(function (event) {\n var hub = getCurrentHub();\n if (hub) {\n var self_1 = hub.getIntegration(InboundFilters);\n if (self_1) {\n var client = hub.getClient();\n var clientOptions = client ? client.getOptions() : {};\n var options = _mergeOptions(self_1._options, clientOptions);\n return _shouldDropEvent(event, options) ? null : event;\n }\n }\n return event;\n });\n };\n /**\n * @inheritDoc\n */\n InboundFilters.id = 'InboundFilters';\n return InboundFilters;\n}());\nexport { InboundFilters };\n/** JSDoc */\nexport function _mergeOptions(internalOptions, clientOptions) {\n if (internalOptions === void 0) { internalOptions = {}; }\n if (clientOptions === void 0) { clientOptions = {}; }\n return {\n allowUrls: __spread((internalOptions.whitelistUrls || []), (internalOptions.allowUrls || []), (clientOptions.whitelistUrls || []), (clientOptions.allowUrls || [])),\n denyUrls: __spread((internalOptions.blacklistUrls || []), (internalOptions.denyUrls || []), (clientOptions.blacklistUrls || []), (clientOptions.denyUrls || [])),\n ignoreErrors: __spread((internalOptions.ignoreErrors || []), (clientOptions.ignoreErrors || []), DEFAULT_IGNORE_ERRORS),\n ignoreInternal: internalOptions.ignoreInternal !== undefined ? internalOptions.ignoreInternal : true,\n };\n}\n/** JSDoc */\nexport function _shouldDropEvent(event, options) {\n if (options.ignoreInternal && _isSentryError(event)) {\n IS_DEBUG_BUILD &&\n logger.warn(\"Event dropped due to being internal Sentry Error.\\nEvent: \" + getEventDescription(event));\n return true;\n }\n if (_isIgnoredError(event, options.ignoreErrors)) {\n IS_DEBUG_BUILD &&\n logger.warn(\"Event dropped due to being matched by `ignoreErrors` option.\\nEvent: \" + getEventDescription(event));\n return true;\n }\n if (_isDeniedUrl(event, options.denyUrls)) {\n IS_DEBUG_BUILD &&\n logger.warn(\"Event dropped due to being matched by `denyUrls` option.\\nEvent: \" + getEventDescription(event) + \".\\nUrl: \" + _getEventFilterUrl(event));\n return true;\n }\n if (!_isAllowedUrl(event, options.allowUrls)) {\n IS_DEBUG_BUILD &&\n logger.warn(\"Event dropped due to not being matched by `allowUrls` option.\\nEvent: \" + getEventDescription(event) + \".\\nUrl: \" + _getEventFilterUrl(event));\n return true;\n }\n return false;\n}\nfunction _isIgnoredError(event, ignoreErrors) {\n if (!ignoreErrors || !ignoreErrors.length) {\n return false;\n }\n return _getPossibleEventMessages(event).some(function (message) {\n return ignoreErrors.some(function (pattern) { return isMatchingPattern(message, pattern); });\n });\n}\nfunction _isDeniedUrl(event, denyUrls) {\n // TODO: Use Glob instead?\n if (!denyUrls || !denyUrls.length) {\n return false;\n }\n var url = _getEventFilterUrl(event);\n return !url ? false : denyUrls.some(function (pattern) { return isMatchingPattern(url, pattern); });\n}\nfunction _isAllowedUrl(event, allowUrls) {\n // TODO: Use Glob instead?\n if (!allowUrls || !allowUrls.length) {\n return true;\n }\n var url = _getEventFilterUrl(event);\n return !url ? true : allowUrls.some(function (pattern) { return isMatchingPattern(url, pattern); });\n}\nfunction _getPossibleEventMessages(event) {\n if (event.message) {\n return [event.message];\n }\n if (event.exception) {\n try {\n var _a = (event.exception.values && event.exception.values[0]) || {}, _b = _a.type, type = _b === void 0 ? '' : _b, _c = _a.value, value = _c === void 0 ? '' : _c;\n return [\"\" + value, type + \": \" + value];\n }\n catch (oO) {\n IS_DEBUG_BUILD && logger.error(\"Cannot extract message for event \" + getEventDescription(event));\n return [];\n }\n }\n return [];\n}\nfunction _isSentryError(event) {\n try {\n // @ts-ignore can't be a sentry error if undefined\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return event.exception.values[0].type === 'SentryError';\n }\n catch (e) {\n // ignore\n }\n return false;\n}\nfunction _getLastValidUrl(frames) {\n if (frames === void 0) { frames = []; }\n for (var i = frames.length - 1; i >= 0; i--) {\n var frame = frames[i];\n if (frame && frame.filename !== '<anonymous>' && frame.filename !== '[native code]') {\n return frame.filename || null;\n }\n }\n return null;\n}\nfunction _getEventFilterUrl(event) {\n try {\n if (event.stacktrace) {\n return _getLastValidUrl(event.stacktrace.frames);\n }\n var frames_1;\n try {\n // @ts-ignore we only care about frames if the whole thing here is defined\n frames_1 = event.exception.values[0].stacktrace.frames;\n }\n catch (e) {\n // ignore\n }\n return frames_1 ? _getLastValidUrl(frames_1) : null;\n }\n catch (oO) {\n IS_DEBUG_BUILD && logger.error(\"Cannot extract url for event \" + getEventDescription(event));\n return null;\n }\n}\n//# sourceMappingURL=inboundfilters.js.map","import { __assign, __read, __spread } from \"tslib\";\nimport { createEnvelope, dsnToString, normalize, serializeEnvelope } from '@sentry/utils';\nimport { getEnvelopeEndpointWithUrlEncodedAuth, getStoreEndpointWithUrlEncodedAuth } from './api';\n/** Extract sdk info from from the API metadata */\nfunction getSdkMetadataForEnvelopeHeader(api) {\n if (!api.metadata || !api.metadata.sdk) {\n return;\n }\n var _a = api.metadata.sdk, name = _a.name, version = _a.version;\n return { name: name, version: version };\n}\n/**\n * Apply SdkInfo (name, version, packages, integrations) to the corresponding event key.\n * Merge with existing data if any.\n **/\nfunction enhanceEventWithSdkInfo(event, sdkInfo) {\n if (!sdkInfo) {\n return event;\n }\n event.sdk = event.sdk || {};\n event.sdk.name = event.sdk.name || sdkInfo.name;\n event.sdk.version = event.sdk.version || sdkInfo.version;\n event.sdk.integrations = __spread((event.sdk.integrations || []), (sdkInfo.integrations || []));\n event.sdk.packages = __spread((event.sdk.packages || []), (sdkInfo.packages || []));\n return event;\n}\n/** Creates an envelope from a Session */\nexport function createSessionEnvelope(session, api) {\n var sdkInfo = getSdkMetadataForEnvelopeHeader(api);\n var envelopeHeaders = __assign(__assign({ sent_at: new Date().toISOString() }, (sdkInfo && { sdk: sdkInfo })), (!!api.tunnel && { dsn: dsnToString(api.dsn) }));\n // I know this is hacky but we don't want to add `sessions` to request type since it's never rate limited\n var type = 'aggregates' in session ? 'sessions' : 'session';\n // TODO (v7) Have to cast type because envelope items do not accept a `SentryRequestType`\n var envelopeItem = [{ type: type }, session];\n var envelope = createEnvelope(envelopeHeaders, [envelopeItem]);\n return [envelope, type];\n}\n/** Creates a SentryRequest from a Session. */\nexport function sessionToSentryRequest(session, api) {\n var _a = __read(createSessionEnvelope(session, api), 2), envelope = _a[0], type = _a[1];\n return {\n body: serializeEnvelope(envelope),\n type: type,\n url: getEnvelopeEndpointWithUrlEncodedAuth(api.dsn, api.tunnel),\n };\n}\n/**\n * Create an Envelope from an event. Note that this is duplicated from below,\n * but on purpose as this will be refactored in v7.\n */\nexport function createEventEnvelope(event, api) {\n var sdkInfo = getSdkMetadataForEnvelopeHeader(api);\n var eventType = event.type || 'event';\n var transactionSampling = (event.sdkProcessingMetadata || {}).transactionSampling;\n var _a = transactionSampling || {}, samplingMethod = _a.method, sampleRate = _a.rate;\n // TODO: Below is a temporary hack in order to debug a serialization error - see\n // https://github.com/getsentry/sentry-javascript/issues/2809,\n // https://github.com/getsentry/sentry-javascript/pull/4425, and\n // https://github.com/getsentry/sentry-javascript/pull/4574.\n //\n // TL; DR: even though we normalize all events (which should prevent this), something is causing `JSON.stringify` to\n // throw a circular reference error.\n //\n // When it's time to remove it:\n // 1. Delete everything between here and where the request object `req` is created, EXCEPT the line deleting\n // `sdkProcessingMetadata`\n // 2. Restore the original version of the request body, which is commented out\n // 3. Search for either of the PR URLs above and pull out the companion hacks in the browser playwright tests and the\n // baseClient tests in this package\n enhanceEventWithSdkInfo(event, api.metadata.sdk);\n event.tags = event.tags || {};\n event.extra = event.extra || {};\n // In theory, all events should be marked as having gone through normalization and so\n // we should never set this tag/extra data\n if (!(event.sdkProcessingMetadata && event.sdkProcessingMetadata.baseClientNormalized)) {\n event.tags.skippedNormalization = true;\n event.extra.normalizeDepth = event.sdkProcessingMetadata ? event.sdkProcessingMetadata.normalizeDepth : 'unset';\n }\n // prevent this data from being sent to sentry\n // TODO: This is NOT part of the hack - DO NOT DELETE\n delete event.sdkProcessingMetadata;\n var envelopeHeaders = __assign(__assign({ event_id: event.event_id, sent_at: new Date().toISOString() }, (sdkInfo && { sdk: sdkInfo })), (!!api.tunnel && { dsn: dsnToString(api.dsn) }));\n var eventItem = [\n {\n type: eventType,\n sample_rates: [{ id: samplingMethod, rate: sampleRate }],\n },\n event,\n ];\n return createEnvelope(envelopeHeaders, [eventItem]);\n}\n/** Creates a SentryRequest from an event. */\nexport function eventToSentryRequest(event, api) {\n var sdkInfo = getSdkMetadataForEnvelopeHeader(api);\n var eventType = event.type || 'event';\n var useEnvelope = eventType === 'transaction' || !!api.tunnel;\n var transactionSampling = (event.sdkProcessingMetadata || {}).transactionSampling;\n var _a = transactionSampling || {}, samplingMethod = _a.method, sampleRate = _a.rate;\n // TODO: Below is a temporary hack in order to debug a serialization error - see\n // https://github.com/getsentry/sentry-javascript/issues/2809,\n // https://github.com/getsentry/sentry-javascript/pull/4425, and\n // https://github.com/getsentry/sentry-javascript/pull/4574.\n //\n // TL; DR: even though we normalize all events (which should prevent this), something is causing `JSON.stringify` to\n // throw a circular reference error.\n //\n // When it's time to remove it:\n // 1. Delete everything between here and where the request object `req` is created, EXCEPT the line deleting\n // `sdkProcessingMetadata`\n // 2. Restore the original version of the request body, which is commented out\n // 3. Search for either of the PR URLs above and pull out the companion hacks in the browser playwright tests and the\n // baseClient tests in this package\n enhanceEventWithSdkInfo(event, api.metadata.sdk);\n event.tags = event.tags || {};\n event.extra = event.extra || {};\n // In theory, all events should be marked as having gone through normalization and so\n // we should never set this tag/extra data\n if (!(event.sdkProcessingMetadata && event.sdkProcessingMetadata.baseClientNormalized)) {\n event.tags.skippedNormalization = true;\n event.extra.normalizeDepth = event.sdkProcessingMetadata ? event.sdkProcessingMetadata.normalizeDepth : 'unset';\n }\n // prevent this data from being sent to sentry\n // TODO: This is NOT part of the hack - DO NOT DELETE\n delete event.sdkProcessingMetadata;\n var body;\n try {\n // 99.9% of events should get through just fine - no change in behavior for them\n body = JSON.stringify(event);\n }\n catch (err) {\n // Record data about the error without replacing original event data, then force renormalization\n event.tags.JSONStringifyError = true;\n event.extra.JSONStringifyError = err;\n try {\n body = JSON.stringify(normalize(event));\n }\n catch (newErr) {\n // At this point even renormalization hasn't worked, meaning something about the event data has gone very wrong.\n // Time to cut our losses and record only the new error. With luck, even in the problematic cases we're trying to\n // debug with this hack, we won't ever land here.\n var innerErr = newErr;\n body = JSON.stringify({\n message: 'JSON.stringify error after renormalization',\n // setting `extra: { innerErr }` here for some reason results in an empty object, so unpack manually\n extra: { message: innerErr.message, stack: innerErr.stack },\n });\n }\n }\n var req = {\n // this is the relevant line of code before the hack was added, to make it easy to undo said hack once we've solved\n // the mystery\n // body: JSON.stringify(sdkInfo ? enhanceEventWithSdkInfo(event, api.metadata.sdk) : event),\n body: body,\n type: eventType,\n url: useEnvelope\n ? getEnvelopeEndpointWithUrlEncodedAuth(api.dsn, api.tunnel)\n : getStoreEndpointWithUrlEncodedAuth(api.dsn),\n };\n // https://develop.sentry.dev/sdk/envelopes/\n // Since we don't need to manipulate envelopes nor store them, there is no\n // exported concept of an Envelope with operations including serialization and\n // deserialization. Instead, we only implement a minimal subset of the spec to\n // serialize events inline here.\n if (useEnvelope) {\n var envelopeHeaders = __assign(__assign({ event_id: event.event_id, sent_at: new Date().toISOString() }, (sdkInfo && { sdk: sdkInfo })), (!!api.tunnel && { dsn: dsnToString(api.dsn) }));\n var eventItem = [\n {\n type: eventType,\n sample_rates: [{ id: samplingMethod, rate: sampleRate }],\n },\n req.body,\n ];\n var envelope = createEnvelope(envelopeHeaders, [eventItem]);\n req.body = serializeEnvelope(envelope);\n }\n return req;\n}\n//# sourceMappingURL=request.js.map","import { getCurrentHub } from '@sentry/hub';\nimport { logger } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from './flags';\n/**\n * Internal function to create a new SDK client instance. The client is\n * installed and then bound to the current scope.\n *\n * @param clientClass The client class to instantiate.\n * @param options Options to pass to the client.\n */\nexport function initAndBind(clientClass, options) {\n if (options.debug === true) {\n if (IS_DEBUG_BUILD) {\n logger.enable();\n }\n else {\n // use `console.warn` rather than `logger.warn` since by non-debug bundles have all `logger.x` statements stripped\n // eslint-disable-next-line no-console\n console.warn('[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.');\n }\n }\n var hub = getCurrentHub();\n var scope = hub.getScope();\n if (scope) {\n scope.update(options.initialScope);\n }\n var client = new clientClass(options);\n hub.bindClient(client);\n}\n//# sourceMappingURL=sdk.js.map","import { disabledUntil, eventStatusFromHttpCode, getEnvelopeType, isRateLimited, makePromiseBuffer, rejectedSyncPromise, resolvedSyncPromise, serializeEnvelope, updateRateLimits, } from '@sentry/utils';\nexport var ERROR_TRANSPORT_CATEGORY = 'error';\nexport var TRANSACTION_TRANSPORT_CATEGORY = 'transaction';\nexport var ATTACHMENT_TRANSPORT_CATEGORY = 'attachment';\nexport var SESSION_TRANSPORT_CATEGORY = 'session';\nexport var DEFAULT_TRANSPORT_BUFFER_SIZE = 30;\n/**\n * Creates a `NewTransport`\n *\n * @param options\n * @param makeRequest\n */\nexport function createTransport(options, makeRequest, buffer) {\n if (buffer === void 0) { buffer = makePromiseBuffer(options.bufferSize || DEFAULT_TRANSPORT_BUFFER_SIZE); }\n var rateLimits = {};\n var flush = function (timeout) { return buffer.drain(timeout); };\n function send(envelope) {\n var envCategory = getEnvelopeType(envelope);\n var category = envCategory === 'event' ? 'error' : envCategory;\n var request = {\n category: category,\n body: serializeEnvelope(envelope),\n };\n // Don't add to buffer if transport is already rate-limited\n if (isRateLimited(rateLimits, category)) {\n return rejectedSyncPromise({\n status: 'rate_limit',\n reason: getRateLimitReason(rateLimits, category),\n });\n }\n var requestTask = function () {\n return makeRequest(request).then(function (_a) {\n var body = _a.body, headers = _a.headers, reason = _a.reason, statusCode = _a.statusCode;\n var status = eventStatusFromHttpCode(statusCode);\n if (headers) {\n rateLimits = updateRateLimits(rateLimits, headers);\n }\n if (status === 'success') {\n return resolvedSyncPromise({ status: status, reason: reason });\n }\n return rejectedSyncPromise({\n status: status,\n reason: reason ||\n body ||\n (status === 'rate_limit' ? getRateLimitReason(rateLimits, category) : 'Unknown transport error'),\n });\n });\n };\n return buffer.add(requestTask);\n }\n return {\n send: send,\n flush: flush,\n };\n}\nfunction getRateLimitReason(rateLimits, category) {\n return \"Too many \" + category + \" requests, backing off until: \" + new Date(disabledUntil(rateLimits, category)).toISOString();\n}\n//# sourceMappingURL=base.js.map","import { resolvedSyncPromise } from '@sentry/utils';\n/** Noop transport */\nvar NoopTransport = /** @class */ (function () {\n function NoopTransport() {\n }\n /**\n * @inheritDoc\n */\n NoopTransport.prototype.sendEvent = function (_) {\n return resolvedSyncPromise({\n reason: 'NoopTransport: Event has been skipped because no Dsn is configured.',\n status: 'skipped',\n });\n };\n /**\n * @inheritDoc\n */\n NoopTransport.prototype.close = function (_) {\n return resolvedSyncPromise(true);\n };\n return NoopTransport;\n}());\nexport { NoopTransport };\n//# sourceMappingURL=noop.js.map","export var SDK_VERSION = '6.19.6';\n//# sourceMappingURL=version.js.map","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) :
|