@wix/cli-app 1.1.34 → 1.1.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/CreateVersionCommand-GJYJMFS6.js +4 -0
- package/build/CreateVersionCommand-GJYJMFS6.js.map +1 -0
- package/build/DevCommand-UJ56EKIV.js +4 -0
- package/build/DevCommand-UJ56EKIV.js.map +1 -0
- package/build/GenerateCommand-YTAYOWLN.js +99 -0
- package/build/GenerateCommand-YTAYOWLN.js.map +1 -0
- package/build/LogsCommand-ZWIIAJI6.js +4 -0
- package/build/LogsCommand-ZWIIAJI6.js.map +1 -0
- package/build/PreviewCommand-7JJAW5Y4.js +4 -0
- package/build/{ServeCommand-AEELDVFH.js → ServeCommand-ZJMRR4ES.js} +2 -2
- package/build/ServeCommand-ZJMRR4ES.js.map +1 -0
- package/build/build-6EB3DE3E.js +4 -0
- package/build/build-6EB3DE3E.js.map +1 -0
- package/build/build-D3GVJS75.js +5 -0
- package/build/build-D3GVJS75.js.map +1 -0
- package/build/chunk-3ACKBLKR.js +4 -0
- package/build/chunk-3ACKBLKR.js.map +1 -0
- package/build/{chunk-JKG4PFVP.js → chunk-3EO7KOOF.js} +2 -2
- package/build/chunk-3UAIFRQA.js +10 -0
- package/build/chunk-3UAIFRQA.js.map +1 -0
- package/build/{chunk-ROZV4SHP.js → chunk-5GXRNUOR.js} +71 -46
- package/build/chunk-5GXRNUOR.js.map +1 -0
- package/build/chunk-5POS3EQI.js +4 -0
- package/build/chunk-5POS3EQI.js.map +1 -0
- package/build/chunk-6N3YP4CO.js +4 -0
- package/build/chunk-7IFG7QRE.js +11 -0
- package/build/chunk-7IFG7QRE.js.map +1 -0
- package/build/{chunk-MON4UIEH.js → chunk-AXFFV5MU.js} +2 -2
- package/build/chunk-AXFFV5MU.js.map +1 -0
- package/build/chunk-DAPZQSXG.js +11 -0
- package/build/chunk-DAPZQSXG.js.map +1 -0
- package/build/chunk-E7IQZNJ7.js +4 -0
- package/build/chunk-E7IQZNJ7.js.map +1 -0
- package/build/chunk-HNY5L6XA.js +4 -0
- package/build/chunk-HNY5L6XA.js.map +1 -0
- package/build/{chunk-HTY6QIPX.js → chunk-I24C7SNY.js} +2 -2
- package/build/{chunk-MB65UVFQ.js → chunk-JPGXKQXP.js} +5 -5
- package/build/chunk-JPGXKQXP.js.map +1 -0
- package/build/{chunk-MKVAJTCF.js → chunk-KX7T4WP2.js} +2 -2
- package/build/{chunk-MKVAJTCF.js.map → chunk-KX7T4WP2.js.map} +1 -1
- package/build/{chunk-2KPKOJPE.js → chunk-OMZB4UKG.js} +2 -2
- package/build/{chunk-XUF2HJAT.js → chunk-OOIZVKTY.js} +2 -2
- package/build/chunk-OOIZVKTY.js.map +1 -0
- package/build/{chunk-F4LXYTO3.js → chunk-PQFAL6B4.js} +2 -2
- package/build/chunk-SLG2HQYB.js +4 -0
- package/build/chunk-SLG2HQYB.js.map +1 -0
- package/build/chunk-TSKFLGBO.js +116 -0
- package/build/chunk-TSKFLGBO.js.map +1 -0
- package/build/chunk-ZTMLHHUQ.js +4 -0
- package/build/chunk-ZTMLHHUQ.js.map +1 -0
- package/build/esm-HBMYQBEO.js +466 -0
- package/build/esm-HBMYQBEO.js.map +1 -0
- package/build/index.js +2 -2
- package/build/platform-sdk/chunk-OSR2I5MY.js +2 -0
- package/build/platform-sdk/chunk-OSR2I5MY.js.map +1 -0
- package/build/platform-sdk/chunk-SHVQ4QZG.js +2 -0
- package/build/platform-sdk/chunk-SHVQ4QZG.js.map +1 -0
- package/build/platform-sdk/chunk-TEDR2MDT.js +2 -0
- package/build/platform-sdk/chunk-TEDR2MDT.js.map +1 -0
- package/build/platform-sdk/dashboard.js +2 -0
- package/build/platform-sdk/dashboard.js.map +1 -0
- package/build/platform-sdk/editor.js +8 -0
- package/build/platform-sdk/editor.js.map +1 -0
- package/build/platform-sdk/esm-WXLS5NTC.js +2 -0
- package/build/platform-sdk/esm-WXLS5NTC.js.map +1 -0
- package/build/platform-sdk/site.js +2 -0
- package/build/platform-sdk/site.js.map +1 -0
- package/build/preview-OUDOPVIF.js +4 -0
- package/build/{preview-L5LDZK2L.js.map → preview-OUDOPVIF.js.map} +1 -1
- package/build/render-command-URXJKFYN.js +4 -0
- package/build/{render-command-IA3LLA3F.js.map → render-command-URXJKFYN.js.map} +1 -1
- package/internal/component-hmr-wrapper.tsx +4 -9
- package/package.json +10 -9
- package/schemas/custom-element.json +1 -1
- package/schemas/dashboard-menu-plugin.json +1 -1
- package/schemas/dashboard-modal.json +1 -1
- package/schemas/ecom-additional-fees.json +1 -0
- package/schemas/ecom-discounts-trigger.json +1 -0
- package/schemas/ecom-payment-settings.json +1 -0
- package/schemas/ecom-shipping-rates.json +1 -0
- package/schemas/ecom-validations.json +1 -0
- package/schemas/embedded-script.json +1 -1
- package/templates/custom-element/files/element.module.css.ejs +22 -0
- package/templates/custom-element/files/element.tsx.ejs +5 -7
- package/templates/service-plugin/ecom-additional-fees/dependencies.json +5 -0
- package/templates/service-plugin/ecom-additional-fees/files/plugin.json.ejs +4 -0
- package/templates/service-plugin/ecom-additional-fees/files/plugin.ts.ejs +12 -0
- package/templates/service-plugin/ecom-discounts-trigger/dependencies.json +5 -0
- package/templates/service-plugin/ecom-discounts-trigger/files/plugin.json.ejs +4 -0
- package/templates/service-plugin/ecom-discounts-trigger/files/plugin.ts.ejs +17 -0
- package/templates/service-plugin/ecom-payment-settings/dependencies.json +5 -0
- package/templates/service-plugin/ecom-payment-settings/files/plugin.json.ejs +4 -0
- package/templates/service-plugin/ecom-payment-settings/files/plugin.ts.ejs +12 -0
- package/templates/service-plugin/ecom-shipping-rates/dependencies.json +5 -0
- package/templates/service-plugin/ecom-shipping-rates/files/plugin.json.ejs +4 -0
- package/templates/service-plugin/ecom-shipping-rates/files/plugin.ts.ejs +12 -0
- package/templates/service-plugin/ecom-validations/dependencies.json +5 -0
- package/templates/service-plugin/ecom-validations/files/plugin.json.ejs +4 -0
- package/templates/service-plugin/ecom-validations/files/plugin.ts.ejs +12 -0
- package/build/CreateVersionCommand-3ECZI65A.js +0 -4
- package/build/CreateVersionCommand-3ECZI65A.js.map +0 -1
- package/build/DevCommand-B7WYY2UQ.js +0 -4
- package/build/DevCommand-B7WYY2UQ.js.map +0 -1
- package/build/GenerateCommand-CIO77YCS.js +0 -99
- package/build/GenerateCommand-CIO77YCS.js.map +0 -1
- package/build/LogsCommand-VJ64MYDN.js +0 -4
- package/build/LogsCommand-VJ64MYDN.js.map +0 -1
- package/build/PreviewCommand-BZY2XOZN.js +0 -4
- package/build/ServeCommand-AEELDVFH.js.map +0 -1
- package/build/build-JVHXDZDD.js +0 -4
- package/build/build-JVHXDZDD.js.map +0 -1
- package/build/chunk-35SQ77PW.js +0 -4
- package/build/chunk-35SQ77PW.js.map +0 -1
- package/build/chunk-COIDN4V4.js +0 -4
- package/build/chunk-COIDN4V4.js.map +0 -1
- package/build/chunk-E6MYDYCH.js +0 -4
- package/build/chunk-E6MYDYCH.js.map +0 -1
- package/build/chunk-F4YTZ6XA.js +0 -116
- package/build/chunk-F4YTZ6XA.js.map +0 -1
- package/build/chunk-F55KYUXJ.js +0 -4
- package/build/chunk-F55KYUXJ.js.map +0 -1
- package/build/chunk-FBYP5GID.js +0 -10
- package/build/chunk-FBYP5GID.js.map +0 -1
- package/build/chunk-HTO6ALNX.js +0 -4
- package/build/chunk-HTO6ALNX.js.map +0 -1
- package/build/chunk-JAY5356K.js +0 -11
- package/build/chunk-JAY5356K.js.map +0 -1
- package/build/chunk-KQOYEWON.js +0 -11
- package/build/chunk-KQOYEWON.js.map +0 -1
- package/build/chunk-MB65UVFQ.js.map +0 -1
- package/build/chunk-MON4UIEH.js.map +0 -1
- package/build/chunk-QTYWYBN3.js +0 -4
- package/build/chunk-QTYWYBN3.js.map +0 -1
- package/build/chunk-ROZV4SHP.js.map +0 -1
- package/build/chunk-X62VPDUS.js +0 -4
- package/build/chunk-XUF2HJAT.js.map +0 -1
- package/build/esm-Z5T56VLV.js +0 -365
- package/build/esm-Z5T56VLV.js.map +0 -1
- package/build/preview-L5LDZK2L.js +0 -4
- package/build/render-command-IA3LLA3F.js +0 -4
- /package/build/{PreviewCommand-BZY2XOZN.js.map → PreviewCommand-7JJAW5Y4.js.map} +0 -0
- /package/build/{chunk-JKG4PFVP.js.map → chunk-3EO7KOOF.js.map} +0 -0
- /package/build/{chunk-X62VPDUS.js.map → chunk-6N3YP4CO.js.map} +0 -0
- /package/build/{chunk-HTY6QIPX.js.map → chunk-I24C7SNY.js.map} +0 -0
- /package/build/{chunk-2KPKOJPE.js.map → chunk-OMZB4UKG.js.map} +0 -0
- /package/build/{chunk-F4LXYTO3.js.map → chunk-PQFAL6B4.js.map} +0 -0
package/build/esm-Z5T56VLV.js
DELETED
|
@@ -1,365 +0,0 @@
|
|
|
1
|
-
import { createRequire as _createRequire } from 'node:module';
|
|
2
|
-
const require = _createRequire(import.meta.url);
|
|
3
|
-
import{d as Xc,h as f}from"./chunk-V4TR6DCM.js";f();f();f();f();f();f();var Zc=Object.prototype.toString;function ut(e){switch(Zc.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return Be(e,Error)}}function Tn(e,t){return Zc.call(e)===`[object ${t}]`}function In(e){return Tn(e,"ErrorEvent")}function So(e){return Tn(e,"DOMError")}function ls(e){return Tn(e,"DOMException")}function Se(e){return Tn(e,"String")}function vn(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Vt(e){return e===null||vn(e)||typeof e!="object"&&typeof e!="function"}function Fe(e){return Tn(e,"Object")}function Kt(e){return typeof Event<"u"&&Be(e,Event)}function ds(e){return typeof Element<"u"&&Be(e,Element)}function fs(e){return Tn(e,"RegExp")}function ze(e){return!!(e&&e.then&&typeof e.then=="function")}function ps(e){return Fe(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function ar(e){return typeof e=="number"&&e!==e}function Be(e,t){try{return e instanceof t}catch{return!1}}function cr(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}f();function lt(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function ur(e,t){let n=e,r=n.length;if(r<=150)return n;t>r&&(t=r);let o=Math.max(t-60,0);o<5&&(o=0);let i=Math.min(o+140,r);return i>r-5&&(i=r),i===r&&(o=Math.max(i-140,0)),n=n.slice(o,i),o>0&&(n=`'{snip} ${n}`),i<r&&(n+=" {snip}"),n}function Jt(e,t){if(!Array.isArray(e))return"";let n=[];for(let r=0;r<e.length;r++){let o=e[r];try{cr(o)?n.push("[VueViewModel]"):n.push(String(o))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function Qc(e,t,n=!1){return Se(e)?fs(t)?t.test(e):Se(t)?n?e===t:e.includes(t):!1:!1}function dt(e,t=[],n=!1){return t.some(r=>Qc(e,r,n))}function lr(e,t,n=250,r,o,i,s){if(!i.exception||!i.exception.values||!s||!Be(s.originalException,Error))return;let a=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;a&&(i.exception.values=dm(ms(e,t,o,s.originalException,r,i.exception.values,a,0),n))}function ms(e,t,n,r,o,i,s,a){if(i.length>=n+1)return i;let c=[...i];if(Be(r[o],Error)){eu(s,a);let u=e(t,r[o]),l=c.length;tu(u,o,l,a),c=ms(e,t,n,r[o],o,[u,...c],u,l)}return Array.isArray(r.errors)&&r.errors.forEach((u,l)=>{if(Be(u,Error)){eu(s,a);let d=e(t,u),p=c.length;tu(d,`errors[${l}]`,p,a),c=ms(e,t,n,u,o,[d,...c],d,p)}}),c}function eu(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function tu(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function dm(e,t){return e.map(n=>(n.value&&(n.value=lt(n.value,t)),n))}f();f();function Eo(e){return e&&e.Math==Math?e:void 0}var C=typeof globalThis=="object"&&Eo(globalThis)||typeof window=="object"&&Eo(window)||typeof self=="object"&&Eo(self)||typeof global=="object"&&Eo(global)||function(){return this}()||{};function Xt(){return C}function dr(e,t,n){let r=n||C,o=r.__SENTRY__=r.__SENTRY__||{};return o[e]||(o[e]=t())}var xn=Xt(),fm=80;function He(e,t={}){if(!e)return"<unknown>";try{let n=e,r=5,o=[],i=0,s=0,a=" > ",c=a.length,u,l=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||fm;for(;n&&i++<r&&(u=pm(n,l),!(u==="html"||i>1&&s+o.length*c+u.length>=d));)o.push(u),s+=u.length,n=n.parentNode;return o.reverse().join(a)}catch{return"<unknown>"}}function pm(e,t){let n=e,r=[],o,i,s,a,c;if(!n||!n.tagName)return"";if(xn.HTMLElement&&n instanceof HTMLElement&&n.dataset&&n.dataset.sentryComponent)return n.dataset.sentryComponent;r.push(n.tagName.toLowerCase());let u=t&&t.length?t.filter(d=>n.getAttribute(d)).map(d=>[d,n.getAttribute(d)]):null;if(u&&u.length)u.forEach(d=>{r.push(`[${d[0]}="${d[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),o=n.className,o&&Se(o))for(i=o.split(/\s+/),c=0;c<i.length;c++)r.push(`.${i[c]}`);let l=["aria-label","type","name","title","alt"];for(c=0;c<l.length;c++)s=l[c],a=n.getAttribute(s),a&&r.push(`[${s}="${a}"]`);return r.join("")}function fr(){try{return xn.document.location.href}catch{return""}}function pr(e){return xn.document&&xn.document.querySelector?xn.document.querySelector(e):null}function mr(e){if(!xn.HTMLElement)return null;let t=e,n=5;for(let r=0;r<n;r++){if(!t)return null;if(t instanceof HTMLElement&&t.dataset.sentryComponent)return t.dataset.sentryComponent;t=t.parentNode}return null}f();f();var je=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;f();var mm="Sentry Logger ",Zt=["debug","info","warn","error","log","assert","trace"],wn={};function Re(e){if(!("console"in C))return e();let t=C.console,n={},r=Object.keys(wn);r.forEach(o=>{let i=wn[o];n[o]=t[o],t[o]=i});try{return e()}finally{r.forEach(o=>{t[o]=n[o]})}}function hm(){let e=!1,t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return je?Zt.forEach(n=>{t[n]=(...r)=>{e&&Re(()=>{C.console[n](`${mm}[${n}]:`,...r)})}}):Zt.forEach(n=>{t[n]=()=>{}}),t}var h=hm();var gm=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function _m(e){return e==="http"||e==="https"}function Te(e,t=!1){let{host:n,path:r,pass:o,port:i,projectId:s,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&o?`:${o}`:""}@${n}${i?`:${i}`:""}/${r&&`${r}/`}${s}`}function bo(e){let t=gm.exec(e);if(!t){Re(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,o="",i,s="",a]=t.slice(1),c="",u=a,l=u.split("/");if(l.length>1&&(c=l.slice(0,-1).join("/"),u=l.pop()),u){let d=u.match(/^\d+/);d&&(u=d[0])}return nu({host:i,pass:o,path:c,projectId:u,port:s,protocol:n,publicKey:r})}function nu(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function ym(e){if(!je)return!0;let{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(s=>e[s]?!1:(h.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:n.match(/^\d+$/)?_m(r)?t&&isNaN(parseInt(t,10))?(h.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(h.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(h.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function hr(e){let t=typeof e=="string"?bo(e):nu(e);if(!(!t||!ym(t)))return t}f();var Ee=class extends Error{constructor(t,n="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}};f();f();function Q(e,t,n){if(!(t in e))return;let r=e[t],o=n(r);typeof o=="function"&&To(o,r),e[t]=o}function ke(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{je&&h.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function To(e,t){try{let n=t.prototype||{};e.prototype=t.prototype=n,ke(e,"__sentry_original__",t)}catch{}}function Qt(e){return e.__sentry_original__}function gs(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function Io(e){if(ut(e))return{message:e.message,name:e.name,stack:e.stack,...ou(e)};if(Kt(e)){let t={type:e.type,target:ru(e.target),currentTarget:ru(e.currentTarget),...ou(e)};return typeof CustomEvent<"u"&&Be(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function ru(e){try{return ds(e)?He(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function ou(e){if(typeof e=="object"&&e!==null){let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function _s(e,t=40){let n=Object.keys(Io(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return lt(n[0],t);for(let r=n.length;r>0;r--){let o=n.slice(0,r).join(", ");if(!(o.length>t))return r===n.length?o:lt(o,t)}return""}function J(e){return hs(e,new Map)}function hs(e,t){if(Sm(e)){let n=t.get(e);if(n!==void 0)return n;let r={};t.set(e,r);for(let o of Object.keys(e))typeof e[o]<"u"&&(r[o]=hs(e[o],t));return r}if(Array.isArray(e)){let n=t.get(e);if(n!==void 0)return n;let r=[];return t.set(e,r),e.forEach(o=>{r.push(hs(o,t))}),r}return e}function Sm(e){if(!Fe(e))return!1;try{let t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}f();f();var au=50,iu=/\(error: (.*)\)/,su=/captureMessage|captureException/;function vo(...e){let t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0)=>{let o=[],i=n.split(`
|
|
4
|
-
`);for(let s=r;s<i.length;s++){let a=i[s];if(a.length>1024)continue;let c=iu.test(a)?a.replace(iu,"$1"):a;if(!c.match(/\S*Error: /)){for(let u of t){let l=u(c);if(l){o.push(l);break}}if(o.length>=au)break}}return cu(o)}}function Ss(e){return Array.isArray(e)?vo(...e):e}function cu(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(t[t.length-1].function||"")&&t.pop(),t.reverse(),su.test(t[t.length-1].function||"")&&(t.pop(),su.test(t[t.length-1].function||"")&&t.pop()),t.slice(0,au).map(n=>({...n,filename:n.filename||t[t.length-1].filename,function:n.function||"?"}))}var ys="<anonymous>";function Ae(e){try{return!e||typeof e!="function"?ys:e.name||ys}catch{return ys}}var xo={},uu={};function Oe(e,t){xo[e]=xo[e]||[],xo[e].push(t)}function Me(e,t){uu[e]||(t(),uu[e]=!0)}function me(e,t){let n=e&&xo[e];if(n)for(let r of n)try{r(t)}catch(o){je&&h.error(`Error while triggering instrumentation handler.
|
|
5
|
-
Type: ${e}
|
|
6
|
-
Name: ${Ae(r)}
|
|
7
|
-
Error:`,o)}}function gr(e){let t="console";Oe(t,e),Me(t,Em)}function Em(){"console"in C&&Zt.forEach(function(e){e in C.console&&Q(C.console,e,function(t){return wn[e]=t,function(...n){me("console",{args:n,level:e});let o=wn[e];o&&o.apply(C.console,n)}})})}f();f();function B(){let e=C,t=e.crypto||e.msCrypto,n=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{let r=new Uint8Array(1);return t.getRandomValues(r),r[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function lu(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function Qe(e){let{message:t,event_id:n}=e;if(t)return t;let r=lu(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Cn(e,t,n){let r=e.exception=e.exception||{},o=r.values=r.values||[],i=o[0]=o[0]||{};i.value||(i.value=t||""),i.type||(i.type=n||"Error")}function Ue(e,t){let n=lu(e);if(!n)return;let r={type:"generic",handled:!0},o=n.mechanism;if(n.mechanism={...r,...o,...t},t&&"data"in t){let i={...o&&o.data,...t.data};n.mechanism.data=i}}function Es(e,t,n=5){if(t.lineno===void 0)return;let r=e.length,o=Math.max(Math.min(r-1,t.lineno-1),0);t.pre_context=e.slice(Math.max(0,o-n),o).map(i=>ur(i,0)),t.context_line=ur(e[Math.min(r-1,o)],t.colno||0),t.post_context=e.slice(Math.min(o+1,r),o+1+n).map(i=>ur(i,0))}function wo(e){if(e&&e.__sentry_captured__)return!0;try{ke(e,"__sentry_captured__",!0)}catch{}return!1}function _r(e){return Array.isArray(e)?e:[e]}var Rn=C,bm=1e3,du,bs,Ts;function yr(e){let t="dom";Oe(t,e),Me(t,Tm)}function Tm(){if(!Rn.document)return;let e=me.bind(null,"dom"),t=fu(e,!0);Rn.document.addEventListener("click",t,!1),Rn.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{let r=Rn[n]&&Rn[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(Q(r,"addEventListener",function(o){return function(i,s,a){if(i==="click"||i=="keypress")try{let c=this,u=c.__sentry_instrumentation_handlers__=c.__sentry_instrumentation_handlers__||{},l=u[i]=u[i]||{refCount:0};if(!l.handler){let d=fu(e);l.handler=d,o.call(this,i,d,a)}l.refCount++}catch{}return o.call(this,i,s,a)}}),Q(r,"removeEventListener",function(o){return function(i,s,a){if(i==="click"||i=="keypress")try{let c=this,u=c.__sentry_instrumentation_handlers__||{},l=u[i];l&&(l.refCount--,l.refCount<=0&&(o.call(this,i,l.handler,a),l.handler=void 0,delete u[i]),Object.keys(u).length===0&&delete c.__sentry_instrumentation_handlers__)}catch{}return o.call(this,i,s,a)}}))})}function Im(e){if(e.type!==bs)return!1;try{if(!e.target||e.target._sentryId!==Ts)return!1}catch{}return!0}function vm(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function fu(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=xm(n);if(vm(n.type,r))return;ke(n,"_sentryCaptured",!0),r&&!r._sentryId&&ke(r,"_sentryId",B());let o=n.type==="keypress"?"input":n.type;Im(n)||(e({event:n,name:o,global:t}),bs=n.type,Ts=r?r._sentryId:void 0),clearTimeout(du),du=Rn.setTimeout(()=>{Ts=void 0,bs=void 0},bm)}}function xm(e){try{return e.target}catch{return null}}f();f();var Co=Xt();function Ro(){if(!("fetch"in Co))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Sr(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Er(){if(typeof EdgeRuntime=="string")return!0;if(!Ro())return!1;if(Sr(Co.fetch))return!0;let e=!1,t=Co.document;if(t&&typeof t.createElement=="function")try{let n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=Sr(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){je&&h.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function Is(){return"ReportingObserver"in Co}function bt(e){let t="fetch";Oe(t,e),Me(t,wm)}function wm(){Er()&&Q(C,"fetch",function(e){return function(...t){let{method:n,url:r}=Cm(t),o={args:t,fetchData:{method:n,url:r},startTimestamp:Date.now()};return me("fetch",{...o}),e.apply(C,t).then(i=>{let s={...o,endTimestamp:Date.now(),response:i};return me("fetch",s),i},i=>{let s={...o,endTimestamp:Date.now(),error:i};throw me("fetch",s),i})}})}function vs(e,t){return!!e&&typeof e=="object"&&!!e[t]}function pu(e){return typeof e=="string"?e:e?vs(e,"url")?e.url:e.toString?e.toString():"":""}function Cm(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){let[n,r]=e;return{url:pu(n),method:vs(r,"method")?String(r.method).toUpperCase():"GET"}}let t=e[0];return{url:pu(t),method:vs(t,"method")?String(t.method).toUpperCase():"GET"}}f();var ko=null;function br(e){let t="error";Oe(t,e),Me(t,Rm)}function Rm(){ko=C.onerror,C.onerror=function(e,t,n,r,o){return me("error",{column:r,error:o,line:n,msg:e,url:t}),ko&&!ko.__SENTRY_LOADER__?ko.apply(this,arguments):!1},C.onerror.__SENTRY_INSTRUMENTED__=!0}f();var Ao=null;function Tr(e){let t="unhandledrejection";Oe(t,e),Me(t,km)}function km(){Ao=C.onunhandledrejection,C.onunhandledrejection=function(e){return me("unhandledrejection",e),Ao&&!Ao.__SENTRY_LOADER__?Ao.apply(this,arguments):!0},C.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}f();f();var Oo=Xt();function mu(){let e=Oo.chrome,t=e&&e.app&&e.app.runtime,n="history"in Oo&&!!Oo.history.pushState&&!!Oo.history.replaceState;return!t&&n}var Ir=C,Mo;function et(e){let t="history";Oe(t,e),Me(t,Am)}function Am(){if(!mu())return;let e=Ir.onpopstate;Ir.onpopstate=function(...n){let r=Ir.location.href,o=Mo;if(Mo=r,me("history",{from:o,to:r}),e)try{return e.apply(this,n)}catch{}};function t(n){return function(...r){let o=r.length>2?r[2]:void 0;if(o){let i=Mo,s=String(o);Mo=s,me("history",{from:i,to:s})}return n.apply(this,r)}}Q(Ir.history,"pushState",t),Q(Ir.history,"replaceState",t)}f();var Om=C,Ne="__sentry_xhr_v3__";function Tt(e){let t="xhr";Oe(t,e),Me(t,Mm)}function Mm(){if(!Om.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;Q(e,"open",function(t){return function(...n){let r=Date.now(),o=Se(n[0])?n[0].toUpperCase():void 0,i=Nm(n[1]);if(!o||!i)return t.apply(this,n);this[Ne]={method:o,url:i,request_headers:{}},o==="POST"&&i.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let s=()=>{let a=this[Ne];if(a&&this.readyState===4){try{a.status_code=this.status}catch{}let c={args:[o,i],endTimestamp:Date.now(),startTimestamp:r,xhr:this};me("xhr",c)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?Q(this,"onreadystatechange",function(a){return function(...c){return s(),a.apply(this,c)}}):this.addEventListener("readystatechange",s),Q(this,"setRequestHeader",function(a){return function(...c){let[u,l]=c,d=this[Ne];return d&&Se(u)&&Se(l)&&(d.request_headers[u.toLowerCase()]=l),a.apply(this,c)}}),t.apply(this,n)}}),Q(e,"send",function(t){return function(...n){let r=this[Ne];if(!r)return t.apply(this,n);n[0]!==void 0&&(r.body=n[0]);let o={args:[r.method,r.url],startTimestamp:Date.now(),xhr:this};return me("xhr",o),t.apply(this,n)}})}function Nm(e){if(Se(e))return e;try{return e.toString()}catch{}}f();f();f();function xs(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function ws(){return"npm"}function hu(){return!xs()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function kn(){return typeof window<"u"&&(!hu()||Dm())}function Dm(){return C.process!==void 0&&C.process.type==="renderer"}f();function gu(){let e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(o){if(e)return t.has(o)?!0:(t.add(o),!1);for(let i=0;i<t.length;i++)if(t[i]===o)return!0;return t.push(o),!1}function r(o){if(e)t.delete(o);else for(let i=0;i<t.length;i++)if(t[i]===o){t.splice(i,1);break}}return[n,r]}f();function be(e,t=100,n=1/0){try{return No("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Do(e,t=3,n=100*1024){let r=be(e,t);return Bm(r)>n?Do(e,t-1,n):r}function No(e,t,n=1/0,r=1/0,o=gu()){let[i,s]=o;if(t==null||["number","boolean","string"].includes(typeof t)&&!ar(t))return t;let a=Lm(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;let c=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(c===0)return a.replace("object ","");if(i(t))return"[Circular ~]";let u=t;if(u&&typeof u.toJSON=="function")try{let m=u.toJSON();return No("",m,c-1,r,o)}catch{}let l=Array.isArray(t)?[]:{},d=0,p=Io(t);for(let m in p){if(!Object.prototype.hasOwnProperty.call(p,m))continue;if(d>=r){l[m]="[MaxProperties ~]";break}let g=p[m];l[m]=No(m,g,c-1,r,o),d++}return s(t),l}function Lm(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(cr(t))return"[VueViewModel]";if(ps(t))return"[SyntheticEvent]";if(typeof t=="number"&&t!==t)return"[NaN]";if(typeof t=="function")return`[Function: ${Ae(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;let n=Pm(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function Pm(e){let t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function Fm(e){return~-encodeURI(e).split(/%..|./).length}function Bm(e){return Fm(JSON.stringify(e))}f();function Hm(e,t){let n=0;for(let r=e.length-1;r>=0;r--){let o=e[r];o==="."?e.splice(r,1):o===".."?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}var Um=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function $m(e){let t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=Um.exec(t);return n?n.slice(1):[]}function Cs(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let o=r>=0?e[r]:"/";o&&(t=`${o}/${t}`,n=o.charAt(0)==="/")}return t=Hm(t.split("/").filter(r=>!!r),!n).join("/"),(n?"/":"")+t||"."}function _u(e){let t=0;for(;t<e.length&&e[t]==="";t++);let n=e.length-1;for(;n>=0&&e[n]==="";n--);return t>n?[]:e.slice(t,n-t+1)}function Rs(e,t){e=Cs(e).slice(1),t=Cs(t).slice(1);let n=_u(e.split("/")),r=_u(t.split("/")),o=Math.min(n.length,r.length),i=o;for(let a=0;a<o;a++)if(n[a]!==r[a]){i=a;break}let s=[];for(let a=i;a<n.length;a++)s.push("..");return s=s.concat(r.slice(i)),s.join("/")}function ks(e,t){let n=$m(e)[2];return t&&n.slice(t.length*-1)===t&&(n=n.slice(0,n.length-t.length)),n}f();f();var It;(function(e){e[e.PENDING=0]="PENDING";let n=1;e[e.RESOLVED=n]="RESOLVED";let r=2;e[e.REJECTED=r]="REJECTED"})(It||(It={}));function tt(e){return new $e(t=>{t(e)})}function en(e){return new $e((t,n)=>{n(e)})}var $e=class e{constructor(t){e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),this._state=It.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new e((r,o)=>{this._handlers.push([!1,i=>{if(!t)r(i);else try{r(t(i))}catch(s){o(s)}},i=>{if(!n)o(i);else try{r(n(i))}catch(s){o(s)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new e((n,r)=>{let o,i;return this.then(s=>{i=!1,o=s,t&&t()},s=>{i=!0,o=s,t&&t()}).then(()=>{if(i){r(o);return}n(o)})})}__init(){this._resolve=t=>{this._setResult(It.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(It.REJECTED,t)}}__init3(){this._setResult=(t,n)=>{if(this._state===It.PENDING){if(ze(n)){n.then(this._resolve,this._reject);return}this._state=t,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===It.PENDING)return;let t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===It.RESOLVED&&n[1](this._value),this._state===It.REJECTED&&n[2](this._value),n[0]=!0)})}}};function As(e){let t=[];function n(){return e===void 0||t.length<e}function r(s){return t.splice(t.indexOf(s),1)[0]}function o(s){if(!n())return en(new Ee("Not adding Promise because buffer limit was reached."));let a=s();return t.indexOf(a)===-1&&t.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function i(s){return new $e((a,c)=>{let u=t.length;if(!u)return a(!0);let l=setTimeout(()=>{s&&s>0&&a(!1)},s);t.forEach(d=>{tt(d).then(()=>{--u||(clearTimeout(l),a(!0))},c)})})}return{$:t,add:o,drain:i}}f();function qe(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function Os(e){return e.split(/[\?#]/,1)[0]}f();var yu=["fatal","error","warning","log","info","debug"];function vr(e){return e==="warn"?"warning":yu.includes(e)?e:"log"}f();var Su=1e3;function ft(){return Date.now()/Su}function Gm(){let{performance:e}=C;if(!e||!e.now)return ft;let t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/Su}var Ie=Gm();var xr,re=(()=>{let{performance:e}=C;if(!e||!e.now){xr="none";return}let t=3600*1e3,n=e.now(),r=Date.now(),o=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,i=o<t,s=e.timing&&e.timing.navigationStart,c=typeof s=="number"?Math.abs(s+n-r):t,u=c<t;return i||u?o<=c?(xr="timeOrigin",e.timeOrigin):(xr="navigationStart",s):(xr="dateNow",r)})();f();f();var An="baggage",Ms="sentry-",bu=/^sentry-/,Tu=8192;function Lo(e){if(!Se(e)&&!Array.isArray(e))return;let t={};if(Array.isArray(e))t=e.reduce((r,o)=>{let i=Eu(o);for(let s of Object.keys(i))r[s]=i[s];return r},{});else{if(!e)return;t=Eu(e)}let n=Object.entries(t).reduce((r,[o,i])=>{if(o.match(bu)){let s=o.slice(Ms.length);r[s]=i}return r},{});if(Object.keys(n).length>0)return n}function wr(e){if(!e)return;let t=Object.entries(e).reduce((n,[r,o])=>(o&&(n[`${Ms}${r}`]=o),n),{});return Wm(t)}function Eu(e){return e.split(",").map(t=>t.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((t,[n,r])=>(t[n]=r,t),{})}function Wm(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],o)=>{let i=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,s=o===0?i:`${t},${i}`;return s.length>Tu?(je&&h.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):s},"")}var Iu=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Cr(e){if(!e)return;let t=e.match(Iu);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function Ns(e,t){let n=Cr(e),r=Lo(t),{traceId:o,parentSpanId:i,parentSampled:s}=n||{};return n?{traceparentData:n,dynamicSamplingContext:r||{},propagationContext:{traceId:o||B(),parentSpanId:i||B().substring(16),spanId:B().substring(16),sampled:s,dsc:r||{}}}:{traceparentData:n,dynamicSamplingContext:void 0,propagationContext:{traceId:o||B(),spanId:B().substring(16)}}}function Rr(e,t){let n=Cr(e),r=Lo(t),{traceId:o,parentSpanId:i,parentSampled:s}=n||{};return n?{traceId:o||B(),parentSpanId:i||B().substring(16),spanId:B().substring(16),sampled:s,dsc:r||{}}:{traceId:o||B(),spanId:B().substring(16)}}function tn(e=B(),t=B().substring(16),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}f();function he(e,t=[]){return[e,t]}function Ls(e,t){let[n,r]=e;return[n,[...r,t]]}function nt(e,t){let n=e[1];for(let r of n){let o=r[0].type;if(t(r,o))return!0}return!1}function Ps(e,t){return nt(e,(n,r)=>t.includes(r))}function Ds(e,t){return(t||new TextEncoder).encode(e)}function kr(e,t){let[n,r]=e,o=JSON.stringify(n);function i(s){typeof o=="string"?o=typeof s=="string"?o+s:[Ds(o,t),s]:o.push(typeof s=="string"?Ds(s,t):s)}for(let s of r){let[a,c]=s;if(i(`
|
|
8
|
-
${JSON.stringify(a)}
|
|
9
|
-
`),typeof c=="string"||c instanceof Uint8Array)i(c);else{let u;try{u=JSON.stringify(c)}catch{u=JSON.stringify(be(c))}i(u)}}return typeof o=="string"?o:zm(o)}function zm(e){let t=e.reduce((o,i)=>o+i.length,0),n=new Uint8Array(t),r=0;for(let o of e)n.set(o,r),r+=o.length;return n}function Fs(e,t,n){let r=typeof e=="string"?t.encode(e):e;function o(c){let u=r.subarray(0,c);return r=r.subarray(c+1),u}function i(){let c=r.indexOf(10);return c<0&&(c=r.length),JSON.parse(n.decode(o(c)))}let s=i(),a=[];for(;r.length;){let c=i(),u=typeof c.length=="number"?c.length:void 0;a.push([c,u?o(u):i()])}return[s,a]}function Bs(e,t){let n=typeof e.data=="string"?Ds(e.data,t):e.data;return[J({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}var jm={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function Po(e){return jm[e]}function On(e){if(!e||!e.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function Ar(e,t,n,r){let o=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Te(r)},...o&&{trace:J({...o})}}}f();function Hs(e,t,n){let r=[{type:"client_report"},{timestamp:n||ft(),discarded_events:e}];return he(t?{dsn:t}:{},[r])}f();function Fo(e,t=Date.now()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}function vu(e,t){return e[t]||e.all||0}function Or(e,t,n=Date.now()){return vu(e,t)>n}function Mr(e,{statusCode:t,headers:n},r=Date.now()){let o={...e},i=n&&n["x-sentry-rate-limits"],s=n&&n["retry-after"];if(i)for(let a of i.trim().split(",")){let[c,u,,,l]=a.split(":",5),d=parseInt(c,10),p=(isNaN(d)?60:d)*1e3;if(!u)o.all=r+p;else for(let m of u.split(";"))m==="metric_bucket"?(!l||l.split(";").includes("custom"))&&(o[m]=r+p):o[m]=r+p}else s?o.all=r+Fo(s,r):t===429&&(o.all=r+60*1e3);return o}f();function xu(e,t){return e(t.stack||"",1)}function Us(e,t){let n={type:t.name||t.constructor.name,value:t.message},r=xu(e,t);return r.length&&(n.stacktrace={frames:r}),n}f();function $s(e,t){return e??t()}f();function nn(e){let t,n=e[0],r=1;for(;r<e.length;){let o=e[r],i=e[r+1];if(r+=2,(o==="optionalAccess"||o==="optionalCall")&&n==null)return;o==="access"||o==="optionalAccess"?(t=n,n=i(n)):(o==="call"||o==="optionalCall")&&(n=i((...s)=>n.call(t,...s)),t=void 0)}return n}f();var I=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;f();f();var rt="production";f();f();function Nr(){return dr("globalEventProcessors",()=>[])}function Bo(e){Nr().push(e)}function rn(e,t,n,r=0){return new $e((o,i)=>{let s=e[r];if(t===null||typeof s!="function")o(t);else{let a=s({...t},n);I&&s.id&&a===null&&h.log(`Event processor "${s.id}" dropped event`),ze(a)?a.then(c=>rn(e,c,n,r+1).then(o)).then(null,i):rn(e,a,n,r+1).then(o).then(null,i)}})}f();function Ho(e){let t=Ie(),n={sid:B(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>qm(n)};return e&&ot(n,e),n}function ot(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Ie(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:B()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{let n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Uo(e,t){let n={};t?n={status:t}:e.status==="ok"&&(n={status:"exited"}),ot(e,n)}function qm(e){return J({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}f();f();f();f();f();var Cu=0,Gs=1;function on(e){let{spanId:t,traceId:n}=e.spanContext(),{data:r,op:o,parent_span_id:i,status:s,tags:a,origin:c}=P(e);return J({data:r,op:o,parent_span_id:i,span_id:t,status:s,tags:a,trace_id:n,origin:c})}function vt(e){let{traceId:t,spanId:n}=e.spanContext(),r=Mn(e);return tn(t,n,r)}function Ot(e){return typeof e=="number"?wu(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?wu(e.getTime()):Ie()}function wu(e){return e>9999999999?e/1e3:e}function P(e){return Ym(e)?e.getSpanJSON():typeof e.toJSON=="function"?e.toJSON():{}}function Ym(e){return typeof e.getSpanJSON=="function"}function Mn(e){let{traceFlags:t}=e.spanContext();return!!(t&Gs)}function sn(e,t,n,r,o,i){let{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||B(),timestamp:t.timestamp||ft()},u=n.integrations||e.integrations.map(T=>T.name);Vm(c,e),Xm(c,u),t.type===void 0&&Km(c,e.stackParser);let l=Qm(r,n.captureContext);n.mechanism&&Ue(c,n.mechanism);let d=o&&o.getEventProcessors?o.getEventProcessors():[],p=zs().getScopeData();if(i){let T=i.getScopeData();Ws(p,T)}if(l){let T=l.getScopeData();Ws(p,T)}let m=[...n.attachments||[],...p.attachments];m.length&&(n.attachments=m),$o(c,p);let g=[...d,...Nr(),...p.eventProcessors];return rn(g,c,n).then(T=>(T&&Jm(T),typeof s=="number"&&s>0?Zm(T,s,a):T))}function Vm(e,t){let{environment:n,release:r,dist:o,maxValueLength:i=250}=t;"environment"in e||(e.environment="environment"in t?n:rt),e.release===void 0&&r!==void 0&&(e.release=r),e.dist===void 0&&o!==void 0&&(e.dist=o),e.message&&(e.message=lt(e.message,i));let s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=lt(s.value,i));let a=e.request;a&&a.url&&(a.url=lt(a.url,i))}var Ru=new WeakMap;function Km(e,t){let n=C._sentryDebugIds;if(!n)return;let r,o=Ru.get(t);o?r=o:(r=new Map,Ru.set(t,r));let i=Object.keys(n).reduce((s,a)=>{let c,u=r.get(a);u?c=u:(c=t(a),r.set(a,c));for(let l=c.length-1;l>=0;l--){let d=c[l];if(d.filename){s[d.filename]=n[a];break}}return s},{});try{e.exception.values.forEach(s=>{s.stacktrace.frames.forEach(a=>{a.filename&&(a.debug_id=i[a.filename])})})}catch{}}function Jm(e){let t={};try{e.exception.values.forEach(r=>{r.stacktrace.frames.forEach(o=>{o.debug_id&&(o.abs_path?t[o.abs_path]=o.debug_id:o.filename&&(t[o.filename]=o.debug_id),delete o.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.keys(t).forEach(r=>{n.push({type:"sourcemap",code_file:r,debug_id:t[r]})})}function Xm(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function Zm(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>({...o,...o.data&&{data:be(o.data,t,n)}}))},...e.user&&{user:be(e.user,t,n)},...e.contexts&&{contexts:be(e.contexts,t,n)},...e.extra&&{extra:be(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=be(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(o=>{let i=P(o).data;return i&&(o.data=be(i,t,n)),o})),r}function Qm(e,t){if(!t)return e;let n=e?e.clone():new it;return n.update(t),n}function ku(e){if(e)return eh(e)?{captureContext:e}:nh(e)?{captureContext:e}:e}function eh(e){return e instanceof it||typeof e=="function"}var th=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function nh(e){return Object.keys(e).some(t=>th.includes(t))}function xt(e,t){return W().captureException(e,ku(t))}function an(e,t){let n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return W().captureMessage(e,n,r)}function Mt(e,t){return W().captureEvent(e,t)}function Au(e){W().configureScope(e)}function Ye(e,t){W().addBreadcrumb(e,t)}function Go(e,t){W().setContext(e,t)}function Ou(e){W().setExtras(e)}function Mu(e,t){W().setExtra(e,t)}function Nu(e){W().setTags(e)}function Du(e,t){W().setTag(e,t)}function Lu(e){W().setUser(e)}function De(...e){let t=W();if(e.length===2){let[n,r]=e;return n?t.withScope(()=>(t.getStackTop().scope=n,r(n))):t.withScope(r)}return t.withScope(e[0])}function Pu(e){return cn(()=>e(ge()))}function Fu(e,t){return De(n=>(n.setSpan(e),t(n)))}function Bu(e,t){return W().startTransaction({...e},t)}async function Hu(e){let t=x();return t?t.flush(e):(I&&h.warn("Cannot flush events. No client defined."),Promise.resolve(!1))}async function Uu(e){let t=x();return t?t.close(e):(I&&h.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1))}function $u(){return W().lastEventId()}function x(){return W().getClient()}function Gu(){return!!x()}function q(){return W().getScope()}function Dr(e){let t=x(),n=ge(),r=q(),{release:o,environment:i=rt}=t&&t.getOptions()||{},{userAgent:s}=C.navigator||{},a=Ho({release:o,environment:i,user:r.getUser()||n.getUser(),...s&&{userAgent:s},...e}),c=n.getSession();return c&&c.status==="ok"&&ot(c,{status:"exited"}),Wo(),n.setSession(a),r.setSession(a),a}function Wo(){let e=ge(),t=q(),n=t.getSession()||e.getSession();n&&Uo(n),Wu(),e.setSession(),t.setSession()}function Wu(){let e=ge(),t=q(),n=x(),r=t.getSession()||e.getSession();r&&n&&n.captureSession&&n.captureSession(r)}function Lr(e=!1){if(e){Wo();return}Wu()}f();function un(e){return e.transaction}function Nt(e,t,n){let r=t.getOptions(),{publicKey:o}=t.getDsn()||{},{segment:i}=n&&n.getUser()||{},s=J({environment:r.environment||rt,release:r.release,user_segment:i,public_key:o,trace_id:e});return t.emit&&t.emit("createDsc",s),s}function Ve(e){let t=x();if(!t)return{};let n=Nt(P(e).trace_id||"",t,q()),r=un(e);if(!r)return n;let o=r&&r._frozenDynamicSamplingContext;if(o)return o;let{sampleRate:i,source:s}=r.metadata;i!=null&&(n.sample_rate=`${i}`);let a=P(r);return s&&s!=="url"&&(n.transaction=a.description),n.sampled=String(Mn(r)),t.emit&&t.emit("createDsc",n),n}function $o(e,t){let{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:i}=t;rh(e,t),r&&sh(e,r),ah(e,n),oh(e,o),ih(e,i)}function Ws(e,t){let{extra:n,tags:r,user:o,contexts:i,level:s,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:l,attachments:d,propagationContext:p,transactionName:m,span:g}=t;Pr(e,"extra",n),Pr(e,"tags",r),Pr(e,"user",o),Pr(e,"contexts",i),Pr(e,"sdkProcessingMetadata",a),s&&(e.level=s),m&&(e.transactionName=m),g&&(e.span=g),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),l.length&&(e.eventProcessors=[...e.eventProcessors,...l]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...p}}function Pr(e,t,n){if(n&&Object.keys(n).length){e[t]={...e[t]};for(let r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[t][r]=n[r])}}function rh(e,t){let{extra:n,tags:r,user:o,contexts:i,level:s,transactionName:a}=t,c=J(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});let u=J(r);u&&Object.keys(u).length&&(e.tags={...u,...e.tags});let l=J(o);l&&Object.keys(l).length&&(e.user={...l,...e.user});let d=J(i);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts}),s&&(e.level=s),a&&(e.transaction=a)}function oh(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function ih(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function sh(e,t){e.contexts={trace:on(t),...e.contexts};let n=un(t);if(n){e.sdkProcessingMetadata={dynamicSamplingContext:Ve(t),...e.sdkProcessingMetadata};let r=P(n).description;r&&(e.tags={transaction:r,...e.tags})}}function ah(e,t){e.fingerprint=e.fingerprint?_r(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}var ch=100,js,it=class e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=zu()}static clone(t){return t?t.clone():new e}clone(){let t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},t._user=this._user,t._level=this._level,t._span=this._span,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t}setClient(t){this._client=t}getClient(){return this._client}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this._session&&ot(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){let t=this._span;return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;let n=typeof t=="function"?t(this):t;if(n instanceof e){let r=n.getScopeData();this._tags={...this._tags,...r.tags},this._extra={...this._extra,...r.extra},this._contexts={...this._contexts,...r.contexts},r.user&&Object.keys(r.user).length&&(this._user=r.user),r.level&&(this._level=r.level),r.fingerprint.length&&(this._fingerprint=r.fingerprint),n.getRequestSession()&&(this._requestSession=n.getRequestSession()),r.propagationContext&&(this._propagationContext=r.propagationContext)}else if(Fe(n)){let r=t;this._tags={...this._tags,...r.tags},this._extra={...this._extra,...r.extra},this._contexts={...this._contexts,...r.contexts},r.user&&(this._user=r.user),r.level&&(this._level=r.level),r.fingerprint&&(this._fingerprint=r.fingerprint),r.requestSession&&(this._requestSession=r.requestSession),r.propagationContext&&(this._propagationContext=r.propagationContext)}return this}clear(){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._attachments=[],this._propagationContext=zu(),this}addBreadcrumb(t,n){let r=typeof n=="number"?n:ch;if(r<=0)return this;let o={timestamp:ft(),...t},i=this._breadcrumbs;return i.push(o),this._breadcrumbs=i.length>r?i.slice(-r):i,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){let{_breadcrumbs:t,_attachments:n,_contexts:r,_tags:o,_extra:i,_user:s,_level:a,_fingerprint:c,_eventProcessors:u,_propagationContext:l,_sdkProcessingMetadata:d,_transactionName:p,_span:m}=this;return{breadcrumbs:t,attachments:n,contexts:r,tags:o,extra:i,user:s,level:a,fingerprint:c||[],eventProcessors:u,propagationContext:l,sdkProcessingMetadata:d,transactionName:p,span:m}}applyToEvent(t,n={},r=[]){$o(t,this.getScopeData());let o=[...r,...Nr(),...this._eventProcessors];return rn(o,t,n)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){let r=n&&n.event_id?n.event_id:B();if(!this._client)return h.warn("No client configured on scope - will not capture exception!"),r;let o=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:o,...n,event_id:r},this),r}captureMessage(t,n,r){let o=r&&r.event_id?r.event_id:B();if(!this._client)return h.warn("No client configured on scope - will not capture message!"),o;let i=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:i,...r,event_id:o},this),o}captureEvent(t,n){let r=n&&n.event_id?n.event_id:B();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(h.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}};function zs(){return js||(js=new it),js}function zu(){return{traceId:B(),spanId:B().substring(16)}}f();var ln="7.118.0";var ju=parseFloat(ln),uh=100,Nn=class{constructor(t,n,r,o=ju){this._version=o;let i;n?i=n:(i=new it,i.setClient(t));let s;r?s=r:(s=new it,s.setClient(t)),this._stack=[{scope:i}],t&&this.bindClient(t),this._isolationScope=s}isOlderThan(t){return this._version<t}bindClient(t){let n=this.getStackTop();n.client=t,n.scope.setClient(t),t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){let t=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:t}),t}popScope(){return this.getStack().length<=1?!1:!!this.getStack().pop()}withScope(t){let n=this.pushScope(),r;try{r=t(n)}catch(o){throw this.popScope(),o}return ze(r)?r.then(o=>(this.popScope(),o),o=>{throw this.popScope(),o}):(this.popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(t,n){let r=this._lastEventId=n&&n.event_id?n.event_id:B(),o=new Error("Sentry syntheticException");return this.getScope().captureException(t,{originalException:t,syntheticException:o,...n,event_id:r}),r}captureMessage(t,n,r){let o=this._lastEventId=r&&r.event_id?r.event_id:B(),i=new Error(t);return this.getScope().captureMessage(t,n,{originalException:t,syntheticException:i,...r,event_id:o}),o}captureEvent(t,n){let r=n&&n.event_id?n.event_id:B();return t.type||(this._lastEventId=r),this.getScope().captureEvent(t,{...n,event_id:r}),r}lastEventId(){return this._lastEventId}addBreadcrumb(t,n){let{scope:r,client:o}=this.getStackTop();if(!o)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:s=uh}=o.getOptions&&o.getOptions()||{};if(s<=0)return;let c={timestamp:ft(),...t},u=i?Re(()=>i(c,n)):c;u!==null&&(o.emit&&o.emit("beforeAddBreadcrumb",u,n),r.addBreadcrumb(u,s))}setUser(t){this.getScope().setUser(t),this.getIsolationScope().setUser(t)}setTags(t){this.getScope().setTags(t),this.getIsolationScope().setTags(t)}setExtras(t){this.getScope().setExtras(t),this.getIsolationScope().setExtras(t)}setTag(t,n){this.getScope().setTag(t,n),this.getIsolationScope().setTag(t,n)}setExtra(t,n){this.getScope().setExtra(t,n),this.getIsolationScope().setExtra(t,n)}setContext(t,n){this.getScope().setContext(t,n),this.getIsolationScope().setContext(t,n)}configureScope(t){let{scope:n,client:r}=this.getStackTop();r&&t(n)}run(t){let n=zo(this);try{t(this)}finally{zo(n)}}getIntegration(t){let n=this.getClient();if(!n)return null;try{return n.getIntegration(t)}catch{return I&&h.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,n){let r=this._callExtensionMethod("startTransaction",t,n);return I&&!r&&(this.getClient()?h.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
|
|
10
|
-
Sentry.addTracingExtensions();
|
|
11
|
-
Sentry.init({...});
|
|
12
|
-
`):h.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")),r}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){let n=this.getStackTop().scope,r=n.getSession();r&&Uo(r),this._sendSessionUpdate(),n.setSession()}startSession(t){let{scope:n,client:r}=this.getStackTop(),{release:o,environment:i=rt}=r&&r.getOptions()||{},{userAgent:s}=C.navigator||{},a=Ho({release:o,environment:i,user:n.getUser(),...s&&{userAgent:s},...t}),c=n.getSession&&n.getSession();return c&&c.status==="ok"&&ot(c,{status:"exited"}),this.endSession(),n.setSession(a),a}shouldSendDefaultPii(){let t=this.getClient(),n=t&&t.getOptions();return!!(n&&n.sendDefaultPii)}_sendSessionUpdate(){let{scope:t,client:n}=this.getStackTop(),r=t.getSession();r&&n&&n.captureSession&&n.captureSession(r)}_callExtensionMethod(t,...n){let o=Dt().__SENTRY__;if(o&&o.extensions&&typeof o.extensions[t]=="function")return o.extensions[t].apply(this,n);I&&h.warn(`Extension method ${t} couldn't be found, doing nothing.`)}};function Dt(){return C.__SENTRY__=C.__SENTRY__||{extensions:{},hub:void 0},C}function zo(e){let t=Dt(),n=Fr(t);return qs(t,e),n}function W(){let e=Dt();if(e.__SENTRY__&&e.__SENTRY__.acs){let t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return lh(e)}function ge(){return W().getIsolationScope()}function lh(e=Dt()){return(!dh(e)||Fr(e).isOlderThan(ju))&&qs(e,new Nn),Fr(e)}function cn(e,t={}){let n=Dt();return n.__SENTRY__&&n.__SENTRY__.acs?n.__SENTRY__.acs.runWithAsyncContext(e,t):e()}function dh(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function Fr(e){return dr("hub",()=>new Nn,e)}function qs(e,t){if(!e)return!1;let n=e.__SENTRY__=e.__SENTRY__||{};return n.hub=t,!0}f();f();function ye(e){return(e||W()).getScope().getTransaction()}var qu=Cr;var Yu=!1;function Vu(){Yu||(Yu=!0,br(Ys),Tr(Ys))}function Ys(){let e=ye();if(e){let t="internal_error";I&&h.log(`[Tracing] Transaction: ${t} -> Global error occured`),e.setStatus(t)}}Ys.tag="sentry_tracingErrorCallback";f();f();f();f();var Vs;(function(e){let t="ok";e.Ok=t;let n="deadline_exceeded";e.DeadlineExceeded=n;let r="unauthenticated";e.Unauthenticated=r;let o="permission_denied";e.PermissionDenied=o;let i="not_found";e.NotFound=i;let s="resource_exhausted";e.ResourceExhausted=s;let a="invalid_argument";e.InvalidArgument=a;let c="unimplemented";e.Unimplemented=c;let u="unavailable";e.Unavailable=u;let l="internal_error";e.InternalError=l;let d="unknown_error";e.UnknownError=d;let p="cancelled";e.Cancelled=p;let m="already_exists";e.AlreadyExists=m;let g="failed_precondition";e.FailedPrecondition=g;let E="aborted";e.Aborted=E;let T="out_of_range";e.OutOfRange=T;let S="data_loss";e.DataLoss=S})(Vs||(Vs={}));function jo(e){if(e<400&&e>=100)return"ok";if(e>=400&&e<500)switch(e){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(e>=500&&e<600)switch(e){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}var Ku=jo;function Lt(e,t){e.setTag("http.status_code",String(t)),e.setData("http.response.status_code",t);let n=jo(t);n!=="unknown_error"&&e.setStatus(n)}f();f();function qo(e,t,n=()=>{}){let r;try{r=e()}catch(o){throw t(o),n(),o}return fh(r,t,n)}function fh(e,t,n){return ze(e)?e.then(r=>(n(),r),r=>{throw t(r),n(),r}):(n(),e)}f();function Ke(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;let t=x(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function Ju(e,t,n=()=>{},r=()=>{}){let o=W(),i=q(),s=i.getSpan(),a=Vo(e),c=Yo(o,{parentSpan:s,spanContext:a,forceTransaction:!1,scope:i});return i.setSpan(c),qo(()=>t(c),u=>{c&&c.setStatus("internal_error"),n(u,c)},()=>{c&&c.end(),i.setSpan(s),r()})}function Xu(e,t){let n=Vo(e);return cn(()=>De(e.scope,r=>{let o=W(),i=r.getSpan(),a=e.onlyIfParent&&!i?void 0:Yo(o,{parentSpan:i,spanContext:n,forceTransaction:e.forceTransaction,scope:r});return qo(()=>t(a),()=>{if(a){let{status:c}=P(a);(!c||c==="ok")&&a.setStatus("internal_error")}},()=>a&&a.end())}))}function Zu(e,t){let n=Vo(e);return cn(()=>De(e.scope,r=>{let o=W(),i=r.getSpan(),a=e.onlyIfParent&&!i?void 0:Yo(o,{parentSpan:i,spanContext:n,forceTransaction:e.forceTransaction,scope:r});function c(){a&&a.end()}return qo(()=>t(a,c),()=>{if(a&&a.isRecording()){let{status:u}=P(a);(!u||u==="ok")&&a.setStatus("internal_error")}})}))}function Dn(e){if(!Ke())return;let t=Vo(e),n=W(),r=e.scope?e.scope.getSpan():Pt();if(e.onlyIfParent&&!r)return;let s=(e.scope||q()).clone();return Yo(n,{parentSpan:r,spanContext:t,forceTransaction:e.forceTransaction,scope:s})}function Pt(){return q().getSpan()}var Qu=({sentryTrace:e,baggage:t},n)=>{let r=q(),{traceparentData:o,dynamicSamplingContext:i,propagationContext:s}=Ns(e,t);r.setPropagationContext(s),I&&o&&h.log(`[Tracing] Continuing trace ${o.traceId}.`);let a={...o,metadata:J({dynamicSamplingContext:i})};return n?cn(()=>n(a)):a};function Yo(e,{parentSpan:t,spanContext:n,forceTransaction:r,scope:o}){if(!Ke())return;let i=ge(),s;if(t&&!r)s=t.startChild(n);else if(t){let a=Ve(t),{traceId:c,spanId:u}=t.spanContext(),l=Mn(t);s=e.startTransaction({traceId:c,parentSpanId:u,parentSampled:l,...n,metadata:{dynamicSamplingContext:a,...n.metadata}})}else{let{traceId:a,dsc:c,parentSpanId:u,sampled:l}={...i.getPropagationContext(),...o.getPropagationContext()};s=e.startTransaction({traceId:a,parentSpanId:u,parentSampled:l,...n,metadata:{dynamicSamplingContext:c,...n.metadata}})}return o.setSpan(s),ph(s,o,i),s}function Vo(e){if(e.startTime){let t={...e};return t.startTimestamp=Ot(e.startTime),delete t.startTime,t}return e}var el="_sentryScope",tl="_sentryIsolationScope";function ph(e,t,n){e&&(ke(e,tl,n),ke(e,el,t))}function nl(e){return{scope:e[el],isolationScope:e[tl]}}var Br;function rl(e){return Br?Br.get(e):void 0}function Ko(e){let t=rl(e);if(!t)return;let n={};for(let[,[r,o]]of t)n[r]||(n[r]=[]),n[r].push(J(o));return n}function ol(e,t,n,r,o,i){let s=Pt();if(s){let a=rl(s)||new Map,c=`${e}:${t}@${r}`,u=a.get(i);if(u){let[,l]=u;a.set(i,[c,{min:Math.min(l.min,n),max:Math.max(l.max,n),count:l.count+=1,sum:l.sum+=n,tags:l.tags}])}else a.set(i,[c,{min:n,max:n,count:1,sum:n,tags:o}]);Br||(Br=new WeakMap),Br.set(s,a)}}f();var _e="sentry.source",pt="sentry.sample_rate",dn="sentry.op",st="sentry.origin",Ks="profile_id";var Ln=class{constructor(t=1e3){this._maxlen=t,this.spans=[]}add(t){this.spans.length>this._maxlen?t.spanRecorder=void 0:this.spans.push(t)}},fn=class e{constructor(t={}){this._traceId=t.traceId||B(),this._spanId=t.spanId||B().substring(16),this._startTime=t.startTimestamp||Ie(),this.tags=t.tags?{...t.tags}:{},this.data=t.data?{...t.data}:{},this.instrumenter=t.instrumenter||"sentry",this._attributes={},this.setAttributes({[st]:t.origin||"manual",[dn]:t.op,...t.attributes}),this._name=t.name||t.description,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.status&&(this._status=t.status),t.endTimestamp&&(this._endTime=t.endTimestamp),t.exclusiveTime!==void 0&&(this._exclusiveTime=t.exclusiveTime),this._measurements=t.measurements?{...t.measurements}:{}}get name(){return this._name||""}set name(t){this.updateName(t)}get description(){return this._name}set description(t){this._name=t}get traceId(){return this._traceId}set traceId(t){this._traceId=t}get spanId(){return this._spanId}set spanId(t){this._spanId=t}set parentSpanId(t){this._parentSpanId=t}get parentSpanId(){return this._parentSpanId}get sampled(){return this._sampled}set sampled(t){this._sampled=t}get attributes(){return this._attributes}set attributes(t){this._attributes=t}get startTimestamp(){return this._startTime}set startTimestamp(t){this._startTime=t}get endTimestamp(){return this._endTime}set endTimestamp(t){this._endTime=t}get status(){return this._status}set status(t){this._status=t}get op(){return this._attributes[dn]}set op(t){this.setAttribute(dn,t)}get origin(){return this._attributes[st]}set origin(t){this.setAttribute(st,t)}spanContext(){let{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?Gs:Cu}}startChild(t){let n=new e({...t,parentSpanId:this._spanId,sampled:this._sampled,traceId:this._traceId});n.spanRecorder=this.spanRecorder,n.spanRecorder&&n.spanRecorder.add(n);let r=un(this);if(n.transaction=r,I&&r){let o=t&&t.op||"< unknown op >",i=P(n).description||"< unknown name >",s=r.spanContext().spanId,a=`[Tracing] Starting '${o}' span on transaction '${i}' (${s}).`;h.log(a),this._logMessage=a}return n}setTag(t,n){return this.tags={...this.tags,[t]:n},this}setData(t,n){return this.data={...this.data,[t]:n},this}setAttribute(t,n){n===void 0?delete this._attributes[t]:this._attributes[t]=n}setAttributes(t){Object.keys(t).forEach(n=>this.setAttribute(n,t[n]))}setStatus(t){return this._status=t,this}setHttpStatus(t){return Lt(this,t),this}setName(t){this.updateName(t)}updateName(t){return this._name=t,this}isSuccess(){return this._status==="ok"}finish(t){return this.end(t)}end(t){if(this._endTime)return;let n=un(this);if(I&&n&&n.spanContext().spanId!==this._spanId){let r=this._logMessage;r&&h.log(r.replace("Starting","Finishing"))}this._endTime=Ot(t)}toTraceparent(){return vt(this)}toContext(){return J({data:this._getData(),description:this._name,endTimestamp:this._endTime,op:this.op,parentSpanId:this._parentSpanId,sampled:this._sampled,spanId:this._spanId,startTimestamp:this._startTime,status:this._status,tags:this.tags,traceId:this._traceId})}updateWithContext(t){return this.data=t.data||{},this._name=t.name||t.description,this._endTime=t.endTimestamp,this.op=t.op,this._parentSpanId=t.parentSpanId,this._sampled=t.sampled,this._spanId=t.spanId||this._spanId,this._startTime=t.startTimestamp||this._startTime,this._status=t.status,this.tags=t.tags||{},this._traceId=t.traceId||this._traceId,this}getTraceContext(){return on(this)}getSpanJSON(){return J({data:this._getData(),description:this._name,op:this._attributes[dn],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:this._status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[st],_metrics_summary:Ko(this),profile_id:this._attributes[Ks],exclusive_time:this._exclusiveTime,measurements:Object.keys(this._measurements).length>0?this._measurements:void 0})}isRecording(){return!this._endTime&&!!this._sampled}toJSON(){return this.getSpanJSON()}_getData(){let{data:t,_attributes:n}=this,r=Object.keys(t).length>0,o=Object.keys(n).length>0;if(!(!r&&!o))return r&&o?{...t,...n}:r?t:n}};f();var Pn=class extends fn{constructor(t,n){super(t),this._contexts={},this._hub=n||W(),this._name=t.name||"",this._metadata={...t.metadata},this._trimEnd=t.trimEnd,this.transaction=this;let r=this._metadata.dynamicSamplingContext;r&&(this._frozenDynamicSamplingContext={...r})}get name(){return this._name}set name(t){this.setName(t)}get metadata(){return{source:"custom",spanMetadata:{},...this._metadata,...this._attributes[_e]&&{source:this._attributes[_e]},...this._attributes[pt]&&{sampleRate:this._attributes[pt]}}}set metadata(t){this._metadata=t}setName(t,n="custom"){this._name=t,this.setAttribute(_e,n)}updateName(t){return this._name=t,this}initSpanRecorder(t=1e3){this.spanRecorder||(this.spanRecorder=new Ln(t)),this.spanRecorder.add(this)}setContext(t,n){n===null?delete this._contexts[t]:this._contexts[t]=n}setMeasurement(t,n,r=""){this._measurements[t]={value:n,unit:r}}setMetadata(t){this._metadata={...this._metadata,...t}}end(t){let n=Ot(t),r=this._finishTransaction(n);if(r)return this._hub.captureEvent(r)}toContext(){let t=super.toContext();return J({...t,name:this._name,trimEnd:this._trimEnd})}updateWithContext(t){return super.updateWithContext(t),this._name=t.name||"",this._trimEnd=t.trimEnd,this}getDynamicSamplingContext(){return Ve(this)}setHub(t){this._hub=t}getProfileId(){if(this._contexts!==void 0&&this._contexts.profile!==void 0)return this._contexts.profile.profile_id}_finishTransaction(t){if(this._endTime!==void 0)return;this._name||(I&&h.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>"),super.end(t);let n=this._hub.getClient();if(n&&n.emit&&n.emit("finishTransaction",this),this._sampled!==!0){I&&h.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),n&&n.recordDroppedEvent("sample_rate","transaction");return}let r=this.spanRecorder?this.spanRecorder.spans.filter(l=>l!==this&&P(l).timestamp):[];if(this._trimEnd&&r.length>0){let l=r.map(d=>P(d).timestamp).filter(Boolean);this._endTime=l.reduce((d,p)=>d>p?d:p)}let{scope:o,isolationScope:i}=nl(this),{metadata:s}=this,{source:a}=s,c={contexts:{...this._contexts,trace:on(this)},spans:r,start_timestamp:this._startTime,tags:this.tags,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{...s,capturedSpanScope:o,capturedSpanIsolationScope:i,...J({dynamicSamplingContext:Ve(this)})},_metrics_summary:Ko(this),...a&&{transaction_info:{source:a}}};return Object.keys(this._measurements).length>0&&(I&&h.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),c.measurements=this._measurements),I&&h.log(`[Tracing] Finishing ${this.op} transaction: ${this._name}.`),c}};var Ft={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},mh="finishReason",Fn=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"],Js=class extends Ln{constructor(t,n,r,o){super(o),this._pushActivity=t,this._popActivity=n,this.transactionSpanId=r}add(t){if(t.spanContext().spanId!==this.transactionSpanId){let n=t.end;t.end=(...r)=>(this._popActivity(t.spanContext().spanId),n.apply(t,r)),P(t).timestamp===void 0&&this._pushActivity(t.spanContext().spanId)}super.add(t)}},Hr=class extends Pn{constructor(t,n,r=Ft.idleTimeout,o=Ft.finalTimeout,i=Ft.heartbeatInterval,s=!1,a=!1){super(t,n),this._idleHub=n,this._idleTimeout=r,this._finalTimeout=o,this._heartbeatInterval=i,this._onScope=s,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=Fn[4],this._autoFinishAllowed=!a,s&&(I&&h.log(`Setting idle transaction on scope. Span ID: ${this.spanContext().spanId}`),n.getScope().setSpan(this)),a||this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=Fn[3],this.end())},this._finalTimeout)}end(t){let n=Ot(t);if(this._finished=!0,this.activities={},this.op==="ui.action.click"&&this.setAttribute(mh,this._finishReason),this.spanRecorder){I&&h.log("[Tracing] finishing IdleTransaction",new Date(n*1e3).toISOString(),this.op);for(let r of this._beforeFinishCallbacks)r(this,n);this.spanRecorder.spans=this.spanRecorder.spans.filter(r=>{if(r.spanContext().spanId===this.spanContext().spanId)return!0;P(r).timestamp||(r.setStatus("cancelled"),r.end(n),I&&h.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(r,void 0,2)));let{start_timestamp:o,timestamp:i}=P(r),s=o&&o<n,a=(this._finalTimeout+this._idleTimeout)/1e3,c=i&&o&&i-o<a;if(I){let u=JSON.stringify(r,void 0,2);s?c||h.log("[Tracing] discarding Span since it finished after Transaction final timeout",u):h.log("[Tracing] discarding Span since it happened after Transaction was finished",u)}return s&&c}),I&&h.log("[Tracing] flushing IdleTransaction")}else I&&h.log("[Tracing] No active IdleTransaction");if(this._onScope){let r=this._idleHub.getScope();r.getTransaction()===this&&r.setSpan(void 0)}return super.end(t)}registerBeforeFinishCallback(t){this._beforeFinishCallbacks.push(t)}initSpanRecorder(t){if(!this.spanRecorder){let n=o=>{this._finished||this._pushActivity(o)},r=o=>{this._finished||this._popActivity(o)};this.spanRecorder=new Js(n,r,this.spanContext().spanId,t),I&&h.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(t,{restartOnChildSpanChange:n}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=n===!1,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,Object.keys(this.activities).length===0&&this._idleTimeoutCanceledPermanently&&(this._finishReason=Fn[5],this.end(t)))}setFinishReason(t){this._finishReason=t}sendAutoFinishSignal(){this._autoFinishAllowed||(I&&h.log("[Tracing] Received finish signal for idle transaction."),this._restartIdleTimeout(),this._autoFinishAllowed=!0)}_restartIdleTimeout(t){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{!this._finished&&Object.keys(this.activities).length===0&&(this._finishReason=Fn[1],this.end(t))},this._idleTimeout)}_pushActivity(t){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),I&&h.log(`[Tracing] pushActivity: ${t}`),this.activities[t]=!0,I&&h.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(t){if(this.activities[t]&&(I&&h.log(`[Tracing] popActivity ${t}`),delete this.activities[t],I&&h.log("[Tracing] new activities count",Object.keys(this.activities).length)),Object.keys(this.activities).length===0){let n=Ie();this._idleTimeoutCanceledPermanently?this._autoFinishAllowed&&(this._finishReason=Fn[5],this.end(n)):this._restartIdleTimeout(n+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;let t=Object.keys(this.activities).join("");t===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=t,this._heartbeatCounter>=3?this._autoFinishAllowed&&(I&&h.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=Fn[0],this.end()):this._pingHeartbeat()}_pingHeartbeat(){I&&h.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat()},this._heartbeatInterval)}};f();function Xs(e,t,n){if(!Ke(t))return e.sampled=!1,e;if(e.sampled!==void 0)return e.setAttribute(pt,Number(e.sampled)),e;let r;return typeof t.tracesSampler=="function"?(r=t.tracesSampler(n),e.setAttribute(pt,Number(r))):n.parentSampled!==void 0?r=n.parentSampled:typeof t.tracesSampleRate<"u"?(r=t.tracesSampleRate,e.setAttribute(pt,Number(r))):(r=1,e.setAttribute(pt,r)),Jo(r)?r?(e.sampled=Math.random()<r,e.sampled?(I&&h.log(`[Tracing] starting ${e.op} transaction - ${P(e).description}`),e):(I&&h.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(r)})`),e)):(I&&h.log(`[Tracing] Discarding transaction because ${typeof t.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),e.sampled=!1,e):(I&&h.warn("[Tracing] Discarding transaction because of invalid sample rate."),e.sampled=!1,e)}function Jo(e){return ar(e)||!(typeof e=="number"||typeof e=="boolean")?(I&&h.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e<0||e>1?(I&&h.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function hh(){let t=this.getScope().getSpan();return t?{"sentry-trace":vt(t)}:{}}function gh(e,t){let n=this.getClient(),r=n&&n.getOptions()||{},o=r.instrumenter||"sentry",i=e.instrumenter||"sentry";o!==i&&(I&&h.error(`A transaction was started with instrumenter=\`${i}\`, but the SDK is configured with the \`${o}\` instrumenter.
|
|
13
|
-
The transaction will not be sampled. Please use the ${o} instrumentation to start transactions.`),e.sampled=!1);let s=new Pn(e,this);return s=Xs(s,r,{name:e.name,parentSampled:e.parentSampled,transactionContext:e,attributes:{...e.data,...e.attributes},...t}),s.isRecording()&&s.initSpanRecorder(r._experiments&&r._experiments.maxSpans),n&&n.emit&&n.emit("startTransaction",s),s}function pn(e,t,n,r,o,i,s,a=!1){let c=e.getClient(),u=c&&c.getOptions()||{},l=new Hr(t,e,n,r,s,o,a);return l=Xs(l,u,{name:t.name,parentSampled:t.parentSampled,transactionContext:t,attributes:{...t.data,...t.attributes},...i}),l.isRecording()&&l.initSpanRecorder(u._experiments&&u._experiments.maxSpans),c&&c.emit&&c.emit("startTransaction",l),l}function Bn(){let e=Dt();e.__SENTRY__&&(e.__SENTRY__.extensions=e.__SENTRY__.extensions||{},e.__SENTRY__.extensions.startTransaction||(e.__SENTRY__.extensions.startTransaction=gh),e.__SENTRY__.extensions.traceHeaders||(e.__SENTRY__.extensions.traceHeaders=hh),Vu())}f();function Xo(e,t,n){let r=ye();r&&r.setMeasurement(e,t,n)}f();function _h(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function Zs(e,t,n,r){let o=On(n),i={sent_at:new Date().toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:Te(t)}},s="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return he(i,[s])}function Ur(e,t,n,r){let o=On(n),i=e.type&&e.type!=="replay_event"?e.type:"event";_h(e,n&&n.sdk);let s=Ar(e,o,r,t);return delete e.sdkProcessingMetadata,he(s,[[{type:i},e]])}f();var yh="7";function il(e){let t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function Sh(e){return`${il(e)}${e.projectId}/envelope/`}function Eh(e,t){return gs({sentry_key:e.publicKey,sentry_version:yh,...t&&{sentry_client:`${t.name}/${t.version}`}})}function $r(e,t={}){let n=typeof t=="string"?t:t.tunnel,r=typeof t=="string"||!t._metadata?void 0:t._metadata.sdk;return n||`${Sh(e)}?${Eh(e,r)}`}function Qs(e,t){let n=hr(e);if(!n)return"";let r=`${il(n)}embed/error-page/`,o=`dsn=${Te(n)}`;for(let i in t)if(i!=="dsn"&&i!=="onClose")if(i==="user"){let s=t.user;if(!s)continue;s.name&&(o+=`&name=${encodeURIComponent(s.name)}`),s.email&&(o+=`&email=${encodeURIComponent(s.email)}`)}else o+=`&${encodeURIComponent(i)}=${encodeURIComponent(t[i])}`;return`${r}?${o}`}f();f();var sl=[];function bh(e){let t={};return e.forEach(n=>{let{name:r}=n,o=t[r];o&&!o.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.keys(t).map(n=>t[n])}function ea(e){let t=e.defaultIntegrations||[],n=e.integrations;t.forEach(s=>{s.isDefaultInstance=!0});let r;Array.isArray(n)?r=[...t,...n]:typeof n=="function"?r=_r(n(t)):r=t;let o=bh(r),i=Th(o,s=>s.name==="Debug");if(i!==-1){let[s]=o.splice(i,1);o.push(s)}return o}function al(e,t){let n={};return t.forEach(r=>{r&&na(e,r,n)}),n}function ta(e,t){for(let n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function na(e,t,n){if(n[t.name]){I&&h.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,sl.indexOf(t.name)===-1&&(t.setupOnce(Bo,W),sl.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),e.on&&typeof t.preprocessEvent=="function"){let r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(o,i)=>r(o,i,e))}if(e.addEventProcessor&&typeof t.processEvent=="function"){let r=t.processEvent.bind(t),o=Object.assign((i,s)=>r(i,s,e),{id:t.name});e.addEventProcessor(o)}I&&h.log(`Integration installed: ${t.name}`)}function cl(e){let t=x();if(!t||!t.addIntegration){I&&h.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}function Th(e,t){for(let n=0;n<e.length;n++)if(t(e[n])===!0)return n;return-1}function D(e,t){return Object.assign(function(...r){return t(...r)},{id:e})}f();f();function ul(e,t,n,r){let o=Object.entries(J(r)).sort((i,s)=>i[0].localeCompare(s[0]));return`${e}${t}${n}${o}`}function ll(e){let t=0;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t=(t<<5)-t+r,t&=t}return t>>>0}function dl(e){let t="";for(let n of e){let r=Object.entries(n.tags),o=r.length>0?`|#${r.map(([i,s])=>`${i}:${s}`).join(",")}`:"";t+=`${n.name}@${n.unit}:${n.metric}|${n.metricType}${o}|T${n.timestamp}
|
|
14
|
-
`}return t}function fl(e){return e.replace(/[^\w]+/gi,"_")}function pl(e){return e.replace(/[^\w\-.]+/gi,"_")}function Ih(e){return e.replace(/[^\w\-./]+/gi,"")}var vh=[[`
|
|
15
|
-
`,"\\n"],["\r","\\r"],[" ","\\t"],["\\","\\\\"],["|","\\u{7c}"],[",","\\u{2c}"]];function xh(e){for(let[t,n]of vh)if(e===t)return n;return e}function wh(e){return[...e].reduce((t,n)=>t+xh(n),"")}function ml(e){let t={};for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){let r=Ih(n);t[r]=wh(String(e[n]))}return t}function hl(e,t,n,r){let o={sent_at:new Date().toISOString()};n&&n.sdk&&(o.sdk={name:n.sdk.name,version:n.sdk.version}),r&&t&&(o.dsn=Te(t));let i=Ch(e);return he(o,[i])}function Ch(e){let t=dl(e);return[{type:"statsd",length:t.length},t]}var gl="Not capturing exception because it's already been captured.",Gr=class{constructor(t){if(this._options=t,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=hr(t.dsn):I&&h.warn("No DSN provided, client will not send events."),this._dsn){let n=$r(this._dsn,t);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}}captureException(t,n,r){if(wo(t)){I&&h.log(gl);return}let o=n&&n.event_id;return this._process(this.eventFromException(t,n).then(i=>this._captureEvent(i,n,r)).then(i=>{o=i})),o}captureMessage(t,n,r,o){let i=r&&r.event_id,s=vn(t)?t:String(t),a=Vt(t)?this.eventFromMessage(s,n,r):this.eventFromException(t,r);return this._process(a.then(c=>this._captureEvent(c,r,o)).then(c=>{i=c})),i}captureEvent(t,n,r){if(n&&n.originalException&&wo(n.originalException)){I&&h.log(gl);return}let o=n&&n.event_id,s=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,n,s||r).then(a=>{o=a})),o}captureSession(t){typeof t.release!="string"?I&&h.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),ot(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){let n=this._transport;return n?(this.metricsAggregator&&this.metricsAggregator.flush(),this._isClientDoneProcessing(t).then(r=>n.flush(t).then(o=>r&&o))):tt(!0)}close(t){return this.flush(t).then(n=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}setupIntegrations(t){(t&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&this._setupIntegrations()}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationById(t){return this.getIntegrationByName(t)}getIntegrationByName(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch{return I&&h.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}addIntegration(t){let n=this._integrations[t.name];na(this,t,this._integrations),n||ta(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=Ur(t,this._dsn,this._options._metadata,this._options.tunnel);for(let i of n.attachments||[])r=Ls(r,Bs(i,this._options.transportOptions&&this._options.transportOptions.textEncoder));let o=this._sendEnvelope(r);o&&o.then(i=>this.emit("afterSendEvent",t,i),null)}sendSession(t){let n=Zs(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}recordDroppedEvent(t,n,r){if(this._options.sendClientReports){let o=`${t}:${n}`;I&&h.log(`Adding outcome: "${o}"`),this._outcomes[o]=this._outcomes[o]+1||1}}captureAggregateMetrics(t){I&&h.log(`Flushing aggregated metrics, number of metrics: ${t.length}`);let n=hl(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}on(t,n){this._hooks[t]||(this._hooks[t]=[]),this._hooks[t].push(n)}emit(t,...n){this._hooks[t]&&this._hooks[t].forEach(r=>r(...n))}_setupIntegrations(){let{integrations:t}=this._options;this._integrations=al(this,t),ta(this,t),this._integrationsInitialized=!0}_updateSessionFromEvent(t,n){let r=!1,o=!1,i=n.exception&&n.exception.values;if(i){o=!0;for(let c of i){let u=c.mechanism;if(u&&u.handled===!1){r=!0;break}}}let s=t.status==="ok";(s&&t.errors===0||s&&r)&&(ot(t,{...r&&{status:"crashed"},errors:t.errors||Number(o||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new $e(n=>{let r=0,o=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=o,t&&r>=t&&(clearInterval(i),n(!1)))},o)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,o=ge()){let i=this.getOptions(),s=Object.keys(this._integrations);return!n.integrations&&s.length>0&&(n.integrations=s),this.emit("preprocessEvent",t,n),sn(i,t,n,r,this,o).then(a=>{if(a===null)return a;let c={...o.getPropagationContext(),...r?r.getPropagationContext():void 0};if(!(a.contexts&&a.contexts.trace)&&c){let{traceId:l,spanId:d,parentSpanId:p,dsc:m}=c;a.contexts={trace:{trace_id:l,span_id:d,parent_span_id:p},...a.contexts};let g=m||Nt(l,this,r);a.sdkProcessingMetadata={dynamicSamplingContext:g,...a.sdkProcessingMetadata}}return a})}_captureEvent(t,n={},r){return this._processEvent(t,n,r).then(o=>o.event_id,o=>{if(I){let i=o;i.logLevel==="log"?h.log(i.message):h.warn(i)}})}_processEvent(t,n,r){let o=this.getOptions(),{sampleRate:i}=o,s=yl(t),a=_l(t),c=t.type||"error",u=`before send for type \`${c}\``;if(a&&typeof i=="number"&&Math.random()>i)return this.recordDroppedEvent("sample_rate","error",t),en(new Ee(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));let l=c==="replay_event"?"replay":c,p=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,n,r,p).then(m=>{if(m===null)throw this.recordDroppedEvent("event_processor",l,t),new Ee("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return m;let E=kh(o,m,n);return Rh(E,u)}).then(m=>{if(m===null)throw this.recordDroppedEvent("before_send",l,t),new Ee(`${u} returned \`null\`, will not send event.`,"log");let g=r&&r.getSession();!s&&g&&this._updateSessionFromEvent(g,m);let E=m.transaction_info;if(s&&E&&m.transaction!==t.transaction){let T="custom";m.transaction_info={...E,source:T}}return this.sendEvent(m,n),m}).then(null,m=>{throw m instanceof Ee?m:(this.captureException(m,{data:{__sentry__:!0},originalException:m}),new Ee(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
16
|
-
Reason: ${m}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)return this._transport.send(t).then(null,n=>{I&&h.error("Error while sending event:",n)});I&&h.error("Transport disabled")}_clearOutcomes(){let t=this._outcomes;return this._outcomes={},Object.keys(t).map(n=>{let[r,o]=n.split(":");return{reason:r,category:o,quantity:t[n]}})}};function Rh(e,t){let n=`${t} must return \`null\` or a valid event.`;if(ze(e))return e.then(r=>{if(!Fe(r)&&r!==null)throw new Ee(n);return r},r=>{throw new Ee(`${t} rejected with ${r}`)});if(!Fe(e)&&e!==null)throw new Ee(n);return e}function kh(e,t,n){let{beforeSend:r,beforeSendTransaction:o}=e;return _l(t)&&r?r(t,n):yl(t)&&o?o(t,n):t}function _l(e){return e.type===void 0}function yl(e){return e.type==="transaction"}function Zo(e){let t=x();!t||!t.addEventProcessor||t.addEventProcessor(e)}f();var Qo="c",ei="g",Hn="s",ti="d";f();var ra=class{constructor(t){this._value=t}get weight(){return 1}add(t){this._value+=t}toString(){return`${this._value}`}},oa=class{constructor(t){this._last=t,this._min=t,this._max=t,this._sum=t,this._count=1}get weight(){return 5}add(t){this._last=t,t<this._min&&(this._min=t),t>this._max&&(this._max=t),this._sum+=t,this._count++}toString(){return`${this._last}:${this._min}:${this._max}:${this._sum}:${this._count}`}},ia=class{constructor(t){this._value=[t]}get weight(){return this._value.length}add(t){this._value.push(t)}toString(){return this._value.join(":")}},sa=class{constructor(t){this.first=t,this._value=new Set([t])}get weight(){return this._value.size}add(t){this._value.add(t)}toString(){return Array.from(this._value).map(t=>typeof t=="string"?ll(t):t).join(":")}},Sl={[Qo]:ra,[ei]:oa,[ti]:ia,[Hn]:sa};f();function aa(e,t){t.debug===!0&&(I?h.enable():Re(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),q().update(t.initialScope);let r=new e(t);ca(r),Ah(r)}function ca(e){let n=W().getStackTop();n.client=e,n.scope.setClient(e)}function Ah(e){e.init?e.init():e.setupIntegrations&&e.setupIntegrations()}f();var Oh=30;function Un(e,t,n=As(e.bufferSize||Oh)){let r={},o=s=>n.drain(s);function i(s){let a=[];if(nt(s,(d,p)=>{let m=Po(p);if(Or(r,m)){let g=El(d,p);e.recordDroppedEvent("ratelimit_backoff",m,g)}else a.push(d)}),a.length===0)return tt();let c=he(s[0],a),u=d=>{nt(c,(p,m)=>{let g=El(p,m);e.recordDroppedEvent(d,Po(m),g)})},l=()=>t({body:kr(c,e.textEncoder)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&I&&h.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=Mr(r,d),d),d=>{throw u("network_error"),d});return n.add(l).then(d=>d,d=>{if(d instanceof Ee)return I&&h.error("Skipped sending event because buffer is full."),u("queue_overflow"),tt();throw d})}return i.__sentry__baseTransport__=!0,{send:i,flush:o}}function El(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}f();var Mh=100,bl=5e3,Nh=36e5;function ua(e,t){I&&h.info(`[Offline]: ${e}`,t)}function la(e){return t=>{let n=e(t),r=t.createStore?t.createStore(t):void 0,o=bl,i;function s(l,d,p){return Ps(l,["replay_event","replay_recording","client_report"])?!1:t.shouldStore?t.shouldStore(l,d,p):!0}function a(l){r&&(i&&clearTimeout(i),i=setTimeout(async()=>{i=void 0;let d=await r.pop();d&&(ua("Attempting to send previously queued event"),u(d).catch(p=>{ua("Failed to retry sending",p)}))},l),typeof i!="number"&&i.unref&&i.unref())}function c(){i||(a(o),o=Math.min(o*2,Nh))}async function u(l){try{let d=await n.send(l),p=Mh;if(d){if(d.headers&&d.headers["retry-after"])p=Fo(d.headers["retry-after"]);else if((d.statusCode||0)>=400)return d}return a(p),o=bl,d}catch(d){if(r&&await s(l,d,o))return await r.insert(l),c(),ua("Error sending. Event queued",d),{};throw d}}return t.flushAtStartup&&c(),{send:u,flush:l=>n.flush(l)}}}f();function Tl(e,t){let n;return nt(e,(r,o)=>(t.includes(o)&&(n=Array.isArray(r)?r[1]:void 0),!!n)),n}function Dh(e,t){return n=>{let r=e(n);return{...r,send:async o=>{let i=Tl(o,["event","transaction","profile","replay_event"]);return i&&(i.release=t),r.send(o)}}}}function Lh(e,t){return he(t?{...e[0],dsn:t}:e[0],e[1])}function Il(e,t){return n=>{let r=e(n),o=new Map;function i(c,u){let l=u?`${c}:${u}`:c,d=o.get(l);if(!d){let p=bo(c);if(!p)return;let m=$r(p,n.tunnel);d=u?Dh(e,u)({...n,url:m}):e({...n,url:m}),o.set(l,d)}return[c,d]}async function s(c){function u(p){let m=p&&p.length?p:["event"];return Tl(c,m)}let l=t({envelope:c,getEvent:u}).map(p=>typeof p=="string"?i(p,void 0):i(p.dsn,p.release)).filter(p=>!!p);return l.length===0&&l.push(["",r]),(await Promise.all(l.map(([p,m])=>m.send(Lh(c,p)))))[0]}async function a(c){let u=[await r.flush(c)];for(let[,l]of o)u.push(await l.flush(c));return u.every(l=>l)}return{send:s,flush:a}}}f();function da(e,t){let n={sent_at:new Date().toISOString()};t&&(n.dsn=Te(t));let r=e.map(Ph);return he(n,r)}function Ph(e){return[{type:"span"},e]}f();function Wr(e,t){let n=t&&Hh(t)?t.getClient():t,r=n&&n.getDsn(),o=n&&n.getOptions().tunnel;return Bh(e,r)||Fh(e,o)}function Fh(e,t){return t?vl(e)===vl(t):!1}function Bh(e,t){return t?e.includes(t.host):!1}function vl(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function Hh(e){return e.getClient!==void 0}f();function xl(e,...t){let n=new String(String.raw(e,...t));return n.__sentry_template_string__=e.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),n.__sentry_template_values__=t,n}f();function fa(e,t,n=[t],r="npm"){let o=e._metadata||{};o.sdk||(o.sdk={name:`sentry.javascript.${t}`,packages:n.map(i=>({name:`${r}:@sentry/${i}`,version:ln})),version:ln}),e._metadata=o}f();f();var Cl=new Map,wl=new Set;function Uh(e){if(C._sentryModuleMetadata)for(let t of Object.keys(C._sentryModuleMetadata)){let n=C._sentryModuleMetadata[t];if(wl.has(t))continue;wl.add(t);let r=e(t);for(let o of r.reverse())if(o.filename){Cl.set(o.filename,n);break}}}function $h(e,t){return Uh(e),Cl.get(t)}function Rl(e,t){try{t.exception.values.forEach(n=>{if(n.stacktrace)for(let r of n.stacktrace.frames||[]){if(!r.filename)continue;let o=$h(e,r.filename);o&&(r.module_metadata=o)}})}catch{}}function kl(e){try{e.exception.values.forEach(t=>{if(t.stacktrace)for(let n of t.stacktrace.frames||[])delete n.module_metadata})}catch{}}var Al="ModuleMetadata",Gh=()=>({name:Al,setupOnce(){},setup(e){typeof e.on=="function"&&e.on("beforeEnvelope",t=>{nt(t,(n,r)=>{if(r==="event"){let o=Array.isArray(n)?n[1]:void 0;o&&(kl(o),n[1]=o)}})})},processEvent(e,t,n){let r=n.getOptions().stackParser;return Rl(r,e),e}}),pa=Gh,Ol=D(Al,pa);f();var Wh=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/],zh=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],Ml="InboundFilters",jh=(e={})=>({name:Ml,setupOnce(){},processEvent(t,n,r){let o=r.getOptions(),i=qh(e,o);return Yh(t,i)?null:t}}),zr=jh,ri=D(Ml,zr);function qh(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Wh],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:zh],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function Yh(e,t){return t.ignoreInternal&&Qh(e)?(I&&h.warn(`Event dropped due to being internal Sentry Error.
|
|
17
|
-
Event: ${Qe(e)}`),!0):Vh(e,t.ignoreErrors)?(I&&h.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
18
|
-
Event: ${Qe(e)}`),!0):Kh(e,t.ignoreTransactions)?(I&&h.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
19
|
-
Event: ${Qe(e)}`),!0):Jh(e,t.denyUrls)?(I&&h.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
20
|
-
Event: ${Qe(e)}.
|
|
21
|
-
Url: ${ni(e)}`),!0):Xh(e,t.allowUrls)?!1:(I&&h.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
22
|
-
Event: ${Qe(e)}.
|
|
23
|
-
Url: ${ni(e)}`),!0)}function Vh(e,t){return e.type||!t||!t.length?!1:Zh(e).some(n=>dt(n,t))}function Kh(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;let n=e.transaction;return n?dt(n,t):!1}function Jh(e,t){if(!t||!t.length)return!1;let n=ni(e);return n?dt(n,t):!1}function Xh(e,t){if(!t||!t.length)return!0;let n=ni(e);return n?dt(n,t):!0}function Zh(e){let t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),I&&t.length===0&&h.error(`Could not extract message for event ${Qe(e)}`),t}function Qh(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function eg(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function ni(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?eg(t):null}catch{return I&&h.error(`Cannot extract url for event ${Qe(e)}`),null}}f();var Nl,Ll="FunctionToString",Dl=new WeakMap,tg=()=>({name:Ll,setupOnce(){Nl=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=Qt(this),n=Dl.has(x())&&t!==void 0?t:this;return Nl.apply(n,e)}}catch{}},setup(e){Dl.set(e,!0)}}),jr=tg,oi=D(Ll,jr);f();var ng="cause",rg=5,Pl="LinkedErrors",og=(e={})=>{let t=e.limit||rg,n=e.key||ng;return{name:Pl,setupOnce(){},preprocessEvent(r,o,i){let s=i.getOptions();lr(Us,s.stackParser,s.maxValueLength,n,t,r,o)}}},ig=og,Fl=D(Pl,ig);var ma={};Xc(ma,{FunctionToString:()=>oi,InboundFilters:()=>ri,LinkedErrors:()=>Fl});f();f();f();f();var ii=class{constructor(t){this._client=t,this._buckets=new Map,this._interval=setInterval(()=>this.flush(),5e3)}add(t,n,r,o="none",i={},s=Ie()){let a=Math.floor(s),c=pl(n),u=ml(i),l=fl(o),d=ul(t,c,l,u),p=this._buckets.get(d),m=p&&t===Hn?p.metric.weight:0;p?(p.metric.add(r),p.timestamp<a&&(p.timestamp=a)):(p={metric:new Sl[t](r),timestamp:a,metricType:t,name:c,unit:l,tags:u},this._buckets.set(d,p));let g=typeof r=="string"?p.metric.weight-m:r;ol(t,c,g,l,i,d)}flush(){if(this._buckets.size!==0){if(this._client.captureAggregateMetrics){let t=Array.from(this._buckets).map(([,n])=>n);this._client.captureAggregateMetrics(t)}this._buckets.clear()}}close(){clearInterval(this._interval),this.flush()}};var Bl="MetricsAggregator",ag=()=>({name:Bl,setupOnce(){},setup(e){e.metricsAggregator=new ii(e)}}),ha=ag,Hl=D(Bl,ha);function si(e,t,n,r={}){let o=x(),i=q();if(o){if(!o.metricsAggregator){I&&h.warn("No metrics aggregator enabled. Please add the MetricsAggregator integration to use metrics APIs");return}let{unit:s,tags:a,timestamp:c}=r,{release:u,environment:l}=o.getOptions(),d=i.getTransaction(),p={};u&&(p.release=u),l&&(p.environment=l),d&&(p.transaction=P(d).description||""),I&&h.log(`Adding value of ${n} to ${e} metric ${t}`),o.metricsAggregator.add(e,t,n,s,{...p,...a},c)}}function cg(e,t=1,n){si(Qo,e,t,n)}function ug(e,t,n){si(ti,e,t,n)}function lg(e,t,n){si(Hn,e,t,n)}function dg(e,t,n){si(ei,e,t,n)}var Ul={increment:cg,distribution:ug,set:lg,gauge:dg,MetricsAggregator:Hl,metricsAggregatorIntegration:ha};var $l=ma;f();f();f();var H=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;f();f();f();var R=C;function ai(){R.document?R.document.addEventListener("visibilitychange",()=>{let e=ye();if(R.document.hidden&&e){let t="cancelled",{op:n,status:r}=P(e);H&&h.log(`[Tracing] Transaction: ${t} -> since tab moved to the background, op: ${n}`),r||e.setStatus(t),e.setTag("visibilitychange","document.hidden"),e.end()}}):H&&h.warn("[Tracing] Could not set up background tab detection due to lack of global document")}f();f();f();var mt=(e,t,n)=>{let r,o;return i=>{t.value>=0&&(i||n)&&(o=t.value-(r||0),(o||r===void 0)&&(r=t.value,t.delta=o,e(t)))}};f();f();var Gl=()=>`v3-${Date.now()}-${Math.floor(Math.random()*8999999999999)+1e12}`;f();f();var fg=()=>{let e=R.performance.timing,t=R.performance.navigation.type,n={entryType:"navigation",startTime:0,type:t==2?"back_forward":t===1?"reload":"navigate"};for(let r in e)r!=="navigationStart"&&r!=="toJSON"&&(n[r]=Math.max(e[r]-e.navigationStart,0));return n},Bt=()=>R.__WEB_VITALS_POLYFILL__?R.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||fg()):R.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];var $n=()=>{let e=Bt();return e&&e.activationStart||0};var ht=(e,t)=>{let n=Bt(),r="navigate";return n&&(R.document&&R.document.prerendering||$n()>0?r="prerender":r=n.type.replace(/_/g,"-")),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:Gl(),navigationType:r}};f();var Je=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let r=new PerformanceObserver(o=>{t(o.getEntries())});return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}};f();var gt=(e,t)=>{let n=r=>{(r.type==="pagehide"||R.document.visibilityState==="hidden")&&(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};R.document&&(addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0))};var Wl=(e,t={})=>{let n=ht("CLS",0),r,o=0,i=[],s=c=>{c.forEach(u=>{if(!u.hadRecentInput){let l=i[0],d=i[i.length-1];o&&i.length!==0&&u.startTime-d.startTime<1e3&&u.startTime-l.startTime<5e3?(o+=u.value,i.push(u)):(o=u.value,i=[u]),o>n.value&&(n.value=o,n.entries=i,r&&r())}})},a=Je("layout-shift",s);if(a){r=mt(e,n,t.reportAllChanges);let c=()=>{s(a.takeRecords()),r(!0)};return gt(c),c}};f();f();var ci=-1,pg=()=>{R.document&&R.document.visibilityState&&(ci=R.document.visibilityState==="hidden"&&!R.document.prerendering?0:1/0)},mg=()=>{gt(({timeStamp:e})=>{ci=e},!0)},Gn=()=>(ci<0&&(pg(),mg()),{get firstHiddenTime(){return ci}});var zl=e=>{let t=Gn(),n=ht("FID"),r,o=a=>{a.startTime<t.firstHiddenTime&&(n.value=a.processingStart-a.startTime,n.entries.push(a),r(!0))},i=a=>{a.forEach(o)},s=Je("first-input",i);r=mt(e,n),s&>(()=>{i(s.takeRecords()),s.disconnect()},!0)};f();f();var jl=0,ga=1/0,ui=0,hg=e=>{e.forEach(t=>{t.interactionId&&(ga=Math.min(ga,t.interactionId),ui=Math.max(ui,t.interactionId),jl=ui?(ui-ga)/7+1:0)})},_a,ql=()=>_a?jl:performance.interactionCount||0,Yl=()=>{"interactionCount"in performance||_a||(_a=Je("event",hg,{type:"event",buffered:!0,durationThreshold:0}))};var Jl=()=>ql(),Vl=10,wt=[],ya={},Kl=e=>{let t=wt[wt.length-1],n=ya[e.interactionId];if(n||wt.length<Vl||e.duration>t.latency){if(n)n.entries.push(e),n.latency=Math.max(n.latency,e.duration);else{let r={id:e.interactionId,latency:e.duration,entries:[e]};ya[r.id]=r,wt.push(r)}wt.sort((r,o)=>o.latency-r.latency),wt.splice(Vl).forEach(r=>{delete ya[r.id]})}},gg=()=>{let e=Math.min(wt.length-1,Math.floor(Jl()/50));return wt[e]},Xl=(e,t)=>{t=t||{},Yl();let n=ht("INP"),r,o=s=>{s.forEach(c=>{c.interactionId&&Kl(c),c.entryType==="first-input"&&!wt.some(l=>l.entries.some(d=>c.duration===d.duration&&c.startTime===d.startTime))&&Kl(c)});let a=gg();a&&a.latency!==n.value&&(n.value=a.latency,n.entries=a.entries,r())},i=Je("event",o,{durationThreshold:t.durationThreshold||40});r=mt(e,n,t.reportAllChanges),i&&(i.observe({type:"first-input",buffered:!0}),gt(()=>{o(i.takeRecords()),n.value<0&&Jl()>0&&(n.value=0,n.entries=[]),r(!0)}))};f();var Zl={},Ql=e=>{let t=Gn(),n=ht("LCP"),r,o=s=>{let a=s[s.length-1];if(a){let c=Math.max(a.startTime-$n(),0);c<t.firstHiddenTime&&(n.value=c,n.entries=[a],r())}},i=Je("largest-contentful-paint",o);if(i){r=mt(e,n);let s=()=>{Zl[n.id]||(o(i.takeRecords()),i.disconnect(),Zl[n.id]=!0,r(!0))};return["keydown","click"].forEach(a=>{R.document&&addEventListener(a,s,{once:!0,capture:!0})}),gt(s,!0),s}};f();var Sa=e=>{R.document&&(R.document.prerendering?addEventListener("prerenderingchange",()=>Sa(e),!0):R.document.readyState!=="complete"?addEventListener("load",()=>Sa(e),!0):setTimeout(e,0))},ed=(e,t)=>{t=t||{};let n=ht("TTFB"),r=mt(e,n,t.reportAllChanges);Sa(()=>{let o=Bt();if(o){if(n.value=Math.max(o.responseStart-$n(),0),n.value<0||n.value>performance.now())return;n.entries=[o],r(!0)}})};var qr={},li={},td,nd,rd,od,id;function Ea(e,t=!1){return Vr("cls",e,_g,td,t)}function Yr(e,t=!1){return Vr("lcp",e,Sg,rd,t)}function sd(e){return Vr("ttfb",e,Eg,od)}function ba(e){return Vr("fid",e,yg,nd)}function ad(e){return Vr("inp",e,bg,id)}function Le(e,t){return cd(e,t),li[e]||(Tg(e),li[e]=!0),ud(e,t)}function Wn(e,t){let n=qr[e];if(!(!n||!n.length))for(let r of n)try{r(t)}catch(o){H&&h.error(`Error while triggering instrumentation handler.
|
|
24
|
-
Type: ${e}
|
|
25
|
-
Name: ${Ae(r)}
|
|
26
|
-
Error:`,o)}}function _g(){return Wl(e=>{Wn("cls",{metric:e}),td=e},{reportAllChanges:!0})}function yg(){return zl(e=>{Wn("fid",{metric:e}),nd=e})}function Sg(){return Ql(e=>{Wn("lcp",{metric:e}),rd=e})}function Eg(){return ed(e=>{Wn("ttfb",{metric:e}),od=e})}function bg(){return Xl(e=>{Wn("inp",{metric:e}),id=e})}function Vr(e,t,n,r,o=!1){cd(e,t);let i;return li[e]||(i=n(),li[e]=!0),r&&t({metric:r}),ud(e,t,o?i:void 0)}function Tg(e){let t={};e==="event"&&(t.durationThreshold=0),Je(e,n=>{Wn(e,{entries:n})},t)}function cd(e,t){qr[e]=qr[e]||[],qr[e].push(t)}function ud(e,t,n){return()=>{n&&n();let r=qr[e];if(!r)return;let o=r.indexOf(t);o!==-1&&r.splice(o,1)}}f();f();function di(e){return typeof e=="number"&&isFinite(e)}function mn(e,{startTimestamp:t,...n}){return t&&e.startTimestamp>t&&(e.startTimestamp=t),e.startChild({startTimestamp:t,...n})}var Ig=2147483647;function fe(e){return e/1e3}function Ia(){return R&&R.addEventListener&&R.performance}var ld=0,ce={},_t,Kr;function pi(){let e=Ia();if(e&&re){e.mark&&R.performance.mark("sentry-tracing-init");let t=wg(),n=vg(),r=xg(),o=Cg();return()=>{t(),n(),r(),o()}}return()=>{}}function mi(){Le("longtask",({entries:e})=>{for(let t of e){let n=ye();if(!n)return;let r=fe(re+t.startTime),o=fe(t.duration);n.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:r,endTimestamp:r+o})}})}function hi(){Le("event",({entries:e})=>{for(let t of e){let n=ye();if(!n)return;if(t.name==="click"){let r=fe(re+t.startTime),o=fe(t.duration),i={description:He(t.target),op:`ui.interaction.${t.name}`,origin:"auto.ui.browser.metrics",startTimestamp:r,endTimestamp:r+o},s=mr(t.target);s&&(i.attributes={"ui.component_name":s}),n.startChild(i)}}})}function gi(e,t){if(Ia()&&re){let r=Rg(e,t);return()=>{r()}}return()=>{}}function vg(){return Ea(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(H&&h.log("[Measurements] Adding CLS"),ce.cls={value:e.value,unit:""},Kr=t)},!0)}function xg(){return Yr(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(H&&h.log("[Measurements] Adding LCP"),ce.lcp={value:e.value,unit:"millisecond"},_t=t)},!0)}function wg(){return ba(({metric:e})=>{let t=e.entries[e.entries.length-1];if(!t)return;let n=fe(re),r=fe(t.startTime);H&&h.log("[Measurements] Adding FID"),ce.fid={value:e.value,unit:"millisecond"},ce["mark.fid"]={value:n+r,unit:"second"}})}function Cg(){return sd(({metric:e})=>{e.entries[e.entries.length-1]&&(H&&h.log("[Measurements] Adding TTFB"),ce.ttfb={value:e.value,unit:"millisecond"})})}var dd={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function Rg(e,t){return ad(({metric:n})=>{if(n.value===void 0)return;let r=n.entries.find(v=>v.duration===n.value&&dd[v.name]!==void 0),o=x();if(!r||!o)return;let i=dd[r.name],s=o.getOptions(),a=fe(re+r.startTime),c=fe(n.value),u=r.interactionId!==void 0?e[r.interactionId]:void 0;if(u===void 0)return;let{routeName:l,parentContext:d,activeTransaction:p,user:m,replayId:g}=u,E=m!==void 0?m.email||m.id||m.ip_address:void 0,T=p!==void 0?p.getProfileId():void 0,S=new fn({startTimestamp:a,endTimestamp:a+c,op:`ui.interaction.${i}`,name:He(r.target),attributes:{release:s.release,environment:s.environment,transaction:l,...E!==void 0&&E!==""?{user:E}:{},...T!==void 0?{profile_id:T}:{},...g!==void 0?{replay_id:g}:{}},exclusiveTime:n.value,measurements:{inp:{value:n.value,unit:"millisecond"}}}),b=Pg(d,s,t);if(b&&Math.random()<b){let v=S?da([S],o.getDsn()):void 0,O=o&&o.getTransport();O&&v&&O.send(v).then(null,L=>{H&&h.error("Error while sending interaction:",L)});return}})}function _i(e){let t=Ia();if(!t||!R.performance.getEntries||!re)return;H&&h.log("[Tracing] Adding & adjusting spans using Performance API");let n=fe(re),r=t.getEntries(),{op:o,start_timestamp:i}=P(e);if(r.slice(ld).forEach(s=>{let a=fe(s.startTime),c=fe(s.duration);if(!(e.op==="navigation"&&i&&n+a<i))switch(s.entryType){case"navigation":{Ag(e,s,n);break}case"mark":case"paint":case"measure":{kg(e,s,a,c,n);let u=Gn(),l=s.startTime<u.firstHiddenTime;s.name==="first-paint"&&l&&(H&&h.log("[Measurements] Adding FP"),ce.fp={value:s.startTime,unit:"millisecond"}),s.name==="first-contentful-paint"&&l&&(H&&h.log("[Measurements] Adding FCP"),ce.fcp={value:s.startTime,unit:"millisecond"});break}case"resource":{Mg(e,s,s.name,a,c,n);break}}}),ld=Math.max(r.length-1,0),Ng(e),o==="pageload"){Lg(ce),["fcp","fp","lcp"].forEach(a=>{if(!ce[a]||!i||n>=i)return;let c=ce[a].value,u=n+fe(c),l=Math.abs((u-i)*1e3),d=l-c;H&&h.log(`[Measurements] Normalized ${a} from ${c} to ${l} (${d})`),ce[a].value=l});let s=ce["mark.fid"];s&&ce.fid&&(mn(e,{description:"first input delay",endTimestamp:s.value+fe(ce.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:s.value}),delete ce["mark.fid"]),"fcp"in ce||delete ce.cls,Object.keys(ce).forEach(a=>{Xo(a,ce[a].value,ce[a].unit)}),Dg(e)}_t=void 0,Kr=void 0,ce={}}function kg(e,t,n,r,o){let i=o+n,s=i+r;return mn(e,{description:t.name,endTimestamp:s,op:t.entryType,origin:"auto.resource.browser.metrics",startTimestamp:i}),i}function Ag(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{fi(e,t,r,n)}),fi(e,t,"secureConnection",n,"TLS/SSL","connectEnd"),fi(e,t,"fetch",n,"cache","domainLookupStart"),fi(e,t,"domainLookup",n,"DNS"),Og(e,t,n)}function fi(e,t,n,r,o,i){let s=i?t[i]:t[`${n}End`],a=t[`${n}Start`];!a||!s||mn(e,{op:"browser",origin:"auto.browser.browser.metrics",description:o||n,startTimestamp:r+fe(a),endTimestamp:r+fe(s)})}function Og(e,t,n){t.responseEnd&&(mn(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:n+fe(t.requestStart),endTimestamp:n+fe(t.responseEnd)}),mn(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:n+fe(t.responseStart),endTimestamp:n+fe(t.responseEnd)}))}function Mg(e,t,n,r,o,i){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;let s=qe(n),a={};Ta(a,t,"transferSize","http.response_transfer_size"),Ta(a,t,"encodedBodySize","http.response_content_length"),Ta(a,t,"decodedBodySize","http.decoded_response_content_length"),"renderBlockingStatus"in t&&(a["resource.render_blocking_status"]=t.renderBlockingStatus),s.protocol&&(a["url.scheme"]=s.protocol.split(":").pop()),s.host&&(a["server.address"]=s.host),a["url.same_origin"]=n.includes(R.location.origin);let c=i+r,u=c+o;mn(e,{description:n.replace(R.location.origin,""),endTimestamp:u,op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",origin:"auto.resource.browser.metrics",startTimestamp:c,data:a})}function Ng(e){let t=R.navigator;if(!t)return;let n=t.connection;n&&(n.effectiveType&&e.setTag("effectiveConnectionType",n.effectiveType),n.type&&e.setTag("connectionType",n.type),di(n.rtt)&&(ce["connection.rtt"]={value:n.rtt,unit:"millisecond"})),di(t.deviceMemory)&&e.setTag("deviceMemory",`${t.deviceMemory} GB`),di(t.hardwareConcurrency)&&e.setTag("hardwareConcurrency",String(t.hardwareConcurrency))}function Dg(e){_t&&(H&&h.log("[Measurements] Adding LCP Data"),_t.element&&e.setTag("lcp.element",He(_t.element)),_t.id&&e.setTag("lcp.id",_t.id),_t.url&&e.setTag("lcp.url",_t.url.trim().slice(0,200)),e.setTag("lcp.size",_t.size)),Kr&&Kr.sources&&(H&&h.log("[Measurements] Adding CLS Data"),Kr.sources.forEach((t,n)=>e.setTag(`cls.source.${n+1}`,He(t.node))))}function Ta(e,t,n,r){let o=t[n];o!=null&&o<Ig&&(e[r]=o)}function Lg(e){let t=Bt();if(!t)return;let{responseStart:n,requestStart:r}=t;r<=n&&(H&&h.log("[Measurements] Adding TTFB Request Time"),e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}function Pg(e,t,n){if(!Ke(t))return!1;let r;return e!==void 0&&typeof t.tracesSampler=="function"?r=t.tracesSampler({transactionContext:e,name:e.name,parentSampled:e.parentSampled,attributes:{...e.data,...e.attributes},location:R.location}):e!==void 0&&e.sampled!==void 0?r=e.sampled:typeof t.tracesSampleRate<"u"?r=t.tracesSampleRate:r=1,Jo(r)?r===!0?n:r===!1?0:r*n:(H&&h.warn("[Tracing] Discarding interaction span because of invalid sample rate."),!1)}f();f();function fd(e,t,n,r,o="auto.http.browser"){if(!Ke()||!e.fetchData)return;let i=t(e.fetchData.url);if(e.endTimestamp&&i){let m=e.fetchData.__span;if(!m)return;let g=r[m];g&&(Hg(g,e),delete r[m]);return}let s=q(),a=x(),{method:c,url:u}=e.fetchData,l=Bg(u),d=l?qe(l).host:void 0,p=i?Dn({name:`${c} ${u}`,onlyIfParent:!0,attributes:{url:u,type:"fetch","http.method":c,"http.url":l,"server.address":d,[st]:o},op:"http.client"}):void 0;if(p&&(e.fetchData.__span=p.spanContext().spanId,r[p.spanContext().spanId]=p),n(e.fetchData.url)&&a){let m=e.args[0];e.args[1]=e.args[1]||{};let g=e.args[1];g.headers=Fg(m,a,s,g,p)}return p}function Fg(e,t,n,r,o){let i=o||n.getSpan(),s=ge(),{traceId:a,spanId:c,sampled:u,dsc:l}={...s.getPropagationContext(),...n.getPropagationContext()},d=i?vt(i):tn(a,c,u),p=wr(l||(i?Ve(i):Nt(a,t,n))),m=r.headers||(typeof Request<"u"&&Be(e,Request)?e.headers:void 0);if(m)if(typeof Headers<"u"&&Be(m,Headers)){let g=new Headers(m);return g.append("sentry-trace",d),p&&g.append(An,p),g}else if(Array.isArray(m)){let g=[...m,["sentry-trace",d]];return p&&g.push([An,p]),g}else{let g="baggage"in m?m.baggage:void 0,E=[];return Array.isArray(g)?E.push(...g):g&&E.push(g),p&&E.push(p),{...m,"sentry-trace":d,baggage:E.length>0?E.join(","):void 0}}else return{"sentry-trace":d,baggage:p}}function Bg(e){try{return new URL(e).href}catch{return}}function Hg(e,t){if(t.response){Lt(e,t.response.status);let n=t.response&&t.response.headers&&t.response.headers.get("content-length");if(n){let r=parseInt(n);r>0&&e.setAttribute("http.response_content_length",r)}}else t.error&&e.setStatus("internal_error");e.end()}var va=["localhost",/^\/(?!\/)/],Ht={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:va,tracePropagationTargets:va};function zn(e){let{traceFetch:t,traceXHR:n,tracePropagationTargets:r,tracingOrigins:o,shouldCreateSpanForRequest:i,enableHTTPTimings:s}={traceFetch:Ht.traceFetch,traceXHR:Ht.traceXHR,...e},a=typeof i=="function"?i:l=>!0,c=l=>Wg(l,r||o),u={};t&&bt(l=>{let d=fd(l,a,c,u);if(d){let p=md(l.fetchData.url),m=p?qe(p).host:void 0;d.setAttributes({"http.url":p,"server.address":m})}s&&d&&pd(d)}),n&&Tt(l=>{let d=zg(l,a,c,u);s&&d&&pd(d)})}function Ug(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function pd(e){let{url:t}=P(e).data||{};if(!t||typeof t!="string")return;let n=Le("resource",({entries:r})=>{r.forEach(o=>{Ug(o)&&o.name.endsWith(t)&&(Gg(o).forEach(s=>e.setAttribute(...s)),setTimeout(n))})})}function $g(e){let t="unknown",n="unknown",r="";for(let o of e){if(o==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(o))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=o}return r===e&&(t=r),{name:t,version:n}}function yt(e=0){return((re||performance.timeOrigin)+e)/1e3}function Gg(e){let{name:t,version:n}=$g(e.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",t]),re?[...r,["http.request.redirect_start",yt(e.redirectStart)],["http.request.fetch_start",yt(e.fetchStart)],["http.request.domain_lookup_start",yt(e.domainLookupStart)],["http.request.domain_lookup_end",yt(e.domainLookupEnd)],["http.request.connect_start",yt(e.connectStart)],["http.request.secure_connection_start",yt(e.secureConnectionStart)],["http.request.connection_end",yt(e.connectEnd)],["http.request.request_start",yt(e.requestStart)],["http.request.response_start",yt(e.responseStart)],["http.request.response_end",yt(e.responseEnd)]]:r}function Wg(e,t){return dt(e,t||va)}function zg(e,t,n,r){let o=e.xhr,i=o&&o[Ne];if(!Ke()||!o||o.__sentry_own_request__||!i)return;let s=t(i.url);if(e.endTimestamp&&s){let m=o.__sentry_xhr_span_id__;if(!m)return;let g=r[m];g&&i.status_code!==void 0&&(Lt(g,i.status_code),g.end(),delete r[m]);return}let a=q(),c=ge(),u=md(i.url),l=u?qe(u).host:void 0,d=s?Dn({name:`${i.method} ${i.url}`,onlyIfParent:!0,attributes:{type:"xhr","http.method":i.method,"http.url":u,url:i.url,"server.address":l,[st]:"auto.http.browser"},op:"http.client"}):void 0;d&&(o.__sentry_xhr_span_id__=d.spanContext().spanId,r[o.__sentry_xhr_span_id__]=d);let p=x();if(o.setRequestHeader&&n(i.url)&&p){let{traceId:m,spanId:g,sampled:E,dsc:T}={...c.getPropagationContext(),...a.getPropagationContext()},S=d?vt(d):tn(m,g,E),b=wr(T||(d?Ve(d):Nt(m,p,a)));jg(o,S,b)}return d}function jg(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader(An,n)}catch{}}function md(e){try{return new URL(e,R.location.origin).href}catch{return}}f();function hd(e,t=!0,n=!0){if(!R||!R.location){H&&h.warn("Could not initialize routing instrumentation due to invalid location");return}let r=R.location.href,o;t&&(o=e({name:R.location.pathname,startTimestamp:re?re/1e3:void 0,op:"pageload",origin:"auto.pageload.browser",metadata:{source:"url"}})),n&&et(({to:i,from:s})=>{if(s===void 0&&r&&r.indexOf(i)!==-1){r=void 0;return}s!==i&&(r=void 0,o&&(H&&h.log(`[Tracing] Finishing current transaction with op: ${o.op}`),o.end()),o=e({name:R.location.pathname,op:"navigation",origin:"auto.navigation.browser",metadata:{source:"url"}}))})}var yd="BrowserTracing",qg={...Ft,markBackgroundTransactions:!0,routingInstrumentation:hd,startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,enableInp:!1,interactionsSampleRate:1,_experiments:{},...Ht},gd=10,yi=class{constructor(t){this.name=yd,this._hasSetTracePropagationTargets=!1,Bn(),H&&(this._hasSetTracePropagationTargets=!!(t&&(t.tracePropagationTargets||t.tracingOrigins))),this.options={...qg,...t},this.options._experiments.enableLongTask!==void 0&&(this.options.enableLongTask=this.options._experiments.enableLongTask),t&&!t.tracePropagationTargets&&t.tracingOrigins&&(this.options.tracePropagationTargets=t.tracingOrigins),this._collectWebVitals=pi(),this._interactionIdToRouteNameMapping={},this.options.enableInp&&gi(this._interactionIdToRouteNameMapping,this.options.interactionsSampleRate),this.options.enableLongTask&&mi(),this.options._experiments.enableInteractions&&hi(),this._latestRoute={name:void 0,context:void 0}}setupOnce(t,n){this._getCurrentHub=n;let o=n().getClient(),i=o&&o.getOptions(),{routingInstrumentation:s,startTransactionOnLocationChange:a,startTransactionOnPageLoad:c,markBackgroundTransactions:u,traceFetch:l,traceXHR:d,shouldCreateSpanForRequest:p,enableHTTPTimings:m,_experiments:g}=this.options,E=i&&i.tracePropagationTargets,T=E||this.options.tracePropagationTargets;H&&this._hasSetTracePropagationTargets&&E&&h.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used."),s(S=>{let b=this._createRouteTransaction(S);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(b,S,n),b},c,a),u&&ai(),g.enableInteractions&&this._registerInteractionListener(),this.options.enableInp&&this._registerInpInteractionListener(),zn({traceFetch:l,traceXHR:d,tracePropagationTargets:T,shouldCreateSpanForRequest:p,enableHTTPTimings:m})}_createRouteTransaction(t){if(!this._getCurrentHub){H&&h.warn(`[Tracing] Did not create ${t.op} transaction because _getCurrentHub is invalid.`);return}let n=this._getCurrentHub(),{beforeNavigate:r,idleTimeout:o,finalTimeout:i,heartbeatInterval:s}=this.options,a=t.op==="pageload",c;if(a){let m=a?_d("sentry-trace"):"",g=a?_d("baggage"):void 0,{traceId:E,dsc:T,parentSpanId:S,sampled:b}=Rr(m,g);c={traceId:E,parentSpanId:S,parentSampled:b,...t,metadata:{...t.metadata,dynamicSamplingContext:T},trimEnd:!0}}else c={trimEnd:!0,...t};let u=typeof r=="function"?r(c):c,l=u===void 0?{...c,sampled:!1}:u;l.metadata=l.name!==c.name?{...l.metadata,source:"custom"}:l.metadata,this._latestRoute.name=l.name,this._latestRoute.context=l,l.sampled===!1&&H&&h.log(`[Tracing] Will not send ${l.op} transaction because of beforeNavigate.`),H&&h.log(`[Tracing] Starting ${l.op} transaction on scope`);let{location:d}=R,p=pn(n,l,o,i,!0,{location:d},s,a);return a&&R.document&&(R.document.addEventListener("readystatechange",()=>{["interactive","complete"].includes(R.document.readyState)&&p.sendAutoFinishSignal()}),["interactive","complete"].includes(R.document.readyState)&&p.sendAutoFinishSignal()),p.registerBeforeFinishCallback(m=>{this._collectWebVitals(),_i(m)}),p}_registerInteractionListener(){let t,n=()=>{let{idleTimeout:r,finalTimeout:o,heartbeatInterval:i}=this.options,s="ui.action.click",a=ye();if(a&&a.op&&["navigation","pageload"].includes(a.op)){H&&h.warn(`[Tracing] Did not create ${s} transaction because a pageload or navigation transaction is in progress.`);return}if(t&&(t.setFinishReason("interactionInterrupted"),t.end(),t=void 0),!this._getCurrentHub){H&&h.warn(`[Tracing] Did not create ${s} transaction because _getCurrentHub is invalid.`);return}if(!this._latestRoute.name){H&&h.warn(`[Tracing] Did not create ${s} transaction because _latestRouteName is missing.`);return}let c=this._getCurrentHub(),{location:u}=R,l={name:this._latestRoute.name,op:s,trimEnd:!0,data:{[_e]:this._latestRoute.context?Yg(this._latestRoute.context):"url"}};t=pn(c,l,r,o,!0,{location:u},i)};["click"].forEach(r=>{R.document&&addEventListener(r,n,{once:!1,capture:!0})})}_registerInpInteractionListener(){let t=({entries:n})=>{let r=x(),o=r!==void 0&&r.getIntegrationByName!==void 0?r.getIntegrationByName("Replay"):void 0,i=o!==void 0?o.getReplayId():void 0,s=ye(),a=q(),c=a!==void 0?a.getUser():void 0;n.forEach(u=>{if(Vg(u)){let l=u.interactionId;if(l===void 0)return;let d=this._interactionIdToRouteNameMapping[l],p=u.duration,m=u.startTime,g=Object.keys(this._interactionIdToRouteNameMapping),E=g.length>0?g.reduce((T,S)=>this._interactionIdToRouteNameMapping[T].duration<this._interactionIdToRouteNameMapping[S].duration?T:S):void 0;if(u.entryType==="first-input"&&g.map(S=>this._interactionIdToRouteNameMapping[S]).some(S=>S.duration===p&&S.startTime===m)||!l)return;if(d)d.duration=Math.max(d.duration,p);else if(g.length<gd||E===void 0||p>this._interactionIdToRouteNameMapping[E].duration){let T=this._latestRoute.name,S=this._latestRoute.context;T&&S&&(E&&Object.keys(this._interactionIdToRouteNameMapping).length>=gd&&delete this._interactionIdToRouteNameMapping[E],this._interactionIdToRouteNameMapping[l]={routeName:T,duration:p,parentContext:S,user:c,activeTransaction:s,replayId:i,startTime:m})}}})};Le("event",t),Le("first-input",t)}};function _d(e){let t=pr(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}function Yg(e){let t=e.attributes&&e.attributes[_e],n=e.data&&e.data[_e],r=e.metadata&&e.metadata.source;return t||n||r}function Vg(e){return"duration"in e}f();var Kg="BrowserTracing",Jg={...Ft,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableInp:!1,interactionsSampleRate:1,_experiments:{},...Ht},bd=(e={})=>{let t=H?!!(e.tracePropagationTargets||e.tracingOrigins):!1;Bn(),!e.tracePropagationTargets&&e.tracingOrigins&&(e.tracePropagationTargets=e.tracingOrigins);let n={...Jg,...e},r=pi(),o={};n.enableInp&&gi(o,n.interactionsSampleRate),n.enableLongTask&&mi(),n._experiments.enableInteractions&&hi();let i={name:void 0,context:void 0};function s(a){let c=W(),{beforeStartSpan:u,idleTimeout:l,finalTimeout:d,heartbeatInterval:p}=n,m=a.op==="pageload",g;if(m){let b=m?Sd("sentry-trace"):"",v=m?Sd("baggage"):void 0,{traceId:O,dsc:L,parentSpanId:M,sampled:w}=Rr(b,v);g={traceId:O,parentSpanId:M,parentSampled:w,...a,metadata:{...a.metadata,dynamicSamplingContext:L},trimEnd:!0}}else g={trimEnd:!0,...a};let E=u?u(g):g;E.metadata=E.name!==g.name?{...E.metadata,source:"custom"}:E.metadata,i.name=E.name,i.context=E,E.sampled===!1&&H&&h.log(`[Tracing] Will not send ${E.op} transaction because of beforeNavigate.`),H&&h.log(`[Tracing] Starting ${E.op} transaction on scope`);let{location:T}=R,S=pn(c,E,l,d,!0,{location:T},p,m);return m&&R.document&&(R.document.addEventListener("readystatechange",()=>{["interactive","complete"].includes(R.document.readyState)&&S.sendAutoFinishSignal()}),["interactive","complete"].includes(R.document.readyState)&&S.sendAutoFinishSignal()),S.registerBeforeFinishCallback(b=>{r(),_i(b)}),S}return{name:Kg,setupOnce:()=>{},afterAllSetup(a){let c=a.getOptions(),{markBackgroundSpan:u,traceFetch:l,traceXHR:d,shouldCreateSpanForRequest:p,enableHTTPTimings:m,_experiments:g}=n,E=c&&c.tracePropagationTargets,T=E||n.tracePropagationTargets;H&&t&&E&&h.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used.");let S,b=R.location&&R.location.href;if(a.on&&(a.on("startNavigationSpan",v=>{S&&(H&&h.log(`[Tracing] Finishing current transaction with op: ${P(S).op}`),S.end()),S=s({op:"navigation",...v})}),a.on("startPageLoadSpan",v=>{S&&(H&&h.log(`[Tracing] Finishing current transaction with op: ${P(S).op}`),S.end()),S=s({op:"pageload",...v})})),n.instrumentPageLoad&&a.emit&&R.location){let v={name:R.location.pathname,startTimestamp:re?re/1e3:void 0,origin:"auto.pageload.browser",attributes:{[_e]:"url"}};xa(a,v)}n.instrumentNavigation&&a.emit&&R.location&&et(({to:v,from:O})=>{if(O===void 0&&b&&b.indexOf(v)!==-1){b=void 0;return}if(O!==v){b=void 0;let L={name:R.location.pathname,origin:"auto.navigation.browser",attributes:{[_e]:"url"}};wa(a,L)}}),u&&ai(),g.enableInteractions&&Xg(n,i),n.enableInp&&Qg(o,i),zn({traceFetch:l,traceXHR:d,tracePropagationTargets:T,shouldCreateSpanForRequest:p,enableHTTPTimings:m})},options:n}};function xa(e,t){if(!e.emit)return;e.emit("startPageLoadSpan",t);let n=Pt();return(n&&P(n).op)==="pageload"?n:void 0}function wa(e,t){if(!e.emit)return;e.emit("startNavigationSpan",t);let n=Pt();return(n&&P(n).op)==="navigation"?n:void 0}function Sd(e){let t=pr(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}function Xg(e,t){let n,r=()=>{let{idleTimeout:o,finalTimeout:i,heartbeatInterval:s}=e,a="ui.action.click",c=ye();if(c&&c.op&&["navigation","pageload"].includes(c.op)){H&&h.warn(`[Tracing] Did not create ${a} transaction because a pageload or navigation transaction is in progress.`);return}if(n&&(n.setFinishReason("interactionInterrupted"),n.end(),n=void 0),!t.name){H&&h.warn(`[Tracing] Did not create ${a} transaction because _latestRouteName is missing.`);return}let{location:u}=R,l={name:t.name,op:a,trimEnd:!0,data:{[_e]:t.context?e_(t.context):"url"}};n=pn(W(),l,o,i,!0,{location:u},s)};["click"].forEach(o=>{R.document&&addEventListener(o,r,{once:!1,capture:!0})})}function Zg(e){return"duration"in e}var Ed=10;function Qg(e,t){let n=({entries:r})=>{let o=x(),i=o!==void 0&&o.getIntegrationByName!==void 0?o.getIntegrationByName("Replay"):void 0,s=i!==void 0?i.getReplayId():void 0,a=ye(),c=q(),u=c!==void 0?c.getUser():void 0;r.forEach(l=>{if(Zg(l)){let d=l.interactionId;if(d===void 0)return;let p=e[d],m=l.duration,g=l.startTime,E=Object.keys(e),T=E.length>0?E.reduce((S,b)=>e[S].duration<e[b].duration?S:b):void 0;if(l.entryType==="first-input"&&E.map(b=>e[b]).some(b=>b.duration===m&&b.startTime===g)||!d)return;if(p)p.duration=Math.max(p.duration,m);else if(E.length<Ed||T===void 0||m>e[T].duration){let S=t.name,b=t.context;S&&b&&(T&&Object.keys(e).length>=Ed&&delete e[T],e[d]={routeName:S,duration:m,parentContext:b,user:u,activeTransaction:a,replayId:s,startTime:g})}}})};Le("event",n),Le("first-input",n)}function e_(e){let t=e.attributes&&e.attributes[_e],n=e.data&&e.data[_e],r=e.metadata&&e.metadata.source;return t||n||r}var A=C,Ca=0;function Ra(){return Ca>0}function t_(){Ca++,setTimeout(()=>{Ca--})}function Ct(e,t={},n){if(typeof e!="function")return e;try{let o=e.__sentry_wrapped__;if(o)return o;if(Qt(e))return e}catch{return e}let r=function(){let o=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);let i=o.map(s=>Ct(s,t));return e.apply(this,i)}catch(i){throw t_(),De(s=>{s.addEventProcessor(a=>(t.mechanism&&(Cn(a,void 0,void 0),Ue(a,t.mechanism)),a.extra={...a.extra,arguments:o},a)),xt(i)}),i}};try{for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o])}catch{}To(r,e),ke(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}f();f();var F=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;f();function Si(e,t){let n=Oa(e,t),r={type:t&&t.name,value:i_(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function n_(e,t,n,r){let o=x(),i=o&&o.getOptions().normalizeDepth,s={exception:{values:[{type:Kt(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:s_(t,{isUnhandledRejection:r})}]},extra:{__serialized__:Do(t,i)}};if(n){let a=Oa(e,n);a.length&&(s.exception.values[0].stacktrace={frames:a})}return s}function ka(e,t){return{exception:{values:[Si(e,t)]}}}function Oa(e,t){let n=t.stacktrace||t.stack||"",r=o_(t);try{return e(n,r)}catch{}return[]}var r_=/Minified React error #\d+;/i;function o_(e){if(e){if(typeof e.framesToPop=="number")return e.framesToPop;if(r_.test(e.message))return 1}return 0}function i_(e){let t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function Ma(e,t,n,r){let o=n&&n.syntheticException||void 0,i=Ei(e,t,o,r);return Ue(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),tt(i)}function Na(e,t,n="info",r,o){let i=r&&r.syntheticException||void 0,s=Aa(e,t,i,o);return s.level=n,r&&r.event_id&&(s.event_id=r.event_id),tt(s)}function Ei(e,t,n,r,o){let i;if(In(t)&&t.error)return ka(e,t.error);if(So(t)||ls(t)){let s=t;if("stack"in t)i=ka(e,t);else{let a=s.name||(So(s)?"DOMError":"DOMException"),c=s.message?`${a}: ${s.message}`:a;i=Aa(e,c,n,r),Cn(i,c)}return"code"in s&&(i.tags={...i.tags,"DOMException.code":`${s.code}`}),i}return ut(t)?ka(e,t):Fe(t)||Kt(t)?(i=n_(e,t,n,o),Ue(i,{synthetic:!0}),i):(i=Aa(e,t,n,r),Cn(i,`${t}`,void 0),Ue(i,{synthetic:!0}),i)}function Aa(e,t,n,r){let o={};if(r&&n){let i=Oa(e,n);i.length&&(o.exception={values:[{value:t,stacktrace:{frames:i}}]})}if(vn(t)){let{__sentry_template_string__:i,__sentry_template_values__:s}=t;return o.logentry={message:i,params:s},o}return o.message=t,o}function s_(e,{isUnhandledRejection:t}){let n=_s(e),r=t?"promise rejection":"exception";return In(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Kt(e)?`Event \`${a_(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function a_(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}f();function Da(e,{metadata:t,tunnel:n,dsn:r}){let o={event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:Te(r)}},i=c_(e);return he(o,[i])}function c_(e){return[{type:"user_report"},e]}var Jr=class extends Gr{constructor(t){let n=A.SENTRY_SDK_SOURCE||ws();fa(t,"browser",["browser"],n),super(t),t.sendClientReports&&A.document&&A.document.addEventListener("visibilitychange",()=>{A.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,n){return Ma(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return Na(this._options.stackParser,t,n,r,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){F&&h.warn("SDK not enabled, will not capture user feedback.");return}let n=Da(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(n)}_prepareEvent(t,n,r){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r)}_flushOutcomes(){let t=this._clearOutcomes();if(t.length===0){F&&h.log("No outcomes to send");return}if(!this._dsn){F&&h.log("No dsn provided, will not send outcomes");return}F&&h.log("Sending outcomes:",t);let n=Hs(t,this._options.tunnel&&Te(this._dsn));this._sendEnvelope(n)}};f();f();var Xr;function Td(){if(Xr)return Xr;if(Sr(A.fetch))return Xr=A.fetch.bind(A);let e=A.document,t=A.fetch;if(e&&typeof e.createElement=="function")try{let n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);let r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(n){F&&h.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return Xr=t.bind(A)}function Id(){Xr=void 0}function La(e,t=Td()){let n=0,r=0;function o(i){let s=i.body.length;n+=s,r++;let a={body:i.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{return t(e.url,a).then(c=>(n-=s,r--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}))}catch(c){return Id(),n-=s,r--,en(c)}}return Un(e,o)}f();var u_=4;function Pa(e){function t(n){return new $e((r,o)=>{let i=new XMLHttpRequest;i.onerror=o,i.onreadystatechange=()=>{i.readyState===u_&&r({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")}})},i.open("POST",e.url);for(let s in e.headers)Object.prototype.hasOwnProperty.call(e.headers,s)&&i.setRequestHeader(s,e.headers[s]);i.send(n.body)})}return Un(e,t)}f();var jn="?",l_=10,d_=20,f_=30,p_=40,m_=50;function Zr(e,t,n,r){let o={filename:e,function:t,in_app:!0};return n!==void 0&&(o.lineno=n),r!==void 0&&(o.colno=r),o}var h_=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,g_=/\((\S*)(?::(\d+))(?::(\d+))\)/,__=e=>{let t=h_.exec(e);if(t){if(t[2]&&t[2].indexOf("eval")===0){let i=g_.exec(t[2]);i&&(t[2]=i[1],t[3]=i[2],t[4]=i[3])}let[r,o]=Rd(t[1]||jn,t[2]);return Zr(o,r,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}},vd=[f_,__],y_=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,S_=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,E_=e=>{let t=y_.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let i=S_.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let r=t[3],o=t[1]||jn;return[o,r]=Rd(o,r),Zr(r,o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},xd=[m_,E_],b_=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,T_=e=>{let t=b_.exec(e);return t?Zr(t[2],t[1]||jn,+t[3],t[4]?+t[4]:void 0):void 0},wd=[p_,T_],I_=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,v_=e=>{let t=I_.exec(e);return t?Zr(t[2],t[3]||jn,+t[1]):void 0},x_=[l_,v_],w_=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,C_=e=>{let t=w_.exec(e);return t?Zr(t[5],t[3]||t[4]||jn,+t[1],+t[2]):void 0},R_=[d_,C_],Cd=[vd,xd,wd],Fa=vo(...Cd),Rd=(e,t)=>{let n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:jn,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};f();f();var bi=1024,kd="Breadcrumbs",k_=(e={})=>{let t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:kd,setupOnce(){},setup(n){t.console&&gr(M_(n)),t.dom&&yr(O_(n,t.dom)),t.xhr&&Tt(N_(n)),t.fetch&&bt(D_(n)),t.history&&et(L_(n)),t.sentry&&n.on&&n.on("beforeSendEvent",A_(n))}}},Ti=k_,Ba=D(kd,Ti);function A_(e){return function(n){x()===e&&Ye({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:Qe(n)},{event:n})}}function O_(e,t){return function(r){if(x()!==e)return;let o,i,s=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>bi&&(F&&h.warn(`\`dom.maxStringLength\` cannot exceed ${bi}, but a value of ${a} was configured. Sentry will use ${bi} instead.`),a=bi),typeof s=="string"&&(s=[s]);try{let u=r.event,l=P_(u)?u.target:u;o=He(l,{keyAttrs:s,maxStringLength:a}),i=mr(l)}catch{o="<unknown>"}if(o.length===0)return;let c={category:`ui.${r.name}`,message:o};i&&(c.data={"ui.component_name":i}),Ye(c,{event:r.event,name:r.name,global:r.global})}}function M_(e){return function(n){if(x()!==e)return;let r={category:"console",data:{arguments:n.args,logger:"console"},level:vr(n.level),message:Jt(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${Jt(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;Ye(r,{input:n.args,level:n.level})}}function N_(e){return function(n){if(x()!==e)return;let{startTimestamp:r,endTimestamp:o}=n,i=n.xhr[Ne];if(!r||!o||!i)return;let{method:s,url:a,status_code:c,body:u}=i,l={method:s,url:a,status_code:c},d={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:o};Ye({category:"xhr",data:l,type:"http"},d)}}function D_(e){return function(n){if(x()!==e)return;let{startTimestamp:r,endTimestamp:o}=n;if(o&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){let i=n.fetchData,s={data:n.error,input:n.args,startTimestamp:r,endTimestamp:o};Ye({category:"fetch",data:i,level:"error",type:"http"},s)}else{let i=n.response,s={...n.fetchData,status_code:i&&i.status},a={input:n.args,response:i,startTimestamp:r,endTimestamp:o};Ye({category:"fetch",data:s,type:"http"},a)}}}function L_(e){return function(n){if(x()!==e)return;let r=n.from,o=n.to,i=qe(A.location.href),s=r?qe(r):void 0,a=qe(o);(!s||!s.path)&&(s=i),i.protocol===a.protocol&&i.host===a.host&&(o=a.relative),i.protocol===s.protocol&&i.host===s.host&&(r=s.relative),Ye({category:"navigation",data:{from:r,to:o}})}}function P_(e){return!!e&&!!e.target}f();var Md="Dedupe",F_=()=>{let e;return{name:Md,setupOnce(){},processEvent(t){if(t.type)return t;try{if(B_(t,e))return F&&h.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},Ha=F_,Ua=D(Md,Ha);function B_(e,t){return t?!!(H_(e,t)||U_(e,t)):!1}function H_(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Dd(e,t)||!Nd(e,t))}function U_(e,t){let n=Ad(t),r=Ad(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Dd(e,t)||!Nd(e,t))}function Nd(e,t){let n=Od(e),r=Od(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let o=0;o<r.length;o++){let i=r[o],s=n[o];if(i.filename!==s.filename||i.lineno!==s.lineno||i.colno!==s.colno||i.function!==s.function)return!1}return!0}function Dd(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function Ad(e){return e.exception&&e.exception.values&&e.exception.values[0]}function Od(e){let t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch{return}}f();var Pd="GlobalHandlers",$_=(e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:Pd,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(G_(n),Ld("onerror")),t.onunhandledrejection&&(W_(n),Ld("onunhandledrejection"))}}},Ii=$_,$a=D(Pd,Ii);function G_(e){br(t=>{let{stackParser:n,attachStacktrace:r}=Bd();if(x()!==e||Ra())return;let{msg:o,url:i,line:s,column:a,error:c}=t,u=c===void 0&&Se(o)?q_(o,i,s,a):Fd(Ei(n,c||o,void 0,r,!1),i,s,a);u.level="error",Mt(u,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function W_(e){Tr(t=>{let{stackParser:n,attachStacktrace:r}=Bd();if(x()!==e||Ra())return;let o=z_(t),i=Vt(o)?j_(o):Ei(n,o,void 0,r,!0);i.level="error",Mt(i,{originalException:o,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function z_(e){if(Vt(e))return e;let t=e;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return e}function j_(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function q_(e,t,n,r){let o=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,i=In(e)?e.message:e,s="Error",a=i.match(o);return a&&(s=a[1],i=a[2]),Fd({exception:{values:[{type:s,value:i}]}},t,n,r)}function Fd(e,t,n,r){let o=e.exception=e.exception||{},i=o.values=o.values||[],s=i[0]=i[0]||{},a=s.stacktrace=s.stacktrace||{},c=a.frames=a.frames||[],u=isNaN(parseInt(r,10))?void 0:r,l=isNaN(parseInt(n,10))?void 0:n,d=Se(t)&&t.length>0?t:fr();return c.length===0&&c.push({colno:u,filename:d,function:"?",in_app:!0,lineno:l}),e}function Ld(e){F&&h.log(`Global Handler attached: ${e}`)}function Bd(){let e=x();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}f();var Hd="HttpContext",Y_=()=>({name:Hd,setupOnce(){},preprocessEvent(e){if(!A.navigator&&!A.location&&!A.document)return;let t=e.request&&e.request.url||A.location&&A.location.href,{referrer:n}=A.document||{},{userAgent:r}=A.navigator||{},o={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},i={...e.request,...t&&{url:t},headers:o};e.request=i}}),vi=Y_,Ga=D(Hd,vi);f();var V_="cause",K_=5,Ud="LinkedErrors",J_=(e={})=>{let t=e.limit||K_,n=e.key||V_;return{name:Ud,setupOnce(){},preprocessEvent(r,o,i){let s=i.getOptions();lr(Si,s.stackParser,s.maxValueLength,n,t,r,o)}}},xi=J_,Wa=D(Ud,xi);f();var X_=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],Gd="TryCatch",Z_=(e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:Gd,setupOnce(){t.setTimeout&&Q(A,"setTimeout",$d),t.setInterval&&Q(A,"setInterval",$d),t.requestAnimationFrame&&Q(A,"requestAnimationFrame",Q_),t.XMLHttpRequest&&"XMLHttpRequest"in A&&Q(XMLHttpRequest.prototype,"send",ey);let n=t.eventTarget;n&&(Array.isArray(n)?n:X_).forEach(ty)}}},wi=Z_,za=D(Gd,wi);function $d(e){return function(...t){let n=t[0];return t[0]=Ct(n,{mechanism:{data:{function:Ae(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function Q_(e){return function(t){return e.apply(this,[Ct(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Ae(e)},handled:!1,type:"instrument"}})])}}function ey(e){return function(...t){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(o=>{o in n&&typeof n[o]=="function"&&Q(n,o,function(i){let s={mechanism:{data:{function:o,handler:Ae(i)},handled:!1,type:"instrument"}},a=Qt(i);return a&&(s.mechanism.data.handler=Ae(a)),Ct(i,s)})}),e.apply(this,t)}}function ty(e){let t=A,n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(Q(n,"addEventListener",function(r){return function(o,i,s){try{typeof i.handleEvent=="function"&&(i.handleEvent=Ct(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Ae(i),target:e},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[o,Ct(i,{mechanism:{data:{function:"addEventListener",handler:Ae(i),target:e},handled:!1,type:"instrument"}}),s])}}),Q(n,"removeEventListener",function(r){return function(o,i,s){let a=i;try{let c=a&&a.__sentry_wrapped__;c&&r.call(this,o,c,s)}catch{}return r.call(this,o,a,s)}}))}var Wd=[zr(),jr(),wi(),Ti(),Ii(),xi(),Ha(),vi()];function zd(e){return[...Wd]}function ny(e={}){e.defaultIntegrations===void 0&&(e.defaultIntegrations=zd()),e.release===void 0&&(typeof __SENTRY_RELEASE__=="string"&&(e.release=__SENTRY_RELEASE__),A.SENTRY_RELEASE&&A.SENTRY_RELEASE.id&&(e.release=A.SENTRY_RELEASE.id)),e.autoSessionTracking===void 0&&(e.autoSessionTracking=!0),e.sendClientReports===void 0&&(e.sendClientReports=!0);let t={...e,stackParser:Ss(e.stackParser||Fa),integrations:ea(e),transport:e.transport||(Ro()?La:Pa)};aa(Jr,t),e.autoSessionTracking&&ay()}var ry=(e={},t=W())=>{if(!A.document){F&&h.error("Global document not defined in showReportDialog call");return}let{client:n,scope:r}=t.getStackTop(),o=e.dsn||n&&n.getDsn();if(!o){F&&h.error("DSN not configured for showReportDialog call");return}r&&(e.user={...r.getUser(),...e.user}),e.eventId||(e.eventId=t.lastEventId());let i=A.document.createElement("script");i.async=!0,i.crossOrigin="anonymous",i.src=Qs(o,e),e.onLoad&&(i.onload=e.onLoad);let{onClose:s}=e;if(s){let c=u=>{if(u.data==="__sentry_reportdialog_closed__")try{s()}finally{A.removeEventListener("message",c)}};A.addEventListener("message",c)}let a=A.document.head||A.document.body;a?a.appendChild(i):F&&h.error("Not injecting report dialog. No injection point found in HTML")};function oy(){}function iy(e){e()}function sy(e){return Ct(e)()}function ay(){if(typeof A.document>"u"){F&&h.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}Dr({ignoreDuration:!0}),Lr(),et(({from:e,to:t})=>{e!==void 0&&e!==t&&(Dr({ignoreDuration:!0}),Lr())})}function cy(e){let t=x();t&&t.captureUserFeedback(e)}var ja={};Xc(ja,{Breadcrumbs:()=>Ba,Dedupe:()=>Ua,GlobalHandlers:()=>$a,HttpContext:()=>Ga,LinkedErrors:()=>Wa,TryCatch:()=>za});f();f();var te=C,gc="sentryReplaySession",uy="replay_event",_c="Unable to send Replay",ly=3e5,dy=9e5,fy=5e3,py=5500,my=6e4,hy=5e3,gy=3,jd=15e4,Ci=5e3,_y=3e3,yy=300,yc=2e7,Sy=4999,Ey=15e3,qd=36e5;function by(e,t){return e??t()}function Ai(e){let t,n=e[0],r=1;for(;r<e.length;){let o=e[r],i=e[r+1];if(r+=2,(o==="optionalAccess"||o==="optionalCall")&&n==null)return;o==="access"||o==="optionalAccess"?(t=n,n=i(n)):(o==="call"||o==="optionalCall")&&(n=i((...s)=>n.call(t,...s)),t=void 0)}return n}var pe;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(pe||(pe={}));function Ty(e){return e.nodeType===e.ELEMENT_NODE}function eo(e){let t=Ai([e,"optionalAccess",n=>n.host]);return Ai([t,"optionalAccess",n=>n.shadowRoot])===e}function to(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Iy(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),e}function vy(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let n=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}function Oi(e){try{let t=e.rules||e.cssRules;return t?Iy(Array.from(t,mf).join("")):null}catch{return null}}function mf(e){let t;if(wy(e))try{t=Oi(e.styleSheet)||vy(e)}catch{}else if(Cy(e)&&e.selectorText.includes(":"))return xy(e.cssText);return t||e.cssText}function xy(e){let t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function wy(e){return"styleSheet"in e}function Cy(e){return"selectorText"in e}var Mi=class{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(t){if(!t)return-1;let n=Ai([this,"access",r=>r.getMeta,"call",r=>r(t),"optionalAccess",r=>r.id]);return by(n,()=>-1)}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){let n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){let r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){let r=this.getNode(t);if(r){let o=this.nodeMetaMap.get(r);o&&this.nodeMetaMap.set(n,o)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Ry(){return new Mi}function ji({maskInputOptions:e,tagName:t,type:n}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||n==="password"||t==="INPUT"&&!n&&e.text)}function ro({isMasked:e,element:t,value:n,maskInputFn:r}){let o=n||"";return e?(r&&(o=r(o,t)),"*".repeat(o.length)):o}function Qn(e){return e.toLowerCase()}function Ka(e){return e.toUpperCase()}var Yd="__rrweb_original__";function ky(e){let t=e.getContext("2d");if(!t)return!0;let n=50;for(let r=0;r<e.width;r+=n)for(let o=0;o<e.height;o+=n){let i=t.getImageData,s=Yd in i?i[Yd]:i;if(new Uint32Array(s.call(t,r,o,Math.min(n,e.width-r),Math.min(n,e.height-o)).data.buffer).some(c=>c!==0))return!1}return!0}function Sc(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Qn(t):null}function Ni(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}var Ay=1,Oy=new RegExp("[^a-z0-9-_:]"),oo=-2;function Ec(){return Ay++}function My(e){if(e instanceof HTMLFormElement)return"form";let t=Qn(e.tagName);return Oy.test(t)?"div":t}function Ny(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var qn,Vd,Dy=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Ly=/^(?:[a-z+]+:)?\/\//i,Py=/^www\..*/i,Fy=/^(data:)([^,]*),(.*)/i;function Di(e,t){return(e||"").replace(Dy,(n,r,o,i,s,a)=>{let c=o||s||a,u=r||i||"";if(!c)return n;if(Ly.test(c)||Py.test(c))return`url(${u}${c}${u})`;if(Fy.test(c))return`url(${u}${c}${u})`;if(c[0]==="/")return`url(${u}${Ny(t)+c}${u})`;let l=t.split("/"),d=c.split("/");l.pop();for(let p of d)p!=="."&&(p===".."?l.pop():l.push(p));return`url(${u}${l.join("/")}${u})`})}var By=/^[^ \t\n\r\u000c]+/,Hy=/^[, \t\n\r\u000c]+/;function Uy(e,t){if(t.trim()==="")return t;let n=0;function r(i){let s,a=i.exec(t.substring(n));return a?(s=a[0],n+=s.length,s):""}let o=[];for(;r(Hy),!(n>=t.length);){let i=r(By);if(i.slice(-1)===",")i=Vn(e,i.substring(0,i.length-1)),o.push(i);else{let s="";i=Vn(e,i);let a=!1;for(;;){let c=t.charAt(n);if(c===""){o.push((i+s).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){n+=1,o.push((i+s).trim());break}else c==="("&&(a=!0);s+=c,n+=1}}}return o.join(", ")}function Vn(e,t){if(!t||t.trim()==="")return t;let n=e.createElement("a");return n.href=t,n.href}function $y(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function bc(){let e=document.createElement("a");return e.href="",e.href}function hf(e,t,n,r,o,i){return r&&(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(t==="table"||t==="td"||t==="th")?Vn(e,r):n==="srcset"?Uy(e,r):n==="style"?Di(r,bc()):t==="object"&&n==="data"?Vn(e,r):typeof i=="function"?i(n,r,o):r)}function gf(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function Gy(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let o=e.classList.length;o--;){let i=e.classList[o];if(t.test(i))return!0}if(n)return e.matches(n)}catch{}return!1}function Wy(e,t){for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return!1}function hn(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:hn(e.parentNode,t,n,r+1)}function Kn(e,t){return n=>{let r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(Wy(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function er(e,t,n,r,o,i){try{let s=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(s===null)return!1;if(s.tagName==="INPUT"){let u=s.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(u))return!0}let a=-1,c=-1;if(i){if(c=hn(s,Kn(r,o)),c<0)return!0;a=hn(s,Kn(t,n),c>=0?c:1/0)}else{if(a=hn(s,Kn(t,n)),a<0)return!1;c=hn(s,Kn(r,o),a>=0?a:1/0)}return a>=0?c>=0?a<=c:!0:c>=0?!1:!!i}catch{}return!!i}function zy(e,t,n){let r=e.contentWindow;if(!r)return;let o=!1,i;try{i=r.document.readyState}catch{return}if(i!=="complete"){let a=setTimeout(()=>{o||(t(),o=!0)},n);e.addEventListener("load",()=>{clearTimeout(a),o=!0,t()});return}let s="about:blank";if(r.location.href!==s||e.src===s||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function jy(e,t,n){let r=!1,o;try{o=e.sheet}catch{return}if(o)return;let i=setTimeout(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{clearTimeout(i),r=!0,t()})}function qy(e,t){let{doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:p,inlineStylesheet:m,maskInputOptions:g={},maskTextFn:E,maskInputFn:T,dataURLOptions:S={},inlineImages:b,recordCanvas:v,keepIframeSrcFn:O,newlyAddedElement:L=!1}=t,M=Yy(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:pe.Document,childNodes:[],compatMode:e.compatMode}:{type:pe.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:pe.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:M};case e.ELEMENT_NODE:return Ky(e,{doc:n,blockClass:o,blockSelector:i,unblockSelector:s,inlineStylesheet:m,maskAttributeFn:c,maskInputOptions:g,maskInputFn:T,dataURLOptions:S,inlineImages:b,recordCanvas:v,keepIframeSrcFn:O,newlyAddedElement:L,rootId:M,maskAllText:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:p});case e.TEXT_NODE:return Vy(e,{maskAllText:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:p,maskTextFn:E,maskInputOptions:g,maskInputFn:T,rootId:M});case e.CDATA_SECTION_NODE:return{type:pe.CDATA,textContent:"",rootId:M};case e.COMMENT_NODE:return{type:pe.Comment,textContent:e.textContent||"",rootId:M};default:return!1}}function Yy(e,t){if(!t.hasNode(e))return;let n=t.getId(e);return n===1?void 0:n}function Vy(e,t){let{maskAllText:n,maskTextClass:r,unmaskTextClass:o,maskTextSelector:i,unmaskTextSelector:s,maskTextFn:a,maskInputOptions:c,maskInputFn:u,rootId:l}=t,d=e.parentNode&&e.parentNode.tagName,p=e.textContent,m=d==="STYLE"?!0:void 0,g=d==="SCRIPT"?!0:void 0,E=d==="TEXTAREA"?!0:void 0;if(m&&p){try{e.nextSibling||e.previousSibling||Ai([e,"access",S=>S.parentNode,"access",S=>S.sheet,"optionalAccess",S=>S.cssRules])&&(p=Oi(e.parentNode.sheet))}catch(S){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${S}`,e)}p=Di(p,bc())}g&&(p="SCRIPT_PLACEHOLDER");let T=er(e,r,i,o,s,n);if(!m&&!g&&!E&&p&&T&&(p=a?a(p,e.parentElement):p.replace(/[\S]/g,"*")),E&&p&&(c.textarea||T)&&(p=u?u(p,e.parentNode):p.replace(/[\S]/g,"*")),d==="OPTION"&&p){let S=ji({type:null,tagName:d,maskInputOptions:c});p=ro({isMasked:er(e,r,i,o,s,S),element:e,value:p,maskInputFn:u})}return{type:pe.Text,textContent:p||"",isStyle:m,rootId:l}}function Ky(e,t){let{doc:n,blockClass:r,blockSelector:o,unblockSelector:i,inlineStylesheet:s,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:l={},inlineImages:d,recordCanvas:p,keepIframeSrcFn:m,newlyAddedElement:g=!1,rootId:E,maskAllText:T,maskTextClass:S,unmaskTextClass:b,maskTextSelector:v,unmaskTextSelector:O}=t,L=Gy(e,r,o,i),M=My(e),w={},U=e.attributes.length;for(let k=0;k<U;k++){let N=e.attributes[k];N.name&&!gf(M,N.name,N.value)&&(w[N.name]=hf(n,M,Qn(N.name),N.value,e,c))}if(M==="link"&&s){let k=Array.from(n.styleSheets).find(K=>K.href===e.href),N=null;k&&(N=Oi(k)),N&&(delete w.rel,delete w.href,w._cssText=Di(N,k.href))}if(M==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){let k=Oi(e.sheet);k&&(w._cssText=Di(k,bc()))}if(M==="input"||M==="textarea"||M==="select"||M==="option"){let k=e,N=Sc(k),K=Ni(k,Ka(M),N),se=k.checked;if(N!=="submit"&&N!=="button"&&K){let de=er(k,S,v,b,O,ji({type:N,tagName:Ka(M),maskInputOptions:a}));w.value=ro({isMasked:de,element:k,value:K,maskInputFn:u})}se&&(w.checked=se)}if(M==="option"&&(e.selected&&!a.select?w.selected=!0:delete w.selected),M==="canvas"&&p){if(e.__context==="2d")ky(e)||(w.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){let k=e.toDataURL(l.type,l.quality),N=document.createElement("canvas");N.width=e.width,N.height=e.height;let K=N.toDataURL(l.type,l.quality);k!==K&&(w.rr_dataURL=k)}}if(M==="img"&&d){qn||(qn=n.createElement("canvas"),Vd=qn.getContext("2d"));let k=e,N=k.crossOrigin;k.crossOrigin="anonymous";let K=()=>{k.removeEventListener("load",K);try{qn.width=k.naturalWidth,qn.height=k.naturalHeight,Vd.drawImage(k,0,0),w.rr_dataURL=qn.toDataURL(l.type,l.quality)}catch(se){console.warn(`Cannot inline img src=${k.currentSrc}! Error: ${se}`)}N?w.crossOrigin=N:k.removeAttribute("crossorigin")};k.complete&&k.naturalWidth!==0?K():k.addEventListener("load",K)}if((M==="audio"||M==="video")&&(w.rr_mediaState=e.paused?"paused":"played",w.rr_mediaCurrentTime=e.currentTime),g||(e.scrollLeft&&(w.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(w.rr_scrollTop=e.scrollTop)),L){let{width:k,height:N}=e.getBoundingClientRect();w={class:w.class,rr_width:`${k}px`,rr_height:`${N}px`}}M==="iframe"&&!m(w.src)&&(e.contentDocument||(w.rr_src=w.src),delete w.src);let ne;try{customElements.get(M)&&(ne=!0)}catch{}return{type:pe.Element,tagName:M,attributes:w,childNodes:[],isSVG:$y(e)||void 0,needBlock:L,rootId:E,isCustom:ne}}function ee(e){return e==null?"":e.toLowerCase()}function Jy(e,t){if(t.comment&&e.type===pe.Comment)return!0;if(e.type===pe.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&e.attributes.href.endsWith(".js")))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(ee(e.attributes.name).match(/^msapplication-tile(image|color)$/)||ee(e.attributes.name)==="application-name"||ee(e.attributes.rel)==="icon"||ee(e.attributes.rel)==="apple-touch-icon"||ee(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&ee(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(ee(e.attributes.property).match(/^(og|twitter|fb):/)||ee(e.attributes.name).match(/^(og|twitter):/)||ee(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(ee(e.attributes.name)==="robots"||ee(e.attributes.name)==="googlebot"||ee(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(ee(e.attributes.name)==="author"||ee(e.attributes.name)==="generator"||ee(e.attributes.name)==="framework"||ee(e.attributes.name)==="publisher"||ee(e.attributes.name)==="progid"||ee(e.attributes.property).match(/^article:/)||ee(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(ee(e.attributes.name)==="google-site-verification"||ee(e.attributes.name)==="yandex-verification"||ee(e.attributes.name)==="csrf-token"||ee(e.attributes.name)==="p:domain_verify"||ee(e.attributes.name)==="verify-v1"||ee(e.attributes.name)==="verification"||ee(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Jn(e,t){let{doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:p=!1,inlineStylesheet:m=!0,maskInputOptions:g={},maskAttributeFn:E,maskTextFn:T,maskInputFn:S,slimDOMOptions:b,dataURLOptions:v={},inlineImages:O=!1,recordCanvas:L=!1,onSerialize:M,onIframeLoad:w,iframeLoadTimeout:U=5e3,onStylesheetLoad:ne,stylesheetLoadTimeout:k=5e3,keepIframeSrcFn:N=()=>!1,newlyAddedElement:K=!1}=t,{preserveWhiteSpace:se=!0}=t,de=qy(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,maskAllText:a,unblockSelector:s,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,inlineStylesheet:m,maskInputOptions:g,maskAttributeFn:E,maskTextFn:T,maskInputFn:S,dataURLOptions:v,inlineImages:O,recordCanvas:L,keepIframeSrcFn:N,newlyAddedElement:K});if(!de)return console.warn(e,"not serialized"),null;let Pe;r.hasNode(e)?Pe=r.getId(e):Jy(de,b)||!se&&de.type===pe.Text&&!de.isStyle&&!de.textContent.replace(/^\s+|\s+$/gm,"").length?Pe=oo:Pe=Ec();let X=Object.assign(de,{id:Pe});if(r.add(e,X),Pe===oo)return null;M&&M(e);let We=!p;if(X.type===pe.Element){We=We&&!X.needBlock,delete X.needBlock;let le=e.shadowRoot;le&&to(le)&&(X.isShadowHost=!0)}if((X.type===pe.Document||X.type===pe.Element)&&We){b.headWhitespace&&X.type===pe.Element&&X.tagName==="head"&&(se=!1);let le={doc:n,mirror:r,blockClass:o,blockSelector:i,maskAllText:a,unblockSelector:s,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:p,inlineStylesheet:m,maskInputOptions:g,maskAttributeFn:E,maskTextFn:T,maskInputFn:S,slimDOMOptions:b,dataURLOptions:v,inlineImages:O,recordCanvas:L,preserveWhiteSpace:se,onSerialize:M,onIframeLoad:w,iframeLoadTimeout:U,onStylesheetLoad:ne,stylesheetLoadTimeout:k,keepIframeSrcFn:N};for(let Ce of Array.from(e.childNodes)){let Xe=Jn(Ce,le);Xe&&X.childNodes.push(Xe)}if(Ty(e)&&e.shadowRoot)for(let Ce of Array.from(e.shadowRoot.childNodes)){let Xe=Jn(Ce,le);Xe&&(to(e.shadowRoot)&&(Xe.isShadow=!0),X.childNodes.push(Xe))}}return e.parentNode&&eo(e.parentNode)&&to(e.parentNode)&&(X.isShadow=!0),X.type===pe.Element&&X.tagName==="iframe"&&zy(e,()=>{let le=e.contentDocument;if(le&&w){let Ce=Jn(le,{doc:le,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:m,maskInputOptions:g,maskAttributeFn:E,maskTextFn:T,maskInputFn:S,slimDOMOptions:b,dataURLOptions:v,inlineImages:O,recordCanvas:L,preserveWhiteSpace:se,onSerialize:M,onIframeLoad:w,iframeLoadTimeout:U,onStylesheetLoad:ne,stylesheetLoadTimeout:k,keepIframeSrcFn:N});Ce&&w(e,Ce)}},U),X.type===pe.Element&&X.tagName==="link"&&X.attributes.rel==="stylesheet"&&jy(e,()=>{if(ne){let le=Jn(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:m,maskInputOptions:g,maskAttributeFn:E,maskTextFn:T,maskInputFn:S,slimDOMOptions:b,dataURLOptions:v,inlineImages:O,recordCanvas:L,preserveWhiteSpace:se,onSerialize:M,onIframeLoad:w,iframeLoadTimeout:U,onStylesheetLoad:ne,stylesheetLoadTimeout:k,keepIframeSrcFn:N});le&&ne(e,le)}},k),X}function Xy(e,t){let{mirror:n=new Mi,blockClass:r="rr-block",blockSelector:o=null,unblockSelector:i=null,maskAllText:s=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:l=null,inlineStylesheet:d=!0,inlineImages:p=!1,recordCanvas:m=!1,maskAllInputs:g=!1,maskAttributeFn:E,maskTextFn:T,maskInputFn:S,slimDOM:b=!1,dataURLOptions:v,preserveWhiteSpace:O,onSerialize:L,onIframeLoad:M,iframeLoadTimeout:w,onStylesheetLoad:U,stylesheetLoadTimeout:ne,keepIframeSrcFn:k=()=>!1}=t||{};return Jn(e,{doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,maskAllText:s,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:d,maskInputOptions:g===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:g===!1?{}:g,maskAttributeFn:E,maskTextFn:T,maskInputFn:S,slimDOMOptions:b===!0||b==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:b==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:b===!1?{}:b,dataURLOptions:v,inlineImages:p,recordCanvas:m,preserveWhiteSpace:O,onSerialize:L,onIframeLoad:M,iframeLoadTimeout:w,onStylesheetLoad:U,stylesheetLoadTimeout:ne,keepIframeSrcFn:k,newlyAddedElement:!1})}function Ut(e){let t,n=e[0],r=1;for(;r<e.length;){let o=e[r],i=e[r+1];if(r+=2,(o==="optionalAccess"||o==="optionalCall")&&n==null)return;o==="access"||o==="optionalAccess"?(t=n,n=i(n)):(o==="call"||o==="optionalCall")&&(n=i((...s)=>n.call(t,...s)),t=void 0)}return n}function we(e,t,n=document){let r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}var Yn=`Please stop import mirror directly. Instead of that,\r
|
|
27
|
-
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
28
|
-
or you can use record.mirror to access the mirror instance during recording.`,Kd={map:{},getId(){return console.error(Yn),-1},getNode(){return console.error(Yn),null},removeNodeFromMap(){console.error(Yn)},has(){return console.error(Yn),!1},reset(){console.error(Yn)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Kd=new Proxy(Kd,{get(e,t,n){return t==="map"&&console.error(Yn),Reflect.get(e,t,n)}}));function io(e,t,n={}){let r=null,o=0;return function(...i){let s=Date.now();!o&&n.leading===!1&&(o=s);let a=t-(s-o),c=this;a<=0||a>t?(r&&(rS(r),r=null),o=s,e.apply(c,i)):!r&&n.trailing!==!1&&(r=qi(()=>{o=n.leading===!1?0:Date.now(),r=null,e.apply(c,i)},a))}}function _f(e,t,n,r,o=window){let i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(s){qi(()=>{n.set.call(this,s)},0),i&&i.set&&i.set.call(this,s)}}),()=>_f(e,t,i||{},!0)}function Tc(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}var Li=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Li=()=>new Date().getTime());function yf(e){let t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:Ut([t,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollLeft])||Ut([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollLeft])||Ut([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollLeft])||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:Ut([t,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollTop])||Ut([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollTop])||Ut([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollTop])||0}}function Sf(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ef(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function bf(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function ct(e,t,n,r,o){if(!e)return!1;let i=bf(e);if(!i)return!1;let s=Kn(t,n);if(!o){let u=r&&i.matches(r);return s(i)&&!u}let a=hn(i,s),c=-1;return a<0?!1:(r&&(c=hn(i,Kn(null,r))),a>-1&&c<0?!0:a<c)}function Zy(e,t){return t.getId(e)!==-1}function qa(e,t){return t.getId(e)===oo}function Tf(e,t){if(eo(e))return!1;let n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?Tf(e.parentNode,t):!0:!0}function Ja(e){return!!e.changedTouches}function Qy(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function If(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function vf(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Xa(e){return!!Ut([e,"optionalAccess",t=>t.shadowRoot])}var Za=class{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return $s(this.styleIDMap.get(t),()=>-1)}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function xf(e){let t=null;return Ut([e,"access",n=>n.getRootNode,"optionalCall",n=>n(),"optionalAccess",n=>n.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function eS(e){let t=e,n;for(;n=xf(t);)t=n;return t}function tS(e){let t=e.ownerDocument;if(!t)return!1;let n=eS(e);return t.contains(n)}function wf(e){let t=e.ownerDocument;return t?t.contains(e)||tS(e):!1}var Jd={};function Ic(e){let t=Jd[e];if(t)return t;let n=window.document,r=window[e];if(n&&typeof n.createElement=="function")try{let o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);let i=o.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(o)}catch{}return Jd[e]=r.bind(window)}function nS(...e){return Ic("requestAnimationFrame")(...e)}function qi(...e){return Ic("setTimeout")(...e)}function rS(...e){return Ic("clearTimeout")(...e)}var $=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))($||{}),G=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(G||{}),ve=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(ve||{}),Rt=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Rt||{});function oS(e){let t,n=e[0],r=1;for(;r<e.length;){let o=e[r],i=e[r+1];if(r+=2,(o==="optionalAccess"||o==="optionalCall")&&n==null)return;o==="access"||o==="optionalAccess"?(t=n,n=i(n)):(o==="call"||o==="optionalCall")&&(n=i((...s)=>n.call(t,...s)),t=void 0)}return n}function Xd(e){return"__ln"in e}var Qa=class{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=oS([n,"optionalAccess",o=>o.next])||null;return n}addNode(t){let n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&Xd(t.previousSibling)){let r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&Xd(t.nextSibling)&&t.nextSibling.__ln.previous){let r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(t){let n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}},Zd=(e,t)=>`${e}@${t}`,ec=class{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;let t=[],n=new Set,r=new Qa,o=c=>{let u=c,l=oo;for(;l===oo;)u=u&&u.nextSibling,l=u&&this.mirror.getId(u);return l},i=c=>{if(!c.parentNode||!wf(c))return;let u=eo(c.parentNode)?this.mirror.getId(xf(c)):this.mirror.getId(c.parentNode),l=o(c);if(u===-1||l===-1)return r.addNode(c);let d=Jn(c,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:p=>{If(p,this.mirror)&&this.iframeManager.addIframe(p),vf(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),Xa(c)&&this.shadowDomManager.addShadowRoot(c.shadowRoot,this.doc)},onIframeLoad:(p,m)=>{this.iframeManager.attachIframe(p,m),this.shadowDomManager.observeAttachShadow(p)},onStylesheetLoad:(p,m)=>{this.stylesheetManager.attachLinkElement(p,m)}});d&&(t.push({parentId:u,nextId:l,node:d}),n.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let c of this.movedSet)Qd(this.removes,c,this.mirror)&&!this.movedSet.has(c.parentNode)||i(c);for(let c of this.addedSet)!ef(this.droppedSet,c)&&!Qd(this.removes,c,this.mirror)||ef(this.movedSet,c)?i(c):this.droppedSet.add(c);let s=null;for(;r.length;){let c=null;if(s){let u=this.mirror.getId(s.value.parentNode),l=o(s.value);u!==-1&&l!==-1&&(c=s)}if(!c){let u=r.tail;for(;u;){let l=u;if(u=u.previous,l){let d=this.mirror.getId(l.value.parentNode);if(o(l.value)===-1)continue;if(d!==-1){c=l;break}else{let m=l.value;if(m.parentNode&&m.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let g=m.parentNode.host;if(this.mirror.getId(g)!==-1){c=l;break}}}}}}if(!c){for(;r.head;)r.removeNode(r.head.value);break}s=c.previous,r.removeNode(c.value),i(c.value)}let a={texts:this.texts.map(c=>({id:this.mirror.getId(c.node),value:c.value})).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{let{attributes:u}=c;if(typeof u.style=="string"){let l=JSON.stringify(c.styleDiff),d=JSON.stringify(c._unchangedStyles);l.length<u.style.length&&(l+d).split("var(").length===u.style.split("var(").length&&(u.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:u}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=t=>{if(!qa(t.target,this.mirror))switch(t.type){case"characterData":{let n=t.target.textContent;!ct(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:er(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,bf(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{let n=t.target,r=t.attributeName,o=t.target.getAttribute(r);if(r==="value"){let s=Sc(n),a=n.tagName;o=Ni(n,a,s);let c=ji({maskInputOptions:this.maskInputOptions,tagName:a,type:s}),u=er(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,c);o=ro({isMasked:u,element:n,value:o,maskInputFn:this.maskInputFn})}if(ct(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||o===t.oldValue)return;let i=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(o))if(!n.contentDocument)r="rr_src";else return;if(i||(i={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(t.target,i)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!gf(n.tagName,r)&&(i.attributes[r]=hf(this.doc,Qn(n.tagName),Qn(r),o,n,this.maskAttributeFn),r==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let s=this.unattachedDoc.createElement("span");t.oldValue&&s.setAttribute("style",t.oldValue);for(let a of Array.from(n.style)){let c=n.style.getPropertyValue(a),u=n.style.getPropertyPriority(a);c!==s.style.getPropertyValue(a)||u!==s.style.getPropertyPriority(a)?u===""?i.styleDiff[a]=c:i.styleDiff[a]=[c,u]:i._unchangedStyles[a]=[c,u]}for(let a of Array.from(s.style))n.style.getPropertyValue(a)===""&&(i.styleDiff[a]=!1)}break}case"childList":{if(ct(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{let r=this.mirror.getId(n),o=eo(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);ct(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||qa(n,this.mirror)||!Zy(n,this.mirror)||(this.addedSet.has(n)?(tc(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||Tf(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[Zd(r,o)]?tc(this.movedSet,n):this.removes.push({parentId:o,id:r,isShadow:eo(t.target)&&to(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(qa(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[Zd(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);ct(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes.forEach(r=>this.genAdds(r)),Xa(t)&&t.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,t)}))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(n=>{this[n]=t[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}};function tc(e,t){e.delete(t),t.childNodes.forEach(n=>tc(e,n))}function Qd(e,t,n){return e.length===0?!1:Cf(e,t,n)}function Cf(e,t,n){let{parentNode:r}=t;if(!r)return!1;let o=n.getId(r);return e.some(i=>i.id===o)?!0:Cf(e,r,n)}function ef(e,t){return e.size===0?!1:Rf(e,t)}function Rf(e,t){let{parentNode:n}=t;return n?e.has(n)?!0:Rf(e,n):!1}var no;function iS(e){no=e}function sS(){no=void 0}var z=e=>no?(...n)=>{try{return e(...n)}catch(r){if(no&&no(r)===!0)return()=>{};throw r}}:e;function St(e){let t,n=e[0],r=1;for(;r<e.length;){let o=e[r],i=e[r+1];if(r+=2,(o==="optionalAccess"||o==="optionalCall")&&n==null)return;o==="access"||o==="optionalAccess"?(t=n,n=i(n)):(o==="call"||o==="optionalCall")&&(n=i((...s)=>n.call(t,...s)),t=void 0)}return n}var Xn=[];function lo(e){try{if("composedPath"in e){let t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function kf(e,t){let n=new ec;Xn.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver,o=St([window,"optionalAccess",s=>s.Zone,"optionalAccess",s=>s.__symbol__,"optionalCall",s=>s("MutationObserver")]);o&&window[o]&&(r=window[o]);let i=new r(z(s=>{e.onMutation&&e.onMutation(s)===!1||n.processMutations.bind(n)(s)}));return i.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function aS({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};let o=typeof t.mousemove=="number"?t.mousemove:50,i=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500,s=[],a,c=io(z(d=>{let p=Date.now()-a;e(s.map(m=>(m.timeOffset-=p,m)),d),s=[],a=null}),i),u=z(io(z(d=>{let p=lo(d),{clientX:m,clientY:g}=Ja(d)?d.changedTouches[0]:d;a||(a=Li()),s.push({x:m,y:g,id:r.getId(p),timeOffset:Li()-a}),c(typeof DragEvent<"u"&&d instanceof DragEvent?G.Drag:d instanceof MouseEvent?G.MouseMove:G.TouchMove)}),o,{trailing:!1})),l=[we("mousemove",u,n),we("touchmove",u,n),we("drag",u,n)];return z(()=>{l.forEach(d=>d())})}function cS({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,sampling:s}){if(s.mouseInteraction===!1)return()=>{};let a=s.mouseInteraction===!0||s.mouseInteraction===void 0?{}:s.mouseInteraction,c=[],u=null,l=d=>p=>{let m=lo(p);if(ct(m,r,o,i,!0))return;let g=null,E=d;if("pointerType"in p){switch(p.pointerType){case"mouse":g=Rt.Mouse;break;case"touch":g=Rt.Touch;break;case"pen":g=Rt.Pen;break}g===Rt.Touch?ve[d]===ve.MouseDown?E="TouchStart":ve[d]===ve.MouseUp&&(E="TouchEnd"):Rt.Pen}else Ja(p)&&(g=Rt.Touch);g!==null?(u=g,(E.startsWith("Touch")&&g===Rt.Touch||E.startsWith("Mouse")&&g===Rt.Mouse)&&(g=null)):ve[d]===ve.Click&&(g=u,u=null);let T=Ja(p)?p.changedTouches[0]:p;if(!T)return;let S=n.getId(m),{clientX:b,clientY:v}=T;z(e)({type:ve[E],id:S,x:b,y:v,...g!==null&&{pointerType:g}})};return Object.keys(ve).filter(d=>Number.isNaN(Number(d))&&!d.endsWith("_Departed")&&a[d]!==!1).forEach(d=>{let p=Qn(d),m=l(d);if(window.PointerEvent)switch(ve[d]){case ve.MouseDown:case ve.MouseUp:p=p.replace("mouse","pointer");break;case ve.TouchStart:case ve.TouchEnd:return}c.push(we(p,m,t))}),z(()=>{c.forEach(d=>d())})}function Af({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,sampling:s}){let a=z(io(z(c=>{let u=lo(c);if(!u||ct(u,r,o,i,!0))return;let l=n.getId(u);if(u===t&&t.defaultView){let d=yf(t.defaultView);e({id:l,x:d.left,y:d.top})}else e({id:l,x:u.scrollLeft,y:u.scrollTop})}),s.scroll||100));return we("scroll",a,t)}function uS({viewportResizeCb:e},{win:t}){let n=-1,r=-1,o=z(io(z(()=>{let i=Sf(),s=Ef();(n!==i||r!==s)&&(e({width:Number(s),height:Number(i)}),n=i,r=s)}),200));return we("resize",o,t)}var lS=["INPUT","TEXTAREA","SELECT"],tf=new WeakMap;function dS({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,ignoreClass:s,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:l,userTriggeredOnInput:d,maskTextClass:p,unmaskTextClass:m,maskTextSelector:g,unmaskTextSelector:E}){function T(w){let U=lo(w),ne=w.isTrusted,k=U&&Ka(U.tagName);if(k==="OPTION"&&(U=U.parentElement),!U||!k||lS.indexOf(k)<0||ct(U,r,o,i,!0))return;let N=U;if(N.classList.contains(s)||a&&N.matches(a))return;let K=Sc(U),se=Ni(N,k,K),de=!1,Pe=ji({maskInputOptions:c,tagName:k,type:K}),X=er(U,p,g,m,E,Pe);(K==="radio"||K==="checkbox")&&(de=U.checked),se=ro({isMasked:X,element:U,value:se,maskInputFn:u}),S(U,d?{text:se,isChecked:de,userTriggered:ne}:{text:se,isChecked:de});let We=U.name;K==="radio"&&We&&de&&t.querySelectorAll(`input[type="radio"][name="${We}"]`).forEach(le=>{if(le!==U){let Ce=ro({isMasked:X,element:le,value:Ni(le,k,K),maskInputFn:u});S(le,d?{text:Ce,isChecked:!de,userTriggered:!1}:{text:Ce,isChecked:!de})}})}function S(w,U){let ne=tf.get(w);if(!ne||ne.text!==U.text||ne.isChecked!==U.isChecked){tf.set(w,U);let k=n.getId(w);z(e)({...U,id:k})}}let v=(l.input==="last"?["change"]:["input","change"]).map(w=>we(w,z(T),t)),O=t.defaultView;if(!O)return()=>{v.forEach(w=>w())};let L=O.Object.getOwnPropertyDescriptor(O.HTMLInputElement.prototype,"value"),M=[[O.HTMLInputElement.prototype,"value"],[O.HTMLInputElement.prototype,"checked"],[O.HTMLSelectElement.prototype,"value"],[O.HTMLTextAreaElement.prototype,"value"],[O.HTMLSelectElement.prototype,"selectedIndex"],[O.HTMLOptionElement.prototype,"selected"]];return L&&L.set&&v.push(...M.map(w=>_f(w[0],w[1],{set(){z(T)({target:this,isTrusted:!1})}},!1,O))),z(()=>{v.forEach(w=>w())})}function Pi(e){let t=[];function n(r,o){if(Ri("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Ri("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Ri("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Ri("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){let s=Array.from(r.parentRule.cssRules).indexOf(r);o.unshift(s)}else if(r.parentStyleSheet){let s=Array.from(r.parentStyleSheet.cssRules).indexOf(r);o.unshift(s)}return o}return n(e,t)}function $t(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function fS({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:z((l,d,p)=>{let[m,g]=p,{id:E,styleId:T}=$t(d,t,n.styleMirror);return(E&&E!==-1||T&&T!==-1)&&e({id:E,styleId:T,adds:[{rule:m,index:g}]}),l.apply(d,p)})});let i=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:z((l,d,p)=>{let[m]=p,{id:g,styleId:E}=$t(d,t,n.styleMirror);return(g&&g!==-1||E&&E!==-1)&&e({id:g,styleId:E,removes:[{index:m}]}),l.apply(d,p)})});let s;r.CSSStyleSheet.prototype.replace&&(s=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:z((l,d,p)=>{let[m]=p,{id:g,styleId:E}=$t(d,t,n.styleMirror);return(g&&g!==-1||E&&E!==-1)&&e({id:g,styleId:E,replace:m}),l.apply(d,p)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:z((l,d,p)=>{let[m]=p,{id:g,styleId:E}=$t(d,t,n.styleMirror);return(g&&g!==-1||E&&E!==-1)&&e({id:g,styleId:E,replaceSync:m}),l.apply(d,p)})}));let c={};ki("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(ki("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),ki("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),ki("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));let u={};return Object.entries(c).forEach(([l,d])=>{u[l]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=new Proxy(u[l].insertRule,{apply:z((p,m,g)=>{let[E,T]=g,{id:S,styleId:b}=$t(m.parentStyleSheet,t,n.styleMirror);return(S&&S!==-1||b&&b!==-1)&&e({id:S,styleId:b,adds:[{rule:E,index:[...Pi(m),T||0]}]}),p.apply(m,g)})}),d.prototype.deleteRule=new Proxy(u[l].deleteRule,{apply:z((p,m,g)=>{let[E]=g,{id:T,styleId:S}=$t(m.parentStyleSheet,t,n.styleMirror);return(T&&T!==-1||S&&S!==-1)&&e({id:T,styleId:S,removes:[{index:[...Pi(m),E]}]}),p.apply(m,g)})})}),z(()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=i,s&&(r.CSSStyleSheet.prototype.replace=s),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([l,d])=>{d.prototype.insertRule=u[l].insertRule,d.prototype.deleteRule=u[l].deleteRule})})}function Of({mirror:e,stylesheetManager:t},n){let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);let o=n.nodeName==="#document"?St([n,"access",s=>s.defaultView,"optionalAccess",s=>s.Document]):St([n,"access",s=>s.ownerDocument,"optionalAccess",s=>s.defaultView,"optionalAccess",s=>s.ShadowRoot]),i=St([o,"optionalAccess",s=>s.prototype])?Object.getOwnPropertyDescriptor(St([o,"optionalAccess",s=>s.prototype]),"adoptedStyleSheets"):void 0;return r===null||r===-1||!o||!i?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){return St([i,"access",s=>s.get,"optionalAccess",s=>s.call,"call",s=>s(this)])},set(s){let a=St([i,"access",c=>c.set,"optionalAccess",c=>c.call,"call",c=>c(this,s)]);if(r!==null&&r!==-1)try{t.adoptStyleSheets(s,r)}catch{}return a}}),z(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))}function pS({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){let i=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:z((a,c,u)=>{let[l,d,p]=u;if(n.has(l))return i.apply(c,[l,d,p]);let{id:m,styleId:g}=$t(St([c,"access",E=>E.parentRule,"optionalAccess",E=>E.parentStyleSheet]),t,r.styleMirror);return(m&&m!==-1||g&&g!==-1)&&e({id:m,styleId:g,set:{property:l,value:d,priority:p},index:Pi(c.parentRule)}),a.apply(c,u)})});let s=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:z((a,c,u)=>{let[l]=u;if(n.has(l))return s.apply(c,[l]);let{id:d,styleId:p}=$t(St([c,"access",m=>m.parentRule,"optionalAccess",m=>m.parentStyleSheet]),t,r.styleMirror);return(d&&d!==-1||p&&p!==-1)&&e({id:d,styleId:p,remove:{property:l},index:Pi(c.parentRule)}),a.apply(c,u)})}),z(()=>{o.CSSStyleDeclaration.prototype.setProperty=i,o.CSSStyleDeclaration.prototype.removeProperty=s})}function mS({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:o,sampling:i,doc:s}){let a=z(u=>io(z(l=>{let d=lo(l);if(!d||ct(d,t,n,r,!0))return;let{currentTime:p,volume:m,muted:g,playbackRate:E}=d;e({type:u,id:o.getId(d),currentTime:p,volume:m,muted:g,playbackRate:E})}),i.media||500)),c=[we("play",a(0),s),we("pause",a(1),s),we("seeked",a(2),s),we("volumechange",a(3),s),we("ratechange",a(4),s)];return z(()=>{c.forEach(u=>u())})}function hS({fontCb:e,doc:t}){let n=t.defaultView;if(!n)return()=>{};let r=[],o=new WeakMap,i=n.FontFace;n.FontFace=function(c,u,l){let d=new i(c,u,l);return o.set(d,{family:c,buffer:typeof u!="string",descriptors:l,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),d};let s=Tc(t.fonts,"add",function(a){return function(c){return qi(z(()=>{let u=o.get(c);u&&(e(u),o.delete(c))}),0),a.apply(this,[c])}});return r.push(()=>{n.FontFace=i}),r.push(s),z(()=>{r.forEach(a=>a())})}function gS(e){let{doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,selectionCb:s}=e,a=!0,c=z(()=>{let u=t.getSelection();if(!u||a&&St([u,"optionalAccess",p=>p.isCollapsed]))return;a=u.isCollapsed||!1;let l=[],d=u.rangeCount||0;for(let p=0;p<d;p++){let m=u.getRangeAt(p),{startContainer:g,startOffset:E,endContainer:T,endOffset:S}=m;ct(g,r,o,i,!0)||ct(T,r,o,i,!0)||l.push({start:n.getId(g),startOffset:E,end:n.getId(T),endOffset:S})}s({ranges:l})});return c(),we("selectionchange",c)}function _S({doc:e,customElementCb:t}){let n=e.defaultView;return!n||!n.customElements?()=>{}:Tc(n.customElements,"define",function(o){return function(i,s,a){try{t({define:{name:i}})}catch{}return o.apply(this,[i,s,a])}})}function yS(e,t={}){let n=e.doc.defaultView;if(!n)return()=>{};let r=kf(e,e.doc),o=aS(e),i=cS(e),s=Af(e),a=uS(e,{win:n}),c=dS(e),u=mS(e),l=fS(e,{win:n}),d=Of(e,e.doc),p=pS(e,{win:n}),m=e.collectFonts?hS(e):()=>{},g=gS(e),E=_S(e),T=[];for(let S of e.plugins)T.push(S.observer(S.callback,n,S.options));return z(()=>{Xn.forEach(S=>S.reset()),r.disconnect(),o(),i(),s(),a(),c(),u(),l(),d(),p(),m(),g(),E(),T.forEach(S=>S())})}function Ri(e){return typeof window[e]<"u"}function ki(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}var so=class{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,o){let i=r||this.getIdToRemoteIdMap(t),s=o||this.getRemoteIdToIdMap(t),a=i.get(n);return a||(a=this.generateIdFn(),i.set(n,a),s.set(a,n)),a}getIds(t,n){let r=this.getIdToRemoteIdMap(t),o=this.getRemoteIdToIdMap(t);return n.map(i=>this.getId(t,i,r,o))}getRemoteId(t,n,r){let o=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;let i=o.get(n);return i||-1}getRemoteIds(t,n){let r=this.getRemoteIdToIdMap(t);return n.map(o=>this.getRemoteId(t,o,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}};function nf(e){let t,n=e[0],r=1;for(;r<e.length;){let o=e[r],i=e[r+1];if(r+=2,(o==="optionalAccess"||o==="optionalCall")&&n==null)return;o==="access"||o==="optionalAccess"?(t=n,n=i(n)):(o==="call"||o==="optionalCall")&&(n=i((...s)=>n.call(t,...s)),t=void 0)}return n}var nc=class{constructor(){this.crossOriginIframeMirror=new so(Ec),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}},rc=class{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new so(Ec),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new so(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),nf([this,"access",r=>r.loadListener,"optionalCall",r=>r(t)]),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){let n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;let o=this.crossOriginIframeMap.get(t.source);if(!o)return;let i=this.transformCrossOriginEvent(o,n.data.event);i&&this.wrappedEmit(i,n.data.isCheckout)}transformCrossOriginEvent(t,n){switch(n.type){case $.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);let r=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(n.data.node,r),{timestamp:n.timestamp,type:$.IncrementalSnapshot,data:{source:G.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case $.Meta:case $.Load:case $.DomContentLoaded:return!1;case $.Plugin:return n;case $.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case $.IncrementalSnapshot:switch(n.data.source){case G.Mutation:return n.data.adds.forEach(r=>{this.replaceIds(r,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,t);let o=this.crossOriginIframeRootIdMap.get(t);o&&this.patchRootIdOnNode(r.node,o)}),n.data.removes.forEach(r=>{this.replaceIds(r,t,["parentId","id"])}),n.data.attributes.forEach(r=>{this.replaceIds(r,t,["id"])}),n.data.texts.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case G.Drag:case G.TouchMove:case G.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case G.ViewportResize:return!1;case G.MediaInteraction:case G.MouseInteraction:case G.Scroll:case G.CanvasMutation:case G.Input:return this.replaceIds(n.data,t,["id"]),n;case G.StyleSheetRule:case G.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case G.Font:return n;case G.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),n;case G.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),nf([n,"access",r=>r.data,"access",r=>r.styles,"optionalAccess",r=>r.forEach,"call",r=>r(o=>{this.replaceStyleIds(o,t,["styleId"])})]),n}}return!1}replace(t,n,r,o){for(let i of o)!Array.isArray(n[i])&&typeof n[i]!="number"||(Array.isArray(n[i])?n[i]=t.getIds(r,n[i]):n[i]=t.getId(r,n[i]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==pe.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}},oc=class{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}},ic=class{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,n){if(!to(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);let r=kf({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Af({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),qi(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(Of({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,n){let r=this;this.restoreHandlers.push(Tc(t.prototype,"attachShadow",function(o){return function(i){let s=o.call(this,i);return this.shadowRoot&&wf(this)&&r.addShadowRoot(this.shadowRoot,n),s}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},Fi=class{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}},sc=class{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new Za,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;let r={id:n,styleIds:[]},o=[];for(let i of t){let s;this.styleMirror.has(i)?s=this.styleMirror.getId(i):(s=this.styleMirror.add(i),o.push({styleId:s,rules:Array.from(i.rules||CSSRule,(a,c)=>({rule:mf(a),index:c}))})),r.styleIds.push(s)}o.length>0&&(r.styles=o),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}},ac=class{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){nS(()=>{this.clear(),this.loop&&this.periodicallyClear()})}inOtherBuffer(t,n){let r=this.nodeMap.get(t);return r&&Array.from(r).some(o=>o!==n)}add(t,n){this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}},ue,Bi,at=Ry();function Wt(e={}){let{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:i=null,unblockSelector:s=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:u=!1,maskTextClass:l="rr-mask",unmaskTextClass:d=null,maskTextSelector:p=null,unmaskTextSelector:m=null,inlineStylesheet:g=!0,maskAllInputs:E,maskInputOptions:T,slimDOMOptions:S,maskAttributeFn:b,maskInputFn:v,maskTextFn:O,maxCanvasSize:L=null,packFn:M,sampling:w={},dataURLOptions:U={},mousemoveWait:ne,recordCanvas:k=!1,recordCrossOriginIframes:N=!1,recordAfter:K=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:se=!1,collectFonts:de=!1,inlineImages:Pe=!1,plugins:X,keepIframeSrcFn:We=()=>!1,ignoreCSSAttributes:le=new Set([]),errorHandler:Ce,onMutation:Xe,getCanvasManager:is}=e;iS(Ce);let En=N?window.parent===window:!0,At=!1;if(!En)try{window.parent.document&&(At=!1)}catch{At=!0}if(En&&!t)throw new Error("emit function is required");ne!==void 0&&w.mousemove===void 0&&(w.mousemove=ne),at.reset();let bn=E===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:T!==void 0?T:{},sr=S===!0||S==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:S==="all",headMetaDescKeywords:S==="all"}:S||{};Qy();let ss,as=0,Vc=Y=>{for(let Ze of X||[])Ze.eventProcessor&&(Y=Ze.eventProcessor(Y));return M&&!At&&(Y=M(Y)),Y};ue=(Y,Ze)=>{let j=Y;if(j.timestamp=Li(),nn([Xn,"access",ie=>ie[0],"optionalAccess",ie=>ie.isFrozen,"call",ie=>ie()])&&j.type!==$.FullSnapshot&&!(j.type===$.IncrementalSnapshot&&j.data.source===G.Mutation)&&Xn.forEach(ie=>ie.unfreeze()),En)nn([t,"optionalCall",ie=>ie(Vc(j),Ze)]);else if(At){let ie={type:"rrweb",event:Vc(j),origin:window.location.origin,isCheckout:Ze};window.parent.postMessage(ie,"*")}if(j.type===$.FullSnapshot)ss=j,as=0;else if(j.type===$.IncrementalSnapshot){if(j.data.source===G.Mutation&&j.data.isAttachIframe)return;as++;let ie=r&&as>=r,V=n&&ss&&j.timestamp-ss.timestamp>n;(ie||V)&&us(!0)}};let _o=Y=>{ue({type:$.IncrementalSnapshot,data:{source:G.Mutation,...Y}})},Kc=Y=>ue({type:$.IncrementalSnapshot,data:{source:G.Scroll,...Y}}),cm=Y=>ue({type:$.IncrementalSnapshot,data:{source:G.CanvasMutation,...Y}}),um=Y=>ue({type:$.IncrementalSnapshot,data:{source:G.AdoptedStyleSheet,...Y}}),jt=new sc({mutationCb:_o,adoptedStyleSheetCb:um}),qt=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new nc:new rc({mirror:at,mutationCb:_o,stylesheetManager:jt,recordCrossOriginIframes:N,wrappedEmit:ue});for(let Y of X||[])Y.getMirror&&Y.getMirror({nodeMirror:at,crossOriginIframeMirror:qt.crossOriginIframeMirror,crossOriginIframeStyleMirror:qt.crossOriginIframeStyleMirror});let cs=new ac,Jc=ES(is,{mirror:at,win:window,mutationCb:Y=>ue({type:$.IncrementalSnapshot,data:{source:G.CanvasMutation,...Y}}),recordCanvas:k,blockClass:o,blockSelector:i,unblockSelector:s,maxCanvasSize:L,sampling:w.canvas,dataURLOptions:U,errorHandler:Ce}),yo=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new oc:new ic({mutationCb:_o,scrollCb:Kc,bypassOptions:{onMutation:Xe,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:m,inlineStylesheet:g,maskInputOptions:bn,dataURLOptions:U,maskAttributeFn:b,maskTextFn:O,maskInputFn:v,recordCanvas:k,inlineImages:Pe,sampling:w,slimDOMOptions:sr,iframeManager:qt,stylesheetManager:jt,canvasManager:Jc,keepIframeSrcFn:We,processedNodeManager:cs},mirror:at}),us=(Y=!1)=>{ue({type:$.Meta,data:{href:window.location.href,width:Ef(),height:Sf()}},Y),jt.reset(),yo.init(),Xn.forEach(j=>j.lock());let Ze=Xy(document,{mirror:at,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:m,inlineStylesheet:g,maskAllInputs:bn,maskAttributeFn:b,maskInputFn:v,maskTextFn:O,slimDOM:sr,dataURLOptions:U,recordCanvas:k,inlineImages:Pe,onSerialize:j=>{If(j,at)&&qt.addIframe(j),vf(j,at)&&jt.trackLinkElement(j),Xa(j)&&yo.addShadowRoot(j.shadowRoot,document)},onIframeLoad:(j,ie)=>{qt.attachIframe(j,ie),yo.observeAttachShadow(j)},onStylesheetLoad:(j,ie)=>{jt.attachLinkElement(j,ie)},keepIframeSrcFn:We});if(!Ze)return console.warn("Failed to snapshot the document");ue({type:$.FullSnapshot,data:{node:Ze,initialOffset:yf(window)}}),Xn.forEach(j=>j.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&jt.adoptStyleSheets(document.adoptedStyleSheets,at.getId(document))};Bi=us;try{let Y=[],Ze=ie=>z(yS)({onMutation:Xe,mutationCb:_o,mousemoveCb:(V,Yt)=>ue({type:$.IncrementalSnapshot,data:{source:Yt,positions:V}}),mouseInteractionCb:V=>ue({type:$.IncrementalSnapshot,data:{source:G.MouseInteraction,...V}}),scrollCb:Kc,viewportResizeCb:V=>ue({type:$.IncrementalSnapshot,data:{source:G.ViewportResize,...V}}),inputCb:V=>ue({type:$.IncrementalSnapshot,data:{source:G.Input,...V}}),mediaInteractionCb:V=>ue({type:$.IncrementalSnapshot,data:{source:G.MediaInteraction,...V}}),styleSheetRuleCb:V=>ue({type:$.IncrementalSnapshot,data:{source:G.StyleSheetRule,...V}}),styleDeclarationCb:V=>ue({type:$.IncrementalSnapshot,data:{source:G.StyleDeclaration,...V}}),canvasMutationCb:cm,fontCb:V=>ue({type:$.IncrementalSnapshot,data:{source:G.Font,...V}}),selectionCb:V=>{ue({type:$.IncrementalSnapshot,data:{source:G.Selection,...V}})},customElementCb:V=>{ue({type:$.IncrementalSnapshot,data:{source:G.CustomElement,...V}})},blockClass:o,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:m,maskInputOptions:bn,inlineStylesheet:g,sampling:w,recordCanvas:k,inlineImages:Pe,userTriggeredOnInput:se,collectFonts:de,doc:ie,maskAttributeFn:b,maskInputFn:v,maskTextFn:O,keepIframeSrcFn:We,blockSelector:i,unblockSelector:s,slimDOMOptions:sr,dataURLOptions:U,mirror:at,iframeManager:qt,stylesheetManager:jt,shadowDomManager:yo,processedNodeManager:cs,canvasManager:Jc,ignoreCSSAttributes:le,plugins:nn([X,"optionalAccess",V=>V.filter,"call",V=>V(Yt=>Yt.observer),"optionalAccess",V=>V.map,"call",V=>V(Yt=>({observer:Yt.observer,options:Yt.options,callback:lm=>ue({type:$.Plugin,data:{plugin:Yt.name,payload:lm}})}))])||[]},{});qt.addLoadListener(ie=>{try{Y.push(Ze(ie.contentDocument))}catch(V){console.warn(V)}});let j=()=>{us(),Y.push(Ze(document))};return document.readyState==="interactive"||document.readyState==="complete"?j():(Y.push(we("DOMContentLoaded",()=>{ue({type:$.DomContentLoaded,data:{}}),K==="DOMContentLoaded"&&j()})),Y.push(we("load",()=>{ue({type:$.Load,data:{}}),K==="load"&&j()},window))),()=>{Y.forEach(ie=>ie()),cs.destroy(),Bi=void 0,sS()}}catch(Y){console.warn(Y)}}function SS(e){if(!Bi)throw new Error("please take full snapshot after start recording");Bi(e)}Wt.mirror=at;Wt.takeFullSnapshot=SS;function ES(e,t){try{return e?e(t):new Fi}catch{return console.warn("Unable to initialize CanvasManager"),new Fi}}var bS=3,TS=5;function vc(e){return e>9999999999?e:e*1e3}function Ya(e){return e>9999999999?e/1e3:e}function fo(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:$.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:be(t,10,1e3)}}),t.category==="console")))}var IS="button,a";function Mf(e){return e.closest(IS)||e}function Nf(e){let t=Df(e);return!t||!(t instanceof Element)?t:Mf(t)}function Df(e){return vS(e)?e.target:e}function vS(e){return typeof e=="object"&&!!e&&"target"in e}var Gt;function xS(e){return Gt||(Gt=[],wS()),Gt.push(e),()=>{let t=Gt?Gt.indexOf(e):-1;t>-1&&Gt.splice(t,1)}}function wS(){Q(te,"open",function(e){return function(...t){if(Gt)try{Gt.forEach(n=>n())}catch{}return e.apply(te,t)}})}function CS(e,t,n){e.handleClick(t,n)}var cc=class{constructor(t,n,r=fo){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){let t=xS(()=>{this._lastMutation=rf()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,n){if(kS(n,this._ignoreSelector)||!AS(t))return;let r={timestamp:Ya(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(o=>o.node===r.node&&Math.abs(o.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=Ya(t)}registerScroll(t=Date.now()){this._lastScroll=Ya(t)}registerClick(t){let n=Mf(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){let t=[],n=rf();this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=n&&t.push(r)});for(let r of t){let o=this._clicks.indexOf(r);o>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(o,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){let n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scollTimeout,o=t.mutationAfter&&t.mutationAfter<=this._threshold,i=!r&&!o,{clickCount:s,clickBreadcrumb:a}=t;if(i){let c=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,u=c<this._timeout*1e3?"mutation":"timeout",l={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:te.location.href,route:n.getCurrentRoute(),timeAfterClickMs:c,endReason:u,clickCount:s||1}};this._addBreadcrumbEvent(n,l);return}if(s>1){let c={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:te.location.href,route:n.getCurrentRoute(),clickCount:s,metric:!0}};this._addBreadcrumbEvent(n,c)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=setTimeout(()=>this._checkClicks(),1e3)}},RS=["A","BUTTON","INPUT"];function kS(e,t){return!!(!RS.includes(e.tagName)||e.tagName==="INPUT"&&!["submit","button"].includes(e.getAttribute("type")||"")||e.tagName==="A"&&(e.hasAttribute("download")||e.hasAttribute("target")&&e.getAttribute("target")!=="_self")||t&&e.matches(t))}function AS(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function rf(){return Date.now()/1e3}function OS(e,t){try{if(!MS(t))return;let{source:n}=t.data;if(n===G.Mutation&&e.registerMutation(t.timestamp),n===G.Scroll&&e.registerScroll(t.timestamp),NS(t)){let{type:r,id:o}=t.data,i=Wt.mirror.getNode(o);i instanceof HTMLElement&&r===ve.Click&&e.registerClick(i)}}catch{}}function MS(e){return e.type===bS}function NS(e){return e.data.source===G.MouseInteraction}function Et(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var Hi;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(Hi||(Hi={}));var DS=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function LS(e){let t={};for(let n in e)if(DS.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}var PS=e=>t=>{if(!e.isEnabled())return;let n=FS(t);if(!n)return;let r=t.name==="click",o=r?t.event:void 0;r&&e.clickDetector&&o&&o.target&&!o.altKey&&!o.metaKey&&!o.ctrlKey&&!o.shiftKey&&CS(e.clickDetector,n,Nf(t.event)),fo(e,n)};function Lf(e,t){let n=Wt.mirror.getId(e),r=n&&Wt.mirror.getNode(n),o=r&&Wt.mirror.getMeta(r),i=o&&HS(o)?o:null;return{message:t,data:i?{nodeId:n,node:{id:n,tagName:i.tagName,textContent:Array.from(i.childNodes).map(s=>s.type===Hi.Text&&s.textContent).filter(Boolean).map(s=>s.trim()).join(""),attributes:LS(i.attributes)}}:{}}}function FS(e){let{target:t,message:n}=BS(e);return Et({category:`ui.${e.name}`,...Lf(t,n)})}function BS(e){let t=e.name==="click",n,r=null;try{r=t?Nf(e.event):Df(e.event),n=He(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function HS(e){return e.type===Hi.Element}function US(e,t){if(!e.isEnabled())return;e.updateUserActivity();let n=$S(t);n&&fo(e,n)}function $S(e){let{metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:i,target:s}=e;if(!s||GS(s)||!i)return null;let a=t||r||o,c=i.length===1;if(!a&&c)return null;let u=He(s,{maxStringLength:200})||"<unknown>",l=Lf(s,u);return Et({category:"ui.keyDown",message:u,data:{...l.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:i}})}function GS(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}var of={resource:YS,paint:jS,navigation:qS};function WS(e){return e.map(zS).filter(Boolean)}function zS(e){return of[e.entryType]?of[e.entryType](e):null}function tr(e){return((re||te.performance.timeOrigin)+e)/1e3}function jS(e){let{duration:t,entryType:n,name:r,startTime:o}=e,i=tr(o);return{type:n,name:r,start:i,end:i+t,data:void 0}}function qS(e){let{entryType:t,name:n,decodedBodySize:r,duration:o,domComplete:i,encodedBodySize:s,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:l,loadEventEnd:d,redirectCount:p,startTime:m,transferSize:g,type:E}=e;return o===0?null:{type:`${t}.${E}`,start:tr(m),end:tr(i),name:n,data:{size:g,decodedBodySize:r,encodedBodySize:s,duration:o,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:l,loadEventEnd:d,domComplete:i,redirectCount:p}}}function YS(e){let{entryType:t,initiatorType:n,name:r,responseEnd:o,startTime:i,decodedBodySize:s,encodedBodySize:a,responseStatus:c,transferSize:u}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:tr(i),end:tr(o),name:r,data:{size:u,statusCode:c,decodedBodySize:s,encodedBodySize:a}}}function VS(e){let t=e.entries,n=t[t.length-1],r=n?n.element:void 0,o=e.value,i=tr(o);return{type:"largest-contentful-paint",name:"largest-contentful-paint",start:i,end:i,data:{value:o,size:o,nodeId:r?Wt.mirror.getId(r):void 0}}}function KS(e){function t(o){e.performanceEntries.includes(o)||e.performanceEntries.push(o)}function n({entries:o}){o.forEach(t)}let r=[];return["navigation","paint","resource"].forEach(o=>{r.push(Le(o,n))}),r.push(Yr(({metric:o})=>{e.replayPerformanceEntries.push(VS(o))})),()=>{r.forEach(o=>o())}}var Z=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,JS='var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<<t[a-1];var s=new r(i[30]);for(a=1;a<30;++a)for(var o=i[a];o<i[a+1];++o)s[o]=o-i[a]<<5|a;return{b:i,r:s}},o=s(e,2),f=o.b,h=o.r;f[28]=258,h[258]=28;for(var l=s(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,a=0,s=new n(r);a<i;++a)t[a]&&++s[t[a]-1];var o,f=new n(r);for(a=1;a<r;++a)f[a]=f[a-1]+s[a-1]<<1;if(e){o=new n(1<<r);var h=15-r;for(a=0;a<i;++a)if(t[a])for(var l=a<<4|t[a],c=r-t[a],v=f[t[a]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>h]=l}else for(o=new n(i),a=0;a<i;++a)t[a]&&(o[a]=u[f[t[a]-1]++]>>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==r||r<0)&&(r=0),(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},A=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},_=function(r,e){for(var i=[],a=0;a<r.length;++a)r[a]&&i.push({s:a,f:r[a]});var s=i.length,o=i.slice();if(!s)return{t:F,l:0};if(1==s){var f=new t(i[0].s+1);return f[i[0].s]=1,{t:f,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var h=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:h.f+l.f,l:h,r:l};c!=s-1;)h=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:h.f+l.f,l:h,r:l};var d=o[0].s;for(a=1;a<s;++a)o[a].s>d&&(d=o[a].s);var g=new n(d+1),w=x(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<<y;for(o.sort((function(t,n){return g[n.s]-g[t.s]||t.f-n.f}));a<s;++a){var b=o[a].s;if(!(g[b]>e))break;p+=m-(1<<w-g[b]),g[b]=e}for(p>>=y;p>0;){var M=o[a].s;g[M]<e?p-=1<<e-g[M]++-1:++a}for(;a>=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},x=function(t,n,r){return-1==t.s?Math.max(x(t.l,n,r+1),x(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a<e;++a)t[i+a+4]=r[a];return 8*(i+4+e)},C=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=_(f,15),M=b.t,E=b.l,x=_(h,15),C=x.t,U=x.l,F=D(M),I=F.c,S=F.n,L=D(C),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=_(q,7),H=G.t,J=G.l,K=19;K>4&&!H[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,C)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(C,U,0),R=C;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[a[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B<u;++B){var rt=o[B];if(rt>255){A(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;A(r,m,Q[et]),m+=R[et],et>3&&(A(r,m,rt>>5&8191),m+=i[et])}else A(r,m,N[rt]),m+=P[rt]}return A(r,m,N[256]),m+P[256]},U=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s<o;++s)i+=e+=r[s];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=U[s-1],M=y>>13,E=8191&y,z=(1<<o)-1,A=c.p||new n(32768),_=c.h||new n(z+1),x=Math.ceil(o/3),D=2*x,T=function(t){return(a[t]^a[t+1]<<x^a[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=_[H];if(A[J]=K,_[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!w)){p=C(a,g,0,F,I,S,O,q,G,j-G,p),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(a[j+Q]==a[j+Q-W]){for(var $=0;$<Z&&a[j+$]==a[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-A[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=A[J])&32767}if(R){F[q++]=268435456|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=a[j],++I[a[j]];p=C(a,g,w,F,I,S,O,q,G,j-G,p),w||(c.r=7&p|g[p/8|0]<<3,p-=7,c.h=_,c.p=A,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+w;j+=65535){var st=j+65535;st>=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),this.s.z),this.s.z=this.b.length,this.p(this.b,!1)),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(a),32768),this.s.z=n.length-a+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,a=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),s=a.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(a,n),O(a,s-8,r.d()),O(a,s-4,e),a}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(r){for(var e=new t(n.length),i=0;i<n.length;++i)e[i]=n.charCodeAt(i);return e}if(G)return G.encode(n);var a=n.length,s=new t(n.length+(n.length>>1)),o=0,f=function(t){s[o++]=t};for(i=0;i<a;++i){if(o+5>s.length){var h=new t(o+8+(a-i<<1));h.set(s),s=h}var l=n.charCodeAt(i);l<128||r?f(l):l<2048?(f(192|l>>6),f(128|63&l)):l>55295&&l<57344?(f(240|(l=65536+(1047552&l)|1023&n.charCodeAt(++i))>>18),f(128|l>>12&63),f(128|l>>6&63),f(128|63&l)):(f(224|l>>12),f(128|l>>6&63),f(128|63&l))}return b(s,0,o)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(let r=0,e=t.length;r<e;r++)n+=t[r].length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function XS(){let e=new Blob([JS]);return URL.createObjectURL(e)}function xe(e,t){Z&&(h.info(e),t&&Pf(e))}function Zn(e,t){Z&&(h.info(e),t&&setTimeout(()=>{Pf(e)},0))}function Pf(e){Ye({category:"console",data:{logger:"replay"},level:"info",message:e},{level:"info"})}var ao=class extends Error{constructor(){super(`Event buffer exceeded maximum size of ${yc}.`)}},Ui=class{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){let n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>yc)throw new ao;this.events.push(t)}finish(){return new Promise(t=>{let n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let t=this.events.map(n=>n.timestamp).sort()[0];return t?vc(t):null}},uc=class{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?t():n()},{once:!0}),this._worker.addEventListener("error",r=>{n(r)},{once:!0})}),this._ensureReadyPromise)}destroy(){xe("[Replay] Destroying compression worker"),this._worker.terminate()}postMessage(t,n){let r=this._getAndIncrementId();return new Promise((o,i)=>{let s=({data:a})=>{let c=a;if(c.method===t&&c.id===r){if(this._worker.removeEventListener("message",s),!c.success){Z&&h.error("[Replay]",c.response),i(new Error("Error in compression worker"));return}o(c.response)}};this._worker.addEventListener("message",s),this._worker.postMessage({id:r,method:t,arg:n})})}_getAndIncrementId(){return this._id++}},lc=class{constructor(t){this._worker=new uc(t),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){let n=vc(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);let r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>yc?Promise.reject(new ao):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{Z&&h.warn('[Replay] Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){let t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}},dc=class{constructor(t){this._fallback=new Ui,this._compression=new lc(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(t){this._used.hasCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch{xe("[Replay] Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){let{events:t,hasCheckout:n}=this._fallback,r=[];for(let o of t)r.push(this._compression.addEvent(o));this._compression.hasCheckout=n,this._used=this._compression;try{await Promise.all(r)}catch(o){Z&&h.warn("[Replay] Failed to add events when switching buffers.",o)}}};function ZS({useCompression:e,workerUrl:t}){if(e&&window.Worker){let n=QS(t);if(n)return n}return xe("[Replay] Using simple buffer"),new Ui}function QS(e){try{let t=e||eE();if(!t)return;xe(`[Replay] Using compression worker${e?` from ${e}`:""}`);let n=new Worker(t);return new dc(n)}catch{xe("[Replay] Failed to create compression worker")}}function eE(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?XS():""}function xc(){try{return"sessionStorage"in te&&!!te.sessionStorage}catch{return!1}}function tE(e){nE(),e.session=void 0}function nE(){if(xc())try{te.sessionStorage.removeItem(gc)}catch{}}function Ff(e){return e===void 0?!1:Math.random()<e}function Bf(e){let t=Date.now(),n=e.id||B(),r=e.started||t,o=e.lastActivity||t,i=e.segmentId||0,s=e.sampled,a=e.previousSessionId;return{id:n,started:r,lastActivity:o,segmentId:i,sampled:s,previousSessionId:a}}function wc(e){if(xc())try{te.sessionStorage.setItem(gc,JSON.stringify(e))}catch{}}function rE(e,t){return Ff(e)?"session":t?"buffer":!1}function sf({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){let o=rE(e,t),i=Bf({sampled:o,previousSessionId:r});return n&&wc(i),i}function oE(e){if(!xc())return null;try{let t=te.sessionStorage.getItem(gc);if(!t)return null;let n=JSON.parse(t);return Zn("[Replay] Loading existing session",e),Bf(n)}catch{return null}}function fc(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function Hf(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return fc(e.started,t,r)||fc(e.lastActivity,n,r)}function Uf(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!Hf(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function Va({traceInternals:e,sessionIdleExpire:t,maxReplayDuration:n,previousSessionId:r},o){let i=o.stickySession&&oE(e);return i?Uf(i,{sessionIdleExpire:t,maxReplayDuration:n})?(Zn("[Replay] Session in sessionStorage is expired, creating new one..."),sf(o,{previousSessionId:i.id})):i:(Zn("[Replay] Creating new session",e),sf(o,{previousSessionId:r}))}function iE(e){return e.type===$.Custom}function Cc(e,t,n){return Gf(e,t)?($f(e,t,n),!0):!1}function sE(e,t,n){return Gf(e,t)?$f(e,t,n):Promise.resolve(null)}async function $f(e,t,n){if(!e.eventBuffer)return null;try{n&&e.recordingMode==="buffer"&&e.eventBuffer.clear(),n&&(e.eventBuffer.hasCheckout=!0);let r=e.getOptions(),o=aE(t,r.beforeAddRecordingEvent);return o?await e.eventBuffer.addEvent(o):void 0}catch(r){let o=r&&r instanceof ao?"addEventSizeExceeded":"addEvent";Z&&h.error(r),await e.stop({reason:o});let i=x();i&&i.recordDroppedEvent("internal_sdk_error","replay")}}function Gf(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;let n=vc(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(xe(`[Replay] Skipping event with timestamp ${n} because it is after maxReplayDuration`,e.getOptions()._experiments.traceInternals),!1):!0}function aE(e,t){try{if(typeof t=="function"&&iE(e))return t(e)}catch(n){return Z&&h.error("[Replay] An error occured in the `beforeAddRecordingEvent` callback, skipping the event...",n),null}return e}function Rc(e){return!e.type}function pc(e){return e.type==="transaction"}function cE(e){return e.type==="replay_event"}function af(e){return e.type==="feedback"}function Wf(e){let t=dE();return(n,r)=>{if(!e.isEnabled()||!Rc(n)&&!pc(n))return;let o=r&&r.statusCode;if(!(t&&(!o||o<200||o>=300))){if(pc(n)){uE(e,n);return}lE(e,n)}}}function uE(e,t){let n=e.getContext();t.contexts&&t.contexts.trace&&t.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function lE(e,t){let n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags||!t.tags.replayId)return;let{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||setTimeout(()=>{e.sendBufferedReplayOrFlush()})}function dE(){let e=x();if(!e)return!1;let t=e.getTransport();return t&&t.send.__sentry__baseTransport__||!1}function fE(e){return t=>{!e.isEnabled()||!Rc(t)||pE(e,t)}}function pE(e,t){let n=t.exception&&t.exception.values&&t.exception.values[0].value;if(typeof n=="string"&&(n.match(/reactjs\.org\/docs\/error-decoder\.html\?invariant=(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){let r=Et({category:"replay.hydrate-error"});fo(e,r)}}function mE(e,t){return e.type||!e.exception||!e.exception.values||!e.exception.values.length?!1:!!(t.originalException&&t.originalException.__rrweb__)}function hE(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:$.Custom,timestamp:t.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1):!0)}function gE(e,t){return e.recordingMode!=="buffer"||t.message===_c||!t.exception||t.type?!1:Ff(e.getOptions().errorSampleRate)}function _E(e,t=!1){let n=t?Wf(e):void 0;return Object.assign((r,o)=>e.isEnabled()?cE(r)?(delete r.breadcrumbs,r):!Rc(r)&&!pc(r)&&!af(r)||!e.checkAndHandleExpiredSession()?r:af(r)?(e.flush(),r.contexts.feedback.replay_id=e.getSessionId(),hE(e,r),r):mE(r,o)&&!e.getOptions()._experiments.captureExceptions?(Z&&h.log("[Replay] Ignoring error from rrweb internals",r),null):((gE(e,r)||e.recordingMode==="session")&&(r.tags={...r.tags,replayId:e.getSessionId()}),n&&n(r,{statusCode:200}),r):r,{id:"Replay"})}function Yi(e,t){return t.map(({type:n,start:r,end:o,name:i,data:s})=>{let a=e.throttledAddEvent({type:$.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:i,startTimestamp:r,endTimestamp:o,data:s}}});return typeof a=="string"?Promise.resolve(null):a})}function yE(e){let{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}function SE(e){return t=>{if(!e.isEnabled())return;let n=yE(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(Yi(e,[n]),!1)))}}function EE(e,t){return Z&&e.getOptions()._experiments.traceInternals?!1:Wr(t,x())}function Vi(e,t){e.isEnabled()&&t!==null&&(EE(e,t.name)||e.addUpdate(()=>(Yi(e,[t]),!0)))}function bE(e){let{startTimestamp:t,endTimestamp:n,fetchData:r,response:o}=e;if(!n)return null;let{method:i,url:s}=r;return{type:"resource.fetch",start:t/1e3,end:n/1e3,name:s,data:{method:i,statusCode:o?o.status:void 0}}}function TE(e){return t=>{if(!e.isEnabled())return;let n=bE(t);Vi(e,n)}}function IE(e){let{startTimestamp:t,endTimestamp:n,xhr:r}=e,o=r[Ne];if(!t||!n||!o)return null;let{method:i,url:s,status_code:a}=o;return s===void 0?null:{type:"resource.xhr",name:s,start:t/1e3,end:n/1e3,data:{method:i,statusCode:a}}}function vE(e){return t=>{if(!e.isEnabled())return;let n=IE(t);Vi(e,n)}}function Ki(e,t){if(e)try{if(typeof e=="string")return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){let n=Yf(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function zf(e){if(!e)return;let t=parseInt(e,10);return isNaN(t)?void 0:t}function jf(e){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[Yf(e)];if(!e)return[void 0]}catch{return Z&&h.warn("[Replay] Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Z&&h.info("[Replay] Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function $i(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};let n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function qf(e,t){if(!t)return null;let{startTimestamp:n,endTimestamp:r,url:o,method:i,statusCode:s,request:a,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:o,data:J({method:i,statusCode:s,request:a,response:c})}}function co(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function zt(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};let r={headers:e,size:t},{body:o,warnings:i}=xE(n);return r.body=o,i&&i.length>0&&(r._meta={warnings:i}),r}function mc(e,t){return Object.keys(e).reduce((n,r)=>{let o=r.toLowerCase();return t.includes(o)&&e[r]&&(n[o]=e[r]),n},{})}function Yf(e){return new URLSearchParams(e).toString()}function xE(e){if(!e||typeof e!="string")return{body:e};let t=e.length>jd,n=wE(e);if(t){let r=e.slice(0,jd);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}\u2026`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function wE(e){let t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function Gi(e,t){let n=CE(e);return dt(n,t)}function CE(e,t=te.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(te.location.origin))return e;let n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;let r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}async function RE(e,t,n){try{let r=await AE(e,t,n),o=qf("resource.fetch",r);Vi(n.replay,o)}catch(r){Z&&h.error("[Replay] Failed to capture fetch breadcrumb",r)}}function kE(e,t,n){let{input:r,response:o}=t,i=r?Vf(r):void 0,s=Ki(i,n.textEncoder),a=o?zf(o.headers.get("content-length")):void 0;s!==void 0&&(e.data.request_body_size=s),a!==void 0&&(e.data.response_body_size=a)}async function AE(e,t,n){let r=Date.now(),{startTimestamp:o=r,endTimestamp:i=r}=t,{url:s,method:a,status_code:c=0,request_body_size:u,response_body_size:l}=e.data,d=Gi(s,n.networkDetailAllowUrls)&&!Gi(s,n.networkDetailDenyUrls),p=d?OE(n,t.input,u):co(u),m=await ME(d,n,t.response,l);return{startTimestamp:o,endTimestamp:i,url:s,method:a,statusCode:c,request:p,response:m}}function OE({networkCaptureBodies:e,networkRequestHeaders:t},n,r){let o=n?LE(n,t):{};if(!e)return zt(o,r,void 0);let i=Vf(n),[s,a]=jf(i),c=zt(o,r,s);return a?$i(c,a):c}async function ME(e,{networkCaptureBodies:t,textEncoder:n,networkResponseHeaders:r},o,i){if(!e&&i!==void 0)return co(i);let s=o?Kf(o.headers,r):{};if(!o||!t&&i!==void 0)return zt(s,i,void 0);let[a,c]=await DE(o),u=NE(a,{networkCaptureBodies:t,textEncoder:n,responseBodySize:i,captureDetails:e,headers:s});return c?$i(u,c):u}function NE(e,{networkCaptureBodies:t,textEncoder:n,responseBodySize:r,captureDetails:o,headers:i}){try{let s=e&&e.length&&r===void 0?Ki(e,n):r;return o?t?zt(i,s,e):zt(i,s,void 0):co(s)}catch(s){return Z&&h.warn("[Replay] Failed to serialize response body",s),zt(i,r,void 0)}}async function DE(e){let t=PE(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await FE(t)]}catch(n){return Z&&h.warn("[Replay] Failed to get text body from response",n),[void 0,"BODY_PARSE_ERROR"]}}function Vf(e=[]){if(!(e.length!==2||typeof e[1]!="object"))return e[1].body}function Kf(e,t){let n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function LE(e,t){return e.length===1&&typeof e[0]!="string"?cf(e[0],t):e.length===2?cf(e[1],t):{}}function cf(e,t){if(!e)return{};let n=e.headers;return n?n instanceof Headers?Kf(n,t):Array.isArray(n)?{}:mc(n,t):{}}function PE(e){try{return e.clone()}catch(t){Z&&h.warn("[Replay] Failed to clone response body",t)}}function FE(e){return new Promise((t,n)=>{let r=setTimeout(()=>n(new Error("Timeout while trying to read response body")),500);BE(e).then(o=>t(o),o=>n(o)).finally(()=>clearTimeout(r))})}async function BE(e){return await e.text()}async function HE(e,t,n){try{let r=$E(e,t,n),o=qf("resource.xhr",r);Vi(n.replay,o)}catch(r){Z&&h.error("[Replay] Failed to capture xhr breadcrumb",r)}}function UE(e,t,n){let{xhr:r,input:o}=t;if(!r)return;let i=Ki(o,n.textEncoder),s=r.getResponseHeader("content-length")?zf(r.getResponseHeader("content-length")):jE(r.response,r.responseType,n.textEncoder);i!==void 0&&(e.data.request_body_size=i),s!==void 0&&(e.data.response_body_size=s)}function $E(e,t,n){let r=Date.now(),{startTimestamp:o=r,endTimestamp:i=r,input:s,xhr:a}=t,{url:c,method:u,status_code:l=0,request_body_size:d,response_body_size:p}=e.data;if(!c)return null;if(!a||!Gi(c,n.networkDetailAllowUrls)||Gi(c,n.networkDetailDenyUrls)){let M=co(d),w=co(p);return{startTimestamp:o,endTimestamp:i,url:c,method:u,statusCode:l,request:M,response:w}}let m=a[Ne],g=m?mc(m.request_headers,n.networkRequestHeaders):{},E=mc(GE(a),n.networkResponseHeaders),[T,S]=n.networkCaptureBodies?jf(s):[void 0],[b,v]=n.networkCaptureBodies?WE(a):[void 0],O=zt(g,d,T),L=zt(E,p,b);return{startTimestamp:o,endTimestamp:i,url:c,method:u,statusCode:l,request:S?$i(O,S):O,response:v?$i(L,v):L}}function GE(e){let t=e.getAllResponseHeaders();return t?t.split(`\r
|
|
29
|
-
`).reduce((n,r)=>{let[o,i]=r.split(": ");return n[o.toLowerCase()]=i,n},{}):{}}function WE(e){let t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return zE(e.response,e.responseType)}catch(n){t.push(n)}return Z&&h.warn("[Replay] Failed to get xhr response body",...t),[void 0]}function zE(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&e&&typeof e=="object")return[JSON.stringify(e)];if(!e)return[void 0]}catch{return Z&&h.warn("[Replay] Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Z&&h.info("[Replay] Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function jE(e,t,n){try{let r=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return Ki(r,n)}catch{return}}function qE(e){let t=x();try{let n=new TextEncoder,{networkDetailAllowUrls:r,networkDetailDenyUrls:o,networkCaptureBodies:i,networkRequestHeaders:s,networkResponseHeaders:a}=e.getOptions(),c={replay:e,textEncoder:n,networkDetailAllowUrls:r,networkDetailDenyUrls:o,networkCaptureBodies:i,networkRequestHeaders:s,networkResponseHeaders:a};t&&t.on?t.on("beforeAddBreadcrumb",(u,l)=>YE(c,u,l)):(bt(TE(e)),Tt(vE(e)))}catch{}}function YE(e,t,n){if(t.data)try{VE(t)&&JE(n)&&(UE(t,n,e),HE(t,n,e)),KE(t)&&XE(n)&&(kE(t,n,e),RE(t,n,e))}catch{Z&&h.warn("Error when enriching network breadcrumb")}}function VE(e){return e.category==="xhr"}function KE(e){return e.category==="fetch"}function JE(e){return e&&e.xhr}function XE(e){return e&&e.response}var uf=null;function ZE(e){return!!e.category}var QE=e=>t=>{if(!e.isEnabled())return;let n=eb(t);n&&fo(e,n)};function eb(e){let t=e.getLastBreadcrumb&&e.getLastBreadcrumb();return uf===t||!t||(uf=t,!ZE(t)||["fetch","xhr","sentry.event","sentry.transaction"].includes(t.category)||t.category.startsWith("ui."))?null:t.category==="console"?tb(t):Et(t)}function tb(e){let t=e.data&&e.data.arguments;if(!Array.isArray(t)||t.length===0)return Et(e);let n=!1,r=t.map(o=>{if(!o)return o;if(typeof o=="string")return o.length>Ci?(n=!0,`${o.slice(0,Ci)}\u2026`):o;if(typeof o=="object")try{let i=be(o,7);return JSON.stringify(i).length>Ci?(n=!0,`${JSON.stringify(i,null,2).slice(0,Ci)}\u2026`):i}catch{}return o});return Et({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function nb(e){let t=q(),n=x();t.addScopeListener(QE(e)),yr(PS(e)),et(SE(e)),qE(e);let r=_E(e,!lf(n));n&&n.addEventProcessor?n.addEventProcessor(r):Zo(r),lf(n)&&(n.on("beforeSendEvent",fE(e)),n.on("afterSendEvent",Wf(e)),n.on("createDsc",o=>{let i=e.getSessionId();i&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(o.replay_id=i)}),n.on("startTransaction",o=>{e.lastTransaction=o}),n.on("finishTransaction",o=>{e.lastTransaction=o}),n.on("beforeSendFeedback",(o,i)=>{let s=e.getSessionId();i&&i.includeReplay&&e.isEnabled()&&s&&o.contexts&&o.contexts.feedback&&(o.contexts.feedback.replay_id=s)}))}function lf(e){return!!(e&&e.on)}async function rb(e){try{return Promise.all(Yi(e,[ob(te.performance.memory)]))}catch{return[]}}function ob(e){let{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,o=Date.now()/1e3;return{type:"memory",name:"memory",start:o,end:o,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function ib(e,t,n){let r,o,i,s=n&&n.maxWait?Math.max(n.maxWait,t):0;function a(){return c(),r=e(),r}function c(){o!==void 0&&clearTimeout(o),i!==void 0&&clearTimeout(i),o=i=void 0}function u(){return o!==void 0||i!==void 0?a():r}function l(){return o&&clearTimeout(o),o=setTimeout(a,t),s&&i===void 0&&(i=setTimeout(a,s)),r}return l.cancel=c,l.flush=u,l}function sb(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){Z&&h.warn("[Replay] Received replay event after session expired.");return}let o=r||!t;t=!0,e.clickDetector&&OS(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&o&&e.setInitialState(),!Cc(e,n,o))return!0;if(!o)return!1;if(cb(e,o),e.session&&e.session.previousSessionId)return!0;if(e.recordingMode==="buffer"&&e.session&&e.eventBuffer){let i=e.eventBuffer.getEarliestTimestamp();i&&(xe(`[Replay] Updating session start time to earliest event in buffer to ${new Date(i)}`,e.getOptions()._experiments.traceInternals),e.session.started=i,e.getOptions().stickySession&&wc(e.session))}return e.recordingMode==="session"&&e.flush(),!0})}}function ab(e){let t=e.getOptions();return{type:$.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type==="worker":!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function cb(e,t){!t||!e.session||e.session.segmentId!==0||Cc(e,ab(e),!1)}function ub(e,t,n,r){return he(Ar(e,On(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function lb({recordingData:e,headers:t}){let n,r=`${JSON.stringify(t)}
|
|
30
|
-
`;if(typeof e=="string")n=`${r}${e}`;else{let i=new TextEncoder().encode(r);n=new Uint8Array(i.length+e.length),n.set(i),n.set(e,i.length)}return n}async function db({client:e,scope:t,replayId:n,event:r}){let o=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,i={event_id:n,integrations:o};e.emit&&e.emit("preprocessEvent",r,i);let s=await sn(e.getOptions(),r,i,t,e,ge());if(!s)return null;s.platform=s.platform||"javascript";let a=e.getSdkMetadata&&e.getSdkMetadata(),{name:c,version:u}=a&&a.sdk||{};return s.sdk={...s.sdk,name:c||"sentry.javascript.unknown",version:u||"0.0.0"},s}async function fb({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:o,session:i}){let s=lb({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:u,initialTimestamp:l}=r,d=x(),p=q(),m=d&&d.getTransport(),g=d&&d.getDsn();if(!d||!m||!g||!i.sampled)return;let E={type:uy,replay_start_timestamp:l/1e3,timestamp:o/1e3,error_ids:c,trace_ids:u,urls:a,replay_id:t,segment_id:n,replay_type:i.sampled},T=await db({scope:p,client:d,replayId:t,event:E});if(!T){d.recordDroppedEvent("event_processor","replay",E),xe("An event processor returned `null`, will not send event.");return}delete T.sdkProcessingMetadata;let S=ub(T,s,g,d.getOptions().tunnel),b;try{b=await m.send(S)}catch(O){let L=new Error(_c);try{L.cause=O}catch{}throw L}if(!b)return b;if(typeof b.statusCode=="number"&&(b.statusCode<200||b.statusCode>=300))throw new Wi(b.statusCode);let v=Mr({},b);if(Or(v,"replay"))throw new zi(v);return b}var Wi=class extends Error{constructor(t){super(`Transport returned status code ${t}`)}},zi=class extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}};async function Jf(e,t={count:0,interval:hy}){let{recordingData:n,options:r}=e;if(n.length)try{return await fb(e),!0}catch(o){if(o instanceof Wi||o instanceof zi)throw o;if(Go("Replays",{_retryCount:t.count}),Z&&r._experiments&&r._experiments.captureExceptions&&xt(o),t.count>=gy){let i=new Error(`${_c} - max retries exceeded`);try{i.cause=o}catch{}throw i}return t.interval*=++t.count,new Promise((i,s)=>{setTimeout(async()=>{try{await Jf(e,t),i(!0)}catch(a){s(a)}},t.interval)})}}var Xf="__THROTTLED",pb="__SKIPPED";function mb(e,t,n){let r=new Map,o=a=>{let c=a-n;r.forEach((u,l)=>{l<c&&r.delete(l)})},i=()=>[...r.values()].reduce((a,c)=>a+c,0),s=!1;return(...a)=>{let c=Math.floor(Date.now()/1e3);if(o(c),i()>=t){let l=s;return s=!0,l?pb:Xf}s=!1;let u=r.get(c)||0;return r.set(c,u+1),e(...a)}}var hc=class e{constructor({options:t,recordingOptions:n}){e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),e.prototype.__init5.call(this),e.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:ly,sessionIdleExpire:dy},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=n,this._options=t,this._debouncedFlush=ib(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=mb((s,a)=>sE(this,s,a),300,5);let{slowClickTimeout:r,slowClickIgnoreSelectors:o}=this.getOptions(),i=r?{threshold:Math.min(_y,r),timeout:r,scrollTimeout:yy,ignoreSelector:o?o.join(","):""}:void 0;i&&(this.clickDetector=new cc(this,i))}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}initializeSampling(t){let{errorSampleRate:n,sessionSampleRate:r}=this._options;if(!(n<=0&&r<=0)){if(this._initializeSessionForSampling(t),!this.session){this._handleException(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",Zn(`[Replay] Starting replay in ${this.recordingMode} mode`,this._options._experiments.traceInternals),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session")throw new Error("Replay recording is already in progress");if(this._isEnabled&&this.recordingMode==="buffer")throw new Error("Replay buffering is in progress, call `flush()` to save the replay");Zn("[Replay] Starting replay in session mode",this._options._experiments.traceInternals),this._updateUserActivity();let t=Va({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this._initializeRecording()}startBuffering(){if(this._isEnabled)throw new Error("Replay recording is already in progress");Zn("[Replay] Starting replay in buffer mode",this._options._experiments.traceInternals);let t=Va({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{let t=this._canvas;this._stopRecording=Wt({...this._recordingOptions,...this.recordingMode==="buffer"&&{checkoutEveryNms:my},emit:sb(this),onMutation:this._onMutationHandler,...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this._handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this._handleException(t),!1}}async stop({forceFlush:t=!1,reason:n}={}){if(this._isEnabled){this._isEnabled=!1;try{xe(`[Replay] Stopping Replay${n?` triggered by ${n}`:""}`,this._options._experiments.traceInternals),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,tE(this)}catch(r){this._handleException(r)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),xe("[Replay] Pausing replay",this._options._experiments.traceInternals))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),xe("[Replay] Resuming replay",this._options._experiments.traceInternals))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();let n=Date.now();xe("[Replay] Converting buffer to session",this._options._experiments.traceInternals),await this.flushImmediate();let r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(t){let n=t();this.recordingMode!=="buffer"&&n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(this._lastActivity&&fc(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){let t=`${te.location.pathname}${te.location.hash}${te.location.search}`,n=`${te.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(t,n){let r=this._throttledAddEvent(t,n);if(r===Xf){let o=Et({category:"replay.throttled"});this.addUpdate(()=>!Cc(this,{type:TS,timestamp:o.timestamp||0,data:{tag:"breadcrumb",payload:o,metric:!0}}))}return r}getCurrentRoute(){let t=this.lastTransaction||q().getTransaction(),r=(t&&P(t).data||{})[_e];if(!(!t||!r||!["route","custom"].includes(r)))return P(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=ZS({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_handleException(t){Z&&h.error("[Replay]",t),Z&&this._options._experiments&&this._options._experiments.captureExceptions&&xt(t)}_initializeSessionForSampling(t){let n=this._options.errorSampleRate>0,r=Va({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;let t=this.session;return Uf(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(t.id))}_addListeners(){try{te.document.addEventListener("visibilitychange",this._handleVisibilityChange),te.addEventListener("blur",this._handleWindowBlur),te.addEventListener("focus",this._handleWindowFocus),te.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(nb(this),this._hasInitializedCoreListeners=!0)}catch(t){this._handleException(t)}this._performanceCleanupCallback=KS(this)}_removeListeners(){try{te.document.removeEventListener("visibilitychange",this._handleVisibilityChange),te.removeEventListener("blur",this._handleWindowBlur),te.removeEventListener("focus",this._handleWindowFocus),te.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this._handleException(t)}}__init(){this._handleVisibilityChange=()=>{te.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{let t=Et({category:"ui.blur"});this._doChangeToBackgroundTasks(t)}}__init3(){this._handleWindowFocus=()=>{let t=Et({category:"ui.focus"});this._doChangeToForegroundTasks(t)}}__init4(){this._handleKeyboardEvent=t=>{US(this,t)}}_doChangeToBackgroundTasks(t){!this.session||Hf(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this._createCustomBreadcrumb(t),this.conditionalFlush())}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){xe("[Replay] Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:$.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=WS(this.performanceEntries).concat(this.replayPerformanceEntries);return this.performanceEntries=[],this.replayPerformanceEntries=[],Promise.all(Yi(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){let{session:t,eventBuffer:n}=this;if(!t||!n||t.segmentId)return;let r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_popEventContext(){let t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){let t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){Z&&h.error("[Replay] No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!(!this.eventBuffer||!this.eventBuffer.hasEvents)&&(await rb(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();let n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");let r=this._popEventContext(),o=this.session.segmentId++;this._maybeSaveSession();let i=await this.eventBuffer.finish();await Jf({replayId:t,recordingData:i,segmentId:o,eventContext:r,session:this.session,options:this.getOptions(),timestamp:n})}catch(n){this._handleException(n),this.stop({reason:"sendReplay"});let r=x();r&&r.recordDroppedEvent("send_error","replay")}}__init5(){this._flush=async({force:t=!1}={})=>{if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){Z&&h.error("[Replay] Attempting to finish replay event after session expired.");return}if(!this.session)return;let n=this.session.started,o=Date.now()-n;this._debouncedFlush.cancel();let i=o<this._options.minReplayDuration,s=o>this._options.maxReplayDuration+5e3;if(i||s){xe(`[Replay] Session duration (${Math.floor(o/1e3)}s) is too ${i?"short":"long"}, not sending replay.`,this._options._experiments.traceInternals),i&&this._debouncedFlush();return}let a=this.eventBuffer;if(a&&this.session.segmentId===0&&!a.hasCheckout&&xe("[Replay] Flushing initial segment without checkout.",this._options._experiments.traceInternals),!this._flushLock){this._flushLock=this._runFlush(),await this._flushLock,this._flushLock=void 0;return}try{await this._flushLock}catch(c){Z&&h.error(c)}finally{this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&wc(this.session)}__init6(){this._onMutationHandler=t=>{let n=t.length,r=this._options.mutationLimit,o=this._options.mutationBreadcrumbLimit,i=r&&n>r;if(n>o||i){let s=Et({category:"replay.mutations",data:{count:n,limit:i}});this._createCustomBreadcrumb(s)}return i?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}};function Qr(e,t,n,r){let o=typeof r=="string"?r.split(","):[],i=[...e,...o,...t];return typeof n<"u"&&(typeof n=="string"&&i.push(`.${n}`),Re(()=>{console.warn("[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.")})),i.join(",")}function hb({mask:e,unmask:t,block:n,unblock:r,ignore:o,blockClass:i,blockSelector:s,maskTextClass:a,maskTextSelector:c,ignoreClass:u}){let l=['base[href="/"]'],d=Qr(e,[".sentry-mask","[data-sentry-mask]"],a,c),p=Qr(t,[".sentry-unmask","[data-sentry-unmask]"]),m={maskTextSelector:d,unmaskTextSelector:p,blockSelector:Qr(n,[".sentry-block","[data-sentry-block]",...l],i,s),unblockSelector:Qr(r,[".sentry-unblock","[data-sentry-unblock]"]),ignoreSelector:Qr(o,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'],u)};return i instanceof RegExp&&(m.blockClass=i),a instanceof RegExp&&(m.maskTextClass=a),m}function gb({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:o,value:i}){return!r||o.unmaskTextSelector&&e.matches(o.unmaskTextSelector)?i:n.includes(t)||t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"")?i.replace(/[\S]/g,"*"):i}var df='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',_b=["content-length","content-type","accept"],ff=!1,yb=e=>new uo(e),uo=class e{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:t=fy,flushMaxDelay:n=py,minReplayDuration:r=Sy,maxReplayDuration:o=qd,stickySession:i=!0,useCompression:s=!0,workerUrl:a,_experiments:c={},sessionSampleRate:u,errorSampleRate:l,maskAllText:d=!0,maskAllInputs:p=!0,blockAllMedia:m=!0,mutationBreadcrumbLimit:g=750,mutationLimit:E=1e4,slowClickTimeout:T=7e3,slowClickIgnoreSelectors:S=[],networkDetailAllowUrls:b=[],networkDetailDenyUrls:v=[],networkCaptureBodies:O=!0,networkRequestHeaders:L=[],networkResponseHeaders:M=[],mask:w=[],maskAttributes:U=["title","placeholder"],unmask:ne=[],block:k=[],unblock:N=[],ignore:K=[],maskFn:se,beforeAddRecordingEvent:de,beforeErrorSampling:Pe,blockClass:X,blockSelector:We,maskInputOptions:le,maskTextClass:Ce,maskTextSelector:Xe,ignoreClass:is}={}){this.name=e.id;let En=hb({mask:w,unmask:ne,block:k,unblock:N,ignore:K,blockClass:X,blockSelector:We,maskTextClass:Ce,maskTextSelector:Xe,ignoreClass:is});if(this._recordingOptions={maskAllInputs:p,maskAllText:d,maskInputOptions:{...le||{},password:!0},maskTextFn:se,maskInputFn:se,maskAttributeFn:(At,bn,sr)=>gb({maskAttributes:U,maskAllText:d,privacyOptions:En,key:At,value:bn,el:sr}),...En,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:At=>{try{At.__rrweb__=!0}catch{}}},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,Ey),maxReplayDuration:Math.min(o,qd),stickySession:i,sessionSampleRate:u,errorSampleRate:l,useCompression:s,workerUrl:a,blockAllMedia:m,maskAllInputs:p,maskAllText:d,mutationBreadcrumbLimit:g,mutationLimit:E,slowClickTimeout:T,slowClickIgnoreSelectors:S,networkDetailAllowUrls:b,networkDetailDenyUrls:v,networkCaptureBodies:O,networkRequestHeaders:pf(L),networkResponseHeaders:pf(M),beforeAddRecordingEvent:de,beforeErrorSampling:Pe,_experiments:c},typeof u=="number"&&(console.warn(`[Replay] You are passing \`sessionSampleRate\` to the Replay integration.
|
|
31
|
-
This option is deprecated and will be removed soon.
|
|
32
|
-
Instead, configure \`replaysSessionSampleRate\` directly in the SDK init options, e.g.:
|
|
33
|
-
Sentry.init({ replaysSessionSampleRate: ${u} })`),this._initialOptions.sessionSampleRate=u),typeof l=="number"&&(console.warn(`[Replay] You are passing \`errorSampleRate\` to the Replay integration.
|
|
34
|
-
This option is deprecated and will be removed soon.
|
|
35
|
-
Instead, configure \`replaysOnErrorSampleRate\` directly in the SDK init options, e.g.:
|
|
36
|
-
Sentry.init({ replaysOnErrorSampleRate: ${l} })`),this._initialOptions.errorSampleRate=l),this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${df}`:df),this._isInitialized&&kn())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return ff}set _isInitialized(t){ff=t}setupOnce(){kn()&&(this._setup(),setTimeout(()=>this._initialize()))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session"}):Promise.resolve()}flush(t){return!this._replay||!this._replay.isEnabled()?Promise.resolve():this._replay.sendBufferedReplayOrFlush(t)}getReplayId(){if(!(!this._replay||!this._replay.isEnabled()))return this._replay.getSessionId()}_initialize(){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(),this._replay.initializeSampling())}_setup(){let t=Sb(this._initialOptions);this._replay=new hc({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(){try{let n=x().getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}};uo.__initStatic();function Sb(e){let t=x(),n=t&&t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...J(e)};return n?(e.sessionSampleRate==null&&e.errorSampleRate==null&&n.replaysSessionSampleRate==null&&n.replaysOnErrorSampleRate==null&&Re(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),typeof n.replaysSessionSampleRate=="number"&&(r.sessionSampleRate=n.replaysSessionSampleRate),typeof n.replaysOnErrorSampleRate=="number"&&(r.errorSampleRate=n.replaysOnErrorSampleRate),r):(Re(()=>{console.warn("SDK client is not available.")}),r)}function pf(e){return[..._b,...e.map(t=>t.toLowerCase())]}function Eb(){let e=x();return e&&e.getIntegrationByName&&e.getIntegrationByName("Replay")}f();var Zf;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(Zf||(Zf={}));function bb(e,t){for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return!1}function kc(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:kc(e.parentNode,t,n,r+1)}function Qf(e,t){return n=>{let r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(bb(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}var nr=`Please stop import mirror directly. Instead of that,\r
|
|
37
|
-
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
38
|
-
or you can use record.mirror to access the mirror instance during recording.`,ep={map:{},getId(){return console.error(nr),-1},getNode(){return console.error(nr),null},removeNodeFromMap(){console.error(nr)},has(){return console.error(nr),!1},reset(){console.error(nr)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(ep=new Proxy(ep,{get(e,t,n){return t==="map"&&console.error(nr),Reflect.get(e,t,n)}}));function Oc(e,t,n,r,o=window){let i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(s){cp(()=>{n.set.call(this,s)},0),i&&i.set&&i.set.call(this,s)}}),()=>Oc(e,t,i||{},!0)}function Mc(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}/[1-9][0-9]{12}/.test(Date.now().toString());function Tb(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function Qi(e,t,n,r,o){if(!e)return!1;let i=Tb(e);if(!i)return!1;let s=Qf(t,n);if(!o){let u=r&&i.matches(r);return s(i)&&!u}let a=kc(i,s),c=-1;return a<0?!1:(r&&(c=kc(i,Qf(null,r))),a>-1&&c<0?!0:a<c)}var tp={};function ap(e){let t=tp[e];if(t)return t;let n=window.document,r=window[e];if(n&&typeof n.createElement=="function")try{let o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);let i=o.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(o)}catch{}return tp[e]=r.bind(window)}function gn(...e){return ap("requestAnimationFrame")(...e)}function cp(...e){return ap("setTimeout")(...e)}var or=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(or||{}),Xi;function Ib(e){Xi=e}var np=e=>Xi?(...n)=>{try{return e(...n)}catch(r){if(Xi&&Xi(r)===!0)return()=>{};throw r}}:e,rr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",vb=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(po=0;po<rr.length;po++)vb[rr.charCodeAt(po)]=po;var po,xb=function(e){var t=new Uint8Array(e),n,r=t.length,o="";for(n=0;n<r;n+=3)o+=rr[t[n]>>2],o+=rr[(t[n]&3)<<4|t[n+1]>>4],o+=rr[(t[n+1]&15)<<2|t[n+2]>>6],o+=rr[t[n+2]&63];return r%3===2?o=o.substring(0,o.length-1)+"=":r%3===1&&(o=o.substring(0,o.length-2)+"=="),o},rp=new Map;function wb(e,t){let n=rp.get(e);return n||(n=new Map,rp.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}var up=(e,t,n)=>{if(!e||!(dp(e,t)||typeof e=="object"))return;let r=e.constructor.name,o=wb(n,r),i=o.indexOf(e);return i===-1&&(i=o.length,o.push(e)),i};function Zi(e,t,n){if(e instanceof Array)return e.map(r=>Zi(r,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){let r=e.constructor.name,o=xb(e);return{rr_type:r,base64:o}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Zi(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){let r=e.constructor.name,{src:o}=e;return{rr_type:r,src:o}}else if(e instanceof HTMLCanvasElement){let r="HTMLImageElement",o=e.toDataURL();return{rr_type:r,src:o}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Zi(e.data,t,n),e.width,e.height]};if(dp(e,t)||typeof e=="object"){let r=e.constructor.name,o=up(e,t,n);return{rr_type:r,index:o}}}}return e}var lp=(e,t,n)=>e.map(r=>Zi(r,t,n)),dp=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(o=>typeof t[o]=="function").find(o=>e instanceof t[o]);function Cb(e,t,n,r,o){let i=[],s=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(let a of s)try{if(typeof t.CanvasRenderingContext2D.prototype[a]!="function")continue;let c=Mc(t.CanvasRenderingContext2D.prototype,a,function(u){return function(...l){return Qi(this.canvas,n,r,o,!0)||cp(()=>{let d=lp(l,t,this);e(this.canvas,{type:or["2D"],property:a,args:d})},0),u.apply(this,l)}});i.push(c)}catch{let u=Oc(t.CanvasRenderingContext2D.prototype,a,{set(l){e(this.canvas,{type:or["2D"],property:a,args:[l],setter:!0})}});i.push(u)}return()=>{i.forEach(a=>a())}}function Rb(e){return e==="experimental-webgl"?"webgl":e}function op(e,t,n,r,o){let i=[];try{let s=Mc(e.HTMLCanvasElement.prototype,"getContext",function(a){return function(c,...u){if(!Qi(this,t,n,r,!0)){let l=Rb(c);if("__context"in this||(this.__context=l),o&&["webgl","webgl2"].includes(l))if(u[0]&&typeof u[0]=="object"){let d=u[0];d.preserveDrawingBuffer||(d.preserveDrawingBuffer=!0)}else u.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[c,...u])}});i.push(s)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(s=>s())}}function ip(e,t,n,r,o,i,s,a){let c=[],u=Object.getOwnPropertyNames(e);for(let l of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if(typeof e[l]!="function")continue;let d=Mc(e,l,function(p){return function(...m){let g=p.apply(this,m);if(up(g,a,this),"tagName"in this.canvas&&!Qi(this.canvas,r,o,i,!0)){let E=lp(m,a,this),T={type:t,property:l,args:E};n(this.canvas,T)}return g}});c.push(d)}catch{let p=Oc(e,l,{set(m){n(this.canvas,{type:t,property:l,args:[m],setter:!0})}});c.push(p)}return c}function kb(e,t,n,r,o,i){let s=[];return s.push(...ip(t.WebGLRenderingContext.prototype,or.WebGL,e,n,r,o,i,t)),typeof t.WebGL2RenderingContext<"u"&&s.push(...ip(t.WebGL2RenderingContext.prototype,or.WebGL2,e,n,r,o,i,t)),()=>{s.forEach(a=>a())}}var Ab='for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="undefined"==typeof Uint8Array?[]:new Uint8Array(256),a=0;a<64;a++)t[e.charCodeAt(a)]=a;var n=function(t){var a,n=new Uint8Array(t),r=n.length,s="";for(a=0;a<r;a+=3)s+=e[n[a]>>2],s+=e[(3&n[a])<<4|n[a+1]>>4],s+=e[(15&n[a+1])<<2|n[a+2]>>6],s+=e[63&n[a+2]];return r%3==2?s=s.substring(0,s.length-1)+"=":r%3==1&&(s=s.substring(0,s.length-2)+"=="),s};const r=new Map,s=new Map;const i=self;i.onmessage=async function(e){if(!("OffscreenCanvas"in globalThis))return i.postMessage({id:e.data.id});{const{id:t,bitmap:a,width:o,height:f,maxCanvasSize:c,dataURLOptions:g}=e.data,u=async function(e,t,a){const r=e+"-"+t;if("OffscreenCanvas"in globalThis){if(s.has(r))return s.get(r);const i=new OffscreenCanvas(e,t);i.getContext("2d");const o=await i.convertToBlob(a),f=await o.arrayBuffer(),c=n(f);return s.set(r,c),c}return""}(o,f,g),[h,d]=function(e,t,a){if(!a)return[e,t];const[n,r]=a;if(e<=n&&t<=r)return[e,t];let s=e,i=t;return s>n&&(i=Math.floor(n*t/e),s=n),i>r&&(s=Math.floor(r*e/t),i=r),[s,i]}(o,f,c),l=new OffscreenCanvas(h,d),w=l.getContext("bitmaprenderer"),p=h===o&&d===f?a:await createImageBitmap(a,{resizeWidth:h,resizeHeight:d,resizeQuality:"low"});w.transferFromImageBitmap(p),a.close();const y=await l.convertToBlob(g),v=y.type,b=await y.arrayBuffer(),m=n(b);if(p.close(),!r.has(t)&&await u===m)return r.set(t,m),i.postMessage({id:t});if(r.get(t)===m)return i.postMessage({id:t});i.postMessage({id:t,type:v,base64:m,width:o,height:f}),r.set(t,m)}};';function Ob(){let e=new Blob([Ab]);return URL.createObjectURL(e)}var Ac=class{reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=(d,p)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(d)||this.pendingCanvasMutations.set(d,[]),this.pendingCanvasMutations.get(d).push(p)};let{sampling:n="all",win:r,blockClass:o,blockSelector:i,unblockSelector:s,maxCanvasSize:a,recordCanvas:c,dataURLOptions:u,errorHandler:l}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.options=t,l&&Ib(l),!t.enableManualSnapshot&&np(()=>{c&&n==="all"&&this.initCanvasMutationObserver(r,o,i,s),c&&typeof n=="number"&&this.initCanvasFPSObserver(n,r,o,i,s,a,{dataURLOptions:u})})()}initCanvasFPSObserver(t,n,r,o,i,s,a){let c=op(n,r,o,i,!0),u=this.takeSnapshot(!1,t,n,r,o,i,s,a.dataURLOptions);this.resetObservers=()=>{c(),cancelAnimationFrame(u)}}initCanvasMutationObserver(t,n,r,o){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let i=op(t,n,r,o,!1),s=Cb(this.processMutation.bind(this),t,n,r,o),a=kb(this.processMutation.bind(this),t,n,r,o,this.mirror);this.resetObservers=()=>{i(),s(),a()}}snapshot(t){let{options:n}=this,r=this.takeSnapshot(!0,n.sampling==="all"?2:n.sampling||2,n.win,n.blockClass,n.blockSelector,n.unblockSelector,n.maxCanvasSize,n.dataURLOptions,t);this.resetObservers=()=>{cancelAnimationFrame(r)}}takeSnapshot(t,n,r,o,i,s,a,c,u){let l=new Map,d=new Worker(Ob());d.onmessage=S=>{let b=S.data,{id:v}=b;if(l.set(v,!1),!("base64"in b))return;let{base64:O,type:L,width:M,height:w}=b;this.mutationCb({id:v,type:or["2D"],commands:[{property:"clearRect",args:[0,0,M,w]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:O}],type:L}]},0,0,M,w]}]})};let p=1e3/n,m=0,g,E=S=>{if(S)return[S];let b=[];return r.document.querySelectorAll("canvas").forEach(v=>{Qi(v,o,i,s,!0)||b.push(v)}),b},T=S=>{if(m&&S-m<p){g=gn(T);return}m=S,E(u).forEach(b=>{let v=this.mirror.getId(b);if(!l.get(v)&&!(!b.width||!b.height)){if(l.set(v,!0),!t&&["webgl","webgl2"].includes(b.__context)){let O=b.getContext(b.__context);nn([O,"optionalAccess",L=>L.getContextAttributes,"call",L=>L(),"optionalAccess",L=>L.preserveDrawingBuffer])===!1&&O.clear(O.COLOR_BUFFER_BIT)}createImageBitmap(b).then(O=>{d.postMessage({id:v,bitmap:O,width:b.width,height:b.height,dataURLOptions:c,maxCanvasSize:a},[O])}).catch(O=>{np(()=>{throw O})()})}}),g=gn(T)};return g=gn(T),g}startPendingCanvasMutationFlusher(){gn(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let t=n=>{this.rafStamps.latestId=n,gn(t)};gn(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{let r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),gn(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;let o=r.map(s=>{let{type:a,...c}=s;return c}),{type:i}=r[0];this.mutationCb({id:n,type:i,commands:o}),this.pendingCanvasMutations.delete(t)}},sp={low:{sampling:{canvas:1},dataURLOptions:{type:"image/webp",quality:.25}},medium:{sampling:{canvas:2},dataURLOptions:{type:"image/webp",quality:.4}},high:{sampling:{canvas:4},dataURLOptions:{type:"image/webp",quality:.5}}},fp="ReplayCanvas",Ji=1280,Mb=(e={})=>{let[t,n]=e.maxCanvasSize||[],r={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,Ji):Ji,n?Math.min(n,Ji):Ji]},o,i=new Promise(s=>o=s);return{name:fp,setupOnce(){},getOptions(){let{quality:s,enableManualSnapshot:a,maxCanvasSize:c}=r;return{enableManualSnapshot:a,recordCanvas:!0,getCanvasManager:u=>{let l=new Ac({...u,enableManualSnapshot:a,maxCanvasSize:c,errorHandler:d=>{try{typeof d=="object"&&(d.__rrweb__=!0)}catch{}}});return o(l),l},...sp[s||"medium"]||sp.medium}},async snapshot(s){(await i).snapshot(s)}}},pp=Mb,Nb=D(fp,pp);f();var yn=C,Nc="#ffffff",mp="inherit",Dc="rgba(108, 95, 199, 1)",hp={fontFamily:"system-ui, 'Helvetica Neue', Arial, sans-serif",fontSize:"14px",background:Nc,backgroundHover:"#f6f6f7",foreground:"#2b2233",border:"1.5px solid rgba(41, 35, 47, 0.13)",borderRadius:"25px",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",success:"#268d75",error:"#df3338",submitBackground:"rgba(88, 74, 192, 1)",submitBackgroundHover:Dc,submitBorder:Dc,submitOutlineFocus:"#29232f",submitForeground:Nc,submitForegroundHover:Nc,cancelBackground:"transparent",cancelBackgroundHover:"var(--background-hover)",cancelBorder:"var(--border)",cancelOutlineFocus:"var(--input-outline-focus)",cancelForeground:"var(--foreground)",cancelForegroundHover:"var(--foreground)",inputBackground:mp,inputForeground:mp,inputBorder:"var(--border)",inputOutlineFocus:Dc,formBorderRadius:"20px",formContentBorderRadius:"6px"},gp={light:hp,dark:{...hp,background:"#29232f",backgroundHover:"#352f3b",foreground:"#ebe6ef",border:"1.5px solid rgba(235, 230, 239, 0.15)",success:"#2da98c",error:"#f55459"}},Db="Report a Bug",Lb="Cancel",Pb="Send Bug Report",Fb="Report a Bug",Bb="your.email@example.org",Hb="Email",Ub="What's the bug? What did you expect?",$b="Description",Gb="Your Name",Wb="Name",zb="(required)",jb="Thank you for your report!",bp="widget",Tp="api";async function qb({client:e,scope:t,event:n}){let r={};e.emit&&e.emit("preprocessEvent",n,r);let o=await sn(e.getOptions(),n,r,t,e,ge());return o===null?(e.recordDroppedEvent("event_processor","feedback",n),null):(o.platform=o.platform||"javascript",o)}async function Yb({feedback:{message:e,email:t,name:n,source:r,url:o}},{includeReplay:i=!0}={}){let s=x(),a=s&&s.getTransport(),c=s&&s.getDsn();if(!s||!a||!c)return;let u={contexts:{feedback:{contact_email:t,name:n,message:e,url:o,source:r}},type:"feedback"};return De(async l=>{l.clearBreadcrumbs(),[Tp,bp].includes(String(r))&&l.setLevel("info");let d=await qb({scope:l,client:s,event:u});if(!d)return;s.emit&&s.emit("beforeSendFeedback",d,{includeReplay:!!i});let p=Ur(d,c,s.getOptions()._metadata,s.getOptions().tunnel),m;try{m=await a.send(p)}catch(g){let E=new Error("Unable to send Feedback");try{E.cause=g}catch{}throw E}if(m){if(typeof m.statusCode=="number"&&(m.statusCode<200||m.statusCode>=300))throw new Error("Unable to send Feedback");return m}})}function Ip({name:e,email:t,message:n,source:r=Tp,url:o=fr()},i={}){if(!n)throw new Error("Unable to submit feedback with empty message");return Yb({feedback:{name:e,email:t,message:n,url:o,source:r}},i)}var _n=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function _p(e,t){return{...e,...t,themeDark:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}function Vb(e){let t=e.createElement("style");return t.textContent=`
|
|
39
|
-
.widget__actor {
|
|
40
|
-
position: fixed;
|
|
41
|
-
left: var(--left);
|
|
42
|
-
right: var(--right);
|
|
43
|
-
bottom: var(--bottom);
|
|
44
|
-
top: var(--top);
|
|
45
|
-
z-index: var(--z-index);
|
|
46
|
-
|
|
47
|
-
line-height: 16px;
|
|
48
|
-
|
|
49
|
-
display: flex;
|
|
50
|
-
align-items: center;
|
|
51
|
-
gap: 8px;
|
|
52
|
-
|
|
53
|
-
border-radius: var(--border-radius);
|
|
54
|
-
cursor: pointer;
|
|
55
|
-
font-family: inherit;
|
|
56
|
-
font-size: var(--font-size);
|
|
57
|
-
font-weight: 600;
|
|
58
|
-
padding: 16px;
|
|
59
|
-
text-decoration: none;
|
|
60
|
-
z-index: 9000;
|
|
61
|
-
|
|
62
|
-
color: var(--foreground);
|
|
63
|
-
background-color: var(--background);
|
|
64
|
-
border: var(--border);
|
|
65
|
-
box-shadow: var(--box-shadow);
|
|
66
|
-
opacity: 1;
|
|
67
|
-
transition: opacity 0.1s ease-in-out;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.widget__actor:hover {
|
|
71
|
-
background-color: var(--background-hover);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.widget__actor svg {
|
|
75
|
-
width: 16px;
|
|
76
|
-
height: 16px;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.widget__actor--hidden {
|
|
80
|
-
opacity: 0;
|
|
81
|
-
pointer-events: none;
|
|
82
|
-
visibility: hidden;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.widget__actor__text {
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
@media (max-width: 600px) {
|
|
89
|
-
.widget__actor__text {
|
|
90
|
-
display: none;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.feedback-icon path {
|
|
95
|
-
fill: var(--foreground);
|
|
96
|
-
}
|
|
97
|
-
`,t}function Kb(e){let t=e.createElement("style");return t.textContent=`
|
|
98
|
-
.dialog {
|
|
99
|
-
line-height: 25px;
|
|
100
|
-
background-color: rgba(0, 0, 0, 0.05);
|
|
101
|
-
border: none;
|
|
102
|
-
position: fixed;
|
|
103
|
-
inset: 0;
|
|
104
|
-
z-index: 10000;
|
|
105
|
-
width: 100vw;
|
|
106
|
-
height: 100vh;
|
|
107
|
-
display: flex;
|
|
108
|
-
align-items: center;
|
|
109
|
-
justify-content: center;
|
|
110
|
-
opacity: 1;
|
|
111
|
-
transition: opacity 0.2s ease-in-out;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.dialog:not([open]) {
|
|
115
|
-
opacity: 0;
|
|
116
|
-
pointer-events: none;
|
|
117
|
-
visibility: hidden;
|
|
118
|
-
}
|
|
119
|
-
.dialog:not([open]) .dialog__content {
|
|
120
|
-
transform: translate(0, -16px) scale(0.98);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.dialog__content {
|
|
124
|
-
position: fixed;
|
|
125
|
-
left: var(--left);
|
|
126
|
-
right: var(--right);
|
|
127
|
-
bottom: var(--bottom);
|
|
128
|
-
top: var(--top);
|
|
129
|
-
|
|
130
|
-
border: var(--border);
|
|
131
|
-
border-radius: var(--form-border-radius);
|
|
132
|
-
background-color: var(--background);
|
|
133
|
-
color: var(--foreground);
|
|
134
|
-
|
|
135
|
-
width: 320px;
|
|
136
|
-
max-width: 100%;
|
|
137
|
-
max-height: calc(100% - 2rem);
|
|
138
|
-
display: flex;
|
|
139
|
-
flex-direction: column;
|
|
140
|
-
box-shadow: var(--box-shadow);
|
|
141
|
-
transition: transform 0.2s ease-in-out;
|
|
142
|
-
transform: translate(0, 0) scale(1);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.dialog__header {
|
|
146
|
-
display: flex;
|
|
147
|
-
align-items: center;
|
|
148
|
-
justify-content: space-between;
|
|
149
|
-
font-size: 20px;
|
|
150
|
-
font-weight: 600;
|
|
151
|
-
padding: 24px 24px 0 24px;
|
|
152
|
-
margin: 0;
|
|
153
|
-
margin-bottom: 16px;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.brand-link {
|
|
157
|
-
display: inline-flex;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
.error {
|
|
161
|
-
color: var(--error);
|
|
162
|
-
margin-bottom: 16px;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
.form {
|
|
166
|
-
display: grid;
|
|
167
|
-
overflow: auto;
|
|
168
|
-
flex-direction: column;
|
|
169
|
-
gap: 16px;
|
|
170
|
-
padding: 0 24px 24px;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.form__error-container {
|
|
174
|
-
color: var(--error);
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
.form__error-container--hidden {
|
|
178
|
-
display: none;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
.form__label {
|
|
182
|
-
display: flex;
|
|
183
|
-
flex-direction: column;
|
|
184
|
-
gap: 4px;
|
|
185
|
-
margin: 0px;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.form__label__text {
|
|
189
|
-
display: grid;
|
|
190
|
-
gap: 4px;
|
|
191
|
-
align-items: center;
|
|
192
|
-
grid-auto-flow: column;
|
|
193
|
-
grid-auto-columns: max-content;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
.form__label__text--required {
|
|
197
|
-
font-size: 0.85em;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
.form__input {
|
|
201
|
-
line-height: inherit;
|
|
202
|
-
background-color: var(--input-background);
|
|
203
|
-
box-sizing: border-box;
|
|
204
|
-
border: var(--input-border);
|
|
205
|
-
border-radius: var(--form-content-border-radius);
|
|
206
|
-
color: var(--input-foreground);
|
|
207
|
-
font-family: inherit;
|
|
208
|
-
font-size: var(--font-size);
|
|
209
|
-
font-weight: 500;
|
|
210
|
-
padding: 6px 12px;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
.form__input::placeholder {
|
|
214
|
-
color: var(--input-foreground);
|
|
215
|
-
opacity: 0.65;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
.form__input:focus-visible {
|
|
219
|
-
outline: 1px auto var(--input-outline-focus);
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
.form__input--textarea {
|
|
223
|
-
font-family: inherit;
|
|
224
|
-
resize: vertical;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
.btn-group {
|
|
228
|
-
display: grid;
|
|
229
|
-
gap: 8px;
|
|
230
|
-
margin-top: 8px;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
.btn {
|
|
234
|
-
line-height: inherit;
|
|
235
|
-
border: var(--cancel-border);
|
|
236
|
-
border-radius: var(--form-content-border-radius);
|
|
237
|
-
cursor: pointer;
|
|
238
|
-
font-family: inherit;
|
|
239
|
-
font-size: var(--font-size);
|
|
240
|
-
font-weight: 600;
|
|
241
|
-
padding: 6px 16px;
|
|
242
|
-
}
|
|
243
|
-
.btn[disabled] {
|
|
244
|
-
opacity: 0.6;
|
|
245
|
-
pointer-events: none;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
.btn--primary {
|
|
249
|
-
background-color: var(--submit-background);
|
|
250
|
-
border-color: var(--submit-border);
|
|
251
|
-
color: var(--submit-foreground);
|
|
252
|
-
}
|
|
253
|
-
.btn--primary:hover {
|
|
254
|
-
background-color: var(--submit-background-hover);
|
|
255
|
-
color: var(--submit-foreground-hover);
|
|
256
|
-
}
|
|
257
|
-
.btn--primary:focus-visible {
|
|
258
|
-
outline: 1px auto var(--submit-outline-focus);
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
.btn--default {
|
|
262
|
-
background-color: var(--cancel-background);
|
|
263
|
-
color: var(--cancel-foreground);
|
|
264
|
-
font-weight: 500;
|
|
265
|
-
}
|
|
266
|
-
.btn--default:hover {
|
|
267
|
-
background-color: var(--cancel-background-hover);
|
|
268
|
-
color: var(--cancel-foreground-hover);
|
|
269
|
-
}
|
|
270
|
-
.btn--default:focus-visible {
|
|
271
|
-
outline: 1px auto var(--cancel-outline-focus);
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
.success-message {
|
|
275
|
-
background-color: var(--background);
|
|
276
|
-
border: var(--border);
|
|
277
|
-
border-radius: var(--border-radius);
|
|
278
|
-
box-shadow: var(--box-shadow);
|
|
279
|
-
font-weight: 600;
|
|
280
|
-
color: var(--success);
|
|
281
|
-
padding: 12px 24px;
|
|
282
|
-
line-height: 25px;
|
|
283
|
-
display: grid;
|
|
284
|
-
align-items: center;
|
|
285
|
-
grid-auto-flow: column;
|
|
286
|
-
gap: 6px;
|
|
287
|
-
cursor: default;
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
.success-icon path {
|
|
291
|
-
fill: var(--success);
|
|
292
|
-
}
|
|
293
|
-
`,t}function yp(e){return`
|
|
294
|
-
--background: ${e.background};
|
|
295
|
-
--background-hover: ${e.backgroundHover};
|
|
296
|
-
--foreground: ${e.foreground};
|
|
297
|
-
--error: ${e.error};
|
|
298
|
-
--success: ${e.success};
|
|
299
|
-
--border: ${e.border};
|
|
300
|
-
--border-radius: ${e.borderRadius};
|
|
301
|
-
--box-shadow: ${e.boxShadow};
|
|
302
|
-
|
|
303
|
-
--submit-background: ${e.submitBackground};
|
|
304
|
-
--submit-background-hover: ${e.submitBackgroundHover};
|
|
305
|
-
--submit-border: ${e.submitBorder};
|
|
306
|
-
--submit-outline-focus: ${e.submitOutlineFocus};
|
|
307
|
-
--submit-foreground: ${e.submitForeground};
|
|
308
|
-
--submit-foreground-hover: ${e.submitForegroundHover};
|
|
309
|
-
|
|
310
|
-
--cancel-background: ${e.cancelBackground};
|
|
311
|
-
--cancel-background-hover: ${e.cancelBackgroundHover};
|
|
312
|
-
--cancel-border: ${e.cancelBorder};
|
|
313
|
-
--cancel-outline-focus: ${e.cancelOutlineFocus};
|
|
314
|
-
--cancel-foreground: ${e.cancelForeground};
|
|
315
|
-
--cancel-foreground-hover: ${e.cancelForegroundHover};
|
|
316
|
-
|
|
317
|
-
--input-background: ${e.inputBackground};
|
|
318
|
-
--input-foreground: ${e.inputForeground};
|
|
319
|
-
--input-border: ${e.inputBorder};
|
|
320
|
-
--input-outline-focus: ${e.inputOutlineFocus};
|
|
321
|
-
|
|
322
|
-
--form-border-radius: ${e.formBorderRadius};
|
|
323
|
-
--form-content-border-radius: ${e.formContentBorderRadius};
|
|
324
|
-
`}function Jb(e,t,n){let r=e.createElement("style");return r.textContent=`
|
|
325
|
-
:host {
|
|
326
|
-
--bottom: 1rem;
|
|
327
|
-
--right: 1rem;
|
|
328
|
-
--top: auto;
|
|
329
|
-
--left: auto;
|
|
330
|
-
--z-index: 100000;
|
|
331
|
-
--font-family: ${n.light.fontFamily};
|
|
332
|
-
--font-size: ${n.light.fontSize};
|
|
333
|
-
|
|
334
|
-
position: fixed;
|
|
335
|
-
left: var(--left);
|
|
336
|
-
right: var(--right);
|
|
337
|
-
bottom: var(--bottom);
|
|
338
|
-
top: var(--top);
|
|
339
|
-
z-index: var(--z-index);
|
|
340
|
-
|
|
341
|
-
font-family: var(--font-family);
|
|
342
|
-
font-size: var(--font-size);
|
|
343
|
-
|
|
344
|
-
${yp(t==="dark"?n.dark:n.light)}
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
${t==="system"?`
|
|
348
|
-
@media (prefers-color-scheme: dark) {
|
|
349
|
-
:host {
|
|
350
|
-
${yp(n.dark)}
|
|
351
|
-
}
|
|
352
|
-
}`:""}
|
|
353
|
-
}`,r}function Xb({id:e,colorScheme:t,themeDark:n,themeLight:r}){try{let o=yn.document,i=o.createElement("div");i.id=e;let s=i.attachShadow({mode:"open"});return s.appendChild(Jb(o,t,{dark:n,light:r})),s.appendChild(Kb(o)),{shadow:s,host:i}}catch{throw h.warn("[Feedback] Browser does not support shadow DOM API"),new Error("Browser does not support shadow DOM API.")}}async function Zb(e,t,n){if(!e)return;let r=()=>{e&&e.showError("There was a problem submitting feedback, please wait and try again.")};e.hideError();try{return await Ip({...t,source:bp},n)}catch(o){_n&&h.error(o),r()}}function Ge(e,t){return Object.entries(t).forEach(([n,r])=>{e.setAttributeNS(null,n,r)}),e}var ir=20,Qb="http://www.w3.org/2000/svg";function eT(){let e=a=>yn.document.createElementNS(Qb,a),t=Ge(e("svg"),{class:"feedback-icon",width:`${ir}`,height:`${ir}`,viewBox:`0 0 ${ir} ${ir}`,fill:"none"}),n=Ge(e("g"),{clipPath:"url(#clip0_57_80)"}),r=Ge(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.6622 15H12.3997C12.2129 14.9959 12.031 14.9396 11.8747 14.8375L8.04965 12.2H7.49956V19.1C7.4875 19.3348 7.3888 19.5568 7.22256 19.723C7.05632 19.8892 6.83435 19.9879 6.59956 20H2.04956C1.80193 19.9968 1.56535 19.8969 1.39023 19.7218C1.21511 19.5467 1.1153 19.3101 1.11206 19.0625V12.2H0.949652C0.824431 12.2017 0.700142 12.1783 0.584123 12.1311C0.468104 12.084 0.362708 12.014 0.274155 11.9255C0.185602 11.8369 0.115689 11.7315 0.0685419 11.6155C0.0213952 11.4995 -0.00202913 11.3752 -0.00034808 11.25V3.75C-0.00900498 3.62067 0.0092504 3.49095 0.0532651 3.36904C0.0972798 3.24712 0.166097 3.13566 0.255372 3.04168C0.344646 2.94771 0.452437 2.87327 0.571937 2.82307C0.691437 2.77286 0.82005 2.74798 0.949652 2.75H8.04965L11.8747 0.1625C12.031 0.0603649 12.2129 0.00407221 12.3997 0H15.6622C15.9098 0.00323746 16.1464 0.103049 16.3215 0.278167C16.4966 0.453286 16.5964 0.689866 16.5997 0.9375V3.25269C17.3969 3.42959 18.1345 3.83026 18.7211 4.41679C19.5322 5.22788 19.9878 6.32796 19.9878 7.47502C19.9878 8.62209 19.5322 9.72217 18.7211 10.5333C18.1345 11.1198 17.3969 11.5205 16.5997 11.6974V14.0125C16.6047 14.1393 16.5842 14.2659 16.5395 14.3847C16.4948 14.5035 16.4268 14.6121 16.3394 14.7042C16.252 14.7962 16.147 14.8698 16.0307 14.9206C15.9144 14.9714 15.7891 14.9984 15.6622 15ZM1.89695 10.325H1.88715V4.625H8.33715C8.52423 4.62301 8.70666 4.56654 8.86215 4.4625L12.6872 1.875H14.7247V13.125H12.6872L8.86215 10.4875C8.70666 10.3835 8.52423 10.327 8.33715 10.325H2.20217C2.15205 10.3167 2.10102 10.3125 2.04956 10.3125C1.9981 10.3125 1.94708 10.3167 1.89695 10.325ZM2.98706 12.2V18.1625H5.66206V12.2H2.98706ZM16.5997 9.93612V5.01393C16.6536 5.02355 16.7072 5.03495 16.7605 5.04814C17.1202 5.13709 17.4556 5.30487 17.7425 5.53934C18.0293 5.77381 18.2605 6.06912 18.4192 6.40389C18.578 6.73866 18.6603 7.10452 18.6603 7.47502C18.6603 7.84552 18.578 8.21139 18.4192 8.54616C18.2605 8.88093 18.0293 9.17624 17.7425 9.41071C17.4556 9.64518 17.1202 9.81296 16.7605 9.90191C16.7072 9.91509 16.6536 9.9265 16.5997 9.93612Z"});t.appendChild(n).appendChild(r);let o=e("defs"),i=Ge(e("clipPath"),{id:"clip0_57_80"}),s=Ge(e("rect"),{width:`${ir}`,height:`${ir}`,fill:"white"});return i.appendChild(s),o.appendChild(i),t.appendChild(o).appendChild(i).appendChild(s),{get el(){return t}}}function oe(e,t,...n){let o=yn.document.createElement(e);t&&Object.entries(t).forEach(([i,s])=>{i==="className"&&typeof s=="string"?o.setAttribute("class",s):typeof s=="boolean"&&s?o.setAttribute(i,""):typeof s=="string"?o.setAttribute(i,s):i.startsWith("on")&&typeof s=="function"&&o.addEventListener(i.substring(2).toLowerCase(),s)});for(let i of n)vp(o,i);return o}function vp(e,t){let n=yn.document;if(!(typeof t>"u"||t===null))if(Array.isArray(t))for(let r of t)vp(e,r);else t===!1||(typeof t=="string"?e.appendChild(n.createTextNode(t)):t instanceof Node?e.appendChild(t):e.appendChild(n.createTextNode(String(t))))}function tT({buttonLabel:e,onClick:t}){function n(o){t&&t(o)}let r=oe("button",{type:"button",className:"widget__actor","aria-label":e,"aria-hidden":"false"},eT().el,e?oe("span",{className:"widget__actor__text"},e):null);return r.addEventListener("click",n),{get el(){return r},show:()=>{r.classList.remove("widget__actor--hidden"),r.setAttribute("aria-hidden","false")},hide:()=>{r.classList.add("widget__actor--hidden"),r.setAttribute("aria-hidden","true")}}}function nT({label:e}){return{el:oe("button",{type:"submit",className:"btn btn--primary","aria-label":e},e)}}function Lc(e,t){let n=e.get(t);return typeof n=="string"?n.trim():""}function rT({nameLabel:e,namePlaceholder:t,emailLabel:n,emailPlaceholder:r,messageLabel:o,messagePlaceholder:i,isRequiredLabel:s,cancelButtonLabel:a,submitButtonLabel:c,showName:u,showEmail:l,isNameRequired:d,isEmailRequired:p,defaultName:m,defaultEmail:g,onCancel:E,onSubmit:T}){let{el:S}=nT({label:c});function b(N){if(N.preventDefault(),N.target instanceof HTMLFormElement)try{if(T){let K=new FormData(N.target),se={name:Lc(K,"name"),email:Lc(K,"email"),message:Lc(K,"message")};T(se)}}catch{}}let v=oe("div",{className:"form__error-container form__error-container--hidden","aria-hidden":"true"});function O(N){v.textContent=N,v.classList.remove("form__error-container--hidden"),v.setAttribute("aria-hidden","false")}function L(){v.textContent="",v.classList.add("form__error-container--hidden"),v.setAttribute("aria-hidden","true")}let M=oe("input",{id:"name",type:u?"text":"hidden","aria-hidden":u?"false":"true",name:"name",required:d,className:"form__input",placeholder:t,value:m}),w=oe("input",{id:"email",type:l?"text":"hidden","aria-hidden":l?"false":"true",name:"email",required:p,className:"form__input",placeholder:r,value:g}),U=oe("textarea",{id:"message",autoFocus:"true",rows:"5",name:"message",required:!0,className:"form__input form__input--textarea",placeholder:i}),ne=oe("button",{type:"button",className:"btn btn--default","aria-label":a,onClick:N=>{E&&E(N)}},a),k=oe("form",{className:"form",onSubmit:b},[v,u&&oe("label",{htmlFor:"name",className:"form__label"},[oe("span",{className:"form__label__text"},e,d&&oe("span",{className:"form__label__text--required"},` ${s}`)),M]),!u&&M,l&&oe("label",{htmlFor:"email",className:"form__label"},[oe("span",{className:"form__label__text"},n,p&&oe("span",{className:"form__label__text--required"},` ${s}`)),w]),!l&&w,oe("label",{htmlFor:"message",className:"form__label"},[oe("span",{className:"form__label__text"},o,oe("span",{className:"form__label__text--required"},` ${s}`)),U]),oe("div",{className:"btn-group"},[S,ne])]);return{get el(){return k},showError:O,hideError:L}}var oT="http://www.w3.org/2000/svg";function iT({colorScheme:e}){let t=s=>yn.document.createElementNS(oT,s),n=Ge(t("svg"),{class:"sentry-logo",width:"32",height:"30",viewBox:"0 0 72 66",fill:"none"}),r=Ge(t("path"),{transform:"translate(11, 11)",d:"M29,2.26a4.67,4.67,0,0,0-8,0L14.42,13.53A32.21,32.21,0,0,1,32.17,40.19H27.55A27.68,27.68,0,0,0,12.09,17.47L6,28a15.92,15.92,0,0,1,9.23,12.17H4.62A.76.76,0,0,1,4,39.06l2.94-5a10.74,10.74,0,0,0-3.36-1.9l-2.91,5a4.54,4.54,0,0,0,1.69,6.24A4.66,4.66,0,0,0,4.62,44H19.15a19.4,19.4,0,0,0-8-17.31l2.31-4A23.87,23.87,0,0,1,23.76,44H36.07a35.88,35.88,0,0,0-16.41-31.8l4.67-8a.77.77,0,0,1,1.05-.27c.53.29,20.29,34.77,20.66,35.17a.76.76,0,0,1-.68,1.13H40.6q.09,1.91,0,3.81h4.78A4.59,4.59,0,0,0,50,39.43a4.49,4.49,0,0,0-.62-2.28Z"});n.append(r);let o=t("defs"),i=t("style");return i.textContent=`
|
|
354
|
-
path {
|
|
355
|
-
fill: ${e==="dark"?"#fff":"#362d59"};
|
|
356
|
-
}`,e==="system"&&(i.textContent+=`
|
|
357
|
-
@media (prefers-color-scheme: dark) {
|
|
358
|
-
path: {
|
|
359
|
-
fill: '#fff';
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
`),o.append(i),n.append(o),{get el(){return n}}}function sT({formTitle:e,showBranding:t,showName:n,showEmail:r,isNameRequired:o,isEmailRequired:i,colorScheme:s,defaultName:a,defaultEmail:c,onClosed:u,onCancel:l,onSubmit:d,...p}){let m=null;function g(){E(),u&&u()}function E(){m&&(m.open=!1)}function T(){m&&(m.open=!0)}function S(){return m&&m.open===!0||!1}let{el:b,showError:v,hideError:O}=rT({showEmail:r,showName:n,isEmailRequired:i,isNameRequired:o,defaultName:a,defaultEmail:c,onSubmit:d,onCancel:l,...p});return m=oe("dialog",{className:"dialog",open:!0,onClick:g},oe("div",{className:"dialog__content",onClick:L=>{L.stopPropagation()}},oe("h2",{className:"dialog__header"},e,t&&oe("a",{className:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer"},iT({colorScheme:s}).el)),b)),{get el(){return m},showError:v,hideError:O,open:T,close:E,checkIsOpen:S}}var es=16,Sp=17,aT="http://www.w3.org/2000/svg";function cT(){let e=c=>yn.document.createElementNS(aT,c),t=Ge(e("svg"),{class:"success-icon",width:`${es}`,height:`${Sp}`,viewBox:`0 0 ${es} ${Sp}`,fill:"none"}),n=Ge(e("g"),{clipPath:"url(#clip0_57_156)"}),r=Ge(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z"}),o=Ge(e("path"),{d:"M6.68775 12.4297C6.78586 12.4745 6.89218 12.4984 7 12.5C7.11275 12.4955 7.22315 12.4664 7.32337 12.4145C7.4236 12.3627 7.51121 12.2894 7.58 12.2L12 5.63999C12.0848 5.47724 12.1071 5.28902 12.0625 5.11098C12.0178 4.93294 11.9095 4.77744 11.7579 4.67392C11.6064 4.57041 11.4221 4.52608 11.24 4.54931C11.0579 4.57254 10.8907 4.66173 10.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z"});t.appendChild(n).append(o,r);let i=e("defs"),s=Ge(e("clipPath"),{id:"clip0_57_156"}),a=Ge(e("rect"),{width:`${es}`,height:`${es}`,fill:"white",transform:"translate(0 0.5)"});return s.appendChild(a),i.appendChild(s),t.appendChild(i).appendChild(s).appendChild(a),{get el(){return t}}}function uT({message:e,onRemove:t}){function n(){r&&(r.remove(),t&&t())}let r=oe("div",{className:"success-message",onClick:n},cT().el,e);return{el:r,remove:n}}function Ep({shadow:e,options:{shouldCreateActor:t=!0,...n},attachTo:r}){let o,i,s=!1;function a(){if(e)try{let S=uT({message:n.successMessageText,onRemove:()=>{b&&clearTimeout(b),l()}});if(!S.el)throw new Error("Unable to show success message");e.appendChild(S.el);let b=setTimeout(()=>{S&&S.remove()},5e3)}catch(S){h.error(S)}}async function c(S){if(!i)return;let b=[];if(n.isNameRequired&&!S.name&&b.push(n.nameLabel),n.isEmailRequired&&!S.email&&b.push(n.emailLabel),S.message||b.push(n.messageLabel),b.length>0){i.showError(`Please enter in the following required fields: ${b.join(", ")}`);return}if(!await Zb(i,S)){n.onSubmitError&&n.onSubmitError();return}E(),a(),n.onSubmitSuccess&&n.onSubmitSuccess()}function u(){let S=x(),b=S&&S.getIntegrationByName&&S.getIntegrationByName("Replay");b&&b.flush().catch(v=>{_n&&h.error(v)})}function l(){o&&o.show()}function d(){o&&o.hide()}function p(){o&&o.el&&o.el.remove()}function m(){try{if(i){i.open(),s=!0,n.onFormOpen&&n.onFormOpen(),u();return}let S=n.useSentryUser,b=q(),v=b&&b.getUser();if(i=sT({colorScheme:n.colorScheme,showBranding:n.showBranding,showName:n.showName||n.isNameRequired,showEmail:n.showEmail||n.isEmailRequired,isNameRequired:n.isNameRequired,isEmailRequired:n.isEmailRequired,formTitle:n.formTitle,cancelButtonLabel:n.cancelButtonLabel,submitButtonLabel:n.submitButtonLabel,emailLabel:n.emailLabel,emailPlaceholder:n.emailPlaceholder,messageLabel:n.messageLabel,messagePlaceholder:n.messagePlaceholder,nameLabel:n.nameLabel,namePlaceholder:n.namePlaceholder,isRequiredLabel:n.isRequiredLabel,defaultName:S&&v&&v[S.name]||"",defaultEmail:S&&v&&v[S.email]||"",onClosed:()=>{l(),s=!1,n.onFormClose&&n.onFormClose()},onCancel:()=>{g(),l()},onSubmit:c}),!i.el)throw new Error("Unable to open Feedback dialog");e.appendChild(i.el),d(),n.onFormOpen&&n.onFormOpen(),u()}catch(S){h.error(S)}}function g(){i&&(i.close(),s=!1,n.onFormClose&&n.onFormClose())}function E(){if(i){g();let S=i.el;S&&S.remove(),i=void 0}}function T(){s||m(),d()}return r?r.addEventListener("click",T):t&&(o=tT({buttonLabel:n.buttonLabel,onClick:T}),o.el&&e.appendChild(o.el)),{get actor(){return o},get dialog(){return i},showActor:l,hideActor:d,removeActor:p,openDialog:m,closeDialog:g,removeDialog:E}}var ts=yn.document,lT=e=>new mo(e),mo=class e{static __initStatic(){this.id="Feedback"}constructor({autoInject:t=!0,id:n="sentry-feedback",isEmailRequired:r=!1,isNameRequired:o=!1,showBranding:i=!0,showEmail:s=!0,showName:a=!0,useSentryUser:c={email:"email",name:"username"},themeDark:u,themeLight:l,colorScheme:d="system",buttonLabel:p=Db,cancelButtonLabel:m=Lb,submitButtonLabel:g=Pb,formTitle:E=Fb,emailPlaceholder:T=Bb,emailLabel:S=Hb,messagePlaceholder:b=Ub,messageLabel:v=$b,namePlaceholder:O=Gb,nameLabel:L=Wb,isRequiredLabel:M=zb,successMessageText:w=jb,onFormClose:U,onFormOpen:ne,onSubmitError:k,onSubmitSuccess:N}={}){this.name=e.id,this._host=null,this._shadow=null,this._widget=null,this._widgets=new Set,this._hasInsertedActorStyles=!1,this.options={autoInject:t,showBranding:i,id:n,isEmailRequired:r,isNameRequired:o,showEmail:s,showName:a,useSentryUser:c,colorScheme:d,themeDark:{...gp.dark,...u},themeLight:{...gp.light,...l},buttonLabel:p,cancelButtonLabel:m,submitButtonLabel:g,formTitle:E,emailLabel:S,emailPlaceholder:T,messageLabel:v,messagePlaceholder:b,nameLabel:L,namePlaceholder:O,isRequiredLabel:M,successMessageText:w,onFormClose:U,onFormOpen:ne,onSubmitError:k,onSubmitSuccess:N}}setupOnce(){if(kn())try{this._cleanupWidgetIfExists();let{autoInject:t}=this.options;if(!t)return;this._createWidget(this.options)}catch(t){_n&&h.error(t)}}openDialog(){this._widget||this._createWidget({...this.options,shouldCreateActor:!1}),this._widget&&this._widget.openDialog()}closeDialog(){this._widget&&this._widget.closeDialog()}attachTo(t,n){try{let r=_p(this.options,n||{});return this._ensureShadowHost(r,({shadow:o})=>{let i=typeof t=="string"?ts.querySelector(t):typeof t.addEventListener=="function"?t:null;if(!i)return _n&&h.error("[Feedback] Unable to attach to target element"),null;let s=Ep({shadow:o,options:r,attachTo:i});return this._widgets.add(s),this._widget||(this._widget=s),s})}catch(r){return _n&&h.error(r),null}}createWidget(t){try{return this._createWidget(_p(this.options,t||{}))}catch(n){return _n&&h.error(n),null}}removeWidget(t){if(!t)return!1;try{if(this._widgets.has(t))return t.removeActor(),t.removeDialog(),this._widgets.delete(t),this._widget===t&&(this._widget=null),!0}catch(n){_n&&h.error(n)}return!1}getWidget(){return this._widget}remove(){this._host&&this._host.remove(),this._initialize()}_initialize(){this._host=null,this._shadow=null,this._widget=null,this._widgets=new Set,this._hasInsertedActorStyles=!1}_cleanupWidgetIfExists(){this._host&&this.remove();let t=ts.querySelector(`#${this.options.id}`);t&&t.remove()}_createWidget(t){return this._ensureShadowHost(t,({shadow:n})=>{let r=Ep({shadow:n,options:t});return!this._hasInsertedActorStyles&&r.actor&&(n.appendChild(Vb(ts)),this._hasInsertedActorStyles=!0),this._widgets.add(r),this._widget||(this._widget=r),r})}_ensureShadowHost(t,n){let r=!1;if(!this._shadow||!this._host){let{id:i,colorScheme:s,themeLight:a,themeDark:c}=t,{shadow:u,host:l}=Xb({id:i,colorScheme:s,themeLight:a,themeDark:c});this._shadow=u,this._host=l,r=!0}this._host.dataset.sentryFeedbackColorscheme=t.colorScheme;let o=n({shadow:this._shadow,host:this._host});return r&&ts.body.appendChild(this._host),o}};mo.__initStatic();f();f();var xp="CaptureConsole",dT=(e={})=>{let t=e.levels||Zt;return{name:xp,setupOnce(){},setup(n){"console"in C&&gr(({args:r,level:o})=>{x()!==n||!t.includes(o)||pT(r,o)})}}},Pc=dT,fT=D(xp,Pc);function pT(e,t){let n={level:vr(t),extra:{arguments:e}};De(r=>{if(r.addEventProcessor(s=>(s.logger="console",Ue(s,{handled:!1,type:"console"}),s)),t==="assert"&&e[0]===!1){let s=`Assertion failed: ${Jt(e.slice(1)," ")||"console.assert"}`;r.setExtra("arguments",e.slice(1)),an(s,n);return}let o=e.find(s=>s instanceof Error);if(t==="error"&&o){xt(o,n);return}let i=Jt(e," ");an(i,n)})}f();var wp="Debug",mT=(e={})=>{let t={debugger:!1,stringify:!1,...e};return{name:wp,setupOnce(){},setup(n){n.on&&n.on("beforeSendEvent",(r,o)=>{if(t.debugger)debugger;Re(()=>{t.stringify?(console.log(JSON.stringify(r,null,2)),o&&Object.keys(o).length&&console.log(JSON.stringify(o,null,2))):(console.log(r),o&&Object.keys(o).length&&console.log(o))})})}}},Fc=mT,hT=D(wp,Fc);f();f();var kt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var kp="Dedupe",gT=()=>{let e;return{name:kp,setupOnce(){},processEvent(t){if(t.type)return t;try{if(yT(t,e))return kt&&h.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},Bc=gT,_T=D(kp,Bc);function yT(e,t){return t?!!(ST(e,t)||ET(e,t)):!1}function ST(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Op(e,t)||!Ap(e,t))}function ET(e,t){let n=Cp(t),r=Cp(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Op(e,t)||!Ap(e,t))}function Ap(e,t){let n=Rp(e),r=Rp(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let o=0;o<r.length;o++){let i=r[o],s=n[o];if(i.filename!==s.filename||i.lineno!==s.lineno||i.colno!==s.colno||i.function!==s.function)return!1}return!0}function Op(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function Cp(e){return e.exception&&e.exception.values&&e.exception.values[0]}function Rp(e){let t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch{return}}f();var Mp="ExtraErrorData",bT=(e={})=>{let t=e.depth||3,n=e.captureErrorCause||!1;return{name:Mp,setupOnce(){},processEvent(r,o){return IT(r,o,t,n)}}},Hc=bT,TT=D(Mp,Hc);function IT(e,t={},n,r){if(!t.originalException||!ut(t.originalException))return e;let o=t.originalException.name||t.originalException.constructor.name,i=vT(t.originalException,r);if(i){let s={...e.contexts},a=be(i,n);return Fe(a)&&(ke(a,"__sentry_skip_normalization__",!0),s[o]=a),{...e,contexts:s}}return e}function vT(e,t){try{let n=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],r={};for(let o of Object.keys(e)){if(n.indexOf(o)!==-1)continue;let i=e[o];r[o]=ut(i)?i.toString():i}if(t&&e.cause!==void 0&&(r.cause=ut(e.cause)?e.cause.toString():e.cause),typeof e.toJSON=="function"){let o=e.toJSON();for(let i of Object.keys(o)){let s=o[i];r[i]=ut(s)?s.toString():s}}return r}catch(n){kt&&h.error("Unable to extract extra data from the Error object:",n)}return null}f();var xT=C,Dp="ReportingObserver",Np=new WeakMap,wT=(e={})=>{let t=e.types||["crash","deprecation","intervention"];function n(r){if(Np.has(x()))for(let o of r)De(i=>{i.setExtra("url",o.url);let s=`ReportingObserver [${o.type}]`,a="No details available";if(o.body){let c={};for(let u in o.body)c[u]=o.body[u];if(i.setExtra("body",c),o.type==="crash"){let u=o.body;a=[u.crashId||"",u.reason||""].join(" ").trim()||a}else a=o.body.message||a}an(`${s}: ${a}`)})}return{name:Dp,setupOnce(){if(!Is())return;new xT.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(r){Np.set(r,!0)}}},Uc=wT,CT=D(Dp,Uc);f();var Lp="RewriteFrames",RT=(e={})=>{let t=e.root,n=e.prefix||"app:///",r=e.iteratee||(s=>{if(!s.filename)return s;let a=/^[a-zA-Z]:\\/.test(s.filename)||s.filename.includes("\\")&&!s.filename.includes("/"),c=/^\//.test(s.filename);if(a||c){let u=a?s.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):s.filename,l=t?Rs(t,u):ks(u);s.filename=`${n}${l}`}return s});function o(s){try{return{...s,exception:{...s.exception,values:s.exception.values.map(a=>({...a,...a.stacktrace&&{stacktrace:i(a.stacktrace)}}))}}}catch{return s}}function i(s){return{...s,frames:s&&s.frames&&s.frames.map(a=>r(a))}}return{name:Lp,setupOnce(){},processEvent(s){let a=s;return s.exception&&Array.isArray(s.exception.values)&&(a=o(a)),a}}},$c=RT,kT=D(Lp,$c);f();var Pp="SessionTiming",AT=()=>{let e=Date.now();return{name:Pp,setupOnce(){},processEvent(t){let n=Date.now();return{...t,extra:{...t.extra,"session:start":e,"session:duration":n-e,"session:end":n}}}}},Gc=AT,OT=D(Pp,Gc);f();var Fp="HttpClient",MT=(e={})=>{let t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:Fp,setupOnce(){},setup(n){$T(n,t),GT(n,t)}}},Wc=MT,NT=D(Fp,Wc);function DT(e,t,n,r){if(Hp(e,n.status,n.url)){let o=WT(t,r),i,s,a,c;$p()&&([{headers:i,cookies:a},{headers:s,cookies:c}]=[{cookieHeader:"Cookie",obj:o},{cookieHeader:"Set-Cookie",obj:n}].map(({cookieHeader:l,obj:d})=>{let p=FT(d.headers),m;try{let g=p[l]||p[l.toLowerCase()]||void 0;g&&(m=Bp(g))}catch{kt&&h.log(`Could not extract cookies from header ${l}`)}return{headers:p,cookies:m}}));let u=Up({url:o.url,method:o.method,status:n.status,requestHeaders:i,responseHeaders:s,requestCookies:a,responseCookies:c});Mt(u)}}function LT(e,t,n,r){if(Hp(e,t.status,t.responseURL)){let o,i,s;if($p()){try{let c=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;c&&(i=Bp(c))}catch{kt&&h.log("Could not extract cookies from response headers")}try{s=BT(t)}catch{kt&&h.log("Could not extract headers from response")}o=r}let a=Up({url:t.responseURL,method:n,status:t.status,requestHeaders:o,responseHeaders:s,responseCookies:i});Mt(a)}}function PT(e){if(e){let t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}function Bp(e){return e.split("; ").reduce((t,n)=>{let[r,o]=n.split("=");return t[r]=o,t},{})}function FT(e){let t={};return e.forEach((n,r)=>{t[r]=n}),t}function BT(e){let t=e.getAllResponseHeaders();return t?t.split(`\r
|
|
363
|
-
`).reduce((n,r)=>{let[o,i]=r.split(": ");return n[o]=i,n},{}):{}}function HT(e,t){return e.some(n=>typeof n=="string"?t.includes(n):n.test(t))}function UT(e,t){return e.some(n=>typeof n=="number"?n===t:t>=n[0]&&t<=n[1])}function $T(e,t){Er()&&bt(n=>{if(x()!==e)return;let{response:r,args:o}=n,[i,s]=o;r&&DT(t,i,r,s)})}function GT(e,t){"XMLHttpRequest"in C&&Tt(n=>{if(x()!==e)return;let r=n.xhr,o=r[Ne];if(!o)return;let{method:i,request_headers:s}=o;try{LT(t,r,i,s)}catch(a){kt&&h.warn("Error while extracting response event form XHR response",a)}})}function Hp(e,t,n){return UT(e.failedRequestStatusCodes,t)&&HT(e.failedRequestTargets,n)&&!Wr(n,x())}function Up(e){let t=`HTTP Client Error with status code: ${e.status}`,n={message:t,exception:{values:[{type:"Error",value:t}]},request:{url:e.url,method:e.method,headers:e.requestHeaders,cookies:e.requestCookies},contexts:{response:{status_code:e.status,headers:e.responseHeaders,cookies:e.responseCookies,body_size:PT(e.responseHeaders)}}};return Ue(n,{type:"http.client",handled:!1}),n}function WT(e,t){return!t&&e instanceof Request||e instanceof Request&&e.bodyUsed?e:new Request(e,t)}function $p(){let e=x();return e?!!e.getOptions().sendDefaultPii:!1}f();var zc=C,zT=7,Gp="ContextLines",jT=(e={})=>{let t=e.frameContextLines!=null?e.frameContextLines:zT;return{name:Gp,setupOnce(){},processEvent(n){return YT(n,t)}}},jc=jT,qT=D(Gp,jc);function YT(e,t){let n=zc.document,r=zc.location&&Os(zc.location.href);if(!n||!r)return e;let o=e.exception&&e.exception.values;if(!o||!o.length)return e;let i=n.documentElement.innerHTML;if(!i)return e;let s=["<!DOCTYPE html>","<html>",...i.split(`
|
|
364
|
-
`),"</html>"];return o.forEach(a=>{let c=a.stacktrace;c&&c.frames&&(c.frames=c.frames.map(u=>VT(u,s,r,t)))}),e}function VT(e,t,n,r){return e.filename!==n||!e.lineno||!t.length||Es(t,e,r),e}f();function ho(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function KT(e,t){let n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);let r=ho(n);return o=>r.then(i=>o(i.transaction(t,"readwrite").objectStore(t)))}function Wp(e){return ho(e.getAllKeys())}function JT(e,t,n){return e(r=>Wp(r).then(o=>{if(!(o.length>=n))return r.put(t,Math.max(...o,0)+1),ho(r.transaction)}))}function XT(e){return e(t=>Wp(t).then(n=>{if(n.length!==0)return ho(t.get(n[0])).then(r=>(t.delete(n[0]),ho(t.transaction).then(()=>r)))}))}function ZT(e){let t;function n(){return t==null&&(t=KT(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{insert:async r=>{try{let o=await kr(r,e.textEncoder);await JT(n(),o,e.maxQueueSize||30)}catch{}},pop:async()=>{try{let r=await XT(n());if(r)return Fs(r,e.textEncoder||new TextEncoder,e.textDecoder||new TextDecoder)}catch{}}}}function QT(e){return t=>e({...t,createStore:ZT})}function eI(e){return QT(la(e))}f();f();var zp=1e6,ns=String(0),tI="main",Yp="",Vp="",Kp="",qc=A.navigator&&A.navigator.userAgent||"",Jp="",nI=A.navigator&&A.navigator.language||A.navigator&&A.navigator.languages&&A.navigator.languages[0]||"";function rI(e){return typeof e=="object"&&e!==null&&"getHighEntropyValues"in e}var jp=A.navigator&&A.navigator.userAgentData;rI(jp)&&jp.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(e=>{if(Yp=e.platform||"",Kp=e.architecture||"",Jp=e.model||"",Vp=e.platformVersion||"",e.fullVersionList&&e.fullVersionList.length>0){let t=e.fullVersionList[e.fullVersionList.length-1];qc=`${t.brand} ${t.version}`}}).catch(e=>{});function oI(e){return!("thread_metadata"in e)}function iI(e){return oI(e)?cI(e):e}function sI(e){let t=e&&e.contexts&&e.contexts.trace&&e.contexts.trace.trace_id;return typeof t=="string"&&t.length!==32&&F&&h.log(`[Profiling] Invalid traceId: ${t} on profiled event`),typeof t!="string"?"":t}function aI(e,t,n,r){if(r.type!=="transaction")throw new TypeError("Profiling events may only be attached to transactions, this should never occur.");if(n==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`);let o=sI(r),i=iI(n),s=t||(typeof r.start_timestamp=="number"?r.start_timestamp*1e3:Date.now()),a=typeof r.timestamp=="number"?r.timestamp*1e3:Date.now();return{event_id:e,timestamp:new Date(s).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||rt,runtime:{name:"javascript",version:A.navigator.userAgent},os:{name:Yp,version:Vp,build_number:qc},device:{locale:nI,model:Jp,manufacturer:qc,architecture:Kp,is_emulator:!1},debug_meta:{images:uI(n.resources)},profile:i,transactions:[{name:r.transaction||"",id:r.event_id||B(),trace_id:o,active_thread_id:ns,relative_start_ns:"0",relative_end_ns:((a-s)*1e6).toFixed(0)}]}}function rs(e){return e.op==="pageload"}function cI(e){let t,n=0,r={samples:[],stacks:[],frames:[],thread_metadata:{[ns]:{name:tI}}};if(!e.samples.length)return r;let o=e.samples[0].timestamp,i=typeof performance.timeOrigin=="number"?performance.timeOrigin:re||0,s=i-(re||i);for(let a=0;a<e.samples.length;a++){let c=e.samples[a];if(c.stackId===void 0){t===void 0&&(t=n,r.stacks[t]=[],n++),r.samples[a]={elapsed_since_start_ns:((c.timestamp+s-o)*zp).toFixed(0),stack_id:t,thread_id:ns};continue}let u=e.stacks[c.stackId],l=[];for(;u;){l.push(u.frameId);let p=e.frames[u.frameId];r.frames[u.frameId]===void 0&&(r.frames[u.frameId]={function:p.name,abs_path:typeof p.resourceId=="number"?e.resources[p.resourceId]:void 0,lineno:p.line,colno:p.column}),u=u.parentId===void 0?void 0:e.stacks[u.parentId]}let d={elapsed_since_start_ns:((c.timestamp+s-o)*zp).toFixed(0),stack_id:n,thread_id:ns};r.stacks[n]=l,r.samples[a]=d,n++}return r}function Xp(e,t){if(!t.length)return e;for(let n of t)e[1].push([{type:"profile"},n]);return e}function Zp(e){let t=[];return nt(e,(n,r)=>{if(r==="transaction")for(let o=1;o<n.length;o++){let i=n[o];i&&i.contexts&&i.contexts.profile&&i.contexts.profile.profile_id&&t.push(n[o])}}),t}var qp=new WeakMap;function uI(e){let t=C._sentryDebugIds;if(!t)return[];let n=x(),r=n&&n.getOptions(),o=r&&r.stackParser;if(!o)return[];let i,s=qp.get(o);s?i=s:(i=new Map,qp.set(o,i));let a=Object.keys(t).reduce((u,l)=>{let d,p=i.get(l);p?d=p:(d=o(l),i.set(l,d));for(let m=d.length-1;m>=0;m--){let g=d[m],E=g&&g.filename;if(g&&E){u[E]=t[l];break}}return u},{}),c=[];for(let u of e)u&&a[u]&&c.push({type:"sourcemap",code_file:u,debug_id:a[u]});return c}function lI(e){return typeof e!="number"&&typeof e!="boolean"||typeof e=="number"&&isNaN(e)?(F&&h.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e===!0||e===!1?!0:e<0||e>1?(F&&h.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function dI(e){return e.samples.length<2?(F&&h.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):e.frames.length?!0:(F&&h.log("[Profiling] Discarding profile because it contains no frames"),!1)}var Qp=!1,Yc=3e4;function fI(e){return typeof e=="function"}function em(){let e=A.Profiler;if(!fI(e)){F&&h.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}let t=10,n=Math.floor(Yc/t);try{return new e({sampleInterval:t,maxBufferSize:n})}catch{F&&(h.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),h.log("[Profiling] Disabling profiling for current user session.")),Qp=!0}}function go(e){if(Qp)return F&&h.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!e.isRecording())return F&&h.log("[Profiling] Discarding profile because transaction was not sampled."),!1;let t=x(),n=t&&t.getOptions();if(!n)return F&&h.log("[Profiling] Profiling disabled, no options found."),!1;let r=n.profilesSampleRate;return lI(r)?r?(r===!0?!0:Math.random()<r)?!0:(F&&h.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(r)})`),!1):(F&&h.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1):(F&&h.warn("[Profiling] Discarding profile because of invalid sample rate."),!1)}function tm(e,t,n,r){return dI(n)?aI(e,t,n,r):null}var Sn=new Map;function nm(){return Sn.size}function rm(e){let t=Sn.get(e);return t&&Sn.delete(e),t}function om(e,t){if(Sn.set(e,t),Sn.size>30){let n=Sn.keys().next().value;Sn.delete(n)}}function pI(e){return e?go(e)?os(e):e:(F&&h.log("[Profiling] Transaction is undefined, skipping profiling"),e)}function os(e){let t;rs(e)&&(t=Ie()*1e3);let n=em();if(!n)return e;F&&h.log(`[Profiling] started profiling transaction: ${P(e).description}`);let r=B();async function o(){return!e||!n?null:n.stop().then(c=>(i&&(A.clearTimeout(i),i=void 0),F&&h.log(`[Profiling] stopped profiling of transaction: ${P(e).description}`),c?(om(r,c),null):(F&&h.log(`[Profiling] profiler returned null profile for: ${P(e).description}`,"this may indicate an overlapping transaction or a call to stopProfiling with a profile title that was never started"),null))).catch(c=>(F&&h.log("[Profiling] error while stopping profiler:",c),null))}let i=A.setTimeout(()=>{F&&h.log("[Profiling] max profile duration elapsed, stopping profiling for:",P(e).description),o()},Yc),s=e.end.bind(e);function a(){return e?(o().then(()=>{e.setContext("profile",{profile_id:r,start_timestamp:t}),s()},()=>{s()}),e):s()}return e.end=a,e}f();var im="BrowserProfiling",mI=()=>({name:im,setupOnce(){},setup(e){let n=q().getTransaction();if(n&&rs(n)&&go(n)&&os(n),typeof e.on!="function"){h.warn("[Profiling] Client does not support hooks, profiling will be disabled");return}e.on("startTransaction",r=>{go(r)&&os(r)}),e.on("beforeEnvelope",r=>{if(!nm())return;let o=Zp(r);if(!o.length)return;let i=[];for(let s of o){let a=s&&s.contexts,c=a&&a.profile&&a.profile.profile_id,u=a&&a.profile&&a.profile.start_timestamp;if(typeof c!="string"){F&&h.log("[Profiling] cannot find profile for a transaction without a profile context");continue}if(!c){F&&h.log("[Profiling] cannot find profile for a transaction without a profile context");continue}a&&a.profile&&delete a.profile;let l=rm(c);if(!l){F&&h.log(`[Profiling] Could not retrieve profile for transaction: ${c}`);continue}let d=tm(c,u,l,s);d&&i.push(d)}Xp(r,i)})}}),sm=mI,hI=D(im,sm);var am={};A.Sentry&&A.Sentry.Integrations&&(am=A.Sentry.Integrations);var DP={...am,...$l,...ja};export{Ba as Breadcrumbs,Jr as BrowserClient,hI as BrowserProfilingIntegration,yi as BrowserTracing,Ua as Dedupe,mo as Feedback,oi as FunctionToString,$a as GlobalHandlers,Ga as HttpContext,Nn as Hub,ri as InboundFilters,DP as Integrations,Wa as LinkedErrors,Ol as ModuleMetadata,uo as Replay,Nb as ReplayCanvas,ln as SDK_VERSION,dn as SEMANTIC_ATTRIBUTE_SENTRY_OP,st as SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,pt as SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,_e as SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,it as Scope,za as TryCatch,A as WINDOW,Ye as addBreadcrumb,Zo as addEventProcessor,Bo as addGlobalEventProcessor,cl as addIntegration,Bn as addTracingExtensions,Ti as breadcrumbsIntegration,wi as browserApiErrorsIntegration,sm as browserProfilingIntegration,bd as browserTracingIntegration,Pc as captureConsoleIntegration,Mt as captureEvent,xt as captureException,an as captureMessage,Lr as captureSession,cy as captureUserFeedback,vd as chromeStackLineParser,Uu as close,Au as configureScope,jc as contextLinesIntegration,Qu as continueTrace,Un as createTransport,Da as createUserFeedbackEnvelope,Fc as debugIntegration,Bc as dedupeIntegration,Wd as defaultIntegrations,Ht as defaultRequestInstrumentationOptions,Cd as defaultStackLineParsers,Fa as defaultStackParser,Wo as endSession,Ma as eventFromException,Na as eventFromMessage,Si as exceptionFromError,Hc as extraErrorDataIntegration,qu as extractTraceparentData,lT as feedbackIntegration,Hu as flush,oy as forceLoad,jr as functionToStringIntegration,xd as geckoStackLineParser,Pt as getActiveSpan,ye as getActiveTransaction,x as getClient,W as getCurrentHub,q as getCurrentScope,zd as getDefaultIntegrations,Fr as getHubFromCarrier,Eb as getReplay,jo as getSpanStatusFromHttpCode,Ii as globalHandlersIntegration,Wc as httpClientIntegration,vi as httpContextIntegration,zr as inboundFiltersIntegration,ny as init,zn as instrumentOutgoingRequests,Gu as isInitialized,$u as lastEventId,xi as linkedErrorsIntegration,eI as makeBrowserOfflineTransport,La as makeFetchTransport,zo as makeMain,Il as makeMultiplexedTransport,Pa as makeXHRTransport,Ul as metrics,pa as moduleMetadataIntegration,iy as onLoad,pI as onProfilingStartRouteTransaction,x_ as opera10StackLineParser,R_ as opera11StackLineParser,xl as parameterize,pp as replayCanvasIntegration,yb as replayIntegration,Uc as reportingObserverIntegration,$c as rewriteFramesIntegration,Ip as sendFeedback,Gc as sessionTimingIntegration,Go as setContext,ca as setCurrentClient,Mu as setExtra,Ou as setExtras,Lt as setHttpStatus,Xo as setMeasurement,Du as setTag,Nu as setTags,Lu as setUser,ry as showReportDialog,Ku as spanStatusfromHttpCode,wa as startBrowserTracingNavigationSpan,xa as startBrowserTracingPageLoadSpan,Dn as startInactiveSpan,Dr as startSession,Xu as startSpan,Zu as startSpanManual,Bu as startTransaction,Ju as trace,wd as winjsStackLineParser,Fu as withActiveSpan,Pu as withIsolationScope,De as withScope,sy as wrap};
|
|
365
|
-
//# sourceMappingURL=esm-Z5T56VLV.js.map
|