@sentry/browser 6.19.4 → 6.19.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. package/build/bundle.debug.min.js +3 -0
  2. package/build/bundle.debug.min.js.map +1 -0
  3. package/build/bundle.es6.debug.min.js +3 -0
  4. package/build/bundle.es6.debug.min.js.map +1 -0
  5. package/{bundles → build}/bundle.es6.js +166 -92
  6. package/build/bundle.es6.js.map +1 -0
  7. package/build/bundle.es6.min.js +3 -0
  8. package/build/bundle.es6.min.js.map +1 -0
  9. package/{bundles → build}/bundle.js +171 -111
  10. package/build/bundle.js.map +1 -0
  11. package/build/bundle.min.js +3 -0
  12. package/build/bundle.min.js.map +1 -0
  13. package/dist/backend.d.ts.map +1 -1
  14. package/dist/backend.js.map +1 -1
  15. package/dist/client.d.ts.map +1 -1
  16. package/dist/client.js +2 -1
  17. package/dist/client.js.map +1 -1
  18. package/dist/eventbuilder.d.ts.map +1 -1
  19. package/dist/eventbuilder.js.map +1 -1
  20. package/dist/exports.d.ts.map +1 -1
  21. package/dist/exports.js.map +1 -1
  22. package/dist/flags.d.ts +3 -0
  23. package/dist/flags.d.ts.map +1 -0
  24. package/dist/flags.js +17 -0
  25. package/dist/flags.js.map +1 -0
  26. package/dist/helpers.d.ts.map +1 -1
  27. package/dist/helpers.js +3 -2
  28. package/dist/helpers.js.map +1 -1
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js.map +1 -1
  31. package/dist/integrations/breadcrumbs.d.ts.map +1 -1
  32. package/dist/integrations/breadcrumbs.js.map +1 -1
  33. package/dist/integrations/dedupe.d.ts.map +1 -1
  34. package/dist/integrations/dedupe.js +2 -1
  35. package/dist/integrations/dedupe.js.map +1 -1
  36. package/dist/integrations/globalhandlers.d.ts.map +1 -1
  37. package/dist/integrations/globalhandlers.js +2 -1
  38. package/dist/integrations/globalhandlers.js.map +1 -1
  39. package/dist/integrations/index.d.ts.map +1 -1
  40. package/dist/integrations/index.js.map +1 -1
  41. package/dist/integrations/linkederrors.d.ts.map +1 -1
  42. package/dist/integrations/linkederrors.js.map +1 -1
  43. package/dist/integrations/trycatch.d.ts.map +1 -1
  44. package/dist/integrations/trycatch.js.map +1 -1
  45. package/dist/integrations/useragent.d.ts.map +1 -1
  46. package/dist/integrations/useragent.js.map +1 -1
  47. package/dist/sdk.d.ts.map +1 -1
  48. package/dist/sdk.js +4 -3
  49. package/dist/sdk.js.map +1 -1
  50. package/dist/stack-parsers.d.ts.map +1 -1
  51. package/dist/stack-parsers.js.map +1 -1
  52. package/dist/transports/base.d.ts.map +1 -1
  53. package/dist/transports/base.js +6 -5
  54. package/dist/transports/base.js.map +1 -1
  55. package/dist/transports/fetch.d.ts.map +1 -1
  56. package/dist/transports/fetch.js.map +1 -1
  57. package/dist/transports/index.d.ts.map +1 -1
  58. package/dist/transports/index.js.map +1 -1
  59. package/dist/transports/new-fetch.d.ts.map +1 -1
  60. package/dist/transports/new-fetch.js.map +1 -1
  61. package/dist/transports/new-xhr.d.ts.map +1 -1
  62. package/dist/transports/new-xhr.js.map +1 -1
  63. package/dist/transports/utils.d.ts.map +1 -1
  64. package/dist/transports/utils.js +2 -1
  65. package/dist/transports/utils.js.map +1 -1
  66. package/dist/transports/xhr.d.ts.map +1 -1
  67. package/dist/transports/xhr.js.map +1 -1
  68. package/dist/version.d.ts.map +1 -1
  69. package/dist/version.js.map +1 -1
  70. package/esm/backend.d.ts.map +1 -1
  71. package/esm/backend.js.map +1 -1
  72. package/esm/client.d.ts.map +1 -1
  73. package/esm/client.js +3 -2
  74. package/esm/client.js.map +1 -1
  75. package/esm/eventbuilder.d.ts.map +1 -1
  76. package/esm/eventbuilder.js.map +1 -1
  77. package/esm/exports.d.ts.map +1 -1
  78. package/esm/exports.js.map +1 -1
  79. package/esm/flags.d.ts +3 -0
  80. package/esm/flags.d.ts.map +1 -0
  81. package/esm/flags.js +16 -0
  82. package/esm/flags.js.map +1 -0
  83. package/esm/helpers.d.ts.map +1 -1
  84. package/esm/helpers.js +4 -3
  85. package/esm/helpers.js.map +1 -1
  86. package/esm/index.d.ts.map +1 -1
  87. package/esm/index.js.map +1 -1
  88. package/esm/integrations/breadcrumbs.d.ts.map +1 -1
  89. package/esm/integrations/breadcrumbs.js.map +1 -1
  90. package/esm/integrations/dedupe.d.ts.map +1 -1
  91. package/esm/integrations/dedupe.js +3 -2
  92. package/esm/integrations/dedupe.js.map +1 -1
  93. package/esm/integrations/globalhandlers.d.ts.map +1 -1
  94. package/esm/integrations/globalhandlers.js +3 -2
  95. package/esm/integrations/globalhandlers.js.map +1 -1
  96. package/esm/integrations/index.d.ts.map +1 -1
  97. package/esm/integrations/index.js.map +1 -1
  98. package/esm/integrations/linkederrors.d.ts.map +1 -1
  99. package/esm/integrations/linkederrors.js.map +1 -1
  100. package/esm/integrations/trycatch.d.ts.map +1 -1
  101. package/esm/integrations/trycatch.js.map +1 -1
  102. package/esm/integrations/useragent.d.ts.map +1 -1
  103. package/esm/integrations/useragent.js.map +1 -1
  104. package/esm/sdk.d.ts.map +1 -1
  105. package/esm/sdk.js +5 -4
  106. package/esm/sdk.js.map +1 -1
  107. package/esm/stack-parsers.d.ts.map +1 -1
  108. package/esm/stack-parsers.js.map +1 -1
  109. package/esm/transports/base.d.ts.map +1 -1
  110. package/esm/transports/base.js +7 -6
  111. package/esm/transports/base.js.map +1 -1
  112. package/esm/transports/fetch.d.ts.map +1 -1
  113. package/esm/transports/fetch.js.map +1 -1
  114. package/esm/transports/index.d.ts.map +1 -1
  115. package/esm/transports/index.js.map +1 -1
  116. package/esm/transports/new-fetch.d.ts.map +1 -1
  117. package/esm/transports/new-fetch.js.map +1 -1
  118. package/esm/transports/new-xhr.d.ts.map +1 -1
  119. package/esm/transports/new-xhr.js.map +1 -1
  120. package/esm/transports/utils.d.ts.map +1 -1
  121. package/esm/transports/utils.js +3 -2
  122. package/esm/transports/utils.js.map +1 -1
  123. package/esm/transports/xhr.d.ts.map +1 -1
  124. package/esm/transports/xhr.js.map +1 -1
  125. package/esm/version.d.ts.map +1 -1
  126. package/esm/version.js.map +1 -1
  127. package/package.json +5 -44
  128. package/types/backend.d.ts.map +1 -1
  129. package/types/client.d.ts.map +1 -1
  130. package/types/eventbuilder.d.ts.map +1 -1
  131. package/types/exports.d.ts.map +1 -1
  132. package/types/flags.d.ts +3 -0
  133. package/types/flags.d.ts.map +1 -0
  134. package/types/helpers.d.ts.map +1 -1
  135. package/types/index.d.ts.map +1 -1
  136. package/types/integrations/breadcrumbs.d.ts.map +1 -1
  137. package/types/integrations/dedupe.d.ts.map +1 -1
  138. package/types/integrations/globalhandlers.d.ts.map +1 -1
  139. package/types/integrations/index.d.ts.map +1 -1
  140. package/types/integrations/linkederrors.d.ts.map +1 -1
  141. package/types/integrations/trycatch.d.ts.map +1 -1
  142. package/types/integrations/useragent.d.ts.map +1 -1
  143. package/types/sdk.d.ts.map +1 -1
  144. package/types/stack-parsers.d.ts.map +1 -1
  145. package/types/transports/base.d.ts.map +1 -1
  146. package/types/transports/fetch.d.ts.map +1 -1
  147. package/types/transports/index.d.ts.map +1 -1
  148. package/types/transports/new-fetch.d.ts.map +1 -1
  149. package/types/transports/new-xhr.d.ts.map +1 -1
  150. package/types/transports/utils.d.ts.map +1 -1
  151. package/types/transports/xhr.d.ts.map +1 -1
  152. package/types/version.d.ts.map +1 -1
  153. package/bundles/bundle.debug.min.js +0 -3
  154. package/bundles/bundle.debug.min.js.map +0 -1
  155. package/bundles/bundle.es6.debug.min.js +0 -3
  156. package/bundles/bundle.es6.debug.min.js.map +0 -1
  157. package/bundles/bundle.es6.js.map +0 -1
  158. package/bundles/bundle.es6.min.js +0 -3
  159. package/bundles/bundle.es6.min.js.map +0 -1
  160. package/bundles/bundle.js.map +0 -1
  161. package/bundles/bundle.min.js +0 -3
  162. package/bundles/bundle.min.js.map +0 -1
@@ -1,3 +0,0 @@
1
- /*! @sentry/browser 6.19.4 (261f2e4) | https://github.com/getsentry/sentry-javascript */
2
- var Sentry=function(t){var e;t.Severity=void 0,(e=t.Severity||(t.Severity={})).Fatal="fatal",e.Error="error",e.Warning="warning",e.Log="log",e.Info="info",e.Debug="debug",e.Critical="critical";const n={};function r(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:n}const i=Object.prototype.toString;function s(t){switch(i.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return p(t,Error)}}function o(t,e){return i.call(t)===`[object ${e}]`}function c(t){return o(t,"ErrorEvent")}function u(t){return o(t,"DOMError")}function a(t){return o(t,"String")}function h(t){return null===t||"object"!=typeof t&&"function"!=typeof t}function f(t){return o(t,"Object")}function l(t){return"undefined"!=typeof Event&&p(t,Event)}function d(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function p(t,e){try{return t instanceof e}catch(t){return!1}}function b(t,e){try{let n=t;const r=5,i=80,s=[];let o=0,c=0;const u=" > ",a=u.length;let h;for(;n&&o++<r&&(h=y(n,e),!("html"===h||o>1&&c+s.length*a+h.length>=i));)s.push(h),c+=h.length,n=n.parentNode;return s.reverse().join(u)}catch(t){return"<unknown>"}}function y(t,e){const n=t,r=[];let i,s,o,c,u;if(!n||!n.tagName)return"";r.push(n.tagName.toLowerCase());const h=e&&e.length?e.filter((t=>n.getAttribute(t))).map((t=>[t,n.getAttribute(t)])):null;if(h&&h.length)h.forEach((t=>{r.push(`[${t[0]}="${t[1]}"]`)}));else if(n.id&&r.push(`#${n.id}`),i=n.className,i&&a(i))for(s=i.split(/\s+/),u=0;u<s.length;u++)r.push(`.${s[u]}`);const f=["type","name","title","alt"];for(u=0;u<f.length;u++)o=f[u],c=n.getAttribute(o),c&&r.push(`[${o}="${c}"]`);return r.join("")}const v=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){return t.__proto__=e,t}:function(t,e){for(const n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n]);return t});class m extends Error{constructor(t){super(t),this.message=t,this.name=new.target.prototype.constructor.name,v(this,new.target.prototype)}}const g=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/;function O(t,e=!1){const{host:n,path:r,pass:i,port:s,projectId:o,protocol:c,publicKey:u}=t;return`${c}://${u}${e&&i?`:${i}`:""}@${n}${s?`:${s}`:""}/${r?`${r}/`:r}${o}`}function j(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 w(t){const e="string"==typeof t?function(t){const e=g.exec(t);if(!e)throw new m(`Invalid Sentry Dsn: ${t}`);const[n,r,i="",s,o="",c]=e.slice(1);let u="",a=c;const h=a.split("/");if(h.length>1&&(u=h.slice(0,-1).join("/"),a=h.pop()),a){const t=a.match(/^\d+/);t&&(a=t[0])}return j({host:s,pass:i,path:u,projectId:a,port:o,protocol:n,publicKey:r})}(t):j(t);return function(t){const{port:e,projectId:n,protocol:r}=t;if(["protocol","publicKey","host","projectId"].forEach((e=>{if(!t[e])throw new m(`Invalid Sentry Dsn: ${e} missing`)})),!n.match(/^\d+$/))throw new m(`Invalid Sentry Dsn: Invalid projectId ${n}`);if(!function(t){return"http"===t||"https"===t}(r))throw new m(`Invalid Sentry Dsn: Invalid protocol ${r}`);if(e&&isNaN(parseInt(e,10)))throw new m(`Invalid Sentry Dsn: Invalid port ${e}`)}(e),e}const E=["fatal","error","warning","log","info","debug","critical"],$=r(),x="Sentry Logger ",S=["debug","info","warn","error","log","assert"];function _(t){const e=r();if(!("console"in e))return t();const n=e.console,i={};S.forEach((t=>{t in e.console&&n[t].__sentry_original__&&(i[t]=n[t],n[t]=n[t].__sentry_original__)}));const s=t();return Object.keys(i).forEach((t=>{n[t]=i[t]})),s}const k=$.__SENTRY__||{},T=k.logger||new class{constructor(){this.t=!1}disable(){this.t=!1}enable(){this.t=!0}log(...t){this.t&&_((()=>{$.console.log(`${x}[Log]:`,...t)}))}warn(...t){this.t&&_((()=>{$.console.warn(`${x}[Warn]:`,...t)}))}error(...t){this.t&&_((()=>{$.console.error(`${x}[Error]:`,...t)}))}};function D(t,e=0){return"string"!=typeof t||0===e||t.length<=e?t:`${t.substr(0,e)}...`}function R(t,e){if(!Array.isArray(t))return"";const n=[];for(let e=0;e<t.length;e++){const r=t[e];try{n.push(String(r))}catch(t){n.push("[value cannot be serialized]")}}return n.join(e)}function I(t,e){return!!a(t)&&(o(e,"RegExp")?e.test(t):"string"==typeof e&&-1!==t.indexOf(e))}function N(t,e,n){if(!(e in t))return;const r=t[e],i=n(r);if("function"==typeof i)try{M(i,r)}catch(t){}t[e]=i}function C(t,e,n){Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}function M(t,e){const n=e.prototype||{};t.prototype=e.prototype=n,C(t,"__sentry_original__",e)}function q(t){return t.__sentry_original__}function L(t){let e=t;if(s(t))e=Object.assign({message:t.message,name:t.name,stack:t.stack},A(t));else if(l(t)){const n=t;e=Object.assign({type:n.type,target:U(n.target),currentTarget:U(n.currentTarget)},A(n)),"undefined"!=typeof CustomEvent&&p(t,CustomEvent)&&(e.detail=n.detail)}return e}function U(t){try{return e=t,"undefined"!=typeof Element&&p(e,Element)?b(t):Object.prototype.toString.call(t)}catch(t){return"<unknown>"}var e}function A(t){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function F(t,e=40){const n=Object.keys(L(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return D(n[0],e);for(let t=n.length;t>0;t--){const r=n.slice(0,t).join(", ");if(!(r.length>e))return t===n.length?r:D(r,e)}return""}function P(t){if(f(t)){const e={};for(const n of Object.keys(t))void 0!==t[n]&&(e[n]=P(t[n]));return e}return Array.isArray(t)?t.map(P):t}k.logger=T,$.__SENTRY__=k;function H(...t){const e=t.sort(((t,e)=>t[0]-e[0])).map((t=>t[1]));return(t,n=0)=>{const r=[];for(const i of t.split("\n").slice(n))for(const t of e){const e=t(i);if(e){r.push(e);break}}return function(t){if(!t.length)return[];let e=t;const n=e[0].function||"",r=e[e.length-1].function||"";-1===n.indexOf("captureMessage")&&-1===n.indexOf("captureException")||(e=e.slice(1));-1!==r.indexOf("sentryWrapped")&&(e=e.slice(0,-1));return e.slice(0,50).map((t=>Object.assign(Object.assign({},t),{filename:t.filename||e[0].filename,function:t.function||"?"}))).reverse()}(r)}}const B="<anonymous>";function X(t){try{return t&&"function"==typeof t&&t.name||B}catch(t){return B}}function z(){if(!("fetch"in r()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(t){return!1}}function J(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function W(){if(!z())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch(t){return!1}}const K=r(),G={},V={};function Q(t){if(!V[t])switch(V[t]=!0,t){case"console":!function(){if(!("console"in K))return;S.forEach((function(t){t in K.console&&N(K.console,t,(function(e){return function(...n){Z("console",{args:n,level:t}),e&&e.apply(K.console,n)}}))}))}();break;case"dom":!function(){if(!("document"in K))return;const t=Z.bind(null,"dom"),e=st(t,!0);K.document.addEventListener("click",e,!1),K.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach((e=>{const n=K[e]&&K[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(N(n,"addEventListener",(function(e){return function(n,r,i){if("click"===n||"keypress"==n)try{const r=this,s=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{},o=s[n]=s[n]||{refCount:0};if(!o.handler){const r=st(t);o.handler=r,e.call(this,n,r,i)}o.refCount+=1}catch(t){}return e.call(this,n,r,i)}})),N(n,"removeEventListener",(function(t){return function(e,n,r){if("click"===e||"keypress"==e)try{const n=this,i=n.__sentry_instrumentation_handlers__||{},s=i[e];s&&(s.refCount-=1,s.refCount<=0&&(t.call(this,e,s.handler,r),s.handler=void 0,delete i[e]),0===Object.keys(i).length&&delete n.__sentry_instrumentation_handlers__)}catch(t){}return t.call(this,e,n,r)}})))}))}();break;case"xhr":!function(){if(!("XMLHttpRequest"in K))return;const t=XMLHttpRequest.prototype;N(t,"open",(function(t){return function(...e){const n=this,r=e[1],i=n.__sentry_xhr__={method:a(e[0])?e[0].toUpperCase():e[0],url:e[1]};a(r)&&"POST"===i.method&&r.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const s=function(){if(4===n.readyState){try{i.status_code=n.status}catch(t){}Z("xhr",{args:e,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:n})}};return"onreadystatechange"in n&&"function"==typeof n.onreadystatechange?N(n,"onreadystatechange",(function(t){return function(...e){return s(),t.apply(n,e)}})):n.addEventListener("readystatechange",s),t.apply(n,e)}})),N(t,"send",(function(t){return function(...e){return this.__sentry_xhr__&&void 0!==e[0]&&(this.__sentry_xhr__.body=e[0]),Z("xhr",{args:e,startTimestamp:Date.now(),xhr:this}),t.apply(this,e)}}))}();break;case"fetch":!function(){if(!function(){if(!z())return!1;const t=r();if(J(t.fetch))return!0;let e=!1;const n=t.document;if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t),t.contentWindow&&t.contentWindow.fetch&&(e=J(t.contentWindow.fetch)),n.head.removeChild(t)}catch(t){T.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return e}())return;N(K,"fetch",(function(t){return function(...e){const n={args:e,fetchData:{method:tt(e),url:et(e)},startTimestamp:Date.now()};return Z("fetch",Object.assign({},n)),t.apply(K,e).then((t=>(Z("fetch",Object.assign(Object.assign({},n),{endTimestamp:Date.now(),response:t})),t)),(t=>{throw Z("fetch",Object.assign(Object.assign({},n),{endTimestamp:Date.now(),error:t})),t}))}}))}();break;case"history":!function(){if(!function(){const t=r(),e=t.chrome,n=e&&e.app&&e.app.runtime,i="history"in t&&!!t.history.pushState&&!!t.history.replaceState;return!n&&i}())return;const t=K.onpopstate;function e(t){return function(...e){const n=e.length>2?e[2]:void 0;if(n){const t=nt,e=String(n);nt=e,Z("history",{from:t,to:e})}return t.apply(this,e)}}K.onpopstate=function(...e){const n=K.location.href,r=nt;if(nt=n,Z("history",{from:r,to:n}),t)try{return t.apply(this,e)}catch(t){}},N(K.history,"pushState",e),N(K.history,"replaceState",e)}();break;case"error":ot=K.onerror,K.onerror=function(t,e,n,r,i){return Z("error",{column:r,error:i,line:n,msg:t,url:e}),!!ot&&ot.apply(this,arguments)};break;case"unhandledrejection":ct=K.onunhandledrejection,K.onunhandledrejection=function(t){return Z("unhandledrejection",t),!ct||ct.apply(this,arguments)};break;default:return void T.warn("unknown instrumentation type:",t)}}function Y(t,e){G[t]=G[t]||[],G[t].push(e),Q(t)}function Z(t,e){if(t&&G[t])for(const n of G[t]||[])try{n(e)}catch(e){T.error(`Error while triggering instrumentation handler.\nType: ${t}\nName: ${X(n)}\nError:`,e)}}function tt(t=[]){return"Request"in K&&p(t[0],Request)&&t[0].method?String(t[0].method).toUpperCase():t[1]&&t[1].method?String(t[1].method).toUpperCase():"GET"}function et(t=[]){return"string"==typeof t[0]?t[0]:"Request"in K&&p(t[0],Request)?t[0].url:String(t[0])}let nt;let rt,it;function st(t,e=!1){return n=>{if(!n||it===n)return;if(function(t){if("keypress"!==t.type)return!1;try{const e=t.target;if(!e||!e.tagName)return!0;if("INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable)return!1}catch(t){}return!0}(n))return;const r="keypress"===n.type?"input":n.type;(void 0===rt||function(t,e){if(!t)return!0;if(t.type!==e.type)return!0;try{if(t.target!==e.target)return!0}catch(t){}return!1}(it,n))&&(t({event:n,name:r,global:e}),it=n),clearTimeout(rt),rt=K.setTimeout((()=>{rt=void 0}),1e3)}}let ot=null;let ct=null;function ut(){const t=r(),e=t.crypto||t.msCrypto;if(void 0!==e&&e.getRandomValues){const t=new Uint16Array(8);e.getRandomValues(t),t[3]=4095&t[3]|16384,t[4]=16383&t[4]|32768;const n=t=>{let e=t.toString(16);for(;e.length<4;)e=`0${e}`;return e};return n(t[0])+n(t[1])+n(t[2])+n(t[3])+n(t[4])+n(t[5])+n(t[6])+n(t[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,(t=>{const e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))}function at(t){if(!t)return{};const e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],relative:e[5]+n+r}}function ht(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function ft(t){const{message:e,event_id:n}=t;if(e)return e;const r=ht(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function lt(t,e,n){const r=t.exception=t.exception||{},i=r.values=r.values||[],s=i[0]=i[0]||{};s.value||(s.value=e||""),s.type||(s.type=n||"Error")}function dt(t,e){const n=ht(t);if(!n)return;const r=n.mechanism;if(n.mechanism=Object.assign(Object.assign(Object.assign({},{type:"generic",handled:!0}),r),e),e&&"data"in e){const t=Object.assign(Object.assign({},r&&r.data),e.data);n.mechanism.data=t}}function pt(t){if(t&&t.__sentry_captured__)return!0;try{C(t,"__sentry_captured__",!0)}catch(t){}return!1}function bt(t,e=1/0,n=1/0){try{return vt("",t,e,n)}catch(t){return{ERROR:`**non-serializable** (${t})`}}}function yt(t,e=3,n=102400){const r=bt(t,e);return i=r,function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(i))>n?yt(t,e-1,n):r;var i}function vt(t,e,n=1/0,r=1/0,i=function(){const t="function"==typeof WeakSet,e=t?new WeakSet:[];return[function(n){if(t)return!!e.has(n)||(e.add(n),!1);for(let t=0;t<e.length;t++)if(e[t]===n)return!0;return e.push(n),!1},function(n){if(t)e.delete(n);else for(let t=0;t<e.length;t++)if(e[t]===n){e.splice(t,1);break}}]}()){const[o,c]=i,u=e;if(u&&"function"==typeof u.toJSON)try{return u.toJSON()}catch(t){}if(null===e||["number","boolean","string"].includes(typeof e)&&("number"!=typeof(a=e)||a==a))return e;var a;const h=function(t,e){try{return"domain"===t&&e&&"object"==typeof e&&e.i?"[Domain]":"domainEmitter"===t?"[DomainEmitter]":"undefined"!=typeof global&&e===global?"[Global]":"undefined"!=typeof window&&e===window?"[Window]":"undefined"!=typeof document&&e===document?"[Document]":function(t){return f(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}(e)?"[SyntheticEvent]":"number"==typeof e&&e!=e?"[NaN]":void 0===e?"[undefined]":"function"==typeof e?`[Function: ${X(e)}]`:"symbol"==typeof e?`[${String(e)}]`:"bigint"==typeof e?`[BigInt: ${String(e)}]`:`[object ${Object.getPrototypeOf(e).constructor.name}]`}catch(t){return`**non-serializable** (${t})`}}(t,e);if(!h.startsWith("[object "))return h;if(0===n)return h.replace("object ","");if(o(e))return"[Circular ~]";const d=Array.isArray(e)?[]:{};let p=0;const b=s(e)||l(e)?L(e):e;for(const t in b){if(!Object.prototype.hasOwnProperty.call(b,t))continue;if(p>=r){d[t]="[MaxProperties ~]";break}const e=b[t];d[t]=vt(t,e,n-1,r,i),p+=1}return c(e),d}function mt(t){return new Ot((e=>{e(t)}))}function gt(t){return new Ot(((e,n)=>{n(t)}))}class Ot{constructor(t){this.o=0,this.u=[],this.h=t=>{this.l(1,t)},this.p=t=>{this.l(2,t)},this.l=(t,e)=>{0===this.o&&(d(e)?e.then(this.h,this.p):(this.o=t,this.v=e,this.m()))},this.m=()=>{if(0===this.o)return;const t=this.u.slice();this.u=[],t.forEach((t=>{t[0]||(1===this.o&&t[1](this.v),2===this.o&&t[2](this.v),t[0]=!0)}))};try{t(this.h,this.p)}catch(t){this.p(t)}}then(t,e){return new Ot(((n,r)=>{this.u.push([!1,e=>{if(t)try{n(t(e))}catch(t){r(t)}else n(e)},t=>{if(e)try{n(e(t))}catch(t){r(t)}else r(t)}]),this.m()}))}catch(t){return this.then((t=>t),t)}finally(t){return new Ot(((e,n)=>{let r,i;return this.then((e=>{i=!1,r=e,t&&t()}),(e=>{i=!0,r=e,t&&t()})).then((()=>{i?n(r):e(r)}))}))}}function jt(t){const e=[];function n(t){return e.splice(e.indexOf(t),1)[0]}return{$:e,add:function(r){if(!(void 0===t||e.length<t))return gt(new m("Not adding Promise due to buffer limit reached."));const i=r();return-1===e.indexOf(i)&&e.push(i),i.then((()=>n(i))).then(null,(()=>n(i).then(null,(()=>{})))),i},drain:function(t){return new Ot(((n,r)=>{let i=e.length;if(!i)return n(!0);const s=setTimeout((()=>{t&&t>0&&n(!1)}),t);e.forEach((t=>{mt(t).then((()=>{--i||(clearTimeout(s),n(!0))}),r)}))}))}}}function wt(e){return"warn"===e?t.Severity.Warning:function(t){return-1!==E.indexOf(t)}(e)?e:t.Severity.Log}function Et(t){return t>=200&&t<300?"success":429===t?"rate_limit":t>=400&&t<500?"invalid":t>=500?"failed":"unknown"}const $t={nowSeconds:()=>Date.now()/1e3};const xt=function(){const{performance:t}=r();if(!t||!t.now)return;return{now:()=>t.now(),timeOrigin:Date.now()-t.now()}}(),St=void 0===xt?$t:{nowSeconds:()=>(xt.timeOrigin+xt.now())/1e3},_t=$t.nowSeconds.bind($t),kt=St.nowSeconds.bind(St);function Tt(t,e=[]){return[t,e]}function Dt(t){const[e,n]=t,r=JSON.stringify(e);return n.reduce(((t,e)=>{const[n,r]=e,i=h(r)?String(r):JSON.stringify(r);return`${t}\n${JSON.stringify(n)}\n${i}`}),r)}(()=>{const{performance:t}=r();if(!t||!t.now)return;const e=36e5,n=t.now(),i=Date.now(),s=t.timeOrigin?Math.abs(t.timeOrigin+n-i):e,o=s<e,c=t.timing&&t.timing.navigationStart,u="number"==typeof c?Math.abs(c+n-i):e;(o||u<e)&&(s<=u&&t.timeOrigin)})();function Rt(t,e){return t[e]||t.all||0}function It(t,e,n=Date.now()){return Rt(t,e)>n}function Nt(t,e,n=Date.now()){const r=Object.assign({},t),i=e["x-sentry-rate-limits"],s=e["retry-after"];if(i)for(const t of i.trim().split(",")){const e=t.split(":",2),i=parseInt(e[0],10),s=1e3*(isNaN(i)?60:i);if(e[1])for(const t of e[1].split(";"))r[t]=n+s;else r.all=n+s}else s&&(r.all=n+function(t,e=Date.now()){const n=parseInt(`${t}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${t}`);return isNaN(r)?6e4:r-e}(s,n));return r}class Ct{constructor(){this.g=!1,this.O=[],this.j=[],this.S=[],this._={},this.k={},this.T={},this.D={},this.R={}}static clone(t){const e=new Ct;return t&&(e.S=[...t.S],e.k=Object.assign({},t.k),e.T=Object.assign({},t.T),e.D=Object.assign({},t.D),e._=t._,e.I=t.I,e.N=t.N,e.C=t.C,e.M=t.M,e.q=t.q,e.j=[...t.j],e.L=t.L),e}addScopeListener(t){this.O.push(t)}addEventProcessor(t){return this.j.push(t),this}setUser(t){return this._=t||{},this.C&&this.C.update({user:t}),this.U(),this}getUser(){return this._}getRequestSession(){return this.L}setRequestSession(t){return this.L=t,this}setTags(t){return this.k=Object.assign(Object.assign({},this.k),t),this.U(),this}setTag(t,e){return this.k=Object.assign(Object.assign({},this.k),{[t]:e}),this.U(),this}setExtras(t){return this.T=Object.assign(Object.assign({},this.T),t),this.U(),this}setExtra(t,e){return this.T=Object.assign(Object.assign({},this.T),{[t]:e}),this.U(),this}setFingerprint(t){return this.q=t,this.U(),this}setLevel(t){return this.I=t,this.U(),this}setTransactionName(t){return this.M=t,this.U(),this}setTransaction(t){return this.setTransactionName(t)}setContext(t,e){return null===e?delete this.D[t]:this.D=Object.assign(Object.assign({},this.D),{[t]:e}),this.U(),this}setSpan(t){return this.N=t,this.U(),this}getSpan(){return this.N}getTransaction(){const t=this.getSpan();return t&&t.transaction}setSession(t){return t?this.C=t:delete this.C,this.U(),this}getSession(){return this.C}update(t){if(!t)return this;if("function"==typeof t){const e=t(this);return e instanceof Ct?e:this}return t instanceof Ct?(this.k=Object.assign(Object.assign({},this.k),t.k),this.T=Object.assign(Object.assign({},this.T),t.T),this.D=Object.assign(Object.assign({},this.D),t.D),t._&&Object.keys(t._).length&&(this._=t._),t.I&&(this.I=t.I),t.q&&(this.q=t.q),t.L&&(this.L=t.L)):f(t)&&(t=t,this.k=Object.assign(Object.assign({},this.k),t.tags),this.T=Object.assign(Object.assign({},this.T),t.extra),this.D=Object.assign(Object.assign({},this.D),t.contexts),t.user&&(this._=t.user),t.level&&(this.I=t.level),t.fingerprint&&(this.q=t.fingerprint),t.requestSession&&(this.L=t.requestSession)),this}clear(){return this.S=[],this.k={},this.T={},this._={},this.D={},this.I=void 0,this.M=void 0,this.q=void 0,this.L=void 0,this.N=void 0,this.C=void 0,this.U(),this}addBreadcrumb(t,e){const n="number"==typeof e?Math.min(e,100):100;if(n<=0)return this;const r=Object.assign({timestamp:_t()},t);return this.S=[...this.S,r].slice(-n),this.U(),this}clearBreadcrumbs(){return this.S=[],this.U(),this}applyToEvent(t,e){if(this.T&&Object.keys(this.T).length&&(t.extra=Object.assign(Object.assign({},this.T),t.extra)),this.k&&Object.keys(this.k).length&&(t.tags=Object.assign(Object.assign({},this.k),t.tags)),this._&&Object.keys(this._).length&&(t.user=Object.assign(Object.assign({},this._),t.user)),this.D&&Object.keys(this.D).length&&(t.contexts=Object.assign(Object.assign({},this.D),t.contexts)),this.I&&(t.level=this.I),this.M&&(t.transaction=this.M),this.N){t.contexts=Object.assign({trace:this.N.getTraceContext()},t.contexts);const e=this.N.transaction&&this.N.transaction.name;e&&(t.tags=Object.assign({transaction:e},t.tags))}return this.A(t),t.breadcrumbs=[...t.breadcrumbs||[],...this.S],t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,t.sdkProcessingMetadata=this.R,this.F([...Mt(),...this.j],t,e)}setSDKProcessingMetadata(t){return this.R=Object.assign(Object.assign({},this.R),t),this}F(t,e,n,r=0){return new Ot(((i,s)=>{const o=t[r];if(null===e||"function"!=typeof o)i(e);else{const c=o(Object.assign({},e),n);d(c)?c.then((e=>this.F(t,e,n,r+1).then(i))).then(null,s):this.F(t,c,n,r+1).then(i).then(null,s)}}))}U(){this.g||(this.g=!0,this.O.forEach((t=>{t(this)})),this.g=!1)}A(t){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],this.q&&(t.fingerprint=t.fingerprint.concat(this.q)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}}function Mt(){const t=r();return t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.globalEventProcessors=t.__SENTRY__.globalEventProcessors||[],t.__SENTRY__.globalEventProcessors}function qt(t){Mt().push(t)}class Lt{constructor(t){this.errors=0,this.sid=ut(),this.duration=0,this.status="ok",this.init=!0,this.ignoreDuration=!1;const e=kt();this.timestamp=e,this.started=e,t&&this.update(t)}update(t={}){if(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||kt(),t.ignoreDuration&&(this.ignoreDuration=t.ignoreDuration),t.sid&&(this.sid=32===t.sid.length?t.sid:ut()),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{const t=this.timestamp-this.started;this.duration=t>=0?t: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)}close(t){t?this.update({status:t}):"ok"===this.status?this.update({status:"exited"}):this.update()}toJSON(){return P({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}})}}const Ut=100;class At{constructor(t,e=new Ct,n=4){this.P=n,this.H=[{}],this.getStackTop().scope=e,t&&this.bindClient(t)}isOlderThan(t){return this.P<t}bindClient(t){this.getStackTop().client=t,t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){const t=Ct.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:t}),t}popScope(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}withScope(t){const e=this.pushScope();try{t(e)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this.H}getStackTop(){return this.H[this.H.length-1]}captureException(t,e){const n=this.B=e&&e.event_id?e.event_id:ut();let r=e;if(!e){let e;try{throw new Error("Sentry syntheticException")}catch(t){e=t}r={originalException:t,syntheticException:e}}return this.X("captureException",t,Object.assign(Object.assign({},r),{event_id:n})),n}captureMessage(t,e,n){const r=this.B=n&&n.event_id?n.event_id:ut();let i=n;if(!n){let e;try{throw new Error(t)}catch(t){e=t}i={originalException:t,syntheticException:e}}return this.X("captureMessage",t,e,Object.assign(Object.assign({},i),{event_id:r})),r}captureEvent(t,e){const n=e&&e.event_id?e.event_id:ut();return"transaction"!==t.type&&(this.B=n),this.X("captureEvent",t,Object.assign(Object.assign({},e),{event_id:n})),n}lastEventId(){return this.B}addBreadcrumb(t,e){const{scope:n,client:r}=this.getStackTop();if(!n||!r)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:s=Ut}=r.getOptions&&r.getOptions()||{};if(s<=0)return;const o=_t(),c=Object.assign({timestamp:o},t),u=i?_((()=>i(c,e))):c;null!==u&&n.addBreadcrumb(u,s)}setUser(t){const e=this.getScope();e&&e.setUser(t)}setTags(t){const e=this.getScope();e&&e.setTags(t)}setExtras(t){const e=this.getScope();e&&e.setExtras(t)}setTag(t,e){const n=this.getScope();n&&n.setTag(t,e)}setExtra(t,e){const n=this.getScope();n&&n.setExtra(t,e)}setContext(t,e){const n=this.getScope();n&&n.setContext(t,e)}configureScope(t){const{scope:e,client:n}=this.getStackTop();e&&n&&t(e)}run(t){const e=Pt(this);try{t(this)}finally{Pt(e)}}getIntegration(t){const e=this.getClient();if(!e)return null;try{return e.getIntegration(t)}catch(e){return T.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startSpan(t){return this.J("startSpan",t)}startTransaction(t,e){return this.J("startTransaction",t,e)}traceHeaders(){return this.J("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this.W()}endSession(){const t=this.getStackTop(),e=t&&t.scope,n=e&&e.getSession();n&&n.close(),this.W(),e&&e.setSession()}startSession(t){const{scope:e,client:n}=this.getStackTop(),{release:i,environment:s}=n&&n.getOptions()||{},o=r(),{userAgent:c}=o.navigator||{},u=new Lt(Object.assign(Object.assign(Object.assign({release:i,environment:s},e&&{user:e.getUser()}),c&&{userAgent:c}),t));if(e){const t=e.getSession&&e.getSession();t&&"ok"===t.status&&t.update({status:"exited"}),this.endSession(),e.setSession(u)}return u}W(){const{scope:t,client:e}=this.getStackTop();if(!t)return;const n=t.getSession&&t.getSession();n&&e&&e.captureSession&&e.captureSession(n)}X(t,...e){const{scope:n,client:r}=this.getStackTop();r&&r[t]&&r[t](...e,n)}J(t,...e){const n=Ft().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[t])return n.extensions[t].apply(this,e);T.warn(`Extension method ${t} couldn't be found, doing nothing.`)}}function Ft(){const t=r();return t.__SENTRY__=t.__SENTRY__||{extensions:{},hub:void 0},t}function Pt(t){const e=Ft(),n=Bt(e);return Xt(e,t),n}function Ht(){const t=Ft();var e;return(e=t)&&e.__SENTRY__&&e.__SENTRY__.hub&&!Bt(t).isOlderThan(4)||Xt(t,new At),Bt(t)}function Bt(t){return t&&t.__SENTRY__&&t.__SENTRY__.hub||(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=new At),t.__SENTRY__.hub}function Xt(t,e){return!!t&&(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=e,!0)}function zt(t,...e){const n=Ht();if(n&&n[t])return n[t](...e);throw new Error(`No hub defined or ${t} was not found on the hub, please open a bug report.`)}function captureException(t,e){return zt("captureException",t,{captureContext:e,originalException:t,syntheticException:new Error("Sentry syntheticException")})}function Jt(t){zt("withScope",t)}function Wt(t,e,n){return{initDsn:t,metadata:e||{},dsn:w(t),tunnel:n}}function Kt(t){const e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function Gt(t,e){return`${Kt(t)}${t.projectId}/${e}/`}function Vt(t){return e={sentry_key:t.publicKey,sentry_version:"7"},Object.keys(e).map((t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`)).join("&");var e}function Qt(t){return`${function(t){return Gt(t,"store")}(t)}?${Vt(t)}`}function Yt(t,e){return e||`${function(t){return Gt(t,"envelope")}(t)}?${Vt(t)}`}const Zt=[];function te(t){return t.reduce(((t,e)=>(t.every((t=>e.name!==t.name))&&t.push(e),t)),[])}function ee(t){const e={};return function(t){const e=t.defaultIntegrations&&[...t.defaultIntegrations]||[],n=t.integrations;let r=[...te(e)];Array.isArray(n)?r=[...r.filter((t=>n.every((e=>e.name!==t.name)))),...te(n)]:"function"==typeof n&&(r=n(r),r=Array.isArray(r)?r:[r]);const i=r.map((t=>t.name)),s="Debug";return-1!==i.indexOf(s)&&r.push(...r.splice(i.indexOf(s),1)),r}(t).forEach((t=>{e[t.name]=t,function(t){-1===Zt.indexOf(t.name)&&(t.setupOnce(qt,Ht),Zt.push(t.name),T.log(`Integration installed: ${t.name}`))}(t)})),C(e,"initialized",!0),e}const ne="Not capturing exception because it's already been captured.";function re(t){if(!t.metadata||!t.metadata.sdk)return;const{name:e,version:n}=t.metadata.sdk;return{name:e,version:n}}function ie(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=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]],t):t}function se(t,e){const n=re(e),r="aggregates"in t?"sessions":"session";return[Tt(Object.assign(Object.assign({sent_at:(new Date).toISOString()},n&&{sdk:n}),!!e.tunnel&&{dsn:O(e.dsn)}),[[{type:r},t]]),r]}class oe{sendEvent(t){return mt({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:"skipped"})}close(t){return mt(!0)}}function ce(t,e,n=jt(t.bufferSize||30)){let r={};return{send:function(t){const i=function(t){const[,[[e]]]=t;return e.type}(t),s="event"===i?"error":i,o={category:s,body:Dt(t)};return It(r,s)?gt({status:"rate_limit",reason:ue(r,s)}):n.add((()=>e(o).then((({body:t,headers:e,reason:n,statusCode:i})=>{const o=Et(i);return e&&(r=Nt(r,e)),"success"===o?mt({status:o,reason:n}):gt({status:o,reason:n||t||("rate_limit"===o?ue(r,s):"Unknown transport error")})}))))},flush:t=>n.drain(t)}}function ue(t,e){return`Too many ${e} requests, backing off until: ${new Date(Rt(t,e)).toISOString()}`}const ae="6.19.4";let he;class fe{constructor(){this.name=fe.id}setupOnce(){he=Function.prototype.toString,Function.prototype.toString=function(...t){const e=q(this)||this;return he.apply(e,t)}}}fe.id="FunctionToString";const le=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/];class de{constructor(t={}){this.K=t,this.name=de.id}setupOnce(t,e){t((t=>{const n=e();if(n){const e=n.getIntegration(de);if(e){const r=n.getClient(),i=r?r.getOptions():{},s=function(t={},e={}){return{allowUrls:[...t.whitelistUrls||[],...t.allowUrls||[],...e.whitelistUrls||[],...e.allowUrls||[]],denyUrls:[...t.blacklistUrls||[],...t.denyUrls||[],...e.blacklistUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...le],ignoreInternal:void 0===t.ignoreInternal||t.ignoreInternal}}(e.K,i);return function(t,e){if(e.ignoreInternal&&function(t){try{return"SentryError"===t.exception.values[0].type}catch(t){}return!1}(t))return T.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${ft(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{const{type:e="",value:n=""}=t.exception.values&&t.exception.values[0]||{};return[`${n}`,`${e}: ${n}`]}catch(e){return T.error(`Cannot extract message for event ${ft(t)}`),[]}return[]}(t).some((t=>e.some((e=>I(t,e)))))}(t,e.ignoreErrors))return T.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${ft(t)}`),!0;if(function(t,e){if(!e||!e.length)return!1;const n=be(t);return!!n&&e.some((t=>I(n,t)))}(t,e.denyUrls))return T.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${ft(t)}.\nUrl: ${be(t)}`),!0;if(!function(t,e){if(!e||!e.length)return!0;const n=be(t);return!n||e.some((t=>I(n,t)))}(t,e.allowUrls))return T.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${ft(t)}.\nUrl: ${be(t)}`),!0;return!1}(t,s)?null:t}}return t}))}}function pe(t=[]){for(let e=t.length-1;e>=0;e--){const n=t[e];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}function be(t){try{if(t.stacktrace)return pe(t.stacktrace.frames);let e;try{e=t.exception.values[0].stacktrace.frames}catch(t){}return e?pe(e):null}catch(e){return T.error(`Cannot extract url for event ${ft(t)}`),null}}de.id="InboundFilters";var ye=Object.freeze({__proto__:null,FunctionToString:fe,InboundFilters:de});const ve="?";function me(t,e,n,r){const i={filename:t,function:e,in_app:!0};return void 0!==n&&(i.lineno=n),void 0!==r&&(i.colno=r),i}const ge=/^\s*at (?:(.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Oe=/\((\S*)(?::(\d+))(?::(\d+))\)/,je=[30,t=>{const e=ge.exec(t);if(e){if(e[2]&&0===e[2].indexOf("eval")){const t=Oe.exec(e[2]);t&&(e[2]=t[1],e[3]=t[2],e[4]=t[3])}const[t,n]=Re(e[1]||ve,e[2]);return me(n,t,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}}],we=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Ee=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,$e=[50,t=>{const e=we.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const t=Ee.exec(e[3]);t&&(e[1]=e[1]||"eval",e[3]=t[1],e[4]=t[2],e[5]="")}let t=e[3],n=e[1]||ve;return[n,t]=Re(n,t),me(t,n,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}}],xe=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Se=[40,t=>{const e=xe.exec(t);return e?me(e[2],e[1]||ve,+e[3],e[4]?+e[4]:void 0):void 0}],_e=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,ke=[10,t=>{const e=_e.exec(t);return e?me(e[2],e[3]||ve,+e[1]):void 0}],Te=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,De=[20,t=>{const e=Te.exec(t);return e?me(e[5],e[3]||e[4]||ve,+e[1],+e[2]):void 0}],Re=(t,e)=>{const n=-1!==t.indexOf("safari-extension"),r=-1!==t.indexOf("safari-web-extension");return n||r?[-1!==t.indexOf("@")?t.split("@")[0]:ve,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};function Ie(t){const e=Ce(t),n={type:t&&t.name,value:qe(t)};return e.length&&(n.stacktrace={frames:e}),void 0===n.type&&""===n.value&&(n.value="Unrecoverable error caught"),n}function Ne(t){return{exception:{values:[Ie(t)]}}}function Ce(t){const e=t.stacktrace||t.stack||"",n=function(t){if(t){if("number"==typeof t.framesToPop)return t.framesToPop;if(Me.test(t.message))return 1}return 0}(t);try{return H(ke,De,je,Se,$e)(e,n)}catch(t){}return[]}const Me=/Minified React error #\d+;/i;function qe(t){const e=t&&t.message;return e?e.error&&"string"==typeof e.error.message?e.error.message:e:"No error message"}function Le(e,n,r){const i=Ae(e,n&&n.syntheticException||void 0,r);return dt(i),i.level=t.Severity.Error,n&&n.event_id&&(i.event_id=n.event_id),mt(i)}function Ue(e,n=t.Severity.Info,r,i){const s=Fe(e,r&&r.syntheticException||void 0,i);return s.level=n,r&&r.event_id&&(s.event_id=r.event_id),mt(s)}function Ae(t,e,n,r){let i;if(c(t)&&t.error){return Ne(t.error)}if(u(t)||o(t,"DOMException")){const r=t;if("stack"in t)i=Ne(t);else{const t=r.name||(u(r)?"DOMError":"DOMException"),s=r.message?`${t}: ${r.message}`:t;i=Fe(s,e,n),lt(i,s)}return"code"in r&&(i.tags=Object.assign(Object.assign({},i.tags),{"DOMException.code":`${r.code}`})),i}if(s(t))return Ne(t);if(f(t)||l(t)){return i=function(t,e,n){const r={exception:{values:[{type:l(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:`Non-Error ${n?"promise rejection":"exception"} captured with keys: ${F(t)}`}]},extra:{__serialized__:yt(t)}};if(e){const t=Ce(e);t.length&&(r.stacktrace={frames:t})}return r}(t,e,r),dt(i,{synthetic:!0}),i}return i=Fe(t,e,n),lt(i,`${t}`,void 0),dt(i,{synthetic:!0}),i}function Fe(t,e,n){const r={message:t};if(n&&e){const t=Ce(e);t.length&&(r.stacktrace={frames:t})}return r}const Pe=r();let He;function Be(){if(He)return He;if(J(Pe.fetch))return He=Pe.fetch.bind(Pe);const t=Pe.document;let e=Pe.fetch;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(e=r.fetch),t.head.removeChild(n)}catch(t){T.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return He=e.bind(Pe)}function Xe(t,e){if("[object Navigator]"===Object.prototype.toString.call(Pe&&Pe.navigator)&&"function"==typeof Pe.navigator.sendBeacon){return Pe.navigator.sendBeacon.bind(Pe.navigator)(t,e)}if(z()){const n=Be();n(t,{body:e,method:"POST",credentials:"omit",keepalive:!0}).then(null,(t=>{console.error(t)}))}else;}function ze(t){return"event"===t?"error":t}const Je=r();class We{constructor(t){this.options=t,this.G=jt(30),this.V={},this.Y={},this.Z=Wt(t.dsn,t.tt,t.tunnel),this.url=Qt(this.Z.dsn),this.options.sendClientReports&&Je.document&&Je.document.addEventListener("visibilitychange",(()=>{"hidden"===Je.document.visibilityState&&this.et()}))}sendEvent(t){return this.nt(function(t,e){const n=re(e),r=t.type||"event",i="transaction"===r||!!e.tunnel,{transactionSampling:s}=t.sdkProcessingMetadata||{},{method:o,rate:c}=s||{};let u;ie(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{u=JSON.stringify(t)}catch(e){t.tags.JSONStringifyError=!0,t.extra.JSONStringifyError=e;try{u=JSON.stringify(bt(t))}catch(t){const e=t;u=JSON.stringify({message:"JSON.stringify error after renormalization",extra:{message:e.message,stack:e.stack}})}}const a={body:u,type:r,url:i?Yt(e.dsn,e.tunnel):Qt(e.dsn)};if(i){const i=Tt(Object.assign(Object.assign({event_id:t.event_id,sent_at:(new Date).toISOString()},n&&{sdk:n}),!!e.tunnel&&{dsn:O(e.dsn)}),[[{type:r,sample_rates:[{id:o,rate:c}]},a.body]]);a.body=Dt(i)}return a}(t,this.Z),t)}sendSession(t){return this.nt(function(t,e){const[n,r]=se(t,e);return{body:Dt(n),type:r,url:Yt(e.dsn,e.tunnel)}}(t,this.Z),t)}close(t){return this.G.drain(t)}recordLostEvent(t,e){var n;if(!this.options.sendClientReports)return;const r=`${ze(e)}:${t}`;T.log(`Adding outcome: ${r}`),this.Y[r]=(null!=(n=this.Y[r])?n:0)+1}et(){if(!this.options.sendClientReports)return;const t=this.Y;if(this.Y={},!Object.keys(t).length)return void T.log("No outcomes to flush");T.log(`Flushing outcomes:\n${JSON.stringify(t,null,2)}`);const e=Yt(this.Z.dsn,this.Z.tunnel),n=Object.keys(t).map((e=>{const[n,r]=e.split(":");return{reason:r,category:n,quantity:t[e]}})),r=(i=n,Tt((s=this.Z.tunnel&&O(this.Z.dsn))?{dsn:s}:{},[[{type:"client_report"},{timestamp:o||_t(),discarded_events:i}]]));var i,s,o;try{Xe(e,Dt(r))}catch(t){T.error(t)}}rt({requestType:t,response:e,headers:n,resolve:r,reject:i}){const s=Et(e.status);this.V=Nt(this.V,n),this.it(t)&&T.warn(`Too many ${t} requests, backing off until: ${this.st(t)}`),"success"!==s?i(e):r({status:s})}st(t){const e=ze(t);return new Date(Rt(this.V,e))}it(t){const e=ze(t);return It(this.V,e)}}class Ke extends We{constructor(t,e=Be()){super(t),this.ot=e}nt(t,e){if(this.it(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.st(t.type)} due to too many requests.`,status:429});const n={body:t.body,method:"POST",referrerPolicy:W()?"origin":""};return void 0!==this.options.fetchParameters&&Object.assign(n,this.options.fetchParameters),void 0!==this.options.headers&&(n.headers=this.options.headers),this.G.add((()=>new Ot(((e,r)=>{this.ot(t.url,n).then((n=>{const i={"x-sentry-rate-limits":n.headers.get("X-Sentry-Rate-Limits"),"retry-after":n.headers.get("Retry-After")};this.rt({requestType:t.type,response:n,headers:i,resolve:e,reject:r})})).catch(r)})))).then(void 0,(e=>{throw e instanceof m?this.recordLostEvent("queue_overflow",t.type):this.recordLostEvent("network_error",t.type),e}))}}class Ge extends We{nt(t,e){return this.it(t.type)?(this.recordLostEvent("ratelimit_backoff",t.type),Promise.reject({event:e,type:t.type,reason:`Transport for ${t.type} requests locked till ${this.st(t.type)} due to too many requests.`,status:429})):this.G.add((()=>new Ot(((e,n)=>{const r=new XMLHttpRequest;r.onreadystatechange=()=>{if(4===r.readyState){const i={"x-sentry-rate-limits":r.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":r.getResponseHeader("Retry-After")};this.rt({requestType:t.type,response:r,headers:i,resolve:e,reject:n})}},r.open("POST",t.url);for(const t in this.options.headers)Object.prototype.hasOwnProperty.call(this.options.headers,t)&&r.setRequestHeader(t,this.options.headers[t]);r.send(t.body)})))).then(void 0,(e=>{throw e instanceof m?this.recordLostEvent("queue_overflow",t.type):this.recordLostEvent("network_error",t.type),e}))}}function Ve(t,e=Be()){return ce({bufferSize:t.bufferSize},(function(n){const r=Object.assign({body:n.body,method:"POST",referrerPolicy:"origin"},t.requestOptions);return e(t.url,r).then((t=>t.text().then((e=>({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})))))}))}function Qe(t){return ce({bufferSize:t.bufferSize},(function(e){return new Ot(((n,r)=>{const i=new XMLHttpRequest;i.onreadystatechange=()=>{if(4===i.readyState){const 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);for(const e in t.headers)Object.prototype.hasOwnProperty.call(t.headers,e)&&i.setRequestHeader(e,t.headers[e]);i.send(e.body)}))}))}var Ye=Object.freeze({__proto__:null,BaseTransport:We,FetchTransport:Ke,XHRTransport:Ge,makeNewFetchTransport:Ve,makeNewXHRTransport:Qe});class Ze extends class{constructor(t){this.K=t,this.K.dsn||T.warn("No DSN provided, backend will not do anything."),this.ct=this.ut()}eventFromException(t,e){throw new m("Backend has to implement `eventFromException` method")}eventFromMessage(t,e,n){throw new m("Backend has to implement `eventFromMessage` method")}sendEvent(t){if(this.at&&this.K.dsn&&this.K._experiments&&this.K._experiments.newTransport){const e=function(t,e){const n=re(e),r=t.type||"event",{transactionSampling:i}=t.sdkProcessingMetadata||{},{method:s,rate:o}=i||{};return ie(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,Tt(Object.assign(Object.assign({event_id:t.event_id,sent_at:(new Date).toISOString()},n&&{sdk:n}),!!e.tunnel&&{dsn:O(e.dsn)}),[[{type:r,sample_rates:[{id:s,rate:o}]},t]])}(t,Wt(this.K.dsn,this.K.tt,this.K.tunnel));this.at.send(e).then(null,(t=>{T.error("Error while sending event:",t)}))}else this.ct.sendEvent(t).then(null,(t=>{T.error("Error while sending event:",t)}))}sendSession(t){if(this.ct.sendSession)if(this.at&&this.K.dsn&&this.K._experiments&&this.K._experiments.newTransport){const e=Wt(this.K.dsn,this.K.tt,this.K.tunnel),[n]=se(t,e);this.at.send(n).then(null,(t=>{T.error("Error while sending session:",t)}))}else this.ct.sendSession(t).then(null,(t=>{T.error("Error while sending session:",t)}));else T.warn("Dropping session because custom transport doesn't implement sendSession")}getTransport(){return this.ct}ut(){return new oe}}{eventFromException(t,e){return Le(t,e,this.K.attachStacktrace)}eventFromMessage(e,n=t.Severity.Info,r){return Ue(e,n,r,this.K.attachStacktrace)}ut(){if(!this.K.dsn)return super.ut();const t=Object.assign(Object.assign({},this.K.transportOptions),{dsn:this.K.dsn,tunnel:this.K.tunnel,sendClientReports:this.K.sendClientReports,tt:this.K.tt}),e=Wt(t.dsn,t.tt,t.tunnel),n=Yt(e.dsn,e.tunnel);if(this.K.transport)return new this.K.transport(t);if(z()){const e=Object.assign({},t.fetchParameters);return this.at=Ve({requestOptions:e,url:n}),new Ke(t)}return this.at=Qe({url:n,headers:t.headers}),new Ge(t)}}const tn=r();let en=0;function nn(){return en>0}function rn(){en+=1,setTimeout((()=>{en-=1}))}function sn(t,e={},n){if("function"!=typeof t)return t;try{const e=t.__sentry_wrapped__;if(e)return e;if(q(t))return t}catch(e){return t}const sentryWrapped=function(){const r=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);const i=r.map((t=>sn(t,e)));return t.apply(this,i)}catch(t){throw rn(),Jt((n=>{n.addEventProcessor((t=>(e.mechanism&&(lt(t,void 0,void 0),dt(t,e.mechanism)),t.extra=Object.assign(Object.assign({},t.extra),{arguments:r}),t))),captureException(t)})),t}};try{for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(sentryWrapped[e]=t[e])}catch(t){}M(sentryWrapped,t),C(t,"__sentry_wrapped__",sentryWrapped);try{Object.getOwnPropertyDescriptor(sentryWrapped,"name").configurable&&Object.defineProperty(sentryWrapped,"name",{get:()=>t.name})}catch(t){}return sentryWrapped}function on(t={}){if(!tn.document)return;if(!t.eventId)return void T.error("Missing eventId option in showReportDialog call");if(!t.dsn)return void T.error("Missing dsn option in showReportDialog call");const e=tn.document.createElement("script");e.async=!0,e.src=function(t,e){const n=w(t),r=`${Kt(n)}embed/error-page/`;let i=`dsn=${O(n)}`;for(const t in e)if("dsn"!==t)if("user"===t){if(!e.user)continue;e.user.name&&(i+=`&name=${encodeURIComponent(e.user.name)}`),e.user.email&&(i+=`&email=${encodeURIComponent(e.user.email)}`)}else i+=`&${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`;return`${r}?${i}`}(t.dsn,t),t.onLoad&&(e.onload=t.onLoad);const n=tn.document.head||tn.document.body;n&&n.appendChild(e)}class cn{constructor(t){this.name=cn.id,this.ht={onerror:un,onunhandledrejection:an},this.K=Object.assign({onerror:!0,onunhandledrejection:!0},t)}setupOnce(){Error.stackTraceLimit=50;const t=this.K;for(const n in t){const r=this.ht[n];r&&t[n]&&(e=n,T.log(`Global Handler attached: ${e}`),r(),this.ht[n]=void 0)}var e}}function un(){Y("error",(e=>{const[n,r]=ln();if(!n.getIntegration(cn))return;const{msg:i,url:s,line:o,column:u,error:h}=e;if(nn()||h&&h.__sentry_own_request__)return;const f=void 0===h&&a(i)?function(t,e,n,r){const i=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let s=c(t)?t.message:t,o="Error";const u=s.match(i);u&&(o=u[1],s=u[2]);return hn({exception:{values:[{type:o,value:s}]}},e,n,r)}(i,s,o,u):hn(Ae(h||i,void 0,r,!1),s,o,u);f.level=t.Severity.Error,fn(n,h,f,"onerror")}))}function an(){Y("unhandledrejection",(e=>{const[n,r]=ln();if(!n.getIntegration(cn))return;let i=e;try{"reason"in e?i=e.reason:"detail"in e&&"reason"in e.detail&&(i=e.detail.reason)}catch(t){}if(nn()||i&&i.__sentry_own_request__)return!0;const s=h(i)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(i)}`}]}}:Ae(i,void 0,r,!0);s.level=t.Severity.Error,fn(n,i,s,"onunhandledrejection")}))}function hn(t,e,n,i){const s=t.exception=t.exception||{},o=s.values=s.values||[],c=o[0]=o[0]||{},u=c.stacktrace=c.stacktrace||{},h=u.frames=u.frames||[],f=isNaN(parseInt(i,10))?void 0:i,l=isNaN(parseInt(n,10))?void 0:n,d=a(e)&&e.length>0?e:function(){const t=r();try{return t.document.location.href}catch(t){return""}}();return 0===h.length&&h.push({colno:f,filename:d,function:"?",in_app:!0,lineno:l}),t}function fn(t,e,n,r){dt(n,{handled:!1,type:r}),t.captureEvent(n,{originalException:e})}function ln(){const t=Ht(),e=t.getClient();return[t,e&&e.getOptions().attachStacktrace]}cn.id="GlobalHandlers";const dn=["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"];class pn{constructor(t){this.name=pn.id,this.K=Object.assign({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},t)}setupOnce(){const t=r();this.K.setTimeout&&N(t,"setTimeout",bn),this.K.setInterval&&N(t,"setInterval",bn),this.K.requestAnimationFrame&&N(t,"requestAnimationFrame",yn),this.K.XMLHttpRequest&&"XMLHttpRequest"in t&&N(XMLHttpRequest.prototype,"send",vn);const e=this.K.eventTarget;if(e){(Array.isArray(e)?e:dn).forEach(mn)}}}function bn(t){return function(...e){const n=e[0];return e[0]=sn(n,{mechanism:{data:{function:X(t)},handled:!0,type:"instrument"}}),t.apply(this,e)}}function yn(t){return function(e){return t.apply(this,[sn(e,{mechanism:{data:{function:"requestAnimationFrame",handler:X(t)},handled:!0,type:"instrument"}})])}}function vn(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((t=>{t in n&&"function"==typeof n[t]&&N(n,t,(function(e){const n={mechanism:{data:{function:t,handler:X(e)},handled:!0,type:"instrument"}},r=q(e);return r&&(n.mechanism.data.handler=X(r)),sn(e,n)}))})),t.apply(this,e)}}function mn(t){const e=r(),n=e[t]&&e[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(N(n,"addEventListener",(function(e){return function(n,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=sn(r.handleEvent.bind(r),{mechanism:{data:{function:"handleEvent",handler:X(r),target:t},handled:!0,type:"instrument"}}))}catch(t){}return e.apply(this,[n,sn(r,{mechanism:{data:{function:"addEventListener",handler:X(r),target:t},handled:!0,type:"instrument"}}),i])}})),N(n,"removeEventListener",(function(t){return function(e,n,r){const i=n;try{const n=i&&i.__sentry_wrapped__;n&&t.call(this,e,n,r)}catch(t){}return t.call(this,e,i,r)}})))}pn.id="TryCatch";class gn{constructor(t){this.name=gn.id,this.K=Object.assign({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t)}addSentryBreadcrumb(t){this.K.sentry&&Ht().addBreadcrumb({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:ft(t)},{event:t})}setupOnce(){this.K.console&&Y("console",On),this.K.dom&&Y("dom",function(t){function e(e){let n,r="object"==typeof t?t.serializeAttribute:void 0;"string"==typeof r&&(r=[r]);try{n=e.event.target?b(e.event.target,r):b(e.event,r)}catch(t){n="<unknown>"}0!==n.length&&Ht().addBreadcrumb({category:`ui.${e.name}`,message:n},{event:e.event,name:e.name,global:e.global})}return e}(this.K.dom)),this.K.xhr&&Y("xhr",jn),this.K.fetch&&Y("fetch",wn),this.K.history&&Y("history",En)}}function On(t){const e={category:"console",data:{arguments:t.args,logger:"console"},level:wt(t.level),message:R(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;e.message=`Assertion failed: ${R(t.args.slice(1)," ")||"console.assert"}`,e.data.arguments=t.args.slice(1)}Ht().addBreadcrumb(e,{input:t.args,level:t.level})}function jn(t){if(t.endTimestamp){if(t.xhr.__sentry_own_request__)return;const{method:e,url:n,status_code:r,body:i}=t.xhr.__sentry_xhr__||{};Ht().addBreadcrumb({category:"xhr",data:{method:e,url:n,status_code:r},type:"http"},{xhr:t.xhr,input:i})}else;}function wn(e){e.endTimestamp&&(e.fetchData.url.match(/sentry_key/)&&"POST"===e.fetchData.method||(e.error?Ht().addBreadcrumb({category:"fetch",data:e.fetchData,level:t.Severity.Error,type:"http"},{data:e.error,input:e.args}):Ht().addBreadcrumb({category:"fetch",data:Object.assign(Object.assign({},e.fetchData),{status_code:e.response.status}),type:"http"},{input:e.args,response:e.response})))}function En(t){const e=r();let n=t.from,i=t.to;const s=at(e.location.href);let o=at(n);const c=at(i);o.path||(o=s),s.protocol===c.protocol&&s.host===c.host&&(i=c.relative),s.protocol===o.protocol&&s.host===o.host&&(n=o.relative),Ht().addBreadcrumb({category:"navigation",data:{from:n,to:i}})}gn.id="Breadcrumbs";class $n{constructor(t={}){this.name=$n.id,this.ft=t.key||"cause",this.lt=t.limit||5}setupOnce(){qt(((t,e)=>{const n=Ht().getIntegration($n);return n?function(t,e,n,r){if(!(n.exception&&n.exception.values&&r&&p(r.originalException,Error)))return n;const i=xn(e,r.originalException,t);return n.exception.values=[...i,...n.exception.values],n}(n.ft,n.lt,t,e):t}))}}function xn(t,e,n,r=[]){if(!p(e[n],Error)||r.length+1>=t)return r;const i=Ie(e[n]);return xn(t,e[n],n,[i,...r])}$n.id="LinkedErrors";const Sn=r();class _n{constructor(){this.name=_n.id}setupOnce(){qt((t=>{if(Ht().getIntegration(_n)){if(!Sn.navigator&&!Sn.location&&!Sn.document)return t;const e=t.request&&t.request.url||Sn.location&&Sn.location.href,{referrer:n}=Sn.document||{},{userAgent:r}=Sn.navigator||{},i=Object.assign(Object.assign(Object.assign({},t.request&&t.request.headers),n&&{Referer:n}),r&&{"User-Agent":r}),s=Object.assign(Object.assign({},e&&{url:e}),{headers:i});return Object.assign(Object.assign({},t),{request:s})}return t}))}}_n.id="UserAgent";class kn{constructor(){this.name=kn.id}setupOnce(t,e){t((t=>{const n=e().getIntegration(kn);if(n){try{if(function(t,e){if(!e)return!1;if(function(t,e){const n=t.message,r=e.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!Dn(t,e))return!1;if(!Tn(t,e))return!1;return!0}(t,e))return!0;if(function(t,e){const n=Rn(e),r=Rn(t);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!Dn(t,e))return!1;if(!Tn(t,e))return!1;return!0}(t,e))return!0;return!1}(t,n.dt))return T.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(e){return n.dt=t}return n.dt=t}return t}))}}function Tn(t,e){let n=In(t),r=In(e);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(n=n,r=r,r.length!==n.length)return!1;for(let t=0;t<r.length;t++){const e=r[t],i=n[t];if(e.filename!==i.filename||e.lineno!==i.lineno||e.colno!==i.colno||e.function!==i.function)return!1}return!0}function Dn(t,e){let 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(t){return!1}}function Rn(t){return t.exception&&t.exception.values&&t.exception.values[0]}function In(t){const e=t.exception;if(e)try{return e.values[0].stacktrace.frames}catch(t){return}else if(t.stacktrace)return t.stacktrace.frames}kn.id="Dedupe";var Nn=Object.freeze({__proto__:null,GlobalHandlers:cn,TryCatch:pn,Breadcrumbs:gn,LinkedErrors:$n,UserAgent:_n,Dedupe:kn});class Cn extends class{constructor(t,e){this.bt={},this.yt=0,this.vt=new t(e),this.K=e,e.dsn&&(this.gt=w(e.dsn))}captureException(t,e,n){if(pt(t))return void T.log(ne);let r=e&&e.event_id;return this.Ot(this.jt().eventFromException(t,e).then((t=>this.wt(t,e,n))).then((t=>{r=t}))),r}captureMessage(t,e,n,r){let i=n&&n.event_id;const s=h(t)?this.jt().eventFromMessage(String(t),e,n):this.jt().eventFromException(t,n);return this.Ot(s.then((t=>this.wt(t,n,r))).then((t=>{i=t}))),i}captureEvent(t,e,n){if(e&&e.originalException&&pt(e.originalException))return void T.log(ne);let r=e&&e.event_id;return this.Ot(this.wt(t,e,n).then((t=>{r=t}))),r}captureSession(t){this.Et()?"string"!=typeof t.release?T.warn("Discarded session because of missing or non-string release"):(this.$t(t),t.update({init:!1})):T.warn("SDK not enabled, will not capture session.")}getDsn(){return this.gt}getOptions(){return this.K}getTransport(){return this.jt().getTransport()}flush(t){return this.xt(t).then((e=>this.getTransport().close(t).then((t=>e&&t))))}close(t){return this.flush(t).then((t=>(this.getOptions().enabled=!1,t)))}setupIntegrations(){this.Et()&&!this.bt.initialized&&(this.bt=ee(this.K))}getIntegration(t){try{return this.bt[t.id]||null}catch(e){return T.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}St(t,e){let n=!1,r=!1;const i=e.exception&&e.exception.values;if(i){r=!0;for(const t of i){const e=t.mechanism;if(e&&!1===e.handled){n=!0;break}}}const s="ok"===t.status;(s&&0===t.errors||s&&n)&&(t.update(Object.assign(Object.assign({},n&&{status:"crashed"}),{errors:t.errors||Number(r||n)})),this.captureSession(t))}$t(t){this.jt().sendSession(t)}xt(t){return new Ot((e=>{let n=0;const r=setInterval((()=>{0==this.yt?(clearInterval(r),e(!0)):(n+=1,t&&n>=t&&(clearInterval(r),e(!1)))}),1)}))}jt(){return this.vt}Et(){return!1!==this.getOptions().enabled&&void 0!==this.gt}_t(t,e,n){const{normalizeDepth:r=3,normalizeMaxBreadth:i=1e3}=this.getOptions(),s=Object.assign(Object.assign({},t),{event_id:t.event_id||(n&&n.event_id?n.event_id:ut()),timestamp:t.timestamp||_t()});this.kt(s),this.Tt(s);let o=e;n&&n.captureContext&&(o=Ct.clone(o).update(n.captureContext));let c=mt(s);return o&&(c=o.applyToEvent(s,n)),c.then((t=>(t&&(t.sdkProcessingMetadata=Object.assign(Object.assign({},t.sdkProcessingMetadata),{normalizeDepth:bt(r)})),"number"==typeof r&&r>0?this.Dt(t,r,i):t)))}Dt(t,e,n){if(!t)return null;const r=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t),t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map((t=>Object.assign(Object.assign({},t),t.data&&{data:bt(t.data,e,n)})))}),t.user&&{user:bt(t.user,e,n)}),t.contexts&&{contexts:bt(t.contexts,e,n)}),t.extra&&{extra:bt(t.extra,e,n)});return t.contexts&&t.contexts.trace&&(r.contexts.trace=t.contexts.trace),r.sdkProcessingMetadata=Object.assign(Object.assign({},r.sdkProcessingMetadata),{baseClientNormalized:!0}),r}kt(t){const e=this.getOptions(),{environment:n,release:r,dist:i,maxValueLength:s=250}=e;"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=D(t.message,s));const o=t.exception&&t.exception.values&&t.exception.values[0];o&&o.value&&(o.value=D(o.value,s));const c=t.request;c&&c.url&&(c.url=D(c.url,s))}Tt(t){const e=Object.keys(this.bt);e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}Rt(t){this.jt().sendEvent(t)}wt(t,e,n){return this.It(t,e,n).then((t=>t.event_id),(t=>{T.error(t)}))}It(t,e,n){const{beforeSend:r,sampleRate:i}=this.getOptions(),s=this.getTransport();function o(t,e){s.recordLostEvent&&s.recordLostEvent(t,e)}if(!this.Et())return gt(new m("SDK not enabled, will not capture event."));const c="transaction"===t.type;return!c&&"number"==typeof i&&Math.random()>i?(o("sample_rate","event"),gt(new m(`Discarding event because it's not included in the random sample (sampling rate = ${i})`))):this._t(t,n,e).then((n=>{if(null===n)throw o("event_processor",t.type||"event"),new m("An event processor returned null, will not send event.");if(e&&e.data&&!0===e.data.__sentry__||c||!r)return n;return function(t){const e="`beforeSend` method has to return `null` or a valid event.";if(d(t))return t.then((t=>{if(!f(t)&&null!==t)throw new m(e);return t}),(t=>{throw new m(`beforeSend rejected with ${t}`)}));if(!f(t)&&null!==t)throw new m(e);return t}(r(n,e))})).then((e=>{if(null===e)throw o("before_send",t.type||"event"),new m("`beforeSend` returned `null`, will not send event.");const r=n&&n.getSession&&n.getSession();return!c&&r&&this.St(r,e),this.Rt(e),e})).then(null,(t=>{if(t instanceof m)throw t;throw this.captureException(t,{data:{__sentry__:!0},originalException:t}),new m(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${t}`)}))}Ot(t){this.yt+=1,t.then((t=>(this.yt-=1,t)),(t=>(this.yt-=1,t)))}}{constructor(t={}){t.tt=t.tt||{},t.tt.sdk=t.tt.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:ae}],version:ae},super(Ze,t)}showReportDialog(t={}){r().document&&(this.Et()?on(Object.assign(Object.assign({},t),{dsn:t.dsn||this.getDsn()})):T.error("Trying to call showReportDialog with Sentry Client disabled"))}_t(t,e,n){return t.platform=t.platform||"javascript",super._t(t,e,n)}Rt(t){const e=this.getIntegration(gn);e&&e.addSentryBreadcrumb(t),super.Rt(t)}}const Mn=[new de,new fe,new pn,new gn,new cn,new $n,new kn,new _n];function qn(t){t.startSession({ignoreDuration:!0}),t.captureSession()}let Ln={};const Un=r();Un.Sentry&&Un.Sentry.Integrations&&(Ln=Un.Sentry.Integrations);const An=Object.assign(Object.assign(Object.assign({},Ln),ye),Nn);return t.BrowserClient=Cn,t.Hub=At,t.Integrations=An,t.SDK_NAME="sentry.javascript.browser",t.SDK_VERSION=ae,t.Scope=Ct,t.Session=Lt,t.Transports=Ye,t.addBreadcrumb=function(t){zt("addBreadcrumb",t)},t.addGlobalEventProcessor=qt,t.captureEvent=function(t){return zt("captureEvent",t)},t.captureException=captureException,t.captureMessage=function(t,e){const n=new Error(t),r="string"!=typeof e?{captureContext:e}:void 0;return zt("captureMessage",t,"string"==typeof e?e:void 0,Object.assign({originalException:t,syntheticException:n},r))},t.close=function(t){const e=Ht().getClient();return e?e.close(t):(T.warn("Cannot flush events and disable SDK. No client defined."),mt(!1))},t.configureScope=function(t){zt("configureScope",t)},t.defaultIntegrations=Mn,t.eventFromException=Le,t.eventFromMessage=Ue,t.flush=function(t){const e=Ht().getClient();return e?e.flush(t):(T.warn("Cannot flush events. No client defined."),mt(!1))},t.forceLoad=function(){},t.getCurrentHub=Ht,t.getHubFromCarrier=Bt,t.init=function(t={}){if(void 0===t.defaultIntegrations&&(t.defaultIntegrations=Mn),void 0===t.release){const e=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),function(t,e){!0===e.debug&&T.enable();const n=Ht(),r=n.getScope();r&&r.update(e.initialScope);const i=new t(e);n.bindClient(i)}(Cn,t),t.autoSessionTracking&&function(){const t=r();if(void 0===t.document)return void T.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");const e=Ht();if(!e.captureSession)return;qn(e),Y("history",(({from:t,to:e})=>{void 0!==t&&t!==e&&qn(Ht())}))}()},t.injectReportDialog=on,t.lastEventId=function(){return Ht().lastEventId()},t.makeMain=Pt,t.onLoad=function(t){t()},t.setContext=function(t,e){zt("setContext",t,e)},t.setExtra=function(t,e){zt("setExtra",t,e)},t.setExtras=function(t){zt("setExtras",t)},t.setTag=function(t,e){zt("setTag",t,e)},t.setTags=function(t){zt("setTags",t)},t.setUser=function(t){zt("setUser",t)},t.showReportDialog=function(t={}){const e=Ht(),n=e.getScope();n&&(t.user=Object.assign(Object.assign({},n.getUser()),t.user)),t.eventId||(t.eventId=e.lastEventId());const r=e.getClient();r&&r.showReportDialog(t)},t.startTransaction=function(t,e){return zt("startTransaction",Object.assign({},t),e)},t.withScope=Jt,t.wrap=function(t){return sn(t)()},t}({});
3
- //# sourceMappingURL=bundle.es6.debug.min.js.map