@nylas/web-elements 1.4.1 → 1.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/dist/nylas-web-elements/{index-95193d9b.js → index-212258bf.js} +2 -2
  2. package/dist/nylas-web-elements/{index.es-69f2eefb.js → index.es-82b6efae.js} +2 -2
  3. package/dist/nylas-web-elements/index.esm.js +1 -1
  4. package/dist/nylas-web-elements/input-component.entry.js +1 -1
  5. package/dist/nylas-web-elements/input-component.entry.js.map +1 -1
  6. package/dist/nylas-web-elements/input-image-url.entry.js +1 -1
  7. package/dist/nylas-web-elements/multi-select-dropdown.entry.js +1 -1
  8. package/dist/nylas-web-elements/nylas-additional-participants.entry.js +1 -1
  9. package/dist/nylas-web-elements/{nylas-api-request-d8eb4c91.js → nylas-api-request-51129e10.js} +2 -2
  10. package/dist/nylas-web-elements/nylas-availability-picker.entry.js +1 -1
  11. package/dist/nylas-web-elements/nylas-booked-event-card.entry.js +1 -1
  12. package/dist/nylas-web-elements/nylas-booking-calendar-picker.entry.js +1 -1
  13. package/dist/nylas-web-elements/nylas-booking-confirmation-redirect.entry.js +1 -1
  14. package/dist/nylas-web-elements/nylas-booking-confirmation-type.entry.js +1 -1
  15. package/dist/nylas-web-elements/nylas-booking-form-config.entry.js +1 -1
  16. package/dist/nylas-web-elements/nylas-booking-form.entry.js +1 -1
  17. package/dist/nylas-web-elements/nylas-buffer-time.entry.js +1 -1
  18. package/dist/nylas-web-elements/nylas-calendar-picker.entry.js +1 -1
  19. package/dist/nylas-web-elements/nylas-cancel-booking-form.entry.js +1 -1
  20. package/dist/nylas-web-elements/nylas-cancellation-policy.entry.js +1 -1
  21. package/dist/nylas-web-elements/nylas-cancelled-event-card.entry.js +1 -1
  22. package/dist/nylas-web-elements/nylas-confirmation-email.entry.js +1 -1
  23. package/dist/nylas-web-elements/nylas-confirmed-event-card.entry.js +1 -1
  24. package/dist/nylas-web-elements/nylas-connected-calendars.entry.js +1 -1
  25. package/dist/nylas-web-elements/nylas-custom-booking-flow.entry.js +1 -1
  26. package/dist/nylas-web-elements/nylas-custom-event-slug.entry.js +1 -1
  27. package/dist/nylas-web-elements/nylas-customize-booking-settings.entry.js +1 -1
  28. package/dist/nylas-web-elements/nylas-date-component.entry.js +1 -1
  29. package/dist/nylas-web-elements/nylas-date-picker.entry.js +1 -1
  30. package/dist/nylas-web-elements/nylas-date-picker.entry.js.map +1 -1
  31. package/dist/nylas-web-elements/nylas-disable-emails.entry.js +1 -1
  32. package/dist/nylas-web-elements/nylas-editor-tabs-group.entry.js +1 -1
  33. package/dist/nylas-web-elements/nylas-editor-tabs.entry.js +1 -1
  34. package/dist/nylas-web-elements/nylas-event-calendar.entry.js +1 -1
  35. package/dist/nylas-web-elements/nylas-event-calendar.entry.js.map +1 -1
  36. package/dist/nylas-web-elements/nylas-event-capacity.entry.js +1 -1
  37. package/dist/nylas-web-elements/nylas-event-capacity.entry.js.map +1 -1
  38. package/dist/nylas-web-elements/nylas-event-description.entry.js +1 -1
  39. package/dist/nylas-web-elements/nylas-event-duration.entry.js +1 -1
  40. package/dist/nylas-web-elements/nylas-event-info.entry.js +1 -1
  41. package/dist/nylas-web-elements/nylas-event-limits.entry.js +1 -1
  42. package/dist/nylas-web-elements/nylas-event-location.entry.js +1 -1
  43. package/dist/nylas-web-elements/nylas-event-timeslot.entry.js +1 -1
  44. package/dist/nylas-web-elements/nylas-event-timeslot.entry.js.map +1 -1
  45. package/dist/nylas-web-elements/nylas-event-title.entry.js +1 -1
  46. package/dist/nylas-web-elements/nylas-event-title.entry.js.map +1 -1
  47. package/dist/nylas-web-elements/nylas-feedback-form.entry.js +1 -1
  48. package/dist/nylas-web-elements/nylas-form-card.entry.js +1 -1
  49. package/dist/nylas-web-elements/nylas-if-state.entry.js +1 -1
  50. package/dist/nylas-web-elements/nylas-limit-future-bookings.entry.js +1 -1
  51. package/dist/nylas-web-elements/nylas-list-configurations.entry.js +1 -1
  52. package/dist/nylas-web-elements/nylas-locale-switch.entry.js +1 -1
  53. package/dist/nylas-web-elements/nylas-login.entry.js +1 -1
  54. package/dist/nylas-web-elements/nylas-min-booking-notice.entry.js +1 -1
  55. package/dist/nylas-web-elements/nylas-min-cancellation-notice.entry.js +1 -1
  56. package/dist/nylas-web-elements/nylas-notification.entry.js +1 -1
  57. package/dist/nylas-web-elements/nylas-organizer-confirmation-card.entry.js +1 -1
  58. package/dist/nylas-web-elements/nylas-page-name.entry.js +1 -1
  59. package/dist/nylas-web-elements/nylas-page-styling.entry.js +1 -1
  60. package/dist/nylas-web-elements/nylas-participant-booking-calendars.entry.js +1 -1
  61. package/dist/nylas-web-elements/nylas-participants-custom-availability.entry.js +1 -1
  62. package/dist/nylas-web-elements/nylas-provider.entry.js +1 -1
  63. package/dist/nylas-web-elements/nylas-reminder-emails.entry.js +1 -1
  64. package/dist/nylas-web-elements/nylas-reminder-time.entry.js +1 -1
  65. package/dist/nylas-web-elements/nylas-scheduler-editor.entry.js +1 -1
  66. package/dist/nylas-web-elements/nylas-scheduling-method.entry.js +1 -1
  67. package/dist/nylas-web-elements/nylas-scheduling.entry.js +1 -1
  68. package/dist/nylas-web-elements/nylas-select-event-type.entry.js +1 -1
  69. package/dist/nylas-web-elements/nylas-selected-event-card.entry.js +1 -1
  70. package/dist/nylas-web-elements/nylas-time-window-picker.entry.js +1 -1
  71. package/dist/nylas-web-elements/nylas-timeslot-interval.entry.js +1 -1
  72. package/dist/nylas-web-elements/nylas-timeslot-picker.entry.js +1 -1
  73. package/dist/nylas-web-elements/nylas-timeslot-picker.entry.js.map +1 -1
  74. package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
  75. package/dist/nylas-web-elements/nylas-web-elements.esm.js.map +1 -1
  76. package/dist/nylas-web-elements/{register-component-3d439a88.js → register-component-8b5587d5.js} +2 -2
  77. package/dist/nylas-web-elements/{scheduler-store-0acc5e0f.js → scheduler-store-36b93b74.js} +2 -2
  78. package/dist/nylas-web-elements/textarea-component.entry.js +1 -1
  79. package/dist/nylas-web-elements/time-period-selector.entry.js +1 -1
  80. package/dist/nylas-web-elements/{utils-3fdf2c83.js → utils-ac8fef1e.js} +2 -2
  81. package/dist/types/components/scheduler/nylas-date-picker/nylas-date-picker.d.ts +4 -0
  82. package/dist/types/components/scheduler-editor/nylas-event-capacity/nylas-event-capacity.d.ts +1 -0
  83. package/package.json +2 -3
  84. package/CHANGELOG.md +0 -872
  85. /package/dist/nylas-web-elements/{index-95193d9b.js.map → index-212258bf.js.map} +0 -0
  86. /package/dist/nylas-web-elements/{index.es-69f2eefb.js.map → index.es-82b6efae.js.map} +0 -0
  87. /package/dist/nylas-web-elements/{nylas-api-request-d8eb4c91.js.map → nylas-api-request-51129e10.js.map} +0 -0
  88. /package/dist/nylas-web-elements/{register-component-3d439a88.js.map → register-component-8b5587d5.js.map} +0 -0
  89. /package/dist/nylas-web-elements/{scheduler-store-0acc5e0f.js.map → scheduler-store-36b93b74.js.map} +0 -0
  90. /package/dist/nylas-web-elements/{utils-3fdf2c83.js.map → utils-ac8fef1e.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{p as t,g as e}from"./utils-3fdf2c83.js";const n=Object.prototype.toString;function r(t){switch(n.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return true;default:return y(t,Error)}}function i(t,e){return n.call(t)===`[object ${e}]`}function s(t){return i(t,"ErrorEvent")}function o(t){return i(t,"DOMError")}function c(t){return i(t,"DOMException")}function a(t){return i(t,"String")}function u(t){return typeof t==="object"&&t!==null&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function f(t){return t===null||u(t)||typeof t!=="object"&&typeof t!=="function"}function l(t){return i(t,"Object")}function d(t){return typeof Event!=="undefined"&&y(t,Event)}function h(t){return typeof Element!=="undefined"&&y(t,Element)}function p(t){return i(t,"RegExp")}function m(t){return Boolean(t&&t.then&&typeof t.then==="function")}function g(t){return l(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function y(t,e){try{return t instanceof e}catch(t){return false}}function b(t){return!!(typeof t==="object"&&t!==null&&(t.__isVue||t._isVue))}function v(t,e=0){if(typeof t!=="string"||e===0){return t}return t.length<=e?t:`${t.slice(0,e)}...`}function w(t,e){let n=t;const r=n.length;if(r<=150){return n}if(e>r){e=r}let i=Math.max(e-60,0);if(i<5){i=0}let s=Math.min(i+140,r);if(s>r-5){s=r}if(s===r){i=Math.max(s-140,0)}n=n.slice(i,s);if(i>0){n=`'{snip} ${n}`}if(s<r){n+=" {snip}"}return n}function _(t,e){if(!Array.isArray(t)){return""}const n=[];for(let e=0;e<t.length;e++){const r=t[e];try{if(b(r)){n.push("[VueViewModel]")}else{n.push(String(r))}}catch(t){n.push("[value cannot be serialized]")}}return n.join(e)}function k(t,e,n=false){if(!a(t)){return false}if(p(e)){return e.test(t)}if(a(e)){return n?t===e:t.includes(e)}return false}function S(t,e=[],n=false){return e.some((e=>k(t,e,n)))}function x(t,e,n=250,r,i,s,o){if(!s.exception||!s.exception.values||!o||!y(o.originalException,Error)){return}const c=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:undefined;if(c){s.exception.values=E(C(t,e,i,o.originalException,r,s.exception.values,c,0),n)}}function C(t,e,n,r,i,s,o,c){if(s.length>=n+1){return s}let a=[...s];if(y(r[i],Error)){T(o,c);const s=t(e,r[i]);const u=a.length;I(s,i,u,c);a=C(t,e,n,r[i],i,[s,...a],s,u)}if(Array.isArray(r.errors)){r.errors.forEach(((r,s)=>{if(y(r,Error)){T(o,c);const u=t(e,r);const f=a.length;I(u,`errors[${s}]`,f,c);a=C(t,e,n,r,i,[u,...a],u,f)}}))}return a}function T(t,e){t.mechanism=t.mechanism||{type:"generic",handled:true};t.mechanism={...t.mechanism,...t.type==="AggregateError"&&{is_exception_group:true},exception_id:e}}function I(t,e,n,r){t.mechanism=t.mechanism||{type:"generic",handled:true};t.mechanism={...t.mechanism,type:"chained",source:e,exception_id:n,parent_id:r}}function E(t,e){return t.map((t=>{if(t.value){t.value=v(t.value,e)}return t}))}function A(t){const e=[];const n=t=>{t.forEach((t=>{if(Array.isArray(t)){n(t)}else{e.push(t)}}))};n(t);return e}const $="8.28.0";const M=globalThis;function R(t,e,n){const r=n||M;const i=r.__SENTRY__=r.__SENTRY__||{};const s=i[$]=i[$]||{};return s[t]||(s[t]=e())}const N=M;const O=80;function D(t,e={}){if(!t){return"<unknown>"}try{let n=t;const r=5;const i=[];let s=0;let o=0;const c=" > ";const a=c.length;let u;const f=Array.isArray(e)?e:e.keyAttrs;const l=!Array.isArray(e)&&e.maxStringLength||O;while(n&&s++<r){u=L(n,f);if(u==="html"||s>1&&o+i.length*a+u.length>=l){break}i.push(u);o+=u.length;n=n.parentNode}return i.reverse().join(c)}catch(t){return"<unknown>"}}function L(t,e){const n=t;const r=[];if(!n||!n.tagName){return""}if(N.HTMLElement){if(n instanceof HTMLElement&&n.dataset){if(n.dataset["sentryComponent"]){return n.dataset["sentryComponent"]}if(n.dataset["sentryElement"]){return n.dataset["sentryElement"]}}}r.push(n.tagName.toLowerCase());const i=e&&e.length?e.filter((t=>n.getAttribute(t))).map((t=>[t,n.getAttribute(t)])):null;if(i&&i.length){i.forEach((t=>{r.push(`[${t[0]}="${t[1]}"]`)}))}else{if(n.id){r.push(`#${n.id}`)}const t=n.className;if(t&&a(t)){const e=t.split(/\s+/);for(const t of e){r.push(`.${t}`)}}}const s=["aria-label","type","name","title","alt"];for(const t of s){const e=n.getAttribute(t);if(e){r.push(`[${t}="${e}"]`)}}return r.join("")}function F(){try{return N.document.location.href}catch(t){return""}}function P(t){if(N.document&&N.document.querySelector){return N.document.querySelector(t)}return null}function j(t){if(!N.HTMLElement){return null}let e=t;const n=5;for(let t=0;t<n;t++){if(!e){return null}if(e instanceof HTMLElement){if(e.dataset["sentryComponent"]){return e.dataset["sentryComponent"]}if(e.dataset["sentryElement"]){return e.dataset["sentryElement"]}}e=e.parentNode}return null}const B=typeof __SENTRY_DEBUG__==="undefined"||__SENTRY_DEBUG__;const z="Sentry Logger ";const U=["debug","info","warn","error","log","assert","trace"];const q={};function H(t){if(!("console"in M)){return t()}const e=M.console;const n={};const r=Object.keys(q);r.forEach((t=>{const r=q[t];n[t]=e[t];e[t]=r}));try{return t()}finally{r.forEach((t=>{e[t]=n[t]}))}}function W(){let t=false;const e={enable:()=>{t=true},disable:()=>{t=false},isEnabled:()=>t};if(B){U.forEach((n=>{e[n]=(...e)=>{if(t){H((()=>{M.console[n](`${z}[${n}]:`,...e)}))}}}))}else{U.forEach((t=>{e[t]=()=>undefined}))}return e}const G=W();const Y=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function X(t){return t==="http"||t==="https"}function J(t,e=false){const{host:n,path:r,pass:i,port:s,projectId:o,protocol:c,publicKey:a}=t;return`${c}://${a}${e&&i?`:${i}`:""}`+`@${n}${s?`:${s}`:""}/${r?`${r}/`:r}${o}`}function K(t){const e=Y.exec(t);if(!e){H((()=>{console.error(`Invalid Sentry Dsn: ${t}`)}));return undefined}const[n,r,i="",s="",o="",c=""]=e.slice(1);let a="";let u=c;const f=u.split("/");if(f.length>1){a=f.slice(0,-1).join("/");u=f.pop()}if(u){const t=u.match(/^\d+/);if(t){u=t[0]}}return V({host:s,pass:i,path:a,projectId:u,port:o,protocol:n,publicKey:r})}function V(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function Z(t){if(!B){return true}const{port:e,projectId:n,protocol:r}=t;const i=["protocol","publicKey","host","projectId"];const s=i.find((e=>{if(!t[e]){G.error(`Invalid Sentry Dsn: ${e} missing`);return true}return false}));if(s){return false}if(!n.match(/^\d+$/)){G.error(`Invalid Sentry Dsn: Invalid projectId ${n}`);return false}if(!X(r)){G.error(`Invalid Sentry Dsn: Invalid protocol ${r}`);return false}if(e&&isNaN(parseInt(e,10))){G.error(`Invalid Sentry Dsn: Invalid port ${e}`);return false}return true}function Q(t){const e=typeof t==="string"?K(t):V(t);if(!e||!Z(e)){return undefined}return e}class tt extends Error{constructor(t,e="warn"){super(t);this.message=t;this.name=new.target.prototype.constructor.name;Object.setPrototypeOf(this,new.target.prototype);this.logLevel=e}}function et(t,e,n){if(!(e in t)){return}const r=t[e];const i=n(r);if(typeof i==="function"){rt(i,r)}t[e]=i}function nt(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:true,configurable:true})}catch(n){B&&G.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function rt(t,e){try{const n=e.prototype||{};t.prototype=e.prototype=n;nt(t,"__sentry_original__",e)}catch(t){}}function it(t){return t.__sentry_original__}function st(t){return Object.keys(t).map((e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`)).join("&")}function ot(t){if(r(t)){return{message:t.message,name:t.name,stack:t.stack,...at(t)}}else if(d(t)){const e={type:t.type,target:ct(t.target),currentTarget:ct(t.currentTarget),...at(t)};if(typeof CustomEvent!=="undefined"&&y(t,CustomEvent)){e.detail=t.detail}return e}else{return t}}function ct(t){try{return h(t)?D(t):Object.prototype.toString.call(t)}catch(t){return"<unknown>"}}function at(t){if(typeof t==="object"&&t!==null){const e={};for(const n in t){if(Object.prototype.hasOwnProperty.call(t,n)){e[n]=t[n]}}return e}else{return{}}}function ut(t,e=40){const n=Object.keys(ot(t));n.sort();const r=n[0];if(!r){return"[object has no keys]"}if(r.length>=e){return v(r,e)}for(let t=n.length;t>0;t--){const r=n.slice(0,t).join(", ");if(r.length>e){continue}if(t===n.length){return r}return v(r,e)}return""}function ft(t){const e=new Map;return lt(t,e)}function lt(t,e){if(dt(t)){const n=e.get(t);if(n!==undefined){return n}const r={};e.set(t,r);for(const n of Object.keys(t)){if(typeof t[n]!=="undefined"){r[n]=lt(t[n],e)}}return r}if(Array.isArray(t)){const n=e.get(t);if(n!==undefined){return n}const r=[];e.set(t,r);t.forEach((t=>{r.push(lt(t,e))}));return r}return t}function dt(t){if(!l(t)){return false}try{const e=Object.getPrototypeOf(t).constructor.name;return!e||e==="Object"}catch(t){return true}}function ht(t){let e;switch(true){case t===undefined||t===null:e=new String(t);break;case typeof t==="symbol"||typeof t==="bigint":e=Object(t);break;case f(t):e=new t.constructor(t);break;default:e=t;break}return e}const pt=50;const mt="?";const gt=/\(error: (.*)\)/;const yt=/captureMessage|captureException/;function bt(...t){const e=t.sort(((t,e)=>t[0]-e[0])).map((t=>t[1]));return(t,n=0,r=0)=>{const i=[];const s=t.split("\n");for(let t=n;t<s.length;t++){const n=s[t];if(n.length>1024){continue}const o=gt.test(n)?n.replace(gt,"$1"):n;if(o.match(/\S*Error: /)){continue}for(const t of e){const e=t(o);if(e){i.push(e);break}}if(i.length>=pt+r){break}}return wt(i.slice(r))}}function vt(t){if(Array.isArray(t)){return bt(...t)}return t}function wt(t){if(!t.length){return[]}const e=Array.from(t);if(/sentryWrapped/.test(_t(e).function||"")){e.pop()}e.reverse();if(yt.test(_t(e).function||"")){e.pop();if(yt.test(_t(e).function||"")){e.pop()}}return e.slice(0,pt).map((t=>({...t,filename:t.filename||_t(e).filename,function:t.function||mt})))}function _t(t){return t[t.length-1]||{}}const kt="<anonymous>";function St(t){try{if(!t||typeof t!=="function"){return kt}return t.name||kt}catch(t){return kt}}function xt(t){const e=t.exception;if(e){const t=[];try{e.values.forEach((e=>{if(e.stacktrace.frames){t.push(...e.stacktrace.frames)}}));return t}catch(t){return undefined}}return undefined}const Ct={};const Tt={};function It(t,e){Ct[t]=Ct[t]||[];Ct[t].push(e)}function Et(){Object.keys(Ct).forEach((t=>{Ct[t]=undefined}))}function At(t,e){if(!Tt[t]){e();Tt[t]=true}}function $t(t,e){const n=t&&Ct[t];if(!n){return}for(const r of n){try{r(e)}catch(e){B&&G.error(`Error while triggering instrumentation handler.\nType: ${t}\nName: ${St(r)}\nError:`,e)}}}function Mt(t){const e="console";It(e,t);At(e,Rt)}function Rt(){if(!("console"in M)){return}U.forEach((function(t){if(!(t in M.console)){return}et(M.console,t,(function(e){q[t]=e;return function(...e){const n={args:e,level:t};$t("console",n);const r=q[t];r&&r.apply(M.console,e)}}))}))}const Nt=M;function Ot(){try{new ErrorEvent("");return true}catch(t){return false}}function Dt(){try{new DOMError("");return true}catch(t){return false}}function Lt(){try{new DOMException("");return true}catch(t){return false}}function Ft(){if(!("fetch"in Nt)){return false}try{new Headers;new Request("http://www.example.com");new Response;return true}catch(t){return false}}function Pt(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function jt(){if(typeof EdgeRuntime==="string"){return true}if(!Ft()){return false}if(Pt(Nt.fetch)){return true}let t=false;const e=Nt.document;if(e&&typeof e.createElement==="function"){try{const n=e.createElement("iframe");n.hidden=true;e.head.appendChild(n);if(n.contentWindow&&n.contentWindow.fetch){t=Pt(n.contentWindow.fetch)}e.head.removeChild(n)}catch(t){B&&G.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}}return t}function Bt(){return"ReportingObserver"in Nt}function zt(){if(!Ft()){return false}try{new Request("_",{referrerPolicy:"origin"});return true}catch(t){return false}}const Ut=1e3;function qt(){return Date.now()/Ut}function Ht(){const{performance:t}=M;if(!t||!t.now){return qt}const e=Date.now()-t.now();const n=t.timeOrigin==undefined?e:t.timeOrigin;return()=>(n+t.now())/Ut}const Wt=Ht();let Gt;const Yt=(()=>{const{performance:t}=M;if(!t||!t.now){Gt="none";return undefined}const e=3600*1e3;const n=t.now();const r=Date.now();const i=t.timeOrigin?Math.abs(t.timeOrigin+n-r):e;const s=i<e;const o=t.timing&&t.timing.navigationStart;const c=typeof o==="number";const a=c?Math.abs(o+n-r):e;const u=a<e;if(s||u){if(i<=a){Gt="timeOrigin";return t.timeOrigin}else{Gt="navigationStart";return o}}Gt="dateNow";return r})();function Xt(t,e){const n="fetch";It(n,t);At(n,(()=>Kt(undefined,e)))}function Jt(t){const e="fetch-body-resolved";It(e,t);At(e,(()=>Kt(Zt)))}function Kt(t,e=false){if(e&&!jt()){return}et(M,"fetch",(function(e){return function(...n){const{method:i,url:s}=ee(n);const o={args:n,fetchData:{method:i,url:s},startTimestamp:Wt()*1e3};if(!t){$t("fetch",{...o})}const c=(new Error).stack;return e.apply(M,n).then((async e=>{if(t){t(e)}else{$t("fetch",{...o,endTimestamp:Wt()*1e3,response:e})}return e}),(t=>{$t("fetch",{...o,endTimestamp:Wt()*1e3,error:t});if(r(t)&&t.stack===undefined){t.stack=c;nt(t,"framesToPop",1)}throw t}))}}))}async function Vt(t,e){if(t&&t.body&&t.body.getReader){const n=t.body.getReader();async function r({done:t}){if(!t){try{const t=await Promise.race([n.read(),new Promise((t=>{setTimeout((()=>{t({done:true})}),5e3)}))]);await r(t)}catch(t){}}else{return Promise.resolve()}}return n.read().then(r).then(e).catch((()=>undefined))}}async function Zt(t){let e;try{e=t.clone()}catch(t){return}await Vt(e,(()=>{$t("fetch-body-resolved",{endTimestamp:Wt()*1e3,response:t})}))}function Qt(t,e){return!!t&&typeof t==="object"&&!!t[e]}function te(t){if(typeof t==="string"){return t}if(!t){return""}if(Qt(t,"url")){return t.url}if(t.toString){return t.toString()}return""}function ee(t){if(t.length===0){return{method:"GET",url:""}}if(t.length===2){const[e,n]=t;return{url:te(e),method:Qt(n,"method")?String(n.method).toUpperCase():"GET"}}const e=t[0];return{url:te(e),method:Qt(e,"method")?String(e.method).toUpperCase():"GET"}}let ne=null;function re(t){const e="error";It(e,t);At(e,ie)}function ie(){ne=M.onerror;M.onerror=function(t,e,n,r,i){const s={column:r,error:i,line:n,msg:t,url:e};$t("error",s);if(ne&&!ne.__SENTRY_LOADER__){return ne.apply(this,arguments)}return false};M.onerror.__SENTRY_INSTRUMENTED__=true}let se=null;function oe(t){const e="unhandledrejection";It(e,t);At(e,ce)}function ce(){se=M.onunhandledrejection;M.onunhandledrejection=function(t){const e=t;$t("unhandledrejection",e);if(se&&!se.__SENTRY_LOADER__){return se.apply(this,arguments)}return true};M.onunhandledrejection.__SENTRY_INSTRUMENTED__=true}function ae(){return typeof __SENTRY_BROWSER_BUNDLE__!=="undefined"&&!!__SENTRY_BROWSER_BUNDLE__}function ue(){return"npm"}function fe(){return!ae()&&Object.prototype.toString.call(typeof t!=="undefined"?t:0)==="[object process]"}function le(t,e){return t.require(e)}function de(t){let e;try{e=le(module,t)}catch(t){}try{const{cwd:n}=le(module,"process");e=le(module,`${n()}/node_modules/${t}`)}catch(t){}return e}function he(){return typeof window!=="undefined"&&(!fe()||pe())}function pe(){return M.process!==undefined&&M.process.type==="renderer"}function me(){const t=typeof WeakSet==="function";const e=t?new WeakSet:[];function n(n){if(t){if(e.has(n)){return true}e.add(n);return false}for(let t=0;t<e.length;t++){const r=e[t];if(r===n){return true}}e.push(n);return false}function r(n){if(t){e.delete(n)}else{for(let t=0;t<e.length;t++){if(e[t]===n){e.splice(t,1);break}}}}return[n,r]}function ge(){const t=M;const e=t.crypto||t.msCrypto;let n=()=>Math.random()*16;try{if(e&&e.randomUUID){return e.randomUUID().replace(/-/g,"")}if(e&&e.getRandomValues){n=()=>{const t=new Uint8Array(1);e.getRandomValues(t);return t[0]}}}catch(t){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(t=>(t^(n()&15)>>t/4).toString(16)))}function ye(t){return t.exception&&t.exception.values?t.exception.values[0]:undefined}function be(t){const{message:e,event_id:n}=t;if(e){return e}const r=ye(t);if(r){if(r.type&&r.value){return`${r.type}: ${r.value}`}return r.type||r.value||n||"<unknown>"}return n||"<unknown>"}function ve(t,e,n){const r=t.exception=t.exception||{};const i=r.values=r.values||[];const s=i[0]=i[0]||{};if(!s.value){s.value=e||""}if(!s.type){s.type=n||"Error"}}function we(t,e){const n=ye(t);if(!n){return}const r={type:"generic",handled:true};const i=n.mechanism;n.mechanism={...r,...i,...e};if(e&&"data"in e){const t={...i&&i.data,...e.data};n.mechanism.data=t}}const _e=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;function ke(t){return parseInt(t||"",10)}function Se(t){const e=t.match(_e)||[];const n=ke(e[1]);const r=ke(e[2]);const i=ke(e[3]);return{buildmetadata:e[5],major:isNaN(n)?undefined:n,minor:isNaN(r)?undefined:r,patch:isNaN(i)?undefined:i,prerelease:e[4]}}function xe(t,e,n=5){if(e.lineno===undefined){return}const r=t.length;const i=Math.max(Math.min(r-1,e.lineno-1),0);e.pre_context=t.slice(Math.max(0,i-n),i).map((t=>w(t,0)));const s=Math.min(r-1,i);e.context_line=w(t[s],e.colno||0);e.post_context=t.slice(Math.min(i+1,r),i+1+n).map((t=>w(t,0)))}function Ce(t){if(t&&t.__sentry_captured__){return true}try{nt(t,"__sentry_captured__",true)}catch(t){}return false}function Te(t){return Array.isArray(t)?t:[t]}function Ie(t,e=100,n=+Infinity){try{return Ae("",t,e,n)}catch(t){return{ERROR:`**non-serializable** (${t})`}}}function Ee(t,e=3,n=100*1024){const r=Ie(t,e);if(Ne(r)>n){return Ee(t,e-1,n)}return r}function Ae(t,e,n=+Infinity,r=+Infinity,i=me()){const[s,o]=i;if(e==null||["number","boolean","string"].includes(typeof e)&&!Number.isNaN(e)){return e}const c=$e(t,e);if(!c.startsWith("[object ")){return c}if(e["__sentry_skip_normalization__"]){return e}const a=typeof e["__sentry_override_normalization_depth__"]==="number"?e["__sentry_override_normalization_depth__"]:n;if(a===0){return c.replace("object ","")}if(s(e)){return"[Circular ~]"}const u=e;if(u&&typeof u.toJSON==="function"){try{const t=u.toJSON();return Ae("",t,a-1,r,i)}catch(t){}}const f=Array.isArray(e)?[]:{};let l=0;const d=ot(e);for(const t in d){if(!Object.prototype.hasOwnProperty.call(d,t)){continue}if(l>=r){f[t]="[MaxProperties ~]";break}const e=d[t];f[t]=Ae(t,e,a-1,r,i);l++}o(e);return f}function $e(t,n){try{if(t==="domain"&&n&&typeof n==="object"&&n._events){return"[Domain]"}if(t==="domainEmitter"){return"[DomainEmitter]"}if(typeof e!=="undefined"&&n===e){return"[Global]"}if(typeof window!=="undefined"&&n===window){return"[Window]"}if(typeof document!=="undefined"&&n===document){return"[Document]"}if(b(n)){return"[VueViewModel]"}if(g(n)){return"[SyntheticEvent]"}if(typeof n==="number"&&n!==n){return"[NaN]"}if(typeof n==="function"){return`[Function: ${St(n)}]`}if(typeof n==="symbol"){return`[${String(n)}]`}if(typeof n==="bigint"){return`[BigInt: ${String(n)}]`}const r=Me(n);if(/^HTML(\w*)Element$/.test(r)){return`[HTMLElement: ${r}]`}return`[object ${r}]`}catch(t){return`**non-serializable** (${t})`}}function Me(t){const e=Object.getPrototypeOf(t);return e?e.constructor.name:"null prototype"}function Re(t){return~-encodeURI(t).split(/%..|./).length}function Ne(t){return Re(JSON.stringify(t))}function Oe(t,e){const n=e.replace(/\\/g,"/").replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");let r=t;try{r=decodeURI(t)}catch(t){}return r.replace(/\\/g,"/").replace(/webpack:\/?/g,"").replace(new RegExp(`(file://)?/*${n}/*`,"ig"),"app:///")}function De(t,e){let n=0;for(let e=t.length-1;e>=0;e--){const r=t[e];if(r==="."){t.splice(e,1)}else if(r===".."){t.splice(e,1);n++}else if(n){t.splice(e,1);n--}}if(e){for(;n--;n){t.unshift("..")}}return t}const Le=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function Fe(t){const e=t.length>1024?`<truncated>${t.slice(-1024)}`:t;const n=Le.exec(e);return n?n.slice(1):[]}function Pe(...t){let e="";let n=false;for(let r=t.length-1;r>=-1&&!n;r--){const i=r>=0?t[r]:"/";if(!i){continue}e=`${i}/${e}`;n=i.charAt(0)==="/"}e=De(e.split("/").filter((t=>!!t)),!n).join("/");return(n?"/":"")+e||"."}function je(t){let e=0;for(;e<t.length;e++){if(t[e]!==""){break}}let n=t.length-1;for(;n>=0;n--){if(t[n]!==""){break}}if(e>n){return[]}return t.slice(e,n-e+1)}function Be(t,e){t=Pe(t).slice(1);e=Pe(e).slice(1);const n=je(t.split("/"));const r=je(e.split("/"));const i=Math.min(n.length,r.length);let s=i;for(let t=0;t<i;t++){if(n[t]!==r[t]){s=t;break}}let o=[];for(let t=s;t<n.length;t++){o.push("..")}o=o.concat(r.slice(s));return o.join("/")}function ze(t){const e=Ue(t);const n=t.slice(-1)==="/";let r=De(t.split("/").filter((t=>!!t)),!e).join("/");if(!r&&!e){r="."}if(r&&n){r+="/"}return(e?"/":"")+r}function Ue(t){return t.charAt(0)==="/"}function qe(...t){return ze(t.join("/"))}function He(t){const e=Fe(t);const n=e[0]||"";let r=e[1];if(!n&&!r){return"."}if(r){r=r.slice(0,r.length-1)}return n+r}function We(t,e){let n=Fe(t)[2]||"";if(e&&n.slice(e.length*-1)===e){n=n.slice(0,n.length-e.length)}return n}var Ge;(function(t){const e=0;t[t["PENDING"]=e]="PENDING";const n=1;t[t["RESOLVED"]=n]="RESOLVED";const r=2;t[t["REJECTED"]=r]="REJECTED"})(Ge||(Ge={}));function Ye(t){return new Je((e=>{e(t)}))}function Xe(t){return new Je(((e,n)=>{n(t)}))}class Je{constructor(t){Je.prototype.__init.call(this);Je.prototype.__init2.call(this);Je.prototype.__init3.call(this);Je.prototype.__init4.call(this);this._state=Ge.PENDING;this._handlers=[];try{t(this._resolve,this._reject)}catch(t){this._reject(t)}}then(t,e){return new Je(((n,r)=>{this._handlers.push([false,e=>{if(!t){n(e)}else{try{n(t(e))}catch(t){r(t)}}},t=>{if(!e){r(t)}else{try{n(e(t))}catch(t){r(t)}}}]);this._executeHandlers()}))}catch(t){return this.then((t=>t),t)}finally(t){return new Je(((e,n)=>{let r;let i;return this.then((e=>{i=false;r=e;if(t){t()}}),(e=>{i=true;r=e;if(t){t()}})).then((()=>{if(i){n(r);return}e(r)}))}))}__init(){this._resolve=t=>{this._setResult(Ge.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(Ge.REJECTED,t)}}__init3(){this._setResult=(t,e)=>{if(this._state!==Ge.PENDING){return}if(m(e)){void e.then(this._resolve,this._reject);return}this._state=t;this._value=e;this._executeHandlers()}}__init4(){this._executeHandlers=()=>{if(this._state===Ge.PENDING){return}const t=this._handlers.slice();this._handlers=[];t.forEach((t=>{if(t[0]){return}if(this._state===Ge.RESOLVED){t[1](this._value)}if(this._state===Ge.REJECTED){t[2](this._value)}t[0]=true}))}}}function Ke(t){const e=[];function n(){return t===undefined||e.length<t}function r(t){return e.splice(e.indexOf(t),1)[0]||Promise.resolve(undefined)}function i(t){if(!n()){return Xe(new tt("Not adding Promise because buffer limit was reached."))}const i=t();if(e.indexOf(i)===-1){e.push(i)}void i.then((()=>r(i))).then(null,(()=>r(i).then(null,(()=>{}))));return i}function s(t){return new Je(((n,r)=>{let i=e.length;if(!i){return n(true)}const s=setTimeout((()=>{if(t&&t>0){n(false)}}),t);e.forEach((t=>{void Ye(t).then((()=>{if(! --i){clearTimeout(s);n(true)}}),r)}))}))}return{$:e,add:i,drain:s}}function Ve(t){const e={};let n=0;while(n<t.length){const r=t.indexOf("=",n);if(r===-1){break}let i=t.indexOf(";",n);if(i===-1){i=t.length}else if(i<r){n=t.lastIndexOf(";",r-1)+1;continue}const s=t.slice(n,r).trim();if(undefined===e[s]){let n=t.slice(r+1,i).trim();if(n.charCodeAt(0)===34){n=n.slice(1,-1)}try{e[s]=n.indexOf("%")!==-1?decodeURIComponent(n):n}catch(t){e[s]=n}}n=i+1}return e}function Ze(t){if(!t){return{}}const e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e){return{}}const n=e[6]||"";const r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:r,relative:e[5]+n+r}}function Qe(t){return t.split(/[?#]/,1)[0]}function tn(t){return t.split(/\\?\//).filter((t=>t.length>0&&t!==",")).length}function en(t){const{protocol:e,host:n,path:r}=t;const i=n&&n.replace(/^.*@/,"[filtered]:[filtered]@").replace(/(:80)$/,"").replace(/(:443)$/,"")||"";return`${e?`${e}://`:""}${i}${r}`}const nn=["X-Client-IP","X-Forwarded-For","Fly-Client-IP","CF-Connecting-IP","Fastly-Client-Ip","True-Client-Ip","X-Real-IP","X-Cluster-Client-IP","X-Forwarded","Forwarded-For","Forwarded","X-Vercel-Forwarded-For"];function rn(t){const e=nn.map((e=>{const n=t[e];const r=Array.isArray(n)?n.join(";"):n;if(e==="Forwarded"){return sn(r)}return r&&r.split(",").map((t=>t.trim()))}));const n=e.reduce(((t,e)=>{if(!e){return t}return t.concat(e)}),[]);const r=n.find((t=>t!==null&&on(t)));return r||null}function sn(t){if(!t){return null}for(const e of t.split(";")){if(e.startsWith("for=")){return e.slice(4)}}return null}function on(t){const e=/(?:^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}$)|(?:^(?:(?:[a-fA-F\d]{1,4}:){7}(?:[a-fA-F\d]{1,4}|:)|(?:[a-fA-F\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|:[a-fA-F\d]{1,4}|:)|(?:[a-fA-F\d]{1,4}:){5}(?::(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,2}|:)|(?:[a-fA-F\d]{1,4}:){4}(?:(?::[a-fA-F\d]{1,4}){0,1}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,3}|:)|(?:[a-fA-F\d]{1,4}:){3}(?:(?::[a-fA-F\d]{1,4}){0,2}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,4}|:)|(?:[a-fA-F\d]{1,4}:){2}(?:(?::[a-fA-F\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,5}|:)|(?:[a-fA-F\d]{1,4}:){1}(?:(?::[a-fA-F\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,6}|:)|(?::(?:(?::[a-fA-F\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,7}|:)))(?:%[0-9a-zA-Z]{1,})?$)/;return e.test(t)}const cn={ip:false,request:true,transaction:true,user:true};const an=["cookies","data","headers","method","query_string","url"];const un=["id","username","email"];function fn(t,e={}){const n=t.method&&t.method.toUpperCase();let r="";let i="url";if(e.customRoute||t.route){r=e.customRoute||`${t.baseUrl||""}${t.route&&t.route.path}`;i="route"}else if(t.originalUrl||t.url){r=Qe(t.originalUrl||t.url||"")}let s="";if(e.method&&n){s+=n}if(e.method&&e.path){s+=" "}if(e.path&&r){s+=r}return[s,i]}function ln(t,e){switch(e){case"path":{return fn(t,{path:true})[0]}case"handler":{return t.route&&t.route.stack&&t.route.stack[0]&&t.route.stack[0].name||"<anonymous>"}case"methodPath":default:{const e=t._reconstructedRoute?t._reconstructedRoute:undefined;return fn(t,{path:true,method:true,customRoute:e})[0]}}}function dn(t,e){const n={};const r=Array.isArray(e)?e:un;r.forEach((e=>{if(t&&e in t){n[e]=t[e]}}));return n}function hn(t,e={}){const{include:n=an}=e;const r={};const i=t.headers||{};const s=t.method;const o=i.host||t.hostname||t.host||"<no host>";const c=t.protocol==="https"||t.socket&&t.socket.encrypted?"https":"http";const u=t.originalUrl||t.url||"";const f=u.startsWith(c)?u:`${c}://${o}${u}`;n.forEach((e=>{switch(e){case"headers":{r.headers=i;if(!n.includes("cookies")){delete r.headers.cookie}if(!n.includes("ip")){nn.forEach((t=>{delete r.headers[t]}))}break}case"method":{r.method=s;break}case"url":{r.url=f;break}case"cookies":{r.cookies=t.cookies||i.cookie&&Ve(i.cookie)||{};break}case"query_string":{r.query_string=mn(t);break}case"data":{if(s==="GET"||s==="HEAD"){break}if(t.body!==undefined){r.data=a(t.body)?t.body:JSON.stringify(Ie(t.body))}break}default:{if({}.hasOwnProperty.call(t,e)){r[e]=t[e]}}}}));return r}function pn(t,e,n){const r={...cn,...n&&n.include};if(r.request){const n=Array.isArray(r.request)?[...r.request]:[...an];if(r.ip){n.push("ip")}const i=hn(e,{include:n});t.request={...t.request,...i}}if(r.user){const n=e.user&&l(e.user)?dn(e.user,r.user):{};if(Object.keys(n).length){t.user={...t.user,...n}}}if(r.ip){const n=e.headers&&rn(e.headers)||e.ip||e.socket&&e.socket.remoteAddress;if(n){t.user={...t.user,ip_address:n}}}if(r.transaction&&!t.transaction&&t.type==="transaction"){t.transaction=ln(e,r.transaction)}return t}function mn(t){let e=t.originalUrl||t.url||"";if(!e){return}if(e.startsWith("/")){e=`http://dogs.are.great${e}`}try{const n=t.query||new URL(e).search.slice(1);return n.length?n:undefined}catch(t){return undefined}}function gn(t){const e={};try{t.forEach(((t,n)=>{if(typeof t==="string"){e[n]=t}}))}catch(t){B&&G.warn("Sentry failed extracting headers from a request object. If you see this, please file an issue.")}return e}function yn(t){const e=gn(t.headers);return{method:t.method,url:t.url,headers:e}}const bn=["fatal","error","warning","log","info","debug"];function vn(t){return t==="warn"?"warning":bn.includes(t)?t:"log"}function wn(t,e=false){const n=e||t&&!t.startsWith("/")&&!t.match(/^[A-Z]:/)&&!t.startsWith(".")&&!t.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//);return!n&&t!==undefined&&!t.includes("node_modules/")}function _n(t){const e=/^\s*[-]{4,}$/;const n=/at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/;return r=>{const i=r.match(n);if(i){let e;let n;let r;let s;let o;if(i[1]){r=i[1];let t=r.lastIndexOf(".");if(r[t-1]==="."){t--}if(t>0){e=r.slice(0,t);n=r.slice(t+1);const i=e.indexOf(".Module");if(i>0){r=r.slice(i+1);e=e.slice(0,i)}}s=undefined}if(n){s=e;o=n}if(n==="<anonymous>"){o=undefined;r=undefined}if(r===undefined){o=o||mt;r=s?`${s}.${o}`:o}let c=i[2]&&i[2].startsWith("file://")?i[2].slice(7):i[2];const a=i[5]==="native";if(c&&c.match(/\/[A-Z]:/)){c=c.slice(1)}if(!c&&i[5]&&!a){c=i[5]}return{filename:c,module:t?t(c):undefined,function:r,lineno:Sn(i[3]),colno:Sn(i[4]),in_app:wn(c||"",a)}}if(r.match(e)){return{filename:r}}return undefined}}function kn(t){return[90,_n(t)]}function Sn(t){return parseInt(t||"",10)||undefined}const xn="baggage";const Cn="sentry-";const Tn=/^sentry-/;const In=8192;function En(t){const e=$n(t);if(!e){return undefined}const n=Object.entries(e).reduce(((t,[e,n])=>{if(e.match(Tn)){const r=e.slice(Cn.length);t[r]=n}return t}),{});if(Object.keys(n).length>0){return n}else{return undefined}}function An(t){if(!t){return undefined}const e=Object.entries(t).reduce(((t,[e,n])=>{if(n){t[`${Cn}${e}`]=n}return t}),{});return Rn(e)}function $n(t){if(!t||!a(t)&&!Array.isArray(t)){return undefined}if(Array.isArray(t)){return t.reduce(((t,e)=>{const n=Mn(e);Object.entries(n).forEach((([e,n])=>{t[e]=n}));return t}),{})}return Mn(t)}function Mn(t){return t.split(",").map((t=>t.split("=").map((t=>decodeURIComponent(t.trim()))))).reduce(((t,[e,n])=>{if(e&&n){t[e]=n}return t}),{})}function Rn(t){if(Object.keys(t).length===0){return undefined}return Object.entries(t).reduce(((t,[e,n],r)=>{const i=`${encodeURIComponent(e)}=${encodeURIComponent(n)}`;const s=r===0?i:`${t},${i}`;if(s.length>In){B&&G.warn(`Not adding key: ${e} with val: ${n} to baggage header due to exceeding baggage size limits.`);return t}else{return s}}),"")}const Nn=new RegExp("^[ \\t]*"+"([0-9a-f]{32})?"+"-?([0-9a-f]{16})?"+"-?([01])?"+"[ \\t]*$");function On(t){if(!t){return undefined}const e=t.match(Nn);if(!e){return undefined}let n;if(e[3]==="1"){n=true}else if(e[3]==="0"){n=false}return{traceId:e[1],parentSampled:n,parentSpanId:e[2]}}function Dn(t,e){const n=On(t);const r=En(e);const{traceId:i,parentSpanId:s,parentSampled:o}=n||{};if(!n){return{traceId:i||ge(),spanId:ge().substring(16)}}else{return{traceId:i||ge(),parentSpanId:s||ge().substring(16),spanId:ge().substring(16),sampled:o,dsc:r||{}}}}function Ln(t=ge(),e=ge().substring(16),n){let r="";if(n!==undefined){r=n?"-1":"-0"}return`${t}-${e}${r}`}function Fn(t,e=[]){return[t,e]}function Pn(t,e){const[n,r]=t;return[n,[...r,e]]}function jn(t,e){const n=t[1];for(const t of n){const n=t[0].type;const r=e(t,n);if(r){return true}}return false}function Bn(t,e){return jn(t,((t,n)=>e.includes(n)))}function zn(t){return M.__SENTRY__&&M.__SENTRY__.encodePolyfill?M.__SENTRY__.encodePolyfill(t):(new TextEncoder).encode(t)}function Un(t){return M.__SENTRY__&&M.__SENTRY__.decodePolyfill?M.__SENTRY__.decodePolyfill(t):(new TextDecoder).decode(t)}function qn(t){const[e,n]=t;let r=JSON.stringify(e);function i(t){if(typeof r==="string"){r=typeof t==="string"?r+t:[zn(r),t]}else{r.push(typeof t==="string"?zn(t):t)}}for(const t of n){const[e,n]=t;i(`\n${JSON.stringify(e)}\n`);if(typeof n==="string"||n instanceof Uint8Array){i(n)}else{let t;try{t=JSON.stringify(n)}catch(e){t=JSON.stringify(Ie(n))}i(t)}}return typeof r==="string"?r:Hn(r)}function Hn(t){const e=t.reduce(((t,e)=>t+e.length),0);const n=new Uint8Array(e);let r=0;for(const e of t){n.set(e,r);r+=e.length}return n}function Wn(t){let e=typeof t==="string"?zn(t):t;function n(t){const n=e.subarray(0,t);e=e.subarray(t+1);return n}function r(){let t=e.indexOf(10);if(t<0){t=e.length}return JSON.parse(Un(n(t)))}const i=r();const s=[];while(e.length){const t=r();const e=typeof t.length==="number"?t.length:undefined;s.push([t,e?n(e):r()])}return[i,s]}function Gn(t){const e={type:"span"};return[e,t]}function Yn(t){const e=typeof t.data==="string"?zn(t.data):t.data;return[ft({type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),e]}const Xn={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function Jn(t){return Xn[t]}function Kn(t){if(!t||!t.sdk){return}const{name:e,version:n}=t.sdk;return{name:e,version:n}}function Vn(t,e,n,r){const i=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:(new Date).toISOString(),...e&&{sdk:e},...!!n&&r&&{dsn:J(r)},...i&&{trace:ft({...i})}}}function Zn(t,e,n){const r=[{type:"client_report"},{timestamp:n||qt(),discarded_events:t}];return Fn(e?{dsn:e}:{},[r])}const Qn=60*1e3;function tr(t,e=Date.now()){const n=parseInt(`${t}`,10);if(!isNaN(n)){return n*1e3}const r=Date.parse(`${t}`);if(!isNaN(r)){return r-e}return Qn}function er(t,e){return t[e]||t.all||0}function nr(t,e,n=Date.now()){return er(t,e)>n}function rr(t,{statusCode:e,headers:n},r=Date.now()){const i={...t};const s=n&&n["x-sentry-rate-limits"];const o=n&&n["retry-after"];if(s){for(const t of s.trim().split(",")){const[e,n,,,s]=t.split(":",5);const o=parseInt(e,10);const c=(!isNaN(o)?o:60)*1e3;if(!n){i.all=r+c}else{for(const t of n.split(";")){if(t==="metric_bucket"){if(!s||s.split(";").includes("custom")){i[t]=r+c}}else{i[t]=r+c}}}}}else if(o){i.all=r+tr(o,r)}else if(e===429){i.all=r+60*1e3}return i}function ir(t){let e=[];let n={};return{add(r,i){while(e.length>=t){const t=e.shift();if(t!==undefined){delete n[t]}}if(n[r]){this.delete(r)}e.push(r);n[r]=i},clear(){n={};e=[]},get(t){return n[t]},size(){return e.length},delete(t){if(!n[t]){return false}delete n[t];for(let n=0;n<e.length;n++){if(e[n]===t){e.splice(n,1);break}}return true}}}function sr(t,e){return t(e.stack||"",1)}function or(t,e){const n={type:e.name||e.constructor.name,value:e.message};const r=sr(t,e);if(r.length){n.stacktrace={frames:r}}return n}function cr(t){for(const e in t){if(Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];if(n instanceof Error){return n}}}return undefined}function ar(t){if("name"in t&&typeof t.name==="string"){let e=`'${t.name}' captured as exception`;if("message"in t&&typeof t.message==="string"){e+=` with message '${t.message}'`}return e}else if("message"in t&&typeof t.message==="string"){return t.message}const e=ut(t);if(s(t)){return`Event \`ErrorEvent\` captured as exception with message \`${t.message}\``}const n=ur(t);return`${n&&n!=="Object"?`'${n}'`:"Object"} captured as exception with keys: ${e}`}function ur(t){try{const e=Object.getPrototypeOf(t);return e?e.constructor.name:undefined}catch(t){}}function fr(t,e,n,i){if(r(n)){return[n,undefined]}e.synthetic=true;if(l(n)){const e=t&&t.getOptions().normalizeDepth;const r={["__serialized__"]:Ee(n,e)};const s=cr(n);if(s){return[s,r]}const o=ar(n);const c=i&&i.syntheticException||new Error(o);c.message=o;return[c,r]}const s=i&&i.syntheticException||new Error(n);s.message=`${n}`;return[s,undefined]}function lr(t,e,n,r){const i=r&&r.data&&r.data.mechanism;const s=i||{handled:true,type:"generic"};const[o,c]=fr(t,s,n,r);const a={exception:{values:[or(e,o)]}};if(c){a.extra=c}ve(a,undefined,undefined);we(a,s);return{...a,event_id:r&&r.event_id}}function dr(t,e,n="info",r,i){const s={event_id:r&&r.event_id,level:n};if(i&&r&&r.syntheticException){const n=sr(t,r.syntheticException);if(n.length){s.exception={values:[{value:e,stacktrace:{frames:n}}]}}}if(u(e)){const{__sentry_template_string__:t,__sentry_template_values__:n}=e;s.logentry={message:t,params:n};return s}s.message=e;return s}function hr(t,e,n,r){const i=t();let s=false;let o=true;setInterval((()=>{const t=i.getTimeMs();if(s===false&&t>e+n){s=true;if(o){r()}}if(t<e+n){s=false}}),20);return{poll:()=>{i.reset()},enabled:t=>{o=t}}}function pr(t,e,n){const r=e?e.replace(/^file:\/\//,""):undefined;const i=t.location.columnNumber?t.location.columnNumber+1:undefined;const s=t.location.lineNumber?t.location.lineNumber+1:undefined;return ft({filename:r,module:n(r),function:t.functionName||mt,colno:i,lineno:s,in_app:r?wn(r):undefined})}class mr{constructor(t){this._maxSize=t;this._cache=new Map}get size(){return this._cache.size}get(t){const e=this._cache.get(t);if(e===undefined){return undefined}this._cache.delete(t);this._cache.set(t,e);return e}set(t,e){if(this._cache.size>=this._maxSize){this._cache.delete(this._cache.keys().next().value)}this._cache.set(t,e)}remove(t){const e=this._cache.get(t);if(e){this._cache.delete(t)}return e}clear(){this._cache.clear()}keys(){return Array.from(this._cache.keys())}values(){const t=[];this._cache.forEach((e=>t.push(e)));return t}}function gr(t,e){return t!=null?t:e()}async function yr(t,e){return gr(t,e)}async function br(t){let e=undefined;let n=t[0];let r=1;while(r<t.length){const i=t[r];const s=t[r+1];r+=2;if((i==="optionalAccess"||i==="optionalCall")&&n==null){return}if(i==="access"||i==="optionalAccess"){e=n;n=await s(n)}else if(i==="call"||i==="optionalCall"){n=await s(((...t)=>n.call(e,...t)));e=undefined}}return n}async function vr(t){const e=await br(t);return e==null?true:e}function wr(t){let e=undefined;let n=t[0];let r=1;while(r<t.length){const i=t[r];const s=t[r+1];r+=2;if((i==="optionalAccess"||i==="optionalCall")&&n==null){return}if(i==="access"||i==="optionalAccess"){e=n;n=s(n)}else if(i==="call"||i==="optionalCall"){n=s(((...t)=>n.call(e,...t)));e=undefined}}return n}function _r(t){const e=wr(t);return e==null?true:e}function kr(){return{traceId:ge(),spanId:ge().substring(16)}}function Sr(t){return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const xr=M;function Cr(){const t=xr.chrome;const e=t&&t.app&&t.app.runtime;const n="history"in xr&&!!xr.history.pushState&&!!xr.history.replaceState;return!e&&n}const Tr=typeof __SENTRY_DEBUG__==="undefined"||__SENTRY_DEBUG__;function Ir(){Er(M);return M}function Er(t){const e=t.__SENTRY__=t.__SENTRY__||{};e.version=e.version||$;return e[$]=e[$]||{}}function Ar(t){const e=Wt();const n={sid:ge(),init:true,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:false,toJSON:()=>Rr(n)};if(t){$r(n,t)}return n}function $r(t,e={}){if(e.user){if(!t.ipAddress&&e.user.ip_address){t.ipAddress=e.user.ip_address}if(!t.did&&!e.did){t.did=e.user.id||e.user.email||e.user.username}}t.timestamp=e.timestamp||Wt();if(e.abnormal_mechanism){t.abnormal_mechanism=e.abnormal_mechanism}if(e.ignoreDuration){t.ignoreDuration=e.ignoreDuration}if(e.sid){t.sid=e.sid.length===32?e.sid:ge()}if(e.init!==undefined){t.init=e.init}if(!t.did&&e.did){t.did=`${e.did}`}if(typeof e.started==="number"){t.started=e.started}if(t.ignoreDuration){t.duration=undefined}else if(typeof e.duration==="number"){t.duration=e.duration}else{const e=t.timestamp-t.started;t.duration=e>=0?e:0}if(e.release){t.release=e.release}if(e.environment){t.environment=e.environment}if(!t.ipAddress&&e.ipAddress){t.ipAddress=e.ipAddress}if(!t.userAgent&&e.userAgent){t.userAgent=e.userAgent}if(typeof e.errors==="number"){t.errors=e.errors}if(e.status){t.status=e.status}}function Mr(t,e){let n={};if(e){n={status:e}}else if(t.status==="ok"){n={status:"exited"}}$r(t,n)}function Rr(t){return ft({sid:`${t.sid}`,init:t.init,started:new Date(t.started*1e3).toISOString(),timestamp:new Date(t.timestamp*1e3).toISOString(),status:t.status,errors:t.errors,did:typeof t.did==="number"||typeof t.did==="string"?`${t.did}`:undefined,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}const Nr="_sentrySpan";function Or(t,e){if(e){nt(t,Nr,e)}else{delete t[Nr]}}function Dr(t){return t[Nr]}const Lr=100;class Fr{constructor(){this._notifyingListeners=false;this._scopeListeners=[];this._eventProcessors=[];this._breadcrumbs=[];this._attachments=[];this._user={};this._tags={};this._extra={};this._contexts={};this._sdkProcessingMetadata={};this._propagationContext=kr()}clone(){const t=new Fr;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._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._lastEventId=this._lastEventId;Or(t,Dr(this));return t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){this._eventProcessors.push(t);return this}setUser(t){this._user=t||{email:undefined,id:undefined,ip_address:undefined,username:undefined};if(this._session){$r(this._session,{user:t})}this._notifyScopeListeners();return this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){this._requestSession=t;return this}setTags(t){this._tags={...this._tags,...t};this._notifyScopeListeners();return this}setTag(t,e){this._tags={...this._tags,[t]:e};this._notifyScopeListeners();return this}setExtras(t){this._extra={...this._extra,...t};this._notifyScopeListeners();return this}setExtra(t,e){this._extra={...this._extra,[t]:e};this._notifyScopeListeners();return this}setFingerprint(t){this._fingerprint=t;this._notifyScopeListeners();return this}setLevel(t){this._level=t;this._notifyScopeListeners();return this}setTransactionName(t){this._transactionName=t;this._notifyScopeListeners();return this}setContext(t,e){if(e===null){delete this._contexts[t]}else{this._contexts[t]=e}this._notifyScopeListeners();return this}setSession(t){if(!t){delete this._session}else{this._session=t}this._notifyScopeListeners();return this}getSession(){return this._session}update(t){if(!t){return this}const e=typeof t==="function"?t(this):t;const[n,r]=e instanceof Pr?[e.getScopeData(),e.getRequestSession()]:l(e)?[t,t.requestSession]:[];const{tags:i,extra:s,user:o,contexts:c,level:a,fingerprint:u=[],propagationContext:f}=n||{};this._tags={...this._tags,...i};this._extra={...this._extra,...s};this._contexts={...this._contexts,...c};if(o&&Object.keys(o).length){this._user=o}if(a){this._level=a}if(u.length){this._fingerprint=u}if(f){this._propagationContext=f}if(r){this._requestSession=r}return this}clear(){this._breadcrumbs=[];this._tags={};this._extra={};this._user={};this._contexts={};this._level=undefined;this._transactionName=undefined;this._fingerprint=undefined;this._requestSession=undefined;this._session=undefined;Or(this,undefined);this._attachments=[];this._propagationContext=kr();this._notifyScopeListeners();return this}addBreadcrumb(t,e){const n=typeof e==="number"?e:Lr;if(n<=0){return this}const r={timestamp:qt(),...t};const i=this._breadcrumbs;i.push(r);this._breadcrumbs=i.length>n?i.slice(-n):i;this._notifyScopeListeners();return this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){this._breadcrumbs=[];this._notifyScopeListeners();return this}addAttachment(t){this._attachments.push(t);return this}clearAttachments(){this._attachments=[];return this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Dr(this)}}setSDKProcessingMetadata(t){this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t};return this}setPropagationContext(t){this._propagationContext=t;return this}getPropagationContext(){return this._propagationContext}captureException(t,e){const n=e&&e.event_id?e.event_id:ge();if(!this._client){G.warn("No client configured on scope - will not capture exception!");return n}const r=new Error("Sentry syntheticException");this._client.captureException(t,{originalException:t,syntheticException:r,...e,event_id:n},this);return n}captureMessage(t,e,n){const r=n&&n.event_id?n.event_id:ge();if(!this._client){G.warn("No client configured on scope - will not capture message!");return r}const i=new Error(t);this._client.captureMessage(t,e,{originalException:t,syntheticException:i,...n,event_id:r},this);return r}captureEvent(t,e){const n=e&&e.event_id?e.event_id:ge();if(!this._client){G.warn("No client configured on scope - will not capture event!");return n}this._client.captureEvent(t,{...e,event_id:n},this);return n}_notifyScopeListeners(){if(!this._notifyingListeners){this._notifyingListeners=true;this._scopeListeners.forEach((t=>{t(this)}));this._notifyingListeners=false}}}const Pr=Fr;function jr(){return R("defaultCurrentScope",(()=>new Pr))}function Br(){return R("defaultIsolationScope",(()=>new Pr))}class zr{constructor(t,e){let n;if(!t){n=new Pr}else{n=t}let r;if(!e){r=new Pr}else{r=e}this._stack=[{scope:n}];this._isolationScope=r}withScope(t){const e=this._pushScope();let n;try{n=t(e)}catch(t){this._popScope();throw t}if(m(n)){return n.then((t=>{this._popScope();return t}),(t=>{this._popScope();throw t}))}this._popScope();return n}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();this._stack.push({client:this.getClient(),scope:t});return t}_popScope(){if(this._stack.length<=1)return false;return!!this._stack.pop()}}function Ur(){const t=Ir();const e=Er(t);return e.stack=e.stack||new zr(jr(),Br())}function qr(t){return Ur().withScope(t)}function Hr(t,e){const n=Ur();return n.withScope((()=>{n.getStackTop().scope=t;return e(t)}))}function Wr(t){return Ur().withScope((()=>t(Ur().getIsolationScope())))}function Gr(){return{withIsolationScope:Wr,withScope:qr,withSetScope:Hr,withSetIsolationScope:(t,e)=>Wr(e),getCurrentScope:()=>Ur().getScope(),getIsolationScope:()=>Ur().getIsolationScope()}}function Yr(t){const e=Ir();const n=Er(e);n.acs=t}function Xr(t){const e=Er(t);if(e.acs){return e.acs}return Gr()}function Jr(){const t=Ir();const e=Xr(t);return e.getCurrentScope()}function Kr(){const t=Ir();const e=Xr(t);return e.getIsolationScope()}function Vr(){return R("globalScope",(()=>new Pr))}function Zr(...t){const e=Ir();const n=Xr(e);if(t.length===2){const[e,r]=t;if(!e){return n.withScope(r)}return n.withSetScope(e,r)}return n.withScope(t[0])}function Qr(...t){const e=Ir();const n=Xr(e);if(t.length===2){const[e,r]=t;if(!e){return n.withIsolationScope(r)}return n.withSetIsolationScope(e,r)}return n.withIsolationScope(t[0])}function ti(){return Jr().getClient()}const ei="_sentryMetrics";function ni(t){const e=t[ei];if(!e){return undefined}const n={};for(const[,[t,r]]of e){const e=n[t]||(n[t]=[]);e.push(ft(r))}return n}function ri(t,e,n,r,i,s,o){const c=t[ei];const a=c||(t[ei]=new Map);const u=`${e}:${n}@${i}`;const f=a.get(o);if(f){const[,t]=f;a.set(o,[u,{min:Math.min(t.min,r),max:Math.max(t.max,r),count:t.count+=1,sum:t.sum+=r,tags:t.tags}])}else{a.set(o,[u,{min:r,max:r,count:1,sum:r,tags:s}])}}const ii="sentry.source";const si="sentry.sample_rate";const oi="sentry.op";const ci="sentry.origin";const ai="sentry.idle_span_finish_reason";const ui="sentry.measurement_unit";const fi="sentry.measurement_value";const li="sentry.profile_id";const di="sentry.exclusive_time";const hi="cache.hit";const pi="cache.key";const mi="cache.item_size";const gi=0;const yi=1;const bi=2;function vi(t){if(t<400&&t>=100){return{code:yi}}if(t>=400&&t<500){switch(t){case 401:return{code:bi,message:"unauthenticated"};case 403:return{code:bi,message:"permission_denied"};case 404:return{code:bi,message:"not_found"};case 409:return{code:bi,message:"already_exists"};case 413:return{code:bi,message:"failed_precondition"};case 429:return{code:bi,message:"resource_exhausted"};case 499:return{code:bi,message:"cancelled"};default:return{code:bi,message:"invalid_argument"}}}if(t>=500&&t<600){switch(t){case 501:return{code:bi,message:"unimplemented"};case 503:return{code:bi,message:"unavailable"};case 504:return{code:bi,message:"deadline_exceeded"};default:return{code:bi,message:"internal_error"}}}return{code:bi,message:"unknown_error"}}function wi(t,e){t.setAttribute("http.response.status_code",e);const n=vi(e);if(n.message!=="unknown_error"){t.setStatus(n)}}const _i=0;const ki=1;function Si(t){const{spanId:e,traceId:n}=t.spanContext();const{data:r,op:i,parent_span_id:s,status:o,origin:c}=Ei(t);return ft({parent_span_id:s,span_id:e,trace_id:n,data:r,op:i,status:o,origin:c})}function xi(t){const{spanId:e,traceId:n}=t.spanContext();const{parent_span_id:r}=Ei(t);return ft({parent_span_id:r,span_id:e,trace_id:n})}function Ci(t){const{traceId:e,spanId:n}=t.spanContext();const r=Mi(t);return Ln(e,n,r)}function Ti(t){if(typeof t==="number"){return Ii(t)}if(Array.isArray(t)){return t[0]+t[1]/1e9}if(t instanceof Date){return Ii(t.getTime())}return Wt()}function Ii(t){const e=t>9999999999;return e?t/1e3:t}function Ei(t){if($i(t)){return t.getSpanJSON()}try{const{spanId:e,traceId:n}=t.spanContext();if(Ai(t)){const{attributes:r,startTime:i,name:s,endTime:o,parentSpanId:c,status:a}=t;return ft({span_id:e,trace_id:n,data:r,description:s,parent_span_id:c,start_timestamp:Ti(i),timestamp:Ti(o)||undefined,status:Ri(a),op:r[oi],origin:r[ci],_metrics_summary:ni(t)})}return{span_id:e,trace_id:n}}catch(t){return{}}}function Ai(t){const e=t;return!!e.attributes&&!!e.startTime&&!!e.name&&!!e.endTime&&!!e.status}function $i(t){return typeof t.getSpanJSON==="function"}function Mi(t){const{traceFlags:e}=t.spanContext();return e===ki}function Ri(t){if(!t||t.code===gi){return undefined}if(t.code===yi){return"ok"}return t.message||"unknown_error"}const Ni="_sentryChildSpans";const Oi="_sentryRootSpan";function Di(t,e){const n=t[Oi]||t;nt(e,Oi,n);if(t[Ni]){t[Ni].add(e)}else{nt(t,Ni,new Set([e]))}}function Li(t,e){if(t[Ni]){t[Ni].delete(e)}}function Fi(t){const e=new Set;function n(t){if(e.has(t)){return}else if(Mi(t)){e.add(t);const r=t[Ni]?Array.from(t[Ni]):[];for(const t of r){n(t)}}}n(t);return Array.from(e)}function Pi(t){return t[Oi]||t}function ji(){const t=Ir();const e=Xr(t);if(e.getActiveSpan){return e.getActiveSpan()}return Dr(Jr())}function Bi(t,e,n,r,i,s){const o=ji();if(o){ri(o,t,e,n,r,i,s)}}let zi=false;function Ui(){if(zi){return}zi=true;re(qi);oe(qi)}function qi(){const t=ji();const e=t&&Pi(t);if(e){const t="internal_error";Tr&&G.log(`[Tracing] Root span: ${t} -> Global error occured`);e.setStatus({code:bi,message:t})}}qi.tag="sentry_tracingErrorCallback";const Hi="_sentryScope";const Wi="_sentryIsolationScope";function Gi(t,e,n){if(t){nt(t,Wi,n);nt(t,Hi,e)}}function Yi(t){return{scope:t[Hi],isolationScope:t[Wi]}}function Xi(){Ui()}function Ji(t){if(typeof __SENTRY_TRACING__==="boolean"&&!__SENTRY_TRACING__){return false}const e=ti();const n=t||e&&e.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}class Ki{constructor(t={}){this._traceId=t.traceId||ge();this._spanId=t.spanId||ge().substring(16)}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:_i}}end(t){}setAttribute(t,e){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return false}addEvent(t,e,n){return this}addLink(t){return this}addLinks(t){return this}recordException(t,e){}}function Vi(t,e,n=(()=>{})){let r;try{r=t()}catch(t){e(t);n();throw t}return Zi(r,e,n)}function Zi(t,e,n){if(m(t)){return t.then((t=>{n();return t}),(t=>{e(t);n();throw t}))}n();return t}const Qi="production";const ts="_frozenDsc";function es(t,e){const n=t;nt(n,ts,e)}function ns(t,e){const n=e.getOptions();const{publicKey:r}=e.getDsn()||{};const i=ft({environment:n.environment||Qi,release:n.release,public_key:r,trace_id:t});e.emit("createDsc",i);return i}function rs(t){const e=ti();if(!e){return{}}const n=ns(Ei(t).trace_id||"",e);const r=Pi(t);const i=r[ts];if(i){return i}const s=r.spanContext().traceState;const o=s&&s.get("sentry.dsc");const c=o&&En(o);if(c){return c}const a=Ei(r);const u=a.data||{};const f=u[si];if(f!=null){n.sample_rate=`${f}`}const l=u[ii];const d=a.description;if(l!=="url"&&d){n.transaction=d}n.sampled=String(Mi(r));e.emit("createDsc",n,r);return n}function is(t){const e=rs(t);return An(e)}function ss(t){if(!Tr)return;const{description:e="< unknown name >",op:n="< unknown op >",parent_span_id:r}=Ei(t);const{spanId:i}=t.spanContext();const s=Mi(t);const o=Pi(t);const c=o===t;const a=`[Tracing] Starting ${s?"sampled":"unsampled"} ${c?"root ":""}span`;const u=[`op: ${n}`,`name: ${e}`,`ID: ${i}`];if(r){u.push(`parent ID: ${r}`)}if(!c){const{op:t,description:e}=Ei(o);u.push(`root ID: ${o.spanContext().spanId}`);if(t){u.push(`root op: ${t}`)}if(e){u.push(`root description: ${e}`)}}G.log(`${a}\n ${u.join("\n ")}`)}function os(t){if(!Tr)return;const{description:e="< unknown name >",op:n="< unknown op >"}=Ei(t);const{spanId:r}=t.spanContext();const i=Pi(t);const s=i===t;const o=`[Tracing] Finishing "${n}" ${s?"root ":""}span "${e}" with ID ${r}`;G.log(o)}function cs(t){if(typeof t==="boolean"){return Number(t)}const e=typeof t==="string"?parseFloat(t):t;if(typeof e!=="number"||isNaN(e)||e<0||e>1){Tr&&G.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(t)} of type ${JSON.stringify(typeof t)}.`);return undefined}return e}function as(t,e){if(!Ji(t)){return[false]}let n;if(typeof t.tracesSampler==="function"){n=t.tracesSampler(e)}else if(e.parentSampled!==undefined){n=e.parentSampled}else if(typeof t.tracesSampleRate!=="undefined"){n=t.tracesSampleRate}else{n=1}const r=cs(n);if(r===undefined){Tr&&G.warn("[Tracing] Discarding transaction because of invalid sample rate.");return[false]}if(!r){Tr&&G.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"}`);return[false,r]}const i=Math.random()<r;if(!i){Tr&&G.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(n)})`);return[false,r]}return[true,r]}function us(t,e){if(!e){return t}t.sdk=t.sdk||{};t.sdk.name=t.sdk.name||e.name;t.sdk.version=t.sdk.version||e.version;t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]];t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]];return t}function fs(t,e,n,r){const i=Kn(n);const s={sent_at:(new Date).toISOString(),...i&&{sdk:i},...!!r&&e&&{dsn:J(e)}};const o="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return Fn(s,[o])}function ls(t,e,n,r){const i=Kn(n);const s=t.type&&t.type!=="replay_event"?t.type:"event";us(t,n&&n.sdk);const o=Vn(t,i,r,e);delete t.sdkProcessingMetadata;const c=[{type:s},t];return Fn(o,[c])}function ds(t,e){function n(t){return!!t.trace_id&&!!t.public_key}const r=rs(t[0]);const i=e&&e.getDsn();const s=e&&e.getOptions().tunnel;const o={sent_at:(new Date).toISOString(),...n(r)&&{trace:r},...!!s&&i&&{dsn:J(i)}};const c=e&&e.getOptions().beforeSendSpan;const a=c?t=>c(Ei(t)):t=>Ei(t);const u=[];for(const e of t){const t=a(e);if(t){u.push(Gn(t))}}return Fn(o,u)}function hs(t,e,n){const r=ji();const i=r&&Pi(r);if(i){i.addEvent(t,{[fi]:e,[ui]:n})}}function ps(t){if(!t||t.length===0){return undefined}const e={};t.forEach((t=>{const n=t.attributes||{};const r=n[ui];const i=n[fi];if(typeof r==="string"&&typeof i==="number"){e[t.name]={value:i,unit:r}}}));return e}const ms=1e3;class gs{constructor(t={}){this._traceId=t.traceId||ge();this._spanId=t.spanId||ge().substring(16);this._startTime=t.startTimestamp||Wt();this._attributes={};this.setAttributes({[ci]:"manual",[oi]:t.op,...t.attributes});this._name=t.name;if(t.parentSpanId){this._parentSpanId=t.parentSpanId}if("sampled"in t){this._sampled=t.sampled}if(t.endTimestamp){this._endTime=t.endTimestamp}this._events=[];this._isStandaloneSpan=t.isStandalone;if(this._endTime){this._onSpanEnded()}}addLink(t){return this}addLinks(t){return this}recordException(t,e){}spanContext(){const{_spanId:t,_traceId:e,_sampled:n}=this;return{spanId:t,traceId:e,traceFlags:n?ki:_i}}setAttribute(t,e){if(e===undefined){delete this._attributes[t]}else{this._attributes[t]=e}return this}setAttributes(t){Object.keys(t).forEach((e=>this.setAttribute(e,t[e])));return this}updateStartTime(t){this._startTime=Ti(t)}setStatus(t){this._status=t;return this}updateName(t){this._name=t;return this}end(t){if(this._endTime){return}this._endTime=Ti(t);os(this);this._onSpanEnded()}getSpanJSON(){return ft({data:this._attributes,description:this._name,op:this._attributes[oi],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:Ri(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[ci],_metrics_summary:ni(this),profile_id:this._attributes[li],exclusive_time:this._attributes[di],measurements:ps(this._events),is_segment:this._isStandaloneSpan&&Pi(this)===this||undefined,segment_id:this._isStandaloneSpan?Pi(this).spanContext().spanId:undefined})}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,e,n){Tr&&G.log("[Tracing] Adding an event to span:",t);const r=ys(e)?e:n||Wt();const i=ys(e)?{}:e||{};const s={name:t,time:Ti(r),attributes:i};this._events.push(s);return this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=ti();if(t){t.emit("spanEnd",this)}const e=this._isStandaloneSpan||this===Pi(this);if(!e){return}if(this._isStandaloneSpan){if(this._sampled){ws(ds([this],t))}else{Tr&&G.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled.");if(t){t.recordDroppedEvent("sample_rate","span")}}return}const n=this._convertSpanToTransaction();if(n){const t=Yi(this).scope||Jr();t.captureEvent(n)}}_convertSpanToTransaction(){if(!bs(Ei(this))){return undefined}if(!this._name){Tr&&G.warn("Transaction has no name, falling back to `<unlabeled transaction>`.");this._name="<unlabeled transaction>"}const{scope:t,isolationScope:e}=Yi(this);const n=t||Jr();const r=n.getClient()||ti();if(this._sampled!==true){Tr&&G.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled.");if(r){r.recordDroppedEvent("sample_rate","transaction")}return undefined}const i=Fi(this).filter((t=>t!==this&&!vs(t)));const s=i.map((t=>Ei(t))).filter(bs);const o=this._attributes[ii];const c={contexts:{trace:Si(this)},spans:s.length>ms?s.sort(((t,e)=>t.start_timestamp-e.start_timestamp)).slice(0,ms):s,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:e,...ft({dynamicSamplingContext:rs(this)})},_metrics_summary:ni(this),...o&&{transaction_info:{source:o}}};const a=ps(this._events);const u=a&&Object.keys(a).length;if(u){Tr&&G.log("[Measurements] Adding measurements to transaction event",JSON.stringify(a,undefined,2));c.measurements=a}return c}}function ys(t){return t&&typeof t==="number"||t instanceof Date||Array.isArray(t)}function bs(t){return!!t.start_timestamp&&!!t.timestamp&&!!t.span_id&&!!t.trace_id}function vs(t){return t instanceof gs&&t.isStandaloneSpan()}function ws(t){const e=ti();if(!e){return}const n=t[1];if(!n||n.length===0){e.recordDroppedEvent("before_send","span");return}const r=e.getTransport();if(r){r.send(t).then(null,(t=>{Tr&&G.error("Error while sending span:",t)}))}}const _s="__SENTRY_SUPPRESS_TRACING__";function ks(t,e){const n=Ms();if(n.startSpan){return n.startSpan(t,e)}const r=$s(t);const{forceTransaction:i,parentSpan:s}=t;return Zr(t.scope,(()=>{const n=Ds(s);return n((()=>{const n=Jr();const s=Os(n);const o=t.onlyIfParent&&!s;const c=o?new Ki:As({parentSpan:s,spanArguments:r,forceTransaction:i,scope:n});Or(n,c);return Vi((()=>e(c)),(()=>{const{status:t}=Ei(c);if(c.isRecording()&&(!t||t==="ok")){c.setStatus({code:bi,message:"internal_error"})}}),(()=>c.end()))}))}))}function Ss(t,e){const n=Ms();if(n.startSpanManual){return n.startSpanManual(t,e)}const r=$s(t);const{forceTransaction:i,parentSpan:s}=t;return Zr(t.scope,(()=>{const n=Ds(s);return n((()=>{const n=Jr();const s=Os(n);const o=t.onlyIfParent&&!s;const c=o?new Ki:As({parentSpan:s,spanArguments:r,forceTransaction:i,scope:n});Or(n,c);function a(){c.end()}return Vi((()=>e(c,a)),(()=>{const{status:t}=Ei(c);if(c.isRecording()&&(!t||t==="ok")){c.setStatus({code:bi,message:"internal_error"})}}))}))}))}function xs(t){const e=Ms();if(e.startInactiveSpan){return e.startInactiveSpan(t)}const n=$s(t);const{forceTransaction:r,parentSpan:i}=t;const s=t.scope?e=>Zr(t.scope,e):i!==undefined?t=>Ts(i,t):t=>t();return s((()=>{const e=Jr();const i=Os(e);const s=t.onlyIfParent&&!i;if(s){return new Ki}return As({parentSpan:i,spanArguments:n,forceTransaction:r,scope:e})}))}const Cs=({sentryTrace:t,baggage:e},n)=>Zr((r=>{const i=Dn(t,e);r.setPropagationContext(i);return n()}));function Ts(t,e){const n=Ms();if(n.withActiveSpan){return n.withActiveSpan(t,e)}return Zr((n=>{Or(n,t||undefined);return e(n)}))}function Is(t){const e=Ms();if(e.suppressTracing){return e.suppressTracing(t)}return Zr((e=>{e.setSDKProcessingMetadata({[_s]:true});return t()}))}function Es(t){return Zr((e=>{e.setPropagationContext(kr());Tr&&G.info(`Starting a new trace with id ${e.getPropagationContext().traceId}`);return Ts(null,t)}))}function As({parentSpan:t,spanArguments:e,forceTransaction:n,scope:r}){if(!Ji()){return new Ki}const i=Kr();let s;if(t&&!n){s=Ns(t,r,e);Di(t,s)}else if(t){const n=rs(t);const{traceId:i,spanId:o}=t.spanContext();const c=Mi(t);s=Rs({traceId:i,parentSpanId:o,...e},r,c);es(s,n)}else{const{traceId:t,dsc:n,parentSpanId:o,sampled:c}={...i.getPropagationContext(),...r.getPropagationContext()};s=Rs({traceId:t,parentSpanId:o,...e},r,c);if(n){es(s,n)}}ss(s);Gi(s,r,i);return s}function $s(t){const e=t.experimental||{};const n={isStandalone:e.standalone,...t};if(t.startTime){const e={...n};e.startTimestamp=Ti(t.startTime);delete e.startTime;return e}return n}function Ms(){const t=Ir();return Xr(t)}function Rs(t,e,n){const r=ti();const i=r&&r.getOptions()||{};const{name:s="",attributes:o}=t;const[c,a]=e.getScopeData().sdkProcessingMetadata[_s]?[false]:as(i,{name:s,parentSampled:n,attributes:o,transactionContext:{name:s,parentSampled:n}});const u=new gs({...t,attributes:{[ii]:"custom",...t.attributes},sampled:c});if(a!==undefined){u.setAttribute(si,a)}if(r){r.emit("spanStart",u)}return u}function Ns(t,e,n){const{spanId:r,traceId:i}=t.spanContext();const s=e.getScopeData().sdkProcessingMetadata[_s]?false:Mi(t);const o=s?new gs({...n,parentSpanId:r,traceId:i,sampled:s}):new Ki({traceId:i});Di(t,o);const c=ti();if(c){c.emit("spanStart",o);if(n.endTimestamp){c.emit("spanEnd",o)}}return o}function Os(t){const e=Dr(t);if(!e){return undefined}const n=ti();const r=n?n.getOptions():{};if(r.parentSpanIsAlwaysRootSpan){return Pi(e)}return e}function Ds(t){return t!==undefined?e=>Ts(t,e):t=>t()}const Ls={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3};const Fs="heartbeatFailed";const Ps="idleTimeout";const js="finalTimeout";const Bs="externalFinish";function zs(t,e={}){const n=new Map;let r=false;let i;let s=Bs;let o=!e.disableAutoFinish;const c=[];const{idleTimeout:a=Ls.idleTimeout,finalTimeout:u=Ls.finalTimeout,childSpanTimeout:f=Ls.childSpanTimeout,beforeSpanEnd:l}=e;const d=ti();if(!d||!Ji()){return new Ki}const h=Jr();const p=ji();const m=Us(t);m.end=new Proxy(m.end,{apply(t,e,n){if(l){l(m)}const[r,...i]=n;const s=r||Wt();const o=Ti(s);const c=Fi(m).filter((t=>t!==m));if(!c.length){_(o);return Reflect.apply(t,e,[o,...i])}const a=c.map((t=>Ei(t).timestamp)).filter((t=>!!t));const f=a.length?Math.max(...a):undefined;const d=Ei(m).start_timestamp;const h=Math.min(d?d+u/1e3:Infinity,Math.max(d||-Infinity,Math.min(o,f||Infinity)));_(h);return Reflect.apply(t,e,[h,...i])}});function g(){if(i){clearTimeout(i);i=undefined}}function y(t){g();i=setTimeout((()=>{if(!r&&n.size===0&&o){s=Ps;m.end(t)}}),a)}function b(t){i=setTimeout((()=>{if(!r&&o){s=Fs;m.end(t)}}),f)}function v(t){g();n.set(t,true);const e=Wt();b(e+f/1e3)}function w(t){if(n.has(t)){n.delete(t)}if(n.size===0){const t=Wt();y(t+a/1e3)}}function _(t){r=true;n.clear();c.forEach((t=>t()));Or(h,p);const e=Ei(m);const{start_timestamp:i}=e;if(!i){return}const o=e.data||{};if(!o[ai]){m.setAttribute(ai,s)}G.log(`[Tracing] Idle span "${e.op}" finished`);const f=Fi(m).filter((t=>t!==m));let l=0;f.forEach((e=>{if(e.isRecording()){e.setStatus({code:bi,message:"cancelled"});e.end(t);Tr&&G.log("[Tracing] Cancelling span since span ended early",JSON.stringify(e,undefined,2))}const n=Ei(e);const{timestamp:r=0,start_timestamp:i=0}=n;const s=i<=t;const o=(u+a)/1e3;const c=r-i<=o;if(Tr){const t=JSON.stringify(e,undefined,2);if(!s){G.log("[Tracing] Discarding span since it happened after idle span was finished",t)}else if(!c){G.log("[Tracing] Discarding span since it finished after idle span final timeout",t)}}if(!c||!s){Li(m,e);l++}}));if(l>0){m.setAttribute("sentry.idle_span_discarded_spans",l)}}c.push(d.on("spanStart",(t=>{if(r||t===m||!!Ei(t).timestamp){return}const e=Fi(m);if(e.includes(t)){v(t.spanContext().spanId)}})));c.push(d.on("spanEnd",(t=>{if(r){return}w(t.spanContext().spanId)})));c.push(d.on("idleSpanEnableAutoFinish",(t=>{if(t===m){o=true;y();if(n.size){b()}}})));if(!e.disableAutoFinish){y()}setTimeout((()=>{if(!r){m.setStatus({code:bi,message:"deadline_exceeded"});s=js;m.end()}}),u);return m}function Us(t){const e=xs(t);Or(Jr(),e);Tr&&G.log("[Tracing] Started span is an idle span");return e}function qs(t,e,n,r=0){return new Je(((i,s)=>{const o=t[r];if(e===null||typeof o!=="function"){i(e)}else{const c=o({...e},n);Tr&&o.id&&c===null&&G.log(`Event processor "${o.id}" dropped event`);if(m(c)){void c.then((e=>qs(t,e,n,r+1).then(i))).then(null,s)}else{void qs(t,c,n,r+1).then(i).then(null,s)}}}))}function Hs(t,e){const{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:s}=e;Ys(t,e);if(r){Ks(t,r)}Vs(t,n);Xs(t,i);Js(t,s)}function Ws(t,e){const{extra:n,tags:r,user:i,contexts:s,level:o,sdkProcessingMetadata:c,breadcrumbs:a,fingerprint:u,eventProcessors:f,attachments:l,propagationContext:d,transactionName:h,span:p}=e;Gs(t,"extra",n);Gs(t,"tags",r);Gs(t,"user",i);Gs(t,"contexts",s);Gs(t,"sdkProcessingMetadata",c);if(o){t.level=o}if(h){t.transactionName=h}if(p){t.span=p}if(a.length){t.breadcrumbs=[...t.breadcrumbs,...a]}if(u.length){t.fingerprint=[...t.fingerprint,...u]}if(f.length){t.eventProcessors=[...t.eventProcessors,...f]}if(l.length){t.attachments=[...t.attachments,...l]}t.propagationContext={...t.propagationContext,...d}}function Gs(t,e,n){if(n&&Object.keys(n).length){t[e]={...t[e]};for(const r in n){if(Object.prototype.hasOwnProperty.call(n,r)){t[e][r]=n[r]}}}}function Ys(t,e){const{extra:n,tags:r,user:i,contexts:s,level:o,transactionName:c}=e;const a=ft(n);if(a&&Object.keys(a).length){t.extra={...a,...t.extra}}const u=ft(r);if(u&&Object.keys(u).length){t.tags={...u,...t.tags}}const f=ft(i);if(f&&Object.keys(f).length){t.user={...f,...t.user}}const l=ft(s);if(l&&Object.keys(l).length){t.contexts={...l,...t.contexts}}if(o){t.level=o}if(c&&t.type!=="transaction"){t.transaction=c}}function Xs(t,e){const n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:undefined}function Js(t,e){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...e}}function Ks(t,e){t.contexts={trace:xi(e),...t.contexts};t.sdkProcessingMetadata={dynamicSamplingContext:rs(e),...t.sdkProcessingMetadata};const n=Pi(e);const r=Ei(n).description;if(r&&!t.transaction&&t.type==="transaction"){t.transaction=r}}function Vs(t,e){t.fingerprint=t.fingerprint?Te(t.fingerprint):[];if(e){t.fingerprint=t.fingerprint.concat(e)}if(t.fingerprint&&!t.fingerprint.length){delete t.fingerprint}}function Zs(t,e,n,r,i,s){const{normalizeDepth:o=3,normalizeMaxBreadth:c=1e3}=t;const a={...e,event_id:e.event_id||n.event_id||ge(),timestamp:e.timestamp||qt()};const u=n.integrations||t.integrations.map((t=>t.name));Qs(a,t);ro(a,u);if(i){i.emit("applyFrameMetadata",e)}if(e.type===undefined){eo(a,t.stackParser)}const f=so(r,n.captureContext);if(n.mechanism){we(a,n.mechanism)}const l=i?i.getEventProcessors():[];const d=Vr().getScopeData();if(s){const t=s.getScopeData();Ws(d,t)}if(f){const t=f.getScopeData();Ws(d,t)}const h=[...n.attachments||[],...d.attachments];if(h.length){n.attachments=h}Hs(a,d);const p=[...l,...d.eventProcessors];const m=qs(p,a,n);return m.then((t=>{if(t){no(t)}if(typeof o==="number"&&o>0){return io(t,o,c)}return t}))}function Qs(t,e){const{environment:n,release:r,dist:i,maxValueLength:s=250}=e;if(!("environment"in t)){t.environment="environment"in e?n:Qi}if(t.release===undefined&&r!==undefined){t.release=r}if(t.dist===undefined&&i!==undefined){t.dist=i}if(t.message){t.message=v(t.message,s)}const o=t.exception&&t.exception.values&&t.exception.values[0];if(o&&o.value){o.value=v(o.value,s)}const c=t.request;if(c&&c.url){c.url=v(c.url,s)}}const to=new WeakMap;function eo(t,e){const n=M._sentryDebugIds;if(!n){return}let r;const i=to.get(e);if(i){r=i}else{r=new Map;to.set(e,r)}const s=Object.entries(n).reduce(((t,[n,i])=>{let s;const o=r.get(n);if(o){s=o}else{s=e(n);r.set(n,s)}for(let e=s.length-1;e>=0;e--){const n=s[e];if(n.filename){t[n.filename]=i;break}}return t}),{});try{t.exception.values.forEach((t=>{t.stacktrace.frames.forEach((t=>{if(t.filename){t.debug_id=s[t.filename]}}))}))}catch(t){}}function no(t){const e={};try{t.exception.values.forEach((t=>{t.stacktrace.frames.forEach((t=>{if(t.debug_id){if(t.abs_path){e[t.abs_path]=t.debug_id}else if(t.filename){e[t.filename]=t.debug_id}delete t.debug_id}}))}))}catch(t){}if(Object.keys(e).length===0){return}t.debug_meta=t.debug_meta||{};t.debug_meta.images=t.debug_meta.images||[];const n=t.debug_meta.images;Object.entries(e).forEach((([t,e])=>{n.push({type:"sourcemap",code_file:t,debug_id:e})}))}function ro(t,e){if(e.length>0){t.sdk=t.sdk||{};t.sdk.integrations=[...t.sdk.integrations||[],...e]}}function io(t,e,n){if(!t){return null}const r={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map((t=>({...t,...t.data&&{data:Ie(t.data,e,n)}})))},...t.user&&{user:Ie(t.user,e,n)},...t.contexts&&{contexts:Ie(t.contexts,e,n)},...t.extra&&{extra:Ie(t.extra,e,n)}};if(t.contexts&&t.contexts.trace&&r.contexts){r.contexts.trace=t.contexts.trace;if(t.contexts.trace.data){r.contexts.trace.data=Ie(t.contexts.trace.data,e,n)}}if(t.spans){r.spans=t.spans.map((t=>({...t,...t.data&&{data:Ie(t.data,e,n)}})))}return r}function so(t,e){if(!e){return t}const n=t?t.clone():new Pr;n.update(e);return n}function oo(t){if(!t){return undefined}if(co(t)){return{captureContext:t}}if(uo(t)){return{captureContext:t}}return t}function co(t){return t instanceof Pr||typeof t==="function"}const ao=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function uo(t){return Object.keys(t).some((t=>ao.includes(t)))}function fo(t,e){return Jr().captureException(t,oo(e))}function lo(t,e){const n=typeof e==="string"?e:undefined;const r=typeof e!=="string"?{captureContext:e}:undefined;return Jr().captureMessage(t,n,r)}function ho(t,e){return Jr().captureEvent(t,e)}function po(t,e){Kr().setContext(t,e)}function mo(t){Kr().setExtras(t)}function go(t,e){Kr().setExtra(t,e)}function yo(t){Kr().setTags(t)}function bo(t,e){Kr().setTag(t,e)}function vo(t){Kr().setUser(t)}function wo(){return Kr().lastEventId()}function _o(t,e){const n=Jr();const r=ti();if(!r){Tr&&G.warn("Cannot capture check-in. No client defined.")}else if(!r.captureCheckIn){Tr&&G.warn("Cannot capture check-in. Client does not support sending check-ins.")}else{return r.captureCheckIn(t,e,n)}return ge()}function ko(t,e,n){const r=_o({monitorSlug:t,status:"in_progress"},n);const i=Wt();function s(e){_o({monitorSlug:t,status:e,checkInId:r,duration:Wt()-i})}return Qr((()=>{let t;try{t=e()}catch(t){s("error");throw t}if(m(t)){Promise.resolve(t).then((()=>{s("ok")}),(()=>{s("error")}))}else{s("ok")}return t}))}async function So(t){const e=ti();if(e){return e.flush(t)}Tr&&G.warn("Cannot flush events. No client defined.");return Promise.resolve(false)}async function xo(t){const e=ti();if(e){return e.close(t)}Tr&&G.warn("Cannot flush events and disable SDK. No client defined.");return Promise.resolve(false)}function Co(){return!!ti()}function To(){const t=ti();return!!t&&t.getOptions().enabled!==false&&!!t.getTransport()}function Io(t){Kr().addEventProcessor(t)}function Eo(t){const e=ti();const n=Kr();const r=Jr();const{release:i,environment:s=Qi}=e&&e.getOptions()||{};const{userAgent:o}=M.navigator||{};const c=Ar({release:i,environment:s,user:r.getUser()||n.getUser(),...o&&{userAgent:o},...t});const a=n.getSession();if(a&&a.status==="ok"){$r(a,{status:"exited"})}Ao();n.setSession(c);r.setSession(c);return c}function Ao(){const t=Kr();const e=Jr();const n=e.getSession()||t.getSession();if(n){Mr(n)}$o();t.setSession();e.setSession()}function $o(){const t=Kr();const e=Jr();const n=ti();const r=e.getSession()||t.getSession();if(r&&n){n.captureSession(r)}}function Mo(t=false){if(t){Ao();return}$o()}class Ro{constructor(t,e){this._client=t;this.flushTimeout=60;this._pendingAggregates=new Map;this._isEnabled=true;this._intervalId=setInterval((()=>this.flush()),this.flushTimeout*1e3);if(this._intervalId.unref){this._intervalId.unref()}this._sessionAttrs=e}flush(){const t=this.getSessionAggregates();if(t.aggregates.length===0){return}this._pendingAggregates=new Map;this._client.sendSession(t)}getSessionAggregates(){const t=Array.from(this._pendingAggregates.values());const e={attrs:this._sessionAttrs,aggregates:t};return ft(e)}close(){clearInterval(this._intervalId);this._isEnabled=false;this.flush()}incrementSessionStatusCount(){if(!this._isEnabled){return}const t=Kr();const e=t.getRequestSession();if(e&&e.status){this._incrementSessionStatusCount(e.status,new Date);t.setRequestSession(undefined)}}_incrementSessionStatusCount(t,e){const n=new Date(e).setSeconds(0,0);let r=this._pendingAggregates.get(n);if(!r){r={started:new Date(n).toISOString()};this._pendingAggregates.set(n,r)}switch(t){case"errored":r.errored=(r.errored||0)+1;return r.errored;case"ok":r.exited=(r.exited||0)+1;return r.exited;default:r.crashed=(r.crashed||0)+1;return r.crashed}}}const No="7";function Oo(t){const e=t.protocol?`${t.protocol}:`:"";const n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function Do(t){return`${Oo(t)}${t.projectId}/envelope/`}function Lo(t,e){return st({sentry_key:t.publicKey,sentry_version:No,...e&&{sentry_client:`${e.name}/${e.version}`}})}function Fo(t,e,n){return e?e:`${Do(t)}?${Lo(t,n)}`}function Po(t,e){const n=Q(t);if(!n){return""}const r=`${Oo(n)}embed/error-page/`;let i=`dsn=${J(n)}`;for(const t in e){if(t==="dsn"){continue}if(t==="onClose"){continue}if(t==="user"){const t=e.user;if(!t){continue}if(t.name){i+=`&name=${encodeURIComponent(t.name)}`}if(t.email){i+=`&email=${encodeURIComponent(t.email)}`}}else{i+=`&${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`}}return`${r}?${i}`}const jo=[];function Bo(t){const e={};t.forEach((t=>{const{name:n}=t;const r=e[n];if(r&&!r.isDefaultInstance&&t.isDefaultInstance){return}e[n]=t}));return Object.values(e)}function zo(t){const e=t.defaultIntegrations||[];const n=t.integrations;e.forEach((t=>{t.isDefaultInstance=true}));let r;if(Array.isArray(n)){r=[...e,...n]}else if(typeof n==="function"){r=Te(n(e))}else{r=e}const i=Bo(r);const s=i.findIndex((t=>t.name==="Debug"));if(s>-1){const[t]=i.splice(s,1);i.push(t)}return i}function Uo(t,e){const n={};e.forEach((e=>{if(e){Ho(t,e,n)}}));return n}function qo(t,e){for(const n of e){if(n&&n.afterAllSetup){n.afterAllSetup(t)}}}function Ho(t,e,n){if(n[e.name]){Tr&&G.log(`Integration skipped because it was already installed: ${e.name}`);return}n[e.name]=e;if(jo.indexOf(e.name)===-1&&typeof e.setupOnce==="function"){e.setupOnce();jo.push(e.name)}if(e.setup&&typeof e.setup==="function"){e.setup(t)}if(typeof e.preprocessEvent==="function"){const n=e.preprocessEvent.bind(e);t.on("preprocessEvent",((e,r)=>n(e,r,t)))}if(typeof e.processEvent==="function"){const n=e.processEvent.bind(e);const r=Object.assign(((e,r)=>n(e,r,t)),{id:e.name});t.addEventProcessor(r)}Tr&&G.log(`Integration installed: ${e.name}`)}function Wo(t){const e=ti();if(!e){Tr&&G.warn(`Cannot add integration "${t.name}" because no SDK Client is available.`);return}e.addIntegration(t)}function Go(t){return t}const Yo="Not capturing exception because it's already been captured.";class Xo{constructor(t){this._options=t;this._integrations={};this._numProcessing=0;this._outcomes={};this._hooks={};this._eventProcessors=[];if(t.dsn){this._dsn=Q(t.dsn)}else{Tr&&G.warn("No DSN provided, client will not send events.")}if(this._dsn){const e=Fo(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:undefined);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:e})}}captureException(t,e,n){const r=ge();if(Ce(t)){Tr&&G.log(Yo);return r}const i={event_id:r,...e};this._process(this.eventFromException(t,i).then((t=>this._captureEvent(t,i,n))));return i.event_id}captureMessage(t,e,n,r){const i={event_id:ge(),...n};const s=u(t)?t:String(t);const o=f(t)?this.eventFromMessage(s,e,i):this.eventFromException(t,i);this._process(o.then((t=>this._captureEvent(t,i,r))));return i.event_id}captureEvent(t,e,n){const r=ge();if(e&&e.originalException&&Ce(e.originalException)){Tr&&G.log(Yo);return r}const i={event_id:r,...e};const s=t.sdkProcessingMetadata||{};const o=s.capturedSpanScope;this._process(this._captureEvent(t,i,o||n));return i.event_id}captureSession(t){if(!(typeof t.release==="string")){Tr&&G.warn("Discarded session because of missing or non-string release")}else{this.sendSession(t);$r(t,{init:false})}}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const e=this._transport;if(e){this.emit("flush");return this._isClientDoneProcessing(t).then((n=>e.flush(t).then((t=>n&&t))))}else{return Ye(true)}}close(t){return this.flush(t).then((t=>{this.getOptions().enabled=false;this.emit("close");return t}))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){if(this._isEnabled()||this._options.integrations.some((({name:t})=>t.startsWith("Spotlight")))){this._setupIntegrations()}}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const e=this._integrations[t.name];Ho(this,t,this._integrations);if(!e){qo(this,[t])}}sendEvent(t,e={}){this.emit("beforeSendEvent",t,e);let n=ls(t,this._dsn,this._options._metadata,this._options.tunnel);for(const t of e.attachments||[]){n=Pn(n,Yn(t))}const r=this.sendEnvelope(n);if(r){r.then((e=>this.emit("afterSendEvent",t,e)),null)}}sendSession(t){const e=fs(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(e)}recordDroppedEvent(t,e,n){if(this._options.sendClientReports){const r=typeof n==="number"?n:1;const i=`${t}:${e}`;Tr&&G.log(`Recording outcome: "${i}"${r>1?` (${r} times)`:""}`);this._outcomes[i]=(this._outcomes[i]||0)+r}}on(t,e){const n=this._hooks[t]=this._hooks[t]||[];n.push(e);return()=>{const t=n.indexOf(e);if(t>-1){n.splice(t,1)}}}emit(t,...e){const n=this._hooks[t];if(n){n.forEach((t=>t(...e)))}}sendEnvelope(t){this.emit("beforeEnvelope",t);if(this._isEnabled()&&this._transport){return this._transport.send(t).then(null,(t=>{Tr&&G.error("Error while sending event:",t);return t}))}Tr&&G.error("Transport disabled");return Ye({})}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=Uo(this,t);qo(this,t)}_updateSessionFromEvent(t,e){let n=false;let r=false;const i=e.exception&&e.exception.values;if(i){r=true;for(const t of i){const e=t.mechanism;if(e&&e.handled===false){n=true;break}}}const s=t.status==="ok";const o=s&&t.errors===0||s&&n;if(o){$r(t,{...n&&{status:"crashed"},errors:t.errors||Number(r||n)});this.captureSession(t)}}_isClientDoneProcessing(t){return new Je((e=>{let n=0;const r=1;const i=setInterval((()=>{if(this._numProcessing==0){clearInterval(i);e(true)}else{n+=r;if(t&&n>=t){clearInterval(i);e(false)}}}),r)}))}_isEnabled(){return this.getOptions().enabled!==false&&this._transport!==undefined}_prepareEvent(t,e,n,r=Kr()){const i=this.getOptions();const s=Object.keys(this._integrations);if(!e.integrations&&s.length>0){e.integrations=s}this.emit("preprocessEvent",t,e);if(!t.type){r.setLastEventId(t.event_id||e.event_id)}return Zs(i,t,e,n,this,r).then((t=>{if(t===null){return t}const e={...r.getPropagationContext(),...n?n.getPropagationContext():undefined};const i=t.contexts&&t.contexts.trace;if(!i&&e){const{traceId:n,spanId:r,parentSpanId:i,dsc:s}=e;t.contexts={trace:ft({trace_id:n,span_id:r,parent_span_id:i}),...t.contexts};const o=s?s:ns(n,this);t.sdkProcessingMetadata={dynamicSamplingContext:o,...t.sdkProcessingMetadata}}return t}))}_captureEvent(t,e={},n){return this._processEvent(t,e,n).then((t=>t.event_id),(t=>{if(Tr){const e=t;if(e.logLevel==="log"){G.log(e.message)}else{G.warn(e)}}return undefined}))}_processEvent(t,e,n){const r=this.getOptions();const{sampleRate:i}=r;const s=Zo(t);const o=Vo(t);const c=t.type||"error";const a=`before send for type \`${c}\``;const u=typeof i==="undefined"?undefined:cs(i);if(o&&typeof u==="number"&&Math.random()>u){this.recordDroppedEvent("sample_rate","error",t);return Xe(new tt(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"))}const f=c==="replay_event"?"replay":c;const l=t.sdkProcessingMetadata||{};const d=l.capturedSpanIsolationScope;return this._prepareEvent(t,e,n,d).then((n=>{if(n===null){this.recordDroppedEvent("event_processor",f,t);throw new tt("An event processor returned `null`, will not send event.","log")}const i=e.data&&e.data.__sentry__===true;if(i){return n}const s=Ko(this,r,n,e);return Jo(s,a)})).then((r=>{if(r===null){this.recordDroppedEvent("before_send",f,t);if(s){const e=t.spans||[];const n=1+e.length;this.recordDroppedEvent("before_send","span",n)}throw new tt(`${a} returned \`null\`, will not send event.`,"log")}const i=n&&n.getSession();if(!s&&i){this._updateSessionFromEvent(i,r)}if(s){const t=r.sdkProcessingMetadata&&r.sdkProcessingMetadata.spanCountBeforeProcessing||0;const e=r.spans?r.spans.length:0;const n=t-e;if(n>0){this.recordDroppedEvent("before_send","span",n)}}const o=r.transaction_info;if(s&&o&&r.transaction!==t.transaction){const t="custom";r.transaction_info={...o,source:t}}this.sendEvent(r,e);return r})).then(null,(t=>{if(t instanceof tt){throw t}this.captureException(t,{data:{__sentry__:true},originalException:t});throw new tt(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${t}`)}))}_process(t){this._numProcessing++;void t.then((t=>{this._numProcessing--;return t}),(t=>{this._numProcessing--;return t}))}_clearOutcomes(){const t=this._outcomes;this._outcomes={};return Object.entries(t).map((([t,e])=>{const[n,r]=t.split(":");return{reason:n,category:r,quantity:e}}))}_flushOutcomes(){Tr&&G.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){Tr&&G.log("No outcomes to send");return}if(!this._dsn){Tr&&G.log("No dsn provided, will not send outcomes");return}Tr&&G.log("Sending outcomes:",t);const e=Zn(t,this._options.tunnel&&J(this._dsn));this.sendEnvelope(e)}}function Jo(t,e){const n=`${e} must return \`null\` or a valid event.`;if(m(t)){return t.then((t=>{if(!l(t)&&t!==null){throw new tt(n)}return t}),(t=>{throw new tt(`${e} rejected with ${t}`)}))}else if(!l(t)&&t!==null){throw new tt(n)}return t}function Ko(t,e,n,r){const{beforeSend:i,beforeSendTransaction:s,beforeSendSpan:o}=e;if(Vo(n)&&i){return i(n,r)}if(Zo(n)){if(n.spans&&o){const e=[];for(const r of n.spans){const n=o(r);if(n){e.push(n)}else{t.recordDroppedEvent("before_send","span")}}n.spans=e}if(s){if(n.spans){const t=n.spans.length;n.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:t}}return s(n,r)}}return n}function Vo(t){return t.type===undefined}function Zo(t){return t.type==="transaction"}function Qo(t,e,n,r,i){const s={sent_at:(new Date).toISOString()};if(n&&n.sdk){s.sdk={name:n.sdk.name,version:n.sdk.version}}if(!!r&&!!i){s.dsn=J(i)}if(e){s.trace=ft(e)}const o=tc(t);return Fn(s,[o])}function tc(t){const e={type:"check_in"};return[e,t]}class ec extends Xo{constructor(t){Ui();super(t)}eventFromException(t,e){return Ye(lr(this,this._options.stackParser,t,e))}eventFromMessage(t,e="info",n){return Ye(dr(this._options.stackParser,t,e,n,this._options.attachStacktrace))}captureException(t,e,n){if(this._options.autoSessionTracking&&this._sessionFlusher){const t=Kr().getRequestSession();if(t&&t.status==="ok"){t.status="errored"}}return super.captureException(t,e,n)}captureEvent(t,e,n){if(this._options.autoSessionTracking&&this._sessionFlusher){const e=t.type||"exception";const n=e==="exception"&&t.exception&&t.exception.values&&t.exception.values.length>0;if(n){const t=Kr().getRequestSession();if(t&&t.status==="ok"){t.status="errored"}}}return super.captureEvent(t,e,n)}close(t){if(this._sessionFlusher){this._sessionFlusher.close()}return super.close(t)}initSessionFlusher(){const{release:t,environment:e}=this._options;if(!t){Tr&&G.warn("Cannot initialise an instance of SessionFlusher if no release is provided!")}else{this._sessionFlusher=new Ro(this,{release:t,environment:e})}}captureCheckIn(t,e,n){const r="checkInId"in t&&t.checkInId?t.checkInId:ge();if(!this._isEnabled()){Tr&&G.warn("SDK not enabled, will not capture checkin.");return r}const i=this.getOptions();const{release:s,environment:o,tunnel:c}=i;const a={check_in_id:r,monitor_slug:t.monitorSlug,status:t.status,release:s,environment:o};if("duration"in t){a.duration=t.duration}if(e){a.monitor_config={schedule:e.schedule,checkin_margin:e.checkinMargin,max_runtime:e.maxRuntime,timezone:e.timezone,failure_issue_threshold:e.failureIssueThreshold,recovery_threshold:e.recoveryThreshold}}const[u,f]=this._getTraceInfoFromScope(n);if(f){a.contexts={trace:f}}const l=Qo(a,u,this.getSdkMetadata(),c,this.getDsn());Tr&&G.info("Sending checkin:",t.monitorSlug,t.status);this.sendEnvelope(l);return r}_captureRequestSession(){if(!this._sessionFlusher){Tr&&G.warn("Discarded request mode session because autoSessionTracking option was disabled")}else{this._sessionFlusher.incrementSessionStatusCount()}}_prepareEvent(t,e,n,r){if(this._options.platform){t.platform=t.platform||this._options.platform}if(this._options.runtime){t.contexts={...t.contexts,runtime:(t.contexts||{}).runtime||this._options.runtime}}if(this._options.serverName){t.server_name=t.server_name||this._options.serverName}return super._prepareEvent(t,e,n,r)}_getTraceInfoFromScope(t){if(!t){return[undefined,undefined]}const e=Dr(t);if(e){const t=Pi(e);const n=rs(t);return[n,xi(t)]}const{traceId:n,spanId:r,parentSpanId:i,dsc:s}=t.getPropagationContext();const o={trace_id:n,span_id:r,parent_span_id:i};if(s){return[s,o]}return[ns(n,this),o]}}function nc(t,e){if(e.debug===true){if(Tr){G.enable()}else{H((()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")}))}}const n=Jr();n.update(e.initialScope);const r=new t(e);rc(r);r.init();return r}function rc(t){Jr().setClient(t)}const ic=64;function sc(t,e,n=Ke(t.bufferSize||ic)){let r={};const i=t=>n.drain(t);function s(i){const s=[];jn(i,((e,n)=>{const i=Jn(n);if(nr(r,i)){const r=oc(e,n);t.recordDroppedEvent("ratelimit_backoff",i,r)}else{s.push(e)}}));if(s.length===0){return Ye({})}const o=Fn(i[0],s);const c=e=>{jn(o,((n,r)=>{const i=oc(n,r);t.recordDroppedEvent(e,Jn(r),i)}))};const a=()=>e({body:qn(o)}).then((t=>{if(t.statusCode!==undefined&&(t.statusCode<200||t.statusCode>=300)){Tr&&G.warn(`Sentry responded with status code ${t.statusCode} to sent event.`)}r=rr(r,t);return t}),(t=>{c("network_error");throw t}));return n.add(a).then((t=>t),(t=>{if(t instanceof tt){Tr&&G.error("Skipped sending event because buffer is full.");c("queue_overflow");return Ye({})}else{throw t}}))}return{send:s,flush:i}}function oc(t,e){if(e!=="event"&&e!=="transaction"){return undefined}return Array.isArray(t)?t[1]:undefined}const cc=100;const ac=5e3;const uc=36e5;function fc(t){function e(...t){Tr&&G.info("[Offline]:",...t)}return n=>{const r=t(n);if(!n.createStore){throw new Error("No `createStore` function was provided")}const i=n.createStore(n);let s=ac;let o;function c(t,e,r){if(Bn(t,["client_report"])){return false}if(n.shouldStore){return n.shouldStore(t,e,r)}return true}function a(t){if(o){clearTimeout(o)}o=setTimeout((async()=>{o=undefined;const t=await i.shift();if(t){e("Attempting to send previously queued event");t[0].sent_at=(new Date).toISOString();void f(t,true).catch((t=>{e("Failed to retry sending",t)}))}}),t);if(typeof o!=="number"&&o.unref){o.unref()}}function u(){if(o){return}a(s);s=Math.min(s*2,uc)}async function f(t,n=false){if(!n&&Bn(t,["replay_event","replay_recording"])){await i.push(t);a(cc);return{}}try{const e=await r.send(t);let n=cc;if(e){if(e.headers&&e.headers["retry-after"]){n=tr(e.headers["retry-after"])}else if(e.headers&&e.headers["x-sentry-rate-limits"]){n=6e4}else if((e.statusCode||0)>=400){return e}}a(n);s=ac;return e}catch(r){if(await c(t,r,s)){if(n){await i.unshift(t)}else{await i.push(t)}u();e("Error sending. Event queued.",r);return{}}else{throw r}}}if(n.flushAtStartup){u()}return{send:f,flush:t=>r.flush(t)}}}function lc(t,e){let n;jn(t,((t,r)=>{if(e.includes(r)){n=Array.isArray(t)?t[1]:undefined}return!!n}));return n}function dc(t,e){return n=>{const r=t(n);return{...r,send:async t=>{const n=lc(t,["event","transaction","profile","replay_event"]);if(n){n.release=e}return r.send(t)}}}}function hc(t,e){return Fn(e?{...t[0],dsn:e}:t[0],t[1])}function pc(t,e){return n=>{const r=t(n);const i=new Map;function s(e,r){const s=r?`${e}:${r}`:e;let o=i.get(s);if(!o){const c=K(e);if(!c){return undefined}const a=Fo(c,n.tunnel);o=r?dc(t,r)({...n,url:a}):t({...n,url:a});i.set(s,o)}return[e,o]}async function o(t){function n(e){const n=e&&e.length?e:["event"];return lc(t,n)}const i=e({envelope:t,getEvent:n}).map((t=>{if(typeof t==="string"){return s(t,undefined)}else{return s(t.dsn,t.release)}})).filter((t=>!!t));const o=i.length?i:[["",r]];const c=await Promise.all(o.map((([e,n])=>n.send(hc(t,e)))));return c[0]}async function c(t){const e=[...i.values(),r];const n=await Promise.all(e.map((e=>e.flush(t))));return n.every((t=>t))}return{send:o,flush:c}}}function mc(t,e){const n=e&&e.getDsn();const r=e&&e.getOptions().tunnel;return yc(t,n)||gc(t,r)}function gc(t,e){if(!e){return false}return bc(t)===bc(e)}function yc(t,e){return e?t.includes(e.host):false}function bc(t){return t[t.length-1]==="/"?t.slice(0,-1):t}function vc(t,...e){const n=new String(String.raw(t,...e));n.__sentry_template_string__=t.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s");n.__sentry_template_values__=e;return n}function wc(t,e,n=[e],r="npm"){const i=t._metadata||{};if(!i.sdk){i.sdk={name:`sentry.javascript.${e}`,packages:n.map((t=>({name:`${r}:@sentry/${t}`,version:$}))),version:$}}t._metadata=i}function _c(){const t=Ir();const e=Xr(t);if(e.getTraceData){return e.getTraceData()}const n=ti();const r=Jr();const i=ji();const{dsc:s,sampled:o,traceId:c}=r.getPropagationContext();const a=i&&Pi(i);const u=i?Ci(i):Ln(c,undefined,o);const f=a?rs(a):s?s:n?ns(c,n):undefined;const l=An(f);const d=Nn.test(u);if(!d){G.warn("Invalid sentry-trace data. Cannot generate trace data");return{}}const h=kc(l);if(!h){G.warn('Invalid baggage data. Not returning "baggage" value')}return{"sentry-trace":u,...h&&{baggage:l}}}function kc(t){if(!t||!t.length){return false}const e="[-!#$%&'*+.^_`|~A-Za-z0-9]+";const n="[!#-+-./0-9:<=>?@A-Z\\[\\]a-z{-}]+";const r="\\s*";const i=new RegExp(`^${e}${r}=${r}${n}(${r},${r}${e}${r}=${r}${n})*$`);return i.test(t)}function Sc(){return Object.entries(_c()).map((([t,e])=>`<meta name="${t}" content="${e}"/>`)).join("\n")}const xc=100;function Cc(t,e){const n=ti();const r=Kr();if(!n)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:s=xc}=n.getOptions();if(s<=0)return;const o=qt();const c={timestamp:o,...t};const a=i?H((()=>i(c,e))):c;if(a===null)return;if(n.emit){n.emit("beforeAddBreadcrumb",a,e)}r.addBreadcrumb(a,s)}let Tc;const Ic="FunctionToString";const Ec=new WeakMap;const Ac=()=>({name:Ic,setupOnce(){Tc=Function.prototype.toString;try{Function.prototype.toString=function(...t){const e=it(this);const n=Ec.has(ti())&&e!==undefined?e:this;return Tc.apply(n,t)}}catch(t){}},setup(t){Ec.set(t,true)}});const $c=Go(Ac);const Mc=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",'can\'t redefine non-configurable property "solana"',"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler"];const Rc="InboundFilters";const Nc=(t={})=>({name:Rc,processEvent(e,n,r){const i=r.getOptions();const s=Dc(t,i);return Lc(e,s)?null:e}});const Oc=Go(Nc);function Dc(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:Mc],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[]],ignoreInternal:t.ignoreInternal!==undefined?t.ignoreInternal:true}}function Lc(t,e){if(e.ignoreInternal&&Uc(t)){Tr&&G.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${be(t)}`);return true}if(Fc(t,e.ignoreErrors)){Tr&&G.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${be(t)}`);return true}if(Wc(t)){Tr&&G.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${be(t)}`);return true}if(Pc(t,e.ignoreTransactions)){Tr&&G.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${be(t)}`);return true}if(jc(t,e.denyUrls)){Tr&&G.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${be(t)}.\nUrl: ${Hc(t)}`);return true}if(!Bc(t,e.allowUrls)){Tr&&G.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${be(t)}.\nUrl: ${Hc(t)}`);return true}return false}function Fc(t,e){if(t.type||!e||!e.length){return false}return zc(t).some((t=>S(t,e)))}function Pc(t,e){if(t.type!=="transaction"||!e||!e.length){return false}const n=t.transaction;return n?S(n,e):false}function jc(t,e){if(!e||!e.length){return false}const n=Hc(t);return!n?false:S(n,e)}function Bc(t,e){if(!e||!e.length){return true}const n=Hc(t);return!n?true:S(n,e)}function zc(t){const e=[];if(t.message){e.push(t.message)}let n;try{n=t.exception.values[t.exception.values.length-1]}catch(t){}if(n){if(n.value){e.push(n.value);if(n.type){e.push(`${n.type}: ${n.value}`)}}}return e}function Uc(t){try{return t.exception.values[0].type==="SentryError"}catch(t){}return false}function qc(t=[]){for(let e=t.length-1;e>=0;e--){const n=t[e];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]"){return n.filename||null}}return null}function Hc(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch(t){}return e?qc(e):null}catch(e){Tr&&G.error(`Cannot extract url for event ${be(t)}`);return null}}function Wc(t){if(t.type){return false}if(!t.exception||!t.exception.values||t.exception.values.length===0){return false}return!t.message&&!t.exception.values.some((t=>t.stacktrace||t.type&&t.type!=="Error"||t.value))}const Gc="cause";const Yc=5;const Xc="LinkedErrors";const Jc=(t={})=>{const e=t.limit||Yc;const n=t.key||Gc;return{name:Xc,preprocessEvent(t,r,i){const s=i.getOptions();x(or,s.stackParser,s.maxValueLength,n,e,t,r)}}};const Kc=Go(Jc);const Vc=new Map;const Zc=new Set;function Qc(t){if(!M._sentryModuleMetadata){return}for(const e of Object.keys(M._sentryModuleMetadata)){const n=M._sentryModuleMetadata[e];if(Zc.has(e)){continue}Zc.add(e);const r=t(e);for(const t of r.reverse()){if(t.filename){Vc.set(t.filename,n);break}}}}function ta(t,e){Qc(t);return Vc.get(e)}function ea(t,e){try{e.exception.values.forEach((e=>{if(!e.stacktrace){return}for(const n of e.stacktrace.frames||[]){if(!n.filename||n.module_metadata){continue}const e=ta(t,n.filename);if(e){n.module_metadata=e}}}))}catch(t){}}function na(t){try{t.exception.values.forEach((t=>{if(!t.stacktrace){return}for(const e of t.stacktrace.frames||[]){delete e.module_metadata}}))}catch(t){}}const ra=Go((()=>({name:"ModuleMetadata",setup(t){t.on("beforeEnvelope",(t=>{jn(t,((t,e)=>{if(e==="event"){const e=Array.isArray(t)?t[1]:undefined;if(e){na(e);t[1]=e}}}))}));t.on("applyFrameMetadata",(e=>{if(e.type){return}const n=t.getOptions().stackParser;ea(n,e)}))}})));const ia={include:{cookies:true,data:true,headers:true,ip:false,query_string:true,url:true,user:{id:true,username:true,email:true}},transactionNamingScheme:"methodPath"};const sa="RequestData";const oa=(t={})=>{const e={...ia,...t,include:{...ia.include,...t.include,user:t.include&&typeof t.include.user==="boolean"?t.include.user:{...ia.include.user,...(t.include||{}).user}}};return{name:sa,processEvent(t){const{sdkProcessingMetadata:n={}}=t;const r=n.request;if(!r){return t}const i=aa(e);return pn(t,r,i)}}};const ca=Go(oa);function aa(t){const{transactionNamingScheme:e,include:{ip:n,user:r,...i}}=t;const s=["method"];for(const[t,e]of Object.entries(i)){if(e){s.push(t)}}let o;if(r===undefined){o=true}else if(typeof r==="boolean"){o=r}else{const t=[];for(const[e,n]of Object.entries(r)){if(n){t.push(e)}}o=t}return{include:{ip:n,user:o,request:s.length!==0?s:undefined,transaction:e}}}const ua="CaptureConsole";const fa=(t={})=>{const e=t.levels||U;return{name:ua,setup(t){if(!("console"in M)){return}Mt((({args:n,level:r})=>{if(ti()!==t||!e.includes(r)){return}da(n,r)}))}}};const la=Go(fa);function da(t,e){const n={level:vn(e),extra:{arguments:t}};Zr((r=>{r.addEventProcessor((t=>{t.logger="console";we(t,{handled:false,type:"console"});return t}));if(e==="assert"){if(!t[0]){const e=`Assertion failed: ${_(t.slice(1)," ")||"console.assert"}`;r.setExtra("arguments",t.slice(1));lo(e,n)}return}const i=t.find((t=>t instanceof Error));if(i){fo(i,n);return}const s=_(t," ");lo(s,n)}))}const ha="Debug";const pa=(t={})=>{const e={debugger:false,stringify:false,...t};return{name:ha,setup(t){t.on("beforeSendEvent",((t,n)=>{if(e.debugger){debugger}H((()=>{if(e.stringify){console.log(JSON.stringify(t,null,2));if(n&&Object.keys(n).length){console.log(JSON.stringify(n,null,2))}}else{console.log(t);if(n&&Object.keys(n).length){console.log(n)}}}))}))}}};const ma=Go(pa);const ga="Dedupe";const ya=()=>{let t;return{name:ga,processEvent(e){if(e.type){return e}try{if(va(e,t)){Tr&&G.warn("Event dropped due to being a duplicate of previously captured event.");return null}}catch(t){}return t=e}}};const ba=Go(ya);function va(t,e){if(!e){return false}if(wa(t,e)){return true}if(_a(t,e)){return true}return false}function wa(t,e){const n=t.message;const r=e.message;if(!n&&!r){return false}if(n&&!r||!n&&r){return false}if(n!==r){return false}if(!Sa(t,e)){return false}if(!ka(t,e)){return false}return true}function _a(t,e){const n=xa(e);const r=xa(t);if(!n||!r){return false}if(n.type!==r.type||n.value!==r.value){return false}if(!Sa(t,e)){return false}if(!ka(t,e)){return false}return true}function ka(t,e){let n=xt(t);let r=xt(e);if(!n&&!r){return true}if(n&&!r||!n&&r){return false}n=n;r=r;if(r.length!==n.length){return false}for(let t=0;t<r.length;t++){const e=r[t];const i=n[t];if(e.filename!==i.filename||e.lineno!==i.lineno||e.colno!==i.colno||e.function!==i.function){return false}}return true}function Sa(t,e){let n=t.fingerprint;let r=e.fingerprint;if(!n&&!r){return true}if(n&&!r||!n&&r){return false}n=n;r=r;try{return!!(n.join("")===r.join(""))}catch(t){return false}}function xa(t){return t.exception&&t.exception.values&&t.exception.values[0]}const Ca="ExtraErrorData";const Ta=(t={})=>{const{depth:e=3,captureErrorCause:n=true}=t;return{name:Ca,processEvent(t,r,i){const{maxValueLength:s=250}=i.getOptions();return Ea(t,r,e,n,s)}}};const Ia=Go(Ta);function Ea(t,e={},n,i,s){if(!e.originalException||!r(e.originalException)){return t}const o=e.originalException.name||e.originalException.constructor.name;const c=Aa(e.originalException,i,s);if(c){const e={...t.contexts};const r=Ie(c,n);if(l(r)){nt(r,"__sentry_skip_normalization__",true);e[o]=r}return{...t,contexts:e}}return t}function Aa(t,e,n){try{const i=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"];const s={};for(const e of Object.keys(t)){if(i.indexOf(e)!==-1){continue}const o=t[e];s[e]=r(o)||typeof o==="string"?v(`${o}`,n):o}if(e&&t.cause!==undefined){s.cause=r(t.cause)?t.cause.toString():t.cause}if(typeof t.toJSON==="function"){const e=t.toJSON();for(const t of Object.keys(e)){const n=e[t];s[t]=r(n)?n.toString():n}}return s}catch(t){Tr&&G.error("Unable to extract extra data from the Error object:",t)}return null}const $a="RewriteFrames";const Ma=Go(((t={})=>{const e=t.root;const n=t.prefix||"app:///";const r="window"in M&&M.window!==undefined;const i=t.iteratee||Ra({isBrowser:r,root:e,prefix:n});function s(t){try{return{...t,exception:{...t.exception,values:t.exception.values.map((t=>({...t,...t.stacktrace&&{stacktrace:o(t.stacktrace)}})))}}}catch(e){return t}}function o(t){return{...t,frames:t&&t.frames&&t.frames.map((t=>i(t)))}}return{name:$a,processEvent(t){let e=t;if(t.exception&&Array.isArray(t.exception.values)){e=s(e)}return e}}}));function Ra({isBrowser:t,root:e,prefix:n}){return r=>{if(!r.filename){return r}const i=/^[a-zA-Z]:\\/.test(r.filename)||r.filename.includes("\\")&&!r.filename.includes("/");const s=/^\//.test(r.filename);if(t){if(e){const t=r.filename;if(t.indexOf(e)===0){r.filename=t.replace(e,n)}}}else{if(i||s){const t=i?r.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):r.filename;const s=e?Be(e,t):We(t);r.filename=`${n}${s}`}}return r}}const Na="SessionTiming";const Oa=()=>{const t=Wt()*1e3;return{name:Na,processEvent(e){const n=Wt()*1e3;return{...e,extra:{...e.extra,["session:start"]:t,["session:duration"]:n-t,["session:end"]:n}}}}};const Da=Go(Oa);const La=10;const Fa="ZodErrors";function Pa(t){return r(t)&&t.name==="ZodError"&&Array.isArray(t.errors)}function ja(t){return{...t,path:"path"in t&&Array.isArray(t.path)?t.path.join("."):undefined,keys:"keys"in t?JSON.stringify(t.keys):undefined,unionErrors:"unionErrors"in t?JSON.stringify(t.unionErrors):undefined}}function Ba(t){const e=new Set;for(const n of t.issues){if(n.path&&n.path[0]){e.add(n.path[0])}}const n=Array.from(e);return`Failed to validate keys: ${v(n.join(", "),100)}`}function za(t,e,n){if(!e.exception||!e.exception.values||!n||!n.originalException||!Pa(n.originalException)||n.originalException.issues.length===0){return e}return{...e,exception:{...e.exception,values:[{...e.exception.values[0],value:Ba(n.originalException)},...e.exception.values.slice(1)]},extra:{...e.extra,"zoderror.issues":n.originalException.errors.slice(0,t).map(ja)}}}const Ua=(t={})=>{const e=t.limit||La;return{name:Fa,processEvent(t,n){const r=za(e,t,n);return r}}};const qa=Go(Ua);const Ha=Go((t=>({name:"ThirdPartyErrorsFilter",setup(t){t.on("beforeEnvelope",(t=>{jn(t,((t,e)=>{if(e==="event"){const e=Array.isArray(t)?t[1]:undefined;if(e){na(e);t[1]=e}}}))}));t.on("applyFrameMetadata",(e=>{if(e.type){return}const n=t.getOptions().stackParser;ea(n,e)}))},processEvent(e){const n=Wa(e);if(n){const r=t.behaviour==="drop-error-if-contains-third-party-frames"||t.behaviour==="apply-tag-if-contains-third-party-frames"?"some":"every";const i=n[r]((e=>!e.some((e=>t.filterKeys.includes(e)))));if(i){const n=t.behaviour==="drop-error-if-contains-third-party-frames"||t.behaviour==="drop-error-if-exclusively-contains-third-party-frames";if(n){return null}else{e.tags={...e.tags,third_party_code:true}}}}return e}})));function Wa(t){const e=xt(t);if(!e){return undefined}return e.filter((t=>!!t.filename)).map((t=>{if(t.module_metadata){return Object.keys(t.module_metadata).filter((t=>t.startsWith(Ga))).map((t=>t.slice(Ga.length)))}return[]}))}const Ga="_sentryBundlerPluginAppKey:";const Ya="c";const Xa="g";const Ja="s";const Ka="d";const Va=5e3;const Za=1e4;const Qa=1e4;function tu(t,e){const n=R("globalMetricsAggregators",(()=>new WeakMap));const r=n.get(t);if(r){return r}const i=new e(t);t.on("flush",(()=>i.flush()));t.on("close",(()=>i.close()));n.set(t,i);return i}function eu(t,e,n,r,i={}){const s=i.client||ti();if(!s){return}const o=ji();const c=o?Pi(o):undefined;const a=c&&Ei(c).description;const{unit:u,tags:f,timestamp:l}=i;const{release:d,environment:h}=s.getOptions();const p={};if(d){p.release=d}if(h){p.environment=h}if(a){p.transaction=a}Tr&&G.log(`Adding value of ${r} to ${e} metric ${n}`);const m=tu(s,t);m.add(e,n,r,u,{...p,...f},l)}function nu(t,e,n=1,r){eu(t,Ya,e,au(n),r)}function ru(t,e,n,r){eu(t,Ka,e,au(n),r)}function iu(t,e,n,r="second",i){if(typeof n==="function"){const r=Wt();return Ss({op:"metrics.timing",name:e,startTime:r,onlyIfParent:true},(s=>Vi((()=>n()),(()=>{}),(()=>{const n=Wt();const o=n-r;ru(t,e,o,{...i,unit:"second"});s.end(n)}))))}ru(t,e,n,{...i,unit:r})}function su(t,e,n,r){eu(t,Ja,e,n,r)}function ou(t,e,n,r){eu(t,Xa,e,au(n),r)}const cu={increment:nu,distribution:ru,set:su,gauge:ou,timing:iu,getMetricsAggregatorForClient:tu};function au(t){return typeof t==="string"?parseInt(t):t}function uu(t){return!!t&&typeof t["_profiler"]!=="undefined"&&typeof t["_profiler"]["start"]==="function"&&typeof t["_profiler"]["stop"]==="function"}function fu(){const t=ti();if(!t){Tr&&G.warn("No Sentry client available, profiling is not started");return}const e=t.getIntegrationByName("ProfilingIntegration");if(!e){Tr&&G.warn("ProfilingIntegration is not available");return}if(!uu(e)){Tr&&G.warn("Profiler is not available on profiling integration.");return}e._profiler.start()}function lu(){const t=ti();if(!t){Tr&&G.warn("No Sentry client available, profiling is not started");return}const e=t.getIntegrationByName("ProfilingIntegration");if(!e){Tr&&G.warn("ProfilingIntegration is not available");return}if(!uu(e)){Tr&&G.warn("Profiler is not available on profiling integration.");return}e._profiler.stop()}const du={startProfiler:fu,stopProfiler:lu};function hu(t,e,n,r){const i=Object.entries(ft(r)).sort(((t,e)=>t[0].localeCompare(e[0])));return`${t}${e}${n}${i}`}function pu(t){let e=0;for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);e=(e<<5)-e+r;e&=e}return e>>>0}function mu(t){let e="";for(const n of t){const t=Object.entries(n.tags);const r=t.length>0?`|#${t.map((([t,e])=>`${t}:${e}`)).join(",")}`:"";e+=`${n.name}@${n.unit}:${n.metric}|${n.metricType}${r}|T${n.timestamp}\n`}return e}function gu(t){return t.replace(/[^\w]+/gi,"_")}function yu(t){return t.replace(/[^\w\-.]+/gi,"_")}function bu(t){return t.replace(/[^\w\-./]+/gi,"")}const vu=[["\n","\\n"],["\r","\\r"],["\t","\\t"],["\\","\\\\"],["|","\\u{7c}"],[",","\\u{2c}"]];function wu(t){for(const[e,n]of vu){if(t===e){return n}}return t}function _u(t){return[...t].reduce(((t,e)=>t+wu(e)),"")}function ku(t){const e={};for(const n in t){if(Object.prototype.hasOwnProperty.call(t,n)){const r=bu(n);e[r]=_u(String(t[n]))}}return e}function Su(t,e){G.log(`Flushing aggregated metrics, number of metrics: ${e.length}`);const n=t.getDsn();const r=t.getSdkMetadata();const i=t.getOptions().tunnel;const s=xu(e,n,r,i);t.sendEnvelope(s)}function xu(t,e,n,r){const i={sent_at:(new Date).toISOString()};if(n&&n.sdk){i.sdk={name:n.sdk.name,version:n.sdk.version}}if(!!r&&e){i.dsn=J(e)}const s=Cu(t);return Fn(i,[s])}function Cu(t){const e=mu(t);const n={type:"statsd",length:e.length};return[n,e]}class Tu{constructor(t){this._value=t}get weight(){return 1}add(t){this._value+=t}toString(){return`${this._value}`}}class Iu{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;if(t<this._min){this._min=t}if(t>this._max){this._max=t}this._sum+=t;this._count++}toString(){return`${this._last}:${this._min}:${this._max}:${this._sum}:${this._count}`}}class Eu{constructor(t){this._value=[t]}get weight(){return this._value.length}add(t){this._value.push(t)}toString(){return this._value.join(":")}}class Au{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"?pu(t):t)).join(":")}}const $u={[Ya]:Tu,[Xa]:Iu,[Ka]:Eu,[Ja]:Au};class Mu{constructor(t){this._client=t;this._buckets=new Map;this._bucketsTotalWeight=0;this._interval=setInterval((()=>this._flush()),Za);if(this._interval.unref){this._interval.unref()}this._flushShift=Math.floor(Math.random()*Za/1e3);this._forceFlush=false}add(t,e,n,r="none",i={},s=Wt()){const o=Math.floor(s);const c=yu(e);const a=ku(i);const u=gu(r);const f=hu(t,c,u,a);let l=this._buckets.get(f);const d=l&&t===Ja?l.metric.weight:0;if(l){l.metric.add(n);if(l.timestamp<o){l.timestamp=o}}else{l={metric:new $u[t](n),timestamp:o,metricType:t,name:c,unit:u,tags:a};this._buckets.set(f,l)}const h=typeof n==="string"?l.metric.weight-d:n;Bi(t,c,h,u,i,f);this._bucketsTotalWeight+=l.metric.weight;if(this._bucketsTotalWeight>=Qa){this.flush()}}flush(){this._forceFlush=true;this._flush()}close(){this._forceFlush=true;clearInterval(this._interval);this._flush()}_flush(){if(this._forceFlush){this._forceFlush=false;this._bucketsTotalWeight=0;this._captureMetrics(this._buckets);this._buckets.clear();return}const t=Math.floor(Wt())-Za/1e3-this._flushShift;const e=new Map;for(const[n,r]of this._buckets){if(r.timestamp<=t){e.set(n,r);this._bucketsTotalWeight-=r.metric.weight}}for(const[t]of e){this._buckets.delete(t)}this._captureMetrics(e)}_captureMetrics(t){if(t.size>0){const e=Array.from(t).map((([,t])=>t));Su(this._client,e)}}}function Ru(t,e=1,n){cu.increment(Mu,t,e,n)}function Nu(t,e,n){cu.distribution(Mu,t,e,n)}function Ou(t,e,n){cu.set(Mu,t,e,n)}function Du(t,e,n){cu.gauge(Mu,t,e,n)}function Lu(t,e,n="second",r){return cu.timing(Mu,t,e,n,r)}function Fu(t){return cu.getMetricsAggregatorForClient(t,Mu)}const Pu={increment:Ru,distribution:Nu,set:Ou,gauge:Du,timing:Lu,getMetricsAggregatorForClient:Fu};class ju{constructor(t){this._client=t;this._buckets=new Map;this._interval=setInterval((()=>this.flush()),Va)}add(t,e,n,r="none",i={},s=Wt()){const o=Math.floor(s);const c=yu(e);const a=ku(i);const u=gu(r);const f=hu(t,c,u,a);let l=this._buckets.get(f);const d=l&&t===Ja?l.metric.weight:0;if(l){l.metric.add(n);if(l.timestamp<o){l.timestamp=o}}else{l={metric:new $u[t](n),timestamp:o,metricType:t,name:c,unit:u,tags:a};this._buckets.set(f,l)}const h=typeof n==="string"?l.metric.weight-d:n;Bi(t,c,h,u,i,f)}flush(){if(this._buckets.size===0){return}const t=Array.from(this._buckets.values());Su(this._client,t);this._buckets.clear()}close(){clearInterval(this._interval);this.flush()}}function Bu(t,e,n,r,i="auto.http.browser"){if(!t.fetchData){return undefined}const s=Ji()&&e(t.fetchData.url);if(t.endTimestamp&&s){const e=t.fetchData.__span;if(!e)return;const n=r[e];if(n){qu(n,t);delete r[e]}return undefined}const o=Jr();const c=ti();const{method:a,url:u}=t.fetchData;const f=Uu(u);const l=f?Ze(f).host:undefined;const d=!!ji();const h=s&&d?xs({name:`${a} ${u}`,attributes:{url:u,type:"fetch","http.method":a,"http.url":f,"server.address":l,[ci]:i,[oi]:"http.client"}}):new Ki;t.fetchData.__span=h.spanContext().spanId;r[h.spanContext().spanId]=h;if(n(t.fetchData.url)&&c){const e=t.args[0];t.args[1]=t.args[1]||{};const n=t.args[1];n.headers=zu(e,c,o,n,Ji()&&d?h:undefined)}return h}function zu(t,e,n,r,i){const s=Kr();const{traceId:o,spanId:c,sampled:a,dsc:u}={...s.getPropagationContext(),...n.getPropagationContext()};const f=i?Ci(i):Ln(o,c,a);const l=An(u||(i?rs(i):ns(o,e)));const d=r.headers||(typeof Request!=="undefined"&&y(t,Request)?t.headers:undefined);if(!d){return{"sentry-trace":f,baggage:l}}else if(typeof Headers!=="undefined"&&y(d,Headers)){const t=new Headers(d);t.append("sentry-trace",f);if(l){t.append(xn,l)}return t}else if(Array.isArray(d)){const t=[...d,["sentry-trace",f]];if(l){t.push([xn,l])}return t}else{const t="baggage"in d?d.baggage:undefined;const e=[];if(Array.isArray(t)){e.push(...t)}else if(t){e.push(t)}if(l){e.push(l)}return{...d,"sentry-trace":f,baggage:e.length>0?e.join(","):undefined}}}function Uu(t){try{const e=new URL(t);return e.href}catch(t){return undefined}}function qu(t,e){if(e.response){wi(t,e.response.status);const n=e.response&&e.response.headers&&e.response.headers.get("content-length");if(n){const e=parseInt(n);if(e>0){t.setAttribute("http.response_content_length",e)}}}else if(e.error){t.setStatus({code:bi,message:"internal_error"})}t.end()}const Hu={mechanism:{handled:false,data:{function:"trpcMiddleware"}}};function Wu(t={}){return function(e){const{path:n,type:r,next:i,rawInput:s}=e;const o=ti();const c=o&&o.getOptions();const a={procedure_type:r};if(t.attachRpcInput!==undefined?t.attachRpcInput:c&&c.sendDefaultPii){a.input=Ie(s)}po("trpc",a);function u(t){if(typeof t==="object"&&t!==null&&"ok"in t&&!t.ok&&"error"in t){fo(t.error,Hu)}}return Ss({name:`trpc/${n}`,op:"rpc.server",attributes:{[ii]:"route",[ci]:"auto.rpc.trpc"}},(t=>{let e;try{e=i()}catch(e){fo(e,Hu);t.end();throw e}if(m(e)){return e.then((e=>{u(e);t.end();return e}),(e=>{fo(e,Hu);t.end();throw e}))}else{u(e);t.end();return e}}))}}function Gu(t,e={},n=Jr()){const{message:r,name:i,email:s,url:o,source:c,associatedEventId:a,tags:u}=t;const f={contexts:{feedback:ft({contact_email:s,name:i,message:r,url:o,source:c,associated_event_id:a})},type:"feedback",level:"info",tags:u};const l=n&&n.getClient()||ti();if(l){l.emit("beforeSendFeedback",f,e)}const d=n.captureEvent(f,e);return d}function Yu(){return{bindClient(t){const e=Jr();e.setClient(t)},withScope:Zr,getClient:()=>ti(),getScope:Jr,getIsolationScope:Kr,captureException:(t,e)=>Jr().captureException(t,e),captureMessage:(t,e,n)=>Jr().captureMessage(t,e,n),captureEvent:ho,addBreadcrumb:Cc,setUser:vo,setTags:yo,setTag:bo,setExtra:go,setExtras:mo,setContext:po,getIntegration(t){const e=ti();return e&&e.getIntegrationByName(t.id)||null},startSession:Eo,endSession:Ao,captureSession(t){if(t){return Ao()}Ju()}}}const Xu=Yu;function Ju(){const t=Jr();const e=ti();const n=t.getSession();if(e&&n){e.captureSession(n)}}const Ku=M;let Vu=0;function Zu(){return Vu>0}function Qu(){Vu++;setTimeout((()=>{Vu--}))}function tf(t,e={},n){if(typeof t!=="function"){return t}try{const e=t.__sentry_wrapped__;if(e){return e}if(it(t)){return t}}catch(e){return t}const r=function(){const r=Array.prototype.slice.call(arguments);try{if(n&&typeof n==="function"){n.apply(this,arguments)}const i=r.map((t=>tf(t,e)));return t.apply(this,i)}catch(t){Qu();Zr((n=>{n.addEventProcessor((t=>{if(e.mechanism){ve(t,undefined,undefined);we(t,e.mechanism)}t.extra={...t.extra,arguments:r};return t}));fo(t)}));throw t}};try{for(const e in t){if(Object.prototype.hasOwnProperty.call(t,e)){r[e]=t[e]}}}catch(t){}rt(r,t);nt(t,"__sentry_wrapped__",r);try{const e=Object.getOwnPropertyDescriptor(r,"name");if(e.configurable){Object.defineProperty(r,"name",{get(){return t.name}})}}catch(t){}return r}const ef=typeof __SENTRY_DEBUG__==="undefined"||__SENTRY_DEBUG__;function nf(t,e){const n=of(t,e);const r={type:e&&e.name,value:ff(e)};if(n.length){r.stacktrace={frames:n}}if(r.type===undefined&&r.value===""){r.value="Unrecoverable error caught"}return r}function rf(t,e,n,r){const i=ti();const s=i&&i.getOptions().normalizeDepth;const o=yf(e);const c={__serialized__:Ee(e,s)};if(o){return{exception:{values:[nf(t,o)]},extra:c}}const a={exception:{values:[{type:d(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:mf(e,{isUnhandledRejection:r})}]},extra:c};if(n){const e=of(t,n);if(e.length){a.exception.values[0].stacktrace={frames:e}}}return a}function sf(t,e){return{exception:{values:[nf(t,e)]}}}function of(t,e){const n=e.stacktrace||e.stack||"";const r=af(e);const i=uf(e);try{return t(n,r,i)}catch(t){}return[]}const cf=/Minified React error #\d+;/i;function af(t){if(t&&cf.test(t.message)){return 1}return 0}function uf(t){if(typeof t.framesToPop==="number"){return t.framesToPop}return 0}function ff(t){const e=t&&t.message;if(!e){return"No error message"}if(e.error&&typeof e.error.message==="string"){return e.error.message}return e}function lf(t,e,n,r){const i=n&&n.syntheticException||undefined;const s=hf(t,e,i,r);we(s);s.level="error";if(n&&n.event_id){s.event_id=n.event_id}return Ye(s)}function df(t,e,n="info",r,i){const s=r&&r.syntheticException||undefined;const o=pf(t,e,s,i);o.level=n;if(r&&r.event_id){o.event_id=r.event_id}return Ye(o)}function hf(t,e,n,i,a){let u;if(s(e)&&e.error){const n=e;return sf(t,n.error)}if(o(e)||c(e)){const r=e;if("stack"in e){u=sf(t,e)}else{const e=r.name||(o(r)?"DOMError":"DOMException");const s=r.message?`${e}: ${r.message}`:e;u=pf(t,s,n,i);ve(u,s)}if("code"in r){u.tags={...u.tags,"DOMException.code":`${r.code}`}}return u}if(r(e)){return sf(t,e)}if(l(e)||d(e)){const r=e;u=rf(t,r,n,a);we(u,{synthetic:true});return u}u=pf(t,e,n,i);ve(u,`${e}`,undefined);we(u,{synthetic:true});return u}function pf(t,e,n,r){const i={};if(r&&n){const r=of(t,n);if(r.length){i.exception={values:[{value:e,stacktrace:{frames:r}}]}}}if(u(e)){const{__sentry_template_string__:t,__sentry_template_values__:n}=e;i.logentry={message:t,params:n};return i}i.message=e;return i}function mf(t,{isUnhandledRejection:e}){const n=ut(t);const r=e?"promise rejection":"exception";if(s(t)){return`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``}if(d(t)){const e=gf(t);return`Event \`${e}\` (type=${t.type}) captured as ${r}`}return`Object captured as ${r} with keys: ${n}`}function gf(t){try{const e=Object.getPrototypeOf(t);return e?e.constructor.name:undefined}catch(t){}}function yf(t){for(const e in t){if(Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];if(n instanceof Error){return n}}}return undefined}function bf(t,{metadata:e,tunnel:n,dsn:r}){const i={event_id:t.event_id,sent_at:(new Date).toISOString(),...e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}},...!!n&&!!r&&{dsn:J(r)}};const s=vf(t);return Fn(i,[s])}function vf(t){const e={type:"user_report"};return[e,t]}class wf extends Xo{constructor(t){const e={parentSpanIsAlwaysRootSpan:true,...t};const n=Ku.SENTRY_SDK_SOURCE||ue();wc(e,"browser",["browser"],n);super(e);if(e.sendClientReports&&Ku.document){Ku.document.addEventListener("visibilitychange",(()=>{if(Ku.document.visibilityState==="hidden"){this._flushOutcomes()}}))}}eventFromException(t,e){return lf(this._options.stackParser,t,e,this._options.attachStacktrace)}eventFromMessage(t,e="info",n){return df(this._options.stackParser,t,e,n,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){ef&&G.warn("SDK not enabled, will not capture user feedback.");return}const e=bf(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(e)}_prepareEvent(t,e,n){t.platform=t.platform||"javascript";return super._prepareEvent(t,e,n)}}const _f=typeof __SENTRY_DEBUG__==="undefined"||__SENTRY_DEBUG__;const kf=(t,e)=>{if(t>e[1]){return"poor"}if(t>e[0]){return"needs-improvement"}return"good"};const Sf=(t,e,n,r)=>{let i;let s;return o=>{if(e.value>=0){if(o||r){s=e.value-(i||0);if(s||i===undefined){i=e.value;e.delta=s;e.rating=kf(e.value,n);t(e)}}}}};const xf=M;const Cf=()=>`v3-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`;const Tf=()=>xf.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];const If=()=>{const t=Tf();return t&&t.activationStart||0};const Ef=(t,e)=>{const n=Tf();let r="navigate";if(n){if(xf.document&&xf.document.prerendering||If()>0){r="prerender"}else if(xf.document&&xf.document.wasDiscarded){r="restore"}else if(n.type){r=n.type.replace(/_/g,"-")}}const i=[];return{name:t,value:typeof e==="undefined"?-1:e,rating:"good",delta:0,entries:i,id:Cf(),navigationType:r}};const Af=(t,e,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const r=new PerformanceObserver((t=>{Promise.resolve().then((()=>{e(t.getEntries())}))}));r.observe(Object.assign({type:t,buffered:true},n||{}));return r}}catch(t){}return};const $f=t=>{const e=e=>{if(e.type==="pagehide"||xf.document&&xf.document.visibilityState==="hidden"){t(e)}};if(xf.document){addEventListener("visibilitychange",e,true);addEventListener("pagehide",e,true)}};const Mf=t=>{let e=false;return n=>{if(!e){t(n);e=true}}};let Rf=-1;const Nf=()=>{Rf=xf.document.visibilityState==="hidden"&&!xf.document.prerendering?0:Infinity};const Of=t=>{if(xf.document.visibilityState==="hidden"&&Rf>-1){Rf=t.type==="visibilitychange"?t.timeStamp:0;removeEventListener("visibilitychange",Of,true);removeEventListener("prerenderingchange",Of,true)}};const Df=()=>{addEventListener("visibilitychange",Of,true);addEventListener("prerenderingchange",Of,true)};const Lf=()=>{if(xf.document&&Rf<0){Nf();Df()}return{get firstHiddenTime(){return Rf}}};const Ff=t=>{if(xf.document&&xf.document.prerendering){addEventListener("prerenderingchange",(()=>t()),true)}else{t()}};const Pf=[1800,3e3];const jf=(t,e={})=>{Ff((()=>{const n=Lf();const r=Ef("FCP");let i;const s=t=>{t.forEach((t=>{if(t.name==="first-contentful-paint"){o.disconnect();if(t.startTime<n.firstHiddenTime){r.value=Math.max(t.startTime-If(),0);r.entries.push(t);i(true)}}}))};const o=Af("paint",s);if(o){i=Sf(t,r,Pf,e.reportAllChanges)}}))};const Bf=[.1,.25];const zf=(t,e={})=>{jf(Mf((()=>{const n=Ef("CLS",0);let r;let i=0;let s=[];const o=t=>{t.forEach((t=>{if(!t.hadRecentInput){const e=s[0];const n=s[s.length-1];if(i&&e&&n&&t.startTime-n.startTime<1e3&&t.startTime-e.startTime<5e3){i+=t.value;s.push(t)}else{i=t.value;s=[t]}}}));if(i>n.value){n.value=i;n.entries=s;r()}};const c=Af("layout-shift",o);if(c){r=Sf(t,n,Bf,e.reportAllChanges);$f((()=>{o(c.takeRecords());r(true)}));setTimeout(r,0)}})))};const Uf=[100,300];const qf=(t,e={})=>{Ff((()=>{const n=Lf();const r=Ef("FID");let i;const s=t=>{if(t.startTime<n.firstHiddenTime){r.value=t.processingStart-t.startTime;r.entries.push(t);i(true)}};const o=t=>{t.forEach(s)};const c=Af("first-input",o);i=Sf(t,r,Uf,e.reportAllChanges);if(c){$f(Mf((()=>{o(c.takeRecords());c.disconnect()})))}}))};let Hf=0;let Wf=Infinity;let Gf=0;const Yf=t=>{t.forEach((t=>{if(t.interactionId){Wf=Math.min(Wf,t.interactionId);Gf=Math.max(Gf,t.interactionId);Hf=Gf?(Gf-Wf)/7+1:0}}))};let Xf;const Jf=()=>Xf?Hf:performance.interactionCount||0;const Kf=()=>{if("interactionCount"in performance||Xf)return;Xf=Af("event",Yf,{type:"event",buffered:true,durationThreshold:0})};const Vf=[200,500];const Zf=0;const Qf=()=>Jf()-Zf;const tl=10;const el=[];const nl={};const rl=t=>{const e=el[el.length-1];const n=nl[t.interactionId];if(n||el.length<tl||e&&t.duration>e.latency){if(n){n.entries.push(t);n.latency=Math.max(n.latency,t.duration)}else{const e={id:t.interactionId,latency:t.duration,entries:[t]};nl[e.id]=e;el.push(e)}el.sort(((t,e)=>e.latency-t.latency));el.splice(tl).forEach((t=>{delete nl[t.id]}))}};const il=()=>{const t=Math.min(el.length-1,Math.floor(Qf()/50));return el[t]};const sl=(t,e={})=>{Ff((()=>{Kf();const n=Ef("INP");let r;const i=t=>{t.forEach((t=>{if(t.interactionId){rl(t)}if(t.entryType==="first-input"){const e=!el.some((e=>e.entries.some((e=>t.duration===e.duration&&t.startTime===e.startTime))));if(e){rl(t)}}}));const e=il();if(e&&e.latency!==n.value){n.value=e.latency;n.entries=e.entries;r()}};const s=Af("event",i,{durationThreshold:e.durationThreshold!=null?e.durationThreshold:40});r=Sf(t,n,Vf,e.reportAllChanges);if(s){if("PerformanceEventTiming"in xf&&"interactionId"in PerformanceEventTiming.prototype){s.observe({type:"first-input",buffered:true})}$f((()=>{i(s.takeRecords());if(n.value<0&&Qf()>0){n.value=0;n.entries=[]}r(true)}))}}))};const ol=[2500,4e3];const cl={};const al=(t,e={})=>{Ff((()=>{const n=Lf();const r=Ef("LCP");let i;const s=t=>{const e=t[t.length-1];if(e){if(e.startTime<n.firstHiddenTime){r.value=Math.max(e.startTime-If(),0);r.entries=[e];i()}}};const o=Af("largest-contentful-paint",s);if(o){i=Sf(t,r,ol,e.reportAllChanges);const n=Mf((()=>{if(!cl[r.id]){s(o.takeRecords());o.disconnect();cl[r.id]=true;i(true)}}));["keydown","click"].forEach((t=>{if(xf.document){addEventListener(t,(()=>setTimeout(n,0)),true)}}));$f(n)}}))};const ul=[800,1800];const fl=t=>{if(xf.document&&xf.document.prerendering){Ff((()=>fl(t)))}else if(xf.document&&xf.document.readyState!=="complete"){addEventListener("load",(()=>fl(t)),true)}else{setTimeout(t,0)}};const ll=(t,e={})=>{const n=Ef("TTFB");const r=Sf(t,n,ul,e.reportAllChanges);fl((()=>{const t=Tf();if(t){const e=t.responseStart;if(e<=0||e>performance.now())return;n.value=Math.max(e-If(),0);n.entries=[t];r(true)}}))};const dl={};const hl={};let pl;let ml;let gl;let yl;let bl;function vl(t,e=false){return Ml("cls",t,Tl,pl,e)}function wl(t,e=false){return Ml("lcp",t,El,gl,e)}function _l(t){return Ml("fid",t,Il,ml)}function kl(t){return Ml("ttfb",t,Al,yl)}function Sl(t){return Ml("inp",t,$l,bl)}function xl(t,e){Nl(t,e);if(!hl[t]){Rl(t);hl[t]=true}return Ol(t,e)}function Cl(t,e){const n=dl[t];if(!n||!n.length){return}for(const r of n){try{r(e)}catch(e){_f&&G.error(`Error while triggering instrumentation handler.\nType: ${t}\nName: ${St(r)}\nError:`,e)}}}function Tl(){return zf((t=>{Cl("cls",{metric:t});pl=t}),{reportAllChanges:true})}function Il(){return qf((t=>{Cl("fid",{metric:t});ml=t}))}function El(){return al((t=>{Cl("lcp",{metric:t});gl=t}),{reportAllChanges:true})}function Al(){return ll((t=>{Cl("ttfb",{metric:t});yl=t}))}function $l(){return sl((t=>{Cl("inp",{metric:t});bl=t}))}function Ml(t,e,n,r,i=false){Nl(t,e);let s;if(!hl[t]){s=n();hl[t]=true}if(r){e({metric:r})}return Ol(t,e,i?s:undefined)}function Rl(t){const e={};if(t==="event"){e.durationThreshold=0}Af(t,(e=>{Cl(t,{entries:e})}),e)}function Nl(t,e){dl[t]=dl[t]||[];dl[t].push(e)}function Ol(t,e,n){return()=>{if(n){n()}const r=dl[t];if(!r){return}const i=r.indexOf(e);if(i!==-1){r.splice(i,1)}}}function Dl(t){return"duration"in t}function Ll(t){return typeof t==="number"&&isFinite(t)}function Fl(t,e,n,{...r}){const i=Ei(t).start_timestamp;if(i&&i>e){if(typeof t.updateStartTime==="function"){t.updateStartTime(e)}}return Ts(t,(()=>{const t=xs({startTime:e,...r});if(t){t.end(n)}return t}))}function Pl(t){const e=ti();if(!e){return}const{name:n,transaction:r,attributes:i,startTime:s}=t;const{release:o,environment:c}=e.getOptions();const a=e.getIntegrationByName("Replay");const u=a&&a.getReplayId();const f=Jr();const l=f.getUser();const d=l!==undefined?l.email||l.id||l.ip_address:undefined;let h=undefined;try{h=f.getScopeData().contexts.profile.profile_id}catch(t){}const p={release:o,environment:c,user:d||undefined,profile_id:h||undefined,replay_id:u||undefined,transaction:r,"user_agent.original":xf.navigator&&xf.navigator.userAgent,...i};return xs({name:n,attributes:p,startTime:s,experimental:{standalone:true}})}function jl(){return xf&&xf.addEventListener&&xf.performance}function Bl(t){return t/1e3}function zl(){let t=0;let e;let n;if(!ql()){return}let r=false;function i(){if(r){return}r=true;if(n){Ul(t,e,n)}s()}const s=vl((({metric:n})=>{const r=n.entries[n.entries.length-1];if(!r){return}t=n.value;e=r}),true);$f((()=>{i()}));setTimeout((()=>{const t=ti();const e=wr([t,"optionalAccess",t=>t.on,"call",t=>t("startNavigationSpan",(()=>{i();e&&e()}))]);const r=ji();const s=r&&Pi(r);const o=s&&Ei(s);if(o&&o.op==="pageload"){n=s.spanContext().spanId}}),0)}function Ul(t,e,n){_f&&G.log(`Sending CLS span (${t})`);const r=Bl(Yt)+(wr([e,"optionalAccess",t=>t.startTime])||0);const i=Bl(wr([e,"optionalAccess",t=>t.duration])||0);const s=Jr().getScopeData().transactionName;const o=e?D(wr([e,"access",t=>t.sources,"access",t=>t[0],"optionalAccess",t=>t.node])):"Layout shift";const c=ft({[ci]:"auto.http.browser.cls",[oi]:"ui.webvital.cls",[di]:wr([e,"optionalAccess",t=>t.duration])||0,"sentry.pageload.span_id":n});const a=Pl({name:o,transaction:s,attributes:c,startTime:r});wr([a,"optionalAccess",t=>t.addEvent,"call",e=>e("cls",{[ui]:"",[fi]:t})]);wr([a,"optionalAccess",t=>t.end,"call",t=>t(r+i)])}function ql(){try{return wr([PerformanceObserver,"access",t=>t.supportedEntryTypes,"optionalAccess",t=>t.includes,"call",t=>t("layout-shift")])}catch(t){return false}}const Hl=2147483647;let Wl=0;let Gl={};let Yl;let Xl;function Jl({recordClsStandaloneSpans:t}){const e=jl();if(e&&Yt){if(e.mark){xf.performance.mark("sentry-tracing-init")}const n=ed();const r=td();const i=nd();const s=t?zl():Ql();return()=>{n();r();i();s&&s()}}return()=>undefined}function Kl(){xl("longtask",(({entries:t})=>{if(!ji()){return}for(const e of t){const t=Bl(Yt+e.startTime);const n=Bl(e.duration);const r=xs({name:"Main UI thread blocked",op:"ui.long-task",startTime:t,attributes:{[ci]:"auto.ui.browser.metrics"}});if(r){r.end(t+n)}}}))}function Vl(){const t=new PerformanceObserver((t=>{if(!ji()){return}for(const e of t.getEntries()){if(!e.scripts[0]){continue}const t=Bl(Yt+e.startTime);const n=Bl(e.duration);const r={[ci]:"auto.ui.browser.metrics"};const i=e.scripts[0];const{invoker:s,invokerType:o,sourceURL:c,sourceFunctionName:a,sourceCharPosition:u}=i;r["browser.script.invoker"]=s;r["browser.script.invoker_type"]=o;if(c){r["code.filepath"]=c}if(a){r["code.function"]=a}if(u!==-1){r["browser.script.source_char_position"]=u}const f=xs({name:"Main UI thread blocked",op:"ui.long-animation-frame",startTime:t,attributes:r});if(f){f.end(t+n)}}}));t.observe({type:"long-animation-frame",buffered:true})}function Zl(){xl("event",(({entries:t})=>{if(!ji()){return}for(const e of t){if(e.name==="click"){const t=Bl(Yt+e.startTime);const n=Bl(e.duration);const r={name:D(e.target),op:`ui.interaction.${e.name}`,startTime:t,attributes:{[ci]:"auto.ui.browser.metrics"}};const i=j(e.target);if(i){r.attributes["ui.component_name"]=i}const s=xs(r);if(s){s.end(t+n)}}}}))}function Ql(){return vl((({metric:t})=>{const e=t.entries[t.entries.length-1];if(!e){return}_f&&G.log(`[Measurements] Adding CLS ${t.value}`);Gl["cls"]={value:t.value,unit:""};Xl=e}),true)}function td(){return wl((({metric:t})=>{const e=t.entries[t.entries.length-1];if(!e){return}_f&&G.log("[Measurements] Adding LCP");Gl["lcp"]={value:t.value,unit:"millisecond"};Yl=e}),true)}function ed(){return _l((({metric:t})=>{const e=t.entries[t.entries.length-1];if(!e){return}const n=Bl(Yt);const r=Bl(e.startTime);_f&&G.log("[Measurements] Adding FID");Gl["fid"]={value:t.value,unit:"millisecond"};Gl["mark.fid"]={value:n+r,unit:"second"}}))}function nd(){return kl((({metric:t})=>{const e=t.entries[t.entries.length-1];if(!e){return}_f&&G.log("[Measurements] Adding TTFB");Gl["ttfb"]={value:t.value,unit:"millisecond"}}))}function rd(t,e){const n=jl();if(!n||!xf.performance.getEntries||!Yt){return}_f&&G.log("[Tracing] Adding & adjusting spans using Performance API");const r=Bl(Yt);const i=n.getEntries();const{op:s,start_timestamp:o}=Ei(t);i.slice(Wl).forEach((e=>{const n=Bl(e.startTime);const i=Bl(Math.max(0,e.duration));if(s==="navigation"&&o&&r+n<o){return}switch(e.entryType){case"navigation":{sd(t,e,r);break}case"mark":case"paint":case"measure":{id(t,e,n,i,r);const s=Lf();const o=e.startTime<s.firstHiddenTime;if(e.name==="first-paint"&&o){_f&&G.log("[Measurements] Adding FP");Gl["fp"]={value:e.startTime,unit:"millisecond"}}if(e.name==="first-contentful-paint"&&o){_f&&G.log("[Measurements] Adding FCP");Gl["fcp"]={value:e.startTime,unit:"millisecond"}}break}case"resource":{ad(t,e,e.name,n,i,r);break}}}));Wl=Math.max(i.length-1,0);ud(t);if(s==="pageload"){dd(Gl);const n=Gl["mark.fid"];if(n&&Gl["fid"]){Fl(t,n.value,n.value+Bl(Gl["fid"].value),{name:"first input delay",op:"ui.action",attributes:{[ci]:"auto.ui.browser.metrics"}});delete Gl["mark.fid"]}if(!("fcp"in Gl)||!e.recordClsOnPageloadSpan){delete Gl.cls}Object.entries(Gl).forEach((([t,e])=>{hs(t,e.value,e.unit)}));t.setAttribute("performance.timeOrigin",r);fd(t)}Yl=undefined;Xl=undefined;Gl={}}function id(t,e,n,r,i){const s=Tf();const o=Bl(s?s.requestStart:0);const c=i+Math.max(n,o);const a=i+n;const u=a+r;const f={[ci]:"auto.resource.browser.metrics"};if(c!==a){f["sentry.browser.measure_happened_before_request"]=true;f["sentry.browser.measure_start_time"]=c}Fl(t,c,u,{name:e.name,op:e.entryType,attributes:f});return c}function sd(t,e,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach((r=>{od(t,e,r,n)}));od(t,e,"secureConnection",n,"TLS/SSL","connectEnd");od(t,e,"fetch",n,"cache","domainLookupStart");od(t,e,"domainLookup",n,"DNS");cd(t,e,n)}function od(t,e,n,r,i,s){const o=s?e[s]:e[`${n}End`];const c=e[`${n}Start`];if(!c||!o){return}Fl(t,r+Bl(c),r+Bl(o),{op:"browser",name:i||n,attributes:{[ci]:"auto.ui.browser.metrics"}})}function cd(t,e,n){const r=n+Bl(e.requestStart);const i=n+Bl(e.responseEnd);const s=n+Bl(e.responseStart);if(e.responseEnd){Fl(t,r,i,{op:"browser",name:"request",attributes:{[ci]:"auto.ui.browser.metrics"}});Fl(t,s,i,{op:"browser",name:"response",attributes:{[ci]:"auto.ui.browser.metrics"}})}}function ad(t,e,n,r,i,s){if(e.initiatorType==="xmlhttprequest"||e.initiatorType==="fetch"){return}const o=Ze(n);const c={[ci]:"auto.resource.browser.metrics"};ld(c,e,"transferSize","http.response_transfer_size");ld(c,e,"encodedBodySize","http.response_content_length");ld(c,e,"decodedBodySize","http.decoded_response_content_length");if("renderBlockingStatus"in e){c["resource.render_blocking_status"]=e.renderBlockingStatus}if(o.protocol){c["url.scheme"]=o.protocol.split(":").pop()}if(o.host){c["server.address"]=o.host}c["url.same_origin"]=n.includes(xf.location.origin);const a=s+r;const u=a+i;Fl(t,a,u,{name:n.replace(xf.location.origin,""),op:e.initiatorType?`resource.${e.initiatorType}`:"resource.other",attributes:c})}function ud(t){const e=xf.navigator;if(!e){return}const n=e.connection;if(n){if(n.effectiveType){t.setAttribute("effectiveConnectionType",n.effectiveType)}if(n.type){t.setAttribute("connectionType",n.type)}if(Ll(n.rtt)){Gl["connection.rtt"]={value:n.rtt,unit:"millisecond"}}}if(Ll(e.deviceMemory)){t.setAttribute("deviceMemory",`${e.deviceMemory} GB`)}if(Ll(e.hardwareConcurrency)){t.setAttribute("hardwareConcurrency",String(e.hardwareConcurrency))}}function fd(t){if(Yl){_f&&G.log("[Measurements] Adding LCP Data");if(Yl.element){t.setAttribute("lcp.element",D(Yl.element))}if(Yl.id){t.setAttribute("lcp.id",Yl.id)}if(Yl.url){t.setAttribute("lcp.url",Yl.url.trim().slice(0,200))}t.setAttribute("lcp.size",Yl.size)}if(Xl&&Xl.sources){_f&&G.log("[Measurements] Adding CLS Data");Xl.sources.forEach(((e,n)=>t.setAttribute(`cls.source.${n+1}`,D(e.node))))}}function ld(t,e,n,r){const i=e[n];if(i!=null&&i<Hl){t[r]=i}}function dd(t){const e=Tf();if(!e){return}const{responseStart:n,requestStart:r}=e;if(r<=n){_f&&G.log("[Measurements] Adding TTFB Request Time");t["ttfb.requestTime"]={value:n-r,unit:"millisecond"}}}const hd=1e3;let pd;let md;let gd;function yd(t){const e="dom";It(e,t);At(e,bd)}function bd(){if(!xf.document){return}const t=$t.bind(null,"dom");const e=_d(t,true);xf.document.addEventListener("click",e,false);xf.document.addEventListener("keypress",e,false);["EventTarget","Node"].forEach((e=>{const n=xf[e]&&xf[e].prototype;if(!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")){return}et(n,"addEventListener",(function(e){return function(n,r,i){if(n==="click"||n=="keypress"){try{const r=this;const s=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{};const o=s[n]=s[n]||{refCount:0};if(!o.handler){const r=_d(t);o.handler=r;e.call(this,n,r,i)}o.refCount++}catch(t){}}return e.call(this,n,r,i)}}));et(n,"removeEventListener",(function(t){return function(e,n,r){if(e==="click"||e=="keypress"){try{const n=this;const i=n.__sentry_instrumentation_handlers__||{};const s=i[e];if(s){s.refCount--;if(s.refCount<=0){t.call(this,e,s.handler,r);s.handler=undefined;delete i[e]}if(Object.keys(i).length===0){delete n.__sentry_instrumentation_handlers__}}}catch(t){}}return t.call(this,e,n,r)}}))}))}function vd(t){if(t.type!==md){return false}try{if(!t.target||t.target._sentryId!==gd){return false}}catch(t){}return true}function wd(t,e){if(t!=="keypress"){return false}if(!e||!e.tagName){return true}if(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable){return false}return true}function _d(t,e=false){return n=>{if(!n||n["_sentryCaptured"]){return}const r=kd(n);if(wd(n.type,r)){return}nt(n,"_sentryCaptured",true);if(r&&!r._sentryId){nt(r,"_sentryId",ge())}const i=n.type==="keypress"?"input":n.type;if(!vd(n)){const s={event:n,name:i,global:e};t(s);md=n.type;gd=r?r._sentryId:undefined}clearTimeout(pd);pd=xf.setTimeout((()=>{gd=undefined;md=undefined}),hd)}}function kd(t){try{return t.target}catch(t){return null}}let Sd;function xd(t){const e="history";It(e,t);At(e,Cd)}function Cd(){if(!Cr()){return}const t=xf.onpopstate;xf.onpopstate=function(...e){const n=xf.location.href;const r=Sd;Sd=n;const i={from:r,to:n};$t("history",i);if(t){try{return t.apply(this,e)}catch(t){}}};function e(t){return function(...e){const n=e.length>2?e[2]:undefined;if(n){const t=Sd;const e=String(n);Sd=e;const r={from:t,to:e};$t("history",r)}return t.apply(this,e)}}et(xf.history,"pushState",e);et(xf.history,"replaceState",e)}const Td={};function Id(t){const e=Td[t];if(e){return e}let n=xf[t];if(Pt(n)){return Td[t]=n.bind(xf)}const r=xf.document;if(r&&typeof r.createElement==="function"){try{const e=r.createElement("iframe");e.hidden=true;r.head.appendChild(e);const i=e.contentWindow;if(i&&i[t]){n=i[t]}r.head.removeChild(e)}catch(e){_f&&G.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `,e)}}if(!n){return n}return Td[t]=n.bind(xf)}function Ed(t){Td[t]=undefined}function Ad(...t){return Id("fetch")(...t)}function $d(...t){return Id("setTimeout")(...t)}const Md="__sentry_xhr_v3__";function Rd(t){const e="xhr";It(e,t);At(e,Nd)}function Nd(){if(!xf.XMLHttpRequest){return}const t=XMLHttpRequest.prototype;t.open=new Proxy(t.open,{apply(t,e,n){const r=Wt()*1e3;const i=a(n[0])?n[0].toUpperCase():undefined;const s=Od(n[1]);if(!i||!s){return t.apply(e,n)}e[Md]={method:i,url:s,request_headers:{}};if(i==="POST"&&s.match(/sentry_key/)){e.__sentry_own_request__=true}const o=()=>{const t=e[Md];if(!t){return}if(e.readyState===4){try{t.status_code=e.status}catch(t){}const n={endTimestamp:Wt()*1e3,startTimestamp:r,xhr:e};$t("xhr",n)}};if("onreadystatechange"in e&&typeof e.onreadystatechange==="function"){e.onreadystatechange=new Proxy(e.onreadystatechange,{apply(t,e,n){o();return t.apply(e,n)}})}else{e.addEventListener("readystatechange",o)}e.setRequestHeader=new Proxy(e.setRequestHeader,{apply(t,e,n){const[r,i]=n;const s=e[Md];if(s&&a(r)&&a(i)){s.request_headers[r.toLowerCase()]=i}return t.apply(e,n)}});return t.apply(e,n)}});t.send=new Proxy(t.send,{apply(t,e,n){const r=e[Md];if(!r){return t.apply(e,n)}if(n[0]!==undefined){r.body=n[0]}const i={startTimestamp:Wt()*1e3,xhr:e};$t("xhr",i);return t.apply(e,n)}})}function Od(t){if(a(t)){return t}try{return t.toString()}catch(t){}return undefined}const Dd=[];const Ld=new Map;function Fd(){const t=jl();if(t&&Yt){const t=jd();return()=>{t()}}return()=>undefined}const Pd={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 jd(){return Sl((({metric:t})=>{if(t.value==undefined){return}const e=t.entries.find((e=>e.duration===t.value&&Pd[e.name]));if(!e){return}const{interactionId:n}=e;const r=Pd[e.name];const i=Bl(Yt+e.startTime);const s=Bl(t.value);const o=ji();const c=o?Pi(o):undefined;const a=n!=null?Ld.get(n):undefined;const u=a||c;const f=u?Ei(u).description:Jr().getScopeData().transactionName;const l=D(e.target);const d=ft({[ci]:"auto.http.browser.inp",[oi]:`ui.interaction.${r}`,[di]:e.duration});const h=Pl({name:l,transaction:f,attributes:d,startTime:i});wr([h,"optionalAccess",t=>t.addEvent,"call",e=>e("inp",{[ui]:"millisecond",[fi]:t.value})]);wr([h,"optionalAccess",t=>t.end,"call",t=>t(i+s)])}))}function Bd(t){const e=({entries:t})=>{const e=ji();const n=e&&Pi(e);t.forEach((t=>{if(!Dl(t)||!n){return}const e=t.interactionId;if(e==null){return}if(Ld.has(e)){return}if(Dd.length>10){const t=Dd.shift();Ld.delete(t)}Dd.push(e);Ld.set(e,n)}))};xl("event",e);xl("first-input",e)}function zd(t,e=Id("fetch")){let n=0;let r=0;function i(i){const s=i.body.length;n+=s;r++;const o={body:i.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:n<=6e4&&r<15,...t.fetchOptions};if(!e){Ed("fetch");return Xe("No fetch implementation available")}try{return e(t.url,o).then((t=>{n-=s;r--;return{statusCode:t.status,headers:{"x-sentry-rate-limits":t.headers.get("X-Sentry-Rate-Limits"),"retry-after":t.headers.get("Retry-After")}}}))}catch(t){Ed("fetch");n-=s;r--;return Xe(t)}}return sc(t,i)}const Ud=10;const qd=20;const Hd=30;const Wd=40;const Gd=50;function Yd(t,e,n,r){const i={filename:t,function:e==="<anonymous>"?mt:e,in_app:true};if(n!==undefined){i.lineno=n}if(r!==undefined){i.colno=r}return i}const Xd=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i;const Jd=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i;const Kd=/\((\S*)(?::(\d+))(?::(\d+))\)/;const Vd=t=>{const e=Xd.exec(t);if(e){const[,t,n,r]=e;return Yd(t,mt,+n,+r)}const n=Jd.exec(t);if(n){const t=n[2]&&n[2].indexOf("eval")===0;if(t){const t=Kd.exec(n[2]);if(t){n[2]=t[1];n[3]=t[2];n[4]=t[3]}}const[e,r]=ph(n[1]||mt,n[2]);return Yd(r,e,n[3]?+n[3]:undefined,n[4]?+n[4]:undefined)}return};const Zd=[Hd,Vd];const Qd=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i;const th=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;const eh=t=>{const e=Qd.exec(t);if(e){const t=e[3]&&e[3].indexOf(" > eval")>-1;if(t){const t=th.exec(e[3]);if(t){e[1]=e[1]||"eval";e[3]=t[1];e[4]=t[2];e[5]=""}}let n=e[3];let r=e[1]||mt;[r,n]=ph(r,n);return Yd(n,r,e[4]?+e[4]:undefined,e[5]?+e[5]:undefined)}return};const nh=[Gd,eh];const rh=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i;const ih=t=>{const e=rh.exec(t);return e?Yd(e[2],e[1]||mt,+e[3],e[4]?+e[4]:undefined):undefined};const sh=[Wd,ih];const oh=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i;const ch=t=>{const e=oh.exec(t);return e?Yd(e[2],e[3]||mt,+e[1]):undefined};const ah=[Ud,ch];const uh=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i;const fh=t=>{const e=uh.exec(t);return e?Yd(e[5],e[3]||e[4]||mt,+e[1],+e[2]):undefined};const lh=[qd,fh];const dh=[Zd,nh];const hh=bt(...dh);const ph=(t,e)=>{const n=t.indexOf("safari-extension")!==-1;const r=t.indexOf("safari-web-extension")!==-1;return n||r?[t.indexOf("@")!==-1?t.split("@")[0]:mt,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};const mh=1024;const gh="Breadcrumbs";const yh=(t={})=>{const e={console:true,dom:true,fetch:true,history:true,sentry:true,xhr:true,...t};return{name:gh,setup(t){if(e.console){Mt(_h(t))}if(e.dom){yd(wh(t,e.dom))}if(e.xhr){Rd(kh(t))}if(e.fetch){Xt(Sh(t))}if(e.history){xd(xh(t))}if(e.sentry){t.on("beforeSendEvent",vh(t))}}}};const bh=Go(yh);function vh(t){return function e(n){if(ti()!==t){return}Cc({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:be(n)},{event:n})}}function wh(t,e){return function n(r){if(ti()!==t){return}let i;let s;let o=typeof e==="object"?e.serializeAttribute:undefined;let c=typeof e==="object"&&typeof e.maxStringLength==="number"?e.maxStringLength:undefined;if(c&&c>mh){ef&&G.warn(`\`dom.maxStringLength\` cannot exceed ${mh}, but a value of ${c} was configured. Sentry will use ${mh} instead.`);c=mh}if(typeof o==="string"){o=[o]}try{const t=r.event;const e=Ch(t)?t.target:t;i=D(e,{keyAttrs:o,maxStringLength:c});s=j(e)}catch(t){i="<unknown>"}if(i.length===0){return}const a={category:`ui.${r.name}`,message:i};if(s){a.data={"ui.component_name":s}}Cc(a,{event:r.event,name:r.name,global:r.global})}}function _h(t){return function e(n){if(ti()!==t){return}const r={category:"console",data:{arguments:n.args,logger:"console"},level:vn(n.level),message:_(n.args," ")};if(n.level==="assert"){if(n.args[0]===false){r.message=`Assertion failed: ${_(n.args.slice(1)," ")||"console.assert"}`;r.data.arguments=n.args.slice(1)}else{return}}Cc(r,{input:n.args,level:n.level})}}function kh(t){return function e(n){if(ti()!==t){return}const{startTimestamp:r,endTimestamp:i}=n;const s=n.xhr[Md];if(!r||!i||!s){return}const{method:o,url:c,status_code:a,body:u}=s;const f={method:o,url:c,status_code:a};const l={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:i};Cc({category:"xhr",data:f,type:"http"},l)}}function Sh(t){return function e(n){if(ti()!==t){return}const{startTimestamp:r,endTimestamp:i}=n;if(!i){return}if(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"){return}if(n.error){const t=n.fetchData;const e={data:n.error,input:n.args,startTimestamp:r,endTimestamp:i};Cc({category:"fetch",data:t,level:"error",type:"http"},e)}else{const t=n.response;const e={...n.fetchData,status_code:t&&t.status};const s={input:n.args,response:t,startTimestamp:r,endTimestamp:i};Cc({category:"fetch",data:e,type:"http"},s)}}}function xh(t){return function e(n){if(ti()!==t){return}let r=n.from;let i=n.to;const s=Ze(Ku.location.href);let o=r?Ze(r):undefined;const c=Ze(i);if(!o||!o.path){o=s}if(s.protocol===c.protocol&&s.host===c.host){i=c.relative}if(s.protocol===o.protocol&&s.host===o.host){r=o.relative}Cc({category:"navigation",data:{from:r,to:i}})}}function Ch(t){return!!t&&!!t.target}const Th=["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"];const Ih="BrowserApiErrors";const Eh=(t={})=>{const e={XMLHttpRequest:true,eventTarget:true,requestAnimationFrame:true,setInterval:true,setTimeout:true,...t};return{name:Ih,setupOnce(){if(e.setTimeout){et(Ku,"setTimeout",$h)}if(e.setInterval){et(Ku,"setInterval",$h)}if(e.requestAnimationFrame){et(Ku,"requestAnimationFrame",Mh)}if(e.XMLHttpRequest&&"XMLHttpRequest"in Ku){et(XMLHttpRequest.prototype,"send",Rh)}const t=e.eventTarget;if(t){const e=Array.isArray(t)?t:Th;e.forEach(Nh)}}}};const Ah=Go(Eh);function $h(t){return function(...e){const n=e[0];e[0]=tf(n,{mechanism:{data:{function:St(t)},handled:false,type:"instrument"}});return t.apply(this,e)}}function Mh(t){return function(e){return t.apply(this,[tf(e,{mechanism:{data:{function:"requestAnimationFrame",handler:St(t)},handled:false,type:"instrument"}})])}}function Rh(t){return function(...e){const n=this;const r=["onload","onerror","onprogress","onreadystatechange"];r.forEach((t=>{if(t in n&&typeof n[t]==="function"){et(n,t,(function(e){const n={mechanism:{data:{function:t,handler:St(e)},handled:false,type:"instrument"}};const r=it(e);if(r){n.mechanism.data.handler=St(r)}return tf(e,n)}))}}));return t.apply(this,e)}}function Nh(t){const e=Ku;const n=e[t]&&e[t].prototype;if(!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")){return}et(n,"addEventListener",(function(e){return function(n,r,i){try{if(typeof r.handleEvent==="function"){r.handleEvent=tf(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:St(r),target:t},handled:false,type:"instrument"}})}}catch(t){}return e.apply(this,[n,tf(r,{mechanism:{data:{function:"addEventListener",handler:St(r),target:t},handled:false,type:"instrument"}}),i])}}));et(n,"removeEventListener",(function(t){return function(e,n,r){const i=n;try{const n=i&&i.__sentry_wrapped__;if(n){t.call(this,e,n,r)}}catch(t){}return t.call(this,e,i,r)}}))}const Oh="GlobalHandlers";const Dh=(t={})=>{const e={onerror:true,onunhandledrejection:true,...t};return{name:Oh,setupOnce(){Error.stackTraceLimit=50},setup(t){if(e.onerror){Fh(t);Uh("onerror")}if(e.onunhandledrejection){Ph(t);Uh("onunhandledrejection")}}}};const Lh=Go(Dh);function Fh(t){re((e=>{const{stackParser:n,attachStacktrace:r}=qh();if(ti()!==t||Zu()){return}const{msg:i,url:s,line:o,column:c,error:a}=e;const u=zh(hf(n,a||i,undefined,r,false),s,o,c);u.level="error";ho(u,{originalException:a,mechanism:{handled:false,type:"onerror"}})}))}function Ph(t){oe((e=>{const{stackParser:n,attachStacktrace:r}=qh();if(ti()!==t||Zu()){return}const i=jh(e);const s=f(i)?Bh(i):hf(n,i,undefined,r,true);s.level="error";ho(s,{originalException:i,mechanism:{handled:false,type:"onunhandledrejection"}})}))}function jh(t){if(f(t)){return t}try{if("reason"in t){return t.reason}if("detail"in t&&"reason"in t.detail){return t.detail.reason}}catch(t){}return t}function Bh(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function zh(t,e,n,r){const i=t.exception=t.exception||{};const s=i.values=i.values||[];const o=s[0]=s[0]||{};const c=o.stacktrace=o.stacktrace||{};const u=c.frames=c.frames||[];const f=isNaN(parseInt(r,10))?undefined:r;const l=isNaN(parseInt(n,10))?undefined:n;const d=a(e)&&e.length>0?e:F();if(u.length===0){u.push({colno:f,filename:d,function:mt,in_app:true,lineno:l})}return t}function Uh(t){ef&&G.log(`Global Handler attached: ${t}`)}function qh(){const t=ti();const e=t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:false};return e}const Hh=Go((()=>({name:"HttpContext",preprocessEvent(t){if(!Ku.navigator&&!Ku.location&&!Ku.document){return}const e=t.request&&t.request.url||Ku.location&&Ku.location.href;const{referrer:n}=Ku.document||{};const{userAgent:r}=Ku.navigator||{};const i={...t.request&&t.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}};const s={...t.request,...e&&{url:e},headers:i};t.request=s}})));const Wh="cause";const Gh=5;const Yh="LinkedErrors";const Xh=(t={})=>{const e=t.limit||Gh;const n=t.key||Wh;return{name:Yh,preprocessEvent(t,r,i){const s=i.getOptions();x(nf,s.stackParser,s.maxValueLength,n,e,t,r)}}};const Jh=Go(Xh);function Kh(t){return[Oc(),$c(),Ah(),bh(),Lh(),Jh(),ba(),Hh()]}function Vh(t={}){const e={defaultIntegrations:Kh(),release:typeof __SENTRY_RELEASE__==="string"?__SENTRY_RELEASE__:Ku.SENTRY_RELEASE&&Ku.SENTRY_RELEASE.id?Ku.SENTRY_RELEASE.id:undefined,autoSessionTracking:true,sendClientReports:true};if(t.defaultIntegrations==null){delete t.defaultIntegrations}return{...e,...t}}function Zh(){const t=typeof Ku.window!=="undefined"&&Ku;if(!t){return false}const e=t.chrome?"chrome":"browser";const n=t[e];const r=n&&n.runtime&&n.runtime.id;const i=Ku.location&&Ku.location.href||"";const s=["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"];const o=!!r&&Ku===Ku.top&&s.some((t=>i.startsWith(`${t}//`)));const c=typeof t.nw!=="undefined";return!!r&&!o&&!c}function Qh(t={}){const e=Vh(t);if(Zh()){H((()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}));return}if(ef){if(!Ft()){G.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill.")}}const n={...e,stackParser:vt(e.stackParser||hh),integrations:zo(e),transport:e.transport||zd};const r=nc(wf,n);if(e.autoSessionTracking){rp()}return r}function tp(t={}){if(!Ku.document){ef&&G.error("Global document not defined in showReportDialog call");return}const e=Jr();const n=e.getClient();const r=n&&n.getDsn();if(!r){ef&&G.error("DSN not configured for showReportDialog call");return}if(e){t.user={...e.getUser(),...t.user}}if(!t.eventId){const e=wo();if(e){t.eventId=e}}const i=Ku.document.createElement("script");i.async=true;i.crossOrigin="anonymous";i.src=Po(r,t);if(t.onLoad){i.onload=t.onLoad}const{onClose:s}=t;if(s){const t=e=>{if(e.data==="__sentry_reportdialog_closed__"){try{s()}finally{Ku.removeEventListener("message",t)}}};Ku.addEventListener("message",t)}const o=Ku.document.head||Ku.document.body;if(o){o.appendChild(i)}else{ef&&G.error("Not injecting report dialog. No injection point found in HTML")}}function ep(){}function np(t){t()}function rp(){if(typeof Ku.document==="undefined"){ef&&G.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}Eo({ignoreDuration:true});Mo();xd((({from:t,to:e})=>{if(t!==undefined&&t!==e){Eo({ignoreDuration:true});Mo()}}))}function ip(t){const e=ti();if(e){e.captureUserFeedback(t)}}const sp={replayIntegration:"replay",replayCanvasIntegration:"replay-canvas",feedbackIntegration:"feedback",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot",captureConsoleIntegration:"captureconsole",contextLinesIntegration:"contextlines",linkedErrorsIntegration:"linkederrors",debugIntegration:"debug",dedupeIntegration:"dedupe",extraErrorDataIntegration:"extraerrordata",httpClientIntegration:"httpclient",reportingObserverIntegration:"reportingobserver",rewriteFramesIntegration:"rewriteframes",sessionTimingIntegration:"sessiontiming",browserProfilingIntegration:"browserprofiling"};const op=Ku;async function cp(t,e){const n=sp[t];const r=op.Sentry=op.Sentry||{};if(!n){throw new Error(`Cannot lazy load integration: ${t}`)}const i=r[t];if(typeof i==="function"&&!("_isShim"in i)){return i}const s=ap(n);const o=Ku.document.createElement("script");o.src=s;o.crossOrigin="anonymous";o.referrerPolicy="origin";if(e){o.setAttribute("nonce",e)}const c=new Promise(((t,e)=>{o.addEventListener("load",(()=>t()));o.addEventListener("error",e)}));Ku.document.body.appendChild(o);try{await c}catch(e){throw new Error(`Error when loading integration: ${t}`)}const a=r[t];if(typeof a!=="function"){throw new Error(`Could not load integration: ${t}`)}return a}function ap(t){const e=ti();const n=e&&e.getOptions();const r=n&&n.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${$}/${t}.min.js`,r).toString()}const up=M;const fp="ReportingObserver";const lp=new WeakMap;const dp=(t={})=>{const e=t.types||["crash","deprecation","intervention"];function n(t){if(!lp.has(ti())){return}for(const e of t){Zr((t=>{t.setExtra("url",e.url);const n=`ReportingObserver [${e.type}]`;let r="No details available";if(e.body){const n={};for(const t in e.body){n[t]=e.body[t]}t.setExtra("body",n);if(e.type==="crash"){const t=e.body;r=[t.crashId||"",t.reason||""].join(" ").trim()||r}else{const t=e.body;r=t.message||r}}lo(`${n}: ${r}`)}))}}return{name:fp,setupOnce(){if(!Bt()){return}const t=new up.ReportingObserver(n,{buffered:true,types:e});t.observe()},setup(t){lp.set(t,true)}}};const hp=Go(dp);const pp="HttpClient";const mp=(t={})=>{const e={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...t};return{name:pp,setup(t){Tp(t,e);Ip(t,e)}}};const gp=Go(mp);function yp(t,e,n,r){if(Ep(t,n.status,n.url)){const t=$p(e,r);let i,s,o,c;if(Mp()){[i,o]=bp("Cookie",t);[s,c]=bp("Set-Cookie",n)}const a=Ap({url:t.url,method:t.method,status:n.status,requestHeaders:i,responseHeaders:s,requestCookies:o,responseCookies:c});ho(a)}}function bp(t,e){const n=kp(e.headers);let r;try{const e=n[t]||n[t.toLowerCase()]||undefined;if(e){r=_p(e)}}catch(e){ef&&G.log(`Could not extract cookies from header ${t}`)}return[n,r]}function vp(t,e,n,r){if(Ep(t,e.status,e.responseURL)){let t,i,s;if(Mp()){try{const t=e.getResponseHeader("Set-Cookie")||e.getResponseHeader("set-cookie")||undefined;if(t){i=_p(t)}}catch(t){ef&&G.log("Could not extract cookies from response headers")}try{s=Sp(e)}catch(t){ef&&G.log("Could not extract headers from response")}t=r}const o=Ap({url:e.responseURL,method:n,status:e.status,requestHeaders:t,responseHeaders:s,responseCookies:i});ho(o)}}function wp(t){if(t){const e=t["Content-Length"]||t["content-length"];if(e){return parseInt(e,10)}}return undefined}function _p(t){return t.split("; ").reduce(((t,e)=>{const[n,r]=e.split("=");if(n&&r){t[n]=r}return t}),{})}function kp(t){const e={};t.forEach(((t,n)=>{e[n]=t}));return e}function Sp(t){const e=t.getAllResponseHeaders();if(!e){return{}}return e.split("\r\n").reduce(((t,e)=>{const[n,r]=e.split(": ");if(n&&r){t[n]=r}return t}),{})}function xp(t,e){return t.some((t=>{if(typeof t==="string"){return e.includes(t)}return t.test(e)}))}function Cp(t,e){return t.some((t=>{if(typeof t==="number"){return t===e}return e>=t[0]&&e<=t[1]}))}function Tp(t,e){if(!jt()){return}Xt((n=>{if(ti()!==t){return}const{response:r,args:i}=n;const[s,o]=i;if(!r){return}yp(e,s,r,o)}))}function Ip(t,e){if(!("XMLHttpRequest"in M)){return}Rd((n=>{if(ti()!==t){return}const r=n.xhr;const i=r[Md];if(!i){return}const{method:s,request_headers:o}=i;try{vp(e,r,s,o)}catch(t){ef&&G.warn("Error while extracting response event form XHR response",t)}}))}function Ep(t,e,n){return Cp(t.failedRequestStatusCodes,e)&&xp(t.failedRequestTargets,n)&&!mc(n,ti())}function Ap(t){const e=`HTTP Client Error with status code: ${t.status}`;const n={message:e,exception:{values:[{type:"Error",value:e}]},request:{url:t.url,method:t.method,headers:t.requestHeaders,cookies:t.requestCookies},contexts:{response:{status_code:t.status,headers:t.responseHeaders,cookies:t.responseCookies,body_size:wp(t.responseHeaders)}}};we(n,{type:"http.client",handled:false});return n}function $p(t,e){if(!e&&t instanceof Request){return t}if(t instanceof Request&&t.bodyUsed){return t}return new Request(t,e)}function Mp(){const t=ti();return t?Boolean(t.getOptions().sendDefaultPii):false}const Rp=M;const Np=7;const Op="ContextLines";const Dp=(t={})=>{const e=t.frameContextLines!=null?t.frameContextLines:Np;return{name:Op,processEvent(t){return Fp(t,e)}}};const Lp=Go(Dp);function Fp(t,e){const n=Rp.document;const r=Rp.location&&Qe(Rp.location.href);if(!n||!r){return t}const i=t.exception&&t.exception.values;if(!i||!i.length){return t}const s=n.documentElement.innerHTML;if(!s){return t}const o=["<!DOCTYPE html>","<html>",...s.split("\n"),"</html>"];i.forEach((t=>{const n=t.stacktrace;if(n&&n.frames){n.frames=n.frames.map((t=>Pp(t,o,r,e)))}}));return t}function Pp(t,e,n,r){if(t.filename!==n||!t.lineno||!e.length){return t}xe(e,t,r);return t}const jp=M;const Bp="sentryReplaySession";const zp="replay_event";const Up="Unable to send Replay";const qp=3e5;const Hp=9e5;const Wp=5e3;const Gp=5500;const Yp=6e4;const Xp=5e3;const Jp=3;const Kp=15e4;const Vp=5e3;const Zp=3e3;const Qp=300;const tm=2e7;const em=4999;const nm=15e3;const rm=36e5;function im(t,e){if(t!=null){return t}else{return e()}}function sm(t){let e=undefined;let n=t[0];let r=1;while(r<t.length){const i=t[r];const s=t[r+1];r+=2;if((i==="optionalAccess"||i==="optionalCall")&&n==null){return undefined}if(i==="access"||i==="optionalAccess"){e=n;n=s(n)}else if(i==="call"||i==="optionalCall"){n=s(((...t)=>n.call(e,...t)));e=undefined}}return n}var om;(function(t){t[t["Document"]=0]="Document";t[t["DocumentType"]=1]="DocumentType";t[t["Element"]=2]="Element";t[t["Text"]=3]="Text";t[t["CDATA"]=4]="CDATA";t[t["Comment"]=5]="Comment"})(om||(om={}));function cm(t){return t.nodeType===t.ELEMENT_NODE}function am(t){const e=sm([t,"optionalAccess",t=>t.host]);return Boolean(sm([e,"optionalAccess",t=>t.shadowRoot])===t)}function um(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function fm(t){if(t.includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")){t=t.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")}return t}function lm(t){const{cssText:e}=t;if(e.split('"').length<3)return e;const n=["@import",`url(${JSON.stringify(t.href)})`];if(t.layerName===""){n.push(`layer`)}else if(t.layerName){n.push(`layer(${t.layerName})`)}if(t.supportsText){n.push(`supports(${t.supportsText})`)}if(t.media.length){n.push(t.media.mediaText)}return n.join(" ")+";"}function dm(t){try{const e=t.rules||t.cssRules;return e?fm(Array.from(e,hm).join("")):null}catch(t){return null}}function hm(t){let e;if(mm(t)){try{e=dm(t.styleSheet)||lm(t)}catch(t){}}else if(gm(t)&&t.selectorText.includes(":")){return pm(t.cssText)}return e||t.cssText}function pm(t){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function mm(t){return"styleSheet"in t}function gm(t){return"selectorText"in t}class ym{constructor(){this.idNodeMap=new Map;this.nodeMetaMap=new WeakMap}getId(t){if(!t)return-1;const e=sm([this,"access",t=>t.getMeta,"call",e=>e(t),"optionalAccess",t=>t.id]);return im(e,(()=>-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){const e=this.getId(t);this.idNodeMap.delete(e);if(t.childNodes){t.childNodes.forEach((t=>this.removeNodeFromMap(t)))}}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){const n=e.id;this.idNodeMap.set(n,t);this.nodeMetaMap.set(t,e)}replace(t,e){const n=this.getNode(t);if(n){const t=this.nodeMetaMap.get(n);if(t)this.nodeMetaMap.set(e,t)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map;this.nodeMetaMap=new WeakMap}}function bm(){return new ym}function vm({maskInputOptions:t,tagName:e,type:n}){if(e==="OPTION"){e="SELECT"}return Boolean(t[e.toLowerCase()]||n&&t[n]||n==="password"||e==="INPUT"&&!n&&t["text"])}function wm({isMasked:t,element:e,value:n,maskInputFn:r}){let i=n||"";if(!t){return i}if(r){i=r(i,e)}return"*".repeat(i.length)}function _m(t){return t.toLowerCase()}function km(t){return t.toUpperCase()}const Sm="__rrweb_original__";function xm(t){const e=t.getContext("2d");if(!e)return true;const n=50;for(let r=0;r<t.width;r+=n){for(let i=0;i<t.height;i+=n){const s=e.getImageData;const o=Sm in s?s[Sm]:s;const c=new Uint32Array(o.call(e,r,i,Math.min(n,t.width-r),Math.min(n,t.height-i)).data.buffer);if(c.some((t=>t!==0)))return false}}return true}function Cm(t){const e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?_m(e):null}function Tm(t,e,n){if(e==="INPUT"&&(n==="radio"||n==="checkbox")){return t.getAttribute("value")||""}return t.value}function Im(t,e){let n;try{n=new URL(t,im(e,(()=>window.location.href)))}catch(t){return null}const r=/\.([0-9a-z]+)(?:$)/i;const i=n.pathname.match(r);return im(sm([i,"optionalAccess",t=>t[1]]),(()=>null))}const Em={};function Am(t){const e=Em[t];if(e){return e}const n=window.document;let r=window[t];if(n&&typeof n.createElement==="function"){try{const e=n.createElement("iframe");e.hidden=true;n.head.appendChild(e);const i=e.contentWindow;if(i&&i[t]){r=i[t]}n.head.removeChild(e)}catch(t){}}return Em[t]=r.bind(window)}function $m(...t){return Am("setTimeout")(...t)}function Mm(...t){return Am("clearTimeout")(...t)}let Rm=1;const Nm=new RegExp("[^a-z0-9-_:]");const Om=-2;function Dm(){return Rm++}function Lm(t){if(t instanceof HTMLFormElement){return"form"}const e=_m(t.tagName);if(Nm.test(e)){return"div"}return e}function Fm(t){let e="";if(t.indexOf("//")>-1){e=t.split("/").slice(0,3).join("/")}else{e=t.split("/")[0]}e=e.split("?")[0];return e}let Pm;let jm;const Bm=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm;const zm=/^(?:[a-z+]+:)?\/\//i;const Um=/^www\..*/i;const qm=/^(data:)([^,]*),(.*)/i;function Hm(t,e){return(t||"").replace(Bm,((t,n,r,i,s,o)=>{const c=r||s||o;const a=n||i||"";if(!c){return t}if(zm.test(c)||Um.test(c)){return`url(${a}${c}${a})`}if(qm.test(c)){return`url(${a}${c}${a})`}if(c[0]==="/"){return`url(${a}${Fm(e)+c}${a})`}const u=e.split("/");const f=c.split("/");u.pop();for(const t of f){if(t==="."){continue}else if(t===".."){u.pop()}else{u.push(t)}}return`url(${a}${u.join("/")}${a})`}))}const Wm=/^[^ \t\n\r\u000c]+/;const Gm=/^[, \t\n\r\u000c]+/;function Ym(t,e){if(e.trim()===""){return e}let n=0;function r(t){let r;const i=t.exec(e.substring(n));if(i){r=i[0];n+=r.length;return r}return""}const i=[];while(true){r(Gm);if(n>=e.length){break}let s=r(Wm);if(s.slice(-1)===","){s=Xm(t,s.substring(0,s.length-1));i.push(s)}else{let r="";s=Xm(t,s);let o=false;while(true){const t=e.charAt(n);if(t===""){i.push((s+r).trim());break}else if(!o){if(t===","){n+=1;i.push((s+r).trim());break}else if(t==="("){o=true}}else{if(t===")"){o=false}}r+=t;n+=1}}}return i.join(", ")}function Xm(t,e){if(!e||e.trim()===""){return e}const n=t.createElement("a");n.href=e;return n.href}function Jm(t){return Boolean(t.tagName==="svg"||t.ownerSVGElement)}function Km(){const t=document.createElement("a");t.href="";return t.href}function Vm(t,e,n,r,i,s){if(!r){return r}if(n==="src"||n==="href"&&!(e==="use"&&r[0]==="#")){return Xm(t,r)}else if(n==="xlink:href"&&r[0]!=="#"){return Xm(t,r)}else if(n==="background"&&(e==="table"||e==="td"||e==="th")){return Xm(t,r)}else if(n==="srcset"){return Ym(t,r)}else if(n==="style"){return Hm(r,Km())}else if(e==="object"&&n==="data"){return Xm(t,r)}if(typeof s==="function"){return s(n,r,i)}return r}function Zm(t,e,n){return(t==="video"||t==="audio")&&e==="autoplay"}function Qm(t,e,n,r){try{if(r&&t.matches(r)){return false}if(typeof e==="string"){if(t.classList.contains(e)){return true}}else{for(let n=t.classList.length;n--;){const r=t.classList[n];if(e.test(r)){return true}}}if(n){return t.matches(n)}}catch(t){}return false}function tg(t,e){for(let n=t.classList.length;n--;){const r=t.classList[n];if(e.test(r)){return true}}return false}function eg(t,e,n=Infinity,r=0){if(!t)return-1;if(t.nodeType!==t.ELEMENT_NODE)return-1;if(r>n)return-1;if(e(t))return r;return eg(t.parentNode,e,n,r+1)}function ng(t,e){return n=>{const r=n;if(r===null)return false;try{if(t){if(typeof t==="string"){if(r.matches(`.${t}`))return true}else if(tg(r,t)){return true}}if(e&&r.matches(e))return true;return false}catch(t){return false}}}function rg(t,e,n,r,i,s){try{const o=t.nodeType===t.ELEMENT_NODE?t:t.parentElement;if(o===null)return false;if(o.tagName==="INPUT"){const t=o.getAttribute("autocomplete");const e=["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"];if(e.includes(t)){return true}}let c=-1;let a=-1;if(s){a=eg(o,ng(r,i));if(a<0){return true}c=eg(o,ng(e,n),a>=0?a:Infinity)}else{c=eg(o,ng(e,n));if(c<0){return false}a=eg(o,ng(r,i),c>=0?c:Infinity)}return c>=0?a>=0?c<=a:true:a>=0?false:!!s}catch(t){}return!!s}function ig(t,e,n){const r=t.contentWindow;if(!r){return}let i=false;let s;try{s=r.document.readyState}catch(t){return}if(s!=="complete"){const r=$m((()=>{if(!i){e();i=true}}),n);t.addEventListener("load",(()=>{Mm(r);i=true;e()}));return}const o="about:blank";if(r.location.href!==o||t.src===o||t.src===""){$m(e,0);return t.addEventListener("load",e)}t.addEventListener("load",e)}function sg(t,e,n){let r=false;let i;try{i=t.sheet}catch(t){return}if(i)return;const s=$m((()=>{if(!r){e();r=true}}),n);t.addEventListener("load",(()=>{Mm(s);r=true;e()}))}function og(t,e){const{doc:n,mirror:r,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:c,maskAttributeFn:a,maskTextClass:u,unmaskTextClass:f,maskTextSelector:l,unmaskTextSelector:d,inlineStylesheet:h,maskInputOptions:p={},maskTextFn:m,maskInputFn:g,dataURLOptions:y={},inlineImages:b,recordCanvas:v,keepIframeSrcFn:w,newlyAddedElement:_=false}=e;const k=cg(n,r);switch(t.nodeType){case t.DOCUMENT_NODE:if(t.compatMode!=="CSS1Compat"){return{type:om.Document,childNodes:[],compatMode:t.compatMode}}else{return{type:om.Document,childNodes:[]}}case t.DOCUMENT_TYPE_NODE:return{type:om.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:k};case t.ELEMENT_NODE:return ug(t,{doc:n,blockClass:i,blockSelector:s,unblockSelector:o,inlineStylesheet:h,maskAttributeFn:a,maskInputOptions:p,maskInputFn:g,dataURLOptions:y,inlineImages:b,recordCanvas:v,keepIframeSrcFn:w,newlyAddedElement:_,rootId:k,maskAllText:c,maskTextClass:u,unmaskTextClass:f,maskTextSelector:l,unmaskTextSelector:d});case t.TEXT_NODE:return ag(t,{maskAllText:c,maskTextClass:u,unmaskTextClass:f,maskTextSelector:l,unmaskTextSelector:d,maskTextFn:m,maskInputOptions:p,maskInputFn:g,rootId:k});case t.CDATA_SECTION_NODE:return{type:om.CDATA,textContent:"",rootId:k};case t.COMMENT_NODE:return{type:om.Comment,textContent:t.textContent||"",rootId:k};default:return false}}function cg(t,e){if(!e.hasNode(t))return undefined;const n=e.getId(t);return n===1?undefined:n}function ag(t,e){const{maskAllText:n,maskTextClass:r,unmaskTextClass:i,maskTextSelector:s,unmaskTextSelector:o,maskTextFn:c,maskInputOptions:a,maskInputFn:u,rootId:f}=e;const l=t.parentNode&&t.parentNode.tagName;let d=t.textContent;const h=l==="STYLE"?true:undefined;const p=l==="SCRIPT"?true:undefined;const m=l==="TEXTAREA"?true:undefined;if(h&&d){try{if(t.nextSibling||t.previousSibling){}else if(sm([t,"access",t=>t.parentNode,"access",t=>t.sheet,"optionalAccess",t=>t.cssRules])){d=dm(t.parentNode.sheet)}}catch(e){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${e}`,t)}d=Hm(d,Km())}if(p){d="SCRIPT_PLACEHOLDER"}const g=rg(t,r,s,i,o,n);if(!h&&!p&&!m&&d&&g){d=c?c(d,t.parentElement):d.replace(/[\S]/g,"*")}if(m&&d&&(a.textarea||g)){d=u?u(d,t.parentNode):d.replace(/[\S]/g,"*")}if(l==="OPTION"&&d){const e=vm({type:null,tagName:l,maskInputOptions:a});d=wm({isMasked:rg(t,r,s,i,o,e),element:t,value:d,maskInputFn:u})}return{type:om.Text,textContent:d||"",isStyle:h,rootId:f}}function ug(t,e){const{doc:n,blockClass:r,blockSelector:i,unblockSelector:s,inlineStylesheet:o,maskInputOptions:c={},maskAttributeFn:a,maskInputFn:u,dataURLOptions:f={},inlineImages:l,recordCanvas:d,keepIframeSrcFn:h,newlyAddedElement:p=false,rootId:m,maskAllText:g,maskTextClass:y,unmaskTextClass:b,maskTextSelector:v,unmaskTextSelector:w}=e;const _=Qm(t,r,i,s);const k=Lm(t);let S={};const x=t.attributes.length;for(let e=0;e<x;e++){const r=t.attributes[e];if(r.name&&!Zm(k,r.name,r.value)){S[r.name]=Vm(n,k,_m(r.name),r.value,t,a)}}if(k==="link"&&o){const e=Array.from(n.styleSheets).find((e=>e.href===t.href));let r=null;if(e){r=dm(e)}if(r){delete S.rel;delete S.href;S._cssText=Hm(r,e.href)}}if(k==="style"&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){const e=dm(t.sheet);if(e){S._cssText=Hm(e,Km())}}if(k==="input"||k==="textarea"||k==="select"||k==="option"){const e=t;const n=Cm(e);const r=Tm(e,km(k),n);const i=e.checked;if(n!=="submit"&&n!=="button"&&r){const t=rg(e,y,v,b,w,vm({type:n,tagName:km(k),maskInputOptions:c}));S.value=wm({isMasked:t,element:e,value:r,maskInputFn:u})}if(i){S.checked=i}}if(k==="option"){if(t.selected&&!c["select"]){S.selected=true}else{delete S.selected}}if(k==="canvas"&&d){if(t.__context==="2d"){if(!xm(t)){S.rr_dataURL=t.toDataURL(f.type,f.quality)}}else if(!("__context"in t)){const e=t.toDataURL(f.type,f.quality);const n=document.createElement("canvas");n.width=t.width;n.height=t.height;const r=n.toDataURL(f.type,f.quality);if(e!==r){S.rr_dataURL=e}}}if(k==="img"&&l){if(!Pm){Pm=n.createElement("canvas");jm=Pm.getContext("2d")}const e=t;const r=e.crossOrigin;e.crossOrigin="anonymous";const i=()=>{e.removeEventListener("load",i);try{Pm.width=e.naturalWidth;Pm.height=e.naturalHeight;jm.drawImage(e,0,0);S.rr_dataURL=Pm.toDataURL(f.type,f.quality)}catch(t){console.warn(`Cannot inline img src=${e.currentSrc}! Error: ${t}`)}r?S.crossOrigin=r:e.removeAttribute("crossorigin")};if(e.complete&&e.naturalWidth!==0)i();else e.addEventListener("load",i)}if(k==="audio"||k==="video"){S.rr_mediaState=t.paused?"paused":"played";S.rr_mediaCurrentTime=t.currentTime}if(!p){if(t.scrollLeft){S.rr_scrollLeft=t.scrollLeft}if(t.scrollTop){S.rr_scrollTop=t.scrollTop}}if(_){const{width:e,height:n}=t.getBoundingClientRect();S={class:S.class,rr_width:`${e}px`,rr_height:`${n}px`}}if(k==="iframe"&&!h(S.src)){if(!_&&!t.contentDocument){S.rr_src=S.src}delete S.src}let C;try{if(customElements.get(k))C=true}catch(t){}return{type:om.Element,tagName:k,attributes:S,childNodes:[],isSVG:Jm(t)||undefined,needBlock:_,rootId:m,isCustom:C}}function fg(t){if(t===undefined||t===null){return""}else{return t.toLowerCase()}}function lg(t,e){if(e.comment&&t.type===om.Comment){return true}else if(t.type===om.Element){if(e.script&&(t.tagName==="script"||t.tagName==="link"&&(t.attributes.rel==="preload"||t.attributes.rel==="modulepreload")&&t.attributes.as==="script"||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href==="string"&&Im(t.attributes.href)==="js")){return true}else if(e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(fg(t.attributes.name).match(/^msapplication-tile(image|color)$/)||fg(t.attributes.name)==="application-name"||fg(t.attributes.rel)==="icon"||fg(t.attributes.rel)==="apple-touch-icon"||fg(t.attributes.rel)==="shortcut icon"))){return true}else if(t.tagName==="meta"){if(e.headMetaDescKeywords&&fg(t.attributes.name).match(/^description|keywords$/)){return true}else if(e.headMetaSocial&&(fg(t.attributes.property).match(/^(og|twitter|fb):/)||fg(t.attributes.name).match(/^(og|twitter):/)||fg(t.attributes.name)==="pinterest")){return true}else if(e.headMetaRobots&&(fg(t.attributes.name)==="robots"||fg(t.attributes.name)==="googlebot"||fg(t.attributes.name)==="bingbot")){return true}else if(e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==undefined){return true}else if(e.headMetaAuthorship&&(fg(t.attributes.name)==="author"||fg(t.attributes.name)==="generator"||fg(t.attributes.name)==="framework"||fg(t.attributes.name)==="publisher"||fg(t.attributes.name)==="progid"||fg(t.attributes.property).match(/^article:/)||fg(t.attributes.property).match(/^product:/))){return true}else if(e.headMetaVerification&&(fg(t.attributes.name)==="google-site-verification"||fg(t.attributes.name)==="yandex-verification"||fg(t.attributes.name)==="csrf-token"||fg(t.attributes.name)==="p:domain_verify"||fg(t.attributes.name)==="verify-v1"||fg(t.attributes.name)==="verification"||fg(t.attributes.name)==="shopify-checkout-api-token")){return true}}}return false}function dg(t,e){const{doc:n,mirror:r,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:c,maskTextClass:a,unmaskTextClass:u,maskTextSelector:f,unmaskTextSelector:l,skipChild:d=false,inlineStylesheet:h=true,maskInputOptions:p={},maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:b,dataURLOptions:v={},inlineImages:w=false,recordCanvas:_=false,onSerialize:k,onIframeLoad:S,iframeLoadTimeout:x=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:T=5e3,keepIframeSrcFn:I=(()=>false),newlyAddedElement:E=false}=e;let{preserveWhiteSpace:A=true}=e;const $=og(t,{doc:n,mirror:r,blockClass:i,blockSelector:s,maskAllText:c,unblockSelector:o,maskTextClass:a,unmaskTextClass:u,maskTextSelector:f,unmaskTextSelector:l,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,dataURLOptions:v,inlineImages:w,recordCanvas:_,keepIframeSrcFn:I,newlyAddedElement:E});if(!$){console.warn(t,"not serialized");return null}let M;if(r.hasNode(t)){M=r.getId(t)}else if(lg($,b)||!A&&$.type===om.Text&&!$.isStyle&&!$.textContent.replace(/^\s+|\s+$/gm,"").length){M=Om}else{M=Dm()}const R=Object.assign($,{id:M});r.add(t,R);if(M===Om){return null}if(k){k(t)}let N=!d;if(R.type===om.Element){N=N&&!R.needBlock;delete R.needBlock;const e=t.shadowRoot;if(e&&um(e))R.isShadowHost=true}if((R.type===om.Document||R.type===om.Element)&&N){if(b.headWhitespace&&R.type===om.Element&&R.tagName==="head"){A=false}const e={doc:n,mirror:r,blockClass:i,blockSelector:s,maskAllText:c,unblockSelector:o,maskTextClass:a,unmaskTextClass:u,maskTextSelector:f,unmaskTextSelector:l,skipChild:d,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:b,dataURLOptions:v,inlineImages:w,recordCanvas:_,preserveWhiteSpace:A,onSerialize:k,onIframeLoad:S,iframeLoadTimeout:x,onStylesheetLoad:C,stylesheetLoadTimeout:T,keepIframeSrcFn:I};for(const n of Array.from(t.childNodes)){const t=dg(n,e);if(t){R.childNodes.push(t)}}if(cm(t)&&t.shadowRoot){for(const n of Array.from(t.shadowRoot.childNodes)){const r=dg(n,e);if(r){um(t.shadowRoot)&&(r.isShadow=true);R.childNodes.push(r)}}}}if(t.parentNode&&am(t.parentNode)&&um(t.parentNode)){R.isShadow=true}if(R.type===om.Element&&R.tagName==="iframe"){ig(t,(()=>{const e=t.contentDocument;if(e&&S){const n=dg(e,{doc:e,mirror:r,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:c,maskTextClass:a,unmaskTextClass:u,maskTextSelector:f,unmaskTextSelector:l,skipChild:false,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:b,dataURLOptions:v,inlineImages:w,recordCanvas:_,preserveWhiteSpace:A,onSerialize:k,onIframeLoad:S,iframeLoadTimeout:x,onStylesheetLoad:C,stylesheetLoadTimeout:T,keepIframeSrcFn:I});if(n){S(t,n)}}}),x)}if(R.type===om.Element&&R.tagName==="link"&&typeof R.attributes.rel==="string"&&(R.attributes.rel==="stylesheet"||R.attributes.rel==="preload"&&typeof R.attributes.href==="string"&&Im(R.attributes.href)==="css")){sg(t,(()=>{if(C){const e=dg(t,{doc:n,mirror:r,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:c,maskTextClass:a,unmaskTextClass:u,maskTextSelector:f,unmaskTextSelector:l,skipChild:false,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:b,dataURLOptions:v,inlineImages:w,recordCanvas:_,preserveWhiteSpace:A,onSerialize:k,onIframeLoad:S,iframeLoadTimeout:x,onStylesheetLoad:C,stylesheetLoadTimeout:T,keepIframeSrcFn:I});if(e){C(t,e)}}}),T)}return R}function hg(t,e){const{mirror:n=new ym,blockClass:r="rr-block",blockSelector:i=null,unblockSelector:s=null,maskAllText:o=false,maskTextClass:c="rr-mask",unmaskTextClass:a=null,maskTextSelector:u=null,unmaskTextSelector:f=null,inlineStylesheet:l=true,inlineImages:d=false,recordCanvas:h=false,maskAllInputs:p=false,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOM:b=false,dataURLOptions:v,preserveWhiteSpace:w,onSerialize:_,onIframeLoad:k,iframeLoadTimeout:S,onStylesheetLoad:x,stylesheetLoadTimeout:C,keepIframeSrcFn:T=(()=>false)}=e||{};const I=p===true?{color:true,date:true,"datetime-local":true,email:true,month:true,number:true,range:true,search:true,tel:true,text:true,time:true,url:true,week:true,textarea:true,select:true}:p===false?{}:p;const E=b===true||b==="all"?{script:true,comment:true,headFavicon:true,headWhitespace:true,headMetaDescKeywords:b==="all",headMetaSocial:true,headMetaRobots:true,headMetaHttpEquiv:true,headMetaAuthorship:true,headMetaVerification:true}:b===false?{}:b;return dg(t,{doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,maskAllText:o,maskTextClass:c,unmaskTextClass:a,maskTextSelector:u,unmaskTextSelector:f,skipChild:false,inlineStylesheet:l,maskInputOptions:I,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:E,dataURLOptions:v,inlineImages:d,recordCanvas:h,preserveWhiteSpace:w,onSerialize:_,onIframeLoad:k,iframeLoadTimeout:S,onStylesheetLoad:x,stylesheetLoadTimeout:C,keepIframeSrcFn:T,newlyAddedElement:false})}function pg(t){let e=undefined;let n=t[0];let r=1;while(r<t.length){const i=t[r];const s=t[r+1];r+=2;if((i==="optionalAccess"||i==="optionalCall")&&n==null){return undefined}if(i==="access"||i==="optionalAccess"){e=n;n=s(n)}else if(i==="call"||i==="optionalCall"){n=s(((...t)=>n.call(e,...t)));e=undefined}}return n}function mg(t,e,n=document){const r={capture:true,passive:true};n.addEventListener(t,e,r);return()=>n.removeEventListener(t,e,r)}const gg="Please stop import mirror directly. Instead of that,"+"\r\n"+"now you can use replayer.getMirror() to access the mirror instance of a replayer,"+"\r\n"+"or you can use record.mirror to access the mirror instance during recording.";let yg={map:{},getId(){console.error(gg);return-1},getNode(){console.error(gg);return null},removeNodeFromMap(){console.error(gg)},has(){console.error(gg);return false},reset(){console.error(gg)}};if(typeof window!=="undefined"&&window.Proxy&&window.Reflect){yg=new Proxy(yg,{get(t,e,n){if(e==="map"){console.error(gg)}return Reflect.get(t,e,n)}})}function bg(t,e,n={}){let r=null;let i=0;return function(...s){const o=Date.now();if(!i&&n.leading===false){i=o}const c=e-(o-i);const a=this;if(c<=0||c>e){if(r){Hg(r);r=null}i=o;t.apply(a,s)}else if(!r&&n.trailing!==false){r=qg((()=>{i=n.leading===false?0:Date.now();r=null;t.apply(a,s)}),c)}}}function vg(t,e,n,r,i=window){const s=i.Object.getOwnPropertyDescriptor(t,e);i.Object.defineProperty(t,e,r?n:{set(t){qg((()=>{n.set.call(this,t)}),0);if(s&&s.set){s.set.call(this,t)}}});return()=>vg(t,e,s||{},true)}function wg(t,e,n){try{if(!(e in t)){return()=>{}}const r=t[e];const i=n(r);if(typeof i==="function"){i.prototype=i.prototype||{};Object.defineProperties(i,{__rrweb_original__:{enumerable:false,value:r}})}t[e]=i;return()=>{t[e]=r}}catch(t){return()=>{}}}let _g=Date.now;if(!/[1-9][0-9]{12}/.test(Date.now().toString())){_g=()=>(new Date).getTime()}function kg(t){const e=t.document;return{left:e.scrollingElement?e.scrollingElement.scrollLeft:t.pageXOffset!==undefined?t.pageXOffset:pg([e,"optionalAccess",t=>t.documentElement,"access",t=>t.scrollLeft])||pg([e,"optionalAccess",t=>t.body,"optionalAccess",t=>t.parentElement,"optionalAccess",t=>t.scrollLeft])||pg([e,"optionalAccess",t=>t.body,"optionalAccess",t=>t.scrollLeft])||0,top:e.scrollingElement?e.scrollingElement.scrollTop:t.pageYOffset!==undefined?t.pageYOffset:pg([e,"optionalAccess",t=>t.documentElement,"access",t=>t.scrollTop])||pg([e,"optionalAccess",t=>t.body,"optionalAccess",t=>t.parentElement,"optionalAccess",t=>t.scrollTop])||pg([e,"optionalAccess",t=>t.body,"optionalAccess",t=>t.scrollTop])||0}}function Sg(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function xg(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Cg(t){if(!t){return null}const e=t.nodeType===t.ELEMENT_NODE?t:t.parentElement;return e}function Tg(t,e,n,r,i){if(!t){return false}const s=Cg(t);if(!s){return false}const o=ng(e,n);if(!i){const t=r&&s.matches(r);return o(s)&&!t}const c=eg(s,o);let a=-1;if(c<0){return false}if(r){a=eg(s,ng(null,r))}if(c>-1&&a<0){return true}return c<a}function Ig(t,e){return e.getId(t)!==-1}function Eg(t,e){return e.getId(t)===Om}function Ag(t,e){if(am(t)){return false}const n=e.getId(t);if(!e.has(n)){return true}if(t.parentNode&&t.parentNode.nodeType===t.DOCUMENT_NODE){return false}if(!t.parentNode){return true}return Ag(t.parentNode,e)}function $g(t){return Boolean(t.changedTouches)}function Mg(t=window){if("NodeList"in t&&!t.NodeList.prototype.forEach){t.NodeList.prototype.forEach=Array.prototype.forEach}if("DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach){t.DOMTokenList.prototype.forEach=Array.prototype.forEach}if(!Node.prototype.contains){Node.prototype.contains=(...t)=>{let e=t[0];if(!(0 in t)){throw new TypeError("1 argument is required")}do{if(this===e){return true}}while(e=e&&e.parentNode);return false}}}function Rg(t,e){return Boolean(t.nodeName==="IFRAME"&&e.getMeta(t))}function Ng(t,e){return Boolean(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function Og(t){return Boolean(pg([t,"optionalAccess",t=>t.shadowRoot]))}class Dg{constructor(){this.id=1;this.styleIDMap=new WeakMap;this.idStyleMap=new Map}getId(t){return gr(this.styleIDMap.get(t),(()=>-1))}has(t){return this.styleIDMap.has(t)}add(t,e){if(this.has(t))return this.getId(t);let n;if(e===undefined){n=this.id++}else n=e;this.styleIDMap.set(t,n);this.idStyleMap.set(n,t);return n}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 Lg(t){let e=null;if(pg([t,"access",t=>t.getRootNode,"optionalCall",t=>t(),"optionalAccess",t=>t.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&t.getRootNode().host)e=t.getRootNode().host;return e}function Fg(t){let e=t;let n;while(n=Lg(e))e=n;return e}function Pg(t){const e=t.ownerDocument;if(!e)return false;const n=Fg(t);return e.contains(n)}function jg(t){const e=t.ownerDocument;if(!e)return false;return e.contains(t)||Pg(t)}const Bg={};function zg(t){const e=Bg[t];if(e){return e}const n=window.document;let r=window[t];if(n&&typeof n.createElement==="function"){try{const e=n.createElement("iframe");e.hidden=true;n.head.appendChild(e);const i=e.contentWindow;if(i&&i[t]){r=i[t]}n.head.removeChild(e)}catch(t){}}return Bg[t]=r.bind(window)}function Ug(...t){return zg("requestAnimationFrame")(...t)}function qg(...t){return zg("setTimeout")(...t)}function Hg(...t){return zg("clearTimeout")(...t)}var Wg=(t=>{t[t["DomContentLoaded"]=0]="DomContentLoaded";t[t["Load"]=1]="Load";t[t["FullSnapshot"]=2]="FullSnapshot";t[t["IncrementalSnapshot"]=3]="IncrementalSnapshot";t[t["Meta"]=4]="Meta";t[t["Custom"]=5]="Custom";t[t["Plugin"]=6]="Plugin";return t})(Wg||{});var Gg=(t=>{t[t["Mutation"]=0]="Mutation";t[t["MouseMove"]=1]="MouseMove";t[t["MouseInteraction"]=2]="MouseInteraction";t[t["Scroll"]=3]="Scroll";t[t["ViewportResize"]=4]="ViewportResize";t[t["Input"]=5]="Input";t[t["TouchMove"]=6]="TouchMove";t[t["MediaInteraction"]=7]="MediaInteraction";t[t["StyleSheetRule"]=8]="StyleSheetRule";t[t["CanvasMutation"]=9]="CanvasMutation";t[t["Font"]=10]="Font";t[t["Log"]=11]="Log";t[t["Drag"]=12]="Drag";t[t["StyleDeclaration"]=13]="StyleDeclaration";t[t["Selection"]=14]="Selection";t[t["AdoptedStyleSheet"]=15]="AdoptedStyleSheet";t[t["CustomElement"]=16]="CustomElement";return t})(Gg||{});var Yg=(t=>{t[t["MouseUp"]=0]="MouseUp";t[t["MouseDown"]=1]="MouseDown";t[t["Click"]=2]="Click";t[t["ContextMenu"]=3]="ContextMenu";t[t["DblClick"]=4]="DblClick";t[t["Focus"]=5]="Focus";t[t["Blur"]=6]="Blur";t[t["TouchStart"]=7]="TouchStart";t[t["TouchMove_Departed"]=8]="TouchMove_Departed";t[t["TouchEnd"]=9]="TouchEnd";t[t["TouchCancel"]=10]="TouchCancel";return t})(Yg||{});var Xg=(t=>{t[t["Mouse"]=0]="Mouse";t[t["Pen"]=1]="Pen";t[t["Touch"]=2]="Touch";return t})(Xg||{});function Jg(t){let e=undefined;let n=t[0];let r=1;while(r<t.length){const i=t[r];const s=t[r+1];r+=2;if((i==="optionalAccess"||i==="optionalCall")&&n==null){return undefined}if(i==="access"||i==="optionalAccess"){e=n;n=s(n)}else if(i==="call"||i==="optionalCall"){n=s(((...t)=>n.call(e,...t)));e=undefined}}return n}function Kg(t){return"__ln"in t}class Vg{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 e=this.head;for(let n=0;n<t;n++){e=Jg([e,"optionalAccess",t=>t.next])||null}return e}addNode(t){const e={value:t,previous:null,next:null};t.__ln=e;if(t.previousSibling&&Kg(t.previousSibling)){const n=t.previousSibling.__ln.next;e.next=n;e.previous=t.previousSibling.__ln;t.previousSibling.__ln.next=e;if(n){n.previous=e}}else if(t.nextSibling&&Kg(t.nextSibling)&&t.nextSibling.__ln.previous){const n=t.nextSibling.__ln.previous;e.previous=n;e.next=t.nextSibling.__ln;t.nextSibling.__ln.previous=e;if(n){n.next=e}}else{if(this.head){this.head.previous=e}e.next=this.head;this.head=e}if(e.next===null){this.tail=e}this.length++}removeNode(t){const e=t.__ln;if(!this.head){return}if(!e.previous){this.head=e.next;if(this.head){this.head.previous=null}else{this.tail=null}}else{e.previous.next=e.next;if(e.next){e.next.previous=e.previous}else{this.tail=e.previous}}if(t.__ln){delete t.__ln}this.length--}}const Zg=(t,e)=>`${t}@${e}`;class Qg{constructor(){this.frozen=false;this.locked=false;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}const t=[];const e=new Set;const n=new Vg;const r=t=>{let e=t;let n=Om;while(n===Om){e=e&&e.nextSibling;n=e&&this.mirror.getId(e)}return n};const i=i=>{if(!i.parentNode||!jg(i)){return}const s=am(i.parentNode)?this.mirror.getId(Lg(i)):this.mirror.getId(i.parentNode);const o=r(i);if(s===-1||o===-1){return n.addNode(i)}const c=dg(i,{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:true,newlyAddedElement:true,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:t=>{if(Rg(t,this.mirror)&&!Tg(t,this.blockClass,this.blockSelector,this.unblockSelector,false)){this.iframeManager.addIframe(t)}if(Ng(t,this.mirror)){this.stylesheetManager.trackLinkElement(t)}if(Og(i)){this.shadowDomManager.addShadowRoot(i.shadowRoot,this.doc)}},onIframeLoad:(t,e)=>{if(Tg(t,this.blockClass,this.blockSelector,this.unblockSelector,false)){return}this.iframeManager.attachIframe(t,e);if(t.contentWindow){this.canvasManager.addWindow(t.contentWindow)}this.shadowDomManager.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{this.stylesheetManager.attachLinkElement(t,e)}});if(c){t.push({parentId:s,nextId:o,node:c});e.add(c.id)}};while(this.mapRemoves.length){this.mirror.removeNodeFromMap(this.mapRemoves.shift())}for(const t of this.movedSet){if(ey(this.removes,t,this.mirror)&&!this.movedSet.has(t.parentNode)){continue}i(t)}for(const t of this.addedSet){if(!ry(this.droppedSet,t)&&!ey(this.removes,t,this.mirror)){i(t)}else if(ry(this.movedSet,t)){i(t)}else{this.droppedSet.add(t)}}let s=null;while(n.length){let t=null;if(s){const e=this.mirror.getId(s.value.parentNode);const n=r(s.value);if(e!==-1&&n!==-1){t=s}}if(!t){let e=n.tail;while(e){const n=e;e=e.previous;if(n){const e=this.mirror.getId(n.value.parentNode);const i=r(n.value);if(i===-1)continue;else if(e!==-1){t=n;break}else{const e=n.value;if(e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const r=e.parentNode.host;const i=this.mirror.getId(r);if(i!==-1){t=n;break}}}}}}if(!t){while(n.head){n.removeNode(n.head.value)}break}s=t.previous;n.removeNode(t.value);i(t.value)}const o={texts:this.texts.map((t=>({id:this.mirror.getId(t.node),value:t.value}))).filter((t=>!e.has(t.id))).filter((t=>this.mirror.has(t.id))),attributes:this.attributes.map((t=>{const{attributes:e}=t;if(typeof e.style==="string"){const n=JSON.stringify(t.styleDiff);const r=JSON.stringify(t._unchangedStyles);if(n.length<e.style.length){if((n+r).split("var(").length===e.style.split("var(").length){e.style=t.styleDiff}}}return{id:this.mirror.getId(t.node),attributes:e}})).filter((t=>!e.has(t.id))).filter((t=>this.mirror.has(t.id))),removes:this.removes,adds:t};if(!o.texts.length&&!o.attributes.length&&!o.removes.length&&!o.adds.length){return}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(o)};this.processMutation=t=>{if(Eg(t.target,this.mirror)){return}switch(t.type){case"characterData":{const e=t.target.textContent;if(!Tg(t.target,this.blockClass,this.blockSelector,this.unblockSelector,false)&&e!==t.oldValue){this.texts.push({value:rg(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&e?this.maskTextFn?this.maskTextFn(e,Cg(t.target)):e.replace(/[\S]/g,"*"):e,node:t.target})}break}case"attributes":{const e=t.target;let n=t.attributeName;let r=t.target.getAttribute(n);if(n==="value"){const n=Cm(e);const i=e.tagName;r=Tm(e,i,n);const s=vm({maskInputOptions:this.maskInputOptions,tagName:i,type:n});const o=rg(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,s);r=wm({isMasked:o,element:e,value:r,maskInputFn:this.maskInputFn})}if(Tg(t.target,this.blockClass,this.blockSelector,this.unblockSelector,false)||r===t.oldValue){return}let i=this.attributeMap.get(t.target);if(e.tagName==="IFRAME"&&n==="src"&&!this.keepIframeSrcFn(r)){if(!e.contentDocument){n="rr_src"}else{return}}if(!i){i={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}};this.attributes.push(i);this.attributeMap.set(t.target,i)}if(n==="type"&&e.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"){e.setAttribute("data-rr-is-password","true")}if(!Zm(e.tagName,n)){i.attributes[n]=Vm(this.doc,_m(e.tagName),_m(n),r,e,this.maskAttributeFn);if(n==="style"){if(!this.unattachedDoc){try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}}const n=this.unattachedDoc.createElement("span");if(t.oldValue){n.setAttribute("style",t.oldValue)}for(const t of Array.from(e.style)){const r=e.style.getPropertyValue(t);const s=e.style.getPropertyPriority(t);if(r!==n.style.getPropertyValue(t)||s!==n.style.getPropertyPriority(t)){if(s===""){i.styleDiff[t]=r}else{i.styleDiff[t]=[r,s]}}else{i._unchangedStyles[t]=[r,s]}}for(const t of Array.from(n.style)){if(e.style.getPropertyValue(t)===""){i.styleDiff[t]=false}}}}break}case"childList":{if(Tg(t.target,this.blockClass,this.blockSelector,this.unblockSelector,true)){return}t.addedNodes.forEach((e=>this.genAdds(e,t.target)));t.removedNodes.forEach((e=>{const n=this.mirror.getId(e);const r=am(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);if(Tg(t.target,this.blockClass,this.blockSelector,this.unblockSelector,false)||Eg(e,this.mirror)||!Ig(e,this.mirror)){return}if(this.addedSet.has(e)){ty(this.addedSet,e);this.droppedSet.add(e)}else if(this.addedSet.has(t.target)&&n===-1);else if(Ag(t.target,this.mirror));else if(this.movedSet.has(e)&&this.movedMap[Zg(n,r)]){ty(this.movedSet,e)}else{this.removes.push({parentId:r,id:n,isShadow:am(t.target)&&um(t.target)?true:undefined})}this.mapRemoves.push(e)}));break}}};this.genAdds=(t,e)=>{if(this.processedNodeManager.inOtherBuffer(t,this))return;if(this.addedSet.has(t)||this.movedSet.has(t))return;if(this.mirror.hasNode(t)){if(Eg(t,this.mirror)){return}this.movedSet.add(t);let n=null;if(e&&this.mirror.hasNode(e)){n=this.mirror.getId(e)}if(n&&n!==-1){this.movedMap[Zg(this.mirror.getId(t),n)]=true}}else{this.addedSet.add(t);this.droppedSet.delete(t)}if(!Tg(t,this.blockClass,this.blockSelector,this.unblockSelector,false)){t.childNodes.forEach((t=>this.genAdds(t)));if(Og(t)){t.shadowRoot.childNodes.forEach((e=>{this.processedNodeManager.add(e,this);this.genAdds(e,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((e=>{this[e]=t[e]}))}freeze(){this.frozen=true;this.canvasManager.freeze()}unfreeze(){this.frozen=false;this.canvasManager.unfreeze();this.emit()}isFrozen(){return this.frozen}lock(){this.locked=true;this.canvasManager.lock()}unlock(){this.locked=false;this.canvasManager.unlock();this.emit()}reset(){this.shadowDomManager.reset();this.canvasManager.reset()}}function ty(t,e){t.delete(e);e.childNodes.forEach((e=>ty(t,e)))}function ey(t,e,n){if(t.length===0)return false;return ny(t,e,n)}function ny(t,e,n){const{parentNode:r}=e;if(!r){return false}const i=n.getId(r);if(t.some((t=>t.id===i))){return true}return ny(t,r,n)}function ry(t,e){if(t.size===0)return false;return iy(t,e)}function iy(t,e){const{parentNode:n}=e;if(!n){return false}if(t.has(n)){return true}return iy(t,n)}let sy;function oy(t){sy=t}function cy(){sy=undefined}const ay=t=>{if(!sy){return t}const e=(...e)=>{try{return t(...e)}catch(t){if(sy&&sy(t)===true){return()=>{}}throw t}};return e};function uy(t){let e=undefined;let n=t[0];let r=1;while(r<t.length){const i=t[r];const s=t[r+1];r+=2;if((i==="optionalAccess"||i==="optionalCall")&&n==null){return undefined}if(i==="access"||i==="optionalAccess"){e=n;n=s(n)}else if(i==="call"||i==="optionalCall"){n=s(((...t)=>n.call(e,...t)));e=undefined}}return n}const fy=[];function ly(t){try{if("composedPath"in t){const e=t.composedPath();if(e.length){return e[0]}}else if("path"in t&&t.path.length){return t.path[0]}}catch(t){}return t&&t.target}function dy(t,e){const n=new Qg;fy.push(n);n.init(t);let r=window.MutationObserver||window.__rrMutationObserver;const i=uy([window,"optionalAccess",t=>t.Zone,"optionalAccess",t=>t.__symbol__,"optionalCall",t=>t("MutationObserver")]);if(i&&window[i]){r=window[i]}const s=new r(ay((e=>{if(t.onMutation&&t.onMutation(e)===false){return}n.processMutations.bind(n)(e)})));s.observe(e,{attributes:true,attributeOldValue:true,characterData:true,characterDataOldValue:true,childList:true,subtree:true});return s}function hy({mousemoveCb:t,sampling:e,doc:n,mirror:r}){if(e.mousemove===false){return()=>{}}const i=typeof e.mousemove==="number"?e.mousemove:50;const s=typeof e.mousemoveCallback==="number"?e.mousemoveCallback:500;let o=[];let c;const a=bg(ay((e=>{const n=Date.now()-c;t(o.map((t=>{t.timeOffset-=n;return t})),e);o=[];c=null})),s);const u=ay(bg(ay((t=>{const e=ly(t);const{clientX:n,clientY:i}=$g(t)?t.changedTouches[0]:t;if(!c){c=_g()}o.push({x:n,y:i,id:r.getId(e),timeOffset:_g()-c});a(typeof DragEvent!=="undefined"&&t instanceof DragEvent?Gg.Drag:t instanceof MouseEvent?Gg.MouseMove:Gg.TouchMove)})),i,{trailing:false}));const f=[mg("mousemove",u,n),mg("touchmove",u,n),mg("drag",u,n)];return ay((()=>{f.forEach((t=>t()))}))}function py({mouseInteractionCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,sampling:o}){if(o.mouseInteraction===false){return()=>{}}const c=o.mouseInteraction===true||o.mouseInteraction===undefined?{}:o.mouseInteraction;const a=[];let u=null;const f=e=>o=>{const c=ly(o);if(Tg(c,r,i,s,true)){return}let a=null;let f=e;if("pointerType"in o){switch(o.pointerType){case"mouse":a=Xg.Mouse;break;case"touch":a=Xg.Touch;break;case"pen":a=Xg.Pen;break}if(a===Xg.Touch){if(Yg[e]===Yg.MouseDown){f="TouchStart"}else if(Yg[e]===Yg.MouseUp){f="TouchEnd"}}else if(a===Xg.Pen);}else if($g(o)){a=Xg.Touch}if(a!==null){u=a;if(f.startsWith("Touch")&&a===Xg.Touch||f.startsWith("Mouse")&&a===Xg.Mouse){a=null}}else if(Yg[e]===Yg.Click){a=u;u=null}const l=$g(o)?o.changedTouches[0]:o;if(!l){return}const d=n.getId(c);const{clientX:h,clientY:p}=l;ay(t)({type:Yg[f],id:d,x:h,y:p,...a!==null&&{pointerType:a}})};Object.keys(Yg).filter((t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&c[t]!==false)).forEach((t=>{let n=_m(t);const r=f(t);if(window.PointerEvent){switch(Yg[t]){case Yg.MouseDown:case Yg.MouseUp:n=n.replace("mouse","pointer");break;case Yg.TouchStart:case Yg.TouchEnd:return}}a.push(mg(n,r,e))}));return ay((()=>{a.forEach((t=>t()))}))}function my({scrollCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,sampling:o}){const c=ay(bg(ay((o=>{const c=ly(o);if(!c||Tg(c,r,i,s,true)){return}const a=n.getId(c);if(c===e&&e.defaultView){const n=kg(e.defaultView);t({id:a,x:n.left,y:n.top})}else{t({id:a,x:c.scrollLeft,y:c.scrollTop})}})),o.scroll||100));return mg("scroll",c,e)}function gy({viewportResizeCb:t},{win:e}){let n=-1;let r=-1;const i=ay(bg(ay((()=>{const e=Sg();const i=xg();if(n!==e||r!==i){t({width:Number(i),height:Number(e)});n=e;r=i}})),200));return mg("resize",i,e)}const yy=["INPUT","TEXTAREA","SELECT"];const by=new WeakMap;function vy({inputCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,ignoreClass:o,ignoreSelector:c,maskInputOptions:a,maskInputFn:u,sampling:f,userTriggeredOnInput:l,maskTextClass:d,unmaskTextClass:h,maskTextSelector:p,unmaskTextSelector:m}){function g(t){let n=ly(t);const f=t.isTrusted;const g=n&&km(n.tagName);if(g==="OPTION")n=n.parentElement;if(!n||!g||yy.indexOf(g)<0||Tg(n,r,i,s,true)){return}const b=n;if(b.classList.contains(o)||c&&b.matches(c)){return}const v=Cm(n);let w=Tm(b,g,v);let _=false;const k=vm({maskInputOptions:a,tagName:g,type:v});const S=rg(n,d,p,h,m,k);if(v==="radio"||v==="checkbox"){_=n.checked}w=wm({isMasked:S,element:n,value:w,maskInputFn:u});y(n,l?{text:w,isChecked:_,userTriggered:f}:{text:w,isChecked:_});const x=n.name;if(v==="radio"&&x&&_){e.querySelectorAll(`input[type="radio"][name="${x}"]`).forEach((t=>{if(t!==n){const e=wm({isMasked:S,element:t,value:Tm(t,g,v),maskInputFn:u});y(t,l?{text:e,isChecked:!_,userTriggered:false}:{text:e,isChecked:!_})}}))}}function y(e,r){const i=by.get(e);if(!i||i.text!==r.text||i.isChecked!==r.isChecked){by.set(e,r);const i=n.getId(e);ay(t)({...r,id:i})}}const b=f.input==="last"?["change"]:["input","change"];const v=b.map((t=>mg(t,ay(g),e)));const w=e.defaultView;if(!w){return()=>{v.forEach((t=>t()))}}const _=w.Object.getOwnPropertyDescriptor(w.HTMLInputElement.prototype,"value");const k=[[w.HTMLInputElement.prototype,"value"],[w.HTMLInputElement.prototype,"checked"],[w.HTMLSelectElement.prototype,"value"],[w.HTMLTextAreaElement.prototype,"value"],[w.HTMLSelectElement.prototype,"selectedIndex"],[w.HTMLOptionElement.prototype,"selected"]];if(_&&_.set){v.push(...k.map((t=>vg(t[0],t[1],{set(){ay(g)({target:this,isTrusted:false})}},false,w))))}return ay((()=>{v.forEach((t=>t()))}))}function wy(t){const e=[];function n(t,e){if($y("CSSGroupingRule")&&t.parentRule instanceof CSSGroupingRule||$y("CSSMediaRule")&&t.parentRule instanceof CSSMediaRule||$y("CSSSupportsRule")&&t.parentRule instanceof CSSSupportsRule||$y("CSSConditionRule")&&t.parentRule instanceof CSSConditionRule){const n=Array.from(t.parentRule.cssRules);const r=n.indexOf(t);e.unshift(r)}else if(t.parentStyleSheet){const n=Array.from(t.parentStyleSheet.cssRules);const r=n.indexOf(t);e.unshift(r)}return e}return n(t,e)}function _y(t,e,n){let r,i;if(!t)return{};if(t.ownerNode)r=e.getId(t.ownerNode);else i=n.getId(t);return{styleId:i,id:r}}function ky({styleSheetRuleCb:t,mirror:e,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype){return()=>{}}const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:ay(((r,i,s)=>{const[o,c]=s;const{id:a,styleId:u}=_y(i,e,n.styleMirror);if(a&&a!==-1||u&&u!==-1){t({id:a,styleId:u,adds:[{rule:o,index:c}]})}return r.apply(i,s)}))});const s=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:ay(((r,i,s)=>{const[o]=s;const{id:c,styleId:a}=_y(i,e,n.styleMirror);if(c&&c!==-1||a&&a!==-1){t({id:c,styleId:a,removes:[{index:o}]})}return r.apply(i,s)}))});let o;if(r.CSSStyleSheet.prototype.replace){o=r.CSSStyleSheet.prototype.replace;r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:ay(((r,i,s)=>{const[o]=s;const{id:c,styleId:a}=_y(i,e,n.styleMirror);if(c&&c!==-1||a&&a!==-1){t({id:c,styleId:a,replace:o})}return r.apply(i,s)}))})}let c;if(r.CSSStyleSheet.prototype.replaceSync){c=r.CSSStyleSheet.prototype.replaceSync;r.CSSStyleSheet.prototype.replaceSync=new Proxy(c,{apply:ay(((r,i,s)=>{const[o]=s;const{id:c,styleId:a}=_y(i,e,n.styleMirror);if(c&&c!==-1||a&&a!==-1){t({id:c,styleId:a,replaceSync:o})}return r.apply(i,s)}))})}const a={};if(My("CSSGroupingRule")){a.CSSGroupingRule=r.CSSGroupingRule}else{if(My("CSSMediaRule")){a.CSSMediaRule=r.CSSMediaRule}if(My("CSSConditionRule")){a.CSSConditionRule=r.CSSConditionRule}if(My("CSSSupportsRule")){a.CSSSupportsRule=r.CSSSupportsRule}}const u={};Object.entries(a).forEach((([r,i])=>{u[r]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule};i.prototype.insertRule=new Proxy(u[r].insertRule,{apply:ay(((r,i,s)=>{const[o,c]=s;const{id:a,styleId:u}=_y(i.parentStyleSheet,e,n.styleMirror);if(a&&a!==-1||u&&u!==-1){t({id:a,styleId:u,adds:[{rule:o,index:[...wy(i),c||0]}]})}return r.apply(i,s)}))});i.prototype.deleteRule=new Proxy(u[r].deleteRule,{apply:ay(((r,i,s)=>{const[o]=s;const{id:c,styleId:a}=_y(i.parentStyleSheet,e,n.styleMirror);if(c&&c!==-1||a&&a!==-1){t({id:c,styleId:a,removes:[{index:[...wy(i),o]}]})}return r.apply(i,s)}))})}));return ay((()=>{r.CSSStyleSheet.prototype.insertRule=i;r.CSSStyleSheet.prototype.deleteRule=s;o&&(r.CSSStyleSheet.prototype.replace=o);c&&(r.CSSStyleSheet.prototype.replaceSync=c);Object.entries(a).forEach((([t,e])=>{e.prototype.insertRule=u[t].insertRule;e.prototype.deleteRule=u[t].deleteRule}))}))}function Sy({mirror:t,stylesheetManager:e},n){let r=null;if(n.nodeName==="#document")r=t.getId(n);else r=t.getId(n.host);const i=n.nodeName==="#document"?uy([n,"access",t=>t.defaultView,"optionalAccess",t=>t.Document]):uy([n,"access",t=>t.ownerDocument,"optionalAccess",t=>t.defaultView,"optionalAccess",t=>t.ShadowRoot]);const s=uy([i,"optionalAccess",t=>t.prototype])?Object.getOwnPropertyDescriptor(uy([i,"optionalAccess",t=>t.prototype]),"adoptedStyleSheets"):undefined;if(r===null||r===-1||!i||!s)return()=>{};Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get(){return uy([s,"access",t=>t.get,"optionalAccess",t=>t.call,"call",t=>t(this)])},set(t){const n=uy([s,"access",t=>t.set,"optionalAccess",t=>t.call,"call",e=>e(this,t)]);if(r!==null&&r!==-1){try{e.adoptStyleSheets(t,r)}catch(t){}}return n}});return ay((()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get:s.get,set:s.set})}))}function xy({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){const s=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:ay(((i,o,c)=>{const[a,u,f]=c;if(n.has(a)){return s.apply(o,[a,u,f])}const{id:l,styleId:d}=_y(uy([o,"access",t=>t.parentRule,"optionalAccess",t=>t.parentStyleSheet]),e,r.styleMirror);if(l&&l!==-1||d&&d!==-1){t({id:l,styleId:d,set:{property:a,value:u,priority:f},index:wy(o.parentRule)})}return i.apply(o,c)}))});const o=i.CSSStyleDeclaration.prototype.removeProperty;i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:ay(((i,s,c)=>{const[a]=c;if(n.has(a)){return o.apply(s,[a])}const{id:u,styleId:f}=_y(uy([s,"access",t=>t.parentRule,"optionalAccess",t=>t.parentStyleSheet]),e,r.styleMirror);if(u&&u!==-1||f&&f!==-1){t({id:u,styleId:f,remove:{property:a},index:wy(s.parentRule)})}return i.apply(s,c)}))});return ay((()=>{i.CSSStyleDeclaration.prototype.setProperty=s;i.CSSStyleDeclaration.prototype.removeProperty=o}))}function Cy({mediaInteractionCb:t,blockClass:e,blockSelector:n,unblockSelector:r,mirror:i,sampling:s,doc:o}){const c=ay((o=>bg(ay((s=>{const c=ly(s);if(!c||Tg(c,e,n,r,true)){return}const{currentTime:a,volume:u,muted:f,playbackRate:l}=c;t({type:o,id:i.getId(c),currentTime:a,volume:u,muted:f,playbackRate:l})})),s.media||500)));const a=[mg("play",c(0),o),mg("pause",c(1),o),mg("seeked",c(2),o),mg("volumechange",c(3),o),mg("ratechange",c(4),o)];return ay((()=>{a.forEach((t=>t()))}))}function Ty({fontCb:t,doc:e}){const n=e.defaultView;if(!n){return()=>{}}const r=[];const i=new WeakMap;const s=n.FontFace;n.FontFace=function t(e,n,r){const o=new s(e,n,r);i.set(o,{family:e,buffer:typeof n!=="string",descriptors:r,fontSource:typeof n==="string"?n:JSON.stringify(Array.from(new Uint8Array(n)))});return o};const o=wg(e.fonts,"add",(function(e){return function(n){qg(ay((()=>{const e=i.get(n);if(e){t(e);i.delete(n)}})),0);return e.apply(this,[n])}}));r.push((()=>{n.FontFace=s}));r.push(o);return ay((()=>{r.forEach((t=>t()))}))}function Iy(t){const{doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,selectionCb:o}=t;let c=true;const a=ay((()=>{const t=e.getSelection();if(!t||c&&uy([t,"optionalAccess",t=>t.isCollapsed]))return;c=t.isCollapsed||false;const a=[];const u=t.rangeCount||0;for(let e=0;e<u;e++){const o=t.getRangeAt(e);const{startContainer:c,startOffset:u,endContainer:f,endOffset:l}=o;const d=Tg(c,r,i,s,true)||Tg(f,r,i,s,true);if(d)continue;a.push({start:n.getId(c),startOffset:u,end:n.getId(f),endOffset:l})}o({ranges:a})}));a();return mg("selectionchange",a)}function Ey({doc:t,customElementCb:e}){const n=t.defaultView;if(!n||!n.customElements)return()=>{};const r=wg(n.customElements,"define",(function(t){return function(n,r,i){try{e({define:{name:n}})}catch(t){}return t.apply(this,[n,r,i])}}));return r}function Ay(t,e={}){const n=t.doc.defaultView;if(!n){return()=>{}}let r;if(t.recordDOM){r=dy(t,t.doc)}const i=hy(t);const s=py(t);const o=my(t);const c=gy(t,{win:n});const a=vy(t);const u=Cy(t);let f=()=>{};let l=()=>{};let d=()=>{};let h=()=>{};if(t.recordDOM){f=ky(t,{win:n});l=Sy(t,t.doc);d=xy(t,{win:n});if(t.collectFonts){h=Ty(t)}}const p=Iy(t);const m=Ey(t);const g=[];for(const e of t.plugins){g.push(e.observer(e.callback,n,e.options))}return ay((()=>{fy.forEach((t=>t.reset()));uy([r,"optionalAccess",t=>t.disconnect,"call",t=>t()]);i();s();o();c();a();u();f();l();d();h();p();m();g.forEach((t=>t()))}))}function $y(t){return typeof window[t]!=="undefined"}function My(t){return Boolean(typeof window[t]!=="undefined"&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class Ry{constructor(t){this.generateIdFn=t;this.iframeIdToRemoteIdMap=new WeakMap;this.iframeRemoteIdToIdMap=new WeakMap}getId(t,e,n,r){const i=n||this.getIdToRemoteIdMap(t);const s=r||this.getRemoteIdToIdMap(t);let o=i.get(e);if(!o){o=this.generateIdFn();i.set(e,o);s.set(o,e)}return o}getIds(t,e){const n=this.getIdToRemoteIdMap(t);const r=this.getRemoteIdToIdMap(t);return e.map((e=>this.getId(t,e,n,r)))}getRemoteId(t,e,n){const r=n||this.getRemoteIdToIdMap(t);if(typeof e!=="number")return e;const i=r.get(e);if(!i)return-1;return i}getRemoteIds(t,e){const n=this.getRemoteIdToIdMap(t);return e.map((e=>this.getRemoteId(t,e,n)))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap;this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t);this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let e=this.iframeIdToRemoteIdMap.get(t);if(!e){e=new Map;this.iframeIdToRemoteIdMap.set(t,e)}return e}getRemoteIdToIdMap(t){let e=this.iframeRemoteIdToIdMap.get(t);if(!e){e=new Map;this.iframeRemoteIdToIdMap.set(t,e)}return e}}function Ny(t){let e=undefined;let n=t[0];let r=1;while(r<t.length){const i=t[r];const s=t[r+1];r+=2;if((i==="optionalAccess"||i==="optionalCall")&&n==null){return undefined}if(i==="access"||i==="optionalAccess"){e=n;n=s(n)}else if(i==="call"||i==="optionalCall"){n=s(((...t)=>n.call(e,...t)));e=undefined}}return n}class Oy{constructor(){this.crossOriginIframeMirror=new Ry(Dm);this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class Dy{constructor(t){this.iframes=new WeakMap;this.crossOriginIframeMap=new WeakMap;this.crossOriginIframeMirror=new Ry(Dm);this.crossOriginIframeRootIdMap=new WeakMap;this.mutationCb=t.mutationCb;this.wrappedEmit=t.wrappedEmit;this.stylesheetManager=t.stylesheetManager;this.recordCrossOriginIframes=t.recordCrossOriginIframes;this.crossOriginIframeStyleMirror=new Ry(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror));this.mirror=t.mirror;if(this.recordCrossOriginIframes){window.addEventListener("message",this.handleMessage.bind(this))}}addIframe(t){this.iframes.set(t,true);if(t.contentWindow)this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,e){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:true});Ny([this,"access",t=>t.loadListener,"optionalCall",e=>e(t)]);if(t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0)this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const e=t;if(e.data.type!=="rrweb"||e.origin!==e.data.origin)return;const n=t.source;if(!n)return;const r=this.crossOriginIframeMap.get(t.source);if(!r)return;const i=this.transformCrossOriginEvent(r,e.data.event);if(i)this.wrappedEmit(i,e.data.isCheckout)}transformCrossOriginEvent(t,e){switch(e.type){case Wg.FullSnapshot:{this.crossOriginIframeMirror.reset(t);this.crossOriginIframeStyleMirror.reset(t);this.replaceIdOnNode(e.data.node,t);const n=e.data.node.id;this.crossOriginIframeRootIdMap.set(t,n);this.patchRootIdOnNode(e.data.node,n);return{timestamp:e.timestamp,type:Wg.IncrementalSnapshot,data:{source:Gg.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:true}}}case Wg.Meta:case Wg.Load:case Wg.DomContentLoaded:{return false}case Wg.Plugin:{return e}case Wg.Custom:{this.replaceIds(e.data.payload,t,["id","parentId","previousId","nextId"]);return e}case Wg.IncrementalSnapshot:{switch(e.data.source){case Gg.Mutation:{e.data.adds.forEach((e=>{this.replaceIds(e,t,["parentId","nextId","previousId"]);this.replaceIdOnNode(e.node,t);const n=this.crossOriginIframeRootIdMap.get(t);n&&this.patchRootIdOnNode(e.node,n)}));e.data.removes.forEach((e=>{this.replaceIds(e,t,["parentId","id"])}));e.data.attributes.forEach((e=>{this.replaceIds(e,t,["id"])}));e.data.texts.forEach((e=>{this.replaceIds(e,t,["id"])}));return e}case Gg.Drag:case Gg.TouchMove:case Gg.MouseMove:{e.data.positions.forEach((e=>{this.replaceIds(e,t,["id"])}));return e}case Gg.ViewportResize:{return false}case Gg.MediaInteraction:case Gg.MouseInteraction:case Gg.Scroll:case Gg.CanvasMutation:case Gg.Input:{this.replaceIds(e.data,t,["id"]);return e}case Gg.StyleSheetRule:case Gg.StyleDeclaration:{this.replaceIds(e.data,t,["id"]);this.replaceStyleIds(e.data,t,["styleId"]);return e}case Gg.Font:{return e}case Gg.Selection:{e.data.ranges.forEach((e=>{this.replaceIds(e,t,["start","end"])}));return e}case Gg.AdoptedStyleSheet:{this.replaceIds(e.data,t,["id"]);this.replaceStyleIds(e.data,t,["styleIds"]);Ny([e,"access",t=>t.data,"access",t=>t.styles,"optionalAccess",t=>t.forEach,"call",e=>e((e=>{this.replaceStyleIds(e,t,["styleId"])}))]);return e}}}}return false}replace(t,e,n,r){for(const i of r){if(!Array.isArray(e[i])&&typeof e[i]!=="number")continue;if(Array.isArray(e[i])){e[i]=t.getIds(n,e[i])}else{e[i]=t.getId(n,e[i])}}return e}replaceIds(t,e,n){return this.replace(this.crossOriginIframeMirror,t,e,n)}replaceStyleIds(t,e,n){return this.replace(this.crossOriginIframeStyleMirror,t,e,n)}replaceIdOnNode(t,e){this.replaceIds(t,e,["id","rootId"]);if("childNodes"in t){t.childNodes.forEach((t=>{this.replaceIdOnNode(t,e)}))}}patchRootIdOnNode(t,e){if(t.type!==om.Document&&!t.rootId)t.rootId=e;if("childNodes"in t){t.childNodes.forEach((t=>{this.patchRootIdOnNode(t,e)}))}}}class Ly{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class Fy{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,e){if(!um(t))return;if(this.shadowDoms.has(t))return;this.shadowDoms.add(t);this.bypassOptions.canvasManager.addShadowRoot(t);const n=dy({...this.bypassOptions,doc:e,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push((()=>n.disconnect()));this.restoreHandlers.push(my({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror}));qg((()=>{if(t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0)this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host));this.restoreHandlers.push(Sy({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))}),0)}observeAttachShadow(t){if(!t.contentWindow||!t.contentDocument)return;this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,e){const n=this;this.restoreHandlers.push(wg(t.prototype,"attachShadow",(function(t){return function(r){const i=t.call(this,r);if(this.shadowRoot&&jg(this))n.addShadowRoot(this.shadowRoot,e);return i}})))}reset(){this.restoreHandlers.forEach((t=>{try{t()}catch(t){}}));this.restoreHandlers=[];this.shadowDoms=new WeakSet;this.bypassOptions.canvasManager.resetShadowRoots()}}class Py{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class jy{constructor(t){this.trackedLinkElements=new WeakSet;this.styleMirror=new Dg;this.mutationCb=t.mutationCb;this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,e){if("_cssText"in e.attributes)this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e.id,attributes:e.attributes}]});this.trackLinkElement(t)}trackLinkElement(t){if(this.trackedLinkElements.has(t))return;this.trackedLinkElements.add(t);this.trackStylesheetInLinkElement(t)}adoptStyleSheets(t,e){if(t.length===0)return;const n={id:e,styleIds:[]};const r=[];for(const e of t){let t;if(!this.styleMirror.has(e)){t=this.styleMirror.add(e);r.push({styleId:t,rules:Array.from(e.rules||CSSRule,((t,e)=>({rule:hm(t),index:e})))})}else t=this.styleMirror.getId(e);n.styleIds.push(t)}if(r.length>0)n.styles=r;this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset();this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class By{constructor(){this.nodeMap=new WeakMap;this.loop=true;this.periodicallyClear()}periodicallyClear(){Ug((()=>{this.clear();if(this.loop)this.periodicallyClear()}))}inOtherBuffer(t,e){const n=this.nodeMap.get(t);return n&&Array.from(n).some((t=>t!==e))}add(t,e){this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(e))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=false}}let zy;let Uy;try{if(Array.from([1],(t=>t*2))[0]!==2){const t=document.createElement("iframe");document.body.appendChild(t);Array.from=wr([t,"access",t=>t.contentWindow,"optionalAccess",t=>t.Array,"access",t=>t.from])||Array.from;document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}const qy=bm();function Hy(t={}){const{emit:e,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:s=null,unblockSelector:o=null,ignoreClass:c="rr-ignore",ignoreSelector:a=null,maskAllText:u=false,maskTextClass:f="rr-mask",unmaskTextClass:l=null,maskTextSelector:d=null,unmaskTextSelector:h=null,inlineStylesheet:p=true,maskAllInputs:m,maskInputOptions:g,slimDOMOptions:y,maskAttributeFn:b,maskInputFn:v,maskTextFn:w,maxCanvasSize:_=null,packFn:k,sampling:S={},dataURLOptions:x={},mousemoveWait:C,recordDOM:T=true,recordCanvas:I=false,recordCrossOriginIframes:E=false,recordAfter:A=(t.recordAfter==="DOMContentLoaded"?t.recordAfter:"load"),userTriggeredOnInput:$=false,collectFonts:M=false,inlineImages:R=false,plugins:N,keepIframeSrcFn:O=(()=>false),ignoreCSSAttributes:D=new Set([]),errorHandler:L,onMutation:F,getCanvasManager:P}=t;oy(L);const j=E?window.parent===window:true;let B=false;if(!j){try{if(window.parent.document){B=false}}catch(t){B=true}}if(j&&!e){throw new Error("emit function is required")}if(C!==undefined&&S.mousemove===undefined){S.mousemove=C}qy.reset();const z=m===true?{color:true,date:true,"datetime-local":true,email:true,month:true,number:true,range:true,search:true,tel:true,text:true,time:true,url:true,week:true,textarea:true,select:true,radio:true,checkbox:true}:g!==undefined?g:{};const U=y===true||y==="all"?{script:true,comment:true,headFavicon:true,headWhitespace:true,headMetaSocial:true,headMetaRobots:true,headMetaHttpEquiv:true,headMetaVerification:true,headMetaAuthorship:y==="all",headMetaDescKeywords:y==="all"}:y?y:{};Mg();let q;let H=0;const W=t=>{for(const e of N||[]){if(e.eventProcessor){t=e.eventProcessor(t)}}if(k&&!B){t=k(t)}return t};zy=(t,i)=>{const s=t;s.timestamp=_g();if(wr([fy,"access",t=>t[0],"optionalAccess",t=>t.isFrozen,"call",t=>t()])&&s.type!==Wg.FullSnapshot&&!(s.type===Wg.IncrementalSnapshot&&s.data.source===Gg.Mutation)){fy.forEach((t=>t.unfreeze()))}if(j){wr([e,"optionalCall",t=>t(W(s),i)])}else if(B){const t={type:"rrweb",event:W(s),origin:window.location.origin,isCheckout:i};window.parent.postMessage(t,"*")}if(s.type===Wg.FullSnapshot){q=s;H=0}else if(s.type===Wg.IncrementalSnapshot){if(s.data.source===Gg.Mutation&&s.data.isAttachIframe){return}H++;const t=r&&H>=r;const e=n&&q&&s.timestamp-q.timestamp>n;if(t||e){et(true)}}};const G=t=>{zy({type:Wg.IncrementalSnapshot,data:{source:Gg.Mutation,...t}})};const Y=t=>zy({type:Wg.IncrementalSnapshot,data:{source:Gg.Scroll,...t}});const X=t=>zy({type:Wg.IncrementalSnapshot,data:{source:Gg.CanvasMutation,...t}});const J=t=>zy({type:Wg.IncrementalSnapshot,data:{source:Gg.AdoptedStyleSheet,...t}});const K=new jy({mutationCb:G,adoptedStyleSheetCb:J});const V=typeof __RRWEB_EXCLUDE_IFRAME__==="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new Oy:new Dy({mirror:qy,mutationCb:G,stylesheetManager:K,recordCrossOriginIframes:E,wrappedEmit:zy});for(const t of N||[]){if(t.getMirror)t.getMirror({nodeMirror:qy,crossOriginIframeMirror:V.crossOriginIframeMirror,crossOriginIframeStyleMirror:V.crossOriginIframeStyleMirror})}const Z=new By;const Q=Gy(P,{mirror:qy,win:window,mutationCb:t=>zy({type:Wg.IncrementalSnapshot,data:{source:Gg.CanvasMutation,...t}}),recordCanvas:I,blockClass:i,blockSelector:s,unblockSelector:o,maxCanvasSize:_,sampling:S["canvas"],dataURLOptions:x,errorHandler:L});const tt=typeof __RRWEB_EXCLUDE_SHADOW_DOM__==="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new Ly:new Fy({mutationCb:G,scrollCb:Y,bypassOptions:{onMutation:F,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:u,maskTextClass:f,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:h,inlineStylesheet:p,maskInputOptions:z,dataURLOptions:x,maskAttributeFn:b,maskTextFn:w,maskInputFn:v,recordCanvas:I,inlineImages:R,sampling:S,slimDOMOptions:U,iframeManager:V,stylesheetManager:K,canvasManager:Q,keepIframeSrcFn:O,processedNodeManager:Z},mirror:qy});const et=(t=false)=>{if(!T){return}zy({type:Wg.Meta,data:{href:window.location.href,width:xg(),height:Sg()}},t);K.reset();tt.init();fy.forEach((t=>t.lock()));const e=hg(document,{mirror:qy,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:u,maskTextClass:f,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:h,inlineStylesheet:p,maskAllInputs:z,maskAttributeFn:b,maskInputFn:v,maskTextFn:w,slimDOM:U,dataURLOptions:x,recordCanvas:I,inlineImages:R,onSerialize:t=>{if(Rg(t,qy)){V.addIframe(t)}if(Ng(t,qy)){K.trackLinkElement(t)}if(Og(t)){tt.addShadowRoot(t.shadowRoot,document)}},onIframeLoad:(t,e)=>{V.attachIframe(t,e);if(t.contentWindow){Q.addWindow(t.contentWindow)}tt.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{K.attachLinkElement(t,e)},keepIframeSrcFn:O});if(!e){return console.warn("Failed to snapshot the document")}zy({type:Wg.FullSnapshot,data:{node:e,initialOffset:kg(window)}});fy.forEach((t=>t.unlock()));if(document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0)K.adoptStyleSheets(document.adoptedStyleSheets,qy.getId(document))};Uy=et;try{const t=[];const e=t=>ay(Ay)({onMutation:F,mutationCb:G,mousemoveCb:(t,e)=>zy({type:Wg.IncrementalSnapshot,data:{source:e,positions:t}}),mouseInteractionCb:t=>zy({type:Wg.IncrementalSnapshot,data:{source:Gg.MouseInteraction,...t}}),scrollCb:Y,viewportResizeCb:t=>zy({type:Wg.IncrementalSnapshot,data:{source:Gg.ViewportResize,...t}}),inputCb:t=>zy({type:Wg.IncrementalSnapshot,data:{source:Gg.Input,...t}}),mediaInteractionCb:t=>zy({type:Wg.IncrementalSnapshot,data:{source:Gg.MediaInteraction,...t}}),styleSheetRuleCb:t=>zy({type:Wg.IncrementalSnapshot,data:{source:Gg.StyleSheetRule,...t}}),styleDeclarationCb:t=>zy({type:Wg.IncrementalSnapshot,data:{source:Gg.StyleDeclaration,...t}}),canvasMutationCb:X,fontCb:t=>zy({type:Wg.IncrementalSnapshot,data:{source:Gg.Font,...t}}),selectionCb:t=>{zy({type:Wg.IncrementalSnapshot,data:{source:Gg.Selection,...t}})},customElementCb:t=>{zy({type:Wg.IncrementalSnapshot,data:{source:Gg.CustomElement,...t}})},blockClass:i,ignoreClass:c,ignoreSelector:a,maskAllText:u,maskTextClass:f,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:h,maskInputOptions:z,inlineStylesheet:p,sampling:S,recordDOM:T,recordCanvas:I,inlineImages:R,userTriggeredOnInput:$,collectFonts:M,doc:t,maskAttributeFn:b,maskInputFn:v,maskTextFn:w,keepIframeSrcFn:O,blockSelector:s,unblockSelector:o,slimDOMOptions:U,dataURLOptions:x,mirror:qy,iframeManager:V,stylesheetManager:K,shadowDomManager:tt,processedNodeManager:Z,canvasManager:Q,ignoreCSSAttributes:D,plugins:wr([N,"optionalAccess",t=>t.filter,"call",t=>t((t=>t.observer)),"optionalAccess",t=>t.map,"call",t=>t((t=>({observer:t.observer,options:t.options,callback:e=>zy({type:Wg.Plugin,data:{plugin:t.name,payload:e}})})))])||[]},{});V.addLoadListener((n=>{try{t.push(e(n.contentDocument))}catch(t){console.warn(t)}}));const n=()=>{et();t.push(e(document))};if(document.readyState==="interactive"||document.readyState==="complete"){n()}else{t.push(mg("DOMContentLoaded",(()=>{zy({type:Wg.DomContentLoaded,data:{}});if(A==="DOMContentLoaded")n()})));t.push(mg("load",(()=>{zy({type:Wg.Load,data:{}});if(A==="load")n()}),window))}return()=>{t.forEach((t=>t()));Z.destroy();Uy=undefined;cy()}}catch(t){console.warn(t)}}function Wy(t){if(!Uy){throw new Error("please take full snapshot after start recording")}Uy(t)}Hy.mirror=qy;Hy.takeFullSnapshot=Wy;function Gy(t,e){try{return t?t(e):new Py}catch(t){console.warn("Unable to initialize CanvasManager");return new Py}}const Yy=typeof __SENTRY_DEBUG__==="undefined"||__SENTRY_DEBUG__;const Xy=["info","warn","error","log"];const Jy="[Replay] ";function Ky(t,e="info"){Cc({category:"console",data:{logger:"replay"},level:e,message:`${Jy}${t}`},{level:e})}function Vy(){let t=false;let e=false;const n={exception:()=>undefined,infoTick:()=>undefined,setConfig:n=>{t=n.captureExceptions;e=n.traceInternals}};if(Yy){Xy.forEach((t=>{n[t]=(...n)=>{G[t](Jy,...n);if(e){Ky(n[0])}}}));n.exception=(r,...i)=>{if(n.error){n.error(...i)}G.error(Jy,r);if(t){fo(r)}else if(e){Ky(r)}};n.infoTick=(...t)=>{G.info(Jy,...t);if(e){setTimeout((()=>Ky(t[0])),0)}}}else{Xy.forEach((t=>{n[t]=()=>undefined}))}return n}const Zy=Vy();const Qy=3;const tb=5;function eb(t){const e=t>9999999999;return e?t:t*1e3}function nb(t){const e=t>9999999999;return e?t/1e3:t}function rb(t,e){if(e.category==="sentry.transaction"){return}if(["ui.click","ui.input"].includes(e.category)){t.triggerUserActivity()}else{t.checkAndHandleExpiredSession()}t.addUpdate((()=>{t.throttledAddEvent({type:Wg.Custom,timestamp:(e.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:Ie(e,10,1e3)}});return e.category==="console"}))}const ib="button,a";function sb(t){const e=t.closest(ib);return e||t}function ob(t){const e=cb(t);if(!e||!(e instanceof Element)){return e}return sb(e)}function cb(t){if(ab(t)){return t.target}return t}function ab(t){return typeof t==="object"&&!!t&&"target"in t}let ub;function fb(t){if(!ub){ub=[];lb()}ub.push(t);return()=>{const e=ub?ub.indexOf(t):-1;if(e>-1){ub.splice(e,1)}}}function lb(){et(jp,"open",(function(t){return function(...e){if(ub){try{ub.forEach((t=>t()))}catch(t){}}return t.apply(jp,e)}}))}const db=new Set([Gg.Mutation,Gg.StyleSheetRule,Gg.StyleDeclaration,Gg.AdoptedStyleSheet,Gg.CanvasMutation,Gg.Selection,Gg.MediaInteraction]);function hb(t,e,n){t.handleClick(e,n)}class pb{constructor(t,e,n=rb){this._lastMutation=0;this._lastScroll=0;this._clicks=[];this._timeout=e.timeout/1e3;this._threshold=e.threshold/1e3;this._scollTimeout=e.scrollTimeout/1e3;this._replay=t;this._ignoreSelector=e.ignoreSelector;this._addBreadcrumbEvent=n}addListeners(){const t=fb((()=>{this._lastMutation=bb()}));this._teardown=()=>{t();this._clicks=[];this._lastMutation=0;this._lastScroll=0}}removeListeners(){if(this._teardown){this._teardown()}if(this._checkClickTimeout){clearTimeout(this._checkClickTimeout)}}handleClick(t,e){if(gb(e,this._ignoreSelector)||!yb(t)){return}const n={timestamp:nb(t.timestamp),clickBreadcrumb:t,clickCount:0,node:e};if(this._clicks.some((t=>t.node===n.node&&Math.abs(t.timestamp-n.timestamp)<1))){return}this._clicks.push(n);if(this._clicks.length===1){this._scheduleCheckClicks()}}registerMutation(t=Date.now()){this._lastMutation=nb(t)}registerScroll(t=Date.now()){this._lastScroll=nb(t)}registerClick(t){const e=sb(t);this._handleMultiClick(e)}_handleMultiClick(t){this._getClicks(t).forEach((t=>{t.clickCount++}))}_getClicks(t){return this._clicks.filter((e=>e.node===t))}_checkClicks(){const t=[];const e=bb();this._clicks.forEach((n=>{if(!n.mutationAfter&&this._lastMutation){n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:undefined}if(!n.scrollAfter&&this._lastScroll){n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:undefined}if(n.timestamp+this._timeout<=e){t.push(n)}}));for(const e of t){const t=this._clicks.indexOf(e);if(t>-1){this._generateBreadcrumbs(e);this._clicks.splice(t,1)}}if(this._clicks.length){this._scheduleCheckClicks()}}_generateBreadcrumbs(t){const e=this._replay;const n=t.scrollAfter&&t.scrollAfter<=this._scollTimeout;const r=t.mutationAfter&&t.mutationAfter<=this._threshold;const i=!n&&!r;const{clickCount:s,clickBreadcrumb:o}=t;if(i){const n=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3;const r=n<this._timeout*1e3?"mutation":"timeout";const i={type:"default",message:o.message,timestamp:o.timestamp,category:"ui.slowClickDetected",data:{...o.data,url:jp.location.href,route:e.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:s||1}};this._addBreadcrumbEvent(e,i);return}if(s>1){const t={type:"default",message:o.message,timestamp:o.timestamp,category:"ui.multiClick",data:{...o.data,url:jp.location.href,route:e.getCurrentRoute(),clickCount:s,metric:true}};this._addBreadcrumbEvent(e,t)}}_scheduleCheckClicks(){if(this._checkClickTimeout){clearTimeout(this._checkClickTimeout)}this._checkClickTimeout=$d((()=>this._checkClicks()),1e3)}}const mb=["A","BUTTON","INPUT"];function gb(t,e){if(!mb.includes(t.tagName)){return true}if(t.tagName==="INPUT"&&!["submit","button"].includes(t.getAttribute("type")||"")){return true}if(t.tagName==="A"&&(t.hasAttribute("download")||t.hasAttribute("target")&&t.getAttribute("target")!=="_self")){return true}if(e&&t.matches(e)){return true}return false}function yb(t){return!!(t.data&&typeof t.data.nodeId==="number"&&t.timestamp)}function bb(){return Date.now()/1e3}function vb(t,e){try{if(!wb(e)){return}const{source:n}=e.data;if(db.has(n)){t.registerMutation(e.timestamp)}if(n===Gg.Scroll){t.registerScroll(e.timestamp)}if(_b(e)){const{type:n,id:r}=e.data;const i=Hy.mirror.getNode(r);if(i instanceof HTMLElement&&n===Yg.Click){t.registerClick(i)}}}catch(t){}}function wb(t){return t.type===Qy}function _b(t){return t.data.source===Gg.MouseInteraction}function kb(t){return{timestamp:Date.now()/1e3,type:"default",...t}}var Sb;(function(t){t[t["Document"]=0]="Document";t[t["DocumentType"]=1]="DocumentType";t[t["Element"]=2]="Element";t[t["Text"]=3]="Text";t[t["CDATA"]=4]="CDATA";t[t["Comment"]=5]="Comment"})(Sb||(Sb={}));const xb=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function Cb(t){const e={};if(!t["data-sentry-component"]&&t["data-sentry-element"]){t["data-sentry-component"]=t["data-sentry-element"]}for(const n in t){if(xb.has(n)){let r=n;if(n==="data-testid"||n==="data-test-id"){r="testId"}e[r]=t[n]}}return e}const Tb=t=>e=>{if(!t.isEnabled()){return}const n=Eb(e);if(!n){return}const r=e.name==="click";const i=r?e.event:undefined;if(r&&t.clickDetector&&i&&i.target&&!i.altKey&&!i.metaKey&&!i.ctrlKey&&!i.shiftKey){hb(t.clickDetector,n,ob(e.event))}rb(t,n)};function Ib(t,e){const n=Hy.mirror.getId(t);const r=n&&Hy.mirror.getNode(n);const i=r&&Hy.mirror.getMeta(r);const s=i&&$b(i)?i:null;return{message:e,data:s?{nodeId:n,node:{id:n,tagName:s.tagName,textContent:Array.from(s.childNodes).map((t=>t.type===Sb.Text&&t.textContent)).filter(Boolean).map((t=>t.trim())).join(""),attributes:Cb(s.attributes)}}:{}}}function Eb(t){const{target:e,message:n}=Ab(t);return kb({category:`ui.${t.name}`,...Ib(e,n)})}function Ab(t){const e=t.name==="click";let n;let r=null;try{r=e?ob(t.event):cb(t.event);n=D(r,{maxStringLength:200})||"<unknown>"}catch(t){n="<unknown>"}return{target:r,message:n}}function $b(t){return t.type===Sb.Element}function Mb(t,e){if(!t.isEnabled()){return}t.updateUserActivity();const n=Rb(e);if(!n){return}rb(t,n)}function Rb(t){const{metaKey:e,shiftKey:n,ctrlKey:r,altKey:i,key:s,target:o}=t;if(!o||Nb(o)||!s){return null}const c=e||r||i;const a=s.length===1;if(!c&&a){return null}const u=D(o,{maxStringLength:200})||"<unknown>";const f=Ib(o,u);return kb({category:"ui.keyDown",message:u,data:{...f.data,metaKey:e,shiftKey:n,ctrlKey:r,altKey:i,key:s}})}function Nb(t){return t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable}const Ob={resource:zb,paint:jb,navigation:Bb};function Db(t,e){return({metric:n})=>void e.replayPerformanceEntries.push(t(n))}function Lb(t){return t.map(Fb).filter(Boolean)}function Fb(t){const e=Ob[t.entryType];if(!e){return null}return e(t)}function Pb(t){return((Yt||jp.performance.timeOrigin)+t)/1e3}function jb(t){const{duration:e,entryType:n,name:r,startTime:i}=t;const s=Pb(i);return{type:n,name:r,start:s,end:s+e,data:undefined}}function Bb(t){const{entryType:e,name:n,decodedBodySize:r,duration:i,domComplete:s,encodedBodySize:o,domContentLoadedEventStart:c,domContentLoadedEventEnd:a,domInteractive:u,loadEventStart:f,loadEventEnd:l,redirectCount:d,startTime:h,transferSize:p,type:m}=t;if(i===0){return null}return{type:`${e}.${m}`,start:Pb(h),end:Pb(s),name:n,data:{size:p,decodedBodySize:r,encodedBodySize:o,duration:i,domInteractive:u,domContentLoadedEventStart:c,domContentLoadedEventEnd:a,loadEventStart:f,loadEventEnd:l,domComplete:s,redirectCount:d}}}function zb(t){const{entryType:e,initiatorType:n,name:r,responseEnd:i,startTime:s,decodedBodySize:o,encodedBodySize:c,responseStatus:a,transferSize:u}=t;if(["fetch","xmlhttprequest"].includes(n)){return null}return{type:`${e}.${n}`,start:Pb(s),end:Pb(i),name:r,data:{size:u,statusCode:a,decodedBodySize:o,encodedBodySize:c}}}function Ub(t){const e=t.entries[t.entries.length-1];const n=e&&e.element?[e.element]:undefined;return Yb(t,"largest-contentful-paint",n)}function qb(t){return t.sources!==undefined}function Hb(t){const e=[];const n=[];for(const r of t.entries){if(qb(r)){const t=[];for(const e of r.sources){if(e.node){n.push(e.node);const r=Hy.mirror.getId(e.node);if(r){t.push(r)}}}e.push({value:r.value,nodeIds:t})}}return Yb(t,"cumulative-layout-shift",n,e)}function Wb(t){const e=t.entries[t.entries.length-1];const n=e&&e.target?[e.target]:undefined;return Yb(t,"first-input-delay",n)}function Gb(t){const e=t.entries[t.entries.length-1];const n=e&&e.target?[e.target]:undefined;return Yb(t,"interaction-to-next-paint",n)}function Yb(t,e,n,r){const i=t.value;const s=t.rating;const o=Pb(i);const c={type:"web-vital",name:e,start:o,end:o,data:{value:i,size:i,rating:s,nodeIds:n?n.map((t=>Hy.mirror.getId(t))):undefined,attributions:r}};return c}function Xb(t){function e(e){if(!t.performanceEntries.includes(e)){t.performanceEntries.push(e)}}function n({entries:t}){t.forEach(e)}const r=[];["navigation","paint","resource"].forEach((t=>{r.push(xl(t,n))}));r.push(wl(Db(Ub,t)),vl(Db(Hb,t)),_l(Db(Wb,t)),Sl(Db(Gb,t)));return()=>{r.forEach((t=>t()))}}const Jb=`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;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}}},L=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}}},O=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)},j=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},q=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&&j(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)}},B=function(t){return 10+(t.filename?t.filename.length+1:0)},G=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(O(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}();var H=function(){function t(t,n){this.c=L(),this.v=1,G.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),G.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=O(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=L();i.p(n.dictionary),j(t,2,i.d())}}(r,this.o),this.v=0),n&&j(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),J="undefined"!=typeof TextEncoder&&new TextEncoder,K="undefined"!=typeof TextDecoder&&new TextDecoder;try{K.decode(F,{stream:!0})}catch(t){}var N=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(P(t),this.d=n||!1)},t}();function P(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(J)return J.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)}function Q(t){return function(t,n){n||(n={});var r=S(),e=t.length;r.p(t);var i=O(t,n,B(n),8),a=i.length;return q(i,n),j(i,a-8,r.d()),j(i,a-4,e),i}(P(t))}const R=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(const r of t)n+=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 H,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new N(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},V={clear:()=>{R.clear()},addEvent:t=>R.addEvent(t),finish:()=>R.finish(),compress:t=>Q(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in V&&"function"==typeof V[n])try{const t=V[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 Kb(){const t=new Blob([Jb]);return URL.createObjectURL(t)}class Vb extends Error{constructor(){super(`Event buffer exceeded maximum size of ${tm}.`)}}class Zb{constructor(){this.events=[];this._totalSize=0;this.hasCheckout=false}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){const e=JSON.stringify(t).length;this._totalSize+=e;if(this._totalSize>tm){throw new Vb}this.events.push(t)}finish(){return new Promise((t=>{const e=this.events;this.clear();t(JSON.stringify(e))}))}clear(){this.events=[];this._totalSize=0;this.hasCheckout=false}getEarliestTimestamp(){const t=this.events.map((t=>t.timestamp)).sort()[0];if(!t){return null}return eb(t)}}class Qb{constructor(t){this._worker=t;this._id=0}ensureReady(){if(this._ensureReadyPromise){return this._ensureReadyPromise}this._ensureReadyPromise=new Promise(((t,e)=>{this._worker.addEventListener("message",(({data:n})=>{if(n.success){t()}else{e()}}),{once:true});this._worker.addEventListener("error",(t=>{e(t)}),{once:true})}));return this._ensureReadyPromise}destroy(){Yy&&Zy.info("Destroying compression worker");this._worker.terminate()}postMessage(t,e){const n=this._getAndIncrementId();return new Promise(((r,i)=>{const s=({data:e})=>{const o=e;if(o.method!==t){return}if(o.id!==n){return}this._worker.removeEventListener("message",s);if(!o.success){Yy&&Zy.error("Error in compression worker: ",o.response);i(new Error("Error in compression worker"));return}r(o.response)};this._worker.addEventListener("message",s);this._worker.postMessage({id:n,method:t,arg:e})}))}_getAndIncrementId(){return this._id++}}class tv{constructor(t){this._worker=new Qb(t);this._earliestTimestamp=null;this._totalSize=0;this.hasCheckout=false}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const e=eb(t.timestamp);if(!this._earliestTimestamp||e<this._earliestTimestamp){this._earliestTimestamp=e}const n=JSON.stringify(t);this._totalSize+=n.length;if(this._totalSize>tm){return Promise.reject(new Vb)}return this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null;this._totalSize=0;this.hasCheckout=false;this._worker.postMessage("clear").then(null,(t=>{Yy&&Zy.exception(t,'Sending "clear" message to worker failed',t)}))}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){const t=await this._worker.postMessage("finish");this._earliestTimestamp=null;this._totalSize=0;return t}}class ev{constructor(t){this._fallback=new Zb;this._compression=new tv(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(){await this.ensureWorkerIsLoaded();return this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){Yy&&Zy.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:e}=this._fallback;const n=[];for(const e of t){n.push(this._compression.addEvent(e))}this._compression.hasCheckout=e;this._used=this._compression;try{await Promise.all(n)}catch(t){Yy&&Zy.exception(t,"Failed to add events when switching buffers.")}}}function nv({useCompression:t,workerUrl:e}){if(t&&window.Worker){const t=rv(e);if(t){return t}}Yy&&Zy.info("Using simple buffer");return new Zb}function rv(t){try{const e=t||iv();if(!e){return}Yy&&Zy.info(`Using compression worker${t?` from ${t}`:""}`);const n=new Worker(e);return new ev(n)}catch(t){Yy&&Zy.exception(t,"Failed to create compression worker")}}function iv(){if(typeof __SENTRY_EXCLUDE_REPLAY_WORKER__==="undefined"||!__SENTRY_EXCLUDE_REPLAY_WORKER__){return Kb()}return""}function sv(){try{return"sessionStorage"in jp&&!!jp.sessionStorage}catch(t){return false}}function ov(t){cv();t.session=undefined}function cv(){if(!sv()){return}try{jp.sessionStorage.removeItem(Bp)}catch(t){}}function av(t){if(t===undefined){return false}return Math.random()<t}function uv(t){const e=Date.now();const n=t.id||ge();const r=t.started||e;const i=t.lastActivity||e;const s=t.segmentId||0;const o=t.sampled;const c=t.previousSessionId;return{id:n,started:r,lastActivity:i,segmentId:s,sampled:o,previousSessionId:c}}function fv(t){if(!sv()){return}try{jp.sessionStorage.setItem(Bp,JSON.stringify(t))}catch(t){}}function lv(t,e){return av(t)?"session":e?"buffer":false}function dv({sessionSampleRate:t,allowBuffering:e,stickySession:n=false},{previousSessionId:r}={}){const i=lv(t,e);const s=uv({sampled:i,previousSessionId:r});if(n){fv(s)}return s}function hv(){if(!sv()){return null}try{const t=jp.sessionStorage.getItem(Bp);if(!t){return null}const e=JSON.parse(t);Yy&&Zy.infoTick("Loading existing session");return uv(e)}catch(t){return null}}function pv(t,e,n=+new Date){if(t===null||e===undefined||e<0){return true}if(e===0){return false}return t+e<=n}function mv(t,{maxReplayDuration:e,sessionIdleExpire:n,targetTime:r=Date.now()}){return pv(t.started,e,r)||pv(t.lastActivity,n,r)}function gv(t,{sessionIdleExpire:e,maxReplayDuration:n}){if(!mv(t,{sessionIdleExpire:e,maxReplayDuration:n})){return false}if(t.sampled==="buffer"&&t.segmentId===0){return false}return true}function yv({sessionIdleExpire:t,maxReplayDuration:e,previousSessionId:n},r){const i=r.stickySession&&hv();if(!i){Yy&&Zy.infoTick("Creating new session");return dv(r,{previousSessionId:n})}if(!gv(i,{sessionIdleExpire:t,maxReplayDuration:e})){return i}Yy&&Zy.infoTick("Session in sessionStorage is expired, creating new one...");return dv(r,{previousSessionId:i.id})}function bv(t){return t.type===Wg.Custom}function vv(t,e,n){if(!kv(t,e)){return false}_v(t,e,n);return true}function wv(t,e,n){if(!kv(t,e)){return Promise.resolve(null)}return _v(t,e,n)}async function _v(t,e,n){if(!t.eventBuffer){return null}try{if(n&&t.recordingMode==="buffer"){t.eventBuffer.clear()}if(n){t.eventBuffer.hasCheckout=true}const r=t.getOptions();const i=Sv(e,r.beforeAddRecordingEvent);if(!i){return}return await t.eventBuffer.addEvent(i)}catch(e){const n=e&&e instanceof Vb?"addEventSizeExceeded":"addEvent";t.handleException(e);await t.stop({reason:n});const r=ti();if(r){r.recordDroppedEvent("internal_sdk_error","replay")}}}function kv(t,e){if(!t.eventBuffer||t.isPaused()||!t.isEnabled()){return false}const n=eb(e.timestamp);if(n+t.timeouts.sessionIdlePause<Date.now()){return false}if(n>t.getContext().initialTimestamp+t.getOptions().maxReplayDuration){Yy&&Zy.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`);return false}return true}function Sv(t,e){try{if(typeof e==="function"&&bv(t)){return e(t)}}catch(t){Yy&&Zy.exception(t,"An error occured in the `beforeAddRecordingEvent` callback, skipping the event...");return null}return t}function xv(t){return!t.type}function Cv(t){return t.type==="transaction"}function Tv(t){return t.type==="replay_event"}function Iv(t){return t.type==="feedback"}function Ev(t){return(e,n)=>{if(!t.isEnabled()||!xv(e)&&!Cv(e)){return}const r=n&&n.statusCode;if(!r||r<200||r>=300){return}if(Cv(e)){Av(t,e);return}$v(t,e)}}function Av(t,e){const n=t.getContext();if(e.contexts&&e.contexts.trace&&e.contexts.trace.trace_id&&n.traceIds.size<100){n.traceIds.add(e.contexts.trace.trace_id)}}function $v(t,e){const n=t.getContext();if(e.event_id&&n.errorIds.size<100){n.errorIds.add(e.event_id)}if(t.recordingMode!=="buffer"||!e.tags||!e.tags.replayId){return}const{beforeErrorSampling:r}=t.getOptions();if(typeof r==="function"&&!r(e)){return}$d((()=>{t.sendBufferedReplayOrFlush()}))}function Mv(t){return e=>{if(!t.isEnabled()||!xv(e)){return}Rv(t,e)}}function Rv(t,e){const n=e.exception&&e.exception.values&&e.exception.values[0]&&e.exception.values[0].value;if(typeof n!=="string"){return}if(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i)){const e=kb({category:"replay.hydrate-error",data:{url:F()}});rb(t,e)}}function Nv(t){const e=ti();if(!e){return}e.on("beforeAddBreadcrumb",(e=>Ov(t,e)))}function Ov(t,e){if(!t.isEnabled()||!Fv(e)){return}const n=Dv(e);if(n){rb(t,n)}}function Dv(t){if(!Fv(t)||["fetch","xhr","sentry.event","sentry.transaction"].includes(t.category)||t.category.startsWith("ui.")){return null}if(t.category==="console"){return Lv(t)}return kb(t)}function Lv(t){const e=t.data&&t.data.arguments;if(!Array.isArray(e)||e.length===0){return kb(t)}let n=false;const r=e.map((t=>{if(!t){return t}if(typeof t==="string"){if(t.length>Vp){n=true;return`${t.slice(0,Vp)}…`}return t}if(typeof t==="object"){try{const e=Ie(t,7);const r=JSON.stringify(e);if(r.length>Vp){n=true;return`${JSON.stringify(e,null,2).slice(0,Vp)}…`}return e}catch(t){}}return t}));return kb({...t,data:{...t.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function Fv(t){return!!t.category}function Pv(t,e){if(t.type||!t.exception||!t.exception.values||!t.exception.values.length){return false}if(e.originalException&&e.originalException.__rrweb__){return true}return false}function jv(t,e){t.triggerUserActivity();t.addUpdate((()=>{if(!e.timestamp){return true}t.throttledAddEvent({type:Wg.Custom,timestamp:e.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:e.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:e.event_id}}}});return false}))}function Bv(t,e){if(t.recordingMode!=="buffer"){return false}if(e.message===Up){return false}if(!e.exception||e.type){return false}return av(t.getOptions().errorSampleRate)}function zv(t){return Object.assign(((e,n)=>{if(!t.isEnabled()){return e}if(Tv(e)){delete e.breadcrumbs;return e}if(!xv(e)&&!Cv(e)&&!Iv(e)){return e}const r=t.checkAndHandleExpiredSession();if(!r){return e}if(Iv(e)){t.flush();e.contexts.feedback.replay_id=t.getSessionId();jv(t,e);return e}if(Pv(e,n)&&!t.getOptions()._experiments.captureExceptions){Yy&&Zy.log("Ignoring error from rrweb internals",e);return null}const i=Bv(t,e);const s=i||t.recordingMode==="session";if(s){e.tags={...e.tags,replayId:t.getSessionId()}}return e}),{id:"Replay"})}function Uv(t,e){return e.map((({type:e,start:n,end:r,name:i,data:s})=>{const o=t.throttledAddEvent({type:Wg.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:e,description:i,startTimestamp:n,endTimestamp:r,data:s}}});return typeof o==="string"?Promise.resolve(null):o}))}function qv(t){const{from:e,to:n}=t;const r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:e}}}function Hv(t){return e=>{if(!t.isEnabled()){return}const n=qv(e);if(n===null){return}t.getContext().urls.push(n.name);t.triggerUserActivity();t.addUpdate((()=>{Uv(t,[n]);return false}))}}function Wv(t,e){if(Yy&&t.getOptions()._experiments.traceInternals){return false}return mc(e,ti())}function Gv(t,e){if(!t.isEnabled()){return}if(e===null){return}if(Wv(t,e.name)){return}t.addUpdate((()=>{Uv(t,[e]);return true}))}function Yv(t){if(!t){return undefined}const e=new TextEncoder;try{if(typeof t==="string"){return e.encode(t).length}if(t instanceof URLSearchParams){return e.encode(t.toString()).length}if(t instanceof FormData){const n=ew(t);return e.encode(n).length}if(t instanceof Blob){return t.size}if(t instanceof ArrayBuffer){return t.byteLength}}catch(t){}return undefined}function Xv(t){if(!t){return undefined}const e=parseInt(t,10);return isNaN(e)?undefined:e}function Jv(t){try{if(typeof t==="string"){return[t]}if(t instanceof URLSearchParams){return[t.toString()]}if(t instanceof FormData){return[ew(t)]}if(!t){return[undefined]}}catch(e){Yy&&Zy.exception(e,"Failed to serialize body",t);return[undefined,"BODY_PARSE_ERROR"]}Yy&&Zy.info("Skipping network body because of body type",t);return[undefined,"UNPARSEABLE_BODY_TYPE"]}function Kv(t,e){if(!t){return{headers:{},size:undefined,_meta:{warnings:[e]}}}const n={...t._meta};const r=n.warnings||[];n.warnings=[...r,e];t._meta=n;return t}function Vv(t,e){if(!e){return null}const{startTimestamp:n,endTimestamp:r,url:i,method:s,statusCode:o,request:c,response:a}=e;const u={type:t,start:n/1e3,end:r/1e3,name:i,data:ft({method:s,statusCode:o,request:c,response:a})};return u}function Zv(t){return{headers:{},size:t,_meta:{warnings:["URL_SKIPPED"]}}}function Qv(t,e,n){if(!e&&Object.keys(t).length===0){return undefined}if(!e){return{headers:t}}if(!n){return{headers:t,size:e}}const r={headers:t,size:e};const{body:i,warnings:s}=nw(n);r.body=i;if(s&&s.length>0){r._meta={warnings:s}}return r}function tw(t,e){return Object.entries(t).reduce(((n,[r,i])=>{const s=r.toLowerCase();if(e.includes(s)&&t[r]){n[s]=i}return n}),{})}function ew(t){return new URLSearchParams(t).toString()}function nw(t){if(!t||typeof t!=="string"){return{body:t}}const e=t.length>Kp;const n=rw(t);if(e){const e=t.slice(0,Kp);if(n){return{body:e,warnings:["MAYBE_JSON_TRUNCATED"]}}return{body:`${e}…`,warnings:["TEXT_TRUNCATED"]}}if(n){try{const e=JSON.parse(t);return{body:e}}catch(t){}}return{body:t}}function rw(t){const e=t[0];const n=t[t.length-1];return e==="["&&n==="]"||e==="{"&&n==="}"}function iw(t,e){const n=sw(t);return S(n,e)}function sw(t,e=jp.document.baseURI){if(t.startsWith("http://")||t.startsWith("https://")||t.startsWith(jp.location.origin)){return t}const n=new URL(t,e);if(n.origin!==new URL(e).origin){return t}const r=n.href;if(!t.endsWith("/")&&r.endsWith("/")){return r.slice(0,-1)}return r}async function ow(t,e,n){try{const r=await aw(t,e,n);const i=Vv("resource.fetch",r);Gv(n.replay,i)}catch(t){Yy&&Zy.exception(t,"Failed to capture fetch breadcrumb")}}function cw(t,e){const{input:n,response:r}=e;const i=n?hw(n):undefined;const s=Yv(i);const o=r?Xv(r.headers.get("content-length")):undefined;if(s!==undefined){t.data.request_body_size=s}if(o!==undefined){t.data.response_body_size=o}}async function aw(t,e,n){const r=Date.now();const{startTimestamp:i=r,endTimestamp:s=r}=e;const{url:o,method:c,status_code:a=0,request_body_size:u,response_body_size:f}=t.data;const l=iw(o,n.networkDetailAllowUrls)&&!iw(o,n.networkDetailDenyUrls);const d=l?uw(n,e.input,u):Zv(u);const h=await fw(l,n,e.response,f);return{startTimestamp:i,endTimestamp:s,url:o,method:c,statusCode:a,request:d,response:h}}function uw({networkCaptureBodies:t,networkRequestHeaders:e},n,r){const i=n?mw(n,e):{};if(!t){return Qv(i,r,undefined)}const s=hw(n);const[o,c]=Jv(s);const a=Qv(i,r,o);if(c){return Kv(a,c)}return a}async function fw(t,{networkCaptureBodies:e,networkResponseHeaders:n},r,i){if(!t&&i!==undefined){return Zv(i)}const s=r?pw(r.headers,n):{};if(!r||!e&&i!==undefined){return Qv(s,i,undefined)}const[o,c]=await dw(r);const a=lw(o,{networkCaptureBodies:e,responseBodySize:i,captureDetails:t,headers:s});if(c){return Kv(a,c)}return a}function lw(t,{networkCaptureBodies:e,responseBodySize:n,captureDetails:r,headers:i}){try{const s=t&&t.length&&n===undefined?Yv(t):n;if(!r){return Zv(s)}if(e){return Qv(i,s,t)}return Qv(i,s,undefined)}catch(t){Yy&&Zy.exception(t,"Failed to serialize response body");return Qv(i,n,undefined)}}async function dw(t){const e=yw(t);if(!e){return[undefined,"BODY_PARSE_ERROR"]}try{const t=await bw(e);return[t]}catch(t){Yy&&Zy.exception(t,"Failed to get text body from response");return[undefined,"BODY_PARSE_ERROR"]}}function hw(t=[]){if(t.length!==2||typeof t[1]!=="object"){return undefined}return t[1].body}function pw(t,e){const n={};e.forEach((e=>{if(t.get(e)){n[e]=t.get(e)}}));return n}function mw(t,e){if(t.length===1&&typeof t[0]!=="string"){return gw(t[0],e)}if(t.length===2){return gw(t[1],e)}return{}}function gw(t,e){if(!t){return{}}const n=t.headers;if(!n){return{}}if(n instanceof Headers){return pw(n,e)}if(Array.isArray(n)){return{}}return tw(n,e)}function yw(t){try{return t.clone()}catch(t){Yy&&Zy.exception(t,"Failed to clone response body")}}function bw(t){return new Promise(((e,n)=>{const r=$d((()=>n(new Error("Timeout while trying to read response body"))),500);vw(t).then((t=>e(t)),(t=>n(t))).finally((()=>clearTimeout(r)))}))}async function vw(t){return await t.text()}async function ww(t,e,n){try{const r=kw(t,e,n);const i=Vv("resource.xhr",r);Gv(n.replay,i)}catch(t){Yy&&Zy.exception(t,"Failed to capture xhr breadcrumb")}}function _w(t,e){const{xhr:n,input:r}=e;if(!n){return}const i=Yv(r);const s=n.getResponseHeader("content-length")?Xv(n.getResponseHeader("content-length")):Tw(n.response,n.responseType);if(i!==undefined){t.data.request_body_size=i}if(s!==undefined){t.data.response_body_size=s}}function kw(t,e,n){const r=Date.now();const{startTimestamp:i=r,endTimestamp:s=r,input:o,xhr:c}=e;const{url:a,method:u,status_code:f=0,request_body_size:l,response_body_size:d}=t.data;if(!a){return null}if(!c||!iw(a,n.networkDetailAllowUrls)||iw(a,n.networkDetailDenyUrls)){const t=Zv(l);const e=Zv(d);return{startTimestamp:i,endTimestamp:s,url:a,method:u,statusCode:f,request:t,response:e}}const h=c[Md];const p=h?tw(h.request_headers,n.networkRequestHeaders):{};const m=tw(Sw(c),n.networkResponseHeaders);const[g,y]=n.networkCaptureBodies?Jv(o):[undefined];const[b,v]=n.networkCaptureBodies?xw(c):[undefined];const w=Qv(p,l,g);const _=Qv(m,d,b);return{startTimestamp:i,endTimestamp:s,url:a,method:u,statusCode:f,request:y?Kv(w,y):w,response:v?Kv(_,v):_}}function Sw(t){const e=t.getAllResponseHeaders();if(!e){return{}}return e.split("\r\n").reduce(((t,e)=>{const[n,r]=e.split(": ");if(r){t[n.toLowerCase()]=r}return t}),{})}function xw(t){const e=[];try{return[t.responseText]}catch(t){e.push(t)}try{return Cw(t.response,t.responseType)}catch(t){e.push(t)}Yy&&Zy.warn("Failed to get xhr response body",...e);return[undefined]}function Cw(t,e){try{if(typeof t==="string"){return[t]}if(t instanceof Document){return[t.body.outerHTML]}if(e==="json"&&t&&typeof t==="object"){return[JSON.stringify(t)]}if(!t){return[undefined]}}catch(e){Yy&&Zy.exception(e,"Failed to serialize body",t);return[undefined,"BODY_PARSE_ERROR"]}Yy&&Zy.info("Skipping network body because of body type",t);return[undefined,"UNPARSEABLE_BODY_TYPE"]}function Tw(t,e){try{const n=e==="json"&&t&&typeof t==="object"?JSON.stringify(t):t;return Yv(n)}catch(t){return undefined}}function Iw(t){const e=ti();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:s,networkResponseHeaders:o}=t.getOptions();const c={replay:t,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:s,networkResponseHeaders:o};if(e){e.on("beforeAddBreadcrumb",((t,e)=>Ew(c,t,e)))}}catch(t){}}function Ew(t,e,n){if(!e.data){return}try{if(Aw(e)&&Mw(n)){_w(e,n);ww(e,n,t)}if($w(e)&&Rw(n)){cw(e,n);ow(e,n,t)}}catch(t){Yy&&Zy.exception(t,"Error when enriching network breadcrumb")}}function Aw(t){return t.category==="xhr"}function $w(t){return t.category==="fetch"}function Mw(t){return t&&t.xhr}function Rw(t){return t&&t.response}function Nw(t){const e=ti();yd(Tb(t));xd(Hv(t));Nv(t);Iw(t);const n=zv(t);Io(n);if(e){e.on("beforeSendEvent",Mv(t));e.on("afterSendEvent",Ev(t));e.on("createDsc",(e=>{const n=t.getSessionId();if(n&&t.isEnabled()&&t.recordingMode==="session"){const r=t.checkAndHandleExpiredSession();if(r){e.replay_id=n}}}));e.on("spanStart",(e=>{t.lastActiveSpan=e}));e.on("spanEnd",(e=>{t.lastActiveSpan=e}));e.on("beforeSendFeedback",((e,n)=>{const r=t.getSessionId();if(n&&n.includeReplay&&t.isEnabled()&&r){if(e.contexts&&e.contexts.feedback){e.contexts.feedback.replay_id=r}}}))}}async function Ow(t){try{return Promise.all(Uv(t,[Dw(jp.performance.memory)]))}catch(t){return[]}}function Dw(t){const{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}=t;const i=Date.now()/1e3;return{type:"memory",name:"memory",start:i,end:i,data:{memory:{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}}}}function Lw(t,e,n){let r;let i;let s;const o=n&&n.maxWait?Math.max(n.maxWait,e):0;function c(){a();r=t();return r}function a(){i!==undefined&&clearTimeout(i);s!==undefined&&clearTimeout(s);i=s=undefined}function u(){if(i!==undefined||s!==undefined){return c()}return r}function f(){if(i){clearTimeout(i)}i=$d(c,e);if(o&&s===undefined){s=$d(c,o)}return r}f.cancel=a;f.flush=u;return f}function Fw(t){let e=false;return(n,r)=>{if(!t.checkAndHandleExpiredSession()){Yy&&Zy.warn("Received replay event after session expired.");return}const i=r||!e;e=true;if(t.clickDetector){vb(t.clickDetector,n)}t.addUpdate((()=>{if(t.recordingMode==="buffer"&&i){t.setInitialState()}if(!vv(t,n,i)){return true}if(!i){return false}jw(t,i);if(t.session&&t.session.previousSessionId){return true}if(t.recordingMode==="buffer"&&t.session&&t.eventBuffer){const e=t.eventBuffer.getEarliestTimestamp();if(e){Yy&&Zy.info(`Updating session start time to earliest event in buffer to ${new Date(e)}`);t.session.started=e;if(t.getOptions().stickySession){fv(t.session)}}}if(t.recordingMode==="session"){void t.flush()}return true}))}}function Pw(t){const e=t.getOptions();return{type:Wg.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:t.isRecordingCanvas(),sessionSampleRate:e.sessionSampleRate,errorSampleRate:e.errorSampleRate,useCompressionOption:e.useCompression,blockAllMedia:e.blockAllMedia,maskAllText:e.maskAllText,maskAllInputs:e.maskAllInputs,useCompression:t.eventBuffer?t.eventBuffer.type==="worker":false,networkDetailHasUrls:e.networkDetailAllowUrls.length>0,networkCaptureBodies:e.networkCaptureBodies,networkRequestHasHeaders:e.networkRequestHeaders.length>0,networkResponseHasHeaders:e.networkResponseHeaders.length>0}}}}function jw(t,e){if(!e||!t.session||t.session.segmentId!==0){return}vv(t,Pw(t),false)}function Bw(t,e,n,r){return Fn(Vn(t,Kn(t),r,n),[[{type:"replay_event"},t],[{type:"replay_recording",length:typeof e==="string"?(new TextEncoder).encode(e).length:e.length},e]])}function zw({recordingData:t,headers:e}){let n;const r=`${JSON.stringify(e)}\n`;if(typeof t==="string"){n=`${r}${t}`}else{const e=new TextEncoder;const i=e.encode(r);n=new Uint8Array(i.length+t.length);n.set(i);n.set(t,i.length)}return n}async function Uw({client:t,scope:e,replayId:n,event:r}){const i=typeof t._integrations==="object"&&t._integrations!==null&&!Array.isArray(t._integrations)?Object.keys(t._integrations):undefined;const s={event_id:n,integrations:i};t.emit("preprocessEvent",r,s);const o=await Zs(t.getOptions(),r,s,e,t,Kr());if(!o){return null}o.platform=o.platform||"javascript";const c=t.getSdkMetadata();const{name:a,version:u}=c&&c.sdk||{};o.sdk={...o.sdk,name:a||"sentry.javascript.unknown",version:u||"0.0.0"};return o}async function qw({recordingData:t,replayId:e,segmentId:n,eventContext:r,timestamp:i,session:s}){const o=zw({recordingData:t,headers:{segment_id:n}});const{urls:c,errorIds:a,traceIds:u,initialTimestamp:f}=r;const l=ti();const d=Jr();const h=l&&l.getTransport();const p=l&&l.getDsn();if(!l||!h||!p||!s.sampled){return Ye({})}const m={type:zp,replay_start_timestamp:f/1e3,timestamp:i/1e3,error_ids:a,trace_ids:u,urls:c,replay_id:e,segment_id:n,replay_type:s.sampled};const g=await Uw({scope:d,client:l,replayId:e,event:m});if(!g){l.recordDroppedEvent("event_processor","replay",m);Yy&&Zy.info("An event processor returned `null`, will not send event.");return Ye({})}delete g.sdkProcessingMetadata;const y=Bw(g,o,p,l.getOptions().tunnel);let b;try{b=await h.send(y)}catch(t){const e=new Error(Up);try{e.cause=t}catch(t){}throw e}if(typeof b.statusCode==="number"&&(b.statusCode<200||b.statusCode>=300)){throw new Hw(b.statusCode)}const v=rr({},b);if(nr(v,"replay")){throw new Ww(v)}return b}class Hw extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class Ww extends Error{constructor(t){super("Rate limit hit");this.rateLimits=t}}async function Gw(t,e={count:0,interval:Xp}){const{recordingData:n,options:r}=t;if(!n.length){return}try{await qw(t);return true}catch(n){if(n instanceof Hw||n instanceof Ww){throw n}po("Replays",{_retryCount:e.count});if(Yy&&r._experiments&&r._experiments.captureExceptions){fo(n)}if(e.count>=Jp){const t=new Error(`${Up} - max retries exceeded`);try{t.cause=n}catch(t){}throw t}e.interval*=++e.count;return new Promise(((n,r)=>{$d((async()=>{try{await Gw(t,e);n(true)}catch(t){r(t)}}),e.interval)}))}}const Yw="__THROTTLED";const Xw="__SKIPPED";function Jw(t,e,n){const r=new Map;const i=t=>{const e=t-n;r.forEach(((t,n)=>{if(n<e){r.delete(n)}}))};const s=()=>[...r.values()].reduce(((t,e)=>t+e),0);let o=false;return(...n)=>{const c=Math.floor(Date.now()/1e3);i(c);if(s()>=e){const t=o;o=true;return t?Xw:Yw}o=false;const a=r.get(c)||0;r.set(c,a+1);return t(...n)}}class Kw{constructor({options:t,recordingOptions:e}){Kw.prototype.__init.call(this);Kw.prototype.__init2.call(this);Kw.prototype.__init3.call(this);Kw.prototype.__init4.call(this);Kw.prototype.__init5.call(this);Kw.prototype.__init6.call(this);this.eventBuffer=null;this.performanceEntries=[];this.replayPerformanceEntries=[];this.recordingMode="session";this.timeouts={sessionIdlePause:qp,sessionIdleExpire:Hp};this._lastActivity=Date.now();this._isEnabled=false;this._isPaused=false;this._requiresManualStart=false;this._hasInitializedCoreListeners=false;this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""};this._recordingOptions=e;this._options=t;this._debouncedFlush=Lw((()=>this._flush()),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay});this._throttledAddEvent=Jw(((t,e)=>wv(this,t,e)),300,5);const{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions();const i=n?{threshold:Math.min(Zp,n),timeout:n,scrollTimeout:Qp,ignoreSelector:r?r.join(","):""}:undefined;if(i){this.clickDetector=new pb(this,i)}if(Yy){const e=t._experiments;Zy.setConfig({captureExceptions:!!e.captureExceptions,traceInternals:!!e.traceInternals})}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return Boolean(this._canvas)}getOptions(){return this._options}handleException(t){Yy&&Zy.exception(t)}initializeSampling(t){const{errorSampleRate:e,sessionSampleRate:n}=this._options;const r=e<=0&&n<=0;this._requiresManualStart=r;if(r){return}this._initializeSessionForSampling(t);if(!this.session){Yy&&Zy.exception(new Error("Unable to initialize and create session"));return}if(this.session.sampled===false){return}this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session";Yy&&Zy.infoTick(`Starting replay in ${this.recordingMode} mode`);this._initializeRecording()}start(){if(this._isEnabled&&this.recordingMode==="session"){Yy&&Zy.info("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){Yy&&Zy.info("Buffering is in progress, call `flush()` to save the replay");return}Yy&&Zy.infoTick("Starting replay in session mode");this._updateUserActivity();const t=yv({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:false});this.session=t;this._initializeRecording()}startBuffering(){if(this._isEnabled){Yy&&Zy.info("Buffering is in progress, call `flush()` to save the replay");return}Yy&&Zy.infoTick("Starting replay in buffer mode");const t=yv({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:true});this.session=t;this.recordingMode="buffer";this._initializeRecording()}startRecording(){try{const t=this._canvas;this._stopRecording=Hy({...this._recordingOptions,...this.recordingMode==="buffer"&&{checkoutEveryNms:Yp},emit:Fw(this),onMutation:this._onMutationHandler,...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this.handleException(t)}}stopRecording(){try{if(this._stopRecording){this._stopRecording();this._stopRecording=undefined}return true}catch(t){this.handleException(t);return false}}async stop({forceFlush:t=false,reason:e}={}){if(!this._isEnabled){return}this._isEnabled=false;try{Yy&&Zy.info(`Stopping Replay${e?` triggered by ${e}`:""}`);this._removeListeners();this.stopRecording();this._debouncedFlush.cancel();if(t){await this._flush({force:true})}this.eventBuffer&&this.eventBuffer.destroy();this.eventBuffer=null;ov(this)}catch(t){this.handleException(t)}}pause(){if(this._isPaused){return}this._isPaused=true;this.stopRecording();Yy&&Zy.info("Pausing replay")}resume(){if(!this._isPaused||!this._checkSession()){return}this._isPaused=false;this.startRecording();Yy&&Zy.info("Resuming replay")}async sendBufferedReplayOrFlush({continueRecording:t=true}={}){if(this.recordingMode==="session"){return this.flushImmediate()}const e=Date.now();Yy&&Zy.info("Converting buffer to session");await this.flushImmediate();const n=this.stopRecording();if(!t||!n){return}if(this.recordingMode==="session"){return}this.recordingMode="session";if(this.session){this._updateUserActivity(e);this._updateSessionActivity(e);this._maybeSaveSession()}this.startRecording()}addUpdate(t){const e=t();if(this.recordingMode==="buffer"){return}if(e===true){return}this._debouncedFlush()}triggerUserActivity(){this._updateUserActivity();if(!this._stopRecording){if(!this._checkSession()){return}this.resume();return}this.checkAndHandleExpiredSession();this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity();this._updateSessionActivity()}conditionalFlush(){if(this.recordingMode==="buffer"){return Promise.resolve()}return this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){this._debouncedFlush();return this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(this._lastActivity&&pv(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}if(!this._checkSession()){return false}return true}setInitialState(){const t=`${jp.location.pathname}${jp.location.hash}${jp.location.search}`;const e=`${jp.location.origin}${t}`;this.performanceEntries=[];this.replayPerformanceEntries=[];this._clearContext();this._context.initialUrl=e;this._context.initialTimestamp=Date.now();this._context.urls.push(e)}throttledAddEvent(t,e){const n=this._throttledAddEvent(t,e);if(n===Yw){const t=kb({category:"replay.throttled"});this.addUpdate((()=>!vv(this,{type:tb,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t,metric:true}})))}return n}getCurrentRoute(){const t=this.lastActiveSpan||ji();const e=t&&Pi(t);const n=e&&Ei(e).data||{};const r=n[ii];if(!e||!r||!["route","custom"].includes(r)){return undefined}return Ei(e).description}_initializeRecording(){this.setInitialState();this._updateSessionActivity();this.eventBuffer=nv({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl});this._removeListeners();this._addListeners();this._isEnabled=true;this._isPaused=false;this.startRecording()}_initializeSessionForSampling(t){const e=this._options.errorSampleRate>0;const n=yv({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:e});this.session=n}_checkSession(){if(!this.session){return false}const t=this.session;if(gv(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})){this._refreshSession(t);return false}return true}async _refreshSession(t){if(!this._isEnabled){return}await this.stop({reason:"refresh session"});this.initializeSampling(t.id)}_addListeners(){try{jp.document.addEventListener("visibilitychange",this._handleVisibilityChange);jp.addEventListener("blur",this._handleWindowBlur);jp.addEventListener("focus",this._handleWindowFocus);jp.addEventListener("keydown",this._handleKeyboardEvent);if(this.clickDetector){this.clickDetector.addListeners()}if(!this._hasInitializedCoreListeners){Nw(this);this._hasInitializedCoreListeners=true}}catch(t){this.handleException(t)}this._performanceCleanupCallback=Xb(this)}_removeListeners(){try{jp.document.removeEventListener("visibilitychange",this._handleVisibilityChange);jp.removeEventListener("blur",this._handleWindowBlur);jp.removeEventListener("focus",this._handleWindowFocus);jp.removeEventListener("keydown",this._handleKeyboardEvent);if(this.clickDetector){this.clickDetector.removeListeners()}if(this._performanceCleanupCallback){this._performanceCleanupCallback()}}catch(t){this.handleException(t)}}__init(){this._handleVisibilityChange=()=>{if(jp.document.visibilityState==="visible"){this._doChangeToForegroundTasks()}else{this._doChangeToBackgroundTasks()}}}__init2(){this._handleWindowBlur=()=>{const t=kb({category:"ui.blur"});this._doChangeToBackgroundTasks(t)}}__init3(){this._handleWindowFocus=()=>{const t=kb({category:"ui.focus"});this._doChangeToForegroundTasks(t)}}__init4(){this._handleKeyboardEvent=t=>{Mb(this,t)}}_doChangeToBackgroundTasks(t){if(!this.session){return}const e=mv(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire});if(e){return}if(t){this._createCustomBreadcrumb(t)}void this.conditionalFlush()}_doChangeToForegroundTasks(t){if(!this.session){return}const e=this.checkAndHandleExpiredSession();if(!e){Yy&&Zy.info("Document has become active, but session has expired");return}if(t){this._createCustomBreadcrumb(t)}}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){if(this.session){this.session.lastActivity=t;this._maybeSaveSession()}}_createCustomBreadcrumb(t){this.addUpdate((()=>{this.throttledAddEvent({type:Wg.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})}))}_addPerformanceEntries(){const t=Lb(this.performanceEntries).concat(this.replayPerformanceEntries);this.performanceEntries=[];this.replayPerformanceEntries=[];return Promise.all(Uv(this,t))}_clearContext(){this._context.errorIds.clear();this._context.traceIds.clear();this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:e}=this;if(!t||!e||this._requiresManualStart){return}if(t.segmentId){return}const n=e.getEarliestTimestamp();if(n&&n<this._context.initialTimestamp){this._context.initialTimestamp=n}}_popEventContext(){const 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};this._clearContext();return t}async _runFlush(){const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){Yy&&Zy.error("No session or eventBuffer found to flush.");return}await this._addPerformanceEntries();if(!this.eventBuffer||!this.eventBuffer.hasEvents){return}await Ow(this);if(!this.eventBuffer){return}if(t!==this.getSessionId()){return}try{this._updateInitialTimestampFromEventBuffer();const e=Date.now();if(e-this._context.initialTimestamp>this._options.maxReplayDuration+3e4){throw new Error("Session is too long, not sending replay")}const n=this._popEventContext();const r=this.session.segmentId++;this._maybeSaveSession();const i=await this.eventBuffer.finish();await Gw({replayId:t,recordingData:i,segmentId:r,eventContext:n,session:this.session,options:this.getOptions(),timestamp:e})}catch(t){this.handleException(t);this.stop({reason:"sendReplay"});const e=ti();if(e){e.recordDroppedEvent("send_error","replay")}}}__init5(){this._flush=async({force:t=false}={})=>{if(!this._isEnabled&&!t){return}if(!this.checkAndHandleExpiredSession()){Yy&&Zy.error("Attempting to finish replay event after session expired.");return}if(!this.session){return}const e=this.session.started;const n=Date.now();const r=n-e;this._debouncedFlush.cancel();const i=r<this._options.minReplayDuration;const s=r>this._options.maxReplayDuration+5e3;if(i||s){Yy&&Zy.info(`Session duration (${Math.floor(r/1e3)}s) is too ${i?"short":"long"}, not sending replay.`);if(i){this._debouncedFlush()}return}const o=this.eventBuffer;if(o&&this.session.segmentId===0&&!o.hasCheckout){Yy&&Zy.info("Flushing initial segment without checkout.")}if(!this._flushLock){this._flushLock=this._runFlush();await this._flushLock;this._flushLock=undefined;return}try{await this._flushLock}catch(t){Yy&&Zy.error(t)}finally{this._debouncedFlush()}}}_maybeSaveSession(){if(this.session&&this._options.stickySession){fv(this.session)}}__init6(){this._onMutationHandler=t=>{const e=t.length;const n=this._options.mutationLimit;const r=this._options.mutationBreadcrumbLimit;const i=n&&e>n;if(e>r||i){const t=kb({category:"replay.mutations",data:{count:e,limit:i}});this._createCustomBreadcrumb(t)}if(i){this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"});return false}return true}}}function Vw(t,e){return[...t,...e].join(",")}function Zw({mask:t,unmask:e,block:n,unblock:r,ignore:i}){const s=['base[href="/"]'];const o=Vw(t,[".sentry-mask","[data-sentry-mask]"]);const c=Vw(e,[]);const a={maskTextSelector:o,unmaskTextSelector:c,blockSelector:Vw(n,[".sentry-block","[data-sentry-block]",...s]),unblockSelector:Vw(r,[]),ignoreSelector:Vw(i,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])};return a}function Qw({el:t,key:e,maskAttributes:n,maskAllText:r,privacyOptions:i,value:s}){if(!r){return s}if(i.unmaskTextSelector&&t.matches(i.unmaskTextSelector)){return s}if(n.includes(e)||e==="value"&&t.tagName==="INPUT"&&["submit","button"].includes(t.getAttribute("type")||"")){return s.replace(/[\S]/g,"*")}return s}const t_='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]';const e_=["content-length","content-type","accept"];let n_=false;const r_=t=>new i_(t);class i_{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:t=Wp,flushMaxDelay:e=Gp,minReplayDuration:n=em,maxReplayDuration:r=rm,stickySession:i=true,useCompression:s=true,workerUrl:o,_experiments:c={},maskAllText:a=true,maskAllInputs:u=true,blockAllMedia:f=true,mutationBreadcrumbLimit:l=750,mutationLimit:d=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:p=[],networkDetailAllowUrls:m=[],networkDetailDenyUrls:g=[],networkCaptureBodies:y=true,networkRequestHeaders:b=[],networkResponseHeaders:v=[],mask:w=[],maskAttributes:_=["title","placeholder"],unmask:k=[],block:S=[],unblock:x=[],ignore:C=[],maskFn:T,beforeAddRecordingEvent:I,beforeErrorSampling:E}={}){this.name=i_.id;const A=Zw({mask:w,unmask:k,block:S,unblock:x,ignore:C});this._recordingOptions={maskAllInputs:u,maskAllText:a,maskInputOptions:{password:true},maskTextFn:T,maskInputFn:T,maskAttributeFn:(t,e,n)=>Qw({maskAttributes:_,maskAllText:a,privacyOptions:A,key:t,value:e,el:n}),...A,slimDOMOptions:"all",inlineStylesheet:true,inlineImages:false,collectFonts:true,errorHandler:t=>{try{t.__rrweb__=true}catch(t){}}};this._initialOptions={flushMinDelay:t,flushMaxDelay:e,minReplayDuration:Math.min(n,nm),maxReplayDuration:Math.min(r,rm),stickySession:i,useCompression:s,workerUrl:o,blockAllMedia:f,maskAllInputs:u,maskAllText:a,mutationBreadcrumbLimit:l,mutationLimit:d,slowClickTimeout:h,slowClickIgnoreSelectors:p,networkDetailAllowUrls:m,networkDetailDenyUrls:g,networkCaptureBodies:y,networkRequestHeaders:o_(b),networkResponseHeaders:o_(v),beforeAddRecordingEvent:I,beforeErrorSampling:E,_experiments:c};if(this._initialOptions.blockAllMedia){this._recordingOptions.blockSelector=!this._recordingOptions.blockSelector?t_:`${this._recordingOptions.blockSelector},${t_}`}if(this._isInitialized&&he()){throw new Error("Multiple Sentry Session Replay instances are not supported")}this._isInitialized=true}get _isInitialized(){return n_}set _isInitialized(t){n_=t}afterAllSetup(t){if(!he()||this._replay){return}this._setup(t);this._initialize(t)}start(){if(!this._replay){return}this._replay.start()}startBuffering(){if(!this._replay){return}this._replay.startBuffering()}stop(){if(!this._replay){return Promise.resolve()}return this._replay.stop({forceFlush:this._replay.recordingMode==="session"})}flush(t){if(!this._replay){return Promise.resolve()}if(!this._replay.isEnabled()){this._replay.start();return Promise.resolve()}return this._replay.sendBufferedReplayOrFlush(t)}getReplayId(){if(!this._replay||!this._replay.isEnabled()){return}return this._replay.getSessionId()}_initialize(t){if(!this._replay){return}this._maybeLoadFromReplayCanvasIntegration(t);this._replay.initializeSampling()}_setup(t){const e=s_(this._initialOptions,t);this._replay=new Kw({options:e,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const e=t.getIntegrationByName("ReplayCanvas");if(!e){return}this._replay["_canvas"]=e.getOptions()}catch(t){}}}i_.__initStatic();function s_(t,e){const n=e.getOptions();const r={sessionSampleRate:0,errorSampleRate:0,...ft(t)};const i=cs(n.replaysSessionSampleRate);const s=cs(n.replaysOnErrorSampleRate);if(i==null&&s==null){H((()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}))}if(i!=null){r.sessionSampleRate=i}if(s!=null){r.errorSampleRate=s}return r}function o_(t){return[...e_,...t.map((t=>t.toLowerCase()))]}function c_(){const t=ti();return t&&t.getIntegrationByName("Replay")}var a_;(function(t){t[t["Document"]=0]="Document";t[t["DocumentType"]=1]="DocumentType";t[t["Element"]=2]="Element";t[t["Text"]=3]="Text";t[t["CDATA"]=4]="CDATA";t[t["Comment"]=5]="Comment"})(a_||(a_={}));function u_(t,e){for(let n=t.classList.length;n--;){const r=t.classList[n];if(e.test(r)){return true}}return false}function f_(t,e,n=Infinity,r=0){if(!t)return-1;if(t.nodeType!==t.ELEMENT_NODE)return-1;if(r>n)return-1;if(e(t))return r;return f_(t.parentNode,e,n,r+1)}function l_(t,e){return n=>{const r=n;if(r===null)return false;try{if(t){if(typeof t==="string"){if(r.matches(`.${t}`))return true}else if(u_(r,t)){return true}}if(e&&r.matches(e))return true;return false}catch(t){return false}}}const d_="Please stop import mirror directly. Instead of that,"+"\r\n"+"now you can use replayer.getMirror() to access the mirror instance of a replayer,"+"\r\n"+"or you can use record.mirror to access the mirror instance during recording.";let h_={map:{},getId(){console.error(d_);return-1},getNode(){console.error(d_);return null},removeNodeFromMap(){console.error(d_)},has(){console.error(d_);return false},reset(){console.error(d_)}};if(typeof window!=="undefined"&&window.Proxy&&window.Reflect){h_=new Proxy(h_,{get(t,e,n){if(e==="map"){console.error(d_)}return Reflect.get(t,e,n)}})}function p_(t,e,n,r,i=window){const s=i.Object.getOwnPropertyDescriptor(t,e);i.Object.defineProperty(t,e,r?n:{set(t){__((()=>{n.set.call(this,t)}),0);if(s&&s.set){s.set.call(this,t)}}});return()=>p_(t,e,s||{},true)}function m_(t,e,n){try{if(!(e in t)){return()=>{}}const r=t[e];const i=n(r);if(typeof i==="function"){i.prototype=i.prototype||{};Object.defineProperties(i,{__rrweb_original__:{enumerable:false,value:r}})}t[e]=i;return()=>{t[e]=r}}catch(t){return()=>{}}}if(!/[1-9][0-9]{12}/.test(Date.now().toString()));function g_(t){if(!t){return null}const e=t.nodeType===t.ELEMENT_NODE?t:t.parentElement;return e}function y_(t,e,n,r,i){if(!t){return false}const s=g_(t);if(!s){return false}const o=l_(e,n);if(!i){const t=r&&s.matches(r);return o(s)&&!t}const c=f_(s,o);let a=-1;if(c<0){return false}if(r){a=f_(s,l_(null,r))}if(c>-1&&a<0){return true}return c<a}const b_={};function v_(t){const e=b_[t];if(e){return e}const n=window.document;let r=window[t];if(n&&typeof n.createElement==="function"){try{const e=n.createElement("iframe");e.hidden=true;n.head.appendChild(e);const i=e.contentWindow;if(i&&i[t]){r=i[t]}n.head.removeChild(e)}catch(t){}}return b_[t]=r.bind(window)}function w_(...t){return v_("requestAnimationFrame")(...t)}function __(...t){return v_("setTimeout")(...t)}var k_=(t=>{t[t["2D"]=0]="2D";t[t["WebGL"]=1]="WebGL";t[t["WebGL2"]=2]="WebGL2";return t})(k_||{});let S_;function x_(t){S_=t}const C_=t=>{if(!S_){return t}const e=(...e)=>{try{return t(...e)}catch(t){if(S_&&S_(t)===true){return()=>{}}throw t}};return e};var T_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var I_=typeof Uint8Array==="undefined"?[]:new Uint8Array(256);for(var E_=0;E_<T_.length;E_++){I_[T_.charCodeAt(E_)]=E_}var A_=function(t){var e=new Uint8Array(t),n,r=e.length,i="";for(n=0;n<r;n+=3){i+=T_[e[n]>>2];i+=T_[(e[n]&3)<<4|e[n+1]>>4];i+=T_[(e[n+1]&15)<<2|e[n+2]>>6];i+=T_[e[n+2]&63]}if(r%3===2){i=i.substring(0,i.length-1)+"="}else if(r%3===1){i=i.substring(0,i.length-2)+"=="}return i};const $_=new Map;function M_(t,e){let n=$_.get(t);if(!n){n=new Map;$_.set(t,n)}if(!n.has(e)){n.set(e,[])}return n.get(e)}const R_=(t,e,n)=>{if(!t||!(D_(t,e)||typeof t==="object"))return;const r=t.constructor.name;const i=M_(n,r);let s=i.indexOf(t);if(s===-1){s=i.length;i.push(t)}return s};function N_(t,e,n){if(t instanceof Array){return t.map((t=>N_(t,e,n)))}else if(t===null){return t}else if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray){const e=t.constructor.name;return{rr_type:e,args:[Object.values(t)]}}else if(t instanceof ArrayBuffer){const e=t.constructor.name;const n=A_(t);return{rr_type:e,base64:n}}else if(t instanceof DataView){const r=t.constructor.name;return{rr_type:r,args:[N_(t.buffer,e,n),t.byteOffset,t.byteLength]}}else if(t instanceof HTMLImageElement){const e=t.constructor.name;const{src:n}=t;return{rr_type:e,src:n}}else if(t instanceof HTMLCanvasElement){const e="HTMLImageElement";const n=t.toDataURL();return{rr_type:e,src:n}}else if(t instanceof ImageData){const r=t.constructor.name;return{rr_type:r,args:[N_(t.data,e,n),t.width,t.height]}}else if(D_(t,e)||typeof t==="object"){const r=t.constructor.name;const i=R_(t,e,n);return{rr_type:r,index:i}}return t}const O_=(t,e,n)=>t.map((t=>N_(t,e,n)));const D_=(t,e)=>{const n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"];const r=n.filter((t=>typeof e[t]==="function"));return Boolean(r.find((n=>t instanceof e[n])))};function L_(t,e,n,r,i){const s=[];const o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const c of o){try{if(typeof e.CanvasRenderingContext2D.prototype[c]!=="function"){continue}const o=m_(e.CanvasRenderingContext2D.prototype,c,(function(s){return function(...o){if(!y_(this.canvas,n,r,i,true)){__((()=>{const n=O_(o,e,this);t(this.canvas,{type:k_["2D"],property:c,args:n})}),0)}return s.apply(this,o)}}));s.push(o)}catch(n){const r=p_(e.CanvasRenderingContext2D.prototype,c,{set(e){t(this.canvas,{type:k_["2D"],property:c,args:[e],setter:true})}});s.push(r)}}return()=>{s.forEach((t=>t()))}}function F_(t){return t==="experimental-webgl"?"webgl":t}function P_(t,e,n,r,i){const s=[];try{const o=m_(t.HTMLCanvasElement.prototype,"getContext",(function(t){return function(s,...o){if(!y_(this,e,n,r,true)){const t=F_(s);if(!("__context"in this))this.__context=t;if(i&&["webgl","webgl2"].includes(t)){if(o[0]&&typeof o[0]==="object"){const t=o[0];if(!t.preserveDrawingBuffer){t.preserveDrawingBuffer=true}}else{o.splice(0,1,{preserveDrawingBuffer:true})}}}return t.apply(this,[s,...o])}}));s.push(o)}catch(t){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach((t=>t()))}}function j_(t,e,n,r,i,s,o,c){const a=[];const u=Object.getOwnPropertyNames(t);for(const o of u){if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(o)){continue}try{if(typeof t[o]!=="function"){continue}const u=m_(t,o,(function(t){return function(...a){const u=t.apply(this,a);R_(u,c,this);if("tagName"in this.canvas&&!y_(this.canvas,r,i,s,true)){const t=O_(a,c,this);const r={type:e,property:o,args:t};n(this.canvas,r)}return u}}));a.push(u)}catch(r){const i=p_(t,o,{set(t){n(this.canvas,{type:e,property:o,args:[t],setter:true})}});a.push(i)}}return a}function B_(t,e,n,r,i,s){const o=[];o.push(...j_(e.WebGLRenderingContext.prototype,k_.WebGL,t,n,r,i,s,e));if(typeof e.WebGL2RenderingContext!=="undefined"){o.push(...j_(e.WebGL2RenderingContext.prototype,k_.WebGL2,t,n,r,i,s,e))}return()=>{o.forEach((t=>t()))}}var z_=`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 U_(){const t=new Blob([z_]);return URL.createObjectURL(t)}class q_{reset(){this.pendingCanvasMutations.clear();this.restoreHandlers.forEach((t=>{try{t()}catch(t){}}));this.restoreHandlers=[];this.windowsSet=new WeakSet;this.windows=[];this.shadowDoms=new Set;wr([this,"access",t=>t.worker,"optionalAccess",t=>t.terminate,"call",t=>t()]);this.worker=null;this.snapshotInProgressMap=new Map;if(this.options.recordCanvas&&typeof this.options.sampling==="number"||this.options.enableManualSnapshot){this.worker=this.initFPSWorker()}}freeze(){this.frozen=true}unfreeze(){this.frozen=false}lock(){this.locked=true}unlock(){this.locked=false}constructor(t){this.pendingCanvasMutations=new Map;this.rafStamps={latestId:0,invokeId:null};this.shadowDoms=new Set;this.windowsSet=new WeakSet;this.windows=[];this.restoreHandlers=[];this.frozen=false;this.locked=false;this.snapshotInProgressMap=new Map;this.worker=null;this.processMutation=(t,e)=>{const n=this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId;if(n||!this.rafStamps.invokeId)this.rafStamps.invokeId=this.rafStamps.latestId;if(!this.pendingCanvasMutations.has(t)){this.pendingCanvasMutations.set(t,[])}this.pendingCanvasMutations.get(t).push(e)};const{sampling:e="all",win:n,blockClass:r,blockSelector:i,unblockSelector:s,maxCanvasSize:o,recordCanvas:c,dataURLOptions:a,errorHandler:u}=t;this.mutationCb=t.mutationCb;this.mirror=t.mirror;this.options=t;if(u){x_(u)}if(c&&typeof e==="number"||t.enableManualSnapshot){this.worker=this.initFPSWorker()}this.addWindow(n);if(t.enableManualSnapshot){return}C_((()=>{if(c&&e==="all"){this.startRAFTimestamping();this.startPendingCanvasMutationFlusher()}if(c&&typeof e==="number"){this.initCanvasFPSObserver(e,r,i,s,o,{dataURLOptions:a})}}))()}addWindow(t){const{sampling:e="all",blockClass:n,blockSelector:r,unblockSelector:i,recordCanvas:s,enableManualSnapshot:o}=this.options;if(this.windowsSet.has(t))return;if(o){this.windowsSet.add(t);this.windows.push(new WeakRef(t));return}C_((()=>{if(s&&e==="all"){this.initCanvasMutationObserver(t,n,r,i)}if(s&&typeof e==="number"){const e=P_(t,n,r,i,true);this.restoreHandlers.push((()=>{e()}))}}))();this.windowsSet.add(t);this.windows.push(new WeakRef(t))}addShadowRoot(t){this.shadowDoms.add(new WeakRef(t))}resetShadowRoots(){this.shadowDoms=new Set}initFPSWorker(){const t=new Worker(U_());t.onmessage=t=>{const e=t.data;const{id:n}=e;this.snapshotInProgressMap.set(n,false);if(!("base64"in e))return;const{base64:r,type:i,width:s,height:o}=e;this.mutationCb({id:n,type:k_["2D"],commands:[{property:"clearRect",args:[0,0,s,o]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:i}]},0,0,s,o]}]})};return t}initCanvasFPSObserver(t,e,n,r,i,s){const o=this.takeSnapshot(false,t,e,n,r,i,s.dataURLOptions);this.restoreHandlers.push((()=>{cancelAnimationFrame(o)}))}initCanvasMutationObserver(t,e,n,r){const i=P_(t,e,n,r,false);const s=L_(this.processMutation.bind(this),t,e,n,r);const o=B_(this.processMutation.bind(this),t,e,n,r,this.mirror);this.restoreHandlers.push((()=>{i();s();o()}))}snapshot(t){const{options:e}=this;const n=this.takeSnapshot(true,e.sampling==="all"?2:e.sampling||2,e.blockClass,e.blockSelector,e.unblockSelector,e.maxCanvasSize,e.dataURLOptions,t);this.restoreHandlers.push((()=>{cancelAnimationFrame(n)}))}takeSnapshot(t,e,n,r,i,s,o,c){const a=1e3/e;let u=0;let f;const l=t=>{if(t){return[t]}const e=[];const s=t=>{t.querySelectorAll("canvas").forEach((t=>{if(!y_(t,n,r,i,true)){e.push(t)}}))};for(const t of this.windows){const e=t.deref();if(e){s(e.document)}}for(const t of this.shadowDoms){const e=t.deref();if(e){s(e)}}return e};const d=e=>{if(!this.windows.length){return}if(u&&e-u<a){f=w_(d);return}u=e;l(c).forEach((e=>{if(!this.mirror.hasNode(e)){return}const n=this.mirror.getId(e);if(this.snapshotInProgressMap.get(n))return;if(!e.width||!e.height)return;this.snapshotInProgressMap.set(n,true);if(!t&&["webgl","webgl2"].includes(e.__context)){const t=e.getContext(e.__context);if(wr([t,"optionalAccess",t=>t.getContextAttributes,"call",t=>t(),"optionalAccess",t=>t.preserveDrawingBuffer])===false){t.clear(t.COLOR_BUFFER_BIT)}}createImageBitmap(e).then((t=>{wr([this,"access",t=>t.worker,"optionalAccess",t=>t.postMessage,"call",r=>r({id:n,bitmap:t,width:e.width,height:e.height,dataURLOptions:o,maxCanvasSize:s},[t])])})).catch((t=>{C_((()=>{throw t}))()}))}));if(!t){f=w_(d)}};f=w_(d);return f}startPendingCanvasMutationFlusher(){w_((()=>this.flushPendingCanvasMutations()))}startRAFTimestamping(){const t=e=>{this.rafStamps.latestId=e;w_(t)};w_(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach(((t,e)=>{const n=this.mirror.getId(e);this.flushPendingCanvasMutationFor(e,n)}));w_((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(t,e){if(this.frozen||this.locked){return}const n=this.pendingCanvasMutations.get(t);if(!n||e===-1)return;const r=n.map((t=>{const{type:e,...n}=t;return n}));const{type:i}=n[0];this.mutationCb({id:e,type:i,commands:r});this.pendingCanvasMutations.delete(t)}}const H_={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}}};const W_="ReplayCanvas";const G_=1280;const Y_=(t={})=>{const[e,n]=t.maxCanvasSize||[];const r={quality:t.quality||"medium",enableManualSnapshot:t.enableManualSnapshot,maxCanvasSize:[e?Math.min(e,G_):G_,n?Math.min(n,G_):G_]};let i;const s=new Promise((t=>i=t));return{name:W_,getOptions(){const{quality:t,enableManualSnapshot:e,maxCanvasSize:n}=r;return{enableManualSnapshot:e,recordCanvas:true,getCanvasManager:t=>{const r=new q_({...t,enableManualSnapshot:e,maxCanvasSize:n,errorHandler:t=>{try{if(typeof t==="object"){t.__rrweb__=true}}catch(t){}}});i(r);return r},...H_[t||"medium"]||H_.medium}},async snapshot(t){const e=await s;e.snapshot(t)}}};const X_=Go(Y_);const J_=M;const K_=J_.document;const V_=J_.navigator;const Z_="Report a Bug";const Q_="Cancel";const tk="Send Bug Report";const ek="Confirm";const nk="Report a Bug";const rk="your.email@example.org";const ik="Email";const sk="What's the bug? What did you expect?";const ok="Description";const ck="Your Name";const ak="Name";const uk="Thank you for your report!";const fk="(required)";const lk="Add a screenshot";const dk="Remove screenshot";const hk="widget";const pk="api";const mk=5e3;const gk=(t,e={includeReplay:true})=>{if(!t.message){throw new Error("Unable to submit feedback with empty message")}const n=ti();if(!n){throw new Error("No client setup, cannot send feedback.")}if(t.tags&&Object.keys(t.tags).length){Jr().setTags(t.tags)}const r=Gu({source:pk,url:F(),...t},e);return new Promise(((t,e)=>{const i=setTimeout((()=>e("Unable to determine if Feedback was correctly sent.")),5e3);const s=n.on("afterSendEvent",((n,o)=>{if(n.event_id!==r){return}clearTimeout(i);s();if(o&&typeof o.statusCode==="number"&&o.statusCode>=200&&o.statusCode<300){t(r)}if(o&&typeof o.statusCode==="number"&&o.statusCode===0){return e("Unable to send Feedback. This is because of network issues, or because you are using an ad-blocker.")}if(o&&typeof o.statusCode==="number"&&o.statusCode===403){return e("Unable to send Feedback. This could be because this domain is not in your list of allowed domains.")}return e("Unable to send Feedback. This could be because of network issues, or because you are using an ad-blocker")}))}))};const yk=typeof __SENTRY_DEBUG__==="undefined"||__SENTRY_DEBUG__;function bk(){if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(V_.userAgent)){return false}if(/Macintosh/i.test(V_.userAgent)&&V_.maxTouchPoints&&V_.maxTouchPoints>1){return false}if(!isSecureContext){return false}return true}function vk(t,e){return{...t,...e,tags:{...t.tags,...e.tags},onFormOpen:()=>{e.onFormOpen&&e.onFormOpen();t.onFormOpen&&t.onFormOpen()},onFormClose:()=>{e.onFormClose&&e.onFormClose();t.onFormClose&&t.onFormClose()},onSubmitSuccess:n=>{e.onSubmitSuccess&&e.onSubmitSuccess(n);t.onSubmitSuccess&&t.onSubmitSuccess(n)},onSubmitError:n=>{e.onSubmitError&&e.onSubmitError(n);t.onSubmitError&&t.onSubmitError(n)},onFormSubmitted:()=>{e.onFormSubmitted&&e.onFormSubmitted();t.onFormSubmitted&&t.onFormSubmitted()},themeDark:{...t.themeDark,...e.themeDark},themeLight:{...t.themeLight,...e.themeLight}}}function wk(t){const e=K_.createElement("style");e.textContent=`\n.widget__actor {\n position: fixed;\n z-index: var(--z-index);\n margin: var(--page-margin);\n inset: var(--actor-inset);\n\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 16px;\n\n font-family: inherit;\n font-size: var(--font-size);\n font-weight: 600;\n line-height: 1.14em;\n text-decoration: none;\n\n background: var(--actor-background, var(--background));\n border-radius: var(--actor-border-radius, 1.7em/50%);\n border: var(--actor-border, var(--border));\n box-shadow: var(--actor-box-shadow, var(--box-shadow));\n color: var(--actor-color, var(--foreground));\n fill: var(--actor-color, var(--foreground));\n cursor: pointer;\n opacity: 1;\n transition: transform 0.2s ease-in-out;\n transform: translate(0, 0) scale(1);\n}\n.widget__actor[aria-hidden="true"] {\n opacity: 0;\n pointer-events: none;\n visibility: hidden;\n transform: translate(0, 16px) scale(0.98);\n}\n\n.widget__actor:hover {\n background: var(--actor-hover-background, var(--background));\n filter: var(--interactive-filter);\n}\n\n.widget__actor svg {\n width: 1.14em;\n height: 1.14em;\n}\n\n@media (max-width: 600px) {\n .widget__actor span {\n display: none;\n }\n}\n`;if(t){e.setAttribute("nonce",t)}return e}function _k(t,e){Object.entries(e).forEach((([e,n])=>{t.setAttributeNS(null,e,n)}));return t}const kk=20;const Sk="http://www.w3.org/2000/svg";function xk(){const t=t=>J_.document.createElementNS(Sk,t);const e=_k(t("svg"),{width:`${kk}`,height:`${kk}`,viewBox:`0 0 ${kk} ${kk}`,fill:"var(--foreground)"});const n=_k(t("g"),{clipPath:"url(#clip0_57_80)"});const r=_k(t("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"});e.appendChild(n).appendChild(r);const i=t("defs");const s=_k(t("clipPath"),{id:"clip0_57_80"});const o=_k(t("rect"),{width:`${kk}`,height:`${kk}`,fill:"white"});s.appendChild(o);i.appendChild(s);e.appendChild(i).appendChild(s).appendChild(o);return e}function Ck({triggerLabel:t,triggerAriaLabel:e,shadow:n,styleNonce:r}){const i=K_.createElement("button");i.type="button";i.className="widget__actor";i.ariaHidden="false";i.ariaLabel=e||t||Z_;i.appendChild(xk());if(t){const e=K_.createElement("span");e.appendChild(K_.createTextNode(t));i.appendChild(e)}const s=wk(r);return{el:i,appendToDom(){n.appendChild(s);n.appendChild(i)},removeFromDom(){n.removeChild(i);n.removeChild(s)},show(){i.ariaHidden="false"},hide(){i.ariaHidden="true"}}}const Tk="rgba(88, 74, 192, 1)";const Ik={foreground:"#2b2233",background:"#ffffff",accentForeground:"white",accentBackground:Tk,successColor:"#268d75",errorColor:"#df3338",border:"1.5px solid rgba(41, 35, 47, 0.13)",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",outline:"1px auto var(--accent-background)",interactiveFilter:"brightness(95%)"};const Ek={foreground:"#ebe6ef",background:"#29232f",accentForeground:"white",accentBackground:Tk,successColor:"#2da98c",errorColor:"#f55459",border:"1.5px solid rgba(235, 230, 239, 0.15)",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",outline:"1px auto var(--accent-background)",interactiveFilter:"brightness(150%)"};function Ak(t){return`\n --foreground: ${t.foreground};\n --background: ${t.background};\n --accent-foreground: ${t.accentForeground};\n --accent-background: ${t.accentBackground};\n --success-color: ${t.successColor};\n --error-color: ${t.errorColor};\n --border: ${t.border};\n --box-shadow: ${t.boxShadow};\n --outline: ${t.outline};\n --interactive-filter: ${t.interactiveFilter};\n `}function $k({colorScheme:t,themeDark:e,themeLight:n,styleNonce:r}){const i=K_.createElement("style");i.textContent=`\n:host {\n --font-family: system-ui, 'Helvetica Neue', Arial, sans-serif;\n --font-size: 14px;\n --z-index: 100000;\n\n --page-margin: 16px;\n --inset: auto 0 0 auto;\n --actor-inset: var(--inset);\n\n font-family: var(--font-family);\n font-size: var(--font-size);\n\n ${t!=="system"?"color-scheme: only light;":""}\n\n ${Ak(t==="dark"?{...Ek,...e}:{...Ik,...n})}\n}\n\n${t==="system"?`\n@media (prefers-color-scheme: dark) {\n :host {\n ${Ak({...Ek,...e})}\n }\n}`:""}\n}\n`;if(r){i.setAttribute("nonce",r)}return i}const Mk=({lazyLoadIntegration:t,getModalIntegration:e,getScreenshotIntegration:n})=>{const r=({id:r="sentry-feedback",autoInject:i=true,showBranding:s=true,isEmailRequired:o=false,isNameRequired:c=false,showEmail:a=true,showName:u=true,enableScreenshot:f=true,useSentryUser:l={email:"email",name:"username"},tags:d,styleNonce:h,scriptNonce:p,colorScheme:m="system",themeLight:g={},themeDark:y={},addScreenshotButtonLabel:b=lk,cancelButtonLabel:v=Q_,confirmButtonLabel:w=ek,emailLabel:_=ik,emailPlaceholder:k=rk,formTitle:S=nk,isRequiredLabel:x=fk,messageLabel:C=ok,messagePlaceholder:T=sk,nameLabel:I=ak,namePlaceholder:E=ck,removeScreenshotButtonLabel:A=dk,submitButtonLabel:$=tk,successMessageText:M=uk,triggerLabel:R=Z_,triggerAriaLabel:N="",onFormOpen:O,onFormClose:D,onSubmitSuccess:L,onSubmitError:F,onFormSubmitted:P}={})=>{const j={id:r,autoInject:i,showBranding:s,isEmailRequired:o,isNameRequired:c,showEmail:a,showName:u,enableScreenshot:f,useSentryUser:l,tags:d,styleNonce:h,scriptNonce:p,colorScheme:m,themeDark:y,themeLight:g,triggerLabel:R,triggerAriaLabel:N,cancelButtonLabel:v,submitButtonLabel:$,confirmButtonLabel:w,formTitle:S,emailLabel:_,emailPlaceholder:k,messageLabel:C,messagePlaceholder:T,nameLabel:I,namePlaceholder:E,successMessageText:M,isRequiredLabel:x,addScreenshotButtonLabel:b,removeScreenshotButtonLabel:A,onFormClose:D,onFormOpen:O,onSubmitError:F,onSubmitSuccess:L,onFormSubmitted:P};let B=null;let z=[];const U=t=>{if(!B){const e=K_.createElement("div");e.id=String(t.id);K_.body.appendChild(e);B=e.attachShadow({mode:"open"});B.appendChild($k(t))}return B};const q=async(e,n,r)=>{const i=ti();const s=i&&i.getIntegrationByName(e);if(s){return s}const o=n&&n()||await t(r,p);const c=o();i&&i.addIntegration(c);return c};const H=async t=>{const r=t.enableScreenshot&&bk();const[i,s]=await Promise.all([q("FeedbackModal",e,"feedbackModalIntegration"),r?q("FeedbackScreenshot",n,"feedbackScreenshotIntegration"):undefined]);if(!i){yk&&G.error("[Feedback] Missing feedback modal integration. Try using `feedbackSyncIntegration` in your `Sentry.init`.");throw new Error("[Feedback] Missing feedback modal integration!")}if(r&&!s){yk&&G.error("[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.")}const o=i.createDialog({options:{...t,onFormClose:()=>{o&&o.close();t.onFormClose&&t.onFormClose()},onFormSubmitted:()=>{o&&o.close();t.onFormSubmitted&&t.onFormSubmitted()}},screenshotIntegration:r?s:undefined,sendFeedback:gk,shadow:U(t)});return o};const W=(t,e={})=>{const n=vk(j,e);const r=typeof t==="string"?K_.querySelector(t):typeof t.addEventListener==="function"?t:null;if(!r){yk&&G.error("[Feedback] Unable to attach to target element");throw new Error("Unable to attach to target element")}let i=null;const s=async()=>{if(!i){i=await H({...n,onFormSubmitted:()=>{i&&i.removeFromDom();n.onFormSubmitted&&n.onFormSubmitted()}})}i.appendToDom();i.open()};r.addEventListener("click",s);const o=()=>{z=z.filter((t=>t!==o));i&&i.removeFromDom();i=null;r.removeEventListener("click",s)};z.push(o);return o};const Y=(t={})=>{const e=vk(j,t);const n=U(e);const r=Ck({triggerLabel:e.triggerLabel,triggerAriaLabel:e.triggerAriaLabel,shadow:n,styleNonce:h});W(r.el,{...e,onFormOpen(){r.hide()},onFormClose(){r.show()},onFormSubmitted(){r.show()}});return r};return{name:"Feedback",setupOnce(){if(!he()||!j.autoInject){return}if(K_.readyState==="loading"){K_.addEventListener("DOMContentLoaded",(()=>Y().appendToDom()))}else{Y().appendToDom()}},attachTo:W,createWidget(t={}){const e=Y(vk(j,t));e.appendToDom();return e},async createForm(t={}){return H(vk(j,t))},remove(){if(B){B.parentElement&&B.parentElement.remove();B=null}z.forEach((t=>t()));z=[]}}};return r};function Rk(){const t=ti();return t&&t.getIntegrationByName("Feedback")}var Nk,Ok,Dk,Lk,Fk,Pk,jk,Bk={},zk=[],Uk=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,qk=Array.isArray;function Hk(t,e){for(var n in e)t[n]=e[n];return t}function Wk(t){var e=t.parentNode;e&&e.removeChild(t)}function Gk(t,e,n){var r,i,s,o={};for(s in e)"key"==s?r=e[s]:"ref"==s?i=e[s]:o[s]=e[s];if(arguments.length>2&&(o.children=arguments.length>3?Nk.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(s in t.defaultProps)void 0===o[s]&&(o[s]=t.defaultProps[s]);return Yk(t,o,r,i,null)}function Yk(t,e,n,r,i){var s={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==i?++Dk:i,__i:-1,__u:0};return null==i&&null!=Ok.vnode&&Ok.vnode(s),s}function Xk(t){return t.children}function Jk(t,e){this.props=t,this.context=e}function Kk(t,e){if(null==e)return t.__?Kk(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?Kk(t):null}function Vk(t,e,n){var r,i=t.__v,s=i.__e,o=t.__P;if(o)return(r=Hk({},i)).__v=i.__v+1,Ok.vnode&&Ok.vnode(r),uS(o,r,i,t.__n,void 0!==o.ownerSVGElement,32&i.__u?[s]:null,e,null==s?Kk(i):s,!!(32&i.__u),n),r.__.__k[r.__i]=r,r.__d=void 0,r.__e!=s&&Zk(r),r}function Zk(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return Zk(t)}}function Qk(t){(!t.__d&&(t.__d=!0)&&Lk.push(t)&&!tS.__r++||Fk!==Ok.debounceRendering)&&((Fk=Ok.debounceRendering)||Pk)(tS)}function tS(){var t,e,n,r=[],i=[];for(Lk.sort(jk);t=Lk.shift();)t.__d&&(n=Lk.length,e=Vk(t,r,i)||e,0===n||Lk.length>n?(fS(r,e,i),i.length=r.length=0,e=void 0,Lk.sort(jk)):e&&Ok.__c&&Ok.__c(e,zk));e&&fS(r,e,i),tS.__r=0}function eS(t,e,n,r,i,s,o,c,a,u,f){var l,d,h,p,m,g=r&&r.__k||zk,y=e.length;for(n.__d=a,nS(n,e,g),a=n.__d,l=0;l<y;l++)null!=(h=n.__k[l])&&"boolean"!=typeof h&&"function"!=typeof h&&(d=-1===h.__i?Bk:g[h.__i]||Bk,h.__i=l,uS(t,h,d,i,s,o,c,a,u,f),p=h.__e,h.ref&&d.ref!=h.ref&&(d.ref&&dS(d.ref,null,h),f.push(h.ref,h.__c||p,h)),null==m&&null!=p&&(m=p),65536&h.__u||d.__k===h.__k?a=rS(h,a,t):"function"==typeof h.type&&void 0!==h.__d?a=h.__d:p&&(a=p.nextSibling),h.__d=void 0,h.__u&=-196609);n.__d=a,n.__e=m}function nS(t,e,n){var r,i,s,o,c,a=e.length,u=n.length,f=u,l=0;for(t.__k=[],r=0;r<a;r++)null!=(i=t.__k[r]=null==(i=e[r])||"boolean"==typeof i||"function"==typeof i?null:"string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?Yk(null,i,null,null,i):qk(i)?Yk(Xk,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?Yk(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=t,i.__b=t.__b+1,c=iS(i,n,o=r+l,f),i.__i=c,s=null,-1!==c&&(f--,(s=n[c])&&(s.__u|=131072)),null==s||null===s.__v?(-1==c&&l--,"function"!=typeof i.type&&(i.__u|=65536)):c!==o&&(c===o+1?l++:c>o?f>a-o?l+=c-o:l--:l=c<o&&c==o-1?c-o:0,c!==r+l&&(i.__u|=65536))):(s=n[r])&&null==s.key&&s.__e&&(s.__e==t.__d&&(t.__d=Kk(s)),hS(s,s,!1),n[r]=null,f--);if(f)for(r=0;r<u;r++)null!=(s=n[r])&&0==(131072&s.__u)&&(s.__e==t.__d&&(t.__d=Kk(s)),hS(s,s))}function rS(t,e,n){var r,i;if("function"==typeof t.type){for(r=t.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=t,e=rS(r[i],e,n));return e}t.__e!=e&&(n.insertBefore(t.__e,e||null),e=t.__e);do{e=e&&e.nextSibling}while(null!=e&&8===e.nodeType);return e}function iS(t,e,n,r){var i=t.key,s=t.type,o=n-1,c=n+1,a=e[n];if(null===a||a&&i==a.key&&s===a.type)return n;if(r>(null!=a&&0==(131072&a.__u)?1:0))for(;o>=0||c<e.length;){if(o>=0){if((a=e[o])&&0==(131072&a.__u)&&i==a.key&&s===a.type)return o;o--}if(c<e.length){if((a=e[c])&&0==(131072&a.__u)&&i==a.key&&s===a.type)return c;c++}}return-1}function sS(t,e,n){"-"===e[0]?t.setProperty(e,null==n?"":n):t[e]=null==n?"":"number"!=typeof n||Uk.test(e)?n:n+"px"}function oS(t,e,n,r,i){var s;t:if("style"===e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof r&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||sS(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||sS(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])s=e!==(e=e.replace(/(PointerCapture)$|Capture$/i,"$1")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+s]=n,n?r?n.u=r.u:(n.u=Date.now(),t.addEventListener(e,s?aS:cS,s)):t.removeEventListener(e,s?aS:cS,s);else{if(i)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==e&&"height"!==e&&"href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&"rowSpan"!==e&&"colSpan"!==e&&"role"!==e&&e in t)try{t[e]=null==n?"":n;break t}catch(t){}"function"==typeof n||(null==n||!1===n&&"-"!==e[4]?t.removeAttribute(e):t.setAttribute(e,n))}}function cS(t){if(this.l){var e=this.l[t.type+!1];if(t.t){if(t.t<=e.u)return}else t.t=Date.now();return e(Ok.event?Ok.event(t):t)}}function aS(t){if(this.l)return this.l[t.type+!0](Ok.event?Ok.event(t):t)}function uS(t,e,n,r,i,s,o,c,a,u){var f,l,d,h,p,m,g,y,b,v,w,_,k,S,x,C=e.type;if(void 0!==e.constructor)return null;128&n.__u&&(a=!!(32&n.__u),s=[c=e.__e=n.__e]),(f=Ok.__b)&&f(e);t:if("function"==typeof C)try{if(y=e.props,b=(f=C.contextType)&&r[f.__c],v=f?b?b.props.value:f.__:r,n.__c?g=(l=e.__c=n.__c).__=l.__E:("prototype"in C&&C.prototype.render?e.__c=l=new C(y,v):(e.__c=l=new Jk(y,v),l.constructor=C,l.render=pS),b&&b.sub(l),l.props=y,l.state||(l.state={}),l.context=v,l.__n=r,d=l.__d=!0,l.__h=[],l._sb=[]),null==l.__s&&(l.__s=l.state),null!=C.getDerivedStateFromProps&&(l.__s==l.state&&(l.__s=Hk({},l.__s)),Hk(l.__s,C.getDerivedStateFromProps(y,l.__s))),h=l.props,p=l.state,l.__v=e,d)null==C.getDerivedStateFromProps&&null!=l.componentWillMount&&l.componentWillMount(),null!=l.componentDidMount&&l.__h.push(l.componentDidMount);else{if(null==C.getDerivedStateFromProps&&y!==h&&null!=l.componentWillReceiveProps&&l.componentWillReceiveProps(y,v),!l.__e&&(null!=l.shouldComponentUpdate&&!1===l.shouldComponentUpdate(y,l.__s,v)||e.__v===n.__v)){for(e.__v!==n.__v&&(l.props=y,l.state=l.__s,l.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.forEach((function(t){t&&(t.__=e)})),w=0;w<l._sb.length;w++)l.__h.push(l._sb[w]);l._sb=[],l.__h.length&&o.push(l);break t}null!=l.componentWillUpdate&&l.componentWillUpdate(y,l.__s,v),null!=l.componentDidUpdate&&l.__h.push((function(){l.componentDidUpdate(h,p,m)}))}if(l.context=v,l.props=y,l.__P=t,l.__e=!1,_=Ok.__r,k=0,"prototype"in C&&C.prototype.render){for(l.state=l.__s,l.__d=!1,_&&_(e),f=l.render(l.props,l.state,l.context),S=0;S<l._sb.length;S++)l.__h.push(l._sb[S]);l._sb=[]}else do{l.__d=!1,_&&_(e),f=l.render(l.props,l.state,l.context),l.state=l.__s}while(l.__d&&++k<25);l.state=l.__s,null!=l.getChildContext&&(r=Hk(Hk({},r),l.getChildContext())),d||null==l.getSnapshotBeforeUpdate||(m=l.getSnapshotBeforeUpdate(h,p)),eS(t,qk(x=null!=f&&f.type===Xk&&null==f.key?f.props.children:f)?x:[x],e,n,r,i,s,o,c,a,u),l.base=e.__e,e.__u&=-161,l.__h.length&&o.push(l),g&&(l.__E=l.__=null)}catch(t){e.__v=null,a||null!=s?(e.__e=c,e.__u|=a?160:32,s[s.indexOf(c)]=null):(e.__e=n.__e,e.__k=n.__k),Ok.__e(t,e,n)}else null==s&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=lS(n.__e,e,n,r,i,s,o,a,u);(f=Ok.diffed)&&f(e)}function fS(t,e,n){for(var r=0;r<n.length;r++)dS(n[r],n[++r],n[++r]);Ok.__c&&Ok.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){Ok.__e(t,e.__v)}}))}function lS(t,e,n,r,i,s,o,c,a){var u,f,l,d,h,p,m,g=n.props,y=e.props,b=e.type;if("svg"===b&&(i=!0),null!=s)for(u=0;u<s.length;u++)if((h=s[u])&&"setAttribute"in h==!!b&&(b?h.localName===b:3===h.nodeType)){t=h,s[u]=null;break}if(null==t){if(null===b)return document.createTextNode(y);t=i?document.createElementNS("http://www.w3.org/2000/svg",b):document.createElement(b,y.is&&y),s=null,c=!1}if(null===b)g===y||c&&t.data===y||(t.data=y);else{if(s=s&&Nk.call(t.childNodes),g=n.props||Bk,!c&&null!=s)for(g={},u=0;u<t.attributes.length;u++)g[(h=t.attributes[u]).name]=h.value;for(u in g)h=g[u],"children"==u||("dangerouslySetInnerHTML"==u?l=h:"key"===u||u in y||oS(t,u,null,h,i));for(u in y)h=y[u],"children"==u?d=h:"dangerouslySetInnerHTML"==u?f=h:"value"==u?p=h:"checked"==u?m=h:"key"===u||c&&"function"!=typeof h||g[u]===h||oS(t,u,h,g[u],i);if(f)c||l&&(f.__html===l.__html||f.__html===t.innerHTML)||(t.innerHTML=f.__html),e.__k=[];else if(l&&(t.innerHTML=""),eS(t,qk(d)?d:[d],e,n,r,i&&"foreignObject"!==b,s,o,s?s[0]:n.__k&&Kk(n,0),c,a),null!=s)for(u=s.length;u--;)null!=s[u]&&Wk(s[u]);c||(u="value",void 0!==p&&(p!==t[u]||"progress"===b&&!p||"option"===b&&p!==g[u])&&oS(t,u,p,g[u],!1),u="checked",void 0!==m&&m!==t[u]&&oS(t,u,m,g[u],!1))}return t}function dS(t,e,n){try{"function"==typeof t?t(e):t.current=e}catch(t){Ok.__e(t,n)}}function hS(t,e,n){var r,i;if(Ok.unmount&&Ok.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||dS(r,null,e)),null!=(r=t.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(t){Ok.__e(t,e)}r.base=r.__P=null,t.__c=void 0}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&hS(r[i],e,n||"function"!=typeof t.type);n||null==t.__e||Wk(t.__e),t.__=t.__e=t.__d=void 0}function pS(t,e,n){return this.constructor(t,n)}function mS(t,e,n){var r,i,s,o;Ok.__&&Ok.__(t,e),i=(r="function"==typeof n)?null:n&&n.__k||e.__k,s=[],o=[],uS(e,t=(!r&&n||e).__k=Gk(Xk,null,[t]),i||Bk,Bk,void 0!==e.ownerSVGElement,!r&&n?[n]:i?null:e.firstChild?Nk.call(e.childNodes):null,s,!r&&n?n:i?i.__e:e.firstChild,r,o),t.__d=void 0,fS(s,t,o)}Nk=zk.slice,Ok={__e:function(t,e,n,r){for(var i,s,o;e=e.__;)if((i=e.__c)&&!i.__)try{if((s=i.constructor)&&null!=s.getDerivedStateFromError&&(i.setState(s.getDerivedStateFromError(t)),o=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(t,r||{}),o=i.__d),o)return i.__E=i}catch(e){t=e}throw t}},Dk=0,Jk.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Hk({},this.state),"function"==typeof t&&(t=t(Hk({},n),this.props)),t&&Hk(n,t),null!=t&&this.__v&&(e&&this._sb.push(e),Qk(this))},Jk.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Qk(this))},Jk.prototype.render=Xk,Lk=[],Pk="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,jk=function(t,e){return t.__v.__b-e.__v.__b},tS.__r=0;var gS,yS,bS,vS,wS=0,_S=[],kS=[],SS=Ok,xS=SS.__b,CS=SS.__r,TS=SS.diffed,IS=SS.__c,ES=SS.unmount,AS=SS.__;function $S(t,e){SS.__h&&SS.__h(yS,t,wS||e),wS=0;var n=yS.__H||(yS.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({__V:kS}),n.__[t]}function MS(t){return wS=1,RS(JS,t)}function RS(t,e,n){var r=$S(gS++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):JS(void 0,e),function(t){var e=r.__N?r.__N[0]:r.__[0],n=r.t(e,t);e!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=yS,!yS.u)){var i=function(t,e,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter((function(t){return!!t.__c}));if(i.every((function(t){return!t.__N})))return!s||s.call(this,t,e,n);var o=!1;return i.forEach((function(t){if(t.__N){var e=t.__[0];t.__=t.__N,t.__N=void 0,e!==t.__[0]&&(o=!0)}})),!(!o&&r.__c.props===t)&&(!s||s.call(this,t,e,n))};yS.u=!0;var s=yS.shouldComponentUpdate,o=yS.componentWillUpdate;yS.componentWillUpdate=function(t,e,n){if(this.__e){var r=s;s=void 0,i(t,e,n),s=r}o&&o.call(this,t,e,n)},yS.shouldComponentUpdate=i}return r.__N||r.__}function NS(t,e){var n=$S(gS++,3);!SS.__s&&XS(n.__H,e)&&(n.__=t,n.i=e,yS.__H.__h.push(n))}function OS(t,e){var n=$S(gS++,4);!SS.__s&&XS(n.__H,e)&&(n.__=t,n.i=e,yS.__h.push(n))}function DS(t){return wS=5,FS((function(){return{current:t}}),[])}function LS(t,e,n){wS=6,OS((function(){return"function"==typeof t?(t(e()),function(){return t(null)}):t?(t.current=e(),function(){return t.current=null}):void 0}),null==n?n:n.concat(t))}function FS(t,e){var n=$S(gS++,7);return XS(n.__H,e)?(n.__V=t(),n.i=e,n.__h=t,n.__V):n.__}function PS(t,e){return wS=8,FS((function(){return t}),e)}function jS(t){var e=yS.context[t.__c],n=$S(gS++,9);return n.c=t,e?(null==n.__&&(n.__=!0,e.sub(yS)),e.props.value):t.__}function BS(t,e){SS.useDebugValue&&SS.useDebugValue(e?e(t):t)}function zS(t){var e=$S(gS++,10),n=MS();return e.__=t,yS.componentDidCatch||(yS.componentDidCatch=function(t,r){e.__&&e.__(t,r),n[1](t)}),[n[0],function(){n[1](void 0)}]}function US(){var t=$S(gS++,11);if(!t.__){for(var e=yS.__v;null!==e&&!e.__m&&null!==e.__;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function qS(){for(var t;t=_S.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(GS),t.__H.__h.forEach(YS),t.__H.__h=[]}catch(e){t.__H.__h=[],SS.__e(e,t.__v)}}SS.__b=function(t){yS=null,xS&&xS(t)},SS.__=function(t,e){e.__k&&e.__k.__m&&(t.__m=e.__k.__m),AS&&AS(t,e)},SS.__r=function(t){CS&&CS(t),gS=0;var e=(yS=t.__c).__H;e&&(bS===yS?(e.__h=[],yS.__h=[],e.__.forEach((function(t){t.__N&&(t.__=t.__N),t.__V=kS,t.__N=t.i=void 0}))):(e.__h.forEach(GS),e.__h.forEach(YS),e.__h=[],gS=0)),bS=yS},SS.diffed=function(t){TS&&TS(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==_S.push(e)&&vS===SS.requestAnimationFrame||((vS=SS.requestAnimationFrame)||WS)(qS)),e.__H.__.forEach((function(t){t.i&&(t.__H=t.i),t.__V!==kS&&(t.__=t.__V),t.i=void 0,t.__V=kS}))),bS=yS=null},SS.__c=function(t,e){e.some((function(t){try{t.__h.forEach(GS),t.__h=t.__h.filter((function(t){return!t.__||YS(t)}))}catch(n){e.some((function(t){t.__h&&(t.__h=[])})),e=[],SS.__e(n,t.__v)}})),IS&&IS(t,e)},SS.unmount=function(t){ES&&ES(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach((function(t){try{GS(t)}catch(t){e=t}})),n.__H=void 0,e&&SS.__e(e,n.__v))};var HS="function"==typeof requestAnimationFrame;function WS(t){var e,n=function(){clearTimeout(r),HS&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);HS&&(e=requestAnimationFrame(n))}function GS(t){var e=yS,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),yS=e}function YS(t){var e=yS;t.__c=t.__(),yS=e}function XS(t,e){return!t||t.length!==e.length||e.some((function(e,n){return e!==t[n]}))}function JS(t,e){return"function"==typeof e?e(t):e}const KS={__proto__:null,useCallback:PS,useContext:jS,useDebugValue:BS,useEffect:NS,useErrorBoundary:zS,useId:US,useImperativeHandle:LS,useLayoutEffect:OS,useMemo:FS,useReducer:RS,useRef:DS,useState:MS};const VS="http://www.w3.org/2000/svg";function ZS(){const t=t=>K_.createElementNS(VS,t);const e=_k(t("svg"),{width:"32",height:"30",viewBox:"0 0 72 66",fill:"inherit"});const n=_k(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"});e.appendChild(n);return e}const QS="/home/runner/work/sentry-javascript/sentry-javascript/packages/feedback/src/modal/components/DialogHeader.tsx";function tx({options:t}){const e=FS((()=>({__html:ZS().outerHTML})),[]);return Gk("h2",{class:"dialog__header",__self:this,__source:{fileName:QS,lineNumber:16}},t.formTitle,t.showBranding?Gk("a",{class:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer",dangerouslySetInnerHTML:e,__self:this,__source:{fileName:QS,lineNumber:19}}):null)}function ex(t,e){const n=[];if(e.isNameRequired&&!t.name){n.push(e.nameLabel)}if(e.isEmailRequired&&!t.email){n.push(e.emailLabel)}if(!t.message){n.push(e.messageLabel)}return n}const nx="/home/runner/work/sentry-javascript/sentry-javascript/packages/feedback/src/modal/components/Form.tsx";function rx(t,e){const n=t.get(e);if(typeof n==="string"){return n.trim()}return""}function ix({options:t,defaultEmail:e,defaultName:n,onFormClose:r,onSubmit:i,onSubmitSuccess:s,onSubmitError:o,showEmail:c,showName:a,screenshotInput:u}){const{tags:f,addScreenshotButtonLabel:l,removeScreenshotButtonLabel:d,cancelButtonLabel:h,emailLabel:p,emailPlaceholder:m,isEmailRequired:g,isNameRequired:y,messageLabel:b,messagePlaceholder:v,nameLabel:w,namePlaceholder:_,submitButtonLabel:k,isRequiredLabel:S}=t;const[x,C]=MS(null);const[T,I]=MS(false);const E=u&&u.input;const[A,$]=MS(null);const M=PS((t=>{$(t);I(false)}),[]);const R=PS((t=>{const e=ex(t,{emailLabel:p,isEmailRequired:g,isNameRequired:y,messageLabel:b,nameLabel:w});if(e.length>0){C(`Please enter in the following required fields: ${e.join(", ")}`)}else{C(null)}return e.length===0}),[p,g,y,b,w]);const N=PS((async t=>{try{t.preventDefault();if(!(t.target instanceof HTMLFormElement)){return}const e=new FormData(t.target);const n=await(u&&T?u.value():undefined);const r={name:rx(e,"name"),email:rx(e,"email"),message:rx(e,"message"),attachments:n?[n]:undefined};if(!R(r)){return}try{await i({name:r.name,email:r.email,message:r.message,source:hk,tags:f},{attachments:r.attachments});s(r)}catch(t){yk&&G.error(t);C(t);o(t)}}catch(t){}}),[u&&T,s,o]);return Gk("form",{class:"form",onSubmit:N,__self:this,__source:{fileName:nx,lineNumber:144}},E&&T?Gk(E,{onError:M,__self:this,__source:{fileName:nx,lineNumber:146}}):null,Gk("div",{class:"form__right","data-sentry-feedback":true,__self:this,__source:{fileName:nx,lineNumber:149}},Gk("div",{class:"form__top",__self:this,__source:{fileName:nx,lineNumber:150}},x?Gk("div",{class:"form__error-container",__self:this,__source:{fileName:nx,lineNumber:151}},x):null,a?Gk("label",{for:"name",class:"form__label",__self:this,__source:{fileName:nx,lineNumber:154}},Gk(sx,{label:w,isRequiredLabel:S,isRequired:y,__self:this,__source:{fileName:nx,lineNumber:155}}),Gk("input",{class:"form__input",defaultValue:n,id:"name",name:"name",placeholder:_,required:y,type:"text",__self:this,__source:{fileName:nx,lineNumber:156}})):Gk("input",{"aria-hidden":true,value:n,name:"name",type:"hidden",__self:this,__source:{fileName:nx,lineNumber:167}}),c?Gk("label",{for:"email",class:"form__label",__self:this,__source:{fileName:nx,lineNumber:171}},Gk(sx,{label:p,isRequiredLabel:S,isRequired:g,__self:this,__source:{fileName:nx,lineNumber:172}}),Gk("input",{class:"form__input",defaultValue:e,id:"email",name:"email",placeholder:m,required:g,type:"email",__self:this,__source:{fileName:nx,lineNumber:173}})):Gk("input",{"aria-hidden":true,value:e,name:"email",type:"hidden",__self:this,__source:{fileName:nx,lineNumber:184}}),Gk("label",{for:"message",class:"form__label",__self:this,__source:{fileName:nx,lineNumber:187}},Gk(sx,{label:b,isRequiredLabel:S,isRequired:true,__self:this,__source:{fileName:nx,lineNumber:188}}),Gk("textarea",{autoFocus:true,class:"form__input form__input--textarea",id:"message",name:"message",placeholder:v,required:true,rows:5,__self:this,__source:{fileName:nx,lineNumber:189}})),E?Gk("label",{for:"screenshot",class:"form__label",__self:this,__source:{fileName:nx,lineNumber:201}},Gk("button",{class:"btn btn--default",type:"button",onClick:()=>{$(null);I((t=>!t))},__self:this,__source:{fileName:nx,lineNumber:202}},T?d:l),A?Gk("div",{class:"form__error-container",__self:this,__source:{fileName:nx,lineNumber:212}},A.message):null):null),Gk("div",{class:"btn-group",__self:this,__source:{fileName:nx,lineNumber:216}},Gk("button",{class:"btn btn--primary",type:"submit",__self:this,__source:{fileName:nx,lineNumber:217}},k),Gk("button",{class:"btn btn--default",type:"button",onClick:r,__self:this,__source:{fileName:nx,lineNumber:220}},h))))}function sx({label:t,isRequired:e,isRequiredLabel:n}){return Gk("span",{class:"form__label__text",__self:this,__source:{fileName:nx,lineNumber:239}},t,e&&Gk("span",{class:"form__label__text--required",__self:this,__source:{fileName:nx,lineNumber:241}},n))}const ox=16;const cx=17;const ax="http://www.w3.org/2000/svg";function ux(){const t=t=>J_.document.createElementNS(ax,t);const e=_k(t("svg"),{width:`${ox}`,height:`${cx}`,viewBox:`0 0 ${ox} ${cx}`,fill:"inherit"});const n=_k(t("g"),{clipPath:"url(#clip0_57_156)"});const r=_k(t("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"});const i=_k(t("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"});e.appendChild(n).append(i,r);const s=t("defs");const o=_k(t("clipPath"),{id:"clip0_57_156"});const c=_k(t("rect"),{width:`${ox}`,height:`${ox}`,fill:"white",transform:"translate(0 0.5)"});o.appendChild(c);s.appendChild(o);e.appendChild(s).appendChild(o).appendChild(c);return e}const fx="/home/runner/work/sentry-javascript/sentry-javascript/packages/feedback/src/modal/components/Dialog.tsx";function lx({open:t,onFormSubmitted:e,...n}){const r=n.options;const i=FS((()=>({__html:ux().outerHTML})),[]);const[s,o]=MS(null);const c=PS((()=>{if(s){clearTimeout(s);o(null)}e()}),[s]);const a=PS((t=>{n.onSubmitSuccess(t);o(setTimeout((()=>{e();o(null)}),mk))}),[e]);return Gk(Xk,{__self:this,__source:{fileName:fx,lineNumber:48}},s?Gk("div",{class:"success__position",onClick:c,__self:this,__source:{fileName:fx,lineNumber:50}},Gk("div",{class:"success__content",__self:this,__source:{fileName:fx,lineNumber:51}},r.successMessageText,Gk("span",{class:"success__icon",dangerouslySetInnerHTML:i,__self:this,__source:{fileName:fx,lineNumber:53}}))):Gk("dialog",{class:"dialog",onClick:r.onFormClose,open:t,__self:this,__source:{fileName:fx,lineNumber:57}},Gk("div",{class:"dialog__position",__self:this,__source:{fileName:fx,lineNumber:58}},Gk("div",{class:"dialog__content",onClick:t=>{t.stopPropagation()},__self:this,__source:{fileName:fx,lineNumber:59}},Gk(tx,{options:r,__self:this,__source:{fileName:fx,lineNumber:66}}),Gk(ix,{...n,onSubmitSuccess:a,__self:this,__source:{fileName:fx,lineNumber:67}})))))}const dx=`\n.dialog {\n position: fixed;\n z-index: var(--z-index);\n margin: 0;\n inset: 0;\n\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n height: 100vh;\n width: 100vw;\n\n color: var(--dialog-color, var(--foreground));\n fill: var(--dialog-color, var(--foreground));\n line-height: 1.75em;\n\n background-color: rgba(0, 0, 0, 0.05);\n border: none;\n inset: 0;\n opacity: 1;\n transition: opacity 0.2s ease-in-out;\n}\n\n.dialog__position {\n position: fixed;\n z-index: var(--z-index);\n inset: var(--dialog-inset);\n padding: var(--page-margin);\n display: flex;\n max-height: calc(100vh - (2 * var(--page-margin)));\n}\n@media (max-width: 600px) {\n .dialog__position {\n inset: var(--page-margin);\n padding: 0;\n }\n}\n\n.dialog__position:has(.editor) {\n inset: var(--page-margin);\n padding: 0;\n}\n\n.dialog:not([open]) {\n opacity: 0;\n pointer-events: none;\n visibility: hidden;\n}\n.dialog:not([open]) .dialog__content {\n transform: translate(0, -16px) scale(0.98);\n}\n\n.dialog__content {\n display: flex;\n flex-direction: column;\n gap: 16px;\n padding: var(--dialog-padding, 24px);\n max-width: 100%;\n width: 100%;\n max-height: 100%;\n overflow: auto;\n\n background: var(--dialog-background, var(--background));\n border-radius: var(--dialog-border-radius, 20px);\n border: var(--dialog-border, var(--border));\n box-shadow: var(--dialog-box-shadow, var(--box-shadow));\n transform: translate(0, 0) scale(1);\n transition: transform 0.2s ease-in-out;\n}\n`;const hx=`\n.dialog__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-weight: var(--dialog-header-weight, 600);\n margin: 0;\n}\n\n.brand-link {\n display: inline-flex;\n}\n.brand-link:focus-visible {\n outline: var(--outline);\n}\n`;const px=`\n.form {\n display: flex;\n overflow: auto;\n flex-direction: row;\n gap: 16px;\n flex: 1 0;\n}\n\n.form__right {\n flex: 0 0 var(--form-width, 272px);\n width: var(--form-width, 272px);\n display: flex;\n overflow: auto;\n flex-direction: column;\n justify-content: space-between;\n gap: 20px;\n}\n\n@media (max-width: 600px) {\n .form__right {\n width: auto;\n }\n}\n\n.form__top {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.form__error-container {\n color: var(--error-color);\n fill: var(--error-color);\n}\n\n.form__label {\n display: flex;\n flex-direction: column;\n gap: 4px;\n margin: 0px;\n}\n\n.form__label__text {\n display: flex;\n gap: 4px;\n align-items: center;\n}\n\n.form__label__text--required {\n font-size: 0.85em;\n}\n\n.form__input {\n font-family: inherit;\n line-height: inherit;\n background: transparent;\n box-sizing: border-box;\n border: var(--input-border, var(--border));\n border-radius: var(--input-border-radius, 6px);\n color: var(--input-color, inherit);\n fill: var(--input-color, inherit);\n font-size: var(--input-font-size, inherit);\n font-weight: var(--input-font-weight, 500);\n padding: 6px 12px;\n}\n\n.form__input::placeholder {\n opacity: 0.65;\n color: var(--input-placeholder-color, inherit);\n filter: var(--interactive-filter);\n}\n\n.form__input:focus-visible {\n outline: var(--input-focus-outline, var(--outline));\n}\n\n.form__input--textarea {\n font-family: inherit;\n resize: vertical;\n}\n\n.error {\n color: var(--error-color);\n fill: var(--error-color);\n}\n`;const mx=`\n.btn-group {\n display: grid;\n gap: 8px;\n}\n\n.btn {\n line-height: inherit;\n border: var(--button-border, var(--border));\n border-radius: var(--button-border-radius, 6px);\n cursor: pointer;\n font-family: inherit;\n font-size: var(--button-font-size, inherit);\n font-weight: var(--button-font-weight, 600);\n padding: var(--button-padding, 6px 16px);\n}\n.btn[disabled] {\n opacity: 0.6;\n pointer-events: none;\n}\n\n.btn--primary {\n color: var(--button-primary-color, var(--accent-foreground));\n fill: var(--button-primary-color, var(--accent-foreground));\n background: var(--button-primary-background, var(--accent-background));\n border: var(--button-primary-border, var(--border));\n border-radius: var(--button-primary-border-radius, 6px);\n font-weight: var(--button-primary-font-weight, 500);\n}\n.btn--primary:hover {\n color: var(--button-primary-hover-color, var(--accent-foreground));\n fill: var(--button-primary-hover-color, var(--accent-foreground));\n background: var(--button-primary-hover-background, var(--accent-background));\n filter: var(--interactive-filter);\n}\n.btn--primary:focus-visible {\n background: var(--button-primary-hover-background, var(--accent-background));\n filter: var(--interactive-filter);\n outline: var(--button-primary-focus-outline, var(--outline));\n}\n\n.btn--default {\n color: var(--button-color, var(--foreground));\n fill: var(--button-color, var(--foreground));\n background: var(--button-background, var(--background));\n border: var(--button-border, var(--border));\n border-radius: var(--button-border-radius, 6px);\n font-weight: var(--button-font-weight, 500);\n}\n.btn--default:hover {\n color: var(--button-color, var(--foreground));\n fill: var(--button-color, var(--foreground));\n background: var(--button-hover-background, var(--background));\n filter: var(--interactive-filter);\n}\n.btn--default:focus-visible {\n background: var(--button-hover-background, var(--background));\n filter: var(--interactive-filter);\n outline: var(--button-focus-outline, var(--outline));\n}\n`;const gx=`\n.success__position {\n position: fixed;\n inset: var(--dialog-inset);\n padding: var(--page-margin);\n z-index: var(--z-index);\n}\n.success__content {\n background: var(--success-background, var(--background));\n border: var(--success-border, var(--border));\n border-radius: var(--success-border-radius, 1.7em/50%);\n box-shadow: var(--success-box-shadow, var(--box-shadow));\n font-weight: var(--success-font-weight, 600);\n color: var(--success-color);\n fill: var(--success-color);\n padding: 12px 24px;\n line-height: 1.75em;\n\n display: grid;\n align-items: center;\n grid-auto-flow: column;\n gap: 6px;\n cursor: default;\n}\n\n.success__icon {\n display: flex;\n}\n`;function yx(t){const e=K_.createElement("style");e.textContent=`\n:host {\n --dialog-inset: var(--inset);\n}\n\n${dx}\n${hx}\n${px}\n${mx}\n${gx}\n`;if(t){e.setAttribute("nonce",t)}return e}const bx="/home/runner/work/sentry-javascript/sentry-javascript/packages/feedback/src/modal/integration.tsx";function vx(){const t=Jr().getUser();const e=Kr().getUser();const n=Vr().getUser();if(t&&Object.keys(t).length){return t}if(e&&Object.keys(e).length){return e}return n}const wx=()=>({name:"FeedbackModal",setupOnce(){},createDialog:({options:t,screenshotIntegration:e,sendFeedback:n,shadow:r})=>{const i=r;const s=t.useSentryUser;const o=vx();const c=K_.createElement("div");const a=yx(t.styleNonce);let u="";const f={get el(){return c},appendToDom(){if(!i.contains(a)&&!i.contains(c)){i.appendChild(a);i.appendChild(c)}},removeFromDom(){i.removeChild(c);i.removeChild(a);K_.body.style.overflow=u},open(){d(true);t.onFormOpen&&t.onFormOpen();u=K_.body.style.overflow;K_.body.style.overflow="hidden"},close(){d(false);K_.body.style.overflow=u}};const l=e&&e.createInput({h:Gk,hooks:KS,dialog:f,options:t});const d=e=>{mS(Gk(lx,{options:t,screenshotInput:l,showName:t.showName||t.isNameRequired,showEmail:t.showEmail||t.isEmailRequired,defaultName:s&&o&&o[s.name]||"",defaultEmail:s&&o&&o[s.email]||"",onFormClose:()=>{d(false);t.onFormClose&&t.onFormClose()},onSubmit:n,onSubmitSuccess:e=>{d(false);t.onSubmitSuccess&&t.onSubmitSuccess(e)},onSubmitError:e=>{t.onSubmitError&&t.onSubmitError(e)},onFormSubmitted:()=>{t.onFormSubmitted&&t.onFormSubmitted()},open:e,__self:undefined,__source:{fileName:bx,lineNumber:67}}),c)};return f}});const _x="/home/runner/work/sentry-javascript/sentry-javascript/packages/feedback/src/screenshot/components/CropCorner.tsx";function kx({h:t}){return function e({top:n,left:r,corner:i,onGrabButton:s}){return t("button",{class:`editor__crop-corner editor__crop-corner--${i} `,style:{top:n,left:r},onMouseDown:t=>{t.preventDefault();s(t,i)},onClick:t=>{t.preventDefault()},__self:this,__source:{fileName:_x,lineNumber:22}})}}function Sx(t){const e=K_.createElement("style");const n="#1A141F";const r="#302735";e.textContent=`\n.editor {\n padding: 10px;\n padding-top: 65px;\n padding-bottom: 65px;\n flex-grow: 1;\n\n background-color: ${n};\n background-image: repeating-linear-gradient(\n -145deg,\n transparent,\n transparent 8px,\n ${n} 8px,\n ${n} 11px\n ),\n repeating-linear-gradient(\n -45deg,\n transparent,\n transparent 15px,\n ${r} 15px,\n ${r} 16px\n );\n}\n\n.editor__canvas-container {\n width: 100%;\n height: 100%;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.editor__canvas-container canvas {\n object-fit: contain;\n position: relative;\n}\n\n.editor__crop-btn-group {\n padding: 8px;\n gap: 8px;\n border-radius: var(--menu-border-radius, 6px);\n background: var(--button-primary-background, var(--background));\n width: 175px;\n position: absolute;\n}\n\n.editor__crop-corner {\n width: 30px;\n height: 30px;\n position: absolute;\n background: none;\n border: 3px solid #ffffff;\n}\n\n.editor__crop-corner--top-left {\n cursor: nwse-resize;\n border-right: none;\n border-bottom: none;\n}\n.editor__crop-corner--top-right {\n cursor: nesw-resize;\n border-left: none;\n border-bottom: none;\n}\n.editor__crop-corner--bottom-left {\n cursor: nesw-resize;\n border-right: none;\n border-top: none;\n}\n.editor__crop-corner--bottom-right {\n cursor: nwse-resize;\n border-left: none;\n border-top: none;\n}\n`;if(t){e.setAttribute("nonce",t)}return e}function xx({hooks:t}){return function e({onBeforeScreenshot:n,onScreenshot:r,onAfterScreenshot:i,onError:s}){t.useEffect((()=>{const t=async()=>{n();const t=await V_.mediaDevices.getDisplayMedia({video:{width:J_.innerWidth*J_.devicePixelRatio,height:J_.innerHeight*J_.devicePixelRatio},audio:false,monitorTypeSurfaces:"exclude",preferCurrentTab:true,selfBrowserSurface:"include",surfaceSwitching:"exclude"});const e=K_.createElement("video");await new Promise(((n,i)=>{e.srcObject=t;e.onloadedmetadata=()=>{r(e);t.getTracks().forEach((t=>t.stop()));n()};e.play().catch(i)}));i()};t().catch(s)}),[])}}const Cx="/home/runner/work/sentry-javascript/sentry-javascript/packages/feedback/src/screenshot/components/ScreenshotEditor.tsx";const Tx=30;const Ix=3;const Ex=Tx+Ix;const Ax=J_.devicePixelRatio;const $x=t=>({x:Math.min(t.startX,t.endX),y:Math.min(t.startY,t.endY),width:Math.abs(t.startX-t.endX),height:Math.abs(t.startY-t.endY)});const Mx=t=>{const e=t.clientHeight;const n=t.clientWidth;const r=t.width/t.height;let i=e*r;let s=e;if(i>n){i=n;s=n/r}const o=(n-i)/2;const c=(e-s)/2;return{startX:o,startY:c,endX:i+o,endY:s+c}};function Rx({h:t,hooks:e,imageBuffer:n,dialog:r,options:i}){const s=xx({hooks:e});return function o({onError:c}){const a=e.useMemo((()=>({__html:Sx(i.styleNonce).innerText})),[]);const u=kx({h:t});const f=e.useRef(null);const l=e.useRef(null);const d=e.useRef(null);const[h,p]=e.useState({startX:0,startY:0,endX:0,endY:0});const[m,g]=e.useState(false);const[y,b]=e.useState(false);e.useEffect((()=>{J_.addEventListener("resize",v,false)}),[]);function v(){const t=d.current;const e=$x(Mx(n));if(t){t.width=e.width*Ax;t.height=e.height*Ax;t.style.width=`${e.width}px`;t.style.height=`${e.height}px`;const n=t.getContext("2d");if(n){n.scale(Ax,Ax)}}const r=l.current;if(r){r.style.width=`${e.width}px`;r.style.height=`${e.height}px`}p({startX:0,startY:0,endX:e.width,endY:e.height})}e.useEffect((()=>{const t=d.current;if(!t){return}const e=t.getContext("2d");if(!e){return}const r=$x(Mx(n));const i=$x(h);e.clearRect(0,0,r.width,r.height);e.fillStyle="rgba(0, 0, 0, 0.5)";e.fillRect(0,0,r.width,r.height);e.clearRect(i.x,i.y,i.width,i.height);e.strokeStyle="#ffffff";e.lineWidth=3;e.strokeRect(i.x+1,i.y+1,i.width-2,i.height-2);e.strokeStyle="#000000";e.lineWidth=1;e.strokeRect(i.x+3,i.y+3,i.width-6,i.height-6)}),[h]);function w(t,e){g(false);b(true);const n=_(e);const r=()=>{K_.removeEventListener("mousemove",n);K_.removeEventListener("mouseup",r);g(true);b(false)};K_.addEventListener("mouseup",r);K_.addEventListener("mousemove",n)}const _=e.useCallback((t=>function(e){if(!d.current){return}const n=d.current;const r=n.getBoundingClientRect();const i=e.clientX-r.x;const s=e.clientY-r.y;switch(t){case"top-left":p((t=>({...t,startX:Math.min(Math.max(0,i),t.endX-Ex),startY:Math.min(Math.max(0,s),t.endY-Ex)})));break;case"top-right":p((t=>({...t,endX:Math.max(Math.min(i,n.width/Ax),t.startX+Ex),startY:Math.min(Math.max(0,s),t.endY-Ex)})));break;case"bottom-left":p((t=>({...t,startX:Math.min(Math.max(0,i),t.endX-Ex),endY:Math.max(Math.min(s,n.height/Ax),t.startY+Ex)})));break;case"bottom-right":p((t=>({...t,endX:Math.max(Math.min(i,n.width/Ax),t.startX+Ex),endY:Math.max(Math.min(s,n.height/Ax),t.startY+Ex)})));break}}),[]);const k=e.useRef({initialX:0,initialY:0});function S(t){if(y)return;k.current={initialX:t.clientX,initialY:t.clientY};const e=t=>{const e=d.current;if(!e)return;const n=t.clientX-k.current.initialX;const r=t.clientY-k.current.initialY;p((i=>{const s=Math.max(0,Math.min(i.startX+n,e.width/Ax-(i.endX-i.startX)));const o=Math.max(0,Math.min(i.startY+r,e.height/Ax-(i.endY-i.startY)));const c=s+(i.endX-i.startX);const a=o+(i.endY-i.startY);k.current.initialX=t.clientX;k.current.initialY=t.clientY;return{startX:s,startY:o,endX:c,endY:a}}))};const n=()=>{K_.removeEventListener("mousemove",e);K_.removeEventListener("mouseup",n)};K_.addEventListener("mousemove",e);K_.addEventListener("mouseup",n)}function x(){const t=K_.createElement("canvas");const e=$x(Mx(n));const r=$x(h);t.width=r.width*Ax;t.height=r.height*Ax;const i=t.getContext("2d");if(i&&n){i.drawImage(n,r.x/e.width*n.width,r.y/e.height*n.height,r.width/e.width*n.width,r.height/e.height*n.height,0,0,t.width,t.height)}const s=n.getContext("2d");if(s){s.clearRect(0,0,n.width,n.height);n.width=t.width;n.height=t.height;n.style.width=`${r.width}px`;n.style.height=`${r.height}px`;s.drawImage(t,0,0);v()}}s({onBeforeScreenshot:e.useCallback((()=>{r.el.style.display="none"}),[]),onScreenshot:e.useCallback((t=>{const e=n.getContext("2d");if(!e){throw new Error("Could not get canvas context")}n.width=t.videoWidth;n.height=t.videoHeight;n.style.width="100%";n.style.height="100%";e.drawImage(t,0,0)}),[n]),onAfterScreenshot:e.useCallback((()=>{r.el.style.display="block";const t=f.current;t&&t.appendChild(n);v()}),[]),onError:e.useCallback((t=>{r.el.style.display="block";c(t)}),[])});return t("div",{class:"editor",__self:this,__source:{fileName:Cx,lineNumber:315}},t("style",{nonce:i.styleNonce,dangerouslySetInnerHTML:a,__self:this,__source:{fileName:Cx,lineNumber:316}}),t("div",{class:"editor__canvas-container",ref:f,__self:this,__source:{fileName:Cx,lineNumber:317}},t("div",{class:"editor__crop-container",style:{position:"absolute",zIndex:1},ref:l,__self:this,__source:{fileName:Cx,lineNumber:318}},t("canvas",{onMouseDown:S,style:{position:"absolute",cursor:m?"move":"auto"},ref:d,__self:this,__source:{fileName:Cx,lineNumber:319}}),t(u,{left:h.startX-Ix,top:h.startY-Ix,onGrabButton:w,corner:"top-left",__self:this,__source:{fileName:Cx,lineNumber:324}}),t(u,{left:h.endX-Tx+Ix,top:h.startY-Ix,onGrabButton:w,corner:"top-right",__self:this,__source:{fileName:Cx,lineNumber:330}}),t(u,{left:h.startX-Ix,top:h.endY-Tx+Ix,onGrabButton:w,corner:"bottom-left",__self:this,__source:{fileName:Cx,lineNumber:336}}),t(u,{left:h.endX-Tx+Ix,top:h.endY-Tx+Ix,onGrabButton:w,corner:"bottom-right",__self:this,__source:{fileName:Cx,lineNumber:342}}),t("div",{style:{left:Math.max(0,h.endX-191),top:Math.max(0,h.endY+8),display:m?"flex":"none"},class:"editor__crop-btn-group",__self:this,__source:{fileName:Cx,lineNumber:348}},t("button",{onClick:t=>{t.preventDefault();if(d.current){p({startX:0,startY:0,endX:d.current.width/Ax,endY:d.current.height/Ax})}g(false)},class:"btn btn--default",__self:this,__source:{fileName:Cx,lineNumber:356}},i.cancelButtonLabel),t("button",{onClick:t=>{t.preventDefault();x();g(false)},class:"btn btn--primary",__self:this,__source:{fileName:Cx,lineNumber:373}},i.confirmButtonLabel)))))}}const Nx=()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:({h:t,hooks:e,dialog:n,options:r})=>{const i=K_.createElement("canvas");return{input:Rx({h:t,hooks:e,imageBuffer:i,dialog:n,options:r}),value:async()=>{const t=await new Promise((t=>{i.toBlob(t,"image/png")}));if(t){const e=new Uint8Array(await t.arrayBuffer());const n={data:e,filename:"screenshot.png",contentType:"application/png"};return n}return undefined}}}});const Ox=Mk({lazyLoadIntegration:cp});const Dx=Mk({lazyLoadIntegration:cp,getModalIntegration:()=>wx,getScreenshotIntegration:()=>Nx});function Lx(t,e=1,n){cu.increment(ju,t,e,n)}function Fx(t,e,n){cu.distribution(ju,t,e,n)}function Px(t,e,n){cu.set(ju,t,e,n)}function jx(t,e,n){cu.gauge(ju,t,e,n)}function Bx(t,e,n="second",r){return cu.timing(ju,t,e,n,r)}const zx={increment:Lx,distribution:Fx,set:Px,gauge:jx,timing:Bx};const Ux=new WeakMap;const qx=new Map;const Hx={traceFetch:true,traceXHR:true,enableHTTPTimings:true};function Wx(t,e){const{traceFetch:n,traceXHR:r,shouldCreateSpanForRequest:i,enableHTTPTimings:s,tracePropagationTargets:o}={traceFetch:Hx.traceFetch,traceXHR:Hx.traceXHR,...e};const c=typeof i==="function"?i:t=>true;const a=t=>Vx(t,o);const u={};if(n){t.addEventProcessor((t=>{if(t.type==="transaction"&&t.spans){t.spans.forEach((t=>{if(t.op==="http.client"){const e=qx.get(t.span_id);if(e){t.timestamp=e/1e3;qx.delete(t.span_id)}}}))}return t}));Jt((t=>{if(t.response){const e=Ux.get(t.response);if(e&&t.endTimestamp){qx.set(e,t.endTimestamp)}}}));Xt((t=>{const e=Bu(t,c,a,u);if(t.response&&t.fetchData.__span){Ux.set(t.response,t.fetchData.__span)}if(e){const n=eC(t.fetchData.url);const r=n?Ze(n).host:undefined;e.setAttributes({"http.url":n,"server.address":r})}if(s&&e){Yx(e)}}))}if(r){Rd((t=>{const e=Zx(t,c,a,u);if(s&&e){Yx(e)}}))}}function Gx(t){return t.entryType==="resource"&&"initiatorType"in t&&typeof t.nextHopProtocol==="string"&&(t.initiatorType==="fetch"||t.initiatorType==="xmlhttprequest")}function Yx(t){const{url:e}=Ei(t).data||{};if(!e||typeof e!=="string"){return}const n=xl("resource",(({entries:r})=>{r.forEach((r=>{if(Gx(r)&&r.name.endsWith(e)){const e=Kx(r);e.forEach((e=>t.setAttribute(...e)));setTimeout(n)}}))}))}function Xx(t){let e="unknown";let n="unknown";let r="";for(const i of t){if(i==="/"){[e,n]=t.split("/");break}if(!isNaN(Number(i))){e=r==="h"?"http":r;n=t.split(r)[1];break}r+=i}if(r===t){e=r}return{name:e,version:n}}function Jx(t=0){return((Yt||performance.timeOrigin)+t)/1e3}function Kx(t){const{name:e,version:n}=Xx(t.nextHopProtocol);const r=[];r.push(["network.protocol.version",n],["network.protocol.name",e]);if(!Yt){return r}return[...r,["http.request.redirect_start",Jx(t.redirectStart)],["http.request.fetch_start",Jx(t.fetchStart)],["http.request.domain_lookup_start",Jx(t.domainLookupStart)],["http.request.domain_lookup_end",Jx(t.domainLookupEnd)],["http.request.connect_start",Jx(t.connectStart)],["http.request.secure_connection_start",Jx(t.secureConnectionStart)],["http.request.connection_end",Jx(t.connectEnd)],["http.request.request_start",Jx(t.requestStart)],["http.request.response_start",Jx(t.responseStart)],["http.request.response_end",Jx(t.responseEnd)]]}function Vx(t,e){const n=Ku.location&&Ku.location.href;if(!n){const n=!!t.match(/^\/(?!\/)/);if(!e){return n}else{return S(t,e)}}else{let r;let i;try{r=new URL(t,n);i=new URL(n).origin}catch(t){return false}const s=r.origin===i;if(!e){return s}else{return S(r.toString(),e)||s&&S(r.pathname,e)}}}function Zx(t,e,n,r){const i=t.xhr;const s=i&&i[Md];if(!i||i.__sentry_own_request__||!s){return undefined}const o=Ji()&&e(s.url);if(t.endTimestamp&&o){const t=i.__sentry_xhr_span_id__;if(!t)return;const e=r[t];if(e&&s.status_code!==undefined){wi(e,s.status_code);e.end();delete r[t]}return undefined}const c=eC(s.url);const a=c?Ze(c).host:undefined;const u=!!ji();const f=o&&u?xs({name:`${s.method} ${s.url}`,attributes:{type:"xhr","http.method":s.method,"http.url":c,url:s.url,"server.address":a,[ci]:"auto.http.browser",[oi]:"http.client"}}):new Ki;i.__sentry_xhr_span_id__=f.spanContext().spanId;r[i.__sentry_xhr_span_id__]=f;const l=ti();if(i.setRequestHeader&&n(s.url)&&l){Qx(i,l,Ji()&&u?f:undefined)}return f}function Qx(t,e,n){const r=Jr();const i=Kr();const{traceId:s,spanId:o,sampled:c,dsc:a}={...i.getPropagationContext(),...r.getPropagationContext()};const u=n&&Ji()?Ci(n):Ln(s,o,c);const f=An(a||(n?rs(n):ns(s,e)));tC(t,u,f)}function tC(t,e,n){try{t.setRequestHeader("sentry-trace",e);if(n){t.setRequestHeader(xn,n)}}catch(t){}}function eC(t){try{const e=new URL(t,Ku.location.origin);return e.href}catch(t){return undefined}}function nC(){if(Ku&&Ku.document){Ku.document.addEventListener("visibilitychange",(()=>{const t=ji();if(!t){return}const e=Pi(t);if(Ku.document.hidden&&e){const t="cancelled";const{op:n,status:r}=Ei(e);if(ef){G.log(`[Tracing] Transaction: ${t} -> since tab moved to the background, op: ${n}`)}if(!r){e.setStatus({code:bi,message:t})}e.setAttribute("sentry.cancellation_reason","document.hidden");e.end()}}))}else{ef&&G.warn("[Tracing] Could not set up background tab detection due to lack of global document")}}const rC="BrowserTracing";const iC={...Ls,instrumentNavigation:true,instrumentPageLoad:true,markBackgroundSpan:true,enableLongTask:true,enableLongAnimationFrame:true,enableInp:true,_experiments:{},...Hx};const sC=(t={})=>{Ui();const{enableInp:e,enableLongTask:n,enableLongAnimationFrame:r,_experiments:{enableInteractions:i,enableStandaloneClsSpans:s},beforeStartSpan:o,idleTimeout:c,finalTimeout:a,childSpanTimeout:u,markBackgroundSpan:f,traceFetch:l,traceXHR:d,shouldCreateSpanForRequest:h,enableHTTPTimings:p,instrumentPageLoad:m,instrumentNavigation:g}={...iC,...t};const y=Jl({recordClsStandaloneSpans:s||false});if(e){Fd()}if(r&&M.PerformanceObserver&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")){Vl()}else if(n){Kl()}if(i){Zl()}const b={name:undefined,source:undefined};function v(t,e){const n=e.op==="pageload";const r=o?o(e):e;const i=r.attributes||{};if(e.name!==r.name){i[ii]="custom";r.attributes=i}b.name=r.name;b.source=i[ii];const f=zs(r,{idleTimeout:c,finalTimeout:a,childSpanTimeout:u,disableAutoFinish:n,beforeSpanEnd:t=>{y();rd(t,{recordClsOnPageloadSpan:!s})}});function l(){if(["interactive","complete"].includes(Ku.document.readyState)){t.emit("idleSpanEnableAutoFinish",f)}}if(n&&Ku.document){Ku.document.addEventListener("readystatechange",(()=>{l()}));l()}return f}return{name:rC,afterAllSetup(t){let n;let r=Ku.location&&Ku.location.href;t.on("startNavigationSpan",(e=>{if(ti()!==t){return}if(n&&!Ei(n).timestamp){ef&&G.log(`[Tracing] Finishing current root span with op: ${Ei(n).op}`);n.end()}n=v(t,{op:"navigation",...e})}));t.on("startPageLoadSpan",((e,r={})=>{if(ti()!==t){return}if(n&&!Ei(n).timestamp){ef&&G.log(`[Tracing] Finishing current root span with op: ${Ei(n).op}`);n.end()}const i=r.sentryTrace||aC("sentry-trace");const s=r.baggage||aC("baggage");const o=Dn(i,s);Jr().setPropagationContext(o);n=v(t,{op:"pageload",...e})}));t.on("spanEnd",(t=>{const e=Ei(t).op;if(t!==Pi(t)||e!=="navigation"&&e!=="pageload"){return}const n=Jr();const r=n.getPropagationContext();n.setPropagationContext({...r,sampled:r.sampled!==undefined?r.sampled:Mi(t),dsc:r.dsc||rs(t)})}));if(Ku.location){if(m){oC(t,{name:Ku.location.pathname,startTime:Yt?Yt/1e3:undefined,attributes:{[ii]:"url",[ci]:"auto.pageload.browser"}})}if(g){xd((({to:e,from:n})=>{if(n===undefined&&r&&r.indexOf(e)!==-1){r=undefined;return}if(n!==e){r=undefined;cC(t,{name:Ku.location.pathname,attributes:{[ii]:"url",[ci]:"auto.navigation.browser"}})}}))}}if(f){nC()}if(i){uC(c,a,u,b)}if(e){Bd()}Wx(t,{traceFetch:l,traceXHR:d,tracePropagationTargets:t.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:h,enableHTTPTimings:p})}}};function oC(t,e,n){t.emit("startPageLoadSpan",e,n);Jr().setTransactionName(e.name);const r=ji();const i=r&&Ei(r).op;return i==="pageload"?r:undefined}function cC(t,e){Kr().setPropagationContext(kr());Jr().setPropagationContext(kr());t.emit("startNavigationSpan",e);Jr().setTransactionName(e.name);const n=ji();const r=n&&Ei(n).op;return r==="navigation"?n:undefined}function aC(t){const e=P(`meta[name=${t}]`);return e?e.getAttribute("content"):undefined}function uC(t,e,n,r){let i;const s=()=>{const s="ui.action.click";const o=ji();const c=o&&Pi(o);if(c){const t=Ei(c).op;if(["navigation","pageload"].includes(t)){ef&&G.warn(`[Tracing] Did not create ${s} span because a pageload or navigation span is in progress.`);return undefined}}if(i){i.setAttribute(ai,"interactionInterrupted");i.end();i=undefined}if(!r.name){ef&&G.warn(`[Tracing] Did not create ${s} transaction because _latestRouteName is missing.`);return undefined}i=zs({name:r.name,op:s,attributes:{[ii]:r.source||"url"}},{idleTimeout:t,finalTimeout:e,childSpanTimeout:n})};if(Ku.document){addEventListener("click",s,{once:false,capture:true})}}function fC(t){return new Promise(((e,n)=>{t.oncomplete=t.onsuccess=()=>e(t.result);t.onabort=t.onerror=()=>n(t.error)}))}function lC(t,e){const n=indexedDB.open(t);n.onupgradeneeded=()=>n.result.createObjectStore(e);const r=fC(n);return t=>r.then((n=>t(n.transaction(e,"readwrite").objectStore(e))))}function dC(t){return fC(t.getAllKeys())}function hC(t,e,n){return t((t=>dC(t).then((r=>{if(r.length>=n){return}t.put(e,Math.max(...r,0)+1);return fC(t.transaction)}))))}function pC(t,e,n){return t((t=>dC(t).then((r=>{if(r.length>=n){return}t.put(e,Math.min(...r,0)-1);return fC(t.transaction)}))))}function mC(t){return t((t=>dC(t).then((e=>{const n=e[0];if(n==null){return undefined}return fC(t.get(n)).then((e=>{t.delete(n);return fC(t.transaction).then((()=>e))}))}))))}function gC(t){let e;function n(){if(e==undefined){e=lC(t.dbName||"sentry-offline",t.storeName||"queue")}return e}return{push:async e=>{try{const r=await qn(e);await hC(n(),r,t.maxQueueSize||30)}catch(t){}},unshift:async e=>{try{const r=await qn(e);await pC(n(),r,t.maxQueueSize||30)}catch(t){}},shift:async()=>{try{const t=await mC(n());if(t){return Wn(t)}}catch(t){}return undefined}}}function yC(t){return e=>t({...e,createStore:gC})}function bC(t=zd){return yC(fc(t))}const vC=1e6;const wC=String(0);const _C="main";let kC="";let SC="";let xC="";let CC=Ku.navigator&&Ku.navigator.userAgent||"";let TC="";const IC=Ku.navigator&&Ku.navigator.language||Ku.navigator&&Ku.navigator.languages&&Ku.navigator.languages[0]||"";function EC(t){return typeof t==="object"&&t!==null&&"getHighEntropyValues"in t}const AC=Ku.navigator&&Ku.navigator.userAgentData;if(EC(AC)){AC.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then((t=>{kC=t.platform||"";xC=t.architecture||"";TC=t.model||"";SC=t.platformVersion||"";if(t.fullVersionList&&t.fullVersionList.length>0){const e=t.fullVersionList[t.fullVersionList.length-1];CC=`${e.brand} ${e.version}`}})).catch((t=>void t))}function $C(t){return!("thread_metadata"in t)}function MC(t){if(!$C(t)){return t}return DC(t)}function RC(t){const e=t&&t.contexts&&t.contexts["trace"]&&t.contexts["trace"]["trace_id"];if(typeof e==="string"&&e.length!==32){if(ef){G.log(`[Profiling] Invalid traceId: ${e} on profiled event`)}}if(typeof e!=="string"){return""}return e}function NC(t,e,n,r){if(r.type!=="transaction"){throw new TypeError("Profiling events may only be attached to transactions, this should never occur.")}if(n===undefined||n===null){throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`)}const i=RC(r);const s=MC(n);const o=e?e:typeof r.start_timestamp==="number"?r.start_timestamp*1e3:Wt()*1e3;const c=typeof r.timestamp==="number"?r.timestamp*1e3:Wt()*1e3;const a={event_id:t,timestamp:new Date(o).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||Qi,runtime:{name:"javascript",version:Ku.navigator.userAgent},os:{name:kC,version:SC,build_number:CC},device:{locale:IC,model:TC,manufacturer:CC,architecture:xC,is_emulator:false},debug_meta:{images:jC(n.resources)},profile:s,transactions:[{name:r.transaction||"",id:r.event_id||ge(),trace_id:i,active_thread_id:wC,relative_start_ns:"0",relative_end_ns:((c-o)*1e6).toFixed(0)}]};return a}function OC(t){return Ei(t).op==="pageload"}function DC(t){let e=undefined;let n=0;const r={samples:[],stacks:[],frames:[],thread_metadata:{[wC]:{name:_C}}};const i=t.samples[0];if(!i){return r}const s=i.timestamp;const o=typeof performance.timeOrigin==="number"?performance.timeOrigin:Yt||0;const c=o-(Yt||o);t.samples.forEach(((i,o)=>{if(i.stackId===undefined){if(e===undefined){e=n;r.stacks[e]=[];n++}r["samples"][o]={elapsed_since_start_ns:((i.timestamp+c-s)*vC).toFixed(0),stack_id:e,thread_id:wC};return}let a=t.stacks[i.stackId];const u=[];while(a){u.push(a.frameId);const e=t.frames[a.frameId];if(e&&r.frames[a.frameId]===undefined){r.frames[a.frameId]={function:e.name,abs_path:typeof e.resourceId==="number"?t.resources[e.resourceId]:undefined,lineno:e.line,colno:e.column}}a=a.parentId===undefined?undefined:t.stacks[a.parentId]}const f={elapsed_since_start_ns:((i.timestamp+c-s)*vC).toFixed(0),stack_id:n,thread_id:wC};r["stacks"][n]=u;r["samples"][o]=f;n++}));return r}function LC(t,e){if(!e.length){return t}for(const n of e){t[1].push([{type:"profile"},n])}return t}function FC(t){const e=[];jn(t,((t,n)=>{if(n!=="transaction"){return}for(let n=1;n<t.length;n++){const r=t[n];if(r&&r.contexts&&r.contexts["profile"]&&r.contexts["profile"]["profile_id"]){e.push(t[n])}}}));return e}const PC=new WeakMap;function jC(t){const e=M._sentryDebugIds;if(!e){return[]}const n=ti();const r=n&&n.getOptions();const i=r&&r.stackParser;if(!i){return[]}let s;const o=PC.get(i);if(o){s=o}else{s=new Map;PC.set(i,s)}const c=Object.keys(e).reduce(((t,n)=>{let r;const o=s.get(n);if(o){r=o}else{r=i(n);s.set(n,r)}for(let i=r.length-1;i>=0;i--){const s=r[i];const o=s&&s.filename;if(s&&o){t[o]=e[n];break}}return t}),{});const a=[];for(const e of t){if(e&&c[e]){a.push({type:"sourcemap",code_file:e,debug_id:c[e]})}}return a}function BC(t){if(typeof t!=="number"&&typeof t!=="boolean"||typeof t==="number"&&isNaN(t)){ef&&G.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(t)} of type ${JSON.stringify(typeof t)}.`);return false}if(t===true||t===false){return true}if(t<0||t>1){ef&&G.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${t}.`);return false}return true}function zC(t){if(t.samples.length<2){if(ef){G.log("[Profiling] Discarding profile because it contains less than 2 samples")}return false}if(!t.frames.length){if(ef){G.log("[Profiling] Discarding profile because it contains no frames")}return false}return true}let UC=false;const qC=3e4;function HC(t){return typeof t==="function"}function WC(){const t=Ku.Profiler;if(!HC(t)){if(ef){G.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.")}return}const e=10;const n=Math.floor(qC/e);try{return new t({sampleInterval:e,maxBufferSize:n})}catch(t){if(ef){G.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header.");G.log("[Profiling] Disabling profiling for current user session.")}UC=true}return}function GC(t){if(UC){if(ef){G.log("[Profiling] Profiling has been disabled for the duration of the current user session.")}return false}if(!t.isRecording()){if(ef){G.log("[Profiling] Discarding profile because transaction was not sampled.")}return false}const e=ti();const n=e&&e.getOptions();if(!n){ef&&G.log("[Profiling] Profiling disabled, no options found.");return false}const r=n.profilesSampleRate;if(!BC(r)){ef&&G.warn("[Profiling] Discarding profile because of invalid sample rate.");return false}if(!r){ef&&G.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0");return false}const i=r===true?true:Math.random()<r;if(!i){ef&&G.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(r)})`);return false}return true}function YC(t,e,n,r){if(!zC(n)){return null}return NC(t,e,n,r)}const XC=new Map;function JC(){return XC.size}function KC(t){const e=XC.get(t);if(e){XC.delete(t)}return e}function VC(t,e){XC.set(t,e);if(XC.size>30){const t=XC.keys().next().value;XC.delete(t)}}function ZC(t){let e;if(OC(t)){e=Wt()*1e3}const n=WC();if(!n){return}if(ef){G.log(`[Profiling] started profiling span: ${Ei(t).description}`)}const r=ge();Jr().setContext("profile",{profile_id:r,start_timestamp:e});async function i(){if(!t){return}if(!n){return}return n.stop().then((e=>{if(s){Ku.clearTimeout(s);s=undefined}if(ef){G.log(`[Profiling] stopped profiling of span: ${Ei(t).description}`)}if(!e){if(ef){G.log(`[Profiling] profiler returned null profile for: ${Ei(t).description}`,"this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started")}return}VC(r,e)})).catch((t=>{if(ef){G.log("[Profiling] error while stopping profiler:",t)}}))}let s=Ku.setTimeout((()=>{if(ef){G.log("[Profiling] max profile duration elapsed, stopping profiling for:",Ei(t).description)}i()}),qC);const o=t.end.bind(t);function c(){if(!t){return o()}void i().then((()=>{o()}),(()=>{o()}));return t}t.end=c}const QC="BrowserProfiling";const tT=()=>({name:QC,setup(t){const e=ji();const n=e&&Pi(e);if(n&&OC(n)){if(GC(n)){ZC(n)}}t.on("spanStart",(t=>{if(t===Pi(t)&&GC(t)){ZC(t)}}));t.on("beforeEnvelope",(t=>{if(!JC()){return}const e=FC(t);if(!e.length){return}const n=[];for(const t of e){const e=t&&t.contexts;const r=e&&e["profile"]&&e["profile"]["profile_id"];const i=e&&e["profile"]&&e["profile"]["start_timestamp"];if(typeof r!=="string"){ef&&G.log("[Profiling] cannot find profile for a span without a profile context");continue}if(!r){ef&&G.log("[Profiling] cannot find profile for a span without a profile context");continue}if(e&&e["profile"]){delete e.profile}const s=KC(r);if(!s){ef&&G.log(`[Profiling] Could not retrieve profile for span: ${r}`);continue}const o=YC(r,i,s,t);if(o){n.push(o)}}LC(t,n)}))}});const eT=Go(tT);export{Qh as a,Gu as b,lo as c,Dx as f,Co as i};
2
- //# sourceMappingURL=index-95193d9b.js.map
1
+ import{p as t,g as e}from"./utils-ac8fef1e.js";const n=Object.prototype.toString;function r(t){switch(n.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return true;default:return y(t,Error)}}function i(t,e){return n.call(t)===`[object ${e}]`}function s(t){return i(t,"ErrorEvent")}function o(t){return i(t,"DOMError")}function c(t){return i(t,"DOMException")}function a(t){return i(t,"String")}function u(t){return typeof t==="object"&&t!==null&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function f(t){return t===null||u(t)||typeof t!=="object"&&typeof t!=="function"}function l(t){return i(t,"Object")}function d(t){return typeof Event!=="undefined"&&y(t,Event)}function h(t){return typeof Element!=="undefined"&&y(t,Element)}function p(t){return i(t,"RegExp")}function m(t){return Boolean(t&&t.then&&typeof t.then==="function")}function g(t){return l(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function y(t,e){try{return t instanceof e}catch(t){return false}}function b(t){return!!(typeof t==="object"&&t!==null&&(t.__isVue||t._isVue))}function v(t,e=0){if(typeof t!=="string"||e===0){return t}return t.length<=e?t:`${t.slice(0,e)}...`}function w(t,e){let n=t;const r=n.length;if(r<=150){return n}if(e>r){e=r}let i=Math.max(e-60,0);if(i<5){i=0}let s=Math.min(i+140,r);if(s>r-5){s=r}if(s===r){i=Math.max(s-140,0)}n=n.slice(i,s);if(i>0){n=`'{snip} ${n}`}if(s<r){n+=" {snip}"}return n}function _(t,e){if(!Array.isArray(t)){return""}const n=[];for(let e=0;e<t.length;e++){const r=t[e];try{if(b(r)){n.push("[VueViewModel]")}else{n.push(String(r))}}catch(t){n.push("[value cannot be serialized]")}}return n.join(e)}function k(t,e,n=false){if(!a(t)){return false}if(p(e)){return e.test(t)}if(a(e)){return n?t===e:t.includes(e)}return false}function S(t,e=[],n=false){return e.some((e=>k(t,e,n)))}function x(t,e,n=250,r,i,s,o){if(!s.exception||!s.exception.values||!o||!y(o.originalException,Error)){return}const c=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:undefined;if(c){s.exception.values=E(C(t,e,i,o.originalException,r,s.exception.values,c,0),n)}}function C(t,e,n,r,i,s,o,c){if(s.length>=n+1){return s}let a=[...s];if(y(r[i],Error)){T(o,c);const s=t(e,r[i]);const u=a.length;I(s,i,u,c);a=C(t,e,n,r[i],i,[s,...a],s,u)}if(Array.isArray(r.errors)){r.errors.forEach(((r,s)=>{if(y(r,Error)){T(o,c);const u=t(e,r);const f=a.length;I(u,`errors[${s}]`,f,c);a=C(t,e,n,r,i,[u,...a],u,f)}}))}return a}function T(t,e){t.mechanism=t.mechanism||{type:"generic",handled:true};t.mechanism={...t.mechanism,...t.type==="AggregateError"&&{is_exception_group:true},exception_id:e}}function I(t,e,n,r){t.mechanism=t.mechanism||{type:"generic",handled:true};t.mechanism={...t.mechanism,type:"chained",source:e,exception_id:n,parent_id:r}}function E(t,e){return t.map((t=>{if(t.value){t.value=v(t.value,e)}return t}))}function A(t){const e=[];const n=t=>{t.forEach((t=>{if(Array.isArray(t)){n(t)}else{e.push(t)}}))};n(t);return e}const $="8.28.0";const M=globalThis;function R(t,e,n){const r=n||M;const i=r.__SENTRY__=r.__SENTRY__||{};const s=i[$]=i[$]||{};return s[t]||(s[t]=e())}const N=M;const O=80;function D(t,e={}){if(!t){return"<unknown>"}try{let n=t;const r=5;const i=[];let s=0;let o=0;const c=" > ";const a=c.length;let u;const f=Array.isArray(e)?e:e.keyAttrs;const l=!Array.isArray(e)&&e.maxStringLength||O;while(n&&s++<r){u=L(n,f);if(u==="html"||s>1&&o+i.length*a+u.length>=l){break}i.push(u);o+=u.length;n=n.parentNode}return i.reverse().join(c)}catch(t){return"<unknown>"}}function L(t,e){const n=t;const r=[];if(!n||!n.tagName){return""}if(N.HTMLElement){if(n instanceof HTMLElement&&n.dataset){if(n.dataset["sentryComponent"]){return n.dataset["sentryComponent"]}if(n.dataset["sentryElement"]){return n.dataset["sentryElement"]}}}r.push(n.tagName.toLowerCase());const i=e&&e.length?e.filter((t=>n.getAttribute(t))).map((t=>[t,n.getAttribute(t)])):null;if(i&&i.length){i.forEach((t=>{r.push(`[${t[0]}="${t[1]}"]`)}))}else{if(n.id){r.push(`#${n.id}`)}const t=n.className;if(t&&a(t)){const e=t.split(/\s+/);for(const t of e){r.push(`.${t}`)}}}const s=["aria-label","type","name","title","alt"];for(const t of s){const e=n.getAttribute(t);if(e){r.push(`[${t}="${e}"]`)}}return r.join("")}function F(){try{return N.document.location.href}catch(t){return""}}function P(t){if(N.document&&N.document.querySelector){return N.document.querySelector(t)}return null}function j(t){if(!N.HTMLElement){return null}let e=t;const n=5;for(let t=0;t<n;t++){if(!e){return null}if(e instanceof HTMLElement){if(e.dataset["sentryComponent"]){return e.dataset["sentryComponent"]}if(e.dataset["sentryElement"]){return e.dataset["sentryElement"]}}e=e.parentNode}return null}const B=typeof __SENTRY_DEBUG__==="undefined"||__SENTRY_DEBUG__;const z="Sentry Logger ";const U=["debug","info","warn","error","log","assert","trace"];const q={};function H(t){if(!("console"in M)){return t()}const e=M.console;const n={};const r=Object.keys(q);r.forEach((t=>{const r=q[t];n[t]=e[t];e[t]=r}));try{return t()}finally{r.forEach((t=>{e[t]=n[t]}))}}function W(){let t=false;const e={enable:()=>{t=true},disable:()=>{t=false},isEnabled:()=>t};if(B){U.forEach((n=>{e[n]=(...e)=>{if(t){H((()=>{M.console[n](`${z}[${n}]:`,...e)}))}}}))}else{U.forEach((t=>{e[t]=()=>undefined}))}return e}const G=W();const Y=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function X(t){return t==="http"||t==="https"}function J(t,e=false){const{host:n,path:r,pass:i,port:s,projectId:o,protocol:c,publicKey:a}=t;return`${c}://${a}${e&&i?`:${i}`:""}`+`@${n}${s?`:${s}`:""}/${r?`${r}/`:r}${o}`}function K(t){const e=Y.exec(t);if(!e){H((()=>{console.error(`Invalid Sentry Dsn: ${t}`)}));return undefined}const[n,r,i="",s="",o="",c=""]=e.slice(1);let a="";let u=c;const f=u.split("/");if(f.length>1){a=f.slice(0,-1).join("/");u=f.pop()}if(u){const t=u.match(/^\d+/);if(t){u=t[0]}}return V({host:s,pass:i,path:a,projectId:u,port:o,protocol:n,publicKey:r})}function V(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function Z(t){if(!B){return true}const{port:e,projectId:n,protocol:r}=t;const i=["protocol","publicKey","host","projectId"];const s=i.find((e=>{if(!t[e]){G.error(`Invalid Sentry Dsn: ${e} missing`);return true}return false}));if(s){return false}if(!n.match(/^\d+$/)){G.error(`Invalid Sentry Dsn: Invalid projectId ${n}`);return false}if(!X(r)){G.error(`Invalid Sentry Dsn: Invalid protocol ${r}`);return false}if(e&&isNaN(parseInt(e,10))){G.error(`Invalid Sentry Dsn: Invalid port ${e}`);return false}return true}function Q(t){const e=typeof t==="string"?K(t):V(t);if(!e||!Z(e)){return undefined}return e}class tt extends Error{constructor(t,e="warn"){super(t);this.message=t;this.name=new.target.prototype.constructor.name;Object.setPrototypeOf(this,new.target.prototype);this.logLevel=e}}function et(t,e,n){if(!(e in t)){return}const r=t[e];const i=n(r);if(typeof i==="function"){rt(i,r)}t[e]=i}function nt(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:true,configurable:true})}catch(n){B&&G.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function rt(t,e){try{const n=e.prototype||{};t.prototype=e.prototype=n;nt(t,"__sentry_original__",e)}catch(t){}}function it(t){return t.__sentry_original__}function st(t){return Object.keys(t).map((e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`)).join("&")}function ot(t){if(r(t)){return{message:t.message,name:t.name,stack:t.stack,...at(t)}}else if(d(t)){const e={type:t.type,target:ct(t.target),currentTarget:ct(t.currentTarget),...at(t)};if(typeof CustomEvent!=="undefined"&&y(t,CustomEvent)){e.detail=t.detail}return e}else{return t}}function ct(t){try{return h(t)?D(t):Object.prototype.toString.call(t)}catch(t){return"<unknown>"}}function at(t){if(typeof t==="object"&&t!==null){const e={};for(const n in t){if(Object.prototype.hasOwnProperty.call(t,n)){e[n]=t[n]}}return e}else{return{}}}function ut(t,e=40){const n=Object.keys(ot(t));n.sort();const r=n[0];if(!r){return"[object has no keys]"}if(r.length>=e){return v(r,e)}for(let t=n.length;t>0;t--){const r=n.slice(0,t).join(", ");if(r.length>e){continue}if(t===n.length){return r}return v(r,e)}return""}function ft(t){const e=new Map;return lt(t,e)}function lt(t,e){if(dt(t)){const n=e.get(t);if(n!==undefined){return n}const r={};e.set(t,r);for(const n of Object.keys(t)){if(typeof t[n]!=="undefined"){r[n]=lt(t[n],e)}}return r}if(Array.isArray(t)){const n=e.get(t);if(n!==undefined){return n}const r=[];e.set(t,r);t.forEach((t=>{r.push(lt(t,e))}));return r}return t}function dt(t){if(!l(t)){return false}try{const e=Object.getPrototypeOf(t).constructor.name;return!e||e==="Object"}catch(t){return true}}function ht(t){let e;switch(true){case t===undefined||t===null:e=new String(t);break;case typeof t==="symbol"||typeof t==="bigint":e=Object(t);break;case f(t):e=new t.constructor(t);break;default:e=t;break}return e}const pt=50;const mt="?";const gt=/\(error: (.*)\)/;const yt=/captureMessage|captureException/;function bt(...t){const e=t.sort(((t,e)=>t[0]-e[0])).map((t=>t[1]));return(t,n=0,r=0)=>{const i=[];const s=t.split("\n");for(let t=n;t<s.length;t++){const n=s[t];if(n.length>1024){continue}const o=gt.test(n)?n.replace(gt,"$1"):n;if(o.match(/\S*Error: /)){continue}for(const t of e){const e=t(o);if(e){i.push(e);break}}if(i.length>=pt+r){break}}return wt(i.slice(r))}}function vt(t){if(Array.isArray(t)){return bt(...t)}return t}function wt(t){if(!t.length){return[]}const e=Array.from(t);if(/sentryWrapped/.test(_t(e).function||"")){e.pop()}e.reverse();if(yt.test(_t(e).function||"")){e.pop();if(yt.test(_t(e).function||"")){e.pop()}}return e.slice(0,pt).map((t=>({...t,filename:t.filename||_t(e).filename,function:t.function||mt})))}function _t(t){return t[t.length-1]||{}}const kt="<anonymous>";function St(t){try{if(!t||typeof t!=="function"){return kt}return t.name||kt}catch(t){return kt}}function xt(t){const e=t.exception;if(e){const t=[];try{e.values.forEach((e=>{if(e.stacktrace.frames){t.push(...e.stacktrace.frames)}}));return t}catch(t){return undefined}}return undefined}const Ct={};const Tt={};function It(t,e){Ct[t]=Ct[t]||[];Ct[t].push(e)}function Et(){Object.keys(Ct).forEach((t=>{Ct[t]=undefined}))}function At(t,e){if(!Tt[t]){e();Tt[t]=true}}function $t(t,e){const n=t&&Ct[t];if(!n){return}for(const r of n){try{r(e)}catch(e){B&&G.error(`Error while triggering instrumentation handler.\nType: ${t}\nName: ${St(r)}\nError:`,e)}}}function Mt(t){const e="console";It(e,t);At(e,Rt)}function Rt(){if(!("console"in M)){return}U.forEach((function(t){if(!(t in M.console)){return}et(M.console,t,(function(e){q[t]=e;return function(...e){const n={args:e,level:t};$t("console",n);const r=q[t];r&&r.apply(M.console,e)}}))}))}const Nt=M;function Ot(){try{new ErrorEvent("");return true}catch(t){return false}}function Dt(){try{new DOMError("");return true}catch(t){return false}}function Lt(){try{new DOMException("");return true}catch(t){return false}}function Ft(){if(!("fetch"in Nt)){return false}try{new Headers;new Request("http://www.example.com");new Response;return true}catch(t){return false}}function Pt(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function jt(){if(typeof EdgeRuntime==="string"){return true}if(!Ft()){return false}if(Pt(Nt.fetch)){return true}let t=false;const e=Nt.document;if(e&&typeof e.createElement==="function"){try{const n=e.createElement("iframe");n.hidden=true;e.head.appendChild(n);if(n.contentWindow&&n.contentWindow.fetch){t=Pt(n.contentWindow.fetch)}e.head.removeChild(n)}catch(t){B&&G.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}}return t}function Bt(){return"ReportingObserver"in Nt}function zt(){if(!Ft()){return false}try{new Request("_",{referrerPolicy:"origin"});return true}catch(t){return false}}const Ut=1e3;function qt(){return Date.now()/Ut}function Ht(){const{performance:t}=M;if(!t||!t.now){return qt}const e=Date.now()-t.now();const n=t.timeOrigin==undefined?e:t.timeOrigin;return()=>(n+t.now())/Ut}const Wt=Ht();let Gt;const Yt=(()=>{const{performance:t}=M;if(!t||!t.now){Gt="none";return undefined}const e=3600*1e3;const n=t.now();const r=Date.now();const i=t.timeOrigin?Math.abs(t.timeOrigin+n-r):e;const s=i<e;const o=t.timing&&t.timing.navigationStart;const c=typeof o==="number";const a=c?Math.abs(o+n-r):e;const u=a<e;if(s||u){if(i<=a){Gt="timeOrigin";return t.timeOrigin}else{Gt="navigationStart";return o}}Gt="dateNow";return r})();function Xt(t,e){const n="fetch";It(n,t);At(n,(()=>Kt(undefined,e)))}function Jt(t){const e="fetch-body-resolved";It(e,t);At(e,(()=>Kt(Zt)))}function Kt(t,e=false){if(e&&!jt()){return}et(M,"fetch",(function(e){return function(...n){const{method:i,url:s}=ee(n);const o={args:n,fetchData:{method:i,url:s},startTimestamp:Wt()*1e3};if(!t){$t("fetch",{...o})}const c=(new Error).stack;return e.apply(M,n).then((async e=>{if(t){t(e)}else{$t("fetch",{...o,endTimestamp:Wt()*1e3,response:e})}return e}),(t=>{$t("fetch",{...o,endTimestamp:Wt()*1e3,error:t});if(r(t)&&t.stack===undefined){t.stack=c;nt(t,"framesToPop",1)}throw t}))}}))}async function Vt(t,e){if(t&&t.body&&t.body.getReader){const n=t.body.getReader();async function r({done:t}){if(!t){try{const t=await Promise.race([n.read(),new Promise((t=>{setTimeout((()=>{t({done:true})}),5e3)}))]);await r(t)}catch(t){}}else{return Promise.resolve()}}return n.read().then(r).then(e).catch((()=>undefined))}}async function Zt(t){let e;try{e=t.clone()}catch(t){return}await Vt(e,(()=>{$t("fetch-body-resolved",{endTimestamp:Wt()*1e3,response:t})}))}function Qt(t,e){return!!t&&typeof t==="object"&&!!t[e]}function te(t){if(typeof t==="string"){return t}if(!t){return""}if(Qt(t,"url")){return t.url}if(t.toString){return t.toString()}return""}function ee(t){if(t.length===0){return{method:"GET",url:""}}if(t.length===2){const[e,n]=t;return{url:te(e),method:Qt(n,"method")?String(n.method).toUpperCase():"GET"}}const e=t[0];return{url:te(e),method:Qt(e,"method")?String(e.method).toUpperCase():"GET"}}let ne=null;function re(t){const e="error";It(e,t);At(e,ie)}function ie(){ne=M.onerror;M.onerror=function(t,e,n,r,i){const s={column:r,error:i,line:n,msg:t,url:e};$t("error",s);if(ne&&!ne.__SENTRY_LOADER__){return ne.apply(this,arguments)}return false};M.onerror.__SENTRY_INSTRUMENTED__=true}let se=null;function oe(t){const e="unhandledrejection";It(e,t);At(e,ce)}function ce(){se=M.onunhandledrejection;M.onunhandledrejection=function(t){const e=t;$t("unhandledrejection",e);if(se&&!se.__SENTRY_LOADER__){return se.apply(this,arguments)}return true};M.onunhandledrejection.__SENTRY_INSTRUMENTED__=true}function ae(){return typeof __SENTRY_BROWSER_BUNDLE__!=="undefined"&&!!__SENTRY_BROWSER_BUNDLE__}function ue(){return"npm"}function fe(){return!ae()&&Object.prototype.toString.call(typeof t!=="undefined"?t:0)==="[object process]"}function le(t,e){return t.require(e)}function de(t){let e;try{e=le(module,t)}catch(t){}try{const{cwd:n}=le(module,"process");e=le(module,`${n()}/node_modules/${t}`)}catch(t){}return e}function he(){return typeof window!=="undefined"&&(!fe()||pe())}function pe(){return M.process!==undefined&&M.process.type==="renderer"}function me(){const t=typeof WeakSet==="function";const e=t?new WeakSet:[];function n(n){if(t){if(e.has(n)){return true}e.add(n);return false}for(let t=0;t<e.length;t++){const r=e[t];if(r===n){return true}}e.push(n);return false}function r(n){if(t){e.delete(n)}else{for(let t=0;t<e.length;t++){if(e[t]===n){e.splice(t,1);break}}}}return[n,r]}function ge(){const t=M;const e=t.crypto||t.msCrypto;let n=()=>Math.random()*16;try{if(e&&e.randomUUID){return e.randomUUID().replace(/-/g,"")}if(e&&e.getRandomValues){n=()=>{const t=new Uint8Array(1);e.getRandomValues(t);return t[0]}}}catch(t){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(t=>(t^(n()&15)>>t/4).toString(16)))}function ye(t){return t.exception&&t.exception.values?t.exception.values[0]:undefined}function be(t){const{message:e,event_id:n}=t;if(e){return e}const r=ye(t);if(r){if(r.type&&r.value){return`${r.type}: ${r.value}`}return r.type||r.value||n||"<unknown>"}return n||"<unknown>"}function ve(t,e,n){const r=t.exception=t.exception||{};const i=r.values=r.values||[];const s=i[0]=i[0]||{};if(!s.value){s.value=e||""}if(!s.type){s.type=n||"Error"}}function we(t,e){const n=ye(t);if(!n){return}const r={type:"generic",handled:true};const i=n.mechanism;n.mechanism={...r,...i,...e};if(e&&"data"in e){const t={...i&&i.data,...e.data};n.mechanism.data=t}}const _e=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;function ke(t){return parseInt(t||"",10)}function Se(t){const e=t.match(_e)||[];const n=ke(e[1]);const r=ke(e[2]);const i=ke(e[3]);return{buildmetadata:e[5],major:isNaN(n)?undefined:n,minor:isNaN(r)?undefined:r,patch:isNaN(i)?undefined:i,prerelease:e[4]}}function xe(t,e,n=5){if(e.lineno===undefined){return}const r=t.length;const i=Math.max(Math.min(r-1,e.lineno-1),0);e.pre_context=t.slice(Math.max(0,i-n),i).map((t=>w(t,0)));const s=Math.min(r-1,i);e.context_line=w(t[s],e.colno||0);e.post_context=t.slice(Math.min(i+1,r),i+1+n).map((t=>w(t,0)))}function Ce(t){if(t&&t.__sentry_captured__){return true}try{nt(t,"__sentry_captured__",true)}catch(t){}return false}function Te(t){return Array.isArray(t)?t:[t]}function Ie(t,e=100,n=+Infinity){try{return Ae("",t,e,n)}catch(t){return{ERROR:`**non-serializable** (${t})`}}}function Ee(t,e=3,n=100*1024){const r=Ie(t,e);if(Ne(r)>n){return Ee(t,e-1,n)}return r}function Ae(t,e,n=+Infinity,r=+Infinity,i=me()){const[s,o]=i;if(e==null||["number","boolean","string"].includes(typeof e)&&!Number.isNaN(e)){return e}const c=$e(t,e);if(!c.startsWith("[object ")){return c}if(e["__sentry_skip_normalization__"]){return e}const a=typeof e["__sentry_override_normalization_depth__"]==="number"?e["__sentry_override_normalization_depth__"]:n;if(a===0){return c.replace("object ","")}if(s(e)){return"[Circular ~]"}const u=e;if(u&&typeof u.toJSON==="function"){try{const t=u.toJSON();return Ae("",t,a-1,r,i)}catch(t){}}const f=Array.isArray(e)?[]:{};let l=0;const d=ot(e);for(const t in d){if(!Object.prototype.hasOwnProperty.call(d,t)){continue}if(l>=r){f[t]="[MaxProperties ~]";break}const e=d[t];f[t]=Ae(t,e,a-1,r,i);l++}o(e);return f}function $e(t,n){try{if(t==="domain"&&n&&typeof n==="object"&&n._events){return"[Domain]"}if(t==="domainEmitter"){return"[DomainEmitter]"}if(typeof e!=="undefined"&&n===e){return"[Global]"}if(typeof window!=="undefined"&&n===window){return"[Window]"}if(typeof document!=="undefined"&&n===document){return"[Document]"}if(b(n)){return"[VueViewModel]"}if(g(n)){return"[SyntheticEvent]"}if(typeof n==="number"&&n!==n){return"[NaN]"}if(typeof n==="function"){return`[Function: ${St(n)}]`}if(typeof n==="symbol"){return`[${String(n)}]`}if(typeof n==="bigint"){return`[BigInt: ${String(n)}]`}const r=Me(n);if(/^HTML(\w*)Element$/.test(r)){return`[HTMLElement: ${r}]`}return`[object ${r}]`}catch(t){return`**non-serializable** (${t})`}}function Me(t){const e=Object.getPrototypeOf(t);return e?e.constructor.name:"null prototype"}function Re(t){return~-encodeURI(t).split(/%..|./).length}function Ne(t){return Re(JSON.stringify(t))}function Oe(t,e){const n=e.replace(/\\/g,"/").replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");let r=t;try{r=decodeURI(t)}catch(t){}return r.replace(/\\/g,"/").replace(/webpack:\/?/g,"").replace(new RegExp(`(file://)?/*${n}/*`,"ig"),"app:///")}function De(t,e){let n=0;for(let e=t.length-1;e>=0;e--){const r=t[e];if(r==="."){t.splice(e,1)}else if(r===".."){t.splice(e,1);n++}else if(n){t.splice(e,1);n--}}if(e){for(;n--;n){t.unshift("..")}}return t}const Le=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function Fe(t){const e=t.length>1024?`<truncated>${t.slice(-1024)}`:t;const n=Le.exec(e);return n?n.slice(1):[]}function Pe(...t){let e="";let n=false;for(let r=t.length-1;r>=-1&&!n;r--){const i=r>=0?t[r]:"/";if(!i){continue}e=`${i}/${e}`;n=i.charAt(0)==="/"}e=De(e.split("/").filter((t=>!!t)),!n).join("/");return(n?"/":"")+e||"."}function je(t){let e=0;for(;e<t.length;e++){if(t[e]!==""){break}}let n=t.length-1;for(;n>=0;n--){if(t[n]!==""){break}}if(e>n){return[]}return t.slice(e,n-e+1)}function Be(t,e){t=Pe(t).slice(1);e=Pe(e).slice(1);const n=je(t.split("/"));const r=je(e.split("/"));const i=Math.min(n.length,r.length);let s=i;for(let t=0;t<i;t++){if(n[t]!==r[t]){s=t;break}}let o=[];for(let t=s;t<n.length;t++){o.push("..")}o=o.concat(r.slice(s));return o.join("/")}function ze(t){const e=Ue(t);const n=t.slice(-1)==="/";let r=De(t.split("/").filter((t=>!!t)),!e).join("/");if(!r&&!e){r="."}if(r&&n){r+="/"}return(e?"/":"")+r}function Ue(t){return t.charAt(0)==="/"}function qe(...t){return ze(t.join("/"))}function He(t){const e=Fe(t);const n=e[0]||"";let r=e[1];if(!n&&!r){return"."}if(r){r=r.slice(0,r.length-1)}return n+r}function We(t,e){let n=Fe(t)[2]||"";if(e&&n.slice(e.length*-1)===e){n=n.slice(0,n.length-e.length)}return n}var Ge;(function(t){const e=0;t[t["PENDING"]=e]="PENDING";const n=1;t[t["RESOLVED"]=n]="RESOLVED";const r=2;t[t["REJECTED"]=r]="REJECTED"})(Ge||(Ge={}));function Ye(t){return new Je((e=>{e(t)}))}function Xe(t){return new Je(((e,n)=>{n(t)}))}class Je{constructor(t){Je.prototype.__init.call(this);Je.prototype.__init2.call(this);Je.prototype.__init3.call(this);Je.prototype.__init4.call(this);this._state=Ge.PENDING;this._handlers=[];try{t(this._resolve,this._reject)}catch(t){this._reject(t)}}then(t,e){return new Je(((n,r)=>{this._handlers.push([false,e=>{if(!t){n(e)}else{try{n(t(e))}catch(t){r(t)}}},t=>{if(!e){r(t)}else{try{n(e(t))}catch(t){r(t)}}}]);this._executeHandlers()}))}catch(t){return this.then((t=>t),t)}finally(t){return new Je(((e,n)=>{let r;let i;return this.then((e=>{i=false;r=e;if(t){t()}}),(e=>{i=true;r=e;if(t){t()}})).then((()=>{if(i){n(r);return}e(r)}))}))}__init(){this._resolve=t=>{this._setResult(Ge.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(Ge.REJECTED,t)}}__init3(){this._setResult=(t,e)=>{if(this._state!==Ge.PENDING){return}if(m(e)){void e.then(this._resolve,this._reject);return}this._state=t;this._value=e;this._executeHandlers()}}__init4(){this._executeHandlers=()=>{if(this._state===Ge.PENDING){return}const t=this._handlers.slice();this._handlers=[];t.forEach((t=>{if(t[0]){return}if(this._state===Ge.RESOLVED){t[1](this._value)}if(this._state===Ge.REJECTED){t[2](this._value)}t[0]=true}))}}}function Ke(t){const e=[];function n(){return t===undefined||e.length<t}function r(t){return e.splice(e.indexOf(t),1)[0]||Promise.resolve(undefined)}function i(t){if(!n()){return Xe(new tt("Not adding Promise because buffer limit was reached."))}const i=t();if(e.indexOf(i)===-1){e.push(i)}void i.then((()=>r(i))).then(null,(()=>r(i).then(null,(()=>{}))));return i}function s(t){return new Je(((n,r)=>{let i=e.length;if(!i){return n(true)}const s=setTimeout((()=>{if(t&&t>0){n(false)}}),t);e.forEach((t=>{void Ye(t).then((()=>{if(! --i){clearTimeout(s);n(true)}}),r)}))}))}return{$:e,add:i,drain:s}}function Ve(t){const e={};let n=0;while(n<t.length){const r=t.indexOf("=",n);if(r===-1){break}let i=t.indexOf(";",n);if(i===-1){i=t.length}else if(i<r){n=t.lastIndexOf(";",r-1)+1;continue}const s=t.slice(n,r).trim();if(undefined===e[s]){let n=t.slice(r+1,i).trim();if(n.charCodeAt(0)===34){n=n.slice(1,-1)}try{e[s]=n.indexOf("%")!==-1?decodeURIComponent(n):n}catch(t){e[s]=n}}n=i+1}return e}function Ze(t){if(!t){return{}}const e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e){return{}}const n=e[6]||"";const r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:r,relative:e[5]+n+r}}function Qe(t){return t.split(/[?#]/,1)[0]}function tn(t){return t.split(/\\?\//).filter((t=>t.length>0&&t!==",")).length}function en(t){const{protocol:e,host:n,path:r}=t;const i=n&&n.replace(/^.*@/,"[filtered]:[filtered]@").replace(/(:80)$/,"").replace(/(:443)$/,"")||"";return`${e?`${e}://`:""}${i}${r}`}const nn=["X-Client-IP","X-Forwarded-For","Fly-Client-IP","CF-Connecting-IP","Fastly-Client-Ip","True-Client-Ip","X-Real-IP","X-Cluster-Client-IP","X-Forwarded","Forwarded-For","Forwarded","X-Vercel-Forwarded-For"];function rn(t){const e=nn.map((e=>{const n=t[e];const r=Array.isArray(n)?n.join(";"):n;if(e==="Forwarded"){return sn(r)}return r&&r.split(",").map((t=>t.trim()))}));const n=e.reduce(((t,e)=>{if(!e){return t}return t.concat(e)}),[]);const r=n.find((t=>t!==null&&on(t)));return r||null}function sn(t){if(!t){return null}for(const e of t.split(";")){if(e.startsWith("for=")){return e.slice(4)}}return null}function on(t){const e=/(?:^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}$)|(?:^(?:(?:[a-fA-F\d]{1,4}:){7}(?:[a-fA-F\d]{1,4}|:)|(?:[a-fA-F\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|:[a-fA-F\d]{1,4}|:)|(?:[a-fA-F\d]{1,4}:){5}(?::(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,2}|:)|(?:[a-fA-F\d]{1,4}:){4}(?:(?::[a-fA-F\d]{1,4}){0,1}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,3}|:)|(?:[a-fA-F\d]{1,4}:){3}(?:(?::[a-fA-F\d]{1,4}){0,2}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,4}|:)|(?:[a-fA-F\d]{1,4}:){2}(?:(?::[a-fA-F\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,5}|:)|(?:[a-fA-F\d]{1,4}:){1}(?:(?::[a-fA-F\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,6}|:)|(?::(?:(?::[a-fA-F\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,7}|:)))(?:%[0-9a-zA-Z]{1,})?$)/;return e.test(t)}const cn={ip:false,request:true,transaction:true,user:true};const an=["cookies","data","headers","method","query_string","url"];const un=["id","username","email"];function fn(t,e={}){const n=t.method&&t.method.toUpperCase();let r="";let i="url";if(e.customRoute||t.route){r=e.customRoute||`${t.baseUrl||""}${t.route&&t.route.path}`;i="route"}else if(t.originalUrl||t.url){r=Qe(t.originalUrl||t.url||"")}let s="";if(e.method&&n){s+=n}if(e.method&&e.path){s+=" "}if(e.path&&r){s+=r}return[s,i]}function ln(t,e){switch(e){case"path":{return fn(t,{path:true})[0]}case"handler":{return t.route&&t.route.stack&&t.route.stack[0]&&t.route.stack[0].name||"<anonymous>"}case"methodPath":default:{const e=t._reconstructedRoute?t._reconstructedRoute:undefined;return fn(t,{path:true,method:true,customRoute:e})[0]}}}function dn(t,e){const n={};const r=Array.isArray(e)?e:un;r.forEach((e=>{if(t&&e in t){n[e]=t[e]}}));return n}function hn(t,e={}){const{include:n=an}=e;const r={};const i=t.headers||{};const s=t.method;const o=i.host||t.hostname||t.host||"<no host>";const c=t.protocol==="https"||t.socket&&t.socket.encrypted?"https":"http";const u=t.originalUrl||t.url||"";const f=u.startsWith(c)?u:`${c}://${o}${u}`;n.forEach((e=>{switch(e){case"headers":{r.headers=i;if(!n.includes("cookies")){delete r.headers.cookie}if(!n.includes("ip")){nn.forEach((t=>{delete r.headers[t]}))}break}case"method":{r.method=s;break}case"url":{r.url=f;break}case"cookies":{r.cookies=t.cookies||i.cookie&&Ve(i.cookie)||{};break}case"query_string":{r.query_string=mn(t);break}case"data":{if(s==="GET"||s==="HEAD"){break}if(t.body!==undefined){r.data=a(t.body)?t.body:JSON.stringify(Ie(t.body))}break}default:{if({}.hasOwnProperty.call(t,e)){r[e]=t[e]}}}}));return r}function pn(t,e,n){const r={...cn,...n&&n.include};if(r.request){const n=Array.isArray(r.request)?[...r.request]:[...an];if(r.ip){n.push("ip")}const i=hn(e,{include:n});t.request={...t.request,...i}}if(r.user){const n=e.user&&l(e.user)?dn(e.user,r.user):{};if(Object.keys(n).length){t.user={...t.user,...n}}}if(r.ip){const n=e.headers&&rn(e.headers)||e.ip||e.socket&&e.socket.remoteAddress;if(n){t.user={...t.user,ip_address:n}}}if(r.transaction&&!t.transaction&&t.type==="transaction"){t.transaction=ln(e,r.transaction)}return t}function mn(t){let e=t.originalUrl||t.url||"";if(!e){return}if(e.startsWith("/")){e=`http://dogs.are.great${e}`}try{const n=t.query||new URL(e).search.slice(1);return n.length?n:undefined}catch(t){return undefined}}function gn(t){const e={};try{t.forEach(((t,n)=>{if(typeof t==="string"){e[n]=t}}))}catch(t){B&&G.warn("Sentry failed extracting headers from a request object. If you see this, please file an issue.")}return e}function yn(t){const e=gn(t.headers);return{method:t.method,url:t.url,headers:e}}const bn=["fatal","error","warning","log","info","debug"];function vn(t){return t==="warn"?"warning":bn.includes(t)?t:"log"}function wn(t,e=false){const n=e||t&&!t.startsWith("/")&&!t.match(/^[A-Z]:/)&&!t.startsWith(".")&&!t.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//);return!n&&t!==undefined&&!t.includes("node_modules/")}function _n(t){const e=/^\s*[-]{4,}$/;const n=/at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/;return r=>{const i=r.match(n);if(i){let e;let n;let r;let s;let o;if(i[1]){r=i[1];let t=r.lastIndexOf(".");if(r[t-1]==="."){t--}if(t>0){e=r.slice(0,t);n=r.slice(t+1);const i=e.indexOf(".Module");if(i>0){r=r.slice(i+1);e=e.slice(0,i)}}s=undefined}if(n){s=e;o=n}if(n==="<anonymous>"){o=undefined;r=undefined}if(r===undefined){o=o||mt;r=s?`${s}.${o}`:o}let c=i[2]&&i[2].startsWith("file://")?i[2].slice(7):i[2];const a=i[5]==="native";if(c&&c.match(/\/[A-Z]:/)){c=c.slice(1)}if(!c&&i[5]&&!a){c=i[5]}return{filename:c,module:t?t(c):undefined,function:r,lineno:Sn(i[3]),colno:Sn(i[4]),in_app:wn(c||"",a)}}if(r.match(e)){return{filename:r}}return undefined}}function kn(t){return[90,_n(t)]}function Sn(t){return parseInt(t||"",10)||undefined}const xn="baggage";const Cn="sentry-";const Tn=/^sentry-/;const In=8192;function En(t){const e=$n(t);if(!e){return undefined}const n=Object.entries(e).reduce(((t,[e,n])=>{if(e.match(Tn)){const r=e.slice(Cn.length);t[r]=n}return t}),{});if(Object.keys(n).length>0){return n}else{return undefined}}function An(t){if(!t){return undefined}const e=Object.entries(t).reduce(((t,[e,n])=>{if(n){t[`${Cn}${e}`]=n}return t}),{});return Rn(e)}function $n(t){if(!t||!a(t)&&!Array.isArray(t)){return undefined}if(Array.isArray(t)){return t.reduce(((t,e)=>{const n=Mn(e);Object.entries(n).forEach((([e,n])=>{t[e]=n}));return t}),{})}return Mn(t)}function Mn(t){return t.split(",").map((t=>t.split("=").map((t=>decodeURIComponent(t.trim()))))).reduce(((t,[e,n])=>{if(e&&n){t[e]=n}return t}),{})}function Rn(t){if(Object.keys(t).length===0){return undefined}return Object.entries(t).reduce(((t,[e,n],r)=>{const i=`${encodeURIComponent(e)}=${encodeURIComponent(n)}`;const s=r===0?i:`${t},${i}`;if(s.length>In){B&&G.warn(`Not adding key: ${e} with val: ${n} to baggage header due to exceeding baggage size limits.`);return t}else{return s}}),"")}const Nn=new RegExp("^[ \\t]*"+"([0-9a-f]{32})?"+"-?([0-9a-f]{16})?"+"-?([01])?"+"[ \\t]*$");function On(t){if(!t){return undefined}const e=t.match(Nn);if(!e){return undefined}let n;if(e[3]==="1"){n=true}else if(e[3]==="0"){n=false}return{traceId:e[1],parentSampled:n,parentSpanId:e[2]}}function Dn(t,e){const n=On(t);const r=En(e);const{traceId:i,parentSpanId:s,parentSampled:o}=n||{};if(!n){return{traceId:i||ge(),spanId:ge().substring(16)}}else{return{traceId:i||ge(),parentSpanId:s||ge().substring(16),spanId:ge().substring(16),sampled:o,dsc:r||{}}}}function Ln(t=ge(),e=ge().substring(16),n){let r="";if(n!==undefined){r=n?"-1":"-0"}return`${t}-${e}${r}`}function Fn(t,e=[]){return[t,e]}function Pn(t,e){const[n,r]=t;return[n,[...r,e]]}function jn(t,e){const n=t[1];for(const t of n){const n=t[0].type;const r=e(t,n);if(r){return true}}return false}function Bn(t,e){return jn(t,((t,n)=>e.includes(n)))}function zn(t){return M.__SENTRY__&&M.__SENTRY__.encodePolyfill?M.__SENTRY__.encodePolyfill(t):(new TextEncoder).encode(t)}function Un(t){return M.__SENTRY__&&M.__SENTRY__.decodePolyfill?M.__SENTRY__.decodePolyfill(t):(new TextDecoder).decode(t)}function qn(t){const[e,n]=t;let r=JSON.stringify(e);function i(t){if(typeof r==="string"){r=typeof t==="string"?r+t:[zn(r),t]}else{r.push(typeof t==="string"?zn(t):t)}}for(const t of n){const[e,n]=t;i(`\n${JSON.stringify(e)}\n`);if(typeof n==="string"||n instanceof Uint8Array){i(n)}else{let t;try{t=JSON.stringify(n)}catch(e){t=JSON.stringify(Ie(n))}i(t)}}return typeof r==="string"?r:Hn(r)}function Hn(t){const e=t.reduce(((t,e)=>t+e.length),0);const n=new Uint8Array(e);let r=0;for(const e of t){n.set(e,r);r+=e.length}return n}function Wn(t){let e=typeof t==="string"?zn(t):t;function n(t){const n=e.subarray(0,t);e=e.subarray(t+1);return n}function r(){let t=e.indexOf(10);if(t<0){t=e.length}return JSON.parse(Un(n(t)))}const i=r();const s=[];while(e.length){const t=r();const e=typeof t.length==="number"?t.length:undefined;s.push([t,e?n(e):r()])}return[i,s]}function Gn(t){const e={type:"span"};return[e,t]}function Yn(t){const e=typeof t.data==="string"?zn(t.data):t.data;return[ft({type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),e]}const Xn={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function Jn(t){return Xn[t]}function Kn(t){if(!t||!t.sdk){return}const{name:e,version:n}=t.sdk;return{name:e,version:n}}function Vn(t,e,n,r){const i=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:(new Date).toISOString(),...e&&{sdk:e},...!!n&&r&&{dsn:J(r)},...i&&{trace:ft({...i})}}}function Zn(t,e,n){const r=[{type:"client_report"},{timestamp:n||qt(),discarded_events:t}];return Fn(e?{dsn:e}:{},[r])}const Qn=60*1e3;function tr(t,e=Date.now()){const n=parseInt(`${t}`,10);if(!isNaN(n)){return n*1e3}const r=Date.parse(`${t}`);if(!isNaN(r)){return r-e}return Qn}function er(t,e){return t[e]||t.all||0}function nr(t,e,n=Date.now()){return er(t,e)>n}function rr(t,{statusCode:e,headers:n},r=Date.now()){const i={...t};const s=n&&n["x-sentry-rate-limits"];const o=n&&n["retry-after"];if(s){for(const t of s.trim().split(",")){const[e,n,,,s]=t.split(":",5);const o=parseInt(e,10);const c=(!isNaN(o)?o:60)*1e3;if(!n){i.all=r+c}else{for(const t of n.split(";")){if(t==="metric_bucket"){if(!s||s.split(";").includes("custom")){i[t]=r+c}}else{i[t]=r+c}}}}}else if(o){i.all=r+tr(o,r)}else if(e===429){i.all=r+60*1e3}return i}function ir(t){let e=[];let n={};return{add(r,i){while(e.length>=t){const t=e.shift();if(t!==undefined){delete n[t]}}if(n[r]){this.delete(r)}e.push(r);n[r]=i},clear(){n={};e=[]},get(t){return n[t]},size(){return e.length},delete(t){if(!n[t]){return false}delete n[t];for(let n=0;n<e.length;n++){if(e[n]===t){e.splice(n,1);break}}return true}}}function sr(t,e){return t(e.stack||"",1)}function or(t,e){const n={type:e.name||e.constructor.name,value:e.message};const r=sr(t,e);if(r.length){n.stacktrace={frames:r}}return n}function cr(t){for(const e in t){if(Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];if(n instanceof Error){return n}}}return undefined}function ar(t){if("name"in t&&typeof t.name==="string"){let e=`'${t.name}' captured as exception`;if("message"in t&&typeof t.message==="string"){e+=` with message '${t.message}'`}return e}else if("message"in t&&typeof t.message==="string"){return t.message}const e=ut(t);if(s(t)){return`Event \`ErrorEvent\` captured as exception with message \`${t.message}\``}const n=ur(t);return`${n&&n!=="Object"?`'${n}'`:"Object"} captured as exception with keys: ${e}`}function ur(t){try{const e=Object.getPrototypeOf(t);return e?e.constructor.name:undefined}catch(t){}}function fr(t,e,n,i){if(r(n)){return[n,undefined]}e.synthetic=true;if(l(n)){const e=t&&t.getOptions().normalizeDepth;const r={["__serialized__"]:Ee(n,e)};const s=cr(n);if(s){return[s,r]}const o=ar(n);const c=i&&i.syntheticException||new Error(o);c.message=o;return[c,r]}const s=i&&i.syntheticException||new Error(n);s.message=`${n}`;return[s,undefined]}function lr(t,e,n,r){const i=r&&r.data&&r.data.mechanism;const s=i||{handled:true,type:"generic"};const[o,c]=fr(t,s,n,r);const a={exception:{values:[or(e,o)]}};if(c){a.extra=c}ve(a,undefined,undefined);we(a,s);return{...a,event_id:r&&r.event_id}}function dr(t,e,n="info",r,i){const s={event_id:r&&r.event_id,level:n};if(i&&r&&r.syntheticException){const n=sr(t,r.syntheticException);if(n.length){s.exception={values:[{value:e,stacktrace:{frames:n}}]}}}if(u(e)){const{__sentry_template_string__:t,__sentry_template_values__:n}=e;s.logentry={message:t,params:n};return s}s.message=e;return s}function hr(t,e,n,r){const i=t();let s=false;let o=true;setInterval((()=>{const t=i.getTimeMs();if(s===false&&t>e+n){s=true;if(o){r()}}if(t<e+n){s=false}}),20);return{poll:()=>{i.reset()},enabled:t=>{o=t}}}function pr(t,e,n){const r=e?e.replace(/^file:\/\//,""):undefined;const i=t.location.columnNumber?t.location.columnNumber+1:undefined;const s=t.location.lineNumber?t.location.lineNumber+1:undefined;return ft({filename:r,module:n(r),function:t.functionName||mt,colno:i,lineno:s,in_app:r?wn(r):undefined})}class mr{constructor(t){this._maxSize=t;this._cache=new Map}get size(){return this._cache.size}get(t){const e=this._cache.get(t);if(e===undefined){return undefined}this._cache.delete(t);this._cache.set(t,e);return e}set(t,e){if(this._cache.size>=this._maxSize){this._cache.delete(this._cache.keys().next().value)}this._cache.set(t,e)}remove(t){const e=this._cache.get(t);if(e){this._cache.delete(t)}return e}clear(){this._cache.clear()}keys(){return Array.from(this._cache.keys())}values(){const t=[];this._cache.forEach((e=>t.push(e)));return t}}function gr(t,e){return t!=null?t:e()}async function yr(t,e){return gr(t,e)}async function br(t){let e=undefined;let n=t[0];let r=1;while(r<t.length){const i=t[r];const s=t[r+1];r+=2;if((i==="optionalAccess"||i==="optionalCall")&&n==null){return}if(i==="access"||i==="optionalAccess"){e=n;n=await s(n)}else if(i==="call"||i==="optionalCall"){n=await s(((...t)=>n.call(e,...t)));e=undefined}}return n}async function vr(t){const e=await br(t);return e==null?true:e}function wr(t){let e=undefined;let n=t[0];let r=1;while(r<t.length){const i=t[r];const s=t[r+1];r+=2;if((i==="optionalAccess"||i==="optionalCall")&&n==null){return}if(i==="access"||i==="optionalAccess"){e=n;n=s(n)}else if(i==="call"||i==="optionalCall"){n=s(((...t)=>n.call(e,...t)));e=undefined}}return n}function _r(t){const e=wr(t);return e==null?true:e}function kr(){return{traceId:ge(),spanId:ge().substring(16)}}function Sr(t){return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const xr=M;function Cr(){const t=xr.chrome;const e=t&&t.app&&t.app.runtime;const n="history"in xr&&!!xr.history.pushState&&!!xr.history.replaceState;return!e&&n}const Tr=typeof __SENTRY_DEBUG__==="undefined"||__SENTRY_DEBUG__;function Ir(){Er(M);return M}function Er(t){const e=t.__SENTRY__=t.__SENTRY__||{};e.version=e.version||$;return e[$]=e[$]||{}}function Ar(t){const e=Wt();const n={sid:ge(),init:true,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:false,toJSON:()=>Rr(n)};if(t){$r(n,t)}return n}function $r(t,e={}){if(e.user){if(!t.ipAddress&&e.user.ip_address){t.ipAddress=e.user.ip_address}if(!t.did&&!e.did){t.did=e.user.id||e.user.email||e.user.username}}t.timestamp=e.timestamp||Wt();if(e.abnormal_mechanism){t.abnormal_mechanism=e.abnormal_mechanism}if(e.ignoreDuration){t.ignoreDuration=e.ignoreDuration}if(e.sid){t.sid=e.sid.length===32?e.sid:ge()}if(e.init!==undefined){t.init=e.init}if(!t.did&&e.did){t.did=`${e.did}`}if(typeof e.started==="number"){t.started=e.started}if(t.ignoreDuration){t.duration=undefined}else if(typeof e.duration==="number"){t.duration=e.duration}else{const e=t.timestamp-t.started;t.duration=e>=0?e:0}if(e.release){t.release=e.release}if(e.environment){t.environment=e.environment}if(!t.ipAddress&&e.ipAddress){t.ipAddress=e.ipAddress}if(!t.userAgent&&e.userAgent){t.userAgent=e.userAgent}if(typeof e.errors==="number"){t.errors=e.errors}if(e.status){t.status=e.status}}function Mr(t,e){let n={};if(e){n={status:e}}else if(t.status==="ok"){n={status:"exited"}}$r(t,n)}function Rr(t){return ft({sid:`${t.sid}`,init:t.init,started:new Date(t.started*1e3).toISOString(),timestamp:new Date(t.timestamp*1e3).toISOString(),status:t.status,errors:t.errors,did:typeof t.did==="number"||typeof t.did==="string"?`${t.did}`:undefined,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}const Nr="_sentrySpan";function Or(t,e){if(e){nt(t,Nr,e)}else{delete t[Nr]}}function Dr(t){return t[Nr]}const Lr=100;class Fr{constructor(){this._notifyingListeners=false;this._scopeListeners=[];this._eventProcessors=[];this._breadcrumbs=[];this._attachments=[];this._user={};this._tags={};this._extra={};this._contexts={};this._sdkProcessingMetadata={};this._propagationContext=kr()}clone(){const t=new Fr;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._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._lastEventId=this._lastEventId;Or(t,Dr(this));return t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){this._eventProcessors.push(t);return this}setUser(t){this._user=t||{email:undefined,id:undefined,ip_address:undefined,username:undefined};if(this._session){$r(this._session,{user:t})}this._notifyScopeListeners();return this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){this._requestSession=t;return this}setTags(t){this._tags={...this._tags,...t};this._notifyScopeListeners();return this}setTag(t,e){this._tags={...this._tags,[t]:e};this._notifyScopeListeners();return this}setExtras(t){this._extra={...this._extra,...t};this._notifyScopeListeners();return this}setExtra(t,e){this._extra={...this._extra,[t]:e};this._notifyScopeListeners();return this}setFingerprint(t){this._fingerprint=t;this._notifyScopeListeners();return this}setLevel(t){this._level=t;this._notifyScopeListeners();return this}setTransactionName(t){this._transactionName=t;this._notifyScopeListeners();return this}setContext(t,e){if(e===null){delete this._contexts[t]}else{this._contexts[t]=e}this._notifyScopeListeners();return this}setSession(t){if(!t){delete this._session}else{this._session=t}this._notifyScopeListeners();return this}getSession(){return this._session}update(t){if(!t){return this}const e=typeof t==="function"?t(this):t;const[n,r]=e instanceof Pr?[e.getScopeData(),e.getRequestSession()]:l(e)?[t,t.requestSession]:[];const{tags:i,extra:s,user:o,contexts:c,level:a,fingerprint:u=[],propagationContext:f}=n||{};this._tags={...this._tags,...i};this._extra={...this._extra,...s};this._contexts={...this._contexts,...c};if(o&&Object.keys(o).length){this._user=o}if(a){this._level=a}if(u.length){this._fingerprint=u}if(f){this._propagationContext=f}if(r){this._requestSession=r}return this}clear(){this._breadcrumbs=[];this._tags={};this._extra={};this._user={};this._contexts={};this._level=undefined;this._transactionName=undefined;this._fingerprint=undefined;this._requestSession=undefined;this._session=undefined;Or(this,undefined);this._attachments=[];this._propagationContext=kr();this._notifyScopeListeners();return this}addBreadcrumb(t,e){const n=typeof e==="number"?e:Lr;if(n<=0){return this}const r={timestamp:qt(),...t};const i=this._breadcrumbs;i.push(r);this._breadcrumbs=i.length>n?i.slice(-n):i;this._notifyScopeListeners();return this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){this._breadcrumbs=[];this._notifyScopeListeners();return this}addAttachment(t){this._attachments.push(t);return this}clearAttachments(){this._attachments=[];return this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Dr(this)}}setSDKProcessingMetadata(t){this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t};return this}setPropagationContext(t){this._propagationContext=t;return this}getPropagationContext(){return this._propagationContext}captureException(t,e){const n=e&&e.event_id?e.event_id:ge();if(!this._client){G.warn("No client configured on scope - will not capture exception!");return n}const r=new Error("Sentry syntheticException");this._client.captureException(t,{originalException:t,syntheticException:r,...e,event_id:n},this);return n}captureMessage(t,e,n){const r=n&&n.event_id?n.event_id:ge();if(!this._client){G.warn("No client configured on scope - will not capture message!");return r}const i=new Error(t);this._client.captureMessage(t,e,{originalException:t,syntheticException:i,...n,event_id:r},this);return r}captureEvent(t,e){const n=e&&e.event_id?e.event_id:ge();if(!this._client){G.warn("No client configured on scope - will not capture event!");return n}this._client.captureEvent(t,{...e,event_id:n},this);return n}_notifyScopeListeners(){if(!this._notifyingListeners){this._notifyingListeners=true;this._scopeListeners.forEach((t=>{t(this)}));this._notifyingListeners=false}}}const Pr=Fr;function jr(){return R("defaultCurrentScope",(()=>new Pr))}function Br(){return R("defaultIsolationScope",(()=>new Pr))}class zr{constructor(t,e){let n;if(!t){n=new Pr}else{n=t}let r;if(!e){r=new Pr}else{r=e}this._stack=[{scope:n}];this._isolationScope=r}withScope(t){const e=this._pushScope();let n;try{n=t(e)}catch(t){this._popScope();throw t}if(m(n)){return n.then((t=>{this._popScope();return t}),(t=>{this._popScope();throw t}))}this._popScope();return n}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();this._stack.push({client:this.getClient(),scope:t});return t}_popScope(){if(this._stack.length<=1)return false;return!!this._stack.pop()}}function Ur(){const t=Ir();const e=Er(t);return e.stack=e.stack||new zr(jr(),Br())}function qr(t){return Ur().withScope(t)}function Hr(t,e){const n=Ur();return n.withScope((()=>{n.getStackTop().scope=t;return e(t)}))}function Wr(t){return Ur().withScope((()=>t(Ur().getIsolationScope())))}function Gr(){return{withIsolationScope:Wr,withScope:qr,withSetScope:Hr,withSetIsolationScope:(t,e)=>Wr(e),getCurrentScope:()=>Ur().getScope(),getIsolationScope:()=>Ur().getIsolationScope()}}function Yr(t){const e=Ir();const n=Er(e);n.acs=t}function Xr(t){const e=Er(t);if(e.acs){return e.acs}return Gr()}function Jr(){const t=Ir();const e=Xr(t);return e.getCurrentScope()}function Kr(){const t=Ir();const e=Xr(t);return e.getIsolationScope()}function Vr(){return R("globalScope",(()=>new Pr))}function Zr(...t){const e=Ir();const n=Xr(e);if(t.length===2){const[e,r]=t;if(!e){return n.withScope(r)}return n.withSetScope(e,r)}return n.withScope(t[0])}function Qr(...t){const e=Ir();const n=Xr(e);if(t.length===2){const[e,r]=t;if(!e){return n.withIsolationScope(r)}return n.withSetIsolationScope(e,r)}return n.withIsolationScope(t[0])}function ti(){return Jr().getClient()}const ei="_sentryMetrics";function ni(t){const e=t[ei];if(!e){return undefined}const n={};for(const[,[t,r]]of e){const e=n[t]||(n[t]=[]);e.push(ft(r))}return n}function ri(t,e,n,r,i,s,o){const c=t[ei];const a=c||(t[ei]=new Map);const u=`${e}:${n}@${i}`;const f=a.get(o);if(f){const[,t]=f;a.set(o,[u,{min:Math.min(t.min,r),max:Math.max(t.max,r),count:t.count+=1,sum:t.sum+=r,tags:t.tags}])}else{a.set(o,[u,{min:r,max:r,count:1,sum:r,tags:s}])}}const ii="sentry.source";const si="sentry.sample_rate";const oi="sentry.op";const ci="sentry.origin";const ai="sentry.idle_span_finish_reason";const ui="sentry.measurement_unit";const fi="sentry.measurement_value";const li="sentry.profile_id";const di="sentry.exclusive_time";const hi="cache.hit";const pi="cache.key";const mi="cache.item_size";const gi=0;const yi=1;const bi=2;function vi(t){if(t<400&&t>=100){return{code:yi}}if(t>=400&&t<500){switch(t){case 401:return{code:bi,message:"unauthenticated"};case 403:return{code:bi,message:"permission_denied"};case 404:return{code:bi,message:"not_found"};case 409:return{code:bi,message:"already_exists"};case 413:return{code:bi,message:"failed_precondition"};case 429:return{code:bi,message:"resource_exhausted"};case 499:return{code:bi,message:"cancelled"};default:return{code:bi,message:"invalid_argument"}}}if(t>=500&&t<600){switch(t){case 501:return{code:bi,message:"unimplemented"};case 503:return{code:bi,message:"unavailable"};case 504:return{code:bi,message:"deadline_exceeded"};default:return{code:bi,message:"internal_error"}}}return{code:bi,message:"unknown_error"}}function wi(t,e){t.setAttribute("http.response.status_code",e);const n=vi(e);if(n.message!=="unknown_error"){t.setStatus(n)}}const _i=0;const ki=1;function Si(t){const{spanId:e,traceId:n}=t.spanContext();const{data:r,op:i,parent_span_id:s,status:o,origin:c}=Ei(t);return ft({parent_span_id:s,span_id:e,trace_id:n,data:r,op:i,status:o,origin:c})}function xi(t){const{spanId:e,traceId:n}=t.spanContext();const{parent_span_id:r}=Ei(t);return ft({parent_span_id:r,span_id:e,trace_id:n})}function Ci(t){const{traceId:e,spanId:n}=t.spanContext();const r=Mi(t);return Ln(e,n,r)}function Ti(t){if(typeof t==="number"){return Ii(t)}if(Array.isArray(t)){return t[0]+t[1]/1e9}if(t instanceof Date){return Ii(t.getTime())}return Wt()}function Ii(t){const e=t>9999999999;return e?t/1e3:t}function Ei(t){if($i(t)){return t.getSpanJSON()}try{const{spanId:e,traceId:n}=t.spanContext();if(Ai(t)){const{attributes:r,startTime:i,name:s,endTime:o,parentSpanId:c,status:a}=t;return ft({span_id:e,trace_id:n,data:r,description:s,parent_span_id:c,start_timestamp:Ti(i),timestamp:Ti(o)||undefined,status:Ri(a),op:r[oi],origin:r[ci],_metrics_summary:ni(t)})}return{span_id:e,trace_id:n}}catch(t){return{}}}function Ai(t){const e=t;return!!e.attributes&&!!e.startTime&&!!e.name&&!!e.endTime&&!!e.status}function $i(t){return typeof t.getSpanJSON==="function"}function Mi(t){const{traceFlags:e}=t.spanContext();return e===ki}function Ri(t){if(!t||t.code===gi){return undefined}if(t.code===yi){return"ok"}return t.message||"unknown_error"}const Ni="_sentryChildSpans";const Oi="_sentryRootSpan";function Di(t,e){const n=t[Oi]||t;nt(e,Oi,n);if(t[Ni]){t[Ni].add(e)}else{nt(t,Ni,new Set([e]))}}function Li(t,e){if(t[Ni]){t[Ni].delete(e)}}function Fi(t){const e=new Set;function n(t){if(e.has(t)){return}else if(Mi(t)){e.add(t);const r=t[Ni]?Array.from(t[Ni]):[];for(const t of r){n(t)}}}n(t);return Array.from(e)}function Pi(t){return t[Oi]||t}function ji(){const t=Ir();const e=Xr(t);if(e.getActiveSpan){return e.getActiveSpan()}return Dr(Jr())}function Bi(t,e,n,r,i,s){const o=ji();if(o){ri(o,t,e,n,r,i,s)}}let zi=false;function Ui(){if(zi){return}zi=true;re(qi);oe(qi)}function qi(){const t=ji();const e=t&&Pi(t);if(e){const t="internal_error";Tr&&G.log(`[Tracing] Root span: ${t} -> Global error occured`);e.setStatus({code:bi,message:t})}}qi.tag="sentry_tracingErrorCallback";const Hi="_sentryScope";const Wi="_sentryIsolationScope";function Gi(t,e,n){if(t){nt(t,Wi,n);nt(t,Hi,e)}}function Yi(t){return{scope:t[Hi],isolationScope:t[Wi]}}function Xi(){Ui()}function Ji(t){if(typeof __SENTRY_TRACING__==="boolean"&&!__SENTRY_TRACING__){return false}const e=ti();const n=t||e&&e.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}class Ki{constructor(t={}){this._traceId=t.traceId||ge();this._spanId=t.spanId||ge().substring(16)}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:_i}}end(t){}setAttribute(t,e){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return false}addEvent(t,e,n){return this}addLink(t){return this}addLinks(t){return this}recordException(t,e){}}function Vi(t,e,n=(()=>{})){let r;try{r=t()}catch(t){e(t);n();throw t}return Zi(r,e,n)}function Zi(t,e,n){if(m(t)){return t.then((t=>{n();return t}),(t=>{e(t);n();throw t}))}n();return t}const Qi="production";const ts="_frozenDsc";function es(t,e){const n=t;nt(n,ts,e)}function ns(t,e){const n=e.getOptions();const{publicKey:r}=e.getDsn()||{};const i=ft({environment:n.environment||Qi,release:n.release,public_key:r,trace_id:t});e.emit("createDsc",i);return i}function rs(t){const e=ti();if(!e){return{}}const n=ns(Ei(t).trace_id||"",e);const r=Pi(t);const i=r[ts];if(i){return i}const s=r.spanContext().traceState;const o=s&&s.get("sentry.dsc");const c=o&&En(o);if(c){return c}const a=Ei(r);const u=a.data||{};const f=u[si];if(f!=null){n.sample_rate=`${f}`}const l=u[ii];const d=a.description;if(l!=="url"&&d){n.transaction=d}n.sampled=String(Mi(r));e.emit("createDsc",n,r);return n}function is(t){const e=rs(t);return An(e)}function ss(t){if(!Tr)return;const{description:e="< unknown name >",op:n="< unknown op >",parent_span_id:r}=Ei(t);const{spanId:i}=t.spanContext();const s=Mi(t);const o=Pi(t);const c=o===t;const a=`[Tracing] Starting ${s?"sampled":"unsampled"} ${c?"root ":""}span`;const u=[`op: ${n}`,`name: ${e}`,`ID: ${i}`];if(r){u.push(`parent ID: ${r}`)}if(!c){const{op:t,description:e}=Ei(o);u.push(`root ID: ${o.spanContext().spanId}`);if(t){u.push(`root op: ${t}`)}if(e){u.push(`root description: ${e}`)}}G.log(`${a}\n ${u.join("\n ")}`)}function os(t){if(!Tr)return;const{description:e="< unknown name >",op:n="< unknown op >"}=Ei(t);const{spanId:r}=t.spanContext();const i=Pi(t);const s=i===t;const o=`[Tracing] Finishing "${n}" ${s?"root ":""}span "${e}" with ID ${r}`;G.log(o)}function cs(t){if(typeof t==="boolean"){return Number(t)}const e=typeof t==="string"?parseFloat(t):t;if(typeof e!=="number"||isNaN(e)||e<0||e>1){Tr&&G.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(t)} of type ${JSON.stringify(typeof t)}.`);return undefined}return e}function as(t,e){if(!Ji(t)){return[false]}let n;if(typeof t.tracesSampler==="function"){n=t.tracesSampler(e)}else if(e.parentSampled!==undefined){n=e.parentSampled}else if(typeof t.tracesSampleRate!=="undefined"){n=t.tracesSampleRate}else{n=1}const r=cs(n);if(r===undefined){Tr&&G.warn("[Tracing] Discarding transaction because of invalid sample rate.");return[false]}if(!r){Tr&&G.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"}`);return[false,r]}const i=Math.random()<r;if(!i){Tr&&G.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(n)})`);return[false,r]}return[true,r]}function us(t,e){if(!e){return t}t.sdk=t.sdk||{};t.sdk.name=t.sdk.name||e.name;t.sdk.version=t.sdk.version||e.version;t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]];t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]];return t}function fs(t,e,n,r){const i=Kn(n);const s={sent_at:(new Date).toISOString(),...i&&{sdk:i},...!!r&&e&&{dsn:J(e)}};const o="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return Fn(s,[o])}function ls(t,e,n,r){const i=Kn(n);const s=t.type&&t.type!=="replay_event"?t.type:"event";us(t,n&&n.sdk);const o=Vn(t,i,r,e);delete t.sdkProcessingMetadata;const c=[{type:s},t];return Fn(o,[c])}function ds(t,e){function n(t){return!!t.trace_id&&!!t.public_key}const r=rs(t[0]);const i=e&&e.getDsn();const s=e&&e.getOptions().tunnel;const o={sent_at:(new Date).toISOString(),...n(r)&&{trace:r},...!!s&&i&&{dsn:J(i)}};const c=e&&e.getOptions().beforeSendSpan;const a=c?t=>c(Ei(t)):t=>Ei(t);const u=[];for(const e of t){const t=a(e);if(t){u.push(Gn(t))}}return Fn(o,u)}function hs(t,e,n){const r=ji();const i=r&&Pi(r);if(i){i.addEvent(t,{[fi]:e,[ui]:n})}}function ps(t){if(!t||t.length===0){return undefined}const e={};t.forEach((t=>{const n=t.attributes||{};const r=n[ui];const i=n[fi];if(typeof r==="string"&&typeof i==="number"){e[t.name]={value:i,unit:r}}}));return e}const ms=1e3;class gs{constructor(t={}){this._traceId=t.traceId||ge();this._spanId=t.spanId||ge().substring(16);this._startTime=t.startTimestamp||Wt();this._attributes={};this.setAttributes({[ci]:"manual",[oi]:t.op,...t.attributes});this._name=t.name;if(t.parentSpanId){this._parentSpanId=t.parentSpanId}if("sampled"in t){this._sampled=t.sampled}if(t.endTimestamp){this._endTime=t.endTimestamp}this._events=[];this._isStandaloneSpan=t.isStandalone;if(this._endTime){this._onSpanEnded()}}addLink(t){return this}addLinks(t){return this}recordException(t,e){}spanContext(){const{_spanId:t,_traceId:e,_sampled:n}=this;return{spanId:t,traceId:e,traceFlags:n?ki:_i}}setAttribute(t,e){if(e===undefined){delete this._attributes[t]}else{this._attributes[t]=e}return this}setAttributes(t){Object.keys(t).forEach((e=>this.setAttribute(e,t[e])));return this}updateStartTime(t){this._startTime=Ti(t)}setStatus(t){this._status=t;return this}updateName(t){this._name=t;return this}end(t){if(this._endTime){return}this._endTime=Ti(t);os(this);this._onSpanEnded()}getSpanJSON(){return ft({data:this._attributes,description:this._name,op:this._attributes[oi],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:Ri(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[ci],_metrics_summary:ni(this),profile_id:this._attributes[li],exclusive_time:this._attributes[di],measurements:ps(this._events),is_segment:this._isStandaloneSpan&&Pi(this)===this||undefined,segment_id:this._isStandaloneSpan?Pi(this).spanContext().spanId:undefined})}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,e,n){Tr&&G.log("[Tracing] Adding an event to span:",t);const r=ys(e)?e:n||Wt();const i=ys(e)?{}:e||{};const s={name:t,time:Ti(r),attributes:i};this._events.push(s);return this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=ti();if(t){t.emit("spanEnd",this)}const e=this._isStandaloneSpan||this===Pi(this);if(!e){return}if(this._isStandaloneSpan){if(this._sampled){ws(ds([this],t))}else{Tr&&G.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled.");if(t){t.recordDroppedEvent("sample_rate","span")}}return}const n=this._convertSpanToTransaction();if(n){const t=Yi(this).scope||Jr();t.captureEvent(n)}}_convertSpanToTransaction(){if(!bs(Ei(this))){return undefined}if(!this._name){Tr&&G.warn("Transaction has no name, falling back to `<unlabeled transaction>`.");this._name="<unlabeled transaction>"}const{scope:t,isolationScope:e}=Yi(this);const n=t||Jr();const r=n.getClient()||ti();if(this._sampled!==true){Tr&&G.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled.");if(r){r.recordDroppedEvent("sample_rate","transaction")}return undefined}const i=Fi(this).filter((t=>t!==this&&!vs(t)));const s=i.map((t=>Ei(t))).filter(bs);const o=this._attributes[ii];const c={contexts:{trace:Si(this)},spans:s.length>ms?s.sort(((t,e)=>t.start_timestamp-e.start_timestamp)).slice(0,ms):s,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:e,...ft({dynamicSamplingContext:rs(this)})},_metrics_summary:ni(this),...o&&{transaction_info:{source:o}}};const a=ps(this._events);const u=a&&Object.keys(a).length;if(u){Tr&&G.log("[Measurements] Adding measurements to transaction event",JSON.stringify(a,undefined,2));c.measurements=a}return c}}function ys(t){return t&&typeof t==="number"||t instanceof Date||Array.isArray(t)}function bs(t){return!!t.start_timestamp&&!!t.timestamp&&!!t.span_id&&!!t.trace_id}function vs(t){return t instanceof gs&&t.isStandaloneSpan()}function ws(t){const e=ti();if(!e){return}const n=t[1];if(!n||n.length===0){e.recordDroppedEvent("before_send","span");return}const r=e.getTransport();if(r){r.send(t).then(null,(t=>{Tr&&G.error("Error while sending span:",t)}))}}const _s="__SENTRY_SUPPRESS_TRACING__";function ks(t,e){const n=Ms();if(n.startSpan){return n.startSpan(t,e)}const r=$s(t);const{forceTransaction:i,parentSpan:s}=t;return Zr(t.scope,(()=>{const n=Ds(s);return n((()=>{const n=Jr();const s=Os(n);const o=t.onlyIfParent&&!s;const c=o?new Ki:As({parentSpan:s,spanArguments:r,forceTransaction:i,scope:n});Or(n,c);return Vi((()=>e(c)),(()=>{const{status:t}=Ei(c);if(c.isRecording()&&(!t||t==="ok")){c.setStatus({code:bi,message:"internal_error"})}}),(()=>c.end()))}))}))}function Ss(t,e){const n=Ms();if(n.startSpanManual){return n.startSpanManual(t,e)}const r=$s(t);const{forceTransaction:i,parentSpan:s}=t;return Zr(t.scope,(()=>{const n=Ds(s);return n((()=>{const n=Jr();const s=Os(n);const o=t.onlyIfParent&&!s;const c=o?new Ki:As({parentSpan:s,spanArguments:r,forceTransaction:i,scope:n});Or(n,c);function a(){c.end()}return Vi((()=>e(c,a)),(()=>{const{status:t}=Ei(c);if(c.isRecording()&&(!t||t==="ok")){c.setStatus({code:bi,message:"internal_error"})}}))}))}))}function xs(t){const e=Ms();if(e.startInactiveSpan){return e.startInactiveSpan(t)}const n=$s(t);const{forceTransaction:r,parentSpan:i}=t;const s=t.scope?e=>Zr(t.scope,e):i!==undefined?t=>Ts(i,t):t=>t();return s((()=>{const e=Jr();const i=Os(e);const s=t.onlyIfParent&&!i;if(s){return new Ki}return As({parentSpan:i,spanArguments:n,forceTransaction:r,scope:e})}))}const Cs=({sentryTrace:t,baggage:e},n)=>Zr((r=>{const i=Dn(t,e);r.setPropagationContext(i);return n()}));function Ts(t,e){const n=Ms();if(n.withActiveSpan){return n.withActiveSpan(t,e)}return Zr((n=>{Or(n,t||undefined);return e(n)}))}function Is(t){const e=Ms();if(e.suppressTracing){return e.suppressTracing(t)}return Zr((e=>{e.setSDKProcessingMetadata({[_s]:true});return t()}))}function Es(t){return Zr((e=>{e.setPropagationContext(kr());Tr&&G.info(`Starting a new trace with id ${e.getPropagationContext().traceId}`);return Ts(null,t)}))}function As({parentSpan:t,spanArguments:e,forceTransaction:n,scope:r}){if(!Ji()){return new Ki}const i=Kr();let s;if(t&&!n){s=Ns(t,r,e);Di(t,s)}else if(t){const n=rs(t);const{traceId:i,spanId:o}=t.spanContext();const c=Mi(t);s=Rs({traceId:i,parentSpanId:o,...e},r,c);es(s,n)}else{const{traceId:t,dsc:n,parentSpanId:o,sampled:c}={...i.getPropagationContext(),...r.getPropagationContext()};s=Rs({traceId:t,parentSpanId:o,...e},r,c);if(n){es(s,n)}}ss(s);Gi(s,r,i);return s}function $s(t){const e=t.experimental||{};const n={isStandalone:e.standalone,...t};if(t.startTime){const e={...n};e.startTimestamp=Ti(t.startTime);delete e.startTime;return e}return n}function Ms(){const t=Ir();return Xr(t)}function Rs(t,e,n){const r=ti();const i=r&&r.getOptions()||{};const{name:s="",attributes:o}=t;const[c,a]=e.getScopeData().sdkProcessingMetadata[_s]?[false]:as(i,{name:s,parentSampled:n,attributes:o,transactionContext:{name:s,parentSampled:n}});const u=new gs({...t,attributes:{[ii]:"custom",...t.attributes},sampled:c});if(a!==undefined){u.setAttribute(si,a)}if(r){r.emit("spanStart",u)}return u}function Ns(t,e,n){const{spanId:r,traceId:i}=t.spanContext();const s=e.getScopeData().sdkProcessingMetadata[_s]?false:Mi(t);const o=s?new gs({...n,parentSpanId:r,traceId:i,sampled:s}):new Ki({traceId:i});Di(t,o);const c=ti();if(c){c.emit("spanStart",o);if(n.endTimestamp){c.emit("spanEnd",o)}}return o}function Os(t){const e=Dr(t);if(!e){return undefined}const n=ti();const r=n?n.getOptions():{};if(r.parentSpanIsAlwaysRootSpan){return Pi(e)}return e}function Ds(t){return t!==undefined?e=>Ts(t,e):t=>t()}const Ls={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3};const Fs="heartbeatFailed";const Ps="idleTimeout";const js="finalTimeout";const Bs="externalFinish";function zs(t,e={}){const n=new Map;let r=false;let i;let s=Bs;let o=!e.disableAutoFinish;const c=[];const{idleTimeout:a=Ls.idleTimeout,finalTimeout:u=Ls.finalTimeout,childSpanTimeout:f=Ls.childSpanTimeout,beforeSpanEnd:l}=e;const d=ti();if(!d||!Ji()){return new Ki}const h=Jr();const p=ji();const m=Us(t);m.end=new Proxy(m.end,{apply(t,e,n){if(l){l(m)}const[r,...i]=n;const s=r||Wt();const o=Ti(s);const c=Fi(m).filter((t=>t!==m));if(!c.length){_(o);return Reflect.apply(t,e,[o,...i])}const a=c.map((t=>Ei(t).timestamp)).filter((t=>!!t));const f=a.length?Math.max(...a):undefined;const d=Ei(m).start_timestamp;const h=Math.min(d?d+u/1e3:Infinity,Math.max(d||-Infinity,Math.min(o,f||Infinity)));_(h);return Reflect.apply(t,e,[h,...i])}});function g(){if(i){clearTimeout(i);i=undefined}}function y(t){g();i=setTimeout((()=>{if(!r&&n.size===0&&o){s=Ps;m.end(t)}}),a)}function b(t){i=setTimeout((()=>{if(!r&&o){s=Fs;m.end(t)}}),f)}function v(t){g();n.set(t,true);const e=Wt();b(e+f/1e3)}function w(t){if(n.has(t)){n.delete(t)}if(n.size===0){const t=Wt();y(t+a/1e3)}}function _(t){r=true;n.clear();c.forEach((t=>t()));Or(h,p);const e=Ei(m);const{start_timestamp:i}=e;if(!i){return}const o=e.data||{};if(!o[ai]){m.setAttribute(ai,s)}G.log(`[Tracing] Idle span "${e.op}" finished`);const f=Fi(m).filter((t=>t!==m));let l=0;f.forEach((e=>{if(e.isRecording()){e.setStatus({code:bi,message:"cancelled"});e.end(t);Tr&&G.log("[Tracing] Cancelling span since span ended early",JSON.stringify(e,undefined,2))}const n=Ei(e);const{timestamp:r=0,start_timestamp:i=0}=n;const s=i<=t;const o=(u+a)/1e3;const c=r-i<=o;if(Tr){const t=JSON.stringify(e,undefined,2);if(!s){G.log("[Tracing] Discarding span since it happened after idle span was finished",t)}else if(!c){G.log("[Tracing] Discarding span since it finished after idle span final timeout",t)}}if(!c||!s){Li(m,e);l++}}));if(l>0){m.setAttribute("sentry.idle_span_discarded_spans",l)}}c.push(d.on("spanStart",(t=>{if(r||t===m||!!Ei(t).timestamp){return}const e=Fi(m);if(e.includes(t)){v(t.spanContext().spanId)}})));c.push(d.on("spanEnd",(t=>{if(r){return}w(t.spanContext().spanId)})));c.push(d.on("idleSpanEnableAutoFinish",(t=>{if(t===m){o=true;y();if(n.size){b()}}})));if(!e.disableAutoFinish){y()}setTimeout((()=>{if(!r){m.setStatus({code:bi,message:"deadline_exceeded"});s=js;m.end()}}),u);return m}function Us(t){const e=xs(t);Or(Jr(),e);Tr&&G.log("[Tracing] Started span is an idle span");return e}function qs(t,e,n,r=0){return new Je(((i,s)=>{const o=t[r];if(e===null||typeof o!=="function"){i(e)}else{const c=o({...e},n);Tr&&o.id&&c===null&&G.log(`Event processor "${o.id}" dropped event`);if(m(c)){void c.then((e=>qs(t,e,n,r+1).then(i))).then(null,s)}else{void qs(t,c,n,r+1).then(i).then(null,s)}}}))}function Hs(t,e){const{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:s}=e;Ys(t,e);if(r){Ks(t,r)}Vs(t,n);Xs(t,i);Js(t,s)}function Ws(t,e){const{extra:n,tags:r,user:i,contexts:s,level:o,sdkProcessingMetadata:c,breadcrumbs:a,fingerprint:u,eventProcessors:f,attachments:l,propagationContext:d,transactionName:h,span:p}=e;Gs(t,"extra",n);Gs(t,"tags",r);Gs(t,"user",i);Gs(t,"contexts",s);Gs(t,"sdkProcessingMetadata",c);if(o){t.level=o}if(h){t.transactionName=h}if(p){t.span=p}if(a.length){t.breadcrumbs=[...t.breadcrumbs,...a]}if(u.length){t.fingerprint=[...t.fingerprint,...u]}if(f.length){t.eventProcessors=[...t.eventProcessors,...f]}if(l.length){t.attachments=[...t.attachments,...l]}t.propagationContext={...t.propagationContext,...d}}function Gs(t,e,n){if(n&&Object.keys(n).length){t[e]={...t[e]};for(const r in n){if(Object.prototype.hasOwnProperty.call(n,r)){t[e][r]=n[r]}}}}function Ys(t,e){const{extra:n,tags:r,user:i,contexts:s,level:o,transactionName:c}=e;const a=ft(n);if(a&&Object.keys(a).length){t.extra={...a,...t.extra}}const u=ft(r);if(u&&Object.keys(u).length){t.tags={...u,...t.tags}}const f=ft(i);if(f&&Object.keys(f).length){t.user={...f,...t.user}}const l=ft(s);if(l&&Object.keys(l).length){t.contexts={...l,...t.contexts}}if(o){t.level=o}if(c&&t.type!=="transaction"){t.transaction=c}}function Xs(t,e){const n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:undefined}function Js(t,e){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...e}}function Ks(t,e){t.contexts={trace:xi(e),...t.contexts};t.sdkProcessingMetadata={dynamicSamplingContext:rs(e),...t.sdkProcessingMetadata};const n=Pi(e);const r=Ei(n).description;if(r&&!t.transaction&&t.type==="transaction"){t.transaction=r}}function Vs(t,e){t.fingerprint=t.fingerprint?Te(t.fingerprint):[];if(e){t.fingerprint=t.fingerprint.concat(e)}if(t.fingerprint&&!t.fingerprint.length){delete t.fingerprint}}function Zs(t,e,n,r,i,s){const{normalizeDepth:o=3,normalizeMaxBreadth:c=1e3}=t;const a={...e,event_id:e.event_id||n.event_id||ge(),timestamp:e.timestamp||qt()};const u=n.integrations||t.integrations.map((t=>t.name));Qs(a,t);ro(a,u);if(i){i.emit("applyFrameMetadata",e)}if(e.type===undefined){eo(a,t.stackParser)}const f=so(r,n.captureContext);if(n.mechanism){we(a,n.mechanism)}const l=i?i.getEventProcessors():[];const d=Vr().getScopeData();if(s){const t=s.getScopeData();Ws(d,t)}if(f){const t=f.getScopeData();Ws(d,t)}const h=[...n.attachments||[],...d.attachments];if(h.length){n.attachments=h}Hs(a,d);const p=[...l,...d.eventProcessors];const m=qs(p,a,n);return m.then((t=>{if(t){no(t)}if(typeof o==="number"&&o>0){return io(t,o,c)}return t}))}function Qs(t,e){const{environment:n,release:r,dist:i,maxValueLength:s=250}=e;if(!("environment"in t)){t.environment="environment"in e?n:Qi}if(t.release===undefined&&r!==undefined){t.release=r}if(t.dist===undefined&&i!==undefined){t.dist=i}if(t.message){t.message=v(t.message,s)}const o=t.exception&&t.exception.values&&t.exception.values[0];if(o&&o.value){o.value=v(o.value,s)}const c=t.request;if(c&&c.url){c.url=v(c.url,s)}}const to=new WeakMap;function eo(t,e){const n=M._sentryDebugIds;if(!n){return}let r;const i=to.get(e);if(i){r=i}else{r=new Map;to.set(e,r)}const s=Object.entries(n).reduce(((t,[n,i])=>{let s;const o=r.get(n);if(o){s=o}else{s=e(n);r.set(n,s)}for(let e=s.length-1;e>=0;e--){const n=s[e];if(n.filename){t[n.filename]=i;break}}return t}),{});try{t.exception.values.forEach((t=>{t.stacktrace.frames.forEach((t=>{if(t.filename){t.debug_id=s[t.filename]}}))}))}catch(t){}}function no(t){const e={};try{t.exception.values.forEach((t=>{t.stacktrace.frames.forEach((t=>{if(t.debug_id){if(t.abs_path){e[t.abs_path]=t.debug_id}else if(t.filename){e[t.filename]=t.debug_id}delete t.debug_id}}))}))}catch(t){}if(Object.keys(e).length===0){return}t.debug_meta=t.debug_meta||{};t.debug_meta.images=t.debug_meta.images||[];const n=t.debug_meta.images;Object.entries(e).forEach((([t,e])=>{n.push({type:"sourcemap",code_file:t,debug_id:e})}))}function ro(t,e){if(e.length>0){t.sdk=t.sdk||{};t.sdk.integrations=[...t.sdk.integrations||[],...e]}}function io(t,e,n){if(!t){return null}const r={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map((t=>({...t,...t.data&&{data:Ie(t.data,e,n)}})))},...t.user&&{user:Ie(t.user,e,n)},...t.contexts&&{contexts:Ie(t.contexts,e,n)},...t.extra&&{extra:Ie(t.extra,e,n)}};if(t.contexts&&t.contexts.trace&&r.contexts){r.contexts.trace=t.contexts.trace;if(t.contexts.trace.data){r.contexts.trace.data=Ie(t.contexts.trace.data,e,n)}}if(t.spans){r.spans=t.spans.map((t=>({...t,...t.data&&{data:Ie(t.data,e,n)}})))}return r}function so(t,e){if(!e){return t}const n=t?t.clone():new Pr;n.update(e);return n}function oo(t){if(!t){return undefined}if(co(t)){return{captureContext:t}}if(uo(t)){return{captureContext:t}}return t}function co(t){return t instanceof Pr||typeof t==="function"}const ao=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function uo(t){return Object.keys(t).some((t=>ao.includes(t)))}function fo(t,e){return Jr().captureException(t,oo(e))}function lo(t,e){const n=typeof e==="string"?e:undefined;const r=typeof e!=="string"?{captureContext:e}:undefined;return Jr().captureMessage(t,n,r)}function ho(t,e){return Jr().captureEvent(t,e)}function po(t,e){Kr().setContext(t,e)}function mo(t){Kr().setExtras(t)}function go(t,e){Kr().setExtra(t,e)}function yo(t){Kr().setTags(t)}function bo(t,e){Kr().setTag(t,e)}function vo(t){Kr().setUser(t)}function wo(){return Kr().lastEventId()}function _o(t,e){const n=Jr();const r=ti();if(!r){Tr&&G.warn("Cannot capture check-in. No client defined.")}else if(!r.captureCheckIn){Tr&&G.warn("Cannot capture check-in. Client does not support sending check-ins.")}else{return r.captureCheckIn(t,e,n)}return ge()}function ko(t,e,n){const r=_o({monitorSlug:t,status:"in_progress"},n);const i=Wt();function s(e){_o({monitorSlug:t,status:e,checkInId:r,duration:Wt()-i})}return Qr((()=>{let t;try{t=e()}catch(t){s("error");throw t}if(m(t)){Promise.resolve(t).then((()=>{s("ok")}),(()=>{s("error")}))}else{s("ok")}return t}))}async function So(t){const e=ti();if(e){return e.flush(t)}Tr&&G.warn("Cannot flush events. No client defined.");return Promise.resolve(false)}async function xo(t){const e=ti();if(e){return e.close(t)}Tr&&G.warn("Cannot flush events and disable SDK. No client defined.");return Promise.resolve(false)}function Co(){return!!ti()}function To(){const t=ti();return!!t&&t.getOptions().enabled!==false&&!!t.getTransport()}function Io(t){Kr().addEventProcessor(t)}function Eo(t){const e=ti();const n=Kr();const r=Jr();const{release:i,environment:s=Qi}=e&&e.getOptions()||{};const{userAgent:o}=M.navigator||{};const c=Ar({release:i,environment:s,user:r.getUser()||n.getUser(),...o&&{userAgent:o},...t});const a=n.getSession();if(a&&a.status==="ok"){$r(a,{status:"exited"})}Ao();n.setSession(c);r.setSession(c);return c}function Ao(){const t=Kr();const e=Jr();const n=e.getSession()||t.getSession();if(n){Mr(n)}$o();t.setSession();e.setSession()}function $o(){const t=Kr();const e=Jr();const n=ti();const r=e.getSession()||t.getSession();if(r&&n){n.captureSession(r)}}function Mo(t=false){if(t){Ao();return}$o()}class Ro{constructor(t,e){this._client=t;this.flushTimeout=60;this._pendingAggregates=new Map;this._isEnabled=true;this._intervalId=setInterval((()=>this.flush()),this.flushTimeout*1e3);if(this._intervalId.unref){this._intervalId.unref()}this._sessionAttrs=e}flush(){const t=this.getSessionAggregates();if(t.aggregates.length===0){return}this._pendingAggregates=new Map;this._client.sendSession(t)}getSessionAggregates(){const t=Array.from(this._pendingAggregates.values());const e={attrs:this._sessionAttrs,aggregates:t};return ft(e)}close(){clearInterval(this._intervalId);this._isEnabled=false;this.flush()}incrementSessionStatusCount(){if(!this._isEnabled){return}const t=Kr();const e=t.getRequestSession();if(e&&e.status){this._incrementSessionStatusCount(e.status,new Date);t.setRequestSession(undefined)}}_incrementSessionStatusCount(t,e){const n=new Date(e).setSeconds(0,0);let r=this._pendingAggregates.get(n);if(!r){r={started:new Date(n).toISOString()};this._pendingAggregates.set(n,r)}switch(t){case"errored":r.errored=(r.errored||0)+1;return r.errored;case"ok":r.exited=(r.exited||0)+1;return r.exited;default:r.crashed=(r.crashed||0)+1;return r.crashed}}}const No="7";function Oo(t){const e=t.protocol?`${t.protocol}:`:"";const n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function Do(t){return`${Oo(t)}${t.projectId}/envelope/`}function Lo(t,e){return st({sentry_key:t.publicKey,sentry_version:No,...e&&{sentry_client:`${e.name}/${e.version}`}})}function Fo(t,e,n){return e?e:`${Do(t)}?${Lo(t,n)}`}function Po(t,e){const n=Q(t);if(!n){return""}const r=`${Oo(n)}embed/error-page/`;let i=`dsn=${J(n)}`;for(const t in e){if(t==="dsn"){continue}if(t==="onClose"){continue}if(t==="user"){const t=e.user;if(!t){continue}if(t.name){i+=`&name=${encodeURIComponent(t.name)}`}if(t.email){i+=`&email=${encodeURIComponent(t.email)}`}}else{i+=`&${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`}}return`${r}?${i}`}const jo=[];function Bo(t){const e={};t.forEach((t=>{const{name:n}=t;const r=e[n];if(r&&!r.isDefaultInstance&&t.isDefaultInstance){return}e[n]=t}));return Object.values(e)}function zo(t){const e=t.defaultIntegrations||[];const n=t.integrations;e.forEach((t=>{t.isDefaultInstance=true}));let r;if(Array.isArray(n)){r=[...e,...n]}else if(typeof n==="function"){r=Te(n(e))}else{r=e}const i=Bo(r);const s=i.findIndex((t=>t.name==="Debug"));if(s>-1){const[t]=i.splice(s,1);i.push(t)}return i}function Uo(t,e){const n={};e.forEach((e=>{if(e){Ho(t,e,n)}}));return n}function qo(t,e){for(const n of e){if(n&&n.afterAllSetup){n.afterAllSetup(t)}}}function Ho(t,e,n){if(n[e.name]){Tr&&G.log(`Integration skipped because it was already installed: ${e.name}`);return}n[e.name]=e;if(jo.indexOf(e.name)===-1&&typeof e.setupOnce==="function"){e.setupOnce();jo.push(e.name)}if(e.setup&&typeof e.setup==="function"){e.setup(t)}if(typeof e.preprocessEvent==="function"){const n=e.preprocessEvent.bind(e);t.on("preprocessEvent",((e,r)=>n(e,r,t)))}if(typeof e.processEvent==="function"){const n=e.processEvent.bind(e);const r=Object.assign(((e,r)=>n(e,r,t)),{id:e.name});t.addEventProcessor(r)}Tr&&G.log(`Integration installed: ${e.name}`)}function Wo(t){const e=ti();if(!e){Tr&&G.warn(`Cannot add integration "${t.name}" because no SDK Client is available.`);return}e.addIntegration(t)}function Go(t){return t}const Yo="Not capturing exception because it's already been captured.";class Xo{constructor(t){this._options=t;this._integrations={};this._numProcessing=0;this._outcomes={};this._hooks={};this._eventProcessors=[];if(t.dsn){this._dsn=Q(t.dsn)}else{Tr&&G.warn("No DSN provided, client will not send events.")}if(this._dsn){const e=Fo(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:undefined);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:e})}}captureException(t,e,n){const r=ge();if(Ce(t)){Tr&&G.log(Yo);return r}const i={event_id:r,...e};this._process(this.eventFromException(t,i).then((t=>this._captureEvent(t,i,n))));return i.event_id}captureMessage(t,e,n,r){const i={event_id:ge(),...n};const s=u(t)?t:String(t);const o=f(t)?this.eventFromMessage(s,e,i):this.eventFromException(t,i);this._process(o.then((t=>this._captureEvent(t,i,r))));return i.event_id}captureEvent(t,e,n){const r=ge();if(e&&e.originalException&&Ce(e.originalException)){Tr&&G.log(Yo);return r}const i={event_id:r,...e};const s=t.sdkProcessingMetadata||{};const o=s.capturedSpanScope;this._process(this._captureEvent(t,i,o||n));return i.event_id}captureSession(t){if(!(typeof t.release==="string")){Tr&&G.warn("Discarded session because of missing or non-string release")}else{this.sendSession(t);$r(t,{init:false})}}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const e=this._transport;if(e){this.emit("flush");return this._isClientDoneProcessing(t).then((n=>e.flush(t).then((t=>n&&t))))}else{return Ye(true)}}close(t){return this.flush(t).then((t=>{this.getOptions().enabled=false;this.emit("close");return t}))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){if(this._isEnabled()||this._options.integrations.some((({name:t})=>t.startsWith("Spotlight")))){this._setupIntegrations()}}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const e=this._integrations[t.name];Ho(this,t,this._integrations);if(!e){qo(this,[t])}}sendEvent(t,e={}){this.emit("beforeSendEvent",t,e);let n=ls(t,this._dsn,this._options._metadata,this._options.tunnel);for(const t of e.attachments||[]){n=Pn(n,Yn(t))}const r=this.sendEnvelope(n);if(r){r.then((e=>this.emit("afterSendEvent",t,e)),null)}}sendSession(t){const e=fs(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(e)}recordDroppedEvent(t,e,n){if(this._options.sendClientReports){const r=typeof n==="number"?n:1;const i=`${t}:${e}`;Tr&&G.log(`Recording outcome: "${i}"${r>1?` (${r} times)`:""}`);this._outcomes[i]=(this._outcomes[i]||0)+r}}on(t,e){const n=this._hooks[t]=this._hooks[t]||[];n.push(e);return()=>{const t=n.indexOf(e);if(t>-1){n.splice(t,1)}}}emit(t,...e){const n=this._hooks[t];if(n){n.forEach((t=>t(...e)))}}sendEnvelope(t){this.emit("beforeEnvelope",t);if(this._isEnabled()&&this._transport){return this._transport.send(t).then(null,(t=>{Tr&&G.error("Error while sending event:",t);return t}))}Tr&&G.error("Transport disabled");return Ye({})}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=Uo(this,t);qo(this,t)}_updateSessionFromEvent(t,e){let n=false;let r=false;const i=e.exception&&e.exception.values;if(i){r=true;for(const t of i){const e=t.mechanism;if(e&&e.handled===false){n=true;break}}}const s=t.status==="ok";const o=s&&t.errors===0||s&&n;if(o){$r(t,{...n&&{status:"crashed"},errors:t.errors||Number(r||n)});this.captureSession(t)}}_isClientDoneProcessing(t){return new Je((e=>{let n=0;const r=1;const i=setInterval((()=>{if(this._numProcessing==0){clearInterval(i);e(true)}else{n+=r;if(t&&n>=t){clearInterval(i);e(false)}}}),r)}))}_isEnabled(){return this.getOptions().enabled!==false&&this._transport!==undefined}_prepareEvent(t,e,n,r=Kr()){const i=this.getOptions();const s=Object.keys(this._integrations);if(!e.integrations&&s.length>0){e.integrations=s}this.emit("preprocessEvent",t,e);if(!t.type){r.setLastEventId(t.event_id||e.event_id)}return Zs(i,t,e,n,this,r).then((t=>{if(t===null){return t}const e={...r.getPropagationContext(),...n?n.getPropagationContext():undefined};const i=t.contexts&&t.contexts.trace;if(!i&&e){const{traceId:n,spanId:r,parentSpanId:i,dsc:s}=e;t.contexts={trace:ft({trace_id:n,span_id:r,parent_span_id:i}),...t.contexts};const o=s?s:ns(n,this);t.sdkProcessingMetadata={dynamicSamplingContext:o,...t.sdkProcessingMetadata}}return t}))}_captureEvent(t,e={},n){return this._processEvent(t,e,n).then((t=>t.event_id),(t=>{if(Tr){const e=t;if(e.logLevel==="log"){G.log(e.message)}else{G.warn(e)}}return undefined}))}_processEvent(t,e,n){const r=this.getOptions();const{sampleRate:i}=r;const s=Zo(t);const o=Vo(t);const c=t.type||"error";const a=`before send for type \`${c}\``;const u=typeof i==="undefined"?undefined:cs(i);if(o&&typeof u==="number"&&Math.random()>u){this.recordDroppedEvent("sample_rate","error",t);return Xe(new tt(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"))}const f=c==="replay_event"?"replay":c;const l=t.sdkProcessingMetadata||{};const d=l.capturedSpanIsolationScope;return this._prepareEvent(t,e,n,d).then((n=>{if(n===null){this.recordDroppedEvent("event_processor",f,t);throw new tt("An event processor returned `null`, will not send event.","log")}const i=e.data&&e.data.__sentry__===true;if(i){return n}const s=Ko(this,r,n,e);return Jo(s,a)})).then((r=>{if(r===null){this.recordDroppedEvent("before_send",f,t);if(s){const e=t.spans||[];const n=1+e.length;this.recordDroppedEvent("before_send","span",n)}throw new tt(`${a} returned \`null\`, will not send event.`,"log")}const i=n&&n.getSession();if(!s&&i){this._updateSessionFromEvent(i,r)}if(s){const t=r.sdkProcessingMetadata&&r.sdkProcessingMetadata.spanCountBeforeProcessing||0;const e=r.spans?r.spans.length:0;const n=t-e;if(n>0){this.recordDroppedEvent("before_send","span",n)}}const o=r.transaction_info;if(s&&o&&r.transaction!==t.transaction){const t="custom";r.transaction_info={...o,source:t}}this.sendEvent(r,e);return r})).then(null,(t=>{if(t instanceof tt){throw t}this.captureException(t,{data:{__sentry__:true},originalException:t});throw new tt(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${t}`)}))}_process(t){this._numProcessing++;void t.then((t=>{this._numProcessing--;return t}),(t=>{this._numProcessing--;return t}))}_clearOutcomes(){const t=this._outcomes;this._outcomes={};return Object.entries(t).map((([t,e])=>{const[n,r]=t.split(":");return{reason:n,category:r,quantity:e}}))}_flushOutcomes(){Tr&&G.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){Tr&&G.log("No outcomes to send");return}if(!this._dsn){Tr&&G.log("No dsn provided, will not send outcomes");return}Tr&&G.log("Sending outcomes:",t);const e=Zn(t,this._options.tunnel&&J(this._dsn));this.sendEnvelope(e)}}function Jo(t,e){const n=`${e} must return \`null\` or a valid event.`;if(m(t)){return t.then((t=>{if(!l(t)&&t!==null){throw new tt(n)}return t}),(t=>{throw new tt(`${e} rejected with ${t}`)}))}else if(!l(t)&&t!==null){throw new tt(n)}return t}function Ko(t,e,n,r){const{beforeSend:i,beforeSendTransaction:s,beforeSendSpan:o}=e;if(Vo(n)&&i){return i(n,r)}if(Zo(n)){if(n.spans&&o){const e=[];for(const r of n.spans){const n=o(r);if(n){e.push(n)}else{t.recordDroppedEvent("before_send","span")}}n.spans=e}if(s){if(n.spans){const t=n.spans.length;n.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:t}}return s(n,r)}}return n}function Vo(t){return t.type===undefined}function Zo(t){return t.type==="transaction"}function Qo(t,e,n,r,i){const s={sent_at:(new Date).toISOString()};if(n&&n.sdk){s.sdk={name:n.sdk.name,version:n.sdk.version}}if(!!r&&!!i){s.dsn=J(i)}if(e){s.trace=ft(e)}const o=tc(t);return Fn(s,[o])}function tc(t){const e={type:"check_in"};return[e,t]}class ec extends Xo{constructor(t){Ui();super(t)}eventFromException(t,e){return Ye(lr(this,this._options.stackParser,t,e))}eventFromMessage(t,e="info",n){return Ye(dr(this._options.stackParser,t,e,n,this._options.attachStacktrace))}captureException(t,e,n){if(this._options.autoSessionTracking&&this._sessionFlusher){const t=Kr().getRequestSession();if(t&&t.status==="ok"){t.status="errored"}}return super.captureException(t,e,n)}captureEvent(t,e,n){if(this._options.autoSessionTracking&&this._sessionFlusher){const e=t.type||"exception";const n=e==="exception"&&t.exception&&t.exception.values&&t.exception.values.length>0;if(n){const t=Kr().getRequestSession();if(t&&t.status==="ok"){t.status="errored"}}}return super.captureEvent(t,e,n)}close(t){if(this._sessionFlusher){this._sessionFlusher.close()}return super.close(t)}initSessionFlusher(){const{release:t,environment:e}=this._options;if(!t){Tr&&G.warn("Cannot initialise an instance of SessionFlusher if no release is provided!")}else{this._sessionFlusher=new Ro(this,{release:t,environment:e})}}captureCheckIn(t,e,n){const r="checkInId"in t&&t.checkInId?t.checkInId:ge();if(!this._isEnabled()){Tr&&G.warn("SDK not enabled, will not capture checkin.");return r}const i=this.getOptions();const{release:s,environment:o,tunnel:c}=i;const a={check_in_id:r,monitor_slug:t.monitorSlug,status:t.status,release:s,environment:o};if("duration"in t){a.duration=t.duration}if(e){a.monitor_config={schedule:e.schedule,checkin_margin:e.checkinMargin,max_runtime:e.maxRuntime,timezone:e.timezone,failure_issue_threshold:e.failureIssueThreshold,recovery_threshold:e.recoveryThreshold}}const[u,f]=this._getTraceInfoFromScope(n);if(f){a.contexts={trace:f}}const l=Qo(a,u,this.getSdkMetadata(),c,this.getDsn());Tr&&G.info("Sending checkin:",t.monitorSlug,t.status);this.sendEnvelope(l);return r}_captureRequestSession(){if(!this._sessionFlusher){Tr&&G.warn("Discarded request mode session because autoSessionTracking option was disabled")}else{this._sessionFlusher.incrementSessionStatusCount()}}_prepareEvent(t,e,n,r){if(this._options.platform){t.platform=t.platform||this._options.platform}if(this._options.runtime){t.contexts={...t.contexts,runtime:(t.contexts||{}).runtime||this._options.runtime}}if(this._options.serverName){t.server_name=t.server_name||this._options.serverName}return super._prepareEvent(t,e,n,r)}_getTraceInfoFromScope(t){if(!t){return[undefined,undefined]}const e=Dr(t);if(e){const t=Pi(e);const n=rs(t);return[n,xi(t)]}const{traceId:n,spanId:r,parentSpanId:i,dsc:s}=t.getPropagationContext();const o={trace_id:n,span_id:r,parent_span_id:i};if(s){return[s,o]}return[ns(n,this),o]}}function nc(t,e){if(e.debug===true){if(Tr){G.enable()}else{H((()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")}))}}const n=Jr();n.update(e.initialScope);const r=new t(e);rc(r);r.init();return r}function rc(t){Jr().setClient(t)}const ic=64;function sc(t,e,n=Ke(t.bufferSize||ic)){let r={};const i=t=>n.drain(t);function s(i){const s=[];jn(i,((e,n)=>{const i=Jn(n);if(nr(r,i)){const r=oc(e,n);t.recordDroppedEvent("ratelimit_backoff",i,r)}else{s.push(e)}}));if(s.length===0){return Ye({})}const o=Fn(i[0],s);const c=e=>{jn(o,((n,r)=>{const i=oc(n,r);t.recordDroppedEvent(e,Jn(r),i)}))};const a=()=>e({body:qn(o)}).then((t=>{if(t.statusCode!==undefined&&(t.statusCode<200||t.statusCode>=300)){Tr&&G.warn(`Sentry responded with status code ${t.statusCode} to sent event.`)}r=rr(r,t);return t}),(t=>{c("network_error");throw t}));return n.add(a).then((t=>t),(t=>{if(t instanceof tt){Tr&&G.error("Skipped sending event because buffer is full.");c("queue_overflow");return Ye({})}else{throw t}}))}return{send:s,flush:i}}function oc(t,e){if(e!=="event"&&e!=="transaction"){return undefined}return Array.isArray(t)?t[1]:undefined}const cc=100;const ac=5e3;const uc=36e5;function fc(t){function e(...t){Tr&&G.info("[Offline]:",...t)}return n=>{const r=t(n);if(!n.createStore){throw new Error("No `createStore` function was provided")}const i=n.createStore(n);let s=ac;let o;function c(t,e,r){if(Bn(t,["client_report"])){return false}if(n.shouldStore){return n.shouldStore(t,e,r)}return true}function a(t){if(o){clearTimeout(o)}o=setTimeout((async()=>{o=undefined;const t=await i.shift();if(t){e("Attempting to send previously queued event");t[0].sent_at=(new Date).toISOString();void f(t,true).catch((t=>{e("Failed to retry sending",t)}))}}),t);if(typeof o!=="number"&&o.unref){o.unref()}}function u(){if(o){return}a(s);s=Math.min(s*2,uc)}async function f(t,n=false){if(!n&&Bn(t,["replay_event","replay_recording"])){await i.push(t);a(cc);return{}}try{const e=await r.send(t);let n=cc;if(e){if(e.headers&&e.headers["retry-after"]){n=tr(e.headers["retry-after"])}else if(e.headers&&e.headers["x-sentry-rate-limits"]){n=6e4}else if((e.statusCode||0)>=400){return e}}a(n);s=ac;return e}catch(r){if(await c(t,r,s)){if(n){await i.unshift(t)}else{await i.push(t)}u();e("Error sending. Event queued.",r);return{}}else{throw r}}}if(n.flushAtStartup){u()}return{send:f,flush:t=>r.flush(t)}}}function lc(t,e){let n;jn(t,((t,r)=>{if(e.includes(r)){n=Array.isArray(t)?t[1]:undefined}return!!n}));return n}function dc(t,e){return n=>{const r=t(n);return{...r,send:async t=>{const n=lc(t,["event","transaction","profile","replay_event"]);if(n){n.release=e}return r.send(t)}}}}function hc(t,e){return Fn(e?{...t[0],dsn:e}:t[0],t[1])}function pc(t,e){return n=>{const r=t(n);const i=new Map;function s(e,r){const s=r?`${e}:${r}`:e;let o=i.get(s);if(!o){const c=K(e);if(!c){return undefined}const a=Fo(c,n.tunnel);o=r?dc(t,r)({...n,url:a}):t({...n,url:a});i.set(s,o)}return[e,o]}async function o(t){function n(e){const n=e&&e.length?e:["event"];return lc(t,n)}const i=e({envelope:t,getEvent:n}).map((t=>{if(typeof t==="string"){return s(t,undefined)}else{return s(t.dsn,t.release)}})).filter((t=>!!t));const o=i.length?i:[["",r]];const c=await Promise.all(o.map((([e,n])=>n.send(hc(t,e)))));return c[0]}async function c(t){const e=[...i.values(),r];const n=await Promise.all(e.map((e=>e.flush(t))));return n.every((t=>t))}return{send:o,flush:c}}}function mc(t,e){const n=e&&e.getDsn();const r=e&&e.getOptions().tunnel;return yc(t,n)||gc(t,r)}function gc(t,e){if(!e){return false}return bc(t)===bc(e)}function yc(t,e){return e?t.includes(e.host):false}function bc(t){return t[t.length-1]==="/"?t.slice(0,-1):t}function vc(t,...e){const n=new String(String.raw(t,...e));n.__sentry_template_string__=t.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s");n.__sentry_template_values__=e;return n}function wc(t,e,n=[e],r="npm"){const i=t._metadata||{};if(!i.sdk){i.sdk={name:`sentry.javascript.${e}`,packages:n.map((t=>({name:`${r}:@sentry/${t}`,version:$}))),version:$}}t._metadata=i}function _c(){const t=Ir();const e=Xr(t);if(e.getTraceData){return e.getTraceData()}const n=ti();const r=Jr();const i=ji();const{dsc:s,sampled:o,traceId:c}=r.getPropagationContext();const a=i&&Pi(i);const u=i?Ci(i):Ln(c,undefined,o);const f=a?rs(a):s?s:n?ns(c,n):undefined;const l=An(f);const d=Nn.test(u);if(!d){G.warn("Invalid sentry-trace data. Cannot generate trace data");return{}}const h=kc(l);if(!h){G.warn('Invalid baggage data. Not returning "baggage" value')}return{"sentry-trace":u,...h&&{baggage:l}}}function kc(t){if(!t||!t.length){return false}const e="[-!#$%&'*+.^_`|~A-Za-z0-9]+";const n="[!#-+-./0-9:<=>?@A-Z\\[\\]a-z{-}]+";const r="\\s*";const i=new RegExp(`^${e}${r}=${r}${n}(${r},${r}${e}${r}=${r}${n})*$`);return i.test(t)}function Sc(){return Object.entries(_c()).map((([t,e])=>`<meta name="${t}" content="${e}"/>`)).join("\n")}const xc=100;function Cc(t,e){const n=ti();const r=Kr();if(!n)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:s=xc}=n.getOptions();if(s<=0)return;const o=qt();const c={timestamp:o,...t};const a=i?H((()=>i(c,e))):c;if(a===null)return;if(n.emit){n.emit("beforeAddBreadcrumb",a,e)}r.addBreadcrumb(a,s)}let Tc;const Ic="FunctionToString";const Ec=new WeakMap;const Ac=()=>({name:Ic,setupOnce(){Tc=Function.prototype.toString;try{Function.prototype.toString=function(...t){const e=it(this);const n=Ec.has(ti())&&e!==undefined?e:this;return Tc.apply(n,t)}}catch(t){}},setup(t){Ec.set(t,true)}});const $c=Go(Ac);const Mc=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",'can\'t redefine non-configurable property "solana"',"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler"];const Rc="InboundFilters";const Nc=(t={})=>({name:Rc,processEvent(e,n,r){const i=r.getOptions();const s=Dc(t,i);return Lc(e,s)?null:e}});const Oc=Go(Nc);function Dc(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:Mc],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[]],ignoreInternal:t.ignoreInternal!==undefined?t.ignoreInternal:true}}function Lc(t,e){if(e.ignoreInternal&&Uc(t)){Tr&&G.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${be(t)}`);return true}if(Fc(t,e.ignoreErrors)){Tr&&G.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${be(t)}`);return true}if(Wc(t)){Tr&&G.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${be(t)}`);return true}if(Pc(t,e.ignoreTransactions)){Tr&&G.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${be(t)}`);return true}if(jc(t,e.denyUrls)){Tr&&G.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${be(t)}.\nUrl: ${Hc(t)}`);return true}if(!Bc(t,e.allowUrls)){Tr&&G.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${be(t)}.\nUrl: ${Hc(t)}`);return true}return false}function Fc(t,e){if(t.type||!e||!e.length){return false}return zc(t).some((t=>S(t,e)))}function Pc(t,e){if(t.type!=="transaction"||!e||!e.length){return false}const n=t.transaction;return n?S(n,e):false}function jc(t,e){if(!e||!e.length){return false}const n=Hc(t);return!n?false:S(n,e)}function Bc(t,e){if(!e||!e.length){return true}const n=Hc(t);return!n?true:S(n,e)}function zc(t){const e=[];if(t.message){e.push(t.message)}let n;try{n=t.exception.values[t.exception.values.length-1]}catch(t){}if(n){if(n.value){e.push(n.value);if(n.type){e.push(`${n.type}: ${n.value}`)}}}return e}function Uc(t){try{return t.exception.values[0].type==="SentryError"}catch(t){}return false}function qc(t=[]){for(let e=t.length-1;e>=0;e--){const n=t[e];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]"){return n.filename||null}}return null}function Hc(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch(t){}return e?qc(e):null}catch(e){Tr&&G.error(`Cannot extract url for event ${be(t)}`);return null}}function Wc(t){if(t.type){return false}if(!t.exception||!t.exception.values||t.exception.values.length===0){return false}return!t.message&&!t.exception.values.some((t=>t.stacktrace||t.type&&t.type!=="Error"||t.value))}const Gc="cause";const Yc=5;const Xc="LinkedErrors";const Jc=(t={})=>{const e=t.limit||Yc;const n=t.key||Gc;return{name:Xc,preprocessEvent(t,r,i){const s=i.getOptions();x(or,s.stackParser,s.maxValueLength,n,e,t,r)}}};const Kc=Go(Jc);const Vc=new Map;const Zc=new Set;function Qc(t){if(!M._sentryModuleMetadata){return}for(const e of Object.keys(M._sentryModuleMetadata)){const n=M._sentryModuleMetadata[e];if(Zc.has(e)){continue}Zc.add(e);const r=t(e);for(const t of r.reverse()){if(t.filename){Vc.set(t.filename,n);break}}}}function ta(t,e){Qc(t);return Vc.get(e)}function ea(t,e){try{e.exception.values.forEach((e=>{if(!e.stacktrace){return}for(const n of e.stacktrace.frames||[]){if(!n.filename||n.module_metadata){continue}const e=ta(t,n.filename);if(e){n.module_metadata=e}}}))}catch(t){}}function na(t){try{t.exception.values.forEach((t=>{if(!t.stacktrace){return}for(const e of t.stacktrace.frames||[]){delete e.module_metadata}}))}catch(t){}}const ra=Go((()=>({name:"ModuleMetadata",setup(t){t.on("beforeEnvelope",(t=>{jn(t,((t,e)=>{if(e==="event"){const e=Array.isArray(t)?t[1]:undefined;if(e){na(e);t[1]=e}}}))}));t.on("applyFrameMetadata",(e=>{if(e.type){return}const n=t.getOptions().stackParser;ea(n,e)}))}})));const ia={include:{cookies:true,data:true,headers:true,ip:false,query_string:true,url:true,user:{id:true,username:true,email:true}},transactionNamingScheme:"methodPath"};const sa="RequestData";const oa=(t={})=>{const e={...ia,...t,include:{...ia.include,...t.include,user:t.include&&typeof t.include.user==="boolean"?t.include.user:{...ia.include.user,...(t.include||{}).user}}};return{name:sa,processEvent(t){const{sdkProcessingMetadata:n={}}=t;const r=n.request;if(!r){return t}const i=aa(e);return pn(t,r,i)}}};const ca=Go(oa);function aa(t){const{transactionNamingScheme:e,include:{ip:n,user:r,...i}}=t;const s=["method"];for(const[t,e]of Object.entries(i)){if(e){s.push(t)}}let o;if(r===undefined){o=true}else if(typeof r==="boolean"){o=r}else{const t=[];for(const[e,n]of Object.entries(r)){if(n){t.push(e)}}o=t}return{include:{ip:n,user:o,request:s.length!==0?s:undefined,transaction:e}}}const ua="CaptureConsole";const fa=(t={})=>{const e=t.levels||U;return{name:ua,setup(t){if(!("console"in M)){return}Mt((({args:n,level:r})=>{if(ti()!==t||!e.includes(r)){return}da(n,r)}))}}};const la=Go(fa);function da(t,e){const n={level:vn(e),extra:{arguments:t}};Zr((r=>{r.addEventProcessor((t=>{t.logger="console";we(t,{handled:false,type:"console"});return t}));if(e==="assert"){if(!t[0]){const e=`Assertion failed: ${_(t.slice(1)," ")||"console.assert"}`;r.setExtra("arguments",t.slice(1));lo(e,n)}return}const i=t.find((t=>t instanceof Error));if(i){fo(i,n);return}const s=_(t," ");lo(s,n)}))}const ha="Debug";const pa=(t={})=>{const e={debugger:false,stringify:false,...t};return{name:ha,setup(t){t.on("beforeSendEvent",((t,n)=>{if(e.debugger){debugger}H((()=>{if(e.stringify){console.log(JSON.stringify(t,null,2));if(n&&Object.keys(n).length){console.log(JSON.stringify(n,null,2))}}else{console.log(t);if(n&&Object.keys(n).length){console.log(n)}}}))}))}}};const ma=Go(pa);const ga="Dedupe";const ya=()=>{let t;return{name:ga,processEvent(e){if(e.type){return e}try{if(va(e,t)){Tr&&G.warn("Event dropped due to being a duplicate of previously captured event.");return null}}catch(t){}return t=e}}};const ba=Go(ya);function va(t,e){if(!e){return false}if(wa(t,e)){return true}if(_a(t,e)){return true}return false}function wa(t,e){const n=t.message;const r=e.message;if(!n&&!r){return false}if(n&&!r||!n&&r){return false}if(n!==r){return false}if(!Sa(t,e)){return false}if(!ka(t,e)){return false}return true}function _a(t,e){const n=xa(e);const r=xa(t);if(!n||!r){return false}if(n.type!==r.type||n.value!==r.value){return false}if(!Sa(t,e)){return false}if(!ka(t,e)){return false}return true}function ka(t,e){let n=xt(t);let r=xt(e);if(!n&&!r){return true}if(n&&!r||!n&&r){return false}n=n;r=r;if(r.length!==n.length){return false}for(let t=0;t<r.length;t++){const e=r[t];const i=n[t];if(e.filename!==i.filename||e.lineno!==i.lineno||e.colno!==i.colno||e.function!==i.function){return false}}return true}function Sa(t,e){let n=t.fingerprint;let r=e.fingerprint;if(!n&&!r){return true}if(n&&!r||!n&&r){return false}n=n;r=r;try{return!!(n.join("")===r.join(""))}catch(t){return false}}function xa(t){return t.exception&&t.exception.values&&t.exception.values[0]}const Ca="ExtraErrorData";const Ta=(t={})=>{const{depth:e=3,captureErrorCause:n=true}=t;return{name:Ca,processEvent(t,r,i){const{maxValueLength:s=250}=i.getOptions();return Ea(t,r,e,n,s)}}};const Ia=Go(Ta);function Ea(t,e={},n,i,s){if(!e.originalException||!r(e.originalException)){return t}const o=e.originalException.name||e.originalException.constructor.name;const c=Aa(e.originalException,i,s);if(c){const e={...t.contexts};const r=Ie(c,n);if(l(r)){nt(r,"__sentry_skip_normalization__",true);e[o]=r}return{...t,contexts:e}}return t}function Aa(t,e,n){try{const i=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"];const s={};for(const e of Object.keys(t)){if(i.indexOf(e)!==-1){continue}const o=t[e];s[e]=r(o)||typeof o==="string"?v(`${o}`,n):o}if(e&&t.cause!==undefined){s.cause=r(t.cause)?t.cause.toString():t.cause}if(typeof t.toJSON==="function"){const e=t.toJSON();for(const t of Object.keys(e)){const n=e[t];s[t]=r(n)?n.toString():n}}return s}catch(t){Tr&&G.error("Unable to extract extra data from the Error object:",t)}return null}const $a="RewriteFrames";const Ma=Go(((t={})=>{const e=t.root;const n=t.prefix||"app:///";const r="window"in M&&M.window!==undefined;const i=t.iteratee||Ra({isBrowser:r,root:e,prefix:n});function s(t){try{return{...t,exception:{...t.exception,values:t.exception.values.map((t=>({...t,...t.stacktrace&&{stacktrace:o(t.stacktrace)}})))}}}catch(e){return t}}function o(t){return{...t,frames:t&&t.frames&&t.frames.map((t=>i(t)))}}return{name:$a,processEvent(t){let e=t;if(t.exception&&Array.isArray(t.exception.values)){e=s(e)}return e}}}));function Ra({isBrowser:t,root:e,prefix:n}){return r=>{if(!r.filename){return r}const i=/^[a-zA-Z]:\\/.test(r.filename)||r.filename.includes("\\")&&!r.filename.includes("/");const s=/^\//.test(r.filename);if(t){if(e){const t=r.filename;if(t.indexOf(e)===0){r.filename=t.replace(e,n)}}}else{if(i||s){const t=i?r.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):r.filename;const s=e?Be(e,t):We(t);r.filename=`${n}${s}`}}return r}}const Na="SessionTiming";const Oa=()=>{const t=Wt()*1e3;return{name:Na,processEvent(e){const n=Wt()*1e3;return{...e,extra:{...e.extra,["session:start"]:t,["session:duration"]:n-t,["session:end"]:n}}}}};const Da=Go(Oa);const La=10;const Fa="ZodErrors";function Pa(t){return r(t)&&t.name==="ZodError"&&Array.isArray(t.errors)}function ja(t){return{...t,path:"path"in t&&Array.isArray(t.path)?t.path.join("."):undefined,keys:"keys"in t?JSON.stringify(t.keys):undefined,unionErrors:"unionErrors"in t?JSON.stringify(t.unionErrors):undefined}}function Ba(t){const e=new Set;for(const n of t.issues){if(n.path&&n.path[0]){e.add(n.path[0])}}const n=Array.from(e);return`Failed to validate keys: ${v(n.join(", "),100)}`}function za(t,e,n){if(!e.exception||!e.exception.values||!n||!n.originalException||!Pa(n.originalException)||n.originalException.issues.length===0){return e}return{...e,exception:{...e.exception,values:[{...e.exception.values[0],value:Ba(n.originalException)},...e.exception.values.slice(1)]},extra:{...e.extra,"zoderror.issues":n.originalException.errors.slice(0,t).map(ja)}}}const Ua=(t={})=>{const e=t.limit||La;return{name:Fa,processEvent(t,n){const r=za(e,t,n);return r}}};const qa=Go(Ua);const Ha=Go((t=>({name:"ThirdPartyErrorsFilter",setup(t){t.on("beforeEnvelope",(t=>{jn(t,((t,e)=>{if(e==="event"){const e=Array.isArray(t)?t[1]:undefined;if(e){na(e);t[1]=e}}}))}));t.on("applyFrameMetadata",(e=>{if(e.type){return}const n=t.getOptions().stackParser;ea(n,e)}))},processEvent(e){const n=Wa(e);if(n){const r=t.behaviour==="drop-error-if-contains-third-party-frames"||t.behaviour==="apply-tag-if-contains-third-party-frames"?"some":"every";const i=n[r]((e=>!e.some((e=>t.filterKeys.includes(e)))));if(i){const n=t.behaviour==="drop-error-if-contains-third-party-frames"||t.behaviour==="drop-error-if-exclusively-contains-third-party-frames";if(n){return null}else{e.tags={...e.tags,third_party_code:true}}}}return e}})));function Wa(t){const e=xt(t);if(!e){return undefined}return e.filter((t=>!!t.filename)).map((t=>{if(t.module_metadata){return Object.keys(t.module_metadata).filter((t=>t.startsWith(Ga))).map((t=>t.slice(Ga.length)))}return[]}))}const Ga="_sentryBundlerPluginAppKey:";const Ya="c";const Xa="g";const Ja="s";const Ka="d";const Va=5e3;const Za=1e4;const Qa=1e4;function tu(t,e){const n=R("globalMetricsAggregators",(()=>new WeakMap));const r=n.get(t);if(r){return r}const i=new e(t);t.on("flush",(()=>i.flush()));t.on("close",(()=>i.close()));n.set(t,i);return i}function eu(t,e,n,r,i={}){const s=i.client||ti();if(!s){return}const o=ji();const c=o?Pi(o):undefined;const a=c&&Ei(c).description;const{unit:u,tags:f,timestamp:l}=i;const{release:d,environment:h}=s.getOptions();const p={};if(d){p.release=d}if(h){p.environment=h}if(a){p.transaction=a}Tr&&G.log(`Adding value of ${r} to ${e} metric ${n}`);const m=tu(s,t);m.add(e,n,r,u,{...p,...f},l)}function nu(t,e,n=1,r){eu(t,Ya,e,au(n),r)}function ru(t,e,n,r){eu(t,Ka,e,au(n),r)}function iu(t,e,n,r="second",i){if(typeof n==="function"){const r=Wt();return Ss({op:"metrics.timing",name:e,startTime:r,onlyIfParent:true},(s=>Vi((()=>n()),(()=>{}),(()=>{const n=Wt();const o=n-r;ru(t,e,o,{...i,unit:"second"});s.end(n)}))))}ru(t,e,n,{...i,unit:r})}function su(t,e,n,r){eu(t,Ja,e,n,r)}function ou(t,e,n,r){eu(t,Xa,e,au(n),r)}const cu={increment:nu,distribution:ru,set:su,gauge:ou,timing:iu,getMetricsAggregatorForClient:tu};function au(t){return typeof t==="string"?parseInt(t):t}function uu(t){return!!t&&typeof t["_profiler"]!=="undefined"&&typeof t["_profiler"]["start"]==="function"&&typeof t["_profiler"]["stop"]==="function"}function fu(){const t=ti();if(!t){Tr&&G.warn("No Sentry client available, profiling is not started");return}const e=t.getIntegrationByName("ProfilingIntegration");if(!e){Tr&&G.warn("ProfilingIntegration is not available");return}if(!uu(e)){Tr&&G.warn("Profiler is not available on profiling integration.");return}e._profiler.start()}function lu(){const t=ti();if(!t){Tr&&G.warn("No Sentry client available, profiling is not started");return}const e=t.getIntegrationByName("ProfilingIntegration");if(!e){Tr&&G.warn("ProfilingIntegration is not available");return}if(!uu(e)){Tr&&G.warn("Profiler is not available on profiling integration.");return}e._profiler.stop()}const du={startProfiler:fu,stopProfiler:lu};function hu(t,e,n,r){const i=Object.entries(ft(r)).sort(((t,e)=>t[0].localeCompare(e[0])));return`${t}${e}${n}${i}`}function pu(t){let e=0;for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);e=(e<<5)-e+r;e&=e}return e>>>0}function mu(t){let e="";for(const n of t){const t=Object.entries(n.tags);const r=t.length>0?`|#${t.map((([t,e])=>`${t}:${e}`)).join(",")}`:"";e+=`${n.name}@${n.unit}:${n.metric}|${n.metricType}${r}|T${n.timestamp}\n`}return e}function gu(t){return t.replace(/[^\w]+/gi,"_")}function yu(t){return t.replace(/[^\w\-.]+/gi,"_")}function bu(t){return t.replace(/[^\w\-./]+/gi,"")}const vu=[["\n","\\n"],["\r","\\r"],["\t","\\t"],["\\","\\\\"],["|","\\u{7c}"],[",","\\u{2c}"]];function wu(t){for(const[e,n]of vu){if(t===e){return n}}return t}function _u(t){return[...t].reduce(((t,e)=>t+wu(e)),"")}function ku(t){const e={};for(const n in t){if(Object.prototype.hasOwnProperty.call(t,n)){const r=bu(n);e[r]=_u(String(t[n]))}}return e}function Su(t,e){G.log(`Flushing aggregated metrics, number of metrics: ${e.length}`);const n=t.getDsn();const r=t.getSdkMetadata();const i=t.getOptions().tunnel;const s=xu(e,n,r,i);t.sendEnvelope(s)}function xu(t,e,n,r){const i={sent_at:(new Date).toISOString()};if(n&&n.sdk){i.sdk={name:n.sdk.name,version:n.sdk.version}}if(!!r&&e){i.dsn=J(e)}const s=Cu(t);return Fn(i,[s])}function Cu(t){const e=mu(t);const n={type:"statsd",length:e.length};return[n,e]}class Tu{constructor(t){this._value=t}get weight(){return 1}add(t){this._value+=t}toString(){return`${this._value}`}}class Iu{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;if(t<this._min){this._min=t}if(t>this._max){this._max=t}this._sum+=t;this._count++}toString(){return`${this._last}:${this._min}:${this._max}:${this._sum}:${this._count}`}}class Eu{constructor(t){this._value=[t]}get weight(){return this._value.length}add(t){this._value.push(t)}toString(){return this._value.join(":")}}class Au{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"?pu(t):t)).join(":")}}const $u={[Ya]:Tu,[Xa]:Iu,[Ka]:Eu,[Ja]:Au};class Mu{constructor(t){this._client=t;this._buckets=new Map;this._bucketsTotalWeight=0;this._interval=setInterval((()=>this._flush()),Za);if(this._interval.unref){this._interval.unref()}this._flushShift=Math.floor(Math.random()*Za/1e3);this._forceFlush=false}add(t,e,n,r="none",i={},s=Wt()){const o=Math.floor(s);const c=yu(e);const a=ku(i);const u=gu(r);const f=hu(t,c,u,a);let l=this._buckets.get(f);const d=l&&t===Ja?l.metric.weight:0;if(l){l.metric.add(n);if(l.timestamp<o){l.timestamp=o}}else{l={metric:new $u[t](n),timestamp:o,metricType:t,name:c,unit:u,tags:a};this._buckets.set(f,l)}const h=typeof n==="string"?l.metric.weight-d:n;Bi(t,c,h,u,i,f);this._bucketsTotalWeight+=l.metric.weight;if(this._bucketsTotalWeight>=Qa){this.flush()}}flush(){this._forceFlush=true;this._flush()}close(){this._forceFlush=true;clearInterval(this._interval);this._flush()}_flush(){if(this._forceFlush){this._forceFlush=false;this._bucketsTotalWeight=0;this._captureMetrics(this._buckets);this._buckets.clear();return}const t=Math.floor(Wt())-Za/1e3-this._flushShift;const e=new Map;for(const[n,r]of this._buckets){if(r.timestamp<=t){e.set(n,r);this._bucketsTotalWeight-=r.metric.weight}}for(const[t]of e){this._buckets.delete(t)}this._captureMetrics(e)}_captureMetrics(t){if(t.size>0){const e=Array.from(t).map((([,t])=>t));Su(this._client,e)}}}function Ru(t,e=1,n){cu.increment(Mu,t,e,n)}function Nu(t,e,n){cu.distribution(Mu,t,e,n)}function Ou(t,e,n){cu.set(Mu,t,e,n)}function Du(t,e,n){cu.gauge(Mu,t,e,n)}function Lu(t,e,n="second",r){return cu.timing(Mu,t,e,n,r)}function Fu(t){return cu.getMetricsAggregatorForClient(t,Mu)}const Pu={increment:Ru,distribution:Nu,set:Ou,gauge:Du,timing:Lu,getMetricsAggregatorForClient:Fu};class ju{constructor(t){this._client=t;this._buckets=new Map;this._interval=setInterval((()=>this.flush()),Va)}add(t,e,n,r="none",i={},s=Wt()){const o=Math.floor(s);const c=yu(e);const a=ku(i);const u=gu(r);const f=hu(t,c,u,a);let l=this._buckets.get(f);const d=l&&t===Ja?l.metric.weight:0;if(l){l.metric.add(n);if(l.timestamp<o){l.timestamp=o}}else{l={metric:new $u[t](n),timestamp:o,metricType:t,name:c,unit:u,tags:a};this._buckets.set(f,l)}const h=typeof n==="string"?l.metric.weight-d:n;Bi(t,c,h,u,i,f)}flush(){if(this._buckets.size===0){return}const t=Array.from(this._buckets.values());Su(this._client,t);this._buckets.clear()}close(){clearInterval(this._interval);this.flush()}}function Bu(t,e,n,r,i="auto.http.browser"){if(!t.fetchData){return undefined}const s=Ji()&&e(t.fetchData.url);if(t.endTimestamp&&s){const e=t.fetchData.__span;if(!e)return;const n=r[e];if(n){qu(n,t);delete r[e]}return undefined}const o=Jr();const c=ti();const{method:a,url:u}=t.fetchData;const f=Uu(u);const l=f?Ze(f).host:undefined;const d=!!ji();const h=s&&d?xs({name:`${a} ${u}`,attributes:{url:u,type:"fetch","http.method":a,"http.url":f,"server.address":l,[ci]:i,[oi]:"http.client"}}):new Ki;t.fetchData.__span=h.spanContext().spanId;r[h.spanContext().spanId]=h;if(n(t.fetchData.url)&&c){const e=t.args[0];t.args[1]=t.args[1]||{};const n=t.args[1];n.headers=zu(e,c,o,n,Ji()&&d?h:undefined)}return h}function zu(t,e,n,r,i){const s=Kr();const{traceId:o,spanId:c,sampled:a,dsc:u}={...s.getPropagationContext(),...n.getPropagationContext()};const f=i?Ci(i):Ln(o,c,a);const l=An(u||(i?rs(i):ns(o,e)));const d=r.headers||(typeof Request!=="undefined"&&y(t,Request)?t.headers:undefined);if(!d){return{"sentry-trace":f,baggage:l}}else if(typeof Headers!=="undefined"&&y(d,Headers)){const t=new Headers(d);t.append("sentry-trace",f);if(l){t.append(xn,l)}return t}else if(Array.isArray(d)){const t=[...d,["sentry-trace",f]];if(l){t.push([xn,l])}return t}else{const t="baggage"in d?d.baggage:undefined;const e=[];if(Array.isArray(t)){e.push(...t)}else if(t){e.push(t)}if(l){e.push(l)}return{...d,"sentry-trace":f,baggage:e.length>0?e.join(","):undefined}}}function Uu(t){try{const e=new URL(t);return e.href}catch(t){return undefined}}function qu(t,e){if(e.response){wi(t,e.response.status);const n=e.response&&e.response.headers&&e.response.headers.get("content-length");if(n){const e=parseInt(n);if(e>0){t.setAttribute("http.response_content_length",e)}}}else if(e.error){t.setStatus({code:bi,message:"internal_error"})}t.end()}const Hu={mechanism:{handled:false,data:{function:"trpcMiddleware"}}};function Wu(t={}){return function(e){const{path:n,type:r,next:i,rawInput:s}=e;const o=ti();const c=o&&o.getOptions();const a={procedure_type:r};if(t.attachRpcInput!==undefined?t.attachRpcInput:c&&c.sendDefaultPii){a.input=Ie(s)}po("trpc",a);function u(t){if(typeof t==="object"&&t!==null&&"ok"in t&&!t.ok&&"error"in t){fo(t.error,Hu)}}return Ss({name:`trpc/${n}`,op:"rpc.server",attributes:{[ii]:"route",[ci]:"auto.rpc.trpc"}},(t=>{let e;try{e=i()}catch(e){fo(e,Hu);t.end();throw e}if(m(e)){return e.then((e=>{u(e);t.end();return e}),(e=>{fo(e,Hu);t.end();throw e}))}else{u(e);t.end();return e}}))}}function Gu(t,e={},n=Jr()){const{message:r,name:i,email:s,url:o,source:c,associatedEventId:a,tags:u}=t;const f={contexts:{feedback:ft({contact_email:s,name:i,message:r,url:o,source:c,associated_event_id:a})},type:"feedback",level:"info",tags:u};const l=n&&n.getClient()||ti();if(l){l.emit("beforeSendFeedback",f,e)}const d=n.captureEvent(f,e);return d}function Yu(){return{bindClient(t){const e=Jr();e.setClient(t)},withScope:Zr,getClient:()=>ti(),getScope:Jr,getIsolationScope:Kr,captureException:(t,e)=>Jr().captureException(t,e),captureMessage:(t,e,n)=>Jr().captureMessage(t,e,n),captureEvent:ho,addBreadcrumb:Cc,setUser:vo,setTags:yo,setTag:bo,setExtra:go,setExtras:mo,setContext:po,getIntegration(t){const e=ti();return e&&e.getIntegrationByName(t.id)||null},startSession:Eo,endSession:Ao,captureSession(t){if(t){return Ao()}Ju()}}}const Xu=Yu;function Ju(){const t=Jr();const e=ti();const n=t.getSession();if(e&&n){e.captureSession(n)}}const Ku=M;let Vu=0;function Zu(){return Vu>0}function Qu(){Vu++;setTimeout((()=>{Vu--}))}function tf(t,e={},n){if(typeof t!=="function"){return t}try{const e=t.__sentry_wrapped__;if(e){return e}if(it(t)){return t}}catch(e){return t}const r=function(){const r=Array.prototype.slice.call(arguments);try{if(n&&typeof n==="function"){n.apply(this,arguments)}const i=r.map((t=>tf(t,e)));return t.apply(this,i)}catch(t){Qu();Zr((n=>{n.addEventProcessor((t=>{if(e.mechanism){ve(t,undefined,undefined);we(t,e.mechanism)}t.extra={...t.extra,arguments:r};return t}));fo(t)}));throw t}};try{for(const e in t){if(Object.prototype.hasOwnProperty.call(t,e)){r[e]=t[e]}}}catch(t){}rt(r,t);nt(t,"__sentry_wrapped__",r);try{const e=Object.getOwnPropertyDescriptor(r,"name");if(e.configurable){Object.defineProperty(r,"name",{get(){return t.name}})}}catch(t){}return r}const ef=typeof __SENTRY_DEBUG__==="undefined"||__SENTRY_DEBUG__;function nf(t,e){const n=of(t,e);const r={type:e&&e.name,value:ff(e)};if(n.length){r.stacktrace={frames:n}}if(r.type===undefined&&r.value===""){r.value="Unrecoverable error caught"}return r}function rf(t,e,n,r){const i=ti();const s=i&&i.getOptions().normalizeDepth;const o=yf(e);const c={__serialized__:Ee(e,s)};if(o){return{exception:{values:[nf(t,o)]},extra:c}}const a={exception:{values:[{type:d(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:mf(e,{isUnhandledRejection:r})}]},extra:c};if(n){const e=of(t,n);if(e.length){a.exception.values[0].stacktrace={frames:e}}}return a}function sf(t,e){return{exception:{values:[nf(t,e)]}}}function of(t,e){const n=e.stacktrace||e.stack||"";const r=af(e);const i=uf(e);try{return t(n,r,i)}catch(t){}return[]}const cf=/Minified React error #\d+;/i;function af(t){if(t&&cf.test(t.message)){return 1}return 0}function uf(t){if(typeof t.framesToPop==="number"){return t.framesToPop}return 0}function ff(t){const e=t&&t.message;if(!e){return"No error message"}if(e.error&&typeof e.error.message==="string"){return e.error.message}return e}function lf(t,e,n,r){const i=n&&n.syntheticException||undefined;const s=hf(t,e,i,r);we(s);s.level="error";if(n&&n.event_id){s.event_id=n.event_id}return Ye(s)}function df(t,e,n="info",r,i){const s=r&&r.syntheticException||undefined;const o=pf(t,e,s,i);o.level=n;if(r&&r.event_id){o.event_id=r.event_id}return Ye(o)}function hf(t,e,n,i,a){let u;if(s(e)&&e.error){const n=e;return sf(t,n.error)}if(o(e)||c(e)){const r=e;if("stack"in e){u=sf(t,e)}else{const e=r.name||(o(r)?"DOMError":"DOMException");const s=r.message?`${e}: ${r.message}`:e;u=pf(t,s,n,i);ve(u,s)}if("code"in r){u.tags={...u.tags,"DOMException.code":`${r.code}`}}return u}if(r(e)){return sf(t,e)}if(l(e)||d(e)){const r=e;u=rf(t,r,n,a);we(u,{synthetic:true});return u}u=pf(t,e,n,i);ve(u,`${e}`,undefined);we(u,{synthetic:true});return u}function pf(t,e,n,r){const i={};if(r&&n){const r=of(t,n);if(r.length){i.exception={values:[{value:e,stacktrace:{frames:r}}]}}}if(u(e)){const{__sentry_template_string__:t,__sentry_template_values__:n}=e;i.logentry={message:t,params:n};return i}i.message=e;return i}function mf(t,{isUnhandledRejection:e}){const n=ut(t);const r=e?"promise rejection":"exception";if(s(t)){return`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``}if(d(t)){const e=gf(t);return`Event \`${e}\` (type=${t.type}) captured as ${r}`}return`Object captured as ${r} with keys: ${n}`}function gf(t){try{const e=Object.getPrototypeOf(t);return e?e.constructor.name:undefined}catch(t){}}function yf(t){for(const e in t){if(Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];if(n instanceof Error){return n}}}return undefined}function bf(t,{metadata:e,tunnel:n,dsn:r}){const i={event_id:t.event_id,sent_at:(new Date).toISOString(),...e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}},...!!n&&!!r&&{dsn:J(r)}};const s=vf(t);return Fn(i,[s])}function vf(t){const e={type:"user_report"};return[e,t]}class wf extends Xo{constructor(t){const e={parentSpanIsAlwaysRootSpan:true,...t};const n=Ku.SENTRY_SDK_SOURCE||ue();wc(e,"browser",["browser"],n);super(e);if(e.sendClientReports&&Ku.document){Ku.document.addEventListener("visibilitychange",(()=>{if(Ku.document.visibilityState==="hidden"){this._flushOutcomes()}}))}}eventFromException(t,e){return lf(this._options.stackParser,t,e,this._options.attachStacktrace)}eventFromMessage(t,e="info",n){return df(this._options.stackParser,t,e,n,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){ef&&G.warn("SDK not enabled, will not capture user feedback.");return}const e=bf(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(e)}_prepareEvent(t,e,n){t.platform=t.platform||"javascript";return super._prepareEvent(t,e,n)}}const _f=typeof __SENTRY_DEBUG__==="undefined"||__SENTRY_DEBUG__;const kf=(t,e)=>{if(t>e[1]){return"poor"}if(t>e[0]){return"needs-improvement"}return"good"};const Sf=(t,e,n,r)=>{let i;let s;return o=>{if(e.value>=0){if(o||r){s=e.value-(i||0);if(s||i===undefined){i=e.value;e.delta=s;e.rating=kf(e.value,n);t(e)}}}}};const xf=M;const Cf=()=>`v3-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`;const Tf=()=>xf.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];const If=()=>{const t=Tf();return t&&t.activationStart||0};const Ef=(t,e)=>{const n=Tf();let r="navigate";if(n){if(xf.document&&xf.document.prerendering||If()>0){r="prerender"}else if(xf.document&&xf.document.wasDiscarded){r="restore"}else if(n.type){r=n.type.replace(/_/g,"-")}}const i=[];return{name:t,value:typeof e==="undefined"?-1:e,rating:"good",delta:0,entries:i,id:Cf(),navigationType:r}};const Af=(t,e,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const r=new PerformanceObserver((t=>{Promise.resolve().then((()=>{e(t.getEntries())}))}));r.observe(Object.assign({type:t,buffered:true},n||{}));return r}}catch(t){}return};const $f=t=>{const e=e=>{if(e.type==="pagehide"||xf.document&&xf.document.visibilityState==="hidden"){t(e)}};if(xf.document){addEventListener("visibilitychange",e,true);addEventListener("pagehide",e,true)}};const Mf=t=>{let e=false;return n=>{if(!e){t(n);e=true}}};let Rf=-1;const Nf=()=>{Rf=xf.document.visibilityState==="hidden"&&!xf.document.prerendering?0:Infinity};const Of=t=>{if(xf.document.visibilityState==="hidden"&&Rf>-1){Rf=t.type==="visibilitychange"?t.timeStamp:0;removeEventListener("visibilitychange",Of,true);removeEventListener("prerenderingchange",Of,true)}};const Df=()=>{addEventListener("visibilitychange",Of,true);addEventListener("prerenderingchange",Of,true)};const Lf=()=>{if(xf.document&&Rf<0){Nf();Df()}return{get firstHiddenTime(){return Rf}}};const Ff=t=>{if(xf.document&&xf.document.prerendering){addEventListener("prerenderingchange",(()=>t()),true)}else{t()}};const Pf=[1800,3e3];const jf=(t,e={})=>{Ff((()=>{const n=Lf();const r=Ef("FCP");let i;const s=t=>{t.forEach((t=>{if(t.name==="first-contentful-paint"){o.disconnect();if(t.startTime<n.firstHiddenTime){r.value=Math.max(t.startTime-If(),0);r.entries.push(t);i(true)}}}))};const o=Af("paint",s);if(o){i=Sf(t,r,Pf,e.reportAllChanges)}}))};const Bf=[.1,.25];const zf=(t,e={})=>{jf(Mf((()=>{const n=Ef("CLS",0);let r;let i=0;let s=[];const o=t=>{t.forEach((t=>{if(!t.hadRecentInput){const e=s[0];const n=s[s.length-1];if(i&&e&&n&&t.startTime-n.startTime<1e3&&t.startTime-e.startTime<5e3){i+=t.value;s.push(t)}else{i=t.value;s=[t]}}}));if(i>n.value){n.value=i;n.entries=s;r()}};const c=Af("layout-shift",o);if(c){r=Sf(t,n,Bf,e.reportAllChanges);$f((()=>{o(c.takeRecords());r(true)}));setTimeout(r,0)}})))};const Uf=[100,300];const qf=(t,e={})=>{Ff((()=>{const n=Lf();const r=Ef("FID");let i;const s=t=>{if(t.startTime<n.firstHiddenTime){r.value=t.processingStart-t.startTime;r.entries.push(t);i(true)}};const o=t=>{t.forEach(s)};const c=Af("first-input",o);i=Sf(t,r,Uf,e.reportAllChanges);if(c){$f(Mf((()=>{o(c.takeRecords());c.disconnect()})))}}))};let Hf=0;let Wf=Infinity;let Gf=0;const Yf=t=>{t.forEach((t=>{if(t.interactionId){Wf=Math.min(Wf,t.interactionId);Gf=Math.max(Gf,t.interactionId);Hf=Gf?(Gf-Wf)/7+1:0}}))};let Xf;const Jf=()=>Xf?Hf:performance.interactionCount||0;const Kf=()=>{if("interactionCount"in performance||Xf)return;Xf=Af("event",Yf,{type:"event",buffered:true,durationThreshold:0})};const Vf=[200,500];const Zf=0;const Qf=()=>Jf()-Zf;const tl=10;const el=[];const nl={};const rl=t=>{const e=el[el.length-1];const n=nl[t.interactionId];if(n||el.length<tl||e&&t.duration>e.latency){if(n){n.entries.push(t);n.latency=Math.max(n.latency,t.duration)}else{const e={id:t.interactionId,latency:t.duration,entries:[t]};nl[e.id]=e;el.push(e)}el.sort(((t,e)=>e.latency-t.latency));el.splice(tl).forEach((t=>{delete nl[t.id]}))}};const il=()=>{const t=Math.min(el.length-1,Math.floor(Qf()/50));return el[t]};const sl=(t,e={})=>{Ff((()=>{Kf();const n=Ef("INP");let r;const i=t=>{t.forEach((t=>{if(t.interactionId){rl(t)}if(t.entryType==="first-input"){const e=!el.some((e=>e.entries.some((e=>t.duration===e.duration&&t.startTime===e.startTime))));if(e){rl(t)}}}));const e=il();if(e&&e.latency!==n.value){n.value=e.latency;n.entries=e.entries;r()}};const s=Af("event",i,{durationThreshold:e.durationThreshold!=null?e.durationThreshold:40});r=Sf(t,n,Vf,e.reportAllChanges);if(s){if("PerformanceEventTiming"in xf&&"interactionId"in PerformanceEventTiming.prototype){s.observe({type:"first-input",buffered:true})}$f((()=>{i(s.takeRecords());if(n.value<0&&Qf()>0){n.value=0;n.entries=[]}r(true)}))}}))};const ol=[2500,4e3];const cl={};const al=(t,e={})=>{Ff((()=>{const n=Lf();const r=Ef("LCP");let i;const s=t=>{const e=t[t.length-1];if(e){if(e.startTime<n.firstHiddenTime){r.value=Math.max(e.startTime-If(),0);r.entries=[e];i()}}};const o=Af("largest-contentful-paint",s);if(o){i=Sf(t,r,ol,e.reportAllChanges);const n=Mf((()=>{if(!cl[r.id]){s(o.takeRecords());o.disconnect();cl[r.id]=true;i(true)}}));["keydown","click"].forEach((t=>{if(xf.document){addEventListener(t,(()=>setTimeout(n,0)),true)}}));$f(n)}}))};const ul=[800,1800];const fl=t=>{if(xf.document&&xf.document.prerendering){Ff((()=>fl(t)))}else if(xf.document&&xf.document.readyState!=="complete"){addEventListener("load",(()=>fl(t)),true)}else{setTimeout(t,0)}};const ll=(t,e={})=>{const n=Ef("TTFB");const r=Sf(t,n,ul,e.reportAllChanges);fl((()=>{const t=Tf();if(t){const e=t.responseStart;if(e<=0||e>performance.now())return;n.value=Math.max(e-If(),0);n.entries=[t];r(true)}}))};const dl={};const hl={};let pl;let ml;let gl;let yl;let bl;function vl(t,e=false){return Ml("cls",t,Tl,pl,e)}function wl(t,e=false){return Ml("lcp",t,El,gl,e)}function _l(t){return Ml("fid",t,Il,ml)}function kl(t){return Ml("ttfb",t,Al,yl)}function Sl(t){return Ml("inp",t,$l,bl)}function xl(t,e){Nl(t,e);if(!hl[t]){Rl(t);hl[t]=true}return Ol(t,e)}function Cl(t,e){const n=dl[t];if(!n||!n.length){return}for(const r of n){try{r(e)}catch(e){_f&&G.error(`Error while triggering instrumentation handler.\nType: ${t}\nName: ${St(r)}\nError:`,e)}}}function Tl(){return zf((t=>{Cl("cls",{metric:t});pl=t}),{reportAllChanges:true})}function Il(){return qf((t=>{Cl("fid",{metric:t});ml=t}))}function El(){return al((t=>{Cl("lcp",{metric:t});gl=t}),{reportAllChanges:true})}function Al(){return ll((t=>{Cl("ttfb",{metric:t});yl=t}))}function $l(){return sl((t=>{Cl("inp",{metric:t});bl=t}))}function Ml(t,e,n,r,i=false){Nl(t,e);let s;if(!hl[t]){s=n();hl[t]=true}if(r){e({metric:r})}return Ol(t,e,i?s:undefined)}function Rl(t){const e={};if(t==="event"){e.durationThreshold=0}Af(t,(e=>{Cl(t,{entries:e})}),e)}function Nl(t,e){dl[t]=dl[t]||[];dl[t].push(e)}function Ol(t,e,n){return()=>{if(n){n()}const r=dl[t];if(!r){return}const i=r.indexOf(e);if(i!==-1){r.splice(i,1)}}}function Dl(t){return"duration"in t}function Ll(t){return typeof t==="number"&&isFinite(t)}function Fl(t,e,n,{...r}){const i=Ei(t).start_timestamp;if(i&&i>e){if(typeof t.updateStartTime==="function"){t.updateStartTime(e)}}return Ts(t,(()=>{const t=xs({startTime:e,...r});if(t){t.end(n)}return t}))}function Pl(t){const e=ti();if(!e){return}const{name:n,transaction:r,attributes:i,startTime:s}=t;const{release:o,environment:c}=e.getOptions();const a=e.getIntegrationByName("Replay");const u=a&&a.getReplayId();const f=Jr();const l=f.getUser();const d=l!==undefined?l.email||l.id||l.ip_address:undefined;let h=undefined;try{h=f.getScopeData().contexts.profile.profile_id}catch(t){}const p={release:o,environment:c,user:d||undefined,profile_id:h||undefined,replay_id:u||undefined,transaction:r,"user_agent.original":xf.navigator&&xf.navigator.userAgent,...i};return xs({name:n,attributes:p,startTime:s,experimental:{standalone:true}})}function jl(){return xf&&xf.addEventListener&&xf.performance}function Bl(t){return t/1e3}function zl(){let t=0;let e;let n;if(!ql()){return}let r=false;function i(){if(r){return}r=true;if(n){Ul(t,e,n)}s()}const s=vl((({metric:n})=>{const r=n.entries[n.entries.length-1];if(!r){return}t=n.value;e=r}),true);$f((()=>{i()}));setTimeout((()=>{const t=ti();const e=wr([t,"optionalAccess",t=>t.on,"call",t=>t("startNavigationSpan",(()=>{i();e&&e()}))]);const r=ji();const s=r&&Pi(r);const o=s&&Ei(s);if(o&&o.op==="pageload"){n=s.spanContext().spanId}}),0)}function Ul(t,e,n){_f&&G.log(`Sending CLS span (${t})`);const r=Bl(Yt)+(wr([e,"optionalAccess",t=>t.startTime])||0);const i=Bl(wr([e,"optionalAccess",t=>t.duration])||0);const s=Jr().getScopeData().transactionName;const o=e?D(wr([e,"access",t=>t.sources,"access",t=>t[0],"optionalAccess",t=>t.node])):"Layout shift";const c=ft({[ci]:"auto.http.browser.cls",[oi]:"ui.webvital.cls",[di]:wr([e,"optionalAccess",t=>t.duration])||0,"sentry.pageload.span_id":n});const a=Pl({name:o,transaction:s,attributes:c,startTime:r});wr([a,"optionalAccess",t=>t.addEvent,"call",e=>e("cls",{[ui]:"",[fi]:t})]);wr([a,"optionalAccess",t=>t.end,"call",t=>t(r+i)])}function ql(){try{return wr([PerformanceObserver,"access",t=>t.supportedEntryTypes,"optionalAccess",t=>t.includes,"call",t=>t("layout-shift")])}catch(t){return false}}const Hl=2147483647;let Wl=0;let Gl={};let Yl;let Xl;function Jl({recordClsStandaloneSpans:t}){const e=jl();if(e&&Yt){if(e.mark){xf.performance.mark("sentry-tracing-init")}const n=ed();const r=td();const i=nd();const s=t?zl():Ql();return()=>{n();r();i();s&&s()}}return()=>undefined}function Kl(){xl("longtask",(({entries:t})=>{if(!ji()){return}for(const e of t){const t=Bl(Yt+e.startTime);const n=Bl(e.duration);const r=xs({name:"Main UI thread blocked",op:"ui.long-task",startTime:t,attributes:{[ci]:"auto.ui.browser.metrics"}});if(r){r.end(t+n)}}}))}function Vl(){const t=new PerformanceObserver((t=>{if(!ji()){return}for(const e of t.getEntries()){if(!e.scripts[0]){continue}const t=Bl(Yt+e.startTime);const n=Bl(e.duration);const r={[ci]:"auto.ui.browser.metrics"};const i=e.scripts[0];const{invoker:s,invokerType:o,sourceURL:c,sourceFunctionName:a,sourceCharPosition:u}=i;r["browser.script.invoker"]=s;r["browser.script.invoker_type"]=o;if(c){r["code.filepath"]=c}if(a){r["code.function"]=a}if(u!==-1){r["browser.script.source_char_position"]=u}const f=xs({name:"Main UI thread blocked",op:"ui.long-animation-frame",startTime:t,attributes:r});if(f){f.end(t+n)}}}));t.observe({type:"long-animation-frame",buffered:true})}function Zl(){xl("event",(({entries:t})=>{if(!ji()){return}for(const e of t){if(e.name==="click"){const t=Bl(Yt+e.startTime);const n=Bl(e.duration);const r={name:D(e.target),op:`ui.interaction.${e.name}`,startTime:t,attributes:{[ci]:"auto.ui.browser.metrics"}};const i=j(e.target);if(i){r.attributes["ui.component_name"]=i}const s=xs(r);if(s){s.end(t+n)}}}}))}function Ql(){return vl((({metric:t})=>{const e=t.entries[t.entries.length-1];if(!e){return}_f&&G.log(`[Measurements] Adding CLS ${t.value}`);Gl["cls"]={value:t.value,unit:""};Xl=e}),true)}function td(){return wl((({metric:t})=>{const e=t.entries[t.entries.length-1];if(!e){return}_f&&G.log("[Measurements] Adding LCP");Gl["lcp"]={value:t.value,unit:"millisecond"};Yl=e}),true)}function ed(){return _l((({metric:t})=>{const e=t.entries[t.entries.length-1];if(!e){return}const n=Bl(Yt);const r=Bl(e.startTime);_f&&G.log("[Measurements] Adding FID");Gl["fid"]={value:t.value,unit:"millisecond"};Gl["mark.fid"]={value:n+r,unit:"second"}}))}function nd(){return kl((({metric:t})=>{const e=t.entries[t.entries.length-1];if(!e){return}_f&&G.log("[Measurements] Adding TTFB");Gl["ttfb"]={value:t.value,unit:"millisecond"}}))}function rd(t,e){const n=jl();if(!n||!xf.performance.getEntries||!Yt){return}_f&&G.log("[Tracing] Adding & adjusting spans using Performance API");const r=Bl(Yt);const i=n.getEntries();const{op:s,start_timestamp:o}=Ei(t);i.slice(Wl).forEach((e=>{const n=Bl(e.startTime);const i=Bl(Math.max(0,e.duration));if(s==="navigation"&&o&&r+n<o){return}switch(e.entryType){case"navigation":{sd(t,e,r);break}case"mark":case"paint":case"measure":{id(t,e,n,i,r);const s=Lf();const o=e.startTime<s.firstHiddenTime;if(e.name==="first-paint"&&o){_f&&G.log("[Measurements] Adding FP");Gl["fp"]={value:e.startTime,unit:"millisecond"}}if(e.name==="first-contentful-paint"&&o){_f&&G.log("[Measurements] Adding FCP");Gl["fcp"]={value:e.startTime,unit:"millisecond"}}break}case"resource":{ad(t,e,e.name,n,i,r);break}}}));Wl=Math.max(i.length-1,0);ud(t);if(s==="pageload"){dd(Gl);const n=Gl["mark.fid"];if(n&&Gl["fid"]){Fl(t,n.value,n.value+Bl(Gl["fid"].value),{name:"first input delay",op:"ui.action",attributes:{[ci]:"auto.ui.browser.metrics"}});delete Gl["mark.fid"]}if(!("fcp"in Gl)||!e.recordClsOnPageloadSpan){delete Gl.cls}Object.entries(Gl).forEach((([t,e])=>{hs(t,e.value,e.unit)}));t.setAttribute("performance.timeOrigin",r);fd(t)}Yl=undefined;Xl=undefined;Gl={}}function id(t,e,n,r,i){const s=Tf();const o=Bl(s?s.requestStart:0);const c=i+Math.max(n,o);const a=i+n;const u=a+r;const f={[ci]:"auto.resource.browser.metrics"};if(c!==a){f["sentry.browser.measure_happened_before_request"]=true;f["sentry.browser.measure_start_time"]=c}Fl(t,c,u,{name:e.name,op:e.entryType,attributes:f});return c}function sd(t,e,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach((r=>{od(t,e,r,n)}));od(t,e,"secureConnection",n,"TLS/SSL","connectEnd");od(t,e,"fetch",n,"cache","domainLookupStart");od(t,e,"domainLookup",n,"DNS");cd(t,e,n)}function od(t,e,n,r,i,s){const o=s?e[s]:e[`${n}End`];const c=e[`${n}Start`];if(!c||!o){return}Fl(t,r+Bl(c),r+Bl(o),{op:"browser",name:i||n,attributes:{[ci]:"auto.ui.browser.metrics"}})}function cd(t,e,n){const r=n+Bl(e.requestStart);const i=n+Bl(e.responseEnd);const s=n+Bl(e.responseStart);if(e.responseEnd){Fl(t,r,i,{op:"browser",name:"request",attributes:{[ci]:"auto.ui.browser.metrics"}});Fl(t,s,i,{op:"browser",name:"response",attributes:{[ci]:"auto.ui.browser.metrics"}})}}function ad(t,e,n,r,i,s){if(e.initiatorType==="xmlhttprequest"||e.initiatorType==="fetch"){return}const o=Ze(n);const c={[ci]:"auto.resource.browser.metrics"};ld(c,e,"transferSize","http.response_transfer_size");ld(c,e,"encodedBodySize","http.response_content_length");ld(c,e,"decodedBodySize","http.decoded_response_content_length");if("renderBlockingStatus"in e){c["resource.render_blocking_status"]=e.renderBlockingStatus}if(o.protocol){c["url.scheme"]=o.protocol.split(":").pop()}if(o.host){c["server.address"]=o.host}c["url.same_origin"]=n.includes(xf.location.origin);const a=s+r;const u=a+i;Fl(t,a,u,{name:n.replace(xf.location.origin,""),op:e.initiatorType?`resource.${e.initiatorType}`:"resource.other",attributes:c})}function ud(t){const e=xf.navigator;if(!e){return}const n=e.connection;if(n){if(n.effectiveType){t.setAttribute("effectiveConnectionType",n.effectiveType)}if(n.type){t.setAttribute("connectionType",n.type)}if(Ll(n.rtt)){Gl["connection.rtt"]={value:n.rtt,unit:"millisecond"}}}if(Ll(e.deviceMemory)){t.setAttribute("deviceMemory",`${e.deviceMemory} GB`)}if(Ll(e.hardwareConcurrency)){t.setAttribute("hardwareConcurrency",String(e.hardwareConcurrency))}}function fd(t){if(Yl){_f&&G.log("[Measurements] Adding LCP Data");if(Yl.element){t.setAttribute("lcp.element",D(Yl.element))}if(Yl.id){t.setAttribute("lcp.id",Yl.id)}if(Yl.url){t.setAttribute("lcp.url",Yl.url.trim().slice(0,200))}t.setAttribute("lcp.size",Yl.size)}if(Xl&&Xl.sources){_f&&G.log("[Measurements] Adding CLS Data");Xl.sources.forEach(((e,n)=>t.setAttribute(`cls.source.${n+1}`,D(e.node))))}}function ld(t,e,n,r){const i=e[n];if(i!=null&&i<Hl){t[r]=i}}function dd(t){const e=Tf();if(!e){return}const{responseStart:n,requestStart:r}=e;if(r<=n){_f&&G.log("[Measurements] Adding TTFB Request Time");t["ttfb.requestTime"]={value:n-r,unit:"millisecond"}}}const hd=1e3;let pd;let md;let gd;function yd(t){const e="dom";It(e,t);At(e,bd)}function bd(){if(!xf.document){return}const t=$t.bind(null,"dom");const e=_d(t,true);xf.document.addEventListener("click",e,false);xf.document.addEventListener("keypress",e,false);["EventTarget","Node"].forEach((e=>{const n=xf[e]&&xf[e].prototype;if(!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")){return}et(n,"addEventListener",(function(e){return function(n,r,i){if(n==="click"||n=="keypress"){try{const r=this;const s=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{};const o=s[n]=s[n]||{refCount:0};if(!o.handler){const r=_d(t);o.handler=r;e.call(this,n,r,i)}o.refCount++}catch(t){}}return e.call(this,n,r,i)}}));et(n,"removeEventListener",(function(t){return function(e,n,r){if(e==="click"||e=="keypress"){try{const n=this;const i=n.__sentry_instrumentation_handlers__||{};const s=i[e];if(s){s.refCount--;if(s.refCount<=0){t.call(this,e,s.handler,r);s.handler=undefined;delete i[e]}if(Object.keys(i).length===0){delete n.__sentry_instrumentation_handlers__}}}catch(t){}}return t.call(this,e,n,r)}}))}))}function vd(t){if(t.type!==md){return false}try{if(!t.target||t.target._sentryId!==gd){return false}}catch(t){}return true}function wd(t,e){if(t!=="keypress"){return false}if(!e||!e.tagName){return true}if(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable){return false}return true}function _d(t,e=false){return n=>{if(!n||n["_sentryCaptured"]){return}const r=kd(n);if(wd(n.type,r)){return}nt(n,"_sentryCaptured",true);if(r&&!r._sentryId){nt(r,"_sentryId",ge())}const i=n.type==="keypress"?"input":n.type;if(!vd(n)){const s={event:n,name:i,global:e};t(s);md=n.type;gd=r?r._sentryId:undefined}clearTimeout(pd);pd=xf.setTimeout((()=>{gd=undefined;md=undefined}),hd)}}function kd(t){try{return t.target}catch(t){return null}}let Sd;function xd(t){const e="history";It(e,t);At(e,Cd)}function Cd(){if(!Cr()){return}const t=xf.onpopstate;xf.onpopstate=function(...e){const n=xf.location.href;const r=Sd;Sd=n;const i={from:r,to:n};$t("history",i);if(t){try{return t.apply(this,e)}catch(t){}}};function e(t){return function(...e){const n=e.length>2?e[2]:undefined;if(n){const t=Sd;const e=String(n);Sd=e;const r={from:t,to:e};$t("history",r)}return t.apply(this,e)}}et(xf.history,"pushState",e);et(xf.history,"replaceState",e)}const Td={};function Id(t){const e=Td[t];if(e){return e}let n=xf[t];if(Pt(n)){return Td[t]=n.bind(xf)}const r=xf.document;if(r&&typeof r.createElement==="function"){try{const e=r.createElement("iframe");e.hidden=true;r.head.appendChild(e);const i=e.contentWindow;if(i&&i[t]){n=i[t]}r.head.removeChild(e)}catch(e){_f&&G.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `,e)}}if(!n){return n}return Td[t]=n.bind(xf)}function Ed(t){Td[t]=undefined}function Ad(...t){return Id("fetch")(...t)}function $d(...t){return Id("setTimeout")(...t)}const Md="__sentry_xhr_v3__";function Rd(t){const e="xhr";It(e,t);At(e,Nd)}function Nd(){if(!xf.XMLHttpRequest){return}const t=XMLHttpRequest.prototype;t.open=new Proxy(t.open,{apply(t,e,n){const r=Wt()*1e3;const i=a(n[0])?n[0].toUpperCase():undefined;const s=Od(n[1]);if(!i||!s){return t.apply(e,n)}e[Md]={method:i,url:s,request_headers:{}};if(i==="POST"&&s.match(/sentry_key/)){e.__sentry_own_request__=true}const o=()=>{const t=e[Md];if(!t){return}if(e.readyState===4){try{t.status_code=e.status}catch(t){}const n={endTimestamp:Wt()*1e3,startTimestamp:r,xhr:e};$t("xhr",n)}};if("onreadystatechange"in e&&typeof e.onreadystatechange==="function"){e.onreadystatechange=new Proxy(e.onreadystatechange,{apply(t,e,n){o();return t.apply(e,n)}})}else{e.addEventListener("readystatechange",o)}e.setRequestHeader=new Proxy(e.setRequestHeader,{apply(t,e,n){const[r,i]=n;const s=e[Md];if(s&&a(r)&&a(i)){s.request_headers[r.toLowerCase()]=i}return t.apply(e,n)}});return t.apply(e,n)}});t.send=new Proxy(t.send,{apply(t,e,n){const r=e[Md];if(!r){return t.apply(e,n)}if(n[0]!==undefined){r.body=n[0]}const i={startTimestamp:Wt()*1e3,xhr:e};$t("xhr",i);return t.apply(e,n)}})}function Od(t){if(a(t)){return t}try{return t.toString()}catch(t){}return undefined}const Dd=[];const Ld=new Map;function Fd(){const t=jl();if(t&&Yt){const t=jd();return()=>{t()}}return()=>undefined}const Pd={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 jd(){return Sl((({metric:t})=>{if(t.value==undefined){return}const e=t.entries.find((e=>e.duration===t.value&&Pd[e.name]));if(!e){return}const{interactionId:n}=e;const r=Pd[e.name];const i=Bl(Yt+e.startTime);const s=Bl(t.value);const o=ji();const c=o?Pi(o):undefined;const a=n!=null?Ld.get(n):undefined;const u=a||c;const f=u?Ei(u).description:Jr().getScopeData().transactionName;const l=D(e.target);const d=ft({[ci]:"auto.http.browser.inp",[oi]:`ui.interaction.${r}`,[di]:e.duration});const h=Pl({name:l,transaction:f,attributes:d,startTime:i});wr([h,"optionalAccess",t=>t.addEvent,"call",e=>e("inp",{[ui]:"millisecond",[fi]:t.value})]);wr([h,"optionalAccess",t=>t.end,"call",t=>t(i+s)])}))}function Bd(t){const e=({entries:t})=>{const e=ji();const n=e&&Pi(e);t.forEach((t=>{if(!Dl(t)||!n){return}const e=t.interactionId;if(e==null){return}if(Ld.has(e)){return}if(Dd.length>10){const t=Dd.shift();Ld.delete(t)}Dd.push(e);Ld.set(e,n)}))};xl("event",e);xl("first-input",e)}function zd(t,e=Id("fetch")){let n=0;let r=0;function i(i){const s=i.body.length;n+=s;r++;const o={body:i.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:n<=6e4&&r<15,...t.fetchOptions};if(!e){Ed("fetch");return Xe("No fetch implementation available")}try{return e(t.url,o).then((t=>{n-=s;r--;return{statusCode:t.status,headers:{"x-sentry-rate-limits":t.headers.get("X-Sentry-Rate-Limits"),"retry-after":t.headers.get("Retry-After")}}}))}catch(t){Ed("fetch");n-=s;r--;return Xe(t)}}return sc(t,i)}const Ud=10;const qd=20;const Hd=30;const Wd=40;const Gd=50;function Yd(t,e,n,r){const i={filename:t,function:e==="<anonymous>"?mt:e,in_app:true};if(n!==undefined){i.lineno=n}if(r!==undefined){i.colno=r}return i}const Xd=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i;const Jd=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i;const Kd=/\((\S*)(?::(\d+))(?::(\d+))\)/;const Vd=t=>{const e=Xd.exec(t);if(e){const[,t,n,r]=e;return Yd(t,mt,+n,+r)}const n=Jd.exec(t);if(n){const t=n[2]&&n[2].indexOf("eval")===0;if(t){const t=Kd.exec(n[2]);if(t){n[2]=t[1];n[3]=t[2];n[4]=t[3]}}const[e,r]=ph(n[1]||mt,n[2]);return Yd(r,e,n[3]?+n[3]:undefined,n[4]?+n[4]:undefined)}return};const Zd=[Hd,Vd];const Qd=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i;const th=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;const eh=t=>{const e=Qd.exec(t);if(e){const t=e[3]&&e[3].indexOf(" > eval")>-1;if(t){const t=th.exec(e[3]);if(t){e[1]=e[1]||"eval";e[3]=t[1];e[4]=t[2];e[5]=""}}let n=e[3];let r=e[1]||mt;[r,n]=ph(r,n);return Yd(n,r,e[4]?+e[4]:undefined,e[5]?+e[5]:undefined)}return};const nh=[Gd,eh];const rh=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i;const ih=t=>{const e=rh.exec(t);return e?Yd(e[2],e[1]||mt,+e[3],e[4]?+e[4]:undefined):undefined};const sh=[Wd,ih];const oh=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i;const ch=t=>{const e=oh.exec(t);return e?Yd(e[2],e[3]||mt,+e[1]):undefined};const ah=[Ud,ch];const uh=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i;const fh=t=>{const e=uh.exec(t);return e?Yd(e[5],e[3]||e[4]||mt,+e[1],+e[2]):undefined};const lh=[qd,fh];const dh=[Zd,nh];const hh=bt(...dh);const ph=(t,e)=>{const n=t.indexOf("safari-extension")!==-1;const r=t.indexOf("safari-web-extension")!==-1;return n||r?[t.indexOf("@")!==-1?t.split("@")[0]:mt,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};const mh=1024;const gh="Breadcrumbs";const yh=(t={})=>{const e={console:true,dom:true,fetch:true,history:true,sentry:true,xhr:true,...t};return{name:gh,setup(t){if(e.console){Mt(_h(t))}if(e.dom){yd(wh(t,e.dom))}if(e.xhr){Rd(kh(t))}if(e.fetch){Xt(Sh(t))}if(e.history){xd(xh(t))}if(e.sentry){t.on("beforeSendEvent",vh(t))}}}};const bh=Go(yh);function vh(t){return function e(n){if(ti()!==t){return}Cc({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:be(n)},{event:n})}}function wh(t,e){return function n(r){if(ti()!==t){return}let i;let s;let o=typeof e==="object"?e.serializeAttribute:undefined;let c=typeof e==="object"&&typeof e.maxStringLength==="number"?e.maxStringLength:undefined;if(c&&c>mh){ef&&G.warn(`\`dom.maxStringLength\` cannot exceed ${mh}, but a value of ${c} was configured. Sentry will use ${mh} instead.`);c=mh}if(typeof o==="string"){o=[o]}try{const t=r.event;const e=Ch(t)?t.target:t;i=D(e,{keyAttrs:o,maxStringLength:c});s=j(e)}catch(t){i="<unknown>"}if(i.length===0){return}const a={category:`ui.${r.name}`,message:i};if(s){a.data={"ui.component_name":s}}Cc(a,{event:r.event,name:r.name,global:r.global})}}function _h(t){return function e(n){if(ti()!==t){return}const r={category:"console",data:{arguments:n.args,logger:"console"},level:vn(n.level),message:_(n.args," ")};if(n.level==="assert"){if(n.args[0]===false){r.message=`Assertion failed: ${_(n.args.slice(1)," ")||"console.assert"}`;r.data.arguments=n.args.slice(1)}else{return}}Cc(r,{input:n.args,level:n.level})}}function kh(t){return function e(n){if(ti()!==t){return}const{startTimestamp:r,endTimestamp:i}=n;const s=n.xhr[Md];if(!r||!i||!s){return}const{method:o,url:c,status_code:a,body:u}=s;const f={method:o,url:c,status_code:a};const l={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:i};Cc({category:"xhr",data:f,type:"http"},l)}}function Sh(t){return function e(n){if(ti()!==t){return}const{startTimestamp:r,endTimestamp:i}=n;if(!i){return}if(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"){return}if(n.error){const t=n.fetchData;const e={data:n.error,input:n.args,startTimestamp:r,endTimestamp:i};Cc({category:"fetch",data:t,level:"error",type:"http"},e)}else{const t=n.response;const e={...n.fetchData,status_code:t&&t.status};const s={input:n.args,response:t,startTimestamp:r,endTimestamp:i};Cc({category:"fetch",data:e,type:"http"},s)}}}function xh(t){return function e(n){if(ti()!==t){return}let r=n.from;let i=n.to;const s=Ze(Ku.location.href);let o=r?Ze(r):undefined;const c=Ze(i);if(!o||!o.path){o=s}if(s.protocol===c.protocol&&s.host===c.host){i=c.relative}if(s.protocol===o.protocol&&s.host===o.host){r=o.relative}Cc({category:"navigation",data:{from:r,to:i}})}}function Ch(t){return!!t&&!!t.target}const Th=["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"];const Ih="BrowserApiErrors";const Eh=(t={})=>{const e={XMLHttpRequest:true,eventTarget:true,requestAnimationFrame:true,setInterval:true,setTimeout:true,...t};return{name:Ih,setupOnce(){if(e.setTimeout){et(Ku,"setTimeout",$h)}if(e.setInterval){et(Ku,"setInterval",$h)}if(e.requestAnimationFrame){et(Ku,"requestAnimationFrame",Mh)}if(e.XMLHttpRequest&&"XMLHttpRequest"in Ku){et(XMLHttpRequest.prototype,"send",Rh)}const t=e.eventTarget;if(t){const e=Array.isArray(t)?t:Th;e.forEach(Nh)}}}};const Ah=Go(Eh);function $h(t){return function(...e){const n=e[0];e[0]=tf(n,{mechanism:{data:{function:St(t)},handled:false,type:"instrument"}});return t.apply(this,e)}}function Mh(t){return function(e){return t.apply(this,[tf(e,{mechanism:{data:{function:"requestAnimationFrame",handler:St(t)},handled:false,type:"instrument"}})])}}function Rh(t){return function(...e){const n=this;const r=["onload","onerror","onprogress","onreadystatechange"];r.forEach((t=>{if(t in n&&typeof n[t]==="function"){et(n,t,(function(e){const n={mechanism:{data:{function:t,handler:St(e)},handled:false,type:"instrument"}};const r=it(e);if(r){n.mechanism.data.handler=St(r)}return tf(e,n)}))}}));return t.apply(this,e)}}function Nh(t){const e=Ku;const n=e[t]&&e[t].prototype;if(!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")){return}et(n,"addEventListener",(function(e){return function(n,r,i){try{if(typeof r.handleEvent==="function"){r.handleEvent=tf(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:St(r),target:t},handled:false,type:"instrument"}})}}catch(t){}return e.apply(this,[n,tf(r,{mechanism:{data:{function:"addEventListener",handler:St(r),target:t},handled:false,type:"instrument"}}),i])}}));et(n,"removeEventListener",(function(t){return function(e,n,r){const i=n;try{const n=i&&i.__sentry_wrapped__;if(n){t.call(this,e,n,r)}}catch(t){}return t.call(this,e,i,r)}}))}const Oh="GlobalHandlers";const Dh=(t={})=>{const e={onerror:true,onunhandledrejection:true,...t};return{name:Oh,setupOnce(){Error.stackTraceLimit=50},setup(t){if(e.onerror){Fh(t);Uh("onerror")}if(e.onunhandledrejection){Ph(t);Uh("onunhandledrejection")}}}};const Lh=Go(Dh);function Fh(t){re((e=>{const{stackParser:n,attachStacktrace:r}=qh();if(ti()!==t||Zu()){return}const{msg:i,url:s,line:o,column:c,error:a}=e;const u=zh(hf(n,a||i,undefined,r,false),s,o,c);u.level="error";ho(u,{originalException:a,mechanism:{handled:false,type:"onerror"}})}))}function Ph(t){oe((e=>{const{stackParser:n,attachStacktrace:r}=qh();if(ti()!==t||Zu()){return}const i=jh(e);const s=f(i)?Bh(i):hf(n,i,undefined,r,true);s.level="error";ho(s,{originalException:i,mechanism:{handled:false,type:"onunhandledrejection"}})}))}function jh(t){if(f(t)){return t}try{if("reason"in t){return t.reason}if("detail"in t&&"reason"in t.detail){return t.detail.reason}}catch(t){}return t}function Bh(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function zh(t,e,n,r){const i=t.exception=t.exception||{};const s=i.values=i.values||[];const o=s[0]=s[0]||{};const c=o.stacktrace=o.stacktrace||{};const u=c.frames=c.frames||[];const f=isNaN(parseInt(r,10))?undefined:r;const l=isNaN(parseInt(n,10))?undefined:n;const d=a(e)&&e.length>0?e:F();if(u.length===0){u.push({colno:f,filename:d,function:mt,in_app:true,lineno:l})}return t}function Uh(t){ef&&G.log(`Global Handler attached: ${t}`)}function qh(){const t=ti();const e=t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:false};return e}const Hh=Go((()=>({name:"HttpContext",preprocessEvent(t){if(!Ku.navigator&&!Ku.location&&!Ku.document){return}const e=t.request&&t.request.url||Ku.location&&Ku.location.href;const{referrer:n}=Ku.document||{};const{userAgent:r}=Ku.navigator||{};const i={...t.request&&t.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}};const s={...t.request,...e&&{url:e},headers:i};t.request=s}})));const Wh="cause";const Gh=5;const Yh="LinkedErrors";const Xh=(t={})=>{const e=t.limit||Gh;const n=t.key||Wh;return{name:Yh,preprocessEvent(t,r,i){const s=i.getOptions();x(nf,s.stackParser,s.maxValueLength,n,e,t,r)}}};const Jh=Go(Xh);function Kh(t){return[Oc(),$c(),Ah(),bh(),Lh(),Jh(),ba(),Hh()]}function Vh(t={}){const e={defaultIntegrations:Kh(),release:typeof __SENTRY_RELEASE__==="string"?__SENTRY_RELEASE__:Ku.SENTRY_RELEASE&&Ku.SENTRY_RELEASE.id?Ku.SENTRY_RELEASE.id:undefined,autoSessionTracking:true,sendClientReports:true};if(t.defaultIntegrations==null){delete t.defaultIntegrations}return{...e,...t}}function Zh(){const t=typeof Ku.window!=="undefined"&&Ku;if(!t){return false}const e=t.chrome?"chrome":"browser";const n=t[e];const r=n&&n.runtime&&n.runtime.id;const i=Ku.location&&Ku.location.href||"";const s=["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"];const o=!!r&&Ku===Ku.top&&s.some((t=>i.startsWith(`${t}//`)));const c=typeof t.nw!=="undefined";return!!r&&!o&&!c}function Qh(t={}){const e=Vh(t);if(Zh()){H((()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}));return}if(ef){if(!Ft()){G.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill.")}}const n={...e,stackParser:vt(e.stackParser||hh),integrations:zo(e),transport:e.transport||zd};const r=nc(wf,n);if(e.autoSessionTracking){rp()}return r}function tp(t={}){if(!Ku.document){ef&&G.error("Global document not defined in showReportDialog call");return}const e=Jr();const n=e.getClient();const r=n&&n.getDsn();if(!r){ef&&G.error("DSN not configured for showReportDialog call");return}if(e){t.user={...e.getUser(),...t.user}}if(!t.eventId){const e=wo();if(e){t.eventId=e}}const i=Ku.document.createElement("script");i.async=true;i.crossOrigin="anonymous";i.src=Po(r,t);if(t.onLoad){i.onload=t.onLoad}const{onClose:s}=t;if(s){const t=e=>{if(e.data==="__sentry_reportdialog_closed__"){try{s()}finally{Ku.removeEventListener("message",t)}}};Ku.addEventListener("message",t)}const o=Ku.document.head||Ku.document.body;if(o){o.appendChild(i)}else{ef&&G.error("Not injecting report dialog. No injection point found in HTML")}}function ep(){}function np(t){t()}function rp(){if(typeof Ku.document==="undefined"){ef&&G.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}Eo({ignoreDuration:true});Mo();xd((({from:t,to:e})=>{if(t!==undefined&&t!==e){Eo({ignoreDuration:true});Mo()}}))}function ip(t){const e=ti();if(e){e.captureUserFeedback(t)}}const sp={replayIntegration:"replay",replayCanvasIntegration:"replay-canvas",feedbackIntegration:"feedback",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot",captureConsoleIntegration:"captureconsole",contextLinesIntegration:"contextlines",linkedErrorsIntegration:"linkederrors",debugIntegration:"debug",dedupeIntegration:"dedupe",extraErrorDataIntegration:"extraerrordata",httpClientIntegration:"httpclient",reportingObserverIntegration:"reportingobserver",rewriteFramesIntegration:"rewriteframes",sessionTimingIntegration:"sessiontiming",browserProfilingIntegration:"browserprofiling"};const op=Ku;async function cp(t,e){const n=sp[t];const r=op.Sentry=op.Sentry||{};if(!n){throw new Error(`Cannot lazy load integration: ${t}`)}const i=r[t];if(typeof i==="function"&&!("_isShim"in i)){return i}const s=ap(n);const o=Ku.document.createElement("script");o.src=s;o.crossOrigin="anonymous";o.referrerPolicy="origin";if(e){o.setAttribute("nonce",e)}const c=new Promise(((t,e)=>{o.addEventListener("load",(()=>t()));o.addEventListener("error",e)}));Ku.document.body.appendChild(o);try{await c}catch(e){throw new Error(`Error when loading integration: ${t}`)}const a=r[t];if(typeof a!=="function"){throw new Error(`Could not load integration: ${t}`)}return a}function ap(t){const e=ti();const n=e&&e.getOptions();const r=n&&n.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${$}/${t}.min.js`,r).toString()}const up=M;const fp="ReportingObserver";const lp=new WeakMap;const dp=(t={})=>{const e=t.types||["crash","deprecation","intervention"];function n(t){if(!lp.has(ti())){return}for(const e of t){Zr((t=>{t.setExtra("url",e.url);const n=`ReportingObserver [${e.type}]`;let r="No details available";if(e.body){const n={};for(const t in e.body){n[t]=e.body[t]}t.setExtra("body",n);if(e.type==="crash"){const t=e.body;r=[t.crashId||"",t.reason||""].join(" ").trim()||r}else{const t=e.body;r=t.message||r}}lo(`${n}: ${r}`)}))}}return{name:fp,setupOnce(){if(!Bt()){return}const t=new up.ReportingObserver(n,{buffered:true,types:e});t.observe()},setup(t){lp.set(t,true)}}};const hp=Go(dp);const pp="HttpClient";const mp=(t={})=>{const e={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...t};return{name:pp,setup(t){Tp(t,e);Ip(t,e)}}};const gp=Go(mp);function yp(t,e,n,r){if(Ep(t,n.status,n.url)){const t=$p(e,r);let i,s,o,c;if(Mp()){[i,o]=bp("Cookie",t);[s,c]=bp("Set-Cookie",n)}const a=Ap({url:t.url,method:t.method,status:n.status,requestHeaders:i,responseHeaders:s,requestCookies:o,responseCookies:c});ho(a)}}function bp(t,e){const n=kp(e.headers);let r;try{const e=n[t]||n[t.toLowerCase()]||undefined;if(e){r=_p(e)}}catch(e){ef&&G.log(`Could not extract cookies from header ${t}`)}return[n,r]}function vp(t,e,n,r){if(Ep(t,e.status,e.responseURL)){let t,i,s;if(Mp()){try{const t=e.getResponseHeader("Set-Cookie")||e.getResponseHeader("set-cookie")||undefined;if(t){i=_p(t)}}catch(t){ef&&G.log("Could not extract cookies from response headers")}try{s=Sp(e)}catch(t){ef&&G.log("Could not extract headers from response")}t=r}const o=Ap({url:e.responseURL,method:n,status:e.status,requestHeaders:t,responseHeaders:s,responseCookies:i});ho(o)}}function wp(t){if(t){const e=t["Content-Length"]||t["content-length"];if(e){return parseInt(e,10)}}return undefined}function _p(t){return t.split("; ").reduce(((t,e)=>{const[n,r]=e.split("=");if(n&&r){t[n]=r}return t}),{})}function kp(t){const e={};t.forEach(((t,n)=>{e[n]=t}));return e}function Sp(t){const e=t.getAllResponseHeaders();if(!e){return{}}return e.split("\r\n").reduce(((t,e)=>{const[n,r]=e.split(": ");if(n&&r){t[n]=r}return t}),{})}function xp(t,e){return t.some((t=>{if(typeof t==="string"){return e.includes(t)}return t.test(e)}))}function Cp(t,e){return t.some((t=>{if(typeof t==="number"){return t===e}return e>=t[0]&&e<=t[1]}))}function Tp(t,e){if(!jt()){return}Xt((n=>{if(ti()!==t){return}const{response:r,args:i}=n;const[s,o]=i;if(!r){return}yp(e,s,r,o)}))}function Ip(t,e){if(!("XMLHttpRequest"in M)){return}Rd((n=>{if(ti()!==t){return}const r=n.xhr;const i=r[Md];if(!i){return}const{method:s,request_headers:o}=i;try{vp(e,r,s,o)}catch(t){ef&&G.warn("Error while extracting response event form XHR response",t)}}))}function Ep(t,e,n){return Cp(t.failedRequestStatusCodes,e)&&xp(t.failedRequestTargets,n)&&!mc(n,ti())}function Ap(t){const e=`HTTP Client Error with status code: ${t.status}`;const n={message:e,exception:{values:[{type:"Error",value:e}]},request:{url:t.url,method:t.method,headers:t.requestHeaders,cookies:t.requestCookies},contexts:{response:{status_code:t.status,headers:t.responseHeaders,cookies:t.responseCookies,body_size:wp(t.responseHeaders)}}};we(n,{type:"http.client",handled:false});return n}function $p(t,e){if(!e&&t instanceof Request){return t}if(t instanceof Request&&t.bodyUsed){return t}return new Request(t,e)}function Mp(){const t=ti();return t?Boolean(t.getOptions().sendDefaultPii):false}const Rp=M;const Np=7;const Op="ContextLines";const Dp=(t={})=>{const e=t.frameContextLines!=null?t.frameContextLines:Np;return{name:Op,processEvent(t){return Fp(t,e)}}};const Lp=Go(Dp);function Fp(t,e){const n=Rp.document;const r=Rp.location&&Qe(Rp.location.href);if(!n||!r){return t}const i=t.exception&&t.exception.values;if(!i||!i.length){return t}const s=n.documentElement.innerHTML;if(!s){return t}const o=["<!DOCTYPE html>","<html>",...s.split("\n"),"</html>"];i.forEach((t=>{const n=t.stacktrace;if(n&&n.frames){n.frames=n.frames.map((t=>Pp(t,o,r,e)))}}));return t}function Pp(t,e,n,r){if(t.filename!==n||!t.lineno||!e.length){return t}xe(e,t,r);return t}const jp=M;const Bp="sentryReplaySession";const zp="replay_event";const Up="Unable to send Replay";const qp=3e5;const Hp=9e5;const Wp=5e3;const Gp=5500;const Yp=6e4;const Xp=5e3;const Jp=3;const Kp=15e4;const Vp=5e3;const Zp=3e3;const Qp=300;const tm=2e7;const em=4999;const nm=15e3;const rm=36e5;function im(t,e){if(t!=null){return t}else{return e()}}function sm(t){let e=undefined;let n=t[0];let r=1;while(r<t.length){const i=t[r];const s=t[r+1];r+=2;if((i==="optionalAccess"||i==="optionalCall")&&n==null){return undefined}if(i==="access"||i==="optionalAccess"){e=n;n=s(n)}else if(i==="call"||i==="optionalCall"){n=s(((...t)=>n.call(e,...t)));e=undefined}}return n}var om;(function(t){t[t["Document"]=0]="Document";t[t["DocumentType"]=1]="DocumentType";t[t["Element"]=2]="Element";t[t["Text"]=3]="Text";t[t["CDATA"]=4]="CDATA";t[t["Comment"]=5]="Comment"})(om||(om={}));function cm(t){return t.nodeType===t.ELEMENT_NODE}function am(t){const e=sm([t,"optionalAccess",t=>t.host]);return Boolean(sm([e,"optionalAccess",t=>t.shadowRoot])===t)}function um(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function fm(t){if(t.includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")){t=t.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")}return t}function lm(t){const{cssText:e}=t;if(e.split('"').length<3)return e;const n=["@import",`url(${JSON.stringify(t.href)})`];if(t.layerName===""){n.push(`layer`)}else if(t.layerName){n.push(`layer(${t.layerName})`)}if(t.supportsText){n.push(`supports(${t.supportsText})`)}if(t.media.length){n.push(t.media.mediaText)}return n.join(" ")+";"}function dm(t){try{const e=t.rules||t.cssRules;return e?fm(Array.from(e,hm).join("")):null}catch(t){return null}}function hm(t){let e;if(mm(t)){try{e=dm(t.styleSheet)||lm(t)}catch(t){}}else if(gm(t)&&t.selectorText.includes(":")){return pm(t.cssText)}return e||t.cssText}function pm(t){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function mm(t){return"styleSheet"in t}function gm(t){return"selectorText"in t}class ym{constructor(){this.idNodeMap=new Map;this.nodeMetaMap=new WeakMap}getId(t){if(!t)return-1;const e=sm([this,"access",t=>t.getMeta,"call",e=>e(t),"optionalAccess",t=>t.id]);return im(e,(()=>-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){const e=this.getId(t);this.idNodeMap.delete(e);if(t.childNodes){t.childNodes.forEach((t=>this.removeNodeFromMap(t)))}}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){const n=e.id;this.idNodeMap.set(n,t);this.nodeMetaMap.set(t,e)}replace(t,e){const n=this.getNode(t);if(n){const t=this.nodeMetaMap.get(n);if(t)this.nodeMetaMap.set(e,t)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map;this.nodeMetaMap=new WeakMap}}function bm(){return new ym}function vm({maskInputOptions:t,tagName:e,type:n}){if(e==="OPTION"){e="SELECT"}return Boolean(t[e.toLowerCase()]||n&&t[n]||n==="password"||e==="INPUT"&&!n&&t["text"])}function wm({isMasked:t,element:e,value:n,maskInputFn:r}){let i=n||"";if(!t){return i}if(r){i=r(i,e)}return"*".repeat(i.length)}function _m(t){return t.toLowerCase()}function km(t){return t.toUpperCase()}const Sm="__rrweb_original__";function xm(t){const e=t.getContext("2d");if(!e)return true;const n=50;for(let r=0;r<t.width;r+=n){for(let i=0;i<t.height;i+=n){const s=e.getImageData;const o=Sm in s?s[Sm]:s;const c=new Uint32Array(o.call(e,r,i,Math.min(n,t.width-r),Math.min(n,t.height-i)).data.buffer);if(c.some((t=>t!==0)))return false}}return true}function Cm(t){const e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?_m(e):null}function Tm(t,e,n){if(e==="INPUT"&&(n==="radio"||n==="checkbox")){return t.getAttribute("value")||""}return t.value}function Im(t,e){let n;try{n=new URL(t,im(e,(()=>window.location.href)))}catch(t){return null}const r=/\.([0-9a-z]+)(?:$)/i;const i=n.pathname.match(r);return im(sm([i,"optionalAccess",t=>t[1]]),(()=>null))}const Em={};function Am(t){const e=Em[t];if(e){return e}const n=window.document;let r=window[t];if(n&&typeof n.createElement==="function"){try{const e=n.createElement("iframe");e.hidden=true;n.head.appendChild(e);const i=e.contentWindow;if(i&&i[t]){r=i[t]}n.head.removeChild(e)}catch(t){}}return Em[t]=r.bind(window)}function $m(...t){return Am("setTimeout")(...t)}function Mm(...t){return Am("clearTimeout")(...t)}let Rm=1;const Nm=new RegExp("[^a-z0-9-_:]");const Om=-2;function Dm(){return Rm++}function Lm(t){if(t instanceof HTMLFormElement){return"form"}const e=_m(t.tagName);if(Nm.test(e)){return"div"}return e}function Fm(t){let e="";if(t.indexOf("//")>-1){e=t.split("/").slice(0,3).join("/")}else{e=t.split("/")[0]}e=e.split("?")[0];return e}let Pm;let jm;const Bm=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm;const zm=/^(?:[a-z+]+:)?\/\//i;const Um=/^www\..*/i;const qm=/^(data:)([^,]*),(.*)/i;function Hm(t,e){return(t||"").replace(Bm,((t,n,r,i,s,o)=>{const c=r||s||o;const a=n||i||"";if(!c){return t}if(zm.test(c)||Um.test(c)){return`url(${a}${c}${a})`}if(qm.test(c)){return`url(${a}${c}${a})`}if(c[0]==="/"){return`url(${a}${Fm(e)+c}${a})`}const u=e.split("/");const f=c.split("/");u.pop();for(const t of f){if(t==="."){continue}else if(t===".."){u.pop()}else{u.push(t)}}return`url(${a}${u.join("/")}${a})`}))}const Wm=/^[^ \t\n\r\u000c]+/;const Gm=/^[, \t\n\r\u000c]+/;function Ym(t,e){if(e.trim()===""){return e}let n=0;function r(t){let r;const i=t.exec(e.substring(n));if(i){r=i[0];n+=r.length;return r}return""}const i=[];while(true){r(Gm);if(n>=e.length){break}let s=r(Wm);if(s.slice(-1)===","){s=Xm(t,s.substring(0,s.length-1));i.push(s)}else{let r="";s=Xm(t,s);let o=false;while(true){const t=e.charAt(n);if(t===""){i.push((s+r).trim());break}else if(!o){if(t===","){n+=1;i.push((s+r).trim());break}else if(t==="("){o=true}}else{if(t===")"){o=false}}r+=t;n+=1}}}return i.join(", ")}function Xm(t,e){if(!e||e.trim()===""){return e}const n=t.createElement("a");n.href=e;return n.href}function Jm(t){return Boolean(t.tagName==="svg"||t.ownerSVGElement)}function Km(){const t=document.createElement("a");t.href="";return t.href}function Vm(t,e,n,r,i,s){if(!r){return r}if(n==="src"||n==="href"&&!(e==="use"&&r[0]==="#")){return Xm(t,r)}else if(n==="xlink:href"&&r[0]!=="#"){return Xm(t,r)}else if(n==="background"&&(e==="table"||e==="td"||e==="th")){return Xm(t,r)}else if(n==="srcset"){return Ym(t,r)}else if(n==="style"){return Hm(r,Km())}else if(e==="object"&&n==="data"){return Xm(t,r)}if(typeof s==="function"){return s(n,r,i)}return r}function Zm(t,e,n){return(t==="video"||t==="audio")&&e==="autoplay"}function Qm(t,e,n,r){try{if(r&&t.matches(r)){return false}if(typeof e==="string"){if(t.classList.contains(e)){return true}}else{for(let n=t.classList.length;n--;){const r=t.classList[n];if(e.test(r)){return true}}}if(n){return t.matches(n)}}catch(t){}return false}function tg(t,e){for(let n=t.classList.length;n--;){const r=t.classList[n];if(e.test(r)){return true}}return false}function eg(t,e,n=Infinity,r=0){if(!t)return-1;if(t.nodeType!==t.ELEMENT_NODE)return-1;if(r>n)return-1;if(e(t))return r;return eg(t.parentNode,e,n,r+1)}function ng(t,e){return n=>{const r=n;if(r===null)return false;try{if(t){if(typeof t==="string"){if(r.matches(`.${t}`))return true}else if(tg(r,t)){return true}}if(e&&r.matches(e))return true;return false}catch(t){return false}}}function rg(t,e,n,r,i,s){try{const o=t.nodeType===t.ELEMENT_NODE?t:t.parentElement;if(o===null)return false;if(o.tagName==="INPUT"){const t=o.getAttribute("autocomplete");const e=["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"];if(e.includes(t)){return true}}let c=-1;let a=-1;if(s){a=eg(o,ng(r,i));if(a<0){return true}c=eg(o,ng(e,n),a>=0?a:Infinity)}else{c=eg(o,ng(e,n));if(c<0){return false}a=eg(o,ng(r,i),c>=0?c:Infinity)}return c>=0?a>=0?c<=a:true:a>=0?false:!!s}catch(t){}return!!s}function ig(t,e,n){const r=t.contentWindow;if(!r){return}let i=false;let s;try{s=r.document.readyState}catch(t){return}if(s!=="complete"){const r=$m((()=>{if(!i){e();i=true}}),n);t.addEventListener("load",(()=>{Mm(r);i=true;e()}));return}const o="about:blank";if(r.location.href!==o||t.src===o||t.src===""){$m(e,0);return t.addEventListener("load",e)}t.addEventListener("load",e)}function sg(t,e,n){let r=false;let i;try{i=t.sheet}catch(t){return}if(i)return;const s=$m((()=>{if(!r){e();r=true}}),n);t.addEventListener("load",(()=>{Mm(s);r=true;e()}))}function og(t,e){const{doc:n,mirror:r,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:c,maskAttributeFn:a,maskTextClass:u,unmaskTextClass:f,maskTextSelector:l,unmaskTextSelector:d,inlineStylesheet:h,maskInputOptions:p={},maskTextFn:m,maskInputFn:g,dataURLOptions:y={},inlineImages:b,recordCanvas:v,keepIframeSrcFn:w,newlyAddedElement:_=false}=e;const k=cg(n,r);switch(t.nodeType){case t.DOCUMENT_NODE:if(t.compatMode!=="CSS1Compat"){return{type:om.Document,childNodes:[],compatMode:t.compatMode}}else{return{type:om.Document,childNodes:[]}}case t.DOCUMENT_TYPE_NODE:return{type:om.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:k};case t.ELEMENT_NODE:return ug(t,{doc:n,blockClass:i,blockSelector:s,unblockSelector:o,inlineStylesheet:h,maskAttributeFn:a,maskInputOptions:p,maskInputFn:g,dataURLOptions:y,inlineImages:b,recordCanvas:v,keepIframeSrcFn:w,newlyAddedElement:_,rootId:k,maskAllText:c,maskTextClass:u,unmaskTextClass:f,maskTextSelector:l,unmaskTextSelector:d});case t.TEXT_NODE:return ag(t,{maskAllText:c,maskTextClass:u,unmaskTextClass:f,maskTextSelector:l,unmaskTextSelector:d,maskTextFn:m,maskInputOptions:p,maskInputFn:g,rootId:k});case t.CDATA_SECTION_NODE:return{type:om.CDATA,textContent:"",rootId:k};case t.COMMENT_NODE:return{type:om.Comment,textContent:t.textContent||"",rootId:k};default:return false}}function cg(t,e){if(!e.hasNode(t))return undefined;const n=e.getId(t);return n===1?undefined:n}function ag(t,e){const{maskAllText:n,maskTextClass:r,unmaskTextClass:i,maskTextSelector:s,unmaskTextSelector:o,maskTextFn:c,maskInputOptions:a,maskInputFn:u,rootId:f}=e;const l=t.parentNode&&t.parentNode.tagName;let d=t.textContent;const h=l==="STYLE"?true:undefined;const p=l==="SCRIPT"?true:undefined;const m=l==="TEXTAREA"?true:undefined;if(h&&d){try{if(t.nextSibling||t.previousSibling){}else if(sm([t,"access",t=>t.parentNode,"access",t=>t.sheet,"optionalAccess",t=>t.cssRules])){d=dm(t.parentNode.sheet)}}catch(e){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${e}`,t)}d=Hm(d,Km())}if(p){d="SCRIPT_PLACEHOLDER"}const g=rg(t,r,s,i,o,n);if(!h&&!p&&!m&&d&&g){d=c?c(d,t.parentElement):d.replace(/[\S]/g,"*")}if(m&&d&&(a.textarea||g)){d=u?u(d,t.parentNode):d.replace(/[\S]/g,"*")}if(l==="OPTION"&&d){const e=vm({type:null,tagName:l,maskInputOptions:a});d=wm({isMasked:rg(t,r,s,i,o,e),element:t,value:d,maskInputFn:u})}return{type:om.Text,textContent:d||"",isStyle:h,rootId:f}}function ug(t,e){const{doc:n,blockClass:r,blockSelector:i,unblockSelector:s,inlineStylesheet:o,maskInputOptions:c={},maskAttributeFn:a,maskInputFn:u,dataURLOptions:f={},inlineImages:l,recordCanvas:d,keepIframeSrcFn:h,newlyAddedElement:p=false,rootId:m,maskAllText:g,maskTextClass:y,unmaskTextClass:b,maskTextSelector:v,unmaskTextSelector:w}=e;const _=Qm(t,r,i,s);const k=Lm(t);let S={};const x=t.attributes.length;for(let e=0;e<x;e++){const r=t.attributes[e];if(r.name&&!Zm(k,r.name,r.value)){S[r.name]=Vm(n,k,_m(r.name),r.value,t,a)}}if(k==="link"&&o){const e=Array.from(n.styleSheets).find((e=>e.href===t.href));let r=null;if(e){r=dm(e)}if(r){delete S.rel;delete S.href;S._cssText=Hm(r,e.href)}}if(k==="style"&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){const e=dm(t.sheet);if(e){S._cssText=Hm(e,Km())}}if(k==="input"||k==="textarea"||k==="select"||k==="option"){const e=t;const n=Cm(e);const r=Tm(e,km(k),n);const i=e.checked;if(n!=="submit"&&n!=="button"&&r){const t=rg(e,y,v,b,w,vm({type:n,tagName:km(k),maskInputOptions:c}));S.value=wm({isMasked:t,element:e,value:r,maskInputFn:u})}if(i){S.checked=i}}if(k==="option"){if(t.selected&&!c["select"]){S.selected=true}else{delete S.selected}}if(k==="canvas"&&d){if(t.__context==="2d"){if(!xm(t)){S.rr_dataURL=t.toDataURL(f.type,f.quality)}}else if(!("__context"in t)){const e=t.toDataURL(f.type,f.quality);const n=document.createElement("canvas");n.width=t.width;n.height=t.height;const r=n.toDataURL(f.type,f.quality);if(e!==r){S.rr_dataURL=e}}}if(k==="img"&&l){if(!Pm){Pm=n.createElement("canvas");jm=Pm.getContext("2d")}const e=t;const r=e.crossOrigin;e.crossOrigin="anonymous";const i=()=>{e.removeEventListener("load",i);try{Pm.width=e.naturalWidth;Pm.height=e.naturalHeight;jm.drawImage(e,0,0);S.rr_dataURL=Pm.toDataURL(f.type,f.quality)}catch(t){console.warn(`Cannot inline img src=${e.currentSrc}! Error: ${t}`)}r?S.crossOrigin=r:e.removeAttribute("crossorigin")};if(e.complete&&e.naturalWidth!==0)i();else e.addEventListener("load",i)}if(k==="audio"||k==="video"){S.rr_mediaState=t.paused?"paused":"played";S.rr_mediaCurrentTime=t.currentTime}if(!p){if(t.scrollLeft){S.rr_scrollLeft=t.scrollLeft}if(t.scrollTop){S.rr_scrollTop=t.scrollTop}}if(_){const{width:e,height:n}=t.getBoundingClientRect();S={class:S.class,rr_width:`${e}px`,rr_height:`${n}px`}}if(k==="iframe"&&!h(S.src)){if(!_&&!t.contentDocument){S.rr_src=S.src}delete S.src}let C;try{if(customElements.get(k))C=true}catch(t){}return{type:om.Element,tagName:k,attributes:S,childNodes:[],isSVG:Jm(t)||undefined,needBlock:_,rootId:m,isCustom:C}}function fg(t){if(t===undefined||t===null){return""}else{return t.toLowerCase()}}function lg(t,e){if(e.comment&&t.type===om.Comment){return true}else if(t.type===om.Element){if(e.script&&(t.tagName==="script"||t.tagName==="link"&&(t.attributes.rel==="preload"||t.attributes.rel==="modulepreload")&&t.attributes.as==="script"||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href==="string"&&Im(t.attributes.href)==="js")){return true}else if(e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(fg(t.attributes.name).match(/^msapplication-tile(image|color)$/)||fg(t.attributes.name)==="application-name"||fg(t.attributes.rel)==="icon"||fg(t.attributes.rel)==="apple-touch-icon"||fg(t.attributes.rel)==="shortcut icon"))){return true}else if(t.tagName==="meta"){if(e.headMetaDescKeywords&&fg(t.attributes.name).match(/^description|keywords$/)){return true}else if(e.headMetaSocial&&(fg(t.attributes.property).match(/^(og|twitter|fb):/)||fg(t.attributes.name).match(/^(og|twitter):/)||fg(t.attributes.name)==="pinterest")){return true}else if(e.headMetaRobots&&(fg(t.attributes.name)==="robots"||fg(t.attributes.name)==="googlebot"||fg(t.attributes.name)==="bingbot")){return true}else if(e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==undefined){return true}else if(e.headMetaAuthorship&&(fg(t.attributes.name)==="author"||fg(t.attributes.name)==="generator"||fg(t.attributes.name)==="framework"||fg(t.attributes.name)==="publisher"||fg(t.attributes.name)==="progid"||fg(t.attributes.property).match(/^article:/)||fg(t.attributes.property).match(/^product:/))){return true}else if(e.headMetaVerification&&(fg(t.attributes.name)==="google-site-verification"||fg(t.attributes.name)==="yandex-verification"||fg(t.attributes.name)==="csrf-token"||fg(t.attributes.name)==="p:domain_verify"||fg(t.attributes.name)==="verify-v1"||fg(t.attributes.name)==="verification"||fg(t.attributes.name)==="shopify-checkout-api-token")){return true}}}return false}function dg(t,e){const{doc:n,mirror:r,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:c,maskTextClass:a,unmaskTextClass:u,maskTextSelector:f,unmaskTextSelector:l,skipChild:d=false,inlineStylesheet:h=true,maskInputOptions:p={},maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:b,dataURLOptions:v={},inlineImages:w=false,recordCanvas:_=false,onSerialize:k,onIframeLoad:S,iframeLoadTimeout:x=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:T=5e3,keepIframeSrcFn:I=(()=>false),newlyAddedElement:E=false}=e;let{preserveWhiteSpace:A=true}=e;const $=og(t,{doc:n,mirror:r,blockClass:i,blockSelector:s,maskAllText:c,unblockSelector:o,maskTextClass:a,unmaskTextClass:u,maskTextSelector:f,unmaskTextSelector:l,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,dataURLOptions:v,inlineImages:w,recordCanvas:_,keepIframeSrcFn:I,newlyAddedElement:E});if(!$){console.warn(t,"not serialized");return null}let M;if(r.hasNode(t)){M=r.getId(t)}else if(lg($,b)||!A&&$.type===om.Text&&!$.isStyle&&!$.textContent.replace(/^\s+|\s+$/gm,"").length){M=Om}else{M=Dm()}const R=Object.assign($,{id:M});r.add(t,R);if(M===Om){return null}if(k){k(t)}let N=!d;if(R.type===om.Element){N=N&&!R.needBlock;delete R.needBlock;const e=t.shadowRoot;if(e&&um(e))R.isShadowHost=true}if((R.type===om.Document||R.type===om.Element)&&N){if(b.headWhitespace&&R.type===om.Element&&R.tagName==="head"){A=false}const e={doc:n,mirror:r,blockClass:i,blockSelector:s,maskAllText:c,unblockSelector:o,maskTextClass:a,unmaskTextClass:u,maskTextSelector:f,unmaskTextSelector:l,skipChild:d,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:b,dataURLOptions:v,inlineImages:w,recordCanvas:_,preserveWhiteSpace:A,onSerialize:k,onIframeLoad:S,iframeLoadTimeout:x,onStylesheetLoad:C,stylesheetLoadTimeout:T,keepIframeSrcFn:I};for(const n of Array.from(t.childNodes)){const t=dg(n,e);if(t){R.childNodes.push(t)}}if(cm(t)&&t.shadowRoot){for(const n of Array.from(t.shadowRoot.childNodes)){const r=dg(n,e);if(r){um(t.shadowRoot)&&(r.isShadow=true);R.childNodes.push(r)}}}}if(t.parentNode&&am(t.parentNode)&&um(t.parentNode)){R.isShadow=true}if(R.type===om.Element&&R.tagName==="iframe"){ig(t,(()=>{const e=t.contentDocument;if(e&&S){const n=dg(e,{doc:e,mirror:r,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:c,maskTextClass:a,unmaskTextClass:u,maskTextSelector:f,unmaskTextSelector:l,skipChild:false,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:b,dataURLOptions:v,inlineImages:w,recordCanvas:_,preserveWhiteSpace:A,onSerialize:k,onIframeLoad:S,iframeLoadTimeout:x,onStylesheetLoad:C,stylesheetLoadTimeout:T,keepIframeSrcFn:I});if(n){S(t,n)}}}),x)}if(R.type===om.Element&&R.tagName==="link"&&typeof R.attributes.rel==="string"&&(R.attributes.rel==="stylesheet"||R.attributes.rel==="preload"&&typeof R.attributes.href==="string"&&Im(R.attributes.href)==="css")){sg(t,(()=>{if(C){const e=dg(t,{doc:n,mirror:r,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:c,maskTextClass:a,unmaskTextClass:u,maskTextSelector:f,unmaskTextSelector:l,skipChild:false,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:b,dataURLOptions:v,inlineImages:w,recordCanvas:_,preserveWhiteSpace:A,onSerialize:k,onIframeLoad:S,iframeLoadTimeout:x,onStylesheetLoad:C,stylesheetLoadTimeout:T,keepIframeSrcFn:I});if(e){C(t,e)}}}),T)}return R}function hg(t,e){const{mirror:n=new ym,blockClass:r="rr-block",blockSelector:i=null,unblockSelector:s=null,maskAllText:o=false,maskTextClass:c="rr-mask",unmaskTextClass:a=null,maskTextSelector:u=null,unmaskTextSelector:f=null,inlineStylesheet:l=true,inlineImages:d=false,recordCanvas:h=false,maskAllInputs:p=false,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOM:b=false,dataURLOptions:v,preserveWhiteSpace:w,onSerialize:_,onIframeLoad:k,iframeLoadTimeout:S,onStylesheetLoad:x,stylesheetLoadTimeout:C,keepIframeSrcFn:T=(()=>false)}=e||{};const I=p===true?{color:true,date:true,"datetime-local":true,email:true,month:true,number:true,range:true,search:true,tel:true,text:true,time:true,url:true,week:true,textarea:true,select:true}:p===false?{}:p;const E=b===true||b==="all"?{script:true,comment:true,headFavicon:true,headWhitespace:true,headMetaDescKeywords:b==="all",headMetaSocial:true,headMetaRobots:true,headMetaHttpEquiv:true,headMetaAuthorship:true,headMetaVerification:true}:b===false?{}:b;return dg(t,{doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,maskAllText:o,maskTextClass:c,unmaskTextClass:a,maskTextSelector:u,unmaskTextSelector:f,skipChild:false,inlineStylesheet:l,maskInputOptions:I,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:E,dataURLOptions:v,inlineImages:d,recordCanvas:h,preserveWhiteSpace:w,onSerialize:_,onIframeLoad:k,iframeLoadTimeout:S,onStylesheetLoad:x,stylesheetLoadTimeout:C,keepIframeSrcFn:T,newlyAddedElement:false})}function pg(t){let e=undefined;let n=t[0];let r=1;while(r<t.length){const i=t[r];const s=t[r+1];r+=2;if((i==="optionalAccess"||i==="optionalCall")&&n==null){return undefined}if(i==="access"||i==="optionalAccess"){e=n;n=s(n)}else if(i==="call"||i==="optionalCall"){n=s(((...t)=>n.call(e,...t)));e=undefined}}return n}function mg(t,e,n=document){const r={capture:true,passive:true};n.addEventListener(t,e,r);return()=>n.removeEventListener(t,e,r)}const gg="Please stop import mirror directly. Instead of that,"+"\r\n"+"now you can use replayer.getMirror() to access the mirror instance of a replayer,"+"\r\n"+"or you can use record.mirror to access the mirror instance during recording.";let yg={map:{},getId(){console.error(gg);return-1},getNode(){console.error(gg);return null},removeNodeFromMap(){console.error(gg)},has(){console.error(gg);return false},reset(){console.error(gg)}};if(typeof window!=="undefined"&&window.Proxy&&window.Reflect){yg=new Proxy(yg,{get(t,e,n){if(e==="map"){console.error(gg)}return Reflect.get(t,e,n)}})}function bg(t,e,n={}){let r=null;let i=0;return function(...s){const o=Date.now();if(!i&&n.leading===false){i=o}const c=e-(o-i);const a=this;if(c<=0||c>e){if(r){Hg(r);r=null}i=o;t.apply(a,s)}else if(!r&&n.trailing!==false){r=qg((()=>{i=n.leading===false?0:Date.now();r=null;t.apply(a,s)}),c)}}}function vg(t,e,n,r,i=window){const s=i.Object.getOwnPropertyDescriptor(t,e);i.Object.defineProperty(t,e,r?n:{set(t){qg((()=>{n.set.call(this,t)}),0);if(s&&s.set){s.set.call(this,t)}}});return()=>vg(t,e,s||{},true)}function wg(t,e,n){try{if(!(e in t)){return()=>{}}const r=t[e];const i=n(r);if(typeof i==="function"){i.prototype=i.prototype||{};Object.defineProperties(i,{__rrweb_original__:{enumerable:false,value:r}})}t[e]=i;return()=>{t[e]=r}}catch(t){return()=>{}}}let _g=Date.now;if(!/[1-9][0-9]{12}/.test(Date.now().toString())){_g=()=>(new Date).getTime()}function kg(t){const e=t.document;return{left:e.scrollingElement?e.scrollingElement.scrollLeft:t.pageXOffset!==undefined?t.pageXOffset:pg([e,"optionalAccess",t=>t.documentElement,"access",t=>t.scrollLeft])||pg([e,"optionalAccess",t=>t.body,"optionalAccess",t=>t.parentElement,"optionalAccess",t=>t.scrollLeft])||pg([e,"optionalAccess",t=>t.body,"optionalAccess",t=>t.scrollLeft])||0,top:e.scrollingElement?e.scrollingElement.scrollTop:t.pageYOffset!==undefined?t.pageYOffset:pg([e,"optionalAccess",t=>t.documentElement,"access",t=>t.scrollTop])||pg([e,"optionalAccess",t=>t.body,"optionalAccess",t=>t.parentElement,"optionalAccess",t=>t.scrollTop])||pg([e,"optionalAccess",t=>t.body,"optionalAccess",t=>t.scrollTop])||0}}function Sg(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function xg(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Cg(t){if(!t){return null}const e=t.nodeType===t.ELEMENT_NODE?t:t.parentElement;return e}function Tg(t,e,n,r,i){if(!t){return false}const s=Cg(t);if(!s){return false}const o=ng(e,n);if(!i){const t=r&&s.matches(r);return o(s)&&!t}const c=eg(s,o);let a=-1;if(c<0){return false}if(r){a=eg(s,ng(null,r))}if(c>-1&&a<0){return true}return c<a}function Ig(t,e){return e.getId(t)!==-1}function Eg(t,e){return e.getId(t)===Om}function Ag(t,e){if(am(t)){return false}const n=e.getId(t);if(!e.has(n)){return true}if(t.parentNode&&t.parentNode.nodeType===t.DOCUMENT_NODE){return false}if(!t.parentNode){return true}return Ag(t.parentNode,e)}function $g(t){return Boolean(t.changedTouches)}function Mg(t=window){if("NodeList"in t&&!t.NodeList.prototype.forEach){t.NodeList.prototype.forEach=Array.prototype.forEach}if("DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach){t.DOMTokenList.prototype.forEach=Array.prototype.forEach}if(!Node.prototype.contains){Node.prototype.contains=(...t)=>{let e=t[0];if(!(0 in t)){throw new TypeError("1 argument is required")}do{if(this===e){return true}}while(e=e&&e.parentNode);return false}}}function Rg(t,e){return Boolean(t.nodeName==="IFRAME"&&e.getMeta(t))}function Ng(t,e){return Boolean(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function Og(t){return Boolean(pg([t,"optionalAccess",t=>t.shadowRoot]))}class Dg{constructor(){this.id=1;this.styleIDMap=new WeakMap;this.idStyleMap=new Map}getId(t){return gr(this.styleIDMap.get(t),(()=>-1))}has(t){return this.styleIDMap.has(t)}add(t,e){if(this.has(t))return this.getId(t);let n;if(e===undefined){n=this.id++}else n=e;this.styleIDMap.set(t,n);this.idStyleMap.set(n,t);return n}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 Lg(t){let e=null;if(pg([t,"access",t=>t.getRootNode,"optionalCall",t=>t(),"optionalAccess",t=>t.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&t.getRootNode().host)e=t.getRootNode().host;return e}function Fg(t){let e=t;let n;while(n=Lg(e))e=n;return e}function Pg(t){const e=t.ownerDocument;if(!e)return false;const n=Fg(t);return e.contains(n)}function jg(t){const e=t.ownerDocument;if(!e)return false;return e.contains(t)||Pg(t)}const Bg={};function zg(t){const e=Bg[t];if(e){return e}const n=window.document;let r=window[t];if(n&&typeof n.createElement==="function"){try{const e=n.createElement("iframe");e.hidden=true;n.head.appendChild(e);const i=e.contentWindow;if(i&&i[t]){r=i[t]}n.head.removeChild(e)}catch(t){}}return Bg[t]=r.bind(window)}function Ug(...t){return zg("requestAnimationFrame")(...t)}function qg(...t){return zg("setTimeout")(...t)}function Hg(...t){return zg("clearTimeout")(...t)}var Wg=(t=>{t[t["DomContentLoaded"]=0]="DomContentLoaded";t[t["Load"]=1]="Load";t[t["FullSnapshot"]=2]="FullSnapshot";t[t["IncrementalSnapshot"]=3]="IncrementalSnapshot";t[t["Meta"]=4]="Meta";t[t["Custom"]=5]="Custom";t[t["Plugin"]=6]="Plugin";return t})(Wg||{});var Gg=(t=>{t[t["Mutation"]=0]="Mutation";t[t["MouseMove"]=1]="MouseMove";t[t["MouseInteraction"]=2]="MouseInteraction";t[t["Scroll"]=3]="Scroll";t[t["ViewportResize"]=4]="ViewportResize";t[t["Input"]=5]="Input";t[t["TouchMove"]=6]="TouchMove";t[t["MediaInteraction"]=7]="MediaInteraction";t[t["StyleSheetRule"]=8]="StyleSheetRule";t[t["CanvasMutation"]=9]="CanvasMutation";t[t["Font"]=10]="Font";t[t["Log"]=11]="Log";t[t["Drag"]=12]="Drag";t[t["StyleDeclaration"]=13]="StyleDeclaration";t[t["Selection"]=14]="Selection";t[t["AdoptedStyleSheet"]=15]="AdoptedStyleSheet";t[t["CustomElement"]=16]="CustomElement";return t})(Gg||{});var Yg=(t=>{t[t["MouseUp"]=0]="MouseUp";t[t["MouseDown"]=1]="MouseDown";t[t["Click"]=2]="Click";t[t["ContextMenu"]=3]="ContextMenu";t[t["DblClick"]=4]="DblClick";t[t["Focus"]=5]="Focus";t[t["Blur"]=6]="Blur";t[t["TouchStart"]=7]="TouchStart";t[t["TouchMove_Departed"]=8]="TouchMove_Departed";t[t["TouchEnd"]=9]="TouchEnd";t[t["TouchCancel"]=10]="TouchCancel";return t})(Yg||{});var Xg=(t=>{t[t["Mouse"]=0]="Mouse";t[t["Pen"]=1]="Pen";t[t["Touch"]=2]="Touch";return t})(Xg||{});function Jg(t){let e=undefined;let n=t[0];let r=1;while(r<t.length){const i=t[r];const s=t[r+1];r+=2;if((i==="optionalAccess"||i==="optionalCall")&&n==null){return undefined}if(i==="access"||i==="optionalAccess"){e=n;n=s(n)}else if(i==="call"||i==="optionalCall"){n=s(((...t)=>n.call(e,...t)));e=undefined}}return n}function Kg(t){return"__ln"in t}class Vg{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 e=this.head;for(let n=0;n<t;n++){e=Jg([e,"optionalAccess",t=>t.next])||null}return e}addNode(t){const e={value:t,previous:null,next:null};t.__ln=e;if(t.previousSibling&&Kg(t.previousSibling)){const n=t.previousSibling.__ln.next;e.next=n;e.previous=t.previousSibling.__ln;t.previousSibling.__ln.next=e;if(n){n.previous=e}}else if(t.nextSibling&&Kg(t.nextSibling)&&t.nextSibling.__ln.previous){const n=t.nextSibling.__ln.previous;e.previous=n;e.next=t.nextSibling.__ln;t.nextSibling.__ln.previous=e;if(n){n.next=e}}else{if(this.head){this.head.previous=e}e.next=this.head;this.head=e}if(e.next===null){this.tail=e}this.length++}removeNode(t){const e=t.__ln;if(!this.head){return}if(!e.previous){this.head=e.next;if(this.head){this.head.previous=null}else{this.tail=null}}else{e.previous.next=e.next;if(e.next){e.next.previous=e.previous}else{this.tail=e.previous}}if(t.__ln){delete t.__ln}this.length--}}const Zg=(t,e)=>`${t}@${e}`;class Qg{constructor(){this.frozen=false;this.locked=false;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}const t=[];const e=new Set;const n=new Vg;const r=t=>{let e=t;let n=Om;while(n===Om){e=e&&e.nextSibling;n=e&&this.mirror.getId(e)}return n};const i=i=>{if(!i.parentNode||!jg(i)){return}const s=am(i.parentNode)?this.mirror.getId(Lg(i)):this.mirror.getId(i.parentNode);const o=r(i);if(s===-1||o===-1){return n.addNode(i)}const c=dg(i,{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:true,newlyAddedElement:true,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:t=>{if(Rg(t,this.mirror)&&!Tg(t,this.blockClass,this.blockSelector,this.unblockSelector,false)){this.iframeManager.addIframe(t)}if(Ng(t,this.mirror)){this.stylesheetManager.trackLinkElement(t)}if(Og(i)){this.shadowDomManager.addShadowRoot(i.shadowRoot,this.doc)}},onIframeLoad:(t,e)=>{if(Tg(t,this.blockClass,this.blockSelector,this.unblockSelector,false)){return}this.iframeManager.attachIframe(t,e);if(t.contentWindow){this.canvasManager.addWindow(t.contentWindow)}this.shadowDomManager.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{this.stylesheetManager.attachLinkElement(t,e)}});if(c){t.push({parentId:s,nextId:o,node:c});e.add(c.id)}};while(this.mapRemoves.length){this.mirror.removeNodeFromMap(this.mapRemoves.shift())}for(const t of this.movedSet){if(ey(this.removes,t,this.mirror)&&!this.movedSet.has(t.parentNode)){continue}i(t)}for(const t of this.addedSet){if(!ry(this.droppedSet,t)&&!ey(this.removes,t,this.mirror)){i(t)}else if(ry(this.movedSet,t)){i(t)}else{this.droppedSet.add(t)}}let s=null;while(n.length){let t=null;if(s){const e=this.mirror.getId(s.value.parentNode);const n=r(s.value);if(e!==-1&&n!==-1){t=s}}if(!t){let e=n.tail;while(e){const n=e;e=e.previous;if(n){const e=this.mirror.getId(n.value.parentNode);const i=r(n.value);if(i===-1)continue;else if(e!==-1){t=n;break}else{const e=n.value;if(e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const r=e.parentNode.host;const i=this.mirror.getId(r);if(i!==-1){t=n;break}}}}}}if(!t){while(n.head){n.removeNode(n.head.value)}break}s=t.previous;n.removeNode(t.value);i(t.value)}const o={texts:this.texts.map((t=>({id:this.mirror.getId(t.node),value:t.value}))).filter((t=>!e.has(t.id))).filter((t=>this.mirror.has(t.id))),attributes:this.attributes.map((t=>{const{attributes:e}=t;if(typeof e.style==="string"){const n=JSON.stringify(t.styleDiff);const r=JSON.stringify(t._unchangedStyles);if(n.length<e.style.length){if((n+r).split("var(").length===e.style.split("var(").length){e.style=t.styleDiff}}}return{id:this.mirror.getId(t.node),attributes:e}})).filter((t=>!e.has(t.id))).filter((t=>this.mirror.has(t.id))),removes:this.removes,adds:t};if(!o.texts.length&&!o.attributes.length&&!o.removes.length&&!o.adds.length){return}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(o)};this.processMutation=t=>{if(Eg(t.target,this.mirror)){return}switch(t.type){case"characterData":{const e=t.target.textContent;if(!Tg(t.target,this.blockClass,this.blockSelector,this.unblockSelector,false)&&e!==t.oldValue){this.texts.push({value:rg(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&e?this.maskTextFn?this.maskTextFn(e,Cg(t.target)):e.replace(/[\S]/g,"*"):e,node:t.target})}break}case"attributes":{const e=t.target;let n=t.attributeName;let r=t.target.getAttribute(n);if(n==="value"){const n=Cm(e);const i=e.tagName;r=Tm(e,i,n);const s=vm({maskInputOptions:this.maskInputOptions,tagName:i,type:n});const o=rg(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,s);r=wm({isMasked:o,element:e,value:r,maskInputFn:this.maskInputFn})}if(Tg(t.target,this.blockClass,this.blockSelector,this.unblockSelector,false)||r===t.oldValue){return}let i=this.attributeMap.get(t.target);if(e.tagName==="IFRAME"&&n==="src"&&!this.keepIframeSrcFn(r)){if(!e.contentDocument){n="rr_src"}else{return}}if(!i){i={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}};this.attributes.push(i);this.attributeMap.set(t.target,i)}if(n==="type"&&e.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"){e.setAttribute("data-rr-is-password","true")}if(!Zm(e.tagName,n)){i.attributes[n]=Vm(this.doc,_m(e.tagName),_m(n),r,e,this.maskAttributeFn);if(n==="style"){if(!this.unattachedDoc){try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}}const n=this.unattachedDoc.createElement("span");if(t.oldValue){n.setAttribute("style",t.oldValue)}for(const t of Array.from(e.style)){const r=e.style.getPropertyValue(t);const s=e.style.getPropertyPriority(t);if(r!==n.style.getPropertyValue(t)||s!==n.style.getPropertyPriority(t)){if(s===""){i.styleDiff[t]=r}else{i.styleDiff[t]=[r,s]}}else{i._unchangedStyles[t]=[r,s]}}for(const t of Array.from(n.style)){if(e.style.getPropertyValue(t)===""){i.styleDiff[t]=false}}}}break}case"childList":{if(Tg(t.target,this.blockClass,this.blockSelector,this.unblockSelector,true)){return}t.addedNodes.forEach((e=>this.genAdds(e,t.target)));t.removedNodes.forEach((e=>{const n=this.mirror.getId(e);const r=am(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);if(Tg(t.target,this.blockClass,this.blockSelector,this.unblockSelector,false)||Eg(e,this.mirror)||!Ig(e,this.mirror)){return}if(this.addedSet.has(e)){ty(this.addedSet,e);this.droppedSet.add(e)}else if(this.addedSet.has(t.target)&&n===-1);else if(Ag(t.target,this.mirror));else if(this.movedSet.has(e)&&this.movedMap[Zg(n,r)]){ty(this.movedSet,e)}else{this.removes.push({parentId:r,id:n,isShadow:am(t.target)&&um(t.target)?true:undefined})}this.mapRemoves.push(e)}));break}}};this.genAdds=(t,e)=>{if(this.processedNodeManager.inOtherBuffer(t,this))return;if(this.addedSet.has(t)||this.movedSet.has(t))return;if(this.mirror.hasNode(t)){if(Eg(t,this.mirror)){return}this.movedSet.add(t);let n=null;if(e&&this.mirror.hasNode(e)){n=this.mirror.getId(e)}if(n&&n!==-1){this.movedMap[Zg(this.mirror.getId(t),n)]=true}}else{this.addedSet.add(t);this.droppedSet.delete(t)}if(!Tg(t,this.blockClass,this.blockSelector,this.unblockSelector,false)){t.childNodes.forEach((t=>this.genAdds(t)));if(Og(t)){t.shadowRoot.childNodes.forEach((e=>{this.processedNodeManager.add(e,this);this.genAdds(e,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((e=>{this[e]=t[e]}))}freeze(){this.frozen=true;this.canvasManager.freeze()}unfreeze(){this.frozen=false;this.canvasManager.unfreeze();this.emit()}isFrozen(){return this.frozen}lock(){this.locked=true;this.canvasManager.lock()}unlock(){this.locked=false;this.canvasManager.unlock();this.emit()}reset(){this.shadowDomManager.reset();this.canvasManager.reset()}}function ty(t,e){t.delete(e);e.childNodes.forEach((e=>ty(t,e)))}function ey(t,e,n){if(t.length===0)return false;return ny(t,e,n)}function ny(t,e,n){const{parentNode:r}=e;if(!r){return false}const i=n.getId(r);if(t.some((t=>t.id===i))){return true}return ny(t,r,n)}function ry(t,e){if(t.size===0)return false;return iy(t,e)}function iy(t,e){const{parentNode:n}=e;if(!n){return false}if(t.has(n)){return true}return iy(t,n)}let sy;function oy(t){sy=t}function cy(){sy=undefined}const ay=t=>{if(!sy){return t}const e=(...e)=>{try{return t(...e)}catch(t){if(sy&&sy(t)===true){return()=>{}}throw t}};return e};function uy(t){let e=undefined;let n=t[0];let r=1;while(r<t.length){const i=t[r];const s=t[r+1];r+=2;if((i==="optionalAccess"||i==="optionalCall")&&n==null){return undefined}if(i==="access"||i==="optionalAccess"){e=n;n=s(n)}else if(i==="call"||i==="optionalCall"){n=s(((...t)=>n.call(e,...t)));e=undefined}}return n}const fy=[];function ly(t){try{if("composedPath"in t){const e=t.composedPath();if(e.length){return e[0]}}else if("path"in t&&t.path.length){return t.path[0]}}catch(t){}return t&&t.target}function dy(t,e){const n=new Qg;fy.push(n);n.init(t);let r=window.MutationObserver||window.__rrMutationObserver;const i=uy([window,"optionalAccess",t=>t.Zone,"optionalAccess",t=>t.__symbol__,"optionalCall",t=>t("MutationObserver")]);if(i&&window[i]){r=window[i]}const s=new r(ay((e=>{if(t.onMutation&&t.onMutation(e)===false){return}n.processMutations.bind(n)(e)})));s.observe(e,{attributes:true,attributeOldValue:true,characterData:true,characterDataOldValue:true,childList:true,subtree:true});return s}function hy({mousemoveCb:t,sampling:e,doc:n,mirror:r}){if(e.mousemove===false){return()=>{}}const i=typeof e.mousemove==="number"?e.mousemove:50;const s=typeof e.mousemoveCallback==="number"?e.mousemoveCallback:500;let o=[];let c;const a=bg(ay((e=>{const n=Date.now()-c;t(o.map((t=>{t.timeOffset-=n;return t})),e);o=[];c=null})),s);const u=ay(bg(ay((t=>{const e=ly(t);const{clientX:n,clientY:i}=$g(t)?t.changedTouches[0]:t;if(!c){c=_g()}o.push({x:n,y:i,id:r.getId(e),timeOffset:_g()-c});a(typeof DragEvent!=="undefined"&&t instanceof DragEvent?Gg.Drag:t instanceof MouseEvent?Gg.MouseMove:Gg.TouchMove)})),i,{trailing:false}));const f=[mg("mousemove",u,n),mg("touchmove",u,n),mg("drag",u,n)];return ay((()=>{f.forEach((t=>t()))}))}function py({mouseInteractionCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,sampling:o}){if(o.mouseInteraction===false){return()=>{}}const c=o.mouseInteraction===true||o.mouseInteraction===undefined?{}:o.mouseInteraction;const a=[];let u=null;const f=e=>o=>{const c=ly(o);if(Tg(c,r,i,s,true)){return}let a=null;let f=e;if("pointerType"in o){switch(o.pointerType){case"mouse":a=Xg.Mouse;break;case"touch":a=Xg.Touch;break;case"pen":a=Xg.Pen;break}if(a===Xg.Touch){if(Yg[e]===Yg.MouseDown){f="TouchStart"}else if(Yg[e]===Yg.MouseUp){f="TouchEnd"}}else if(a===Xg.Pen);}else if($g(o)){a=Xg.Touch}if(a!==null){u=a;if(f.startsWith("Touch")&&a===Xg.Touch||f.startsWith("Mouse")&&a===Xg.Mouse){a=null}}else if(Yg[e]===Yg.Click){a=u;u=null}const l=$g(o)?o.changedTouches[0]:o;if(!l){return}const d=n.getId(c);const{clientX:h,clientY:p}=l;ay(t)({type:Yg[f],id:d,x:h,y:p,...a!==null&&{pointerType:a}})};Object.keys(Yg).filter((t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&c[t]!==false)).forEach((t=>{let n=_m(t);const r=f(t);if(window.PointerEvent){switch(Yg[t]){case Yg.MouseDown:case Yg.MouseUp:n=n.replace("mouse","pointer");break;case Yg.TouchStart:case Yg.TouchEnd:return}}a.push(mg(n,r,e))}));return ay((()=>{a.forEach((t=>t()))}))}function my({scrollCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,sampling:o}){const c=ay(bg(ay((o=>{const c=ly(o);if(!c||Tg(c,r,i,s,true)){return}const a=n.getId(c);if(c===e&&e.defaultView){const n=kg(e.defaultView);t({id:a,x:n.left,y:n.top})}else{t({id:a,x:c.scrollLeft,y:c.scrollTop})}})),o.scroll||100));return mg("scroll",c,e)}function gy({viewportResizeCb:t},{win:e}){let n=-1;let r=-1;const i=ay(bg(ay((()=>{const e=Sg();const i=xg();if(n!==e||r!==i){t({width:Number(i),height:Number(e)});n=e;r=i}})),200));return mg("resize",i,e)}const yy=["INPUT","TEXTAREA","SELECT"];const by=new WeakMap;function vy({inputCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,ignoreClass:o,ignoreSelector:c,maskInputOptions:a,maskInputFn:u,sampling:f,userTriggeredOnInput:l,maskTextClass:d,unmaskTextClass:h,maskTextSelector:p,unmaskTextSelector:m}){function g(t){let n=ly(t);const f=t.isTrusted;const g=n&&km(n.tagName);if(g==="OPTION")n=n.parentElement;if(!n||!g||yy.indexOf(g)<0||Tg(n,r,i,s,true)){return}const b=n;if(b.classList.contains(o)||c&&b.matches(c)){return}const v=Cm(n);let w=Tm(b,g,v);let _=false;const k=vm({maskInputOptions:a,tagName:g,type:v});const S=rg(n,d,p,h,m,k);if(v==="radio"||v==="checkbox"){_=n.checked}w=wm({isMasked:S,element:n,value:w,maskInputFn:u});y(n,l?{text:w,isChecked:_,userTriggered:f}:{text:w,isChecked:_});const x=n.name;if(v==="radio"&&x&&_){e.querySelectorAll(`input[type="radio"][name="${x}"]`).forEach((t=>{if(t!==n){const e=wm({isMasked:S,element:t,value:Tm(t,g,v),maskInputFn:u});y(t,l?{text:e,isChecked:!_,userTriggered:false}:{text:e,isChecked:!_})}}))}}function y(e,r){const i=by.get(e);if(!i||i.text!==r.text||i.isChecked!==r.isChecked){by.set(e,r);const i=n.getId(e);ay(t)({...r,id:i})}}const b=f.input==="last"?["change"]:["input","change"];const v=b.map((t=>mg(t,ay(g),e)));const w=e.defaultView;if(!w){return()=>{v.forEach((t=>t()))}}const _=w.Object.getOwnPropertyDescriptor(w.HTMLInputElement.prototype,"value");const k=[[w.HTMLInputElement.prototype,"value"],[w.HTMLInputElement.prototype,"checked"],[w.HTMLSelectElement.prototype,"value"],[w.HTMLTextAreaElement.prototype,"value"],[w.HTMLSelectElement.prototype,"selectedIndex"],[w.HTMLOptionElement.prototype,"selected"]];if(_&&_.set){v.push(...k.map((t=>vg(t[0],t[1],{set(){ay(g)({target:this,isTrusted:false})}},false,w))))}return ay((()=>{v.forEach((t=>t()))}))}function wy(t){const e=[];function n(t,e){if($y("CSSGroupingRule")&&t.parentRule instanceof CSSGroupingRule||$y("CSSMediaRule")&&t.parentRule instanceof CSSMediaRule||$y("CSSSupportsRule")&&t.parentRule instanceof CSSSupportsRule||$y("CSSConditionRule")&&t.parentRule instanceof CSSConditionRule){const n=Array.from(t.parentRule.cssRules);const r=n.indexOf(t);e.unshift(r)}else if(t.parentStyleSheet){const n=Array.from(t.parentStyleSheet.cssRules);const r=n.indexOf(t);e.unshift(r)}return e}return n(t,e)}function _y(t,e,n){let r,i;if(!t)return{};if(t.ownerNode)r=e.getId(t.ownerNode);else i=n.getId(t);return{styleId:i,id:r}}function ky({styleSheetRuleCb:t,mirror:e,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype){return()=>{}}const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:ay(((r,i,s)=>{const[o,c]=s;const{id:a,styleId:u}=_y(i,e,n.styleMirror);if(a&&a!==-1||u&&u!==-1){t({id:a,styleId:u,adds:[{rule:o,index:c}]})}return r.apply(i,s)}))});const s=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:ay(((r,i,s)=>{const[o]=s;const{id:c,styleId:a}=_y(i,e,n.styleMirror);if(c&&c!==-1||a&&a!==-1){t({id:c,styleId:a,removes:[{index:o}]})}return r.apply(i,s)}))});let o;if(r.CSSStyleSheet.prototype.replace){o=r.CSSStyleSheet.prototype.replace;r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:ay(((r,i,s)=>{const[o]=s;const{id:c,styleId:a}=_y(i,e,n.styleMirror);if(c&&c!==-1||a&&a!==-1){t({id:c,styleId:a,replace:o})}return r.apply(i,s)}))})}let c;if(r.CSSStyleSheet.prototype.replaceSync){c=r.CSSStyleSheet.prototype.replaceSync;r.CSSStyleSheet.prototype.replaceSync=new Proxy(c,{apply:ay(((r,i,s)=>{const[o]=s;const{id:c,styleId:a}=_y(i,e,n.styleMirror);if(c&&c!==-1||a&&a!==-1){t({id:c,styleId:a,replaceSync:o})}return r.apply(i,s)}))})}const a={};if(My("CSSGroupingRule")){a.CSSGroupingRule=r.CSSGroupingRule}else{if(My("CSSMediaRule")){a.CSSMediaRule=r.CSSMediaRule}if(My("CSSConditionRule")){a.CSSConditionRule=r.CSSConditionRule}if(My("CSSSupportsRule")){a.CSSSupportsRule=r.CSSSupportsRule}}const u={};Object.entries(a).forEach((([r,i])=>{u[r]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule};i.prototype.insertRule=new Proxy(u[r].insertRule,{apply:ay(((r,i,s)=>{const[o,c]=s;const{id:a,styleId:u}=_y(i.parentStyleSheet,e,n.styleMirror);if(a&&a!==-1||u&&u!==-1){t({id:a,styleId:u,adds:[{rule:o,index:[...wy(i),c||0]}]})}return r.apply(i,s)}))});i.prototype.deleteRule=new Proxy(u[r].deleteRule,{apply:ay(((r,i,s)=>{const[o]=s;const{id:c,styleId:a}=_y(i.parentStyleSheet,e,n.styleMirror);if(c&&c!==-1||a&&a!==-1){t({id:c,styleId:a,removes:[{index:[...wy(i),o]}]})}return r.apply(i,s)}))})}));return ay((()=>{r.CSSStyleSheet.prototype.insertRule=i;r.CSSStyleSheet.prototype.deleteRule=s;o&&(r.CSSStyleSheet.prototype.replace=o);c&&(r.CSSStyleSheet.prototype.replaceSync=c);Object.entries(a).forEach((([t,e])=>{e.prototype.insertRule=u[t].insertRule;e.prototype.deleteRule=u[t].deleteRule}))}))}function Sy({mirror:t,stylesheetManager:e},n){let r=null;if(n.nodeName==="#document")r=t.getId(n);else r=t.getId(n.host);const i=n.nodeName==="#document"?uy([n,"access",t=>t.defaultView,"optionalAccess",t=>t.Document]):uy([n,"access",t=>t.ownerDocument,"optionalAccess",t=>t.defaultView,"optionalAccess",t=>t.ShadowRoot]);const s=uy([i,"optionalAccess",t=>t.prototype])?Object.getOwnPropertyDescriptor(uy([i,"optionalAccess",t=>t.prototype]),"adoptedStyleSheets"):undefined;if(r===null||r===-1||!i||!s)return()=>{};Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get(){return uy([s,"access",t=>t.get,"optionalAccess",t=>t.call,"call",t=>t(this)])},set(t){const n=uy([s,"access",t=>t.set,"optionalAccess",t=>t.call,"call",e=>e(this,t)]);if(r!==null&&r!==-1){try{e.adoptStyleSheets(t,r)}catch(t){}}return n}});return ay((()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get:s.get,set:s.set})}))}function xy({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){const s=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:ay(((i,o,c)=>{const[a,u,f]=c;if(n.has(a)){return s.apply(o,[a,u,f])}const{id:l,styleId:d}=_y(uy([o,"access",t=>t.parentRule,"optionalAccess",t=>t.parentStyleSheet]),e,r.styleMirror);if(l&&l!==-1||d&&d!==-1){t({id:l,styleId:d,set:{property:a,value:u,priority:f},index:wy(o.parentRule)})}return i.apply(o,c)}))});const o=i.CSSStyleDeclaration.prototype.removeProperty;i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:ay(((i,s,c)=>{const[a]=c;if(n.has(a)){return o.apply(s,[a])}const{id:u,styleId:f}=_y(uy([s,"access",t=>t.parentRule,"optionalAccess",t=>t.parentStyleSheet]),e,r.styleMirror);if(u&&u!==-1||f&&f!==-1){t({id:u,styleId:f,remove:{property:a},index:wy(s.parentRule)})}return i.apply(s,c)}))});return ay((()=>{i.CSSStyleDeclaration.prototype.setProperty=s;i.CSSStyleDeclaration.prototype.removeProperty=o}))}function Cy({mediaInteractionCb:t,blockClass:e,blockSelector:n,unblockSelector:r,mirror:i,sampling:s,doc:o}){const c=ay((o=>bg(ay((s=>{const c=ly(s);if(!c||Tg(c,e,n,r,true)){return}const{currentTime:a,volume:u,muted:f,playbackRate:l}=c;t({type:o,id:i.getId(c),currentTime:a,volume:u,muted:f,playbackRate:l})})),s.media||500)));const a=[mg("play",c(0),o),mg("pause",c(1),o),mg("seeked",c(2),o),mg("volumechange",c(3),o),mg("ratechange",c(4),o)];return ay((()=>{a.forEach((t=>t()))}))}function Ty({fontCb:t,doc:e}){const n=e.defaultView;if(!n){return()=>{}}const r=[];const i=new WeakMap;const s=n.FontFace;n.FontFace=function t(e,n,r){const o=new s(e,n,r);i.set(o,{family:e,buffer:typeof n!=="string",descriptors:r,fontSource:typeof n==="string"?n:JSON.stringify(Array.from(new Uint8Array(n)))});return o};const o=wg(e.fonts,"add",(function(e){return function(n){qg(ay((()=>{const e=i.get(n);if(e){t(e);i.delete(n)}})),0);return e.apply(this,[n])}}));r.push((()=>{n.FontFace=s}));r.push(o);return ay((()=>{r.forEach((t=>t()))}))}function Iy(t){const{doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,selectionCb:o}=t;let c=true;const a=ay((()=>{const t=e.getSelection();if(!t||c&&uy([t,"optionalAccess",t=>t.isCollapsed]))return;c=t.isCollapsed||false;const a=[];const u=t.rangeCount||0;for(let e=0;e<u;e++){const o=t.getRangeAt(e);const{startContainer:c,startOffset:u,endContainer:f,endOffset:l}=o;const d=Tg(c,r,i,s,true)||Tg(f,r,i,s,true);if(d)continue;a.push({start:n.getId(c),startOffset:u,end:n.getId(f),endOffset:l})}o({ranges:a})}));a();return mg("selectionchange",a)}function Ey({doc:t,customElementCb:e}){const n=t.defaultView;if(!n||!n.customElements)return()=>{};const r=wg(n.customElements,"define",(function(t){return function(n,r,i){try{e({define:{name:n}})}catch(t){}return t.apply(this,[n,r,i])}}));return r}function Ay(t,e={}){const n=t.doc.defaultView;if(!n){return()=>{}}let r;if(t.recordDOM){r=dy(t,t.doc)}const i=hy(t);const s=py(t);const o=my(t);const c=gy(t,{win:n});const a=vy(t);const u=Cy(t);let f=()=>{};let l=()=>{};let d=()=>{};let h=()=>{};if(t.recordDOM){f=ky(t,{win:n});l=Sy(t,t.doc);d=xy(t,{win:n});if(t.collectFonts){h=Ty(t)}}const p=Iy(t);const m=Ey(t);const g=[];for(const e of t.plugins){g.push(e.observer(e.callback,n,e.options))}return ay((()=>{fy.forEach((t=>t.reset()));uy([r,"optionalAccess",t=>t.disconnect,"call",t=>t()]);i();s();o();c();a();u();f();l();d();h();p();m();g.forEach((t=>t()))}))}function $y(t){return typeof window[t]!=="undefined"}function My(t){return Boolean(typeof window[t]!=="undefined"&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class Ry{constructor(t){this.generateIdFn=t;this.iframeIdToRemoteIdMap=new WeakMap;this.iframeRemoteIdToIdMap=new WeakMap}getId(t,e,n,r){const i=n||this.getIdToRemoteIdMap(t);const s=r||this.getRemoteIdToIdMap(t);let o=i.get(e);if(!o){o=this.generateIdFn();i.set(e,o);s.set(o,e)}return o}getIds(t,e){const n=this.getIdToRemoteIdMap(t);const r=this.getRemoteIdToIdMap(t);return e.map((e=>this.getId(t,e,n,r)))}getRemoteId(t,e,n){const r=n||this.getRemoteIdToIdMap(t);if(typeof e!=="number")return e;const i=r.get(e);if(!i)return-1;return i}getRemoteIds(t,e){const n=this.getRemoteIdToIdMap(t);return e.map((e=>this.getRemoteId(t,e,n)))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap;this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t);this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let e=this.iframeIdToRemoteIdMap.get(t);if(!e){e=new Map;this.iframeIdToRemoteIdMap.set(t,e)}return e}getRemoteIdToIdMap(t){let e=this.iframeRemoteIdToIdMap.get(t);if(!e){e=new Map;this.iframeRemoteIdToIdMap.set(t,e)}return e}}function Ny(t){let e=undefined;let n=t[0];let r=1;while(r<t.length){const i=t[r];const s=t[r+1];r+=2;if((i==="optionalAccess"||i==="optionalCall")&&n==null){return undefined}if(i==="access"||i==="optionalAccess"){e=n;n=s(n)}else if(i==="call"||i==="optionalCall"){n=s(((...t)=>n.call(e,...t)));e=undefined}}return n}class Oy{constructor(){this.crossOriginIframeMirror=new Ry(Dm);this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class Dy{constructor(t){this.iframes=new WeakMap;this.crossOriginIframeMap=new WeakMap;this.crossOriginIframeMirror=new Ry(Dm);this.crossOriginIframeRootIdMap=new WeakMap;this.mutationCb=t.mutationCb;this.wrappedEmit=t.wrappedEmit;this.stylesheetManager=t.stylesheetManager;this.recordCrossOriginIframes=t.recordCrossOriginIframes;this.crossOriginIframeStyleMirror=new Ry(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror));this.mirror=t.mirror;if(this.recordCrossOriginIframes){window.addEventListener("message",this.handleMessage.bind(this))}}addIframe(t){this.iframes.set(t,true);if(t.contentWindow)this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,e){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:true});Ny([this,"access",t=>t.loadListener,"optionalCall",e=>e(t)]);if(t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0)this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const e=t;if(e.data.type!=="rrweb"||e.origin!==e.data.origin)return;const n=t.source;if(!n)return;const r=this.crossOriginIframeMap.get(t.source);if(!r)return;const i=this.transformCrossOriginEvent(r,e.data.event);if(i)this.wrappedEmit(i,e.data.isCheckout)}transformCrossOriginEvent(t,e){switch(e.type){case Wg.FullSnapshot:{this.crossOriginIframeMirror.reset(t);this.crossOriginIframeStyleMirror.reset(t);this.replaceIdOnNode(e.data.node,t);const n=e.data.node.id;this.crossOriginIframeRootIdMap.set(t,n);this.patchRootIdOnNode(e.data.node,n);return{timestamp:e.timestamp,type:Wg.IncrementalSnapshot,data:{source:Gg.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:true}}}case Wg.Meta:case Wg.Load:case Wg.DomContentLoaded:{return false}case Wg.Plugin:{return e}case Wg.Custom:{this.replaceIds(e.data.payload,t,["id","parentId","previousId","nextId"]);return e}case Wg.IncrementalSnapshot:{switch(e.data.source){case Gg.Mutation:{e.data.adds.forEach((e=>{this.replaceIds(e,t,["parentId","nextId","previousId"]);this.replaceIdOnNode(e.node,t);const n=this.crossOriginIframeRootIdMap.get(t);n&&this.patchRootIdOnNode(e.node,n)}));e.data.removes.forEach((e=>{this.replaceIds(e,t,["parentId","id"])}));e.data.attributes.forEach((e=>{this.replaceIds(e,t,["id"])}));e.data.texts.forEach((e=>{this.replaceIds(e,t,["id"])}));return e}case Gg.Drag:case Gg.TouchMove:case Gg.MouseMove:{e.data.positions.forEach((e=>{this.replaceIds(e,t,["id"])}));return e}case Gg.ViewportResize:{return false}case Gg.MediaInteraction:case Gg.MouseInteraction:case Gg.Scroll:case Gg.CanvasMutation:case Gg.Input:{this.replaceIds(e.data,t,["id"]);return e}case Gg.StyleSheetRule:case Gg.StyleDeclaration:{this.replaceIds(e.data,t,["id"]);this.replaceStyleIds(e.data,t,["styleId"]);return e}case Gg.Font:{return e}case Gg.Selection:{e.data.ranges.forEach((e=>{this.replaceIds(e,t,["start","end"])}));return e}case Gg.AdoptedStyleSheet:{this.replaceIds(e.data,t,["id"]);this.replaceStyleIds(e.data,t,["styleIds"]);Ny([e,"access",t=>t.data,"access",t=>t.styles,"optionalAccess",t=>t.forEach,"call",e=>e((e=>{this.replaceStyleIds(e,t,["styleId"])}))]);return e}}}}return false}replace(t,e,n,r){for(const i of r){if(!Array.isArray(e[i])&&typeof e[i]!=="number")continue;if(Array.isArray(e[i])){e[i]=t.getIds(n,e[i])}else{e[i]=t.getId(n,e[i])}}return e}replaceIds(t,e,n){return this.replace(this.crossOriginIframeMirror,t,e,n)}replaceStyleIds(t,e,n){return this.replace(this.crossOriginIframeStyleMirror,t,e,n)}replaceIdOnNode(t,e){this.replaceIds(t,e,["id","rootId"]);if("childNodes"in t){t.childNodes.forEach((t=>{this.replaceIdOnNode(t,e)}))}}patchRootIdOnNode(t,e){if(t.type!==om.Document&&!t.rootId)t.rootId=e;if("childNodes"in t){t.childNodes.forEach((t=>{this.patchRootIdOnNode(t,e)}))}}}class Ly{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class Fy{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,e){if(!um(t))return;if(this.shadowDoms.has(t))return;this.shadowDoms.add(t);this.bypassOptions.canvasManager.addShadowRoot(t);const n=dy({...this.bypassOptions,doc:e,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push((()=>n.disconnect()));this.restoreHandlers.push(my({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror}));qg((()=>{if(t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0)this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host));this.restoreHandlers.push(Sy({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))}),0)}observeAttachShadow(t){if(!t.contentWindow||!t.contentDocument)return;this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,e){const n=this;this.restoreHandlers.push(wg(t.prototype,"attachShadow",(function(t){return function(r){const i=t.call(this,r);if(this.shadowRoot&&jg(this))n.addShadowRoot(this.shadowRoot,e);return i}})))}reset(){this.restoreHandlers.forEach((t=>{try{t()}catch(t){}}));this.restoreHandlers=[];this.shadowDoms=new WeakSet;this.bypassOptions.canvasManager.resetShadowRoots()}}class Py{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class jy{constructor(t){this.trackedLinkElements=new WeakSet;this.styleMirror=new Dg;this.mutationCb=t.mutationCb;this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,e){if("_cssText"in e.attributes)this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e.id,attributes:e.attributes}]});this.trackLinkElement(t)}trackLinkElement(t){if(this.trackedLinkElements.has(t))return;this.trackedLinkElements.add(t);this.trackStylesheetInLinkElement(t)}adoptStyleSheets(t,e){if(t.length===0)return;const n={id:e,styleIds:[]};const r=[];for(const e of t){let t;if(!this.styleMirror.has(e)){t=this.styleMirror.add(e);r.push({styleId:t,rules:Array.from(e.rules||CSSRule,((t,e)=>({rule:hm(t),index:e})))})}else t=this.styleMirror.getId(e);n.styleIds.push(t)}if(r.length>0)n.styles=r;this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset();this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class By{constructor(){this.nodeMap=new WeakMap;this.loop=true;this.periodicallyClear()}periodicallyClear(){Ug((()=>{this.clear();if(this.loop)this.periodicallyClear()}))}inOtherBuffer(t,e){const n=this.nodeMap.get(t);return n&&Array.from(n).some((t=>t!==e))}add(t,e){this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(e))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=false}}let zy;let Uy;try{if(Array.from([1],(t=>t*2))[0]!==2){const t=document.createElement("iframe");document.body.appendChild(t);Array.from=wr([t,"access",t=>t.contentWindow,"optionalAccess",t=>t.Array,"access",t=>t.from])||Array.from;document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}const qy=bm();function Hy(t={}){const{emit:e,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:s=null,unblockSelector:o=null,ignoreClass:c="rr-ignore",ignoreSelector:a=null,maskAllText:u=false,maskTextClass:f="rr-mask",unmaskTextClass:l=null,maskTextSelector:d=null,unmaskTextSelector:h=null,inlineStylesheet:p=true,maskAllInputs:m,maskInputOptions:g,slimDOMOptions:y,maskAttributeFn:b,maskInputFn:v,maskTextFn:w,maxCanvasSize:_=null,packFn:k,sampling:S={},dataURLOptions:x={},mousemoveWait:C,recordDOM:T=true,recordCanvas:I=false,recordCrossOriginIframes:E=false,recordAfter:A=(t.recordAfter==="DOMContentLoaded"?t.recordAfter:"load"),userTriggeredOnInput:$=false,collectFonts:M=false,inlineImages:R=false,plugins:N,keepIframeSrcFn:O=(()=>false),ignoreCSSAttributes:D=new Set([]),errorHandler:L,onMutation:F,getCanvasManager:P}=t;oy(L);const j=E?window.parent===window:true;let B=false;if(!j){try{if(window.parent.document){B=false}}catch(t){B=true}}if(j&&!e){throw new Error("emit function is required")}if(C!==undefined&&S.mousemove===undefined){S.mousemove=C}qy.reset();const z=m===true?{color:true,date:true,"datetime-local":true,email:true,month:true,number:true,range:true,search:true,tel:true,text:true,time:true,url:true,week:true,textarea:true,select:true,radio:true,checkbox:true}:g!==undefined?g:{};const U=y===true||y==="all"?{script:true,comment:true,headFavicon:true,headWhitespace:true,headMetaSocial:true,headMetaRobots:true,headMetaHttpEquiv:true,headMetaVerification:true,headMetaAuthorship:y==="all",headMetaDescKeywords:y==="all"}:y?y:{};Mg();let q;let H=0;const W=t=>{for(const e of N||[]){if(e.eventProcessor){t=e.eventProcessor(t)}}if(k&&!B){t=k(t)}return t};zy=(t,i)=>{const s=t;s.timestamp=_g();if(wr([fy,"access",t=>t[0],"optionalAccess",t=>t.isFrozen,"call",t=>t()])&&s.type!==Wg.FullSnapshot&&!(s.type===Wg.IncrementalSnapshot&&s.data.source===Gg.Mutation)){fy.forEach((t=>t.unfreeze()))}if(j){wr([e,"optionalCall",t=>t(W(s),i)])}else if(B){const t={type:"rrweb",event:W(s),origin:window.location.origin,isCheckout:i};window.parent.postMessage(t,"*")}if(s.type===Wg.FullSnapshot){q=s;H=0}else if(s.type===Wg.IncrementalSnapshot){if(s.data.source===Gg.Mutation&&s.data.isAttachIframe){return}H++;const t=r&&H>=r;const e=n&&q&&s.timestamp-q.timestamp>n;if(t||e){et(true)}}};const G=t=>{zy({type:Wg.IncrementalSnapshot,data:{source:Gg.Mutation,...t}})};const Y=t=>zy({type:Wg.IncrementalSnapshot,data:{source:Gg.Scroll,...t}});const X=t=>zy({type:Wg.IncrementalSnapshot,data:{source:Gg.CanvasMutation,...t}});const J=t=>zy({type:Wg.IncrementalSnapshot,data:{source:Gg.AdoptedStyleSheet,...t}});const K=new jy({mutationCb:G,adoptedStyleSheetCb:J});const V=typeof __RRWEB_EXCLUDE_IFRAME__==="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new Oy:new Dy({mirror:qy,mutationCb:G,stylesheetManager:K,recordCrossOriginIframes:E,wrappedEmit:zy});for(const t of N||[]){if(t.getMirror)t.getMirror({nodeMirror:qy,crossOriginIframeMirror:V.crossOriginIframeMirror,crossOriginIframeStyleMirror:V.crossOriginIframeStyleMirror})}const Z=new By;const Q=Gy(P,{mirror:qy,win:window,mutationCb:t=>zy({type:Wg.IncrementalSnapshot,data:{source:Gg.CanvasMutation,...t}}),recordCanvas:I,blockClass:i,blockSelector:s,unblockSelector:o,maxCanvasSize:_,sampling:S["canvas"],dataURLOptions:x,errorHandler:L});const tt=typeof __RRWEB_EXCLUDE_SHADOW_DOM__==="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new Ly:new Fy({mutationCb:G,scrollCb:Y,bypassOptions:{onMutation:F,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:u,maskTextClass:f,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:h,inlineStylesheet:p,maskInputOptions:z,dataURLOptions:x,maskAttributeFn:b,maskTextFn:w,maskInputFn:v,recordCanvas:I,inlineImages:R,sampling:S,slimDOMOptions:U,iframeManager:V,stylesheetManager:K,canvasManager:Q,keepIframeSrcFn:O,processedNodeManager:Z},mirror:qy});const et=(t=false)=>{if(!T){return}zy({type:Wg.Meta,data:{href:window.location.href,width:xg(),height:Sg()}},t);K.reset();tt.init();fy.forEach((t=>t.lock()));const e=hg(document,{mirror:qy,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:u,maskTextClass:f,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:h,inlineStylesheet:p,maskAllInputs:z,maskAttributeFn:b,maskInputFn:v,maskTextFn:w,slimDOM:U,dataURLOptions:x,recordCanvas:I,inlineImages:R,onSerialize:t=>{if(Rg(t,qy)){V.addIframe(t)}if(Ng(t,qy)){K.trackLinkElement(t)}if(Og(t)){tt.addShadowRoot(t.shadowRoot,document)}},onIframeLoad:(t,e)=>{V.attachIframe(t,e);if(t.contentWindow){Q.addWindow(t.contentWindow)}tt.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{K.attachLinkElement(t,e)},keepIframeSrcFn:O});if(!e){return console.warn("Failed to snapshot the document")}zy({type:Wg.FullSnapshot,data:{node:e,initialOffset:kg(window)}});fy.forEach((t=>t.unlock()));if(document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0)K.adoptStyleSheets(document.adoptedStyleSheets,qy.getId(document))};Uy=et;try{const t=[];const e=t=>ay(Ay)({onMutation:F,mutationCb:G,mousemoveCb:(t,e)=>zy({type:Wg.IncrementalSnapshot,data:{source:e,positions:t}}),mouseInteractionCb:t=>zy({type:Wg.IncrementalSnapshot,data:{source:Gg.MouseInteraction,...t}}),scrollCb:Y,viewportResizeCb:t=>zy({type:Wg.IncrementalSnapshot,data:{source:Gg.ViewportResize,...t}}),inputCb:t=>zy({type:Wg.IncrementalSnapshot,data:{source:Gg.Input,...t}}),mediaInteractionCb:t=>zy({type:Wg.IncrementalSnapshot,data:{source:Gg.MediaInteraction,...t}}),styleSheetRuleCb:t=>zy({type:Wg.IncrementalSnapshot,data:{source:Gg.StyleSheetRule,...t}}),styleDeclarationCb:t=>zy({type:Wg.IncrementalSnapshot,data:{source:Gg.StyleDeclaration,...t}}),canvasMutationCb:X,fontCb:t=>zy({type:Wg.IncrementalSnapshot,data:{source:Gg.Font,...t}}),selectionCb:t=>{zy({type:Wg.IncrementalSnapshot,data:{source:Gg.Selection,...t}})},customElementCb:t=>{zy({type:Wg.IncrementalSnapshot,data:{source:Gg.CustomElement,...t}})},blockClass:i,ignoreClass:c,ignoreSelector:a,maskAllText:u,maskTextClass:f,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:h,maskInputOptions:z,inlineStylesheet:p,sampling:S,recordDOM:T,recordCanvas:I,inlineImages:R,userTriggeredOnInput:$,collectFonts:M,doc:t,maskAttributeFn:b,maskInputFn:v,maskTextFn:w,keepIframeSrcFn:O,blockSelector:s,unblockSelector:o,slimDOMOptions:U,dataURLOptions:x,mirror:qy,iframeManager:V,stylesheetManager:K,shadowDomManager:tt,processedNodeManager:Z,canvasManager:Q,ignoreCSSAttributes:D,plugins:wr([N,"optionalAccess",t=>t.filter,"call",t=>t((t=>t.observer)),"optionalAccess",t=>t.map,"call",t=>t((t=>({observer:t.observer,options:t.options,callback:e=>zy({type:Wg.Plugin,data:{plugin:t.name,payload:e}})})))])||[]},{});V.addLoadListener((n=>{try{t.push(e(n.contentDocument))}catch(t){console.warn(t)}}));const n=()=>{et();t.push(e(document))};if(document.readyState==="interactive"||document.readyState==="complete"){n()}else{t.push(mg("DOMContentLoaded",(()=>{zy({type:Wg.DomContentLoaded,data:{}});if(A==="DOMContentLoaded")n()})));t.push(mg("load",(()=>{zy({type:Wg.Load,data:{}});if(A==="load")n()}),window))}return()=>{t.forEach((t=>t()));Z.destroy();Uy=undefined;cy()}}catch(t){console.warn(t)}}function Wy(t){if(!Uy){throw new Error("please take full snapshot after start recording")}Uy(t)}Hy.mirror=qy;Hy.takeFullSnapshot=Wy;function Gy(t,e){try{return t?t(e):new Py}catch(t){console.warn("Unable to initialize CanvasManager");return new Py}}const Yy=typeof __SENTRY_DEBUG__==="undefined"||__SENTRY_DEBUG__;const Xy=["info","warn","error","log"];const Jy="[Replay] ";function Ky(t,e="info"){Cc({category:"console",data:{logger:"replay"},level:e,message:`${Jy}${t}`},{level:e})}function Vy(){let t=false;let e=false;const n={exception:()=>undefined,infoTick:()=>undefined,setConfig:n=>{t=n.captureExceptions;e=n.traceInternals}};if(Yy){Xy.forEach((t=>{n[t]=(...n)=>{G[t](Jy,...n);if(e){Ky(n[0])}}}));n.exception=(r,...i)=>{if(n.error){n.error(...i)}G.error(Jy,r);if(t){fo(r)}else if(e){Ky(r)}};n.infoTick=(...t)=>{G.info(Jy,...t);if(e){setTimeout((()=>Ky(t[0])),0)}}}else{Xy.forEach((t=>{n[t]=()=>undefined}))}return n}const Zy=Vy();const Qy=3;const tb=5;function eb(t){const e=t>9999999999;return e?t:t*1e3}function nb(t){const e=t>9999999999;return e?t/1e3:t}function rb(t,e){if(e.category==="sentry.transaction"){return}if(["ui.click","ui.input"].includes(e.category)){t.triggerUserActivity()}else{t.checkAndHandleExpiredSession()}t.addUpdate((()=>{t.throttledAddEvent({type:Wg.Custom,timestamp:(e.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:Ie(e,10,1e3)}});return e.category==="console"}))}const ib="button,a";function sb(t){const e=t.closest(ib);return e||t}function ob(t){const e=cb(t);if(!e||!(e instanceof Element)){return e}return sb(e)}function cb(t){if(ab(t)){return t.target}return t}function ab(t){return typeof t==="object"&&!!t&&"target"in t}let ub;function fb(t){if(!ub){ub=[];lb()}ub.push(t);return()=>{const e=ub?ub.indexOf(t):-1;if(e>-1){ub.splice(e,1)}}}function lb(){et(jp,"open",(function(t){return function(...e){if(ub){try{ub.forEach((t=>t()))}catch(t){}}return t.apply(jp,e)}}))}const db=new Set([Gg.Mutation,Gg.StyleSheetRule,Gg.StyleDeclaration,Gg.AdoptedStyleSheet,Gg.CanvasMutation,Gg.Selection,Gg.MediaInteraction]);function hb(t,e,n){t.handleClick(e,n)}class pb{constructor(t,e,n=rb){this._lastMutation=0;this._lastScroll=0;this._clicks=[];this._timeout=e.timeout/1e3;this._threshold=e.threshold/1e3;this._scollTimeout=e.scrollTimeout/1e3;this._replay=t;this._ignoreSelector=e.ignoreSelector;this._addBreadcrumbEvent=n}addListeners(){const t=fb((()=>{this._lastMutation=bb()}));this._teardown=()=>{t();this._clicks=[];this._lastMutation=0;this._lastScroll=0}}removeListeners(){if(this._teardown){this._teardown()}if(this._checkClickTimeout){clearTimeout(this._checkClickTimeout)}}handleClick(t,e){if(gb(e,this._ignoreSelector)||!yb(t)){return}const n={timestamp:nb(t.timestamp),clickBreadcrumb:t,clickCount:0,node:e};if(this._clicks.some((t=>t.node===n.node&&Math.abs(t.timestamp-n.timestamp)<1))){return}this._clicks.push(n);if(this._clicks.length===1){this._scheduleCheckClicks()}}registerMutation(t=Date.now()){this._lastMutation=nb(t)}registerScroll(t=Date.now()){this._lastScroll=nb(t)}registerClick(t){const e=sb(t);this._handleMultiClick(e)}_handleMultiClick(t){this._getClicks(t).forEach((t=>{t.clickCount++}))}_getClicks(t){return this._clicks.filter((e=>e.node===t))}_checkClicks(){const t=[];const e=bb();this._clicks.forEach((n=>{if(!n.mutationAfter&&this._lastMutation){n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:undefined}if(!n.scrollAfter&&this._lastScroll){n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:undefined}if(n.timestamp+this._timeout<=e){t.push(n)}}));for(const e of t){const t=this._clicks.indexOf(e);if(t>-1){this._generateBreadcrumbs(e);this._clicks.splice(t,1)}}if(this._clicks.length){this._scheduleCheckClicks()}}_generateBreadcrumbs(t){const e=this._replay;const n=t.scrollAfter&&t.scrollAfter<=this._scollTimeout;const r=t.mutationAfter&&t.mutationAfter<=this._threshold;const i=!n&&!r;const{clickCount:s,clickBreadcrumb:o}=t;if(i){const n=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3;const r=n<this._timeout*1e3?"mutation":"timeout";const i={type:"default",message:o.message,timestamp:o.timestamp,category:"ui.slowClickDetected",data:{...o.data,url:jp.location.href,route:e.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:s||1}};this._addBreadcrumbEvent(e,i);return}if(s>1){const t={type:"default",message:o.message,timestamp:o.timestamp,category:"ui.multiClick",data:{...o.data,url:jp.location.href,route:e.getCurrentRoute(),clickCount:s,metric:true}};this._addBreadcrumbEvent(e,t)}}_scheduleCheckClicks(){if(this._checkClickTimeout){clearTimeout(this._checkClickTimeout)}this._checkClickTimeout=$d((()=>this._checkClicks()),1e3)}}const mb=["A","BUTTON","INPUT"];function gb(t,e){if(!mb.includes(t.tagName)){return true}if(t.tagName==="INPUT"&&!["submit","button"].includes(t.getAttribute("type")||"")){return true}if(t.tagName==="A"&&(t.hasAttribute("download")||t.hasAttribute("target")&&t.getAttribute("target")!=="_self")){return true}if(e&&t.matches(e)){return true}return false}function yb(t){return!!(t.data&&typeof t.data.nodeId==="number"&&t.timestamp)}function bb(){return Date.now()/1e3}function vb(t,e){try{if(!wb(e)){return}const{source:n}=e.data;if(db.has(n)){t.registerMutation(e.timestamp)}if(n===Gg.Scroll){t.registerScroll(e.timestamp)}if(_b(e)){const{type:n,id:r}=e.data;const i=Hy.mirror.getNode(r);if(i instanceof HTMLElement&&n===Yg.Click){t.registerClick(i)}}}catch(t){}}function wb(t){return t.type===Qy}function _b(t){return t.data.source===Gg.MouseInteraction}function kb(t){return{timestamp:Date.now()/1e3,type:"default",...t}}var Sb;(function(t){t[t["Document"]=0]="Document";t[t["DocumentType"]=1]="DocumentType";t[t["Element"]=2]="Element";t[t["Text"]=3]="Text";t[t["CDATA"]=4]="CDATA";t[t["Comment"]=5]="Comment"})(Sb||(Sb={}));const xb=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function Cb(t){const e={};if(!t["data-sentry-component"]&&t["data-sentry-element"]){t["data-sentry-component"]=t["data-sentry-element"]}for(const n in t){if(xb.has(n)){let r=n;if(n==="data-testid"||n==="data-test-id"){r="testId"}e[r]=t[n]}}return e}const Tb=t=>e=>{if(!t.isEnabled()){return}const n=Eb(e);if(!n){return}const r=e.name==="click";const i=r?e.event:undefined;if(r&&t.clickDetector&&i&&i.target&&!i.altKey&&!i.metaKey&&!i.ctrlKey&&!i.shiftKey){hb(t.clickDetector,n,ob(e.event))}rb(t,n)};function Ib(t,e){const n=Hy.mirror.getId(t);const r=n&&Hy.mirror.getNode(n);const i=r&&Hy.mirror.getMeta(r);const s=i&&$b(i)?i:null;return{message:e,data:s?{nodeId:n,node:{id:n,tagName:s.tagName,textContent:Array.from(s.childNodes).map((t=>t.type===Sb.Text&&t.textContent)).filter(Boolean).map((t=>t.trim())).join(""),attributes:Cb(s.attributes)}}:{}}}function Eb(t){const{target:e,message:n}=Ab(t);return kb({category:`ui.${t.name}`,...Ib(e,n)})}function Ab(t){const e=t.name==="click";let n;let r=null;try{r=e?ob(t.event):cb(t.event);n=D(r,{maxStringLength:200})||"<unknown>"}catch(t){n="<unknown>"}return{target:r,message:n}}function $b(t){return t.type===Sb.Element}function Mb(t,e){if(!t.isEnabled()){return}t.updateUserActivity();const n=Rb(e);if(!n){return}rb(t,n)}function Rb(t){const{metaKey:e,shiftKey:n,ctrlKey:r,altKey:i,key:s,target:o}=t;if(!o||Nb(o)||!s){return null}const c=e||r||i;const a=s.length===1;if(!c&&a){return null}const u=D(o,{maxStringLength:200})||"<unknown>";const f=Ib(o,u);return kb({category:"ui.keyDown",message:u,data:{...f.data,metaKey:e,shiftKey:n,ctrlKey:r,altKey:i,key:s}})}function Nb(t){return t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable}const Ob={resource:zb,paint:jb,navigation:Bb};function Db(t,e){return({metric:n})=>void e.replayPerformanceEntries.push(t(n))}function Lb(t){return t.map(Fb).filter(Boolean)}function Fb(t){const e=Ob[t.entryType];if(!e){return null}return e(t)}function Pb(t){return((Yt||jp.performance.timeOrigin)+t)/1e3}function jb(t){const{duration:e,entryType:n,name:r,startTime:i}=t;const s=Pb(i);return{type:n,name:r,start:s,end:s+e,data:undefined}}function Bb(t){const{entryType:e,name:n,decodedBodySize:r,duration:i,domComplete:s,encodedBodySize:o,domContentLoadedEventStart:c,domContentLoadedEventEnd:a,domInteractive:u,loadEventStart:f,loadEventEnd:l,redirectCount:d,startTime:h,transferSize:p,type:m}=t;if(i===0){return null}return{type:`${e}.${m}`,start:Pb(h),end:Pb(s),name:n,data:{size:p,decodedBodySize:r,encodedBodySize:o,duration:i,domInteractive:u,domContentLoadedEventStart:c,domContentLoadedEventEnd:a,loadEventStart:f,loadEventEnd:l,domComplete:s,redirectCount:d}}}function zb(t){const{entryType:e,initiatorType:n,name:r,responseEnd:i,startTime:s,decodedBodySize:o,encodedBodySize:c,responseStatus:a,transferSize:u}=t;if(["fetch","xmlhttprequest"].includes(n)){return null}return{type:`${e}.${n}`,start:Pb(s),end:Pb(i),name:r,data:{size:u,statusCode:a,decodedBodySize:o,encodedBodySize:c}}}function Ub(t){const e=t.entries[t.entries.length-1];const n=e&&e.element?[e.element]:undefined;return Yb(t,"largest-contentful-paint",n)}function qb(t){return t.sources!==undefined}function Hb(t){const e=[];const n=[];for(const r of t.entries){if(qb(r)){const t=[];for(const e of r.sources){if(e.node){n.push(e.node);const r=Hy.mirror.getId(e.node);if(r){t.push(r)}}}e.push({value:r.value,nodeIds:t})}}return Yb(t,"cumulative-layout-shift",n,e)}function Wb(t){const e=t.entries[t.entries.length-1];const n=e&&e.target?[e.target]:undefined;return Yb(t,"first-input-delay",n)}function Gb(t){const e=t.entries[t.entries.length-1];const n=e&&e.target?[e.target]:undefined;return Yb(t,"interaction-to-next-paint",n)}function Yb(t,e,n,r){const i=t.value;const s=t.rating;const o=Pb(i);const c={type:"web-vital",name:e,start:o,end:o,data:{value:i,size:i,rating:s,nodeIds:n?n.map((t=>Hy.mirror.getId(t))):undefined,attributions:r}};return c}function Xb(t){function e(e){if(!t.performanceEntries.includes(e)){t.performanceEntries.push(e)}}function n({entries:t}){t.forEach(e)}const r=[];["navigation","paint","resource"].forEach((t=>{r.push(xl(t,n))}));r.push(wl(Db(Ub,t)),vl(Db(Hb,t)),_l(Db(Wb,t)),Sl(Db(Gb,t)));return()=>{r.forEach((t=>t()))}}const Jb=`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;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}}},L=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}}},O=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)},j=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},q=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&&j(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)}},B=function(t){return 10+(t.filename?t.filename.length+1:0)},G=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(O(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}();var H=function(){function t(t,n){this.c=L(),this.v=1,G.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),G.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=O(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=L();i.p(n.dictionary),j(t,2,i.d())}}(r,this.o),this.v=0),n&&j(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),J="undefined"!=typeof TextEncoder&&new TextEncoder,K="undefined"!=typeof TextDecoder&&new TextDecoder;try{K.decode(F,{stream:!0})}catch(t){}var N=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(P(t),this.d=n||!1)},t}();function P(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(J)return J.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)}function Q(t){return function(t,n){n||(n={});var r=S(),e=t.length;r.p(t);var i=O(t,n,B(n),8),a=i.length;return q(i,n),j(i,a-8,r.d()),j(i,a-4,e),i}(P(t))}const R=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(const r of t)n+=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 H,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new N(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},V={clear:()=>{R.clear()},addEvent:t=>R.addEvent(t),finish:()=>R.finish(),compress:t=>Q(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in V&&"function"==typeof V[n])try{const t=V[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 Kb(){const t=new Blob([Jb]);return URL.createObjectURL(t)}class Vb extends Error{constructor(){super(`Event buffer exceeded maximum size of ${tm}.`)}}class Zb{constructor(){this.events=[];this._totalSize=0;this.hasCheckout=false}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){const e=JSON.stringify(t).length;this._totalSize+=e;if(this._totalSize>tm){throw new Vb}this.events.push(t)}finish(){return new Promise((t=>{const e=this.events;this.clear();t(JSON.stringify(e))}))}clear(){this.events=[];this._totalSize=0;this.hasCheckout=false}getEarliestTimestamp(){const t=this.events.map((t=>t.timestamp)).sort()[0];if(!t){return null}return eb(t)}}class Qb{constructor(t){this._worker=t;this._id=0}ensureReady(){if(this._ensureReadyPromise){return this._ensureReadyPromise}this._ensureReadyPromise=new Promise(((t,e)=>{this._worker.addEventListener("message",(({data:n})=>{if(n.success){t()}else{e()}}),{once:true});this._worker.addEventListener("error",(t=>{e(t)}),{once:true})}));return this._ensureReadyPromise}destroy(){Yy&&Zy.info("Destroying compression worker");this._worker.terminate()}postMessage(t,e){const n=this._getAndIncrementId();return new Promise(((r,i)=>{const s=({data:e})=>{const o=e;if(o.method!==t){return}if(o.id!==n){return}this._worker.removeEventListener("message",s);if(!o.success){Yy&&Zy.error("Error in compression worker: ",o.response);i(new Error("Error in compression worker"));return}r(o.response)};this._worker.addEventListener("message",s);this._worker.postMessage({id:n,method:t,arg:e})}))}_getAndIncrementId(){return this._id++}}class tv{constructor(t){this._worker=new Qb(t);this._earliestTimestamp=null;this._totalSize=0;this.hasCheckout=false}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const e=eb(t.timestamp);if(!this._earliestTimestamp||e<this._earliestTimestamp){this._earliestTimestamp=e}const n=JSON.stringify(t);this._totalSize+=n.length;if(this._totalSize>tm){return Promise.reject(new Vb)}return this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null;this._totalSize=0;this.hasCheckout=false;this._worker.postMessage("clear").then(null,(t=>{Yy&&Zy.exception(t,'Sending "clear" message to worker failed',t)}))}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){const t=await this._worker.postMessage("finish");this._earliestTimestamp=null;this._totalSize=0;return t}}class ev{constructor(t){this._fallback=new Zb;this._compression=new tv(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(){await this.ensureWorkerIsLoaded();return this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){Yy&&Zy.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:e}=this._fallback;const n=[];for(const e of t){n.push(this._compression.addEvent(e))}this._compression.hasCheckout=e;this._used=this._compression;try{await Promise.all(n)}catch(t){Yy&&Zy.exception(t,"Failed to add events when switching buffers.")}}}function nv({useCompression:t,workerUrl:e}){if(t&&window.Worker){const t=rv(e);if(t){return t}}Yy&&Zy.info("Using simple buffer");return new Zb}function rv(t){try{const e=t||iv();if(!e){return}Yy&&Zy.info(`Using compression worker${t?` from ${t}`:""}`);const n=new Worker(e);return new ev(n)}catch(t){Yy&&Zy.exception(t,"Failed to create compression worker")}}function iv(){if(typeof __SENTRY_EXCLUDE_REPLAY_WORKER__==="undefined"||!__SENTRY_EXCLUDE_REPLAY_WORKER__){return Kb()}return""}function sv(){try{return"sessionStorage"in jp&&!!jp.sessionStorage}catch(t){return false}}function ov(t){cv();t.session=undefined}function cv(){if(!sv()){return}try{jp.sessionStorage.removeItem(Bp)}catch(t){}}function av(t){if(t===undefined){return false}return Math.random()<t}function uv(t){const e=Date.now();const n=t.id||ge();const r=t.started||e;const i=t.lastActivity||e;const s=t.segmentId||0;const o=t.sampled;const c=t.previousSessionId;return{id:n,started:r,lastActivity:i,segmentId:s,sampled:o,previousSessionId:c}}function fv(t){if(!sv()){return}try{jp.sessionStorage.setItem(Bp,JSON.stringify(t))}catch(t){}}function lv(t,e){return av(t)?"session":e?"buffer":false}function dv({sessionSampleRate:t,allowBuffering:e,stickySession:n=false},{previousSessionId:r}={}){const i=lv(t,e);const s=uv({sampled:i,previousSessionId:r});if(n){fv(s)}return s}function hv(){if(!sv()){return null}try{const t=jp.sessionStorage.getItem(Bp);if(!t){return null}const e=JSON.parse(t);Yy&&Zy.infoTick("Loading existing session");return uv(e)}catch(t){return null}}function pv(t,e,n=+new Date){if(t===null||e===undefined||e<0){return true}if(e===0){return false}return t+e<=n}function mv(t,{maxReplayDuration:e,sessionIdleExpire:n,targetTime:r=Date.now()}){return pv(t.started,e,r)||pv(t.lastActivity,n,r)}function gv(t,{sessionIdleExpire:e,maxReplayDuration:n}){if(!mv(t,{sessionIdleExpire:e,maxReplayDuration:n})){return false}if(t.sampled==="buffer"&&t.segmentId===0){return false}return true}function yv({sessionIdleExpire:t,maxReplayDuration:e,previousSessionId:n},r){const i=r.stickySession&&hv();if(!i){Yy&&Zy.infoTick("Creating new session");return dv(r,{previousSessionId:n})}if(!gv(i,{sessionIdleExpire:t,maxReplayDuration:e})){return i}Yy&&Zy.infoTick("Session in sessionStorage is expired, creating new one...");return dv(r,{previousSessionId:i.id})}function bv(t){return t.type===Wg.Custom}function vv(t,e,n){if(!kv(t,e)){return false}_v(t,e,n);return true}function wv(t,e,n){if(!kv(t,e)){return Promise.resolve(null)}return _v(t,e,n)}async function _v(t,e,n){if(!t.eventBuffer){return null}try{if(n&&t.recordingMode==="buffer"){t.eventBuffer.clear()}if(n){t.eventBuffer.hasCheckout=true}const r=t.getOptions();const i=Sv(e,r.beforeAddRecordingEvent);if(!i){return}return await t.eventBuffer.addEvent(i)}catch(e){const n=e&&e instanceof Vb?"addEventSizeExceeded":"addEvent";t.handleException(e);await t.stop({reason:n});const r=ti();if(r){r.recordDroppedEvent("internal_sdk_error","replay")}}}function kv(t,e){if(!t.eventBuffer||t.isPaused()||!t.isEnabled()){return false}const n=eb(e.timestamp);if(n+t.timeouts.sessionIdlePause<Date.now()){return false}if(n>t.getContext().initialTimestamp+t.getOptions().maxReplayDuration){Yy&&Zy.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`);return false}return true}function Sv(t,e){try{if(typeof e==="function"&&bv(t)){return e(t)}}catch(t){Yy&&Zy.exception(t,"An error occured in the `beforeAddRecordingEvent` callback, skipping the event...");return null}return t}function xv(t){return!t.type}function Cv(t){return t.type==="transaction"}function Tv(t){return t.type==="replay_event"}function Iv(t){return t.type==="feedback"}function Ev(t){return(e,n)=>{if(!t.isEnabled()||!xv(e)&&!Cv(e)){return}const r=n&&n.statusCode;if(!r||r<200||r>=300){return}if(Cv(e)){Av(t,e);return}$v(t,e)}}function Av(t,e){const n=t.getContext();if(e.contexts&&e.contexts.trace&&e.contexts.trace.trace_id&&n.traceIds.size<100){n.traceIds.add(e.contexts.trace.trace_id)}}function $v(t,e){const n=t.getContext();if(e.event_id&&n.errorIds.size<100){n.errorIds.add(e.event_id)}if(t.recordingMode!=="buffer"||!e.tags||!e.tags.replayId){return}const{beforeErrorSampling:r}=t.getOptions();if(typeof r==="function"&&!r(e)){return}$d((()=>{t.sendBufferedReplayOrFlush()}))}function Mv(t){return e=>{if(!t.isEnabled()||!xv(e)){return}Rv(t,e)}}function Rv(t,e){const n=e.exception&&e.exception.values&&e.exception.values[0]&&e.exception.values[0].value;if(typeof n!=="string"){return}if(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i)){const e=kb({category:"replay.hydrate-error",data:{url:F()}});rb(t,e)}}function Nv(t){const e=ti();if(!e){return}e.on("beforeAddBreadcrumb",(e=>Ov(t,e)))}function Ov(t,e){if(!t.isEnabled()||!Fv(e)){return}const n=Dv(e);if(n){rb(t,n)}}function Dv(t){if(!Fv(t)||["fetch","xhr","sentry.event","sentry.transaction"].includes(t.category)||t.category.startsWith("ui.")){return null}if(t.category==="console"){return Lv(t)}return kb(t)}function Lv(t){const e=t.data&&t.data.arguments;if(!Array.isArray(e)||e.length===0){return kb(t)}let n=false;const r=e.map((t=>{if(!t){return t}if(typeof t==="string"){if(t.length>Vp){n=true;return`${t.slice(0,Vp)}…`}return t}if(typeof t==="object"){try{const e=Ie(t,7);const r=JSON.stringify(e);if(r.length>Vp){n=true;return`${JSON.stringify(e,null,2).slice(0,Vp)}…`}return e}catch(t){}}return t}));return kb({...t,data:{...t.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function Fv(t){return!!t.category}function Pv(t,e){if(t.type||!t.exception||!t.exception.values||!t.exception.values.length){return false}if(e.originalException&&e.originalException.__rrweb__){return true}return false}function jv(t,e){t.triggerUserActivity();t.addUpdate((()=>{if(!e.timestamp){return true}t.throttledAddEvent({type:Wg.Custom,timestamp:e.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:e.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:e.event_id}}}});return false}))}function Bv(t,e){if(t.recordingMode!=="buffer"){return false}if(e.message===Up){return false}if(!e.exception||e.type){return false}return av(t.getOptions().errorSampleRate)}function zv(t){return Object.assign(((e,n)=>{if(!t.isEnabled()){return e}if(Tv(e)){delete e.breadcrumbs;return e}if(!xv(e)&&!Cv(e)&&!Iv(e)){return e}const r=t.checkAndHandleExpiredSession();if(!r){return e}if(Iv(e)){t.flush();e.contexts.feedback.replay_id=t.getSessionId();jv(t,e);return e}if(Pv(e,n)&&!t.getOptions()._experiments.captureExceptions){Yy&&Zy.log("Ignoring error from rrweb internals",e);return null}const i=Bv(t,e);const s=i||t.recordingMode==="session";if(s){e.tags={...e.tags,replayId:t.getSessionId()}}return e}),{id:"Replay"})}function Uv(t,e){return e.map((({type:e,start:n,end:r,name:i,data:s})=>{const o=t.throttledAddEvent({type:Wg.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:e,description:i,startTimestamp:n,endTimestamp:r,data:s}}});return typeof o==="string"?Promise.resolve(null):o}))}function qv(t){const{from:e,to:n}=t;const r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:e}}}function Hv(t){return e=>{if(!t.isEnabled()){return}const n=qv(e);if(n===null){return}t.getContext().urls.push(n.name);t.triggerUserActivity();t.addUpdate((()=>{Uv(t,[n]);return false}))}}function Wv(t,e){if(Yy&&t.getOptions()._experiments.traceInternals){return false}return mc(e,ti())}function Gv(t,e){if(!t.isEnabled()){return}if(e===null){return}if(Wv(t,e.name)){return}t.addUpdate((()=>{Uv(t,[e]);return true}))}function Yv(t){if(!t){return undefined}const e=new TextEncoder;try{if(typeof t==="string"){return e.encode(t).length}if(t instanceof URLSearchParams){return e.encode(t.toString()).length}if(t instanceof FormData){const n=ew(t);return e.encode(n).length}if(t instanceof Blob){return t.size}if(t instanceof ArrayBuffer){return t.byteLength}}catch(t){}return undefined}function Xv(t){if(!t){return undefined}const e=parseInt(t,10);return isNaN(e)?undefined:e}function Jv(t){try{if(typeof t==="string"){return[t]}if(t instanceof URLSearchParams){return[t.toString()]}if(t instanceof FormData){return[ew(t)]}if(!t){return[undefined]}}catch(e){Yy&&Zy.exception(e,"Failed to serialize body",t);return[undefined,"BODY_PARSE_ERROR"]}Yy&&Zy.info("Skipping network body because of body type",t);return[undefined,"UNPARSEABLE_BODY_TYPE"]}function Kv(t,e){if(!t){return{headers:{},size:undefined,_meta:{warnings:[e]}}}const n={...t._meta};const r=n.warnings||[];n.warnings=[...r,e];t._meta=n;return t}function Vv(t,e){if(!e){return null}const{startTimestamp:n,endTimestamp:r,url:i,method:s,statusCode:o,request:c,response:a}=e;const u={type:t,start:n/1e3,end:r/1e3,name:i,data:ft({method:s,statusCode:o,request:c,response:a})};return u}function Zv(t){return{headers:{},size:t,_meta:{warnings:["URL_SKIPPED"]}}}function Qv(t,e,n){if(!e&&Object.keys(t).length===0){return undefined}if(!e){return{headers:t}}if(!n){return{headers:t,size:e}}const r={headers:t,size:e};const{body:i,warnings:s}=nw(n);r.body=i;if(s&&s.length>0){r._meta={warnings:s}}return r}function tw(t,e){return Object.entries(t).reduce(((n,[r,i])=>{const s=r.toLowerCase();if(e.includes(s)&&t[r]){n[s]=i}return n}),{})}function ew(t){return new URLSearchParams(t).toString()}function nw(t){if(!t||typeof t!=="string"){return{body:t}}const e=t.length>Kp;const n=rw(t);if(e){const e=t.slice(0,Kp);if(n){return{body:e,warnings:["MAYBE_JSON_TRUNCATED"]}}return{body:`${e}…`,warnings:["TEXT_TRUNCATED"]}}if(n){try{const e=JSON.parse(t);return{body:e}}catch(t){}}return{body:t}}function rw(t){const e=t[0];const n=t[t.length-1];return e==="["&&n==="]"||e==="{"&&n==="}"}function iw(t,e){const n=sw(t);return S(n,e)}function sw(t,e=jp.document.baseURI){if(t.startsWith("http://")||t.startsWith("https://")||t.startsWith(jp.location.origin)){return t}const n=new URL(t,e);if(n.origin!==new URL(e).origin){return t}const r=n.href;if(!t.endsWith("/")&&r.endsWith("/")){return r.slice(0,-1)}return r}async function ow(t,e,n){try{const r=await aw(t,e,n);const i=Vv("resource.fetch",r);Gv(n.replay,i)}catch(t){Yy&&Zy.exception(t,"Failed to capture fetch breadcrumb")}}function cw(t,e){const{input:n,response:r}=e;const i=n?hw(n):undefined;const s=Yv(i);const o=r?Xv(r.headers.get("content-length")):undefined;if(s!==undefined){t.data.request_body_size=s}if(o!==undefined){t.data.response_body_size=o}}async function aw(t,e,n){const r=Date.now();const{startTimestamp:i=r,endTimestamp:s=r}=e;const{url:o,method:c,status_code:a=0,request_body_size:u,response_body_size:f}=t.data;const l=iw(o,n.networkDetailAllowUrls)&&!iw(o,n.networkDetailDenyUrls);const d=l?uw(n,e.input,u):Zv(u);const h=await fw(l,n,e.response,f);return{startTimestamp:i,endTimestamp:s,url:o,method:c,statusCode:a,request:d,response:h}}function uw({networkCaptureBodies:t,networkRequestHeaders:e},n,r){const i=n?mw(n,e):{};if(!t){return Qv(i,r,undefined)}const s=hw(n);const[o,c]=Jv(s);const a=Qv(i,r,o);if(c){return Kv(a,c)}return a}async function fw(t,{networkCaptureBodies:e,networkResponseHeaders:n},r,i){if(!t&&i!==undefined){return Zv(i)}const s=r?pw(r.headers,n):{};if(!r||!e&&i!==undefined){return Qv(s,i,undefined)}const[o,c]=await dw(r);const a=lw(o,{networkCaptureBodies:e,responseBodySize:i,captureDetails:t,headers:s});if(c){return Kv(a,c)}return a}function lw(t,{networkCaptureBodies:e,responseBodySize:n,captureDetails:r,headers:i}){try{const s=t&&t.length&&n===undefined?Yv(t):n;if(!r){return Zv(s)}if(e){return Qv(i,s,t)}return Qv(i,s,undefined)}catch(t){Yy&&Zy.exception(t,"Failed to serialize response body");return Qv(i,n,undefined)}}async function dw(t){const e=yw(t);if(!e){return[undefined,"BODY_PARSE_ERROR"]}try{const t=await bw(e);return[t]}catch(t){Yy&&Zy.exception(t,"Failed to get text body from response");return[undefined,"BODY_PARSE_ERROR"]}}function hw(t=[]){if(t.length!==2||typeof t[1]!=="object"){return undefined}return t[1].body}function pw(t,e){const n={};e.forEach((e=>{if(t.get(e)){n[e]=t.get(e)}}));return n}function mw(t,e){if(t.length===1&&typeof t[0]!=="string"){return gw(t[0],e)}if(t.length===2){return gw(t[1],e)}return{}}function gw(t,e){if(!t){return{}}const n=t.headers;if(!n){return{}}if(n instanceof Headers){return pw(n,e)}if(Array.isArray(n)){return{}}return tw(n,e)}function yw(t){try{return t.clone()}catch(t){Yy&&Zy.exception(t,"Failed to clone response body")}}function bw(t){return new Promise(((e,n)=>{const r=$d((()=>n(new Error("Timeout while trying to read response body"))),500);vw(t).then((t=>e(t)),(t=>n(t))).finally((()=>clearTimeout(r)))}))}async function vw(t){return await t.text()}async function ww(t,e,n){try{const r=kw(t,e,n);const i=Vv("resource.xhr",r);Gv(n.replay,i)}catch(t){Yy&&Zy.exception(t,"Failed to capture xhr breadcrumb")}}function _w(t,e){const{xhr:n,input:r}=e;if(!n){return}const i=Yv(r);const s=n.getResponseHeader("content-length")?Xv(n.getResponseHeader("content-length")):Tw(n.response,n.responseType);if(i!==undefined){t.data.request_body_size=i}if(s!==undefined){t.data.response_body_size=s}}function kw(t,e,n){const r=Date.now();const{startTimestamp:i=r,endTimestamp:s=r,input:o,xhr:c}=e;const{url:a,method:u,status_code:f=0,request_body_size:l,response_body_size:d}=t.data;if(!a){return null}if(!c||!iw(a,n.networkDetailAllowUrls)||iw(a,n.networkDetailDenyUrls)){const t=Zv(l);const e=Zv(d);return{startTimestamp:i,endTimestamp:s,url:a,method:u,statusCode:f,request:t,response:e}}const h=c[Md];const p=h?tw(h.request_headers,n.networkRequestHeaders):{};const m=tw(Sw(c),n.networkResponseHeaders);const[g,y]=n.networkCaptureBodies?Jv(o):[undefined];const[b,v]=n.networkCaptureBodies?xw(c):[undefined];const w=Qv(p,l,g);const _=Qv(m,d,b);return{startTimestamp:i,endTimestamp:s,url:a,method:u,statusCode:f,request:y?Kv(w,y):w,response:v?Kv(_,v):_}}function Sw(t){const e=t.getAllResponseHeaders();if(!e){return{}}return e.split("\r\n").reduce(((t,e)=>{const[n,r]=e.split(": ");if(r){t[n.toLowerCase()]=r}return t}),{})}function xw(t){const e=[];try{return[t.responseText]}catch(t){e.push(t)}try{return Cw(t.response,t.responseType)}catch(t){e.push(t)}Yy&&Zy.warn("Failed to get xhr response body",...e);return[undefined]}function Cw(t,e){try{if(typeof t==="string"){return[t]}if(t instanceof Document){return[t.body.outerHTML]}if(e==="json"&&t&&typeof t==="object"){return[JSON.stringify(t)]}if(!t){return[undefined]}}catch(e){Yy&&Zy.exception(e,"Failed to serialize body",t);return[undefined,"BODY_PARSE_ERROR"]}Yy&&Zy.info("Skipping network body because of body type",t);return[undefined,"UNPARSEABLE_BODY_TYPE"]}function Tw(t,e){try{const n=e==="json"&&t&&typeof t==="object"?JSON.stringify(t):t;return Yv(n)}catch(t){return undefined}}function Iw(t){const e=ti();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:s,networkResponseHeaders:o}=t.getOptions();const c={replay:t,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:s,networkResponseHeaders:o};if(e){e.on("beforeAddBreadcrumb",((t,e)=>Ew(c,t,e)))}}catch(t){}}function Ew(t,e,n){if(!e.data){return}try{if(Aw(e)&&Mw(n)){_w(e,n);ww(e,n,t)}if($w(e)&&Rw(n)){cw(e,n);ow(e,n,t)}}catch(t){Yy&&Zy.exception(t,"Error when enriching network breadcrumb")}}function Aw(t){return t.category==="xhr"}function $w(t){return t.category==="fetch"}function Mw(t){return t&&t.xhr}function Rw(t){return t&&t.response}function Nw(t){const e=ti();yd(Tb(t));xd(Hv(t));Nv(t);Iw(t);const n=zv(t);Io(n);if(e){e.on("beforeSendEvent",Mv(t));e.on("afterSendEvent",Ev(t));e.on("createDsc",(e=>{const n=t.getSessionId();if(n&&t.isEnabled()&&t.recordingMode==="session"){const r=t.checkAndHandleExpiredSession();if(r){e.replay_id=n}}}));e.on("spanStart",(e=>{t.lastActiveSpan=e}));e.on("spanEnd",(e=>{t.lastActiveSpan=e}));e.on("beforeSendFeedback",((e,n)=>{const r=t.getSessionId();if(n&&n.includeReplay&&t.isEnabled()&&r){if(e.contexts&&e.contexts.feedback){e.contexts.feedback.replay_id=r}}}))}}async function Ow(t){try{return Promise.all(Uv(t,[Dw(jp.performance.memory)]))}catch(t){return[]}}function Dw(t){const{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}=t;const i=Date.now()/1e3;return{type:"memory",name:"memory",start:i,end:i,data:{memory:{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}}}}function Lw(t,e,n){let r;let i;let s;const o=n&&n.maxWait?Math.max(n.maxWait,e):0;function c(){a();r=t();return r}function a(){i!==undefined&&clearTimeout(i);s!==undefined&&clearTimeout(s);i=s=undefined}function u(){if(i!==undefined||s!==undefined){return c()}return r}function f(){if(i){clearTimeout(i)}i=$d(c,e);if(o&&s===undefined){s=$d(c,o)}return r}f.cancel=a;f.flush=u;return f}function Fw(t){let e=false;return(n,r)=>{if(!t.checkAndHandleExpiredSession()){Yy&&Zy.warn("Received replay event after session expired.");return}const i=r||!e;e=true;if(t.clickDetector){vb(t.clickDetector,n)}t.addUpdate((()=>{if(t.recordingMode==="buffer"&&i){t.setInitialState()}if(!vv(t,n,i)){return true}if(!i){return false}jw(t,i);if(t.session&&t.session.previousSessionId){return true}if(t.recordingMode==="buffer"&&t.session&&t.eventBuffer){const e=t.eventBuffer.getEarliestTimestamp();if(e){Yy&&Zy.info(`Updating session start time to earliest event in buffer to ${new Date(e)}`);t.session.started=e;if(t.getOptions().stickySession){fv(t.session)}}}if(t.recordingMode==="session"){void t.flush()}return true}))}}function Pw(t){const e=t.getOptions();return{type:Wg.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:t.isRecordingCanvas(),sessionSampleRate:e.sessionSampleRate,errorSampleRate:e.errorSampleRate,useCompressionOption:e.useCompression,blockAllMedia:e.blockAllMedia,maskAllText:e.maskAllText,maskAllInputs:e.maskAllInputs,useCompression:t.eventBuffer?t.eventBuffer.type==="worker":false,networkDetailHasUrls:e.networkDetailAllowUrls.length>0,networkCaptureBodies:e.networkCaptureBodies,networkRequestHasHeaders:e.networkRequestHeaders.length>0,networkResponseHasHeaders:e.networkResponseHeaders.length>0}}}}function jw(t,e){if(!e||!t.session||t.session.segmentId!==0){return}vv(t,Pw(t),false)}function Bw(t,e,n,r){return Fn(Vn(t,Kn(t),r,n),[[{type:"replay_event"},t],[{type:"replay_recording",length:typeof e==="string"?(new TextEncoder).encode(e).length:e.length},e]])}function zw({recordingData:t,headers:e}){let n;const r=`${JSON.stringify(e)}\n`;if(typeof t==="string"){n=`${r}${t}`}else{const e=new TextEncoder;const i=e.encode(r);n=new Uint8Array(i.length+t.length);n.set(i);n.set(t,i.length)}return n}async function Uw({client:t,scope:e,replayId:n,event:r}){const i=typeof t._integrations==="object"&&t._integrations!==null&&!Array.isArray(t._integrations)?Object.keys(t._integrations):undefined;const s={event_id:n,integrations:i};t.emit("preprocessEvent",r,s);const o=await Zs(t.getOptions(),r,s,e,t,Kr());if(!o){return null}o.platform=o.platform||"javascript";const c=t.getSdkMetadata();const{name:a,version:u}=c&&c.sdk||{};o.sdk={...o.sdk,name:a||"sentry.javascript.unknown",version:u||"0.0.0"};return o}async function qw({recordingData:t,replayId:e,segmentId:n,eventContext:r,timestamp:i,session:s}){const o=zw({recordingData:t,headers:{segment_id:n}});const{urls:c,errorIds:a,traceIds:u,initialTimestamp:f}=r;const l=ti();const d=Jr();const h=l&&l.getTransport();const p=l&&l.getDsn();if(!l||!h||!p||!s.sampled){return Ye({})}const m={type:zp,replay_start_timestamp:f/1e3,timestamp:i/1e3,error_ids:a,trace_ids:u,urls:c,replay_id:e,segment_id:n,replay_type:s.sampled};const g=await Uw({scope:d,client:l,replayId:e,event:m});if(!g){l.recordDroppedEvent("event_processor","replay",m);Yy&&Zy.info("An event processor returned `null`, will not send event.");return Ye({})}delete g.sdkProcessingMetadata;const y=Bw(g,o,p,l.getOptions().tunnel);let b;try{b=await h.send(y)}catch(t){const e=new Error(Up);try{e.cause=t}catch(t){}throw e}if(typeof b.statusCode==="number"&&(b.statusCode<200||b.statusCode>=300)){throw new Hw(b.statusCode)}const v=rr({},b);if(nr(v,"replay")){throw new Ww(v)}return b}class Hw extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class Ww extends Error{constructor(t){super("Rate limit hit");this.rateLimits=t}}async function Gw(t,e={count:0,interval:Xp}){const{recordingData:n,options:r}=t;if(!n.length){return}try{await qw(t);return true}catch(n){if(n instanceof Hw||n instanceof Ww){throw n}po("Replays",{_retryCount:e.count});if(Yy&&r._experiments&&r._experiments.captureExceptions){fo(n)}if(e.count>=Jp){const t=new Error(`${Up} - max retries exceeded`);try{t.cause=n}catch(t){}throw t}e.interval*=++e.count;return new Promise(((n,r)=>{$d((async()=>{try{await Gw(t,e);n(true)}catch(t){r(t)}}),e.interval)}))}}const Yw="__THROTTLED";const Xw="__SKIPPED";function Jw(t,e,n){const r=new Map;const i=t=>{const e=t-n;r.forEach(((t,n)=>{if(n<e){r.delete(n)}}))};const s=()=>[...r.values()].reduce(((t,e)=>t+e),0);let o=false;return(...n)=>{const c=Math.floor(Date.now()/1e3);i(c);if(s()>=e){const t=o;o=true;return t?Xw:Yw}o=false;const a=r.get(c)||0;r.set(c,a+1);return t(...n)}}class Kw{constructor({options:t,recordingOptions:e}){Kw.prototype.__init.call(this);Kw.prototype.__init2.call(this);Kw.prototype.__init3.call(this);Kw.prototype.__init4.call(this);Kw.prototype.__init5.call(this);Kw.prototype.__init6.call(this);this.eventBuffer=null;this.performanceEntries=[];this.replayPerformanceEntries=[];this.recordingMode="session";this.timeouts={sessionIdlePause:qp,sessionIdleExpire:Hp};this._lastActivity=Date.now();this._isEnabled=false;this._isPaused=false;this._requiresManualStart=false;this._hasInitializedCoreListeners=false;this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""};this._recordingOptions=e;this._options=t;this._debouncedFlush=Lw((()=>this._flush()),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay});this._throttledAddEvent=Jw(((t,e)=>wv(this,t,e)),300,5);const{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions();const i=n?{threshold:Math.min(Zp,n),timeout:n,scrollTimeout:Qp,ignoreSelector:r?r.join(","):""}:undefined;if(i){this.clickDetector=new pb(this,i)}if(Yy){const e=t._experiments;Zy.setConfig({captureExceptions:!!e.captureExceptions,traceInternals:!!e.traceInternals})}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return Boolean(this._canvas)}getOptions(){return this._options}handleException(t){Yy&&Zy.exception(t)}initializeSampling(t){const{errorSampleRate:e,sessionSampleRate:n}=this._options;const r=e<=0&&n<=0;this._requiresManualStart=r;if(r){return}this._initializeSessionForSampling(t);if(!this.session){Yy&&Zy.exception(new Error("Unable to initialize and create session"));return}if(this.session.sampled===false){return}this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session";Yy&&Zy.infoTick(`Starting replay in ${this.recordingMode} mode`);this._initializeRecording()}start(){if(this._isEnabled&&this.recordingMode==="session"){Yy&&Zy.info("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){Yy&&Zy.info("Buffering is in progress, call `flush()` to save the replay");return}Yy&&Zy.infoTick("Starting replay in session mode");this._updateUserActivity();const t=yv({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:false});this.session=t;this._initializeRecording()}startBuffering(){if(this._isEnabled){Yy&&Zy.info("Buffering is in progress, call `flush()` to save the replay");return}Yy&&Zy.infoTick("Starting replay in buffer mode");const t=yv({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:true});this.session=t;this.recordingMode="buffer";this._initializeRecording()}startRecording(){try{const t=this._canvas;this._stopRecording=Hy({...this._recordingOptions,...this.recordingMode==="buffer"&&{checkoutEveryNms:Yp},emit:Fw(this),onMutation:this._onMutationHandler,...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this.handleException(t)}}stopRecording(){try{if(this._stopRecording){this._stopRecording();this._stopRecording=undefined}return true}catch(t){this.handleException(t);return false}}async stop({forceFlush:t=false,reason:e}={}){if(!this._isEnabled){return}this._isEnabled=false;try{Yy&&Zy.info(`Stopping Replay${e?` triggered by ${e}`:""}`);this._removeListeners();this.stopRecording();this._debouncedFlush.cancel();if(t){await this._flush({force:true})}this.eventBuffer&&this.eventBuffer.destroy();this.eventBuffer=null;ov(this)}catch(t){this.handleException(t)}}pause(){if(this._isPaused){return}this._isPaused=true;this.stopRecording();Yy&&Zy.info("Pausing replay")}resume(){if(!this._isPaused||!this._checkSession()){return}this._isPaused=false;this.startRecording();Yy&&Zy.info("Resuming replay")}async sendBufferedReplayOrFlush({continueRecording:t=true}={}){if(this.recordingMode==="session"){return this.flushImmediate()}const e=Date.now();Yy&&Zy.info("Converting buffer to session");await this.flushImmediate();const n=this.stopRecording();if(!t||!n){return}if(this.recordingMode==="session"){return}this.recordingMode="session";if(this.session){this._updateUserActivity(e);this._updateSessionActivity(e);this._maybeSaveSession()}this.startRecording()}addUpdate(t){const e=t();if(this.recordingMode==="buffer"){return}if(e===true){return}this._debouncedFlush()}triggerUserActivity(){this._updateUserActivity();if(!this._stopRecording){if(!this._checkSession()){return}this.resume();return}this.checkAndHandleExpiredSession();this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity();this._updateSessionActivity()}conditionalFlush(){if(this.recordingMode==="buffer"){return Promise.resolve()}return this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){this._debouncedFlush();return this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(this._lastActivity&&pv(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}if(!this._checkSession()){return false}return true}setInitialState(){const t=`${jp.location.pathname}${jp.location.hash}${jp.location.search}`;const e=`${jp.location.origin}${t}`;this.performanceEntries=[];this.replayPerformanceEntries=[];this._clearContext();this._context.initialUrl=e;this._context.initialTimestamp=Date.now();this._context.urls.push(e)}throttledAddEvent(t,e){const n=this._throttledAddEvent(t,e);if(n===Yw){const t=kb({category:"replay.throttled"});this.addUpdate((()=>!vv(this,{type:tb,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t,metric:true}})))}return n}getCurrentRoute(){const t=this.lastActiveSpan||ji();const e=t&&Pi(t);const n=e&&Ei(e).data||{};const r=n[ii];if(!e||!r||!["route","custom"].includes(r)){return undefined}return Ei(e).description}_initializeRecording(){this.setInitialState();this._updateSessionActivity();this.eventBuffer=nv({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl});this._removeListeners();this._addListeners();this._isEnabled=true;this._isPaused=false;this.startRecording()}_initializeSessionForSampling(t){const e=this._options.errorSampleRate>0;const n=yv({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:e});this.session=n}_checkSession(){if(!this.session){return false}const t=this.session;if(gv(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})){this._refreshSession(t);return false}return true}async _refreshSession(t){if(!this._isEnabled){return}await this.stop({reason:"refresh session"});this.initializeSampling(t.id)}_addListeners(){try{jp.document.addEventListener("visibilitychange",this._handleVisibilityChange);jp.addEventListener("blur",this._handleWindowBlur);jp.addEventListener("focus",this._handleWindowFocus);jp.addEventListener("keydown",this._handleKeyboardEvent);if(this.clickDetector){this.clickDetector.addListeners()}if(!this._hasInitializedCoreListeners){Nw(this);this._hasInitializedCoreListeners=true}}catch(t){this.handleException(t)}this._performanceCleanupCallback=Xb(this)}_removeListeners(){try{jp.document.removeEventListener("visibilitychange",this._handleVisibilityChange);jp.removeEventListener("blur",this._handleWindowBlur);jp.removeEventListener("focus",this._handleWindowFocus);jp.removeEventListener("keydown",this._handleKeyboardEvent);if(this.clickDetector){this.clickDetector.removeListeners()}if(this._performanceCleanupCallback){this._performanceCleanupCallback()}}catch(t){this.handleException(t)}}__init(){this._handleVisibilityChange=()=>{if(jp.document.visibilityState==="visible"){this._doChangeToForegroundTasks()}else{this._doChangeToBackgroundTasks()}}}__init2(){this._handleWindowBlur=()=>{const t=kb({category:"ui.blur"});this._doChangeToBackgroundTasks(t)}}__init3(){this._handleWindowFocus=()=>{const t=kb({category:"ui.focus"});this._doChangeToForegroundTasks(t)}}__init4(){this._handleKeyboardEvent=t=>{Mb(this,t)}}_doChangeToBackgroundTasks(t){if(!this.session){return}const e=mv(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire});if(e){return}if(t){this._createCustomBreadcrumb(t)}void this.conditionalFlush()}_doChangeToForegroundTasks(t){if(!this.session){return}const e=this.checkAndHandleExpiredSession();if(!e){Yy&&Zy.info("Document has become active, but session has expired");return}if(t){this._createCustomBreadcrumb(t)}}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){if(this.session){this.session.lastActivity=t;this._maybeSaveSession()}}_createCustomBreadcrumb(t){this.addUpdate((()=>{this.throttledAddEvent({type:Wg.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})}))}_addPerformanceEntries(){const t=Lb(this.performanceEntries).concat(this.replayPerformanceEntries);this.performanceEntries=[];this.replayPerformanceEntries=[];return Promise.all(Uv(this,t))}_clearContext(){this._context.errorIds.clear();this._context.traceIds.clear();this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:e}=this;if(!t||!e||this._requiresManualStart){return}if(t.segmentId){return}const n=e.getEarliestTimestamp();if(n&&n<this._context.initialTimestamp){this._context.initialTimestamp=n}}_popEventContext(){const 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};this._clearContext();return t}async _runFlush(){const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){Yy&&Zy.error("No session or eventBuffer found to flush.");return}await this._addPerformanceEntries();if(!this.eventBuffer||!this.eventBuffer.hasEvents){return}await Ow(this);if(!this.eventBuffer){return}if(t!==this.getSessionId()){return}try{this._updateInitialTimestampFromEventBuffer();const e=Date.now();if(e-this._context.initialTimestamp>this._options.maxReplayDuration+3e4){throw new Error("Session is too long, not sending replay")}const n=this._popEventContext();const r=this.session.segmentId++;this._maybeSaveSession();const i=await this.eventBuffer.finish();await Gw({replayId:t,recordingData:i,segmentId:r,eventContext:n,session:this.session,options:this.getOptions(),timestamp:e})}catch(t){this.handleException(t);this.stop({reason:"sendReplay"});const e=ti();if(e){e.recordDroppedEvent("send_error","replay")}}}__init5(){this._flush=async({force:t=false}={})=>{if(!this._isEnabled&&!t){return}if(!this.checkAndHandleExpiredSession()){Yy&&Zy.error("Attempting to finish replay event after session expired.");return}if(!this.session){return}const e=this.session.started;const n=Date.now();const r=n-e;this._debouncedFlush.cancel();const i=r<this._options.minReplayDuration;const s=r>this._options.maxReplayDuration+5e3;if(i||s){Yy&&Zy.info(`Session duration (${Math.floor(r/1e3)}s) is too ${i?"short":"long"}, not sending replay.`);if(i){this._debouncedFlush()}return}const o=this.eventBuffer;if(o&&this.session.segmentId===0&&!o.hasCheckout){Yy&&Zy.info("Flushing initial segment without checkout.")}if(!this._flushLock){this._flushLock=this._runFlush();await this._flushLock;this._flushLock=undefined;return}try{await this._flushLock}catch(t){Yy&&Zy.error(t)}finally{this._debouncedFlush()}}}_maybeSaveSession(){if(this.session&&this._options.stickySession){fv(this.session)}}__init6(){this._onMutationHandler=t=>{const e=t.length;const n=this._options.mutationLimit;const r=this._options.mutationBreadcrumbLimit;const i=n&&e>n;if(e>r||i){const t=kb({category:"replay.mutations",data:{count:e,limit:i}});this._createCustomBreadcrumb(t)}if(i){this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"});return false}return true}}}function Vw(t,e){return[...t,...e].join(",")}function Zw({mask:t,unmask:e,block:n,unblock:r,ignore:i}){const s=['base[href="/"]'];const o=Vw(t,[".sentry-mask","[data-sentry-mask]"]);const c=Vw(e,[]);const a={maskTextSelector:o,unmaskTextSelector:c,blockSelector:Vw(n,[".sentry-block","[data-sentry-block]",...s]),unblockSelector:Vw(r,[]),ignoreSelector:Vw(i,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])};return a}function Qw({el:t,key:e,maskAttributes:n,maskAllText:r,privacyOptions:i,value:s}){if(!r){return s}if(i.unmaskTextSelector&&t.matches(i.unmaskTextSelector)){return s}if(n.includes(e)||e==="value"&&t.tagName==="INPUT"&&["submit","button"].includes(t.getAttribute("type")||"")){return s.replace(/[\S]/g,"*")}return s}const t_='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]';const e_=["content-length","content-type","accept"];let n_=false;const r_=t=>new i_(t);class i_{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:t=Wp,flushMaxDelay:e=Gp,minReplayDuration:n=em,maxReplayDuration:r=rm,stickySession:i=true,useCompression:s=true,workerUrl:o,_experiments:c={},maskAllText:a=true,maskAllInputs:u=true,blockAllMedia:f=true,mutationBreadcrumbLimit:l=750,mutationLimit:d=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:p=[],networkDetailAllowUrls:m=[],networkDetailDenyUrls:g=[],networkCaptureBodies:y=true,networkRequestHeaders:b=[],networkResponseHeaders:v=[],mask:w=[],maskAttributes:_=["title","placeholder"],unmask:k=[],block:S=[],unblock:x=[],ignore:C=[],maskFn:T,beforeAddRecordingEvent:I,beforeErrorSampling:E}={}){this.name=i_.id;const A=Zw({mask:w,unmask:k,block:S,unblock:x,ignore:C});this._recordingOptions={maskAllInputs:u,maskAllText:a,maskInputOptions:{password:true},maskTextFn:T,maskInputFn:T,maskAttributeFn:(t,e,n)=>Qw({maskAttributes:_,maskAllText:a,privacyOptions:A,key:t,value:e,el:n}),...A,slimDOMOptions:"all",inlineStylesheet:true,inlineImages:false,collectFonts:true,errorHandler:t=>{try{t.__rrweb__=true}catch(t){}}};this._initialOptions={flushMinDelay:t,flushMaxDelay:e,minReplayDuration:Math.min(n,nm),maxReplayDuration:Math.min(r,rm),stickySession:i,useCompression:s,workerUrl:o,blockAllMedia:f,maskAllInputs:u,maskAllText:a,mutationBreadcrumbLimit:l,mutationLimit:d,slowClickTimeout:h,slowClickIgnoreSelectors:p,networkDetailAllowUrls:m,networkDetailDenyUrls:g,networkCaptureBodies:y,networkRequestHeaders:o_(b),networkResponseHeaders:o_(v),beforeAddRecordingEvent:I,beforeErrorSampling:E,_experiments:c};if(this._initialOptions.blockAllMedia){this._recordingOptions.blockSelector=!this._recordingOptions.blockSelector?t_:`${this._recordingOptions.blockSelector},${t_}`}if(this._isInitialized&&he()){throw new Error("Multiple Sentry Session Replay instances are not supported")}this._isInitialized=true}get _isInitialized(){return n_}set _isInitialized(t){n_=t}afterAllSetup(t){if(!he()||this._replay){return}this._setup(t);this._initialize(t)}start(){if(!this._replay){return}this._replay.start()}startBuffering(){if(!this._replay){return}this._replay.startBuffering()}stop(){if(!this._replay){return Promise.resolve()}return this._replay.stop({forceFlush:this._replay.recordingMode==="session"})}flush(t){if(!this._replay){return Promise.resolve()}if(!this._replay.isEnabled()){this._replay.start();return Promise.resolve()}return this._replay.sendBufferedReplayOrFlush(t)}getReplayId(){if(!this._replay||!this._replay.isEnabled()){return}return this._replay.getSessionId()}_initialize(t){if(!this._replay){return}this._maybeLoadFromReplayCanvasIntegration(t);this._replay.initializeSampling()}_setup(t){const e=s_(this._initialOptions,t);this._replay=new Kw({options:e,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const e=t.getIntegrationByName("ReplayCanvas");if(!e){return}this._replay["_canvas"]=e.getOptions()}catch(t){}}}i_.__initStatic();function s_(t,e){const n=e.getOptions();const r={sessionSampleRate:0,errorSampleRate:0,...ft(t)};const i=cs(n.replaysSessionSampleRate);const s=cs(n.replaysOnErrorSampleRate);if(i==null&&s==null){H((()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}))}if(i!=null){r.sessionSampleRate=i}if(s!=null){r.errorSampleRate=s}return r}function o_(t){return[...e_,...t.map((t=>t.toLowerCase()))]}function c_(){const t=ti();return t&&t.getIntegrationByName("Replay")}var a_;(function(t){t[t["Document"]=0]="Document";t[t["DocumentType"]=1]="DocumentType";t[t["Element"]=2]="Element";t[t["Text"]=3]="Text";t[t["CDATA"]=4]="CDATA";t[t["Comment"]=5]="Comment"})(a_||(a_={}));function u_(t,e){for(let n=t.classList.length;n--;){const r=t.classList[n];if(e.test(r)){return true}}return false}function f_(t,e,n=Infinity,r=0){if(!t)return-1;if(t.nodeType!==t.ELEMENT_NODE)return-1;if(r>n)return-1;if(e(t))return r;return f_(t.parentNode,e,n,r+1)}function l_(t,e){return n=>{const r=n;if(r===null)return false;try{if(t){if(typeof t==="string"){if(r.matches(`.${t}`))return true}else if(u_(r,t)){return true}}if(e&&r.matches(e))return true;return false}catch(t){return false}}}const d_="Please stop import mirror directly. Instead of that,"+"\r\n"+"now you can use replayer.getMirror() to access the mirror instance of a replayer,"+"\r\n"+"or you can use record.mirror to access the mirror instance during recording.";let h_={map:{},getId(){console.error(d_);return-1},getNode(){console.error(d_);return null},removeNodeFromMap(){console.error(d_)},has(){console.error(d_);return false},reset(){console.error(d_)}};if(typeof window!=="undefined"&&window.Proxy&&window.Reflect){h_=new Proxy(h_,{get(t,e,n){if(e==="map"){console.error(d_)}return Reflect.get(t,e,n)}})}function p_(t,e,n,r,i=window){const s=i.Object.getOwnPropertyDescriptor(t,e);i.Object.defineProperty(t,e,r?n:{set(t){__((()=>{n.set.call(this,t)}),0);if(s&&s.set){s.set.call(this,t)}}});return()=>p_(t,e,s||{},true)}function m_(t,e,n){try{if(!(e in t)){return()=>{}}const r=t[e];const i=n(r);if(typeof i==="function"){i.prototype=i.prototype||{};Object.defineProperties(i,{__rrweb_original__:{enumerable:false,value:r}})}t[e]=i;return()=>{t[e]=r}}catch(t){return()=>{}}}if(!/[1-9][0-9]{12}/.test(Date.now().toString()));function g_(t){if(!t){return null}const e=t.nodeType===t.ELEMENT_NODE?t:t.parentElement;return e}function y_(t,e,n,r,i){if(!t){return false}const s=g_(t);if(!s){return false}const o=l_(e,n);if(!i){const t=r&&s.matches(r);return o(s)&&!t}const c=f_(s,o);let a=-1;if(c<0){return false}if(r){a=f_(s,l_(null,r))}if(c>-1&&a<0){return true}return c<a}const b_={};function v_(t){const e=b_[t];if(e){return e}const n=window.document;let r=window[t];if(n&&typeof n.createElement==="function"){try{const e=n.createElement("iframe");e.hidden=true;n.head.appendChild(e);const i=e.contentWindow;if(i&&i[t]){r=i[t]}n.head.removeChild(e)}catch(t){}}return b_[t]=r.bind(window)}function w_(...t){return v_("requestAnimationFrame")(...t)}function __(...t){return v_("setTimeout")(...t)}var k_=(t=>{t[t["2D"]=0]="2D";t[t["WebGL"]=1]="WebGL";t[t["WebGL2"]=2]="WebGL2";return t})(k_||{});let S_;function x_(t){S_=t}const C_=t=>{if(!S_){return t}const e=(...e)=>{try{return t(...e)}catch(t){if(S_&&S_(t)===true){return()=>{}}throw t}};return e};var T_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var I_=typeof Uint8Array==="undefined"?[]:new Uint8Array(256);for(var E_=0;E_<T_.length;E_++){I_[T_.charCodeAt(E_)]=E_}var A_=function(t){var e=new Uint8Array(t),n,r=e.length,i="";for(n=0;n<r;n+=3){i+=T_[e[n]>>2];i+=T_[(e[n]&3)<<4|e[n+1]>>4];i+=T_[(e[n+1]&15)<<2|e[n+2]>>6];i+=T_[e[n+2]&63]}if(r%3===2){i=i.substring(0,i.length-1)+"="}else if(r%3===1){i=i.substring(0,i.length-2)+"=="}return i};const $_=new Map;function M_(t,e){let n=$_.get(t);if(!n){n=new Map;$_.set(t,n)}if(!n.has(e)){n.set(e,[])}return n.get(e)}const R_=(t,e,n)=>{if(!t||!(D_(t,e)||typeof t==="object"))return;const r=t.constructor.name;const i=M_(n,r);let s=i.indexOf(t);if(s===-1){s=i.length;i.push(t)}return s};function N_(t,e,n){if(t instanceof Array){return t.map((t=>N_(t,e,n)))}else if(t===null){return t}else if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray){const e=t.constructor.name;return{rr_type:e,args:[Object.values(t)]}}else if(t instanceof ArrayBuffer){const e=t.constructor.name;const n=A_(t);return{rr_type:e,base64:n}}else if(t instanceof DataView){const r=t.constructor.name;return{rr_type:r,args:[N_(t.buffer,e,n),t.byteOffset,t.byteLength]}}else if(t instanceof HTMLImageElement){const e=t.constructor.name;const{src:n}=t;return{rr_type:e,src:n}}else if(t instanceof HTMLCanvasElement){const e="HTMLImageElement";const n=t.toDataURL();return{rr_type:e,src:n}}else if(t instanceof ImageData){const r=t.constructor.name;return{rr_type:r,args:[N_(t.data,e,n),t.width,t.height]}}else if(D_(t,e)||typeof t==="object"){const r=t.constructor.name;const i=R_(t,e,n);return{rr_type:r,index:i}}return t}const O_=(t,e,n)=>t.map((t=>N_(t,e,n)));const D_=(t,e)=>{const n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"];const r=n.filter((t=>typeof e[t]==="function"));return Boolean(r.find((n=>t instanceof e[n])))};function L_(t,e,n,r,i){const s=[];const o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const c of o){try{if(typeof e.CanvasRenderingContext2D.prototype[c]!=="function"){continue}const o=m_(e.CanvasRenderingContext2D.prototype,c,(function(s){return function(...o){if(!y_(this.canvas,n,r,i,true)){__((()=>{const n=O_(o,e,this);t(this.canvas,{type:k_["2D"],property:c,args:n})}),0)}return s.apply(this,o)}}));s.push(o)}catch(n){const r=p_(e.CanvasRenderingContext2D.prototype,c,{set(e){t(this.canvas,{type:k_["2D"],property:c,args:[e],setter:true})}});s.push(r)}}return()=>{s.forEach((t=>t()))}}function F_(t){return t==="experimental-webgl"?"webgl":t}function P_(t,e,n,r,i){const s=[];try{const o=m_(t.HTMLCanvasElement.prototype,"getContext",(function(t){return function(s,...o){if(!y_(this,e,n,r,true)){const t=F_(s);if(!("__context"in this))this.__context=t;if(i&&["webgl","webgl2"].includes(t)){if(o[0]&&typeof o[0]==="object"){const t=o[0];if(!t.preserveDrawingBuffer){t.preserveDrawingBuffer=true}}else{o.splice(0,1,{preserveDrawingBuffer:true})}}}return t.apply(this,[s,...o])}}));s.push(o)}catch(t){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach((t=>t()))}}function j_(t,e,n,r,i,s,o,c){const a=[];const u=Object.getOwnPropertyNames(t);for(const o of u){if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(o)){continue}try{if(typeof t[o]!=="function"){continue}const u=m_(t,o,(function(t){return function(...a){const u=t.apply(this,a);R_(u,c,this);if("tagName"in this.canvas&&!y_(this.canvas,r,i,s,true)){const t=O_(a,c,this);const r={type:e,property:o,args:t};n(this.canvas,r)}return u}}));a.push(u)}catch(r){const i=p_(t,o,{set(t){n(this.canvas,{type:e,property:o,args:[t],setter:true})}});a.push(i)}}return a}function B_(t,e,n,r,i,s){const o=[];o.push(...j_(e.WebGLRenderingContext.prototype,k_.WebGL,t,n,r,i,s,e));if(typeof e.WebGL2RenderingContext!=="undefined"){o.push(...j_(e.WebGL2RenderingContext.prototype,k_.WebGL2,t,n,r,i,s,e))}return()=>{o.forEach((t=>t()))}}var z_=`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 U_(){const t=new Blob([z_]);return URL.createObjectURL(t)}class q_{reset(){this.pendingCanvasMutations.clear();this.restoreHandlers.forEach((t=>{try{t()}catch(t){}}));this.restoreHandlers=[];this.windowsSet=new WeakSet;this.windows=[];this.shadowDoms=new Set;wr([this,"access",t=>t.worker,"optionalAccess",t=>t.terminate,"call",t=>t()]);this.worker=null;this.snapshotInProgressMap=new Map;if(this.options.recordCanvas&&typeof this.options.sampling==="number"||this.options.enableManualSnapshot){this.worker=this.initFPSWorker()}}freeze(){this.frozen=true}unfreeze(){this.frozen=false}lock(){this.locked=true}unlock(){this.locked=false}constructor(t){this.pendingCanvasMutations=new Map;this.rafStamps={latestId:0,invokeId:null};this.shadowDoms=new Set;this.windowsSet=new WeakSet;this.windows=[];this.restoreHandlers=[];this.frozen=false;this.locked=false;this.snapshotInProgressMap=new Map;this.worker=null;this.processMutation=(t,e)=>{const n=this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId;if(n||!this.rafStamps.invokeId)this.rafStamps.invokeId=this.rafStamps.latestId;if(!this.pendingCanvasMutations.has(t)){this.pendingCanvasMutations.set(t,[])}this.pendingCanvasMutations.get(t).push(e)};const{sampling:e="all",win:n,blockClass:r,blockSelector:i,unblockSelector:s,maxCanvasSize:o,recordCanvas:c,dataURLOptions:a,errorHandler:u}=t;this.mutationCb=t.mutationCb;this.mirror=t.mirror;this.options=t;if(u){x_(u)}if(c&&typeof e==="number"||t.enableManualSnapshot){this.worker=this.initFPSWorker()}this.addWindow(n);if(t.enableManualSnapshot){return}C_((()=>{if(c&&e==="all"){this.startRAFTimestamping();this.startPendingCanvasMutationFlusher()}if(c&&typeof e==="number"){this.initCanvasFPSObserver(e,r,i,s,o,{dataURLOptions:a})}}))()}addWindow(t){const{sampling:e="all",blockClass:n,blockSelector:r,unblockSelector:i,recordCanvas:s,enableManualSnapshot:o}=this.options;if(this.windowsSet.has(t))return;if(o){this.windowsSet.add(t);this.windows.push(new WeakRef(t));return}C_((()=>{if(s&&e==="all"){this.initCanvasMutationObserver(t,n,r,i)}if(s&&typeof e==="number"){const e=P_(t,n,r,i,true);this.restoreHandlers.push((()=>{e()}))}}))();this.windowsSet.add(t);this.windows.push(new WeakRef(t))}addShadowRoot(t){this.shadowDoms.add(new WeakRef(t))}resetShadowRoots(){this.shadowDoms=new Set}initFPSWorker(){const t=new Worker(U_());t.onmessage=t=>{const e=t.data;const{id:n}=e;this.snapshotInProgressMap.set(n,false);if(!("base64"in e))return;const{base64:r,type:i,width:s,height:o}=e;this.mutationCb({id:n,type:k_["2D"],commands:[{property:"clearRect",args:[0,0,s,o]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:i}]},0,0,s,o]}]})};return t}initCanvasFPSObserver(t,e,n,r,i,s){const o=this.takeSnapshot(false,t,e,n,r,i,s.dataURLOptions);this.restoreHandlers.push((()=>{cancelAnimationFrame(o)}))}initCanvasMutationObserver(t,e,n,r){const i=P_(t,e,n,r,false);const s=L_(this.processMutation.bind(this),t,e,n,r);const o=B_(this.processMutation.bind(this),t,e,n,r,this.mirror);this.restoreHandlers.push((()=>{i();s();o()}))}snapshot(t){const{options:e}=this;const n=this.takeSnapshot(true,e.sampling==="all"?2:e.sampling||2,e.blockClass,e.blockSelector,e.unblockSelector,e.maxCanvasSize,e.dataURLOptions,t);this.restoreHandlers.push((()=>{cancelAnimationFrame(n)}))}takeSnapshot(t,e,n,r,i,s,o,c){const a=1e3/e;let u=0;let f;const l=t=>{if(t){return[t]}const e=[];const s=t=>{t.querySelectorAll("canvas").forEach((t=>{if(!y_(t,n,r,i,true)){e.push(t)}}))};for(const t of this.windows){const e=t.deref();if(e){s(e.document)}}for(const t of this.shadowDoms){const e=t.deref();if(e){s(e)}}return e};const d=e=>{if(!this.windows.length){return}if(u&&e-u<a){f=w_(d);return}u=e;l(c).forEach((e=>{if(!this.mirror.hasNode(e)){return}const n=this.mirror.getId(e);if(this.snapshotInProgressMap.get(n))return;if(!e.width||!e.height)return;this.snapshotInProgressMap.set(n,true);if(!t&&["webgl","webgl2"].includes(e.__context)){const t=e.getContext(e.__context);if(wr([t,"optionalAccess",t=>t.getContextAttributes,"call",t=>t(),"optionalAccess",t=>t.preserveDrawingBuffer])===false){t.clear(t.COLOR_BUFFER_BIT)}}createImageBitmap(e).then((t=>{wr([this,"access",t=>t.worker,"optionalAccess",t=>t.postMessage,"call",r=>r({id:n,bitmap:t,width:e.width,height:e.height,dataURLOptions:o,maxCanvasSize:s},[t])])})).catch((t=>{C_((()=>{throw t}))()}))}));if(!t){f=w_(d)}};f=w_(d);return f}startPendingCanvasMutationFlusher(){w_((()=>this.flushPendingCanvasMutations()))}startRAFTimestamping(){const t=e=>{this.rafStamps.latestId=e;w_(t)};w_(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach(((t,e)=>{const n=this.mirror.getId(e);this.flushPendingCanvasMutationFor(e,n)}));w_((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(t,e){if(this.frozen||this.locked){return}const n=this.pendingCanvasMutations.get(t);if(!n||e===-1)return;const r=n.map((t=>{const{type:e,...n}=t;return n}));const{type:i}=n[0];this.mutationCb({id:e,type:i,commands:r});this.pendingCanvasMutations.delete(t)}}const H_={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}}};const W_="ReplayCanvas";const G_=1280;const Y_=(t={})=>{const[e,n]=t.maxCanvasSize||[];const r={quality:t.quality||"medium",enableManualSnapshot:t.enableManualSnapshot,maxCanvasSize:[e?Math.min(e,G_):G_,n?Math.min(n,G_):G_]};let i;const s=new Promise((t=>i=t));return{name:W_,getOptions(){const{quality:t,enableManualSnapshot:e,maxCanvasSize:n}=r;return{enableManualSnapshot:e,recordCanvas:true,getCanvasManager:t=>{const r=new q_({...t,enableManualSnapshot:e,maxCanvasSize:n,errorHandler:t=>{try{if(typeof t==="object"){t.__rrweb__=true}}catch(t){}}});i(r);return r},...H_[t||"medium"]||H_.medium}},async snapshot(t){const e=await s;e.snapshot(t)}}};const X_=Go(Y_);const J_=M;const K_=J_.document;const V_=J_.navigator;const Z_="Report a Bug";const Q_="Cancel";const tk="Send Bug Report";const ek="Confirm";const nk="Report a Bug";const rk="your.email@example.org";const ik="Email";const sk="What's the bug? What did you expect?";const ok="Description";const ck="Your Name";const ak="Name";const uk="Thank you for your report!";const fk="(required)";const lk="Add a screenshot";const dk="Remove screenshot";const hk="widget";const pk="api";const mk=5e3;const gk=(t,e={includeReplay:true})=>{if(!t.message){throw new Error("Unable to submit feedback with empty message")}const n=ti();if(!n){throw new Error("No client setup, cannot send feedback.")}if(t.tags&&Object.keys(t.tags).length){Jr().setTags(t.tags)}const r=Gu({source:pk,url:F(),...t},e);return new Promise(((t,e)=>{const i=setTimeout((()=>e("Unable to determine if Feedback was correctly sent.")),5e3);const s=n.on("afterSendEvent",((n,o)=>{if(n.event_id!==r){return}clearTimeout(i);s();if(o&&typeof o.statusCode==="number"&&o.statusCode>=200&&o.statusCode<300){t(r)}if(o&&typeof o.statusCode==="number"&&o.statusCode===0){return e("Unable to send Feedback. This is because of network issues, or because you are using an ad-blocker.")}if(o&&typeof o.statusCode==="number"&&o.statusCode===403){return e("Unable to send Feedback. This could be because this domain is not in your list of allowed domains.")}return e("Unable to send Feedback. This could be because of network issues, or because you are using an ad-blocker")}))}))};const yk=typeof __SENTRY_DEBUG__==="undefined"||__SENTRY_DEBUG__;function bk(){if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(V_.userAgent)){return false}if(/Macintosh/i.test(V_.userAgent)&&V_.maxTouchPoints&&V_.maxTouchPoints>1){return false}if(!isSecureContext){return false}return true}function vk(t,e){return{...t,...e,tags:{...t.tags,...e.tags},onFormOpen:()=>{e.onFormOpen&&e.onFormOpen();t.onFormOpen&&t.onFormOpen()},onFormClose:()=>{e.onFormClose&&e.onFormClose();t.onFormClose&&t.onFormClose()},onSubmitSuccess:n=>{e.onSubmitSuccess&&e.onSubmitSuccess(n);t.onSubmitSuccess&&t.onSubmitSuccess(n)},onSubmitError:n=>{e.onSubmitError&&e.onSubmitError(n);t.onSubmitError&&t.onSubmitError(n)},onFormSubmitted:()=>{e.onFormSubmitted&&e.onFormSubmitted();t.onFormSubmitted&&t.onFormSubmitted()},themeDark:{...t.themeDark,...e.themeDark},themeLight:{...t.themeLight,...e.themeLight}}}function wk(t){const e=K_.createElement("style");e.textContent=`\n.widget__actor {\n position: fixed;\n z-index: var(--z-index);\n margin: var(--page-margin);\n inset: var(--actor-inset);\n\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 16px;\n\n font-family: inherit;\n font-size: var(--font-size);\n font-weight: 600;\n line-height: 1.14em;\n text-decoration: none;\n\n background: var(--actor-background, var(--background));\n border-radius: var(--actor-border-radius, 1.7em/50%);\n border: var(--actor-border, var(--border));\n box-shadow: var(--actor-box-shadow, var(--box-shadow));\n color: var(--actor-color, var(--foreground));\n fill: var(--actor-color, var(--foreground));\n cursor: pointer;\n opacity: 1;\n transition: transform 0.2s ease-in-out;\n transform: translate(0, 0) scale(1);\n}\n.widget__actor[aria-hidden="true"] {\n opacity: 0;\n pointer-events: none;\n visibility: hidden;\n transform: translate(0, 16px) scale(0.98);\n}\n\n.widget__actor:hover {\n background: var(--actor-hover-background, var(--background));\n filter: var(--interactive-filter);\n}\n\n.widget__actor svg {\n width: 1.14em;\n height: 1.14em;\n}\n\n@media (max-width: 600px) {\n .widget__actor span {\n display: none;\n }\n}\n`;if(t){e.setAttribute("nonce",t)}return e}function _k(t,e){Object.entries(e).forEach((([e,n])=>{t.setAttributeNS(null,e,n)}));return t}const kk=20;const Sk="http://www.w3.org/2000/svg";function xk(){const t=t=>J_.document.createElementNS(Sk,t);const e=_k(t("svg"),{width:`${kk}`,height:`${kk}`,viewBox:`0 0 ${kk} ${kk}`,fill:"var(--foreground)"});const n=_k(t("g"),{clipPath:"url(#clip0_57_80)"});const r=_k(t("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"});e.appendChild(n).appendChild(r);const i=t("defs");const s=_k(t("clipPath"),{id:"clip0_57_80"});const o=_k(t("rect"),{width:`${kk}`,height:`${kk}`,fill:"white"});s.appendChild(o);i.appendChild(s);e.appendChild(i).appendChild(s).appendChild(o);return e}function Ck({triggerLabel:t,triggerAriaLabel:e,shadow:n,styleNonce:r}){const i=K_.createElement("button");i.type="button";i.className="widget__actor";i.ariaHidden="false";i.ariaLabel=e||t||Z_;i.appendChild(xk());if(t){const e=K_.createElement("span");e.appendChild(K_.createTextNode(t));i.appendChild(e)}const s=wk(r);return{el:i,appendToDom(){n.appendChild(s);n.appendChild(i)},removeFromDom(){n.removeChild(i);n.removeChild(s)},show(){i.ariaHidden="false"},hide(){i.ariaHidden="true"}}}const Tk="rgba(88, 74, 192, 1)";const Ik={foreground:"#2b2233",background:"#ffffff",accentForeground:"white",accentBackground:Tk,successColor:"#268d75",errorColor:"#df3338",border:"1.5px solid rgba(41, 35, 47, 0.13)",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",outline:"1px auto var(--accent-background)",interactiveFilter:"brightness(95%)"};const Ek={foreground:"#ebe6ef",background:"#29232f",accentForeground:"white",accentBackground:Tk,successColor:"#2da98c",errorColor:"#f55459",border:"1.5px solid rgba(235, 230, 239, 0.15)",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",outline:"1px auto var(--accent-background)",interactiveFilter:"brightness(150%)"};function Ak(t){return`\n --foreground: ${t.foreground};\n --background: ${t.background};\n --accent-foreground: ${t.accentForeground};\n --accent-background: ${t.accentBackground};\n --success-color: ${t.successColor};\n --error-color: ${t.errorColor};\n --border: ${t.border};\n --box-shadow: ${t.boxShadow};\n --outline: ${t.outline};\n --interactive-filter: ${t.interactiveFilter};\n `}function $k({colorScheme:t,themeDark:e,themeLight:n,styleNonce:r}){const i=K_.createElement("style");i.textContent=`\n:host {\n --font-family: system-ui, 'Helvetica Neue', Arial, sans-serif;\n --font-size: 14px;\n --z-index: 100000;\n\n --page-margin: 16px;\n --inset: auto 0 0 auto;\n --actor-inset: var(--inset);\n\n font-family: var(--font-family);\n font-size: var(--font-size);\n\n ${t!=="system"?"color-scheme: only light;":""}\n\n ${Ak(t==="dark"?{...Ek,...e}:{...Ik,...n})}\n}\n\n${t==="system"?`\n@media (prefers-color-scheme: dark) {\n :host {\n ${Ak({...Ek,...e})}\n }\n}`:""}\n}\n`;if(r){i.setAttribute("nonce",r)}return i}const Mk=({lazyLoadIntegration:t,getModalIntegration:e,getScreenshotIntegration:n})=>{const r=({id:r="sentry-feedback",autoInject:i=true,showBranding:s=true,isEmailRequired:o=false,isNameRequired:c=false,showEmail:a=true,showName:u=true,enableScreenshot:f=true,useSentryUser:l={email:"email",name:"username"},tags:d,styleNonce:h,scriptNonce:p,colorScheme:m="system",themeLight:g={},themeDark:y={},addScreenshotButtonLabel:b=lk,cancelButtonLabel:v=Q_,confirmButtonLabel:w=ek,emailLabel:_=ik,emailPlaceholder:k=rk,formTitle:S=nk,isRequiredLabel:x=fk,messageLabel:C=ok,messagePlaceholder:T=sk,nameLabel:I=ak,namePlaceholder:E=ck,removeScreenshotButtonLabel:A=dk,submitButtonLabel:$=tk,successMessageText:M=uk,triggerLabel:R=Z_,triggerAriaLabel:N="",onFormOpen:O,onFormClose:D,onSubmitSuccess:L,onSubmitError:F,onFormSubmitted:P}={})=>{const j={id:r,autoInject:i,showBranding:s,isEmailRequired:o,isNameRequired:c,showEmail:a,showName:u,enableScreenshot:f,useSentryUser:l,tags:d,styleNonce:h,scriptNonce:p,colorScheme:m,themeDark:y,themeLight:g,triggerLabel:R,triggerAriaLabel:N,cancelButtonLabel:v,submitButtonLabel:$,confirmButtonLabel:w,formTitle:S,emailLabel:_,emailPlaceholder:k,messageLabel:C,messagePlaceholder:T,nameLabel:I,namePlaceholder:E,successMessageText:M,isRequiredLabel:x,addScreenshotButtonLabel:b,removeScreenshotButtonLabel:A,onFormClose:D,onFormOpen:O,onSubmitError:F,onSubmitSuccess:L,onFormSubmitted:P};let B=null;let z=[];const U=t=>{if(!B){const e=K_.createElement("div");e.id=String(t.id);K_.body.appendChild(e);B=e.attachShadow({mode:"open"});B.appendChild($k(t))}return B};const q=async(e,n,r)=>{const i=ti();const s=i&&i.getIntegrationByName(e);if(s){return s}const o=n&&n()||await t(r,p);const c=o();i&&i.addIntegration(c);return c};const H=async t=>{const r=t.enableScreenshot&&bk();const[i,s]=await Promise.all([q("FeedbackModal",e,"feedbackModalIntegration"),r?q("FeedbackScreenshot",n,"feedbackScreenshotIntegration"):undefined]);if(!i){yk&&G.error("[Feedback] Missing feedback modal integration. Try using `feedbackSyncIntegration` in your `Sentry.init`.");throw new Error("[Feedback] Missing feedback modal integration!")}if(r&&!s){yk&&G.error("[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.")}const o=i.createDialog({options:{...t,onFormClose:()=>{o&&o.close();t.onFormClose&&t.onFormClose()},onFormSubmitted:()=>{o&&o.close();t.onFormSubmitted&&t.onFormSubmitted()}},screenshotIntegration:r?s:undefined,sendFeedback:gk,shadow:U(t)});return o};const W=(t,e={})=>{const n=vk(j,e);const r=typeof t==="string"?K_.querySelector(t):typeof t.addEventListener==="function"?t:null;if(!r){yk&&G.error("[Feedback] Unable to attach to target element");throw new Error("Unable to attach to target element")}let i=null;const s=async()=>{if(!i){i=await H({...n,onFormSubmitted:()=>{i&&i.removeFromDom();n.onFormSubmitted&&n.onFormSubmitted()}})}i.appendToDom();i.open()};r.addEventListener("click",s);const o=()=>{z=z.filter((t=>t!==o));i&&i.removeFromDom();i=null;r.removeEventListener("click",s)};z.push(o);return o};const Y=(t={})=>{const e=vk(j,t);const n=U(e);const r=Ck({triggerLabel:e.triggerLabel,triggerAriaLabel:e.triggerAriaLabel,shadow:n,styleNonce:h});W(r.el,{...e,onFormOpen(){r.hide()},onFormClose(){r.show()},onFormSubmitted(){r.show()}});return r};return{name:"Feedback",setupOnce(){if(!he()||!j.autoInject){return}if(K_.readyState==="loading"){K_.addEventListener("DOMContentLoaded",(()=>Y().appendToDom()))}else{Y().appendToDom()}},attachTo:W,createWidget(t={}){const e=Y(vk(j,t));e.appendToDom();return e},async createForm(t={}){return H(vk(j,t))},remove(){if(B){B.parentElement&&B.parentElement.remove();B=null}z.forEach((t=>t()));z=[]}}};return r};function Rk(){const t=ti();return t&&t.getIntegrationByName("Feedback")}var Nk,Ok,Dk,Lk,Fk,Pk,jk,Bk={},zk=[],Uk=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,qk=Array.isArray;function Hk(t,e){for(var n in e)t[n]=e[n];return t}function Wk(t){var e=t.parentNode;e&&e.removeChild(t)}function Gk(t,e,n){var r,i,s,o={};for(s in e)"key"==s?r=e[s]:"ref"==s?i=e[s]:o[s]=e[s];if(arguments.length>2&&(o.children=arguments.length>3?Nk.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(s in t.defaultProps)void 0===o[s]&&(o[s]=t.defaultProps[s]);return Yk(t,o,r,i,null)}function Yk(t,e,n,r,i){var s={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==i?++Dk:i,__i:-1,__u:0};return null==i&&null!=Ok.vnode&&Ok.vnode(s),s}function Xk(t){return t.children}function Jk(t,e){this.props=t,this.context=e}function Kk(t,e){if(null==e)return t.__?Kk(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?Kk(t):null}function Vk(t,e,n){var r,i=t.__v,s=i.__e,o=t.__P;if(o)return(r=Hk({},i)).__v=i.__v+1,Ok.vnode&&Ok.vnode(r),uS(o,r,i,t.__n,void 0!==o.ownerSVGElement,32&i.__u?[s]:null,e,null==s?Kk(i):s,!!(32&i.__u),n),r.__.__k[r.__i]=r,r.__d=void 0,r.__e!=s&&Zk(r),r}function Zk(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return Zk(t)}}function Qk(t){(!t.__d&&(t.__d=!0)&&Lk.push(t)&&!tS.__r++||Fk!==Ok.debounceRendering)&&((Fk=Ok.debounceRendering)||Pk)(tS)}function tS(){var t,e,n,r=[],i=[];for(Lk.sort(jk);t=Lk.shift();)t.__d&&(n=Lk.length,e=Vk(t,r,i)||e,0===n||Lk.length>n?(fS(r,e,i),i.length=r.length=0,e=void 0,Lk.sort(jk)):e&&Ok.__c&&Ok.__c(e,zk));e&&fS(r,e,i),tS.__r=0}function eS(t,e,n,r,i,s,o,c,a,u,f){var l,d,h,p,m,g=r&&r.__k||zk,y=e.length;for(n.__d=a,nS(n,e,g),a=n.__d,l=0;l<y;l++)null!=(h=n.__k[l])&&"boolean"!=typeof h&&"function"!=typeof h&&(d=-1===h.__i?Bk:g[h.__i]||Bk,h.__i=l,uS(t,h,d,i,s,o,c,a,u,f),p=h.__e,h.ref&&d.ref!=h.ref&&(d.ref&&dS(d.ref,null,h),f.push(h.ref,h.__c||p,h)),null==m&&null!=p&&(m=p),65536&h.__u||d.__k===h.__k?a=rS(h,a,t):"function"==typeof h.type&&void 0!==h.__d?a=h.__d:p&&(a=p.nextSibling),h.__d=void 0,h.__u&=-196609);n.__d=a,n.__e=m}function nS(t,e,n){var r,i,s,o,c,a=e.length,u=n.length,f=u,l=0;for(t.__k=[],r=0;r<a;r++)null!=(i=t.__k[r]=null==(i=e[r])||"boolean"==typeof i||"function"==typeof i?null:"string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?Yk(null,i,null,null,i):qk(i)?Yk(Xk,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?Yk(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=t,i.__b=t.__b+1,c=iS(i,n,o=r+l,f),i.__i=c,s=null,-1!==c&&(f--,(s=n[c])&&(s.__u|=131072)),null==s||null===s.__v?(-1==c&&l--,"function"!=typeof i.type&&(i.__u|=65536)):c!==o&&(c===o+1?l++:c>o?f>a-o?l+=c-o:l--:l=c<o&&c==o-1?c-o:0,c!==r+l&&(i.__u|=65536))):(s=n[r])&&null==s.key&&s.__e&&(s.__e==t.__d&&(t.__d=Kk(s)),hS(s,s,!1),n[r]=null,f--);if(f)for(r=0;r<u;r++)null!=(s=n[r])&&0==(131072&s.__u)&&(s.__e==t.__d&&(t.__d=Kk(s)),hS(s,s))}function rS(t,e,n){var r,i;if("function"==typeof t.type){for(r=t.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=t,e=rS(r[i],e,n));return e}t.__e!=e&&(n.insertBefore(t.__e,e||null),e=t.__e);do{e=e&&e.nextSibling}while(null!=e&&8===e.nodeType);return e}function iS(t,e,n,r){var i=t.key,s=t.type,o=n-1,c=n+1,a=e[n];if(null===a||a&&i==a.key&&s===a.type)return n;if(r>(null!=a&&0==(131072&a.__u)?1:0))for(;o>=0||c<e.length;){if(o>=0){if((a=e[o])&&0==(131072&a.__u)&&i==a.key&&s===a.type)return o;o--}if(c<e.length){if((a=e[c])&&0==(131072&a.__u)&&i==a.key&&s===a.type)return c;c++}}return-1}function sS(t,e,n){"-"===e[0]?t.setProperty(e,null==n?"":n):t[e]=null==n?"":"number"!=typeof n||Uk.test(e)?n:n+"px"}function oS(t,e,n,r,i){var s;t:if("style"===e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof r&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||sS(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||sS(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])s=e!==(e=e.replace(/(PointerCapture)$|Capture$/i,"$1")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+s]=n,n?r?n.u=r.u:(n.u=Date.now(),t.addEventListener(e,s?aS:cS,s)):t.removeEventListener(e,s?aS:cS,s);else{if(i)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==e&&"height"!==e&&"href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&"rowSpan"!==e&&"colSpan"!==e&&"role"!==e&&e in t)try{t[e]=null==n?"":n;break t}catch(t){}"function"==typeof n||(null==n||!1===n&&"-"!==e[4]?t.removeAttribute(e):t.setAttribute(e,n))}}function cS(t){if(this.l){var e=this.l[t.type+!1];if(t.t){if(t.t<=e.u)return}else t.t=Date.now();return e(Ok.event?Ok.event(t):t)}}function aS(t){if(this.l)return this.l[t.type+!0](Ok.event?Ok.event(t):t)}function uS(t,e,n,r,i,s,o,c,a,u){var f,l,d,h,p,m,g,y,b,v,w,_,k,S,x,C=e.type;if(void 0!==e.constructor)return null;128&n.__u&&(a=!!(32&n.__u),s=[c=e.__e=n.__e]),(f=Ok.__b)&&f(e);t:if("function"==typeof C)try{if(y=e.props,b=(f=C.contextType)&&r[f.__c],v=f?b?b.props.value:f.__:r,n.__c?g=(l=e.__c=n.__c).__=l.__E:("prototype"in C&&C.prototype.render?e.__c=l=new C(y,v):(e.__c=l=new Jk(y,v),l.constructor=C,l.render=pS),b&&b.sub(l),l.props=y,l.state||(l.state={}),l.context=v,l.__n=r,d=l.__d=!0,l.__h=[],l._sb=[]),null==l.__s&&(l.__s=l.state),null!=C.getDerivedStateFromProps&&(l.__s==l.state&&(l.__s=Hk({},l.__s)),Hk(l.__s,C.getDerivedStateFromProps(y,l.__s))),h=l.props,p=l.state,l.__v=e,d)null==C.getDerivedStateFromProps&&null!=l.componentWillMount&&l.componentWillMount(),null!=l.componentDidMount&&l.__h.push(l.componentDidMount);else{if(null==C.getDerivedStateFromProps&&y!==h&&null!=l.componentWillReceiveProps&&l.componentWillReceiveProps(y,v),!l.__e&&(null!=l.shouldComponentUpdate&&!1===l.shouldComponentUpdate(y,l.__s,v)||e.__v===n.__v)){for(e.__v!==n.__v&&(l.props=y,l.state=l.__s,l.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.forEach((function(t){t&&(t.__=e)})),w=0;w<l._sb.length;w++)l.__h.push(l._sb[w]);l._sb=[],l.__h.length&&o.push(l);break t}null!=l.componentWillUpdate&&l.componentWillUpdate(y,l.__s,v),null!=l.componentDidUpdate&&l.__h.push((function(){l.componentDidUpdate(h,p,m)}))}if(l.context=v,l.props=y,l.__P=t,l.__e=!1,_=Ok.__r,k=0,"prototype"in C&&C.prototype.render){for(l.state=l.__s,l.__d=!1,_&&_(e),f=l.render(l.props,l.state,l.context),S=0;S<l._sb.length;S++)l.__h.push(l._sb[S]);l._sb=[]}else do{l.__d=!1,_&&_(e),f=l.render(l.props,l.state,l.context),l.state=l.__s}while(l.__d&&++k<25);l.state=l.__s,null!=l.getChildContext&&(r=Hk(Hk({},r),l.getChildContext())),d||null==l.getSnapshotBeforeUpdate||(m=l.getSnapshotBeforeUpdate(h,p)),eS(t,qk(x=null!=f&&f.type===Xk&&null==f.key?f.props.children:f)?x:[x],e,n,r,i,s,o,c,a,u),l.base=e.__e,e.__u&=-161,l.__h.length&&o.push(l),g&&(l.__E=l.__=null)}catch(t){e.__v=null,a||null!=s?(e.__e=c,e.__u|=a?160:32,s[s.indexOf(c)]=null):(e.__e=n.__e,e.__k=n.__k),Ok.__e(t,e,n)}else null==s&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=lS(n.__e,e,n,r,i,s,o,a,u);(f=Ok.diffed)&&f(e)}function fS(t,e,n){for(var r=0;r<n.length;r++)dS(n[r],n[++r],n[++r]);Ok.__c&&Ok.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){Ok.__e(t,e.__v)}}))}function lS(t,e,n,r,i,s,o,c,a){var u,f,l,d,h,p,m,g=n.props,y=e.props,b=e.type;if("svg"===b&&(i=!0),null!=s)for(u=0;u<s.length;u++)if((h=s[u])&&"setAttribute"in h==!!b&&(b?h.localName===b:3===h.nodeType)){t=h,s[u]=null;break}if(null==t){if(null===b)return document.createTextNode(y);t=i?document.createElementNS("http://www.w3.org/2000/svg",b):document.createElement(b,y.is&&y),s=null,c=!1}if(null===b)g===y||c&&t.data===y||(t.data=y);else{if(s=s&&Nk.call(t.childNodes),g=n.props||Bk,!c&&null!=s)for(g={},u=0;u<t.attributes.length;u++)g[(h=t.attributes[u]).name]=h.value;for(u in g)h=g[u],"children"==u||("dangerouslySetInnerHTML"==u?l=h:"key"===u||u in y||oS(t,u,null,h,i));for(u in y)h=y[u],"children"==u?d=h:"dangerouslySetInnerHTML"==u?f=h:"value"==u?p=h:"checked"==u?m=h:"key"===u||c&&"function"!=typeof h||g[u]===h||oS(t,u,h,g[u],i);if(f)c||l&&(f.__html===l.__html||f.__html===t.innerHTML)||(t.innerHTML=f.__html),e.__k=[];else if(l&&(t.innerHTML=""),eS(t,qk(d)?d:[d],e,n,r,i&&"foreignObject"!==b,s,o,s?s[0]:n.__k&&Kk(n,0),c,a),null!=s)for(u=s.length;u--;)null!=s[u]&&Wk(s[u]);c||(u="value",void 0!==p&&(p!==t[u]||"progress"===b&&!p||"option"===b&&p!==g[u])&&oS(t,u,p,g[u],!1),u="checked",void 0!==m&&m!==t[u]&&oS(t,u,m,g[u],!1))}return t}function dS(t,e,n){try{"function"==typeof t?t(e):t.current=e}catch(t){Ok.__e(t,n)}}function hS(t,e,n){var r,i;if(Ok.unmount&&Ok.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||dS(r,null,e)),null!=(r=t.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(t){Ok.__e(t,e)}r.base=r.__P=null,t.__c=void 0}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&hS(r[i],e,n||"function"!=typeof t.type);n||null==t.__e||Wk(t.__e),t.__=t.__e=t.__d=void 0}function pS(t,e,n){return this.constructor(t,n)}function mS(t,e,n){var r,i,s,o;Ok.__&&Ok.__(t,e),i=(r="function"==typeof n)?null:n&&n.__k||e.__k,s=[],o=[],uS(e,t=(!r&&n||e).__k=Gk(Xk,null,[t]),i||Bk,Bk,void 0!==e.ownerSVGElement,!r&&n?[n]:i?null:e.firstChild?Nk.call(e.childNodes):null,s,!r&&n?n:i?i.__e:e.firstChild,r,o),t.__d=void 0,fS(s,t,o)}Nk=zk.slice,Ok={__e:function(t,e,n,r){for(var i,s,o;e=e.__;)if((i=e.__c)&&!i.__)try{if((s=i.constructor)&&null!=s.getDerivedStateFromError&&(i.setState(s.getDerivedStateFromError(t)),o=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(t,r||{}),o=i.__d),o)return i.__E=i}catch(e){t=e}throw t}},Dk=0,Jk.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Hk({},this.state),"function"==typeof t&&(t=t(Hk({},n),this.props)),t&&Hk(n,t),null!=t&&this.__v&&(e&&this._sb.push(e),Qk(this))},Jk.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Qk(this))},Jk.prototype.render=Xk,Lk=[],Pk="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,jk=function(t,e){return t.__v.__b-e.__v.__b},tS.__r=0;var gS,yS,bS,vS,wS=0,_S=[],kS=[],SS=Ok,xS=SS.__b,CS=SS.__r,TS=SS.diffed,IS=SS.__c,ES=SS.unmount,AS=SS.__;function $S(t,e){SS.__h&&SS.__h(yS,t,wS||e),wS=0;var n=yS.__H||(yS.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({__V:kS}),n.__[t]}function MS(t){return wS=1,RS(JS,t)}function RS(t,e,n){var r=$S(gS++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):JS(void 0,e),function(t){var e=r.__N?r.__N[0]:r.__[0],n=r.t(e,t);e!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=yS,!yS.u)){var i=function(t,e,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter((function(t){return!!t.__c}));if(i.every((function(t){return!t.__N})))return!s||s.call(this,t,e,n);var o=!1;return i.forEach((function(t){if(t.__N){var e=t.__[0];t.__=t.__N,t.__N=void 0,e!==t.__[0]&&(o=!0)}})),!(!o&&r.__c.props===t)&&(!s||s.call(this,t,e,n))};yS.u=!0;var s=yS.shouldComponentUpdate,o=yS.componentWillUpdate;yS.componentWillUpdate=function(t,e,n){if(this.__e){var r=s;s=void 0,i(t,e,n),s=r}o&&o.call(this,t,e,n)},yS.shouldComponentUpdate=i}return r.__N||r.__}function NS(t,e){var n=$S(gS++,3);!SS.__s&&XS(n.__H,e)&&(n.__=t,n.i=e,yS.__H.__h.push(n))}function OS(t,e){var n=$S(gS++,4);!SS.__s&&XS(n.__H,e)&&(n.__=t,n.i=e,yS.__h.push(n))}function DS(t){return wS=5,FS((function(){return{current:t}}),[])}function LS(t,e,n){wS=6,OS((function(){return"function"==typeof t?(t(e()),function(){return t(null)}):t?(t.current=e(),function(){return t.current=null}):void 0}),null==n?n:n.concat(t))}function FS(t,e){var n=$S(gS++,7);return XS(n.__H,e)?(n.__V=t(),n.i=e,n.__h=t,n.__V):n.__}function PS(t,e){return wS=8,FS((function(){return t}),e)}function jS(t){var e=yS.context[t.__c],n=$S(gS++,9);return n.c=t,e?(null==n.__&&(n.__=!0,e.sub(yS)),e.props.value):t.__}function BS(t,e){SS.useDebugValue&&SS.useDebugValue(e?e(t):t)}function zS(t){var e=$S(gS++,10),n=MS();return e.__=t,yS.componentDidCatch||(yS.componentDidCatch=function(t,r){e.__&&e.__(t,r),n[1](t)}),[n[0],function(){n[1](void 0)}]}function US(){var t=$S(gS++,11);if(!t.__){for(var e=yS.__v;null!==e&&!e.__m&&null!==e.__;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function qS(){for(var t;t=_S.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(GS),t.__H.__h.forEach(YS),t.__H.__h=[]}catch(e){t.__H.__h=[],SS.__e(e,t.__v)}}SS.__b=function(t){yS=null,xS&&xS(t)},SS.__=function(t,e){e.__k&&e.__k.__m&&(t.__m=e.__k.__m),AS&&AS(t,e)},SS.__r=function(t){CS&&CS(t),gS=0;var e=(yS=t.__c).__H;e&&(bS===yS?(e.__h=[],yS.__h=[],e.__.forEach((function(t){t.__N&&(t.__=t.__N),t.__V=kS,t.__N=t.i=void 0}))):(e.__h.forEach(GS),e.__h.forEach(YS),e.__h=[],gS=0)),bS=yS},SS.diffed=function(t){TS&&TS(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==_S.push(e)&&vS===SS.requestAnimationFrame||((vS=SS.requestAnimationFrame)||WS)(qS)),e.__H.__.forEach((function(t){t.i&&(t.__H=t.i),t.__V!==kS&&(t.__=t.__V),t.i=void 0,t.__V=kS}))),bS=yS=null},SS.__c=function(t,e){e.some((function(t){try{t.__h.forEach(GS),t.__h=t.__h.filter((function(t){return!t.__||YS(t)}))}catch(n){e.some((function(t){t.__h&&(t.__h=[])})),e=[],SS.__e(n,t.__v)}})),IS&&IS(t,e)},SS.unmount=function(t){ES&&ES(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach((function(t){try{GS(t)}catch(t){e=t}})),n.__H=void 0,e&&SS.__e(e,n.__v))};var HS="function"==typeof requestAnimationFrame;function WS(t){var e,n=function(){clearTimeout(r),HS&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);HS&&(e=requestAnimationFrame(n))}function GS(t){var e=yS,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),yS=e}function YS(t){var e=yS;t.__c=t.__(),yS=e}function XS(t,e){return!t||t.length!==e.length||e.some((function(e,n){return e!==t[n]}))}function JS(t,e){return"function"==typeof e?e(t):e}const KS={__proto__:null,useCallback:PS,useContext:jS,useDebugValue:BS,useEffect:NS,useErrorBoundary:zS,useId:US,useImperativeHandle:LS,useLayoutEffect:OS,useMemo:FS,useReducer:RS,useRef:DS,useState:MS};const VS="http://www.w3.org/2000/svg";function ZS(){const t=t=>K_.createElementNS(VS,t);const e=_k(t("svg"),{width:"32",height:"30",viewBox:"0 0 72 66",fill:"inherit"});const n=_k(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"});e.appendChild(n);return e}const QS="/home/runner/work/sentry-javascript/sentry-javascript/packages/feedback/src/modal/components/DialogHeader.tsx";function tx({options:t}){const e=FS((()=>({__html:ZS().outerHTML})),[]);return Gk("h2",{class:"dialog__header",__self:this,__source:{fileName:QS,lineNumber:16}},t.formTitle,t.showBranding?Gk("a",{class:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer",dangerouslySetInnerHTML:e,__self:this,__source:{fileName:QS,lineNumber:19}}):null)}function ex(t,e){const n=[];if(e.isNameRequired&&!t.name){n.push(e.nameLabel)}if(e.isEmailRequired&&!t.email){n.push(e.emailLabel)}if(!t.message){n.push(e.messageLabel)}return n}const nx="/home/runner/work/sentry-javascript/sentry-javascript/packages/feedback/src/modal/components/Form.tsx";function rx(t,e){const n=t.get(e);if(typeof n==="string"){return n.trim()}return""}function ix({options:t,defaultEmail:e,defaultName:n,onFormClose:r,onSubmit:i,onSubmitSuccess:s,onSubmitError:o,showEmail:c,showName:a,screenshotInput:u}){const{tags:f,addScreenshotButtonLabel:l,removeScreenshotButtonLabel:d,cancelButtonLabel:h,emailLabel:p,emailPlaceholder:m,isEmailRequired:g,isNameRequired:y,messageLabel:b,messagePlaceholder:v,nameLabel:w,namePlaceholder:_,submitButtonLabel:k,isRequiredLabel:S}=t;const[x,C]=MS(null);const[T,I]=MS(false);const E=u&&u.input;const[A,$]=MS(null);const M=PS((t=>{$(t);I(false)}),[]);const R=PS((t=>{const e=ex(t,{emailLabel:p,isEmailRequired:g,isNameRequired:y,messageLabel:b,nameLabel:w});if(e.length>0){C(`Please enter in the following required fields: ${e.join(", ")}`)}else{C(null)}return e.length===0}),[p,g,y,b,w]);const N=PS((async t=>{try{t.preventDefault();if(!(t.target instanceof HTMLFormElement)){return}const e=new FormData(t.target);const n=await(u&&T?u.value():undefined);const r={name:rx(e,"name"),email:rx(e,"email"),message:rx(e,"message"),attachments:n?[n]:undefined};if(!R(r)){return}try{await i({name:r.name,email:r.email,message:r.message,source:hk,tags:f},{attachments:r.attachments});s(r)}catch(t){yk&&G.error(t);C(t);o(t)}}catch(t){}}),[u&&T,s,o]);return Gk("form",{class:"form",onSubmit:N,__self:this,__source:{fileName:nx,lineNumber:144}},E&&T?Gk(E,{onError:M,__self:this,__source:{fileName:nx,lineNumber:146}}):null,Gk("div",{class:"form__right","data-sentry-feedback":true,__self:this,__source:{fileName:nx,lineNumber:149}},Gk("div",{class:"form__top",__self:this,__source:{fileName:nx,lineNumber:150}},x?Gk("div",{class:"form__error-container",__self:this,__source:{fileName:nx,lineNumber:151}},x):null,a?Gk("label",{for:"name",class:"form__label",__self:this,__source:{fileName:nx,lineNumber:154}},Gk(sx,{label:w,isRequiredLabel:S,isRequired:y,__self:this,__source:{fileName:nx,lineNumber:155}}),Gk("input",{class:"form__input",defaultValue:n,id:"name",name:"name",placeholder:_,required:y,type:"text",__self:this,__source:{fileName:nx,lineNumber:156}})):Gk("input",{"aria-hidden":true,value:n,name:"name",type:"hidden",__self:this,__source:{fileName:nx,lineNumber:167}}),c?Gk("label",{for:"email",class:"form__label",__self:this,__source:{fileName:nx,lineNumber:171}},Gk(sx,{label:p,isRequiredLabel:S,isRequired:g,__self:this,__source:{fileName:nx,lineNumber:172}}),Gk("input",{class:"form__input",defaultValue:e,id:"email",name:"email",placeholder:m,required:g,type:"email",__self:this,__source:{fileName:nx,lineNumber:173}})):Gk("input",{"aria-hidden":true,value:e,name:"email",type:"hidden",__self:this,__source:{fileName:nx,lineNumber:184}}),Gk("label",{for:"message",class:"form__label",__self:this,__source:{fileName:nx,lineNumber:187}},Gk(sx,{label:b,isRequiredLabel:S,isRequired:true,__self:this,__source:{fileName:nx,lineNumber:188}}),Gk("textarea",{autoFocus:true,class:"form__input form__input--textarea",id:"message",name:"message",placeholder:v,required:true,rows:5,__self:this,__source:{fileName:nx,lineNumber:189}})),E?Gk("label",{for:"screenshot",class:"form__label",__self:this,__source:{fileName:nx,lineNumber:201}},Gk("button",{class:"btn btn--default",type:"button",onClick:()=>{$(null);I((t=>!t))},__self:this,__source:{fileName:nx,lineNumber:202}},T?d:l),A?Gk("div",{class:"form__error-container",__self:this,__source:{fileName:nx,lineNumber:212}},A.message):null):null),Gk("div",{class:"btn-group",__self:this,__source:{fileName:nx,lineNumber:216}},Gk("button",{class:"btn btn--primary",type:"submit",__self:this,__source:{fileName:nx,lineNumber:217}},k),Gk("button",{class:"btn btn--default",type:"button",onClick:r,__self:this,__source:{fileName:nx,lineNumber:220}},h))))}function sx({label:t,isRequired:e,isRequiredLabel:n}){return Gk("span",{class:"form__label__text",__self:this,__source:{fileName:nx,lineNumber:239}},t,e&&Gk("span",{class:"form__label__text--required",__self:this,__source:{fileName:nx,lineNumber:241}},n))}const ox=16;const cx=17;const ax="http://www.w3.org/2000/svg";function ux(){const t=t=>J_.document.createElementNS(ax,t);const e=_k(t("svg"),{width:`${ox}`,height:`${cx}`,viewBox:`0 0 ${ox} ${cx}`,fill:"inherit"});const n=_k(t("g"),{clipPath:"url(#clip0_57_156)"});const r=_k(t("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"});const i=_k(t("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"});e.appendChild(n).append(i,r);const s=t("defs");const o=_k(t("clipPath"),{id:"clip0_57_156"});const c=_k(t("rect"),{width:`${ox}`,height:`${ox}`,fill:"white",transform:"translate(0 0.5)"});o.appendChild(c);s.appendChild(o);e.appendChild(s).appendChild(o).appendChild(c);return e}const fx="/home/runner/work/sentry-javascript/sentry-javascript/packages/feedback/src/modal/components/Dialog.tsx";function lx({open:t,onFormSubmitted:e,...n}){const r=n.options;const i=FS((()=>({__html:ux().outerHTML})),[]);const[s,o]=MS(null);const c=PS((()=>{if(s){clearTimeout(s);o(null)}e()}),[s]);const a=PS((t=>{n.onSubmitSuccess(t);o(setTimeout((()=>{e();o(null)}),mk))}),[e]);return Gk(Xk,{__self:this,__source:{fileName:fx,lineNumber:48}},s?Gk("div",{class:"success__position",onClick:c,__self:this,__source:{fileName:fx,lineNumber:50}},Gk("div",{class:"success__content",__self:this,__source:{fileName:fx,lineNumber:51}},r.successMessageText,Gk("span",{class:"success__icon",dangerouslySetInnerHTML:i,__self:this,__source:{fileName:fx,lineNumber:53}}))):Gk("dialog",{class:"dialog",onClick:r.onFormClose,open:t,__self:this,__source:{fileName:fx,lineNumber:57}},Gk("div",{class:"dialog__position",__self:this,__source:{fileName:fx,lineNumber:58}},Gk("div",{class:"dialog__content",onClick:t=>{t.stopPropagation()},__self:this,__source:{fileName:fx,lineNumber:59}},Gk(tx,{options:r,__self:this,__source:{fileName:fx,lineNumber:66}}),Gk(ix,{...n,onSubmitSuccess:a,__self:this,__source:{fileName:fx,lineNumber:67}})))))}const dx=`\n.dialog {\n position: fixed;\n z-index: var(--z-index);\n margin: 0;\n inset: 0;\n\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n height: 100vh;\n width: 100vw;\n\n color: var(--dialog-color, var(--foreground));\n fill: var(--dialog-color, var(--foreground));\n line-height: 1.75em;\n\n background-color: rgba(0, 0, 0, 0.05);\n border: none;\n inset: 0;\n opacity: 1;\n transition: opacity 0.2s ease-in-out;\n}\n\n.dialog__position {\n position: fixed;\n z-index: var(--z-index);\n inset: var(--dialog-inset);\n padding: var(--page-margin);\n display: flex;\n max-height: calc(100vh - (2 * var(--page-margin)));\n}\n@media (max-width: 600px) {\n .dialog__position {\n inset: var(--page-margin);\n padding: 0;\n }\n}\n\n.dialog__position:has(.editor) {\n inset: var(--page-margin);\n padding: 0;\n}\n\n.dialog:not([open]) {\n opacity: 0;\n pointer-events: none;\n visibility: hidden;\n}\n.dialog:not([open]) .dialog__content {\n transform: translate(0, -16px) scale(0.98);\n}\n\n.dialog__content {\n display: flex;\n flex-direction: column;\n gap: 16px;\n padding: var(--dialog-padding, 24px);\n max-width: 100%;\n width: 100%;\n max-height: 100%;\n overflow: auto;\n\n background: var(--dialog-background, var(--background));\n border-radius: var(--dialog-border-radius, 20px);\n border: var(--dialog-border, var(--border));\n box-shadow: var(--dialog-box-shadow, var(--box-shadow));\n transform: translate(0, 0) scale(1);\n transition: transform 0.2s ease-in-out;\n}\n`;const hx=`\n.dialog__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-weight: var(--dialog-header-weight, 600);\n margin: 0;\n}\n\n.brand-link {\n display: inline-flex;\n}\n.brand-link:focus-visible {\n outline: var(--outline);\n}\n`;const px=`\n.form {\n display: flex;\n overflow: auto;\n flex-direction: row;\n gap: 16px;\n flex: 1 0;\n}\n\n.form__right {\n flex: 0 0 var(--form-width, 272px);\n width: var(--form-width, 272px);\n display: flex;\n overflow: auto;\n flex-direction: column;\n justify-content: space-between;\n gap: 20px;\n}\n\n@media (max-width: 600px) {\n .form__right {\n width: auto;\n }\n}\n\n.form__top {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.form__error-container {\n color: var(--error-color);\n fill: var(--error-color);\n}\n\n.form__label {\n display: flex;\n flex-direction: column;\n gap: 4px;\n margin: 0px;\n}\n\n.form__label__text {\n display: flex;\n gap: 4px;\n align-items: center;\n}\n\n.form__label__text--required {\n font-size: 0.85em;\n}\n\n.form__input {\n font-family: inherit;\n line-height: inherit;\n background: transparent;\n box-sizing: border-box;\n border: var(--input-border, var(--border));\n border-radius: var(--input-border-radius, 6px);\n color: var(--input-color, inherit);\n fill: var(--input-color, inherit);\n font-size: var(--input-font-size, inherit);\n font-weight: var(--input-font-weight, 500);\n padding: 6px 12px;\n}\n\n.form__input::placeholder {\n opacity: 0.65;\n color: var(--input-placeholder-color, inherit);\n filter: var(--interactive-filter);\n}\n\n.form__input:focus-visible {\n outline: var(--input-focus-outline, var(--outline));\n}\n\n.form__input--textarea {\n font-family: inherit;\n resize: vertical;\n}\n\n.error {\n color: var(--error-color);\n fill: var(--error-color);\n}\n`;const mx=`\n.btn-group {\n display: grid;\n gap: 8px;\n}\n\n.btn {\n line-height: inherit;\n border: var(--button-border, var(--border));\n border-radius: var(--button-border-radius, 6px);\n cursor: pointer;\n font-family: inherit;\n font-size: var(--button-font-size, inherit);\n font-weight: var(--button-font-weight, 600);\n padding: var(--button-padding, 6px 16px);\n}\n.btn[disabled] {\n opacity: 0.6;\n pointer-events: none;\n}\n\n.btn--primary {\n color: var(--button-primary-color, var(--accent-foreground));\n fill: var(--button-primary-color, var(--accent-foreground));\n background: var(--button-primary-background, var(--accent-background));\n border: var(--button-primary-border, var(--border));\n border-radius: var(--button-primary-border-radius, 6px);\n font-weight: var(--button-primary-font-weight, 500);\n}\n.btn--primary:hover {\n color: var(--button-primary-hover-color, var(--accent-foreground));\n fill: var(--button-primary-hover-color, var(--accent-foreground));\n background: var(--button-primary-hover-background, var(--accent-background));\n filter: var(--interactive-filter);\n}\n.btn--primary:focus-visible {\n background: var(--button-primary-hover-background, var(--accent-background));\n filter: var(--interactive-filter);\n outline: var(--button-primary-focus-outline, var(--outline));\n}\n\n.btn--default {\n color: var(--button-color, var(--foreground));\n fill: var(--button-color, var(--foreground));\n background: var(--button-background, var(--background));\n border: var(--button-border, var(--border));\n border-radius: var(--button-border-radius, 6px);\n font-weight: var(--button-font-weight, 500);\n}\n.btn--default:hover {\n color: var(--button-color, var(--foreground));\n fill: var(--button-color, var(--foreground));\n background: var(--button-hover-background, var(--background));\n filter: var(--interactive-filter);\n}\n.btn--default:focus-visible {\n background: var(--button-hover-background, var(--background));\n filter: var(--interactive-filter);\n outline: var(--button-focus-outline, var(--outline));\n}\n`;const gx=`\n.success__position {\n position: fixed;\n inset: var(--dialog-inset);\n padding: var(--page-margin);\n z-index: var(--z-index);\n}\n.success__content {\n background: var(--success-background, var(--background));\n border: var(--success-border, var(--border));\n border-radius: var(--success-border-radius, 1.7em/50%);\n box-shadow: var(--success-box-shadow, var(--box-shadow));\n font-weight: var(--success-font-weight, 600);\n color: var(--success-color);\n fill: var(--success-color);\n padding: 12px 24px;\n line-height: 1.75em;\n\n display: grid;\n align-items: center;\n grid-auto-flow: column;\n gap: 6px;\n cursor: default;\n}\n\n.success__icon {\n display: flex;\n}\n`;function yx(t){const e=K_.createElement("style");e.textContent=`\n:host {\n --dialog-inset: var(--inset);\n}\n\n${dx}\n${hx}\n${px}\n${mx}\n${gx}\n`;if(t){e.setAttribute("nonce",t)}return e}const bx="/home/runner/work/sentry-javascript/sentry-javascript/packages/feedback/src/modal/integration.tsx";function vx(){const t=Jr().getUser();const e=Kr().getUser();const n=Vr().getUser();if(t&&Object.keys(t).length){return t}if(e&&Object.keys(e).length){return e}return n}const wx=()=>({name:"FeedbackModal",setupOnce(){},createDialog:({options:t,screenshotIntegration:e,sendFeedback:n,shadow:r})=>{const i=r;const s=t.useSentryUser;const o=vx();const c=K_.createElement("div");const a=yx(t.styleNonce);let u="";const f={get el(){return c},appendToDom(){if(!i.contains(a)&&!i.contains(c)){i.appendChild(a);i.appendChild(c)}},removeFromDom(){i.removeChild(c);i.removeChild(a);K_.body.style.overflow=u},open(){d(true);t.onFormOpen&&t.onFormOpen();u=K_.body.style.overflow;K_.body.style.overflow="hidden"},close(){d(false);K_.body.style.overflow=u}};const l=e&&e.createInput({h:Gk,hooks:KS,dialog:f,options:t});const d=e=>{mS(Gk(lx,{options:t,screenshotInput:l,showName:t.showName||t.isNameRequired,showEmail:t.showEmail||t.isEmailRequired,defaultName:s&&o&&o[s.name]||"",defaultEmail:s&&o&&o[s.email]||"",onFormClose:()=>{d(false);t.onFormClose&&t.onFormClose()},onSubmit:n,onSubmitSuccess:e=>{d(false);t.onSubmitSuccess&&t.onSubmitSuccess(e)},onSubmitError:e=>{t.onSubmitError&&t.onSubmitError(e)},onFormSubmitted:()=>{t.onFormSubmitted&&t.onFormSubmitted()},open:e,__self:undefined,__source:{fileName:bx,lineNumber:67}}),c)};return f}});const _x="/home/runner/work/sentry-javascript/sentry-javascript/packages/feedback/src/screenshot/components/CropCorner.tsx";function kx({h:t}){return function e({top:n,left:r,corner:i,onGrabButton:s}){return t("button",{class:`editor__crop-corner editor__crop-corner--${i} `,style:{top:n,left:r},onMouseDown:t=>{t.preventDefault();s(t,i)},onClick:t=>{t.preventDefault()},__self:this,__source:{fileName:_x,lineNumber:22}})}}function Sx(t){const e=K_.createElement("style");const n="#1A141F";const r="#302735";e.textContent=`\n.editor {\n padding: 10px;\n padding-top: 65px;\n padding-bottom: 65px;\n flex-grow: 1;\n\n background-color: ${n};\n background-image: repeating-linear-gradient(\n -145deg,\n transparent,\n transparent 8px,\n ${n} 8px,\n ${n} 11px\n ),\n repeating-linear-gradient(\n -45deg,\n transparent,\n transparent 15px,\n ${r} 15px,\n ${r} 16px\n );\n}\n\n.editor__canvas-container {\n width: 100%;\n height: 100%;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.editor__canvas-container canvas {\n object-fit: contain;\n position: relative;\n}\n\n.editor__crop-btn-group {\n padding: 8px;\n gap: 8px;\n border-radius: var(--menu-border-radius, 6px);\n background: var(--button-primary-background, var(--background));\n width: 175px;\n position: absolute;\n}\n\n.editor__crop-corner {\n width: 30px;\n height: 30px;\n position: absolute;\n background: none;\n border: 3px solid #ffffff;\n}\n\n.editor__crop-corner--top-left {\n cursor: nwse-resize;\n border-right: none;\n border-bottom: none;\n}\n.editor__crop-corner--top-right {\n cursor: nesw-resize;\n border-left: none;\n border-bottom: none;\n}\n.editor__crop-corner--bottom-left {\n cursor: nesw-resize;\n border-right: none;\n border-top: none;\n}\n.editor__crop-corner--bottom-right {\n cursor: nwse-resize;\n border-left: none;\n border-top: none;\n}\n`;if(t){e.setAttribute("nonce",t)}return e}function xx({hooks:t}){return function e({onBeforeScreenshot:n,onScreenshot:r,onAfterScreenshot:i,onError:s}){t.useEffect((()=>{const t=async()=>{n();const t=await V_.mediaDevices.getDisplayMedia({video:{width:J_.innerWidth*J_.devicePixelRatio,height:J_.innerHeight*J_.devicePixelRatio},audio:false,monitorTypeSurfaces:"exclude",preferCurrentTab:true,selfBrowserSurface:"include",surfaceSwitching:"exclude"});const e=K_.createElement("video");await new Promise(((n,i)=>{e.srcObject=t;e.onloadedmetadata=()=>{r(e);t.getTracks().forEach((t=>t.stop()));n()};e.play().catch(i)}));i()};t().catch(s)}),[])}}const Cx="/home/runner/work/sentry-javascript/sentry-javascript/packages/feedback/src/screenshot/components/ScreenshotEditor.tsx";const Tx=30;const Ix=3;const Ex=Tx+Ix;const Ax=J_.devicePixelRatio;const $x=t=>({x:Math.min(t.startX,t.endX),y:Math.min(t.startY,t.endY),width:Math.abs(t.startX-t.endX),height:Math.abs(t.startY-t.endY)});const Mx=t=>{const e=t.clientHeight;const n=t.clientWidth;const r=t.width/t.height;let i=e*r;let s=e;if(i>n){i=n;s=n/r}const o=(n-i)/2;const c=(e-s)/2;return{startX:o,startY:c,endX:i+o,endY:s+c}};function Rx({h:t,hooks:e,imageBuffer:n,dialog:r,options:i}){const s=xx({hooks:e});return function o({onError:c}){const a=e.useMemo((()=>({__html:Sx(i.styleNonce).innerText})),[]);const u=kx({h:t});const f=e.useRef(null);const l=e.useRef(null);const d=e.useRef(null);const[h,p]=e.useState({startX:0,startY:0,endX:0,endY:0});const[m,g]=e.useState(false);const[y,b]=e.useState(false);e.useEffect((()=>{J_.addEventListener("resize",v,false)}),[]);function v(){const t=d.current;const e=$x(Mx(n));if(t){t.width=e.width*Ax;t.height=e.height*Ax;t.style.width=`${e.width}px`;t.style.height=`${e.height}px`;const n=t.getContext("2d");if(n){n.scale(Ax,Ax)}}const r=l.current;if(r){r.style.width=`${e.width}px`;r.style.height=`${e.height}px`}p({startX:0,startY:0,endX:e.width,endY:e.height})}e.useEffect((()=>{const t=d.current;if(!t){return}const e=t.getContext("2d");if(!e){return}const r=$x(Mx(n));const i=$x(h);e.clearRect(0,0,r.width,r.height);e.fillStyle="rgba(0, 0, 0, 0.5)";e.fillRect(0,0,r.width,r.height);e.clearRect(i.x,i.y,i.width,i.height);e.strokeStyle="#ffffff";e.lineWidth=3;e.strokeRect(i.x+1,i.y+1,i.width-2,i.height-2);e.strokeStyle="#000000";e.lineWidth=1;e.strokeRect(i.x+3,i.y+3,i.width-6,i.height-6)}),[h]);function w(t,e){g(false);b(true);const n=_(e);const r=()=>{K_.removeEventListener("mousemove",n);K_.removeEventListener("mouseup",r);g(true);b(false)};K_.addEventListener("mouseup",r);K_.addEventListener("mousemove",n)}const _=e.useCallback((t=>function(e){if(!d.current){return}const n=d.current;const r=n.getBoundingClientRect();const i=e.clientX-r.x;const s=e.clientY-r.y;switch(t){case"top-left":p((t=>({...t,startX:Math.min(Math.max(0,i),t.endX-Ex),startY:Math.min(Math.max(0,s),t.endY-Ex)})));break;case"top-right":p((t=>({...t,endX:Math.max(Math.min(i,n.width/Ax),t.startX+Ex),startY:Math.min(Math.max(0,s),t.endY-Ex)})));break;case"bottom-left":p((t=>({...t,startX:Math.min(Math.max(0,i),t.endX-Ex),endY:Math.max(Math.min(s,n.height/Ax),t.startY+Ex)})));break;case"bottom-right":p((t=>({...t,endX:Math.max(Math.min(i,n.width/Ax),t.startX+Ex),endY:Math.max(Math.min(s,n.height/Ax),t.startY+Ex)})));break}}),[]);const k=e.useRef({initialX:0,initialY:0});function S(t){if(y)return;k.current={initialX:t.clientX,initialY:t.clientY};const e=t=>{const e=d.current;if(!e)return;const n=t.clientX-k.current.initialX;const r=t.clientY-k.current.initialY;p((i=>{const s=Math.max(0,Math.min(i.startX+n,e.width/Ax-(i.endX-i.startX)));const o=Math.max(0,Math.min(i.startY+r,e.height/Ax-(i.endY-i.startY)));const c=s+(i.endX-i.startX);const a=o+(i.endY-i.startY);k.current.initialX=t.clientX;k.current.initialY=t.clientY;return{startX:s,startY:o,endX:c,endY:a}}))};const n=()=>{K_.removeEventListener("mousemove",e);K_.removeEventListener("mouseup",n)};K_.addEventListener("mousemove",e);K_.addEventListener("mouseup",n)}function x(){const t=K_.createElement("canvas");const e=$x(Mx(n));const r=$x(h);t.width=r.width*Ax;t.height=r.height*Ax;const i=t.getContext("2d");if(i&&n){i.drawImage(n,r.x/e.width*n.width,r.y/e.height*n.height,r.width/e.width*n.width,r.height/e.height*n.height,0,0,t.width,t.height)}const s=n.getContext("2d");if(s){s.clearRect(0,0,n.width,n.height);n.width=t.width;n.height=t.height;n.style.width=`${r.width}px`;n.style.height=`${r.height}px`;s.drawImage(t,0,0);v()}}s({onBeforeScreenshot:e.useCallback((()=>{r.el.style.display="none"}),[]),onScreenshot:e.useCallback((t=>{const e=n.getContext("2d");if(!e){throw new Error("Could not get canvas context")}n.width=t.videoWidth;n.height=t.videoHeight;n.style.width="100%";n.style.height="100%";e.drawImage(t,0,0)}),[n]),onAfterScreenshot:e.useCallback((()=>{r.el.style.display="block";const t=f.current;t&&t.appendChild(n);v()}),[]),onError:e.useCallback((t=>{r.el.style.display="block";c(t)}),[])});return t("div",{class:"editor",__self:this,__source:{fileName:Cx,lineNumber:315}},t("style",{nonce:i.styleNonce,dangerouslySetInnerHTML:a,__self:this,__source:{fileName:Cx,lineNumber:316}}),t("div",{class:"editor__canvas-container",ref:f,__self:this,__source:{fileName:Cx,lineNumber:317}},t("div",{class:"editor__crop-container",style:{position:"absolute",zIndex:1},ref:l,__self:this,__source:{fileName:Cx,lineNumber:318}},t("canvas",{onMouseDown:S,style:{position:"absolute",cursor:m?"move":"auto"},ref:d,__self:this,__source:{fileName:Cx,lineNumber:319}}),t(u,{left:h.startX-Ix,top:h.startY-Ix,onGrabButton:w,corner:"top-left",__self:this,__source:{fileName:Cx,lineNumber:324}}),t(u,{left:h.endX-Tx+Ix,top:h.startY-Ix,onGrabButton:w,corner:"top-right",__self:this,__source:{fileName:Cx,lineNumber:330}}),t(u,{left:h.startX-Ix,top:h.endY-Tx+Ix,onGrabButton:w,corner:"bottom-left",__self:this,__source:{fileName:Cx,lineNumber:336}}),t(u,{left:h.endX-Tx+Ix,top:h.endY-Tx+Ix,onGrabButton:w,corner:"bottom-right",__self:this,__source:{fileName:Cx,lineNumber:342}}),t("div",{style:{left:Math.max(0,h.endX-191),top:Math.max(0,h.endY+8),display:m?"flex":"none"},class:"editor__crop-btn-group",__self:this,__source:{fileName:Cx,lineNumber:348}},t("button",{onClick:t=>{t.preventDefault();if(d.current){p({startX:0,startY:0,endX:d.current.width/Ax,endY:d.current.height/Ax})}g(false)},class:"btn btn--default",__self:this,__source:{fileName:Cx,lineNumber:356}},i.cancelButtonLabel),t("button",{onClick:t=>{t.preventDefault();x();g(false)},class:"btn btn--primary",__self:this,__source:{fileName:Cx,lineNumber:373}},i.confirmButtonLabel)))))}}const Nx=()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:({h:t,hooks:e,dialog:n,options:r})=>{const i=K_.createElement("canvas");return{input:Rx({h:t,hooks:e,imageBuffer:i,dialog:n,options:r}),value:async()=>{const t=await new Promise((t=>{i.toBlob(t,"image/png")}));if(t){const e=new Uint8Array(await t.arrayBuffer());const n={data:e,filename:"screenshot.png",contentType:"application/png"};return n}return undefined}}}});const Ox=Mk({lazyLoadIntegration:cp});const Dx=Mk({lazyLoadIntegration:cp,getModalIntegration:()=>wx,getScreenshotIntegration:()=>Nx});function Lx(t,e=1,n){cu.increment(ju,t,e,n)}function Fx(t,e,n){cu.distribution(ju,t,e,n)}function Px(t,e,n){cu.set(ju,t,e,n)}function jx(t,e,n){cu.gauge(ju,t,e,n)}function Bx(t,e,n="second",r){return cu.timing(ju,t,e,n,r)}const zx={increment:Lx,distribution:Fx,set:Px,gauge:jx,timing:Bx};const Ux=new WeakMap;const qx=new Map;const Hx={traceFetch:true,traceXHR:true,enableHTTPTimings:true};function Wx(t,e){const{traceFetch:n,traceXHR:r,shouldCreateSpanForRequest:i,enableHTTPTimings:s,tracePropagationTargets:o}={traceFetch:Hx.traceFetch,traceXHR:Hx.traceXHR,...e};const c=typeof i==="function"?i:t=>true;const a=t=>Vx(t,o);const u={};if(n){t.addEventProcessor((t=>{if(t.type==="transaction"&&t.spans){t.spans.forEach((t=>{if(t.op==="http.client"){const e=qx.get(t.span_id);if(e){t.timestamp=e/1e3;qx.delete(t.span_id)}}}))}return t}));Jt((t=>{if(t.response){const e=Ux.get(t.response);if(e&&t.endTimestamp){qx.set(e,t.endTimestamp)}}}));Xt((t=>{const e=Bu(t,c,a,u);if(t.response&&t.fetchData.__span){Ux.set(t.response,t.fetchData.__span)}if(e){const n=eC(t.fetchData.url);const r=n?Ze(n).host:undefined;e.setAttributes({"http.url":n,"server.address":r})}if(s&&e){Yx(e)}}))}if(r){Rd((t=>{const e=Zx(t,c,a,u);if(s&&e){Yx(e)}}))}}function Gx(t){return t.entryType==="resource"&&"initiatorType"in t&&typeof t.nextHopProtocol==="string"&&(t.initiatorType==="fetch"||t.initiatorType==="xmlhttprequest")}function Yx(t){const{url:e}=Ei(t).data||{};if(!e||typeof e!=="string"){return}const n=xl("resource",(({entries:r})=>{r.forEach((r=>{if(Gx(r)&&r.name.endsWith(e)){const e=Kx(r);e.forEach((e=>t.setAttribute(...e)));setTimeout(n)}}))}))}function Xx(t){let e="unknown";let n="unknown";let r="";for(const i of t){if(i==="/"){[e,n]=t.split("/");break}if(!isNaN(Number(i))){e=r==="h"?"http":r;n=t.split(r)[1];break}r+=i}if(r===t){e=r}return{name:e,version:n}}function Jx(t=0){return((Yt||performance.timeOrigin)+t)/1e3}function Kx(t){const{name:e,version:n}=Xx(t.nextHopProtocol);const r=[];r.push(["network.protocol.version",n],["network.protocol.name",e]);if(!Yt){return r}return[...r,["http.request.redirect_start",Jx(t.redirectStart)],["http.request.fetch_start",Jx(t.fetchStart)],["http.request.domain_lookup_start",Jx(t.domainLookupStart)],["http.request.domain_lookup_end",Jx(t.domainLookupEnd)],["http.request.connect_start",Jx(t.connectStart)],["http.request.secure_connection_start",Jx(t.secureConnectionStart)],["http.request.connection_end",Jx(t.connectEnd)],["http.request.request_start",Jx(t.requestStart)],["http.request.response_start",Jx(t.responseStart)],["http.request.response_end",Jx(t.responseEnd)]]}function Vx(t,e){const n=Ku.location&&Ku.location.href;if(!n){const n=!!t.match(/^\/(?!\/)/);if(!e){return n}else{return S(t,e)}}else{let r;let i;try{r=new URL(t,n);i=new URL(n).origin}catch(t){return false}const s=r.origin===i;if(!e){return s}else{return S(r.toString(),e)||s&&S(r.pathname,e)}}}function Zx(t,e,n,r){const i=t.xhr;const s=i&&i[Md];if(!i||i.__sentry_own_request__||!s){return undefined}const o=Ji()&&e(s.url);if(t.endTimestamp&&o){const t=i.__sentry_xhr_span_id__;if(!t)return;const e=r[t];if(e&&s.status_code!==undefined){wi(e,s.status_code);e.end();delete r[t]}return undefined}const c=eC(s.url);const a=c?Ze(c).host:undefined;const u=!!ji();const f=o&&u?xs({name:`${s.method} ${s.url}`,attributes:{type:"xhr","http.method":s.method,"http.url":c,url:s.url,"server.address":a,[ci]:"auto.http.browser",[oi]:"http.client"}}):new Ki;i.__sentry_xhr_span_id__=f.spanContext().spanId;r[i.__sentry_xhr_span_id__]=f;const l=ti();if(i.setRequestHeader&&n(s.url)&&l){Qx(i,l,Ji()&&u?f:undefined)}return f}function Qx(t,e,n){const r=Jr();const i=Kr();const{traceId:s,spanId:o,sampled:c,dsc:a}={...i.getPropagationContext(),...r.getPropagationContext()};const u=n&&Ji()?Ci(n):Ln(s,o,c);const f=An(a||(n?rs(n):ns(s,e)));tC(t,u,f)}function tC(t,e,n){try{t.setRequestHeader("sentry-trace",e);if(n){t.setRequestHeader(xn,n)}}catch(t){}}function eC(t){try{const e=new URL(t,Ku.location.origin);return e.href}catch(t){return undefined}}function nC(){if(Ku&&Ku.document){Ku.document.addEventListener("visibilitychange",(()=>{const t=ji();if(!t){return}const e=Pi(t);if(Ku.document.hidden&&e){const t="cancelled";const{op:n,status:r}=Ei(e);if(ef){G.log(`[Tracing] Transaction: ${t} -> since tab moved to the background, op: ${n}`)}if(!r){e.setStatus({code:bi,message:t})}e.setAttribute("sentry.cancellation_reason","document.hidden");e.end()}}))}else{ef&&G.warn("[Tracing] Could not set up background tab detection due to lack of global document")}}const rC="BrowserTracing";const iC={...Ls,instrumentNavigation:true,instrumentPageLoad:true,markBackgroundSpan:true,enableLongTask:true,enableLongAnimationFrame:true,enableInp:true,_experiments:{},...Hx};const sC=(t={})=>{Ui();const{enableInp:e,enableLongTask:n,enableLongAnimationFrame:r,_experiments:{enableInteractions:i,enableStandaloneClsSpans:s},beforeStartSpan:o,idleTimeout:c,finalTimeout:a,childSpanTimeout:u,markBackgroundSpan:f,traceFetch:l,traceXHR:d,shouldCreateSpanForRequest:h,enableHTTPTimings:p,instrumentPageLoad:m,instrumentNavigation:g}={...iC,...t};const y=Jl({recordClsStandaloneSpans:s||false});if(e){Fd()}if(r&&M.PerformanceObserver&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")){Vl()}else if(n){Kl()}if(i){Zl()}const b={name:undefined,source:undefined};function v(t,e){const n=e.op==="pageload";const r=o?o(e):e;const i=r.attributes||{};if(e.name!==r.name){i[ii]="custom";r.attributes=i}b.name=r.name;b.source=i[ii];const f=zs(r,{idleTimeout:c,finalTimeout:a,childSpanTimeout:u,disableAutoFinish:n,beforeSpanEnd:t=>{y();rd(t,{recordClsOnPageloadSpan:!s})}});function l(){if(["interactive","complete"].includes(Ku.document.readyState)){t.emit("idleSpanEnableAutoFinish",f)}}if(n&&Ku.document){Ku.document.addEventListener("readystatechange",(()=>{l()}));l()}return f}return{name:rC,afterAllSetup(t){let n;let r=Ku.location&&Ku.location.href;t.on("startNavigationSpan",(e=>{if(ti()!==t){return}if(n&&!Ei(n).timestamp){ef&&G.log(`[Tracing] Finishing current root span with op: ${Ei(n).op}`);n.end()}n=v(t,{op:"navigation",...e})}));t.on("startPageLoadSpan",((e,r={})=>{if(ti()!==t){return}if(n&&!Ei(n).timestamp){ef&&G.log(`[Tracing] Finishing current root span with op: ${Ei(n).op}`);n.end()}const i=r.sentryTrace||aC("sentry-trace");const s=r.baggage||aC("baggage");const o=Dn(i,s);Jr().setPropagationContext(o);n=v(t,{op:"pageload",...e})}));t.on("spanEnd",(t=>{const e=Ei(t).op;if(t!==Pi(t)||e!=="navigation"&&e!=="pageload"){return}const n=Jr();const r=n.getPropagationContext();n.setPropagationContext({...r,sampled:r.sampled!==undefined?r.sampled:Mi(t),dsc:r.dsc||rs(t)})}));if(Ku.location){if(m){oC(t,{name:Ku.location.pathname,startTime:Yt?Yt/1e3:undefined,attributes:{[ii]:"url",[ci]:"auto.pageload.browser"}})}if(g){xd((({to:e,from:n})=>{if(n===undefined&&r&&r.indexOf(e)!==-1){r=undefined;return}if(n!==e){r=undefined;cC(t,{name:Ku.location.pathname,attributes:{[ii]:"url",[ci]:"auto.navigation.browser"}})}}))}}if(f){nC()}if(i){uC(c,a,u,b)}if(e){Bd()}Wx(t,{traceFetch:l,traceXHR:d,tracePropagationTargets:t.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:h,enableHTTPTimings:p})}}};function oC(t,e,n){t.emit("startPageLoadSpan",e,n);Jr().setTransactionName(e.name);const r=ji();const i=r&&Ei(r).op;return i==="pageload"?r:undefined}function cC(t,e){Kr().setPropagationContext(kr());Jr().setPropagationContext(kr());t.emit("startNavigationSpan",e);Jr().setTransactionName(e.name);const n=ji();const r=n&&Ei(n).op;return r==="navigation"?n:undefined}function aC(t){const e=P(`meta[name=${t}]`);return e?e.getAttribute("content"):undefined}function uC(t,e,n,r){let i;const s=()=>{const s="ui.action.click";const o=ji();const c=o&&Pi(o);if(c){const t=Ei(c).op;if(["navigation","pageload"].includes(t)){ef&&G.warn(`[Tracing] Did not create ${s} span because a pageload or navigation span is in progress.`);return undefined}}if(i){i.setAttribute(ai,"interactionInterrupted");i.end();i=undefined}if(!r.name){ef&&G.warn(`[Tracing] Did not create ${s} transaction because _latestRouteName is missing.`);return undefined}i=zs({name:r.name,op:s,attributes:{[ii]:r.source||"url"}},{idleTimeout:t,finalTimeout:e,childSpanTimeout:n})};if(Ku.document){addEventListener("click",s,{once:false,capture:true})}}function fC(t){return new Promise(((e,n)=>{t.oncomplete=t.onsuccess=()=>e(t.result);t.onabort=t.onerror=()=>n(t.error)}))}function lC(t,e){const n=indexedDB.open(t);n.onupgradeneeded=()=>n.result.createObjectStore(e);const r=fC(n);return t=>r.then((n=>t(n.transaction(e,"readwrite").objectStore(e))))}function dC(t){return fC(t.getAllKeys())}function hC(t,e,n){return t((t=>dC(t).then((r=>{if(r.length>=n){return}t.put(e,Math.max(...r,0)+1);return fC(t.transaction)}))))}function pC(t,e,n){return t((t=>dC(t).then((r=>{if(r.length>=n){return}t.put(e,Math.min(...r,0)-1);return fC(t.transaction)}))))}function mC(t){return t((t=>dC(t).then((e=>{const n=e[0];if(n==null){return undefined}return fC(t.get(n)).then((e=>{t.delete(n);return fC(t.transaction).then((()=>e))}))}))))}function gC(t){let e;function n(){if(e==undefined){e=lC(t.dbName||"sentry-offline",t.storeName||"queue")}return e}return{push:async e=>{try{const r=await qn(e);await hC(n(),r,t.maxQueueSize||30)}catch(t){}},unshift:async e=>{try{const r=await qn(e);await pC(n(),r,t.maxQueueSize||30)}catch(t){}},shift:async()=>{try{const t=await mC(n());if(t){return Wn(t)}}catch(t){}return undefined}}}function yC(t){return e=>t({...e,createStore:gC})}function bC(t=zd){return yC(fc(t))}const vC=1e6;const wC=String(0);const _C="main";let kC="";let SC="";let xC="";let CC=Ku.navigator&&Ku.navigator.userAgent||"";let TC="";const IC=Ku.navigator&&Ku.navigator.language||Ku.navigator&&Ku.navigator.languages&&Ku.navigator.languages[0]||"";function EC(t){return typeof t==="object"&&t!==null&&"getHighEntropyValues"in t}const AC=Ku.navigator&&Ku.navigator.userAgentData;if(EC(AC)){AC.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then((t=>{kC=t.platform||"";xC=t.architecture||"";TC=t.model||"";SC=t.platformVersion||"";if(t.fullVersionList&&t.fullVersionList.length>0){const e=t.fullVersionList[t.fullVersionList.length-1];CC=`${e.brand} ${e.version}`}})).catch((t=>void t))}function $C(t){return!("thread_metadata"in t)}function MC(t){if(!$C(t)){return t}return DC(t)}function RC(t){const e=t&&t.contexts&&t.contexts["trace"]&&t.contexts["trace"]["trace_id"];if(typeof e==="string"&&e.length!==32){if(ef){G.log(`[Profiling] Invalid traceId: ${e} on profiled event`)}}if(typeof e!=="string"){return""}return e}function NC(t,e,n,r){if(r.type!=="transaction"){throw new TypeError("Profiling events may only be attached to transactions, this should never occur.")}if(n===undefined||n===null){throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`)}const i=RC(r);const s=MC(n);const o=e?e:typeof r.start_timestamp==="number"?r.start_timestamp*1e3:Wt()*1e3;const c=typeof r.timestamp==="number"?r.timestamp*1e3:Wt()*1e3;const a={event_id:t,timestamp:new Date(o).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||Qi,runtime:{name:"javascript",version:Ku.navigator.userAgent},os:{name:kC,version:SC,build_number:CC},device:{locale:IC,model:TC,manufacturer:CC,architecture:xC,is_emulator:false},debug_meta:{images:jC(n.resources)},profile:s,transactions:[{name:r.transaction||"",id:r.event_id||ge(),trace_id:i,active_thread_id:wC,relative_start_ns:"0",relative_end_ns:((c-o)*1e6).toFixed(0)}]};return a}function OC(t){return Ei(t).op==="pageload"}function DC(t){let e=undefined;let n=0;const r={samples:[],stacks:[],frames:[],thread_metadata:{[wC]:{name:_C}}};const i=t.samples[0];if(!i){return r}const s=i.timestamp;const o=typeof performance.timeOrigin==="number"?performance.timeOrigin:Yt||0;const c=o-(Yt||o);t.samples.forEach(((i,o)=>{if(i.stackId===undefined){if(e===undefined){e=n;r.stacks[e]=[];n++}r["samples"][o]={elapsed_since_start_ns:((i.timestamp+c-s)*vC).toFixed(0),stack_id:e,thread_id:wC};return}let a=t.stacks[i.stackId];const u=[];while(a){u.push(a.frameId);const e=t.frames[a.frameId];if(e&&r.frames[a.frameId]===undefined){r.frames[a.frameId]={function:e.name,abs_path:typeof e.resourceId==="number"?t.resources[e.resourceId]:undefined,lineno:e.line,colno:e.column}}a=a.parentId===undefined?undefined:t.stacks[a.parentId]}const f={elapsed_since_start_ns:((i.timestamp+c-s)*vC).toFixed(0),stack_id:n,thread_id:wC};r["stacks"][n]=u;r["samples"][o]=f;n++}));return r}function LC(t,e){if(!e.length){return t}for(const n of e){t[1].push([{type:"profile"},n])}return t}function FC(t){const e=[];jn(t,((t,n)=>{if(n!=="transaction"){return}for(let n=1;n<t.length;n++){const r=t[n];if(r&&r.contexts&&r.contexts["profile"]&&r.contexts["profile"]["profile_id"]){e.push(t[n])}}}));return e}const PC=new WeakMap;function jC(t){const e=M._sentryDebugIds;if(!e){return[]}const n=ti();const r=n&&n.getOptions();const i=r&&r.stackParser;if(!i){return[]}let s;const o=PC.get(i);if(o){s=o}else{s=new Map;PC.set(i,s)}const c=Object.keys(e).reduce(((t,n)=>{let r;const o=s.get(n);if(o){r=o}else{r=i(n);s.set(n,r)}for(let i=r.length-1;i>=0;i--){const s=r[i];const o=s&&s.filename;if(s&&o){t[o]=e[n];break}}return t}),{});const a=[];for(const e of t){if(e&&c[e]){a.push({type:"sourcemap",code_file:e,debug_id:c[e]})}}return a}function BC(t){if(typeof t!=="number"&&typeof t!=="boolean"||typeof t==="number"&&isNaN(t)){ef&&G.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(t)} of type ${JSON.stringify(typeof t)}.`);return false}if(t===true||t===false){return true}if(t<0||t>1){ef&&G.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${t}.`);return false}return true}function zC(t){if(t.samples.length<2){if(ef){G.log("[Profiling] Discarding profile because it contains less than 2 samples")}return false}if(!t.frames.length){if(ef){G.log("[Profiling] Discarding profile because it contains no frames")}return false}return true}let UC=false;const qC=3e4;function HC(t){return typeof t==="function"}function WC(){const t=Ku.Profiler;if(!HC(t)){if(ef){G.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.")}return}const e=10;const n=Math.floor(qC/e);try{return new t({sampleInterval:e,maxBufferSize:n})}catch(t){if(ef){G.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header.");G.log("[Profiling] Disabling profiling for current user session.")}UC=true}return}function GC(t){if(UC){if(ef){G.log("[Profiling] Profiling has been disabled for the duration of the current user session.")}return false}if(!t.isRecording()){if(ef){G.log("[Profiling] Discarding profile because transaction was not sampled.")}return false}const e=ti();const n=e&&e.getOptions();if(!n){ef&&G.log("[Profiling] Profiling disabled, no options found.");return false}const r=n.profilesSampleRate;if(!BC(r)){ef&&G.warn("[Profiling] Discarding profile because of invalid sample rate.");return false}if(!r){ef&&G.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0");return false}const i=r===true?true:Math.random()<r;if(!i){ef&&G.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(r)})`);return false}return true}function YC(t,e,n,r){if(!zC(n)){return null}return NC(t,e,n,r)}const XC=new Map;function JC(){return XC.size}function KC(t){const e=XC.get(t);if(e){XC.delete(t)}return e}function VC(t,e){XC.set(t,e);if(XC.size>30){const t=XC.keys().next().value;XC.delete(t)}}function ZC(t){let e;if(OC(t)){e=Wt()*1e3}const n=WC();if(!n){return}if(ef){G.log(`[Profiling] started profiling span: ${Ei(t).description}`)}const r=ge();Jr().setContext("profile",{profile_id:r,start_timestamp:e});async function i(){if(!t){return}if(!n){return}return n.stop().then((e=>{if(s){Ku.clearTimeout(s);s=undefined}if(ef){G.log(`[Profiling] stopped profiling of span: ${Ei(t).description}`)}if(!e){if(ef){G.log(`[Profiling] profiler returned null profile for: ${Ei(t).description}`,"this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started")}return}VC(r,e)})).catch((t=>{if(ef){G.log("[Profiling] error while stopping profiler:",t)}}))}let s=Ku.setTimeout((()=>{if(ef){G.log("[Profiling] max profile duration elapsed, stopping profiling for:",Ei(t).description)}i()}),qC);const o=t.end.bind(t);function c(){if(!t){return o()}void i().then((()=>{o()}),(()=>{o()}));return t}t.end=c}const QC="BrowserProfiling";const tT=()=>({name:QC,setup(t){const e=ji();const n=e&&Pi(e);if(n&&OC(n)){if(GC(n)){ZC(n)}}t.on("spanStart",(t=>{if(t===Pi(t)&&GC(t)){ZC(t)}}));t.on("beforeEnvelope",(t=>{if(!JC()){return}const e=FC(t);if(!e.length){return}const n=[];for(const t of e){const e=t&&t.contexts;const r=e&&e["profile"]&&e["profile"]["profile_id"];const i=e&&e["profile"]&&e["profile"]["start_timestamp"];if(typeof r!=="string"){ef&&G.log("[Profiling] cannot find profile for a span without a profile context");continue}if(!r){ef&&G.log("[Profiling] cannot find profile for a span without a profile context");continue}if(e&&e["profile"]){delete e.profile}const s=KC(r);if(!s){ef&&G.log(`[Profiling] Could not retrieve profile for span: ${r}`);continue}const o=YC(r,i,s,t);if(o){n.push(o)}}LC(t,n)}))}});const eT=Go(tT);export{Qh as a,Gu as b,lo as c,Dx as f,Co as i};
2
+ //# sourceMappingURL=index-212258bf.js.map